]> review.fuel-infra Code Review - packages/trusty/mysql-wsrep-5.6.git/commitdiff
MySQL wsrep updated to 5.6.35 97/30997/2 7.0
authorDenis V. Meltsaykin <dmeltsaykin@mirantis.com>
Fri, 17 Feb 2017 11:56:58 +0000 (14:56 +0300)
committerDenis V. Meltsaykin <dmeltsaykin@mirantis.com>
Tue, 21 Feb 2017 15:22:22 +0000 (15:22 +0000)
cherry-picked from: f9f69935f73237815b920a5495b528fcc93d902e

Change-Id: I2fe3d6fb8fb1c1fd6392e509e298a1a9eb4772cd
Closes-Bug: #1648738
Closes-Bug: #1657707

1110 files changed:
debian/additions/mysql-systemd-start [new file with mode: 0644]
debian/changelog
debian/control
debian/gbp.conf
debian/libmysqld-dev.install [new file with mode: 0644]
debian/libmysqld-pic.README.Debian [new file with mode: 0644]
debian/libmysqld-pic.install [new file with mode: 0644]
debian/libmysqld-pic.manpages [new file with mode: 0644]
debian/mysql-client-5.6.install
debian/mysql-client-5.6.manpages
debian/mysql-server-5.6.py [changed mode: 0755->0644]
debian/mysql-server-wsrep-5.6.config [new file with mode: 0644]
debian/mysql-server-wsrep-5.6.dirs
debian/mysql-server-wsrep-5.6.examples
debian/mysql-server-wsrep-5.6.install
debian/mysql-server-wsrep-5.6.lintian-overrides
debian/mysql-server-wsrep-5.6.manpages
debian/mysql-server-wsrep-5.6.mysql.service [new file with mode: 0644]
debian/mysql-server-wsrep-5.6.mysql.upstart.disabled [new file with mode: 0644]
debian/mysql-server-wsrep-5.6.postinst
debian/mysql-server-wsrep-5.6.postrm [new file with mode: 0644]
debian/mysql-server-wsrep-5.6.preinst
debian/mysql-server-wsrep-5.6.prerm
debian/mysql-server-wsrep-5.6.templates [new file with mode: 0644]
debian/mysql-wsrep-common-5.6.install
debian/mysql-wsrep-libmysqlclient-dev.README.Maintainer [new file with mode: 0644]
debian/mysql-wsrep-libmysqlclient-dev.dirs [new file with mode: 0644]
debian/mysql-wsrep-libmysqlclient-dev.examples [new file with mode: 0644]
debian/mysql-wsrep-libmysqlclient-dev.install [new file with mode: 0644]
debian/mysql-wsrep-libmysqlclient-dev.manpages [new file with mode: 0644]
debian/mysql-wsrep-libmysqlclient18.dirs [new file with mode: 0644]
debian/mysql-wsrep-libmysqlclient18.install [new file with mode: 0644]
debian/mysql-wsrep-libmysqlclient18.lintian-overrides [new file with mode: 0644]
debian/mysql-wsrep-testsuite-5.6.dirs [new file with mode: 0644]
debian/mysql-wsrep-testsuite-5.6.install [new file with mode: 0644]
debian/mysql-wsrep-testsuite-5.6.lintian-overrides [new file with mode: 0644]
debian/patches/series
debian/po/POTFILES.in
debian/po/ar.po
debian/po/ca.po
debian/po/cs.po
debian/po/da.po
debian/po/de.po
debian/po/es.po
debian/po/eu.po
debian/po/fr.po
debian/po/gl.po
debian/po/it.po
debian/po/ja.po
debian/po/nb.po
debian/po/nl.po
debian/po/pt.po
debian/po/pt_BR.po
debian/po/ro.po
debian/po/ru.po
debian/po/sk.po
debian/po/sv.po
debian/po/templates.pot
debian/po/tr.po
debian/rules
mysql-wsrep-5.6/CMakeLists.txt
mysql-wsrep-5.6/CONTRIBUTORS.txt [new file with mode: 0644]
mysql-wsrep-5.6/CONTRIBUTOR_AGREEMENT.txt [new file with mode: 0644]
mysql-wsrep-5.6/VERSION
mysql-wsrep-5.6/client/client_priv.h
mysql-wsrep-5.6/client/mysql.cc
mysql-wsrep-5.6/client/mysql_config_editor.cc
mysql-wsrep-5.6/client/mysql_plugin.c
mysql-wsrep-5.6/client/mysqladmin.cc
mysql-wsrep-5.6/client/mysqlbinlog.cc
mysql-wsrep-5.6/client/mysqlcheck.c
mysql-wsrep-5.6/client/mysqldump.c
mysql-wsrep-5.6/client/mysqlimport.c
mysql-wsrep-5.6/client/mysqlshow.c
mysql-wsrep-5.6/client/mysqlslap.c
mysql-wsrep-5.6/client/mysqltest.cc
mysql-wsrep-5.6/cmake/build_configurations/compiler_options.cmake
mysql-wsrep-5.6/cmake/install_layout.cmake
mysql-wsrep-5.6/cmake/os/SunOS.cmake
mysql-wsrep-5.6/cmake/os/WindowsCache.cmake
mysql-wsrep-5.6/cmake/wsrep.cmake
mysql-wsrep-5.6/config.h.cmake
mysql-wsrep-5.6/configure.cmake
mysql-wsrep-5.6/dbug/tests.c
mysql-wsrep-5.6/debian/README.Maintainer [new file with mode: 0644]
mysql-wsrep-5.6/debian/additions/Docs__Images__Makefile.in [new file with mode: 0644]
mysql-wsrep-5.6/debian/additions/Docs__Makefile.in [new file with mode: 0644]
mysql-wsrep-5.6/debian/additions/debian-start [new file with mode: 0644]
mysql-wsrep-5.6/debian/additions/debian-start.inc.sh [new file with mode: 0644]
mysql-wsrep-5.6/debian/additions/debian_create_root_user.sql [new file with mode: 0644]
mysql-wsrep-5.6/debian/additions/echo_stderr [new file with mode: 0644]
mysql-wsrep-5.6/debian/additions/innotop/changelog.innotop [new file with mode: 0644]
mysql-wsrep-5.6/debian/additions/innotop/innotop [new file with mode: 0644]
mysql-wsrep-5.6/debian/additions/innotop/innotop.1 [new file with mode: 0644]
mysql-wsrep-5.6/debian/additions/my.cnf [new file with mode: 0644]
mysql-wsrep-5.6/debian/additions/my5.6.cnf [new file with mode: 0644]
mysql-wsrep-5.6/debian/additions/mysql-server.lintian-overrides [new file with mode: 0644]
mysql-wsrep-5.6/debian/additions/mysql_config_pic.1 [new file with mode: 0644]
mysql-wsrep-5.6/debian/additions/mysql_embedded.1 [new file with mode: 0644]
mysql-wsrep-5.6/debian/additions/mysqld_safe_syslog.cnf [new file with mode: 0644]
mysql-wsrep-5.6/debian/additions/mysqlreport [new file with mode: 0644]
mysql-wsrep-5.6/debian/additions/mysqlreport.1 [new file with mode: 0644]
mysql-wsrep-5.6/debian/apparmor-profile [new file with mode: 0644]
mysql-wsrep-5.6/debian/changelog [new file with mode: 0644]
mysql-wsrep-5.6/debian/clean [new file with mode: 0644]
mysql-wsrep-5.6/debian/compat [new file with mode: 0644]
mysql-wsrep-5.6/debian/control [new file with mode: 0644]
mysql-wsrep-5.6/debian/copyright [new file with mode: 0644]
mysql-wsrep-5.6/debian/gbp.conf [new file with mode: 0644]
mysql-wsrep-5.6/debian/libmysqld-dev.install [new file with mode: 0644]
mysql-wsrep-5.6/debian/libmysqld-pic.README.Debian [new file with mode: 0644]
mysql-wsrep-5.6/debian/libmysqld-pic.install [new file with mode: 0644]
mysql-wsrep-5.6/debian/libmysqld-pic.manpages [new file with mode: 0644]
mysql-wsrep-5.6/debian/mysql-server-5.6.py [new file with mode: 0644]
mysql-wsrep-5.6/debian/mysql-wsrep-client-5.6.README.Debian [new file with mode: 0644]
mysql-wsrep-5.6/debian/mysql-wsrep-client-5.6.dirs [new file with mode: 0644]
mysql-wsrep-5.6/debian/mysql-wsrep-client-5.6.docs [new file with mode: 0644]
mysql-wsrep-5.6/debian/mysql-wsrep-client-5.6.examples [new file with mode: 0644]
mysql-wsrep-5.6/debian/mysql-wsrep-client-5.6.install [new file with mode: 0644]
mysql-wsrep-5.6/debian/mysql-wsrep-client-5.6.links [new file with mode: 0644]
mysql-wsrep-5.6/debian/mysql-wsrep-client-5.6.lintian-overrides [new file with mode: 0644]
mysql-wsrep-5.6/debian/mysql-wsrep-client-5.6.manpages [new file with mode: 0644]
mysql-wsrep-5.6/debian/mysql-wsrep-common-5.6.dirs [new file with mode: 0644]
mysql-wsrep-5.6/debian/mysql-wsrep-common-5.6.install [new file with mode: 0644]
mysql-wsrep-5.6/debian/mysql-wsrep-common-5.6.postrm [new file with mode: 0644]
mysql-wsrep-5.6/debian/mysql-wsrep-libmysqlclient-dev.README.Maintainer [new file with mode: 0644]
mysql-wsrep-5.6/debian/mysql-wsrep-libmysqlclient-dev.dirs [new file with mode: 0644]
mysql-wsrep-5.6/debian/mysql-wsrep-libmysqlclient-dev.examples [new file with mode: 0644]
mysql-wsrep-5.6/debian/mysql-wsrep-libmysqlclient-dev.install [new file with mode: 0644]
mysql-wsrep-5.6/debian/mysql-wsrep-libmysqlclient-dev.manpages [new file with mode: 0644]
mysql-wsrep-5.6/debian/mysql-wsrep-libmysqlclient18.dirs [new file with mode: 0644]
mysql-wsrep-5.6/debian/mysql-wsrep-libmysqlclient18.install [new file with mode: 0644]
mysql-wsrep-5.6/debian/mysql-wsrep-libmysqlclient18.lintian-overrides [new file with mode: 0644]
mysql-wsrep-5.6/debian/mysql-wsrep-server-5.6.NEWS [new file with mode: 0644]
mysql-wsrep-5.6/debian/mysql-wsrep-server-5.6.README.Debian [new file with mode: 0644]
mysql-wsrep-5.6/debian/mysql-wsrep-server-5.6.config [new file with mode: 0644]
mysql-wsrep-5.6/debian/mysql-wsrep-server-5.6.dirs [new file with mode: 0644]
mysql-wsrep-5.6/debian/mysql-wsrep-server-5.6.examples [new file with mode: 0644]
mysql-wsrep-5.6/debian/mysql-wsrep-server-5.6.install [new file with mode: 0644]
mysql-wsrep-5.6/debian/mysql-wsrep-server-5.6.lintian-overrides [new file with mode: 0644]
mysql-wsrep-5.6/debian/mysql-wsrep-server-5.6.logcheck.ignore.paranoid [new file with mode: 0644]
mysql-wsrep-5.6/debian/mysql-wsrep-server-5.6.logcheck.ignore.server [new file with mode: 0644]
mysql-wsrep-5.6/debian/mysql-wsrep-server-5.6.logcheck.ignore.workstation [new file with mode: 0644]
mysql-wsrep-5.6/debian/mysql-wsrep-server-5.6.manpages [new file with mode: 0644]
mysql-wsrep-5.6/debian/mysql-wsrep-server-5.6.mysql-server.logrotate [new file with mode: 0644]
mysql-wsrep-5.6/debian/mysql-wsrep-server-5.6.mysql.upstart.disabled [new file with mode: 0644]
mysql-wsrep-5.6/debian/mysql-wsrep-server-5.6.postinst [new file with mode: 0644]
mysql-wsrep-5.6/debian/mysql-wsrep-server-5.6.postrm [new file with mode: 0644]
mysql-wsrep-5.6/debian/mysql-wsrep-server-5.6.preinst [new file with mode: 0644]
mysql-wsrep-5.6/debian/mysql-wsrep-server-5.6.prerm [new file with mode: 0644]
mysql-wsrep-5.6/debian/mysql-wsrep-server-5.6.templates [new file with mode: 0644]
mysql-wsrep-5.6/debian/mysql-wsrep-testsuite-5.6.dirs [new file with mode: 0644]
mysql-wsrep-5.6/debian/mysql-wsrep-testsuite-5.6.install [new file with mode: 0644]
mysql-wsrep-5.6/debian/mysql-wsrep-testsuite-5.6.lintian-overrides [new file with mode: 0644]
mysql-wsrep-5.6/debian/patches/fix_standalone_tests.patch [new file with mode: 0644]
mysql-wsrep-5.6/debian/patches/hurd.patch [new file with mode: 0644]
mysql-wsrep-5.6/debian/patches/kfreebsd_tests.patch [new file with mode: 0644]
mysql-wsrep-5.6/debian/patches/scripts__mysqld_safe.sh__signals.patch [new file with mode: 0644]
mysql-wsrep-5.6/debian/patches/series [new file with mode: 0644]
mysql-wsrep-5.6/debian/patches/spelling.patch [new file with mode: 0644]
mysql-wsrep-5.6/debian/po/POTFILES.in [new file with mode: 0644]
mysql-wsrep-5.6/debian/po/ar.po [new file with mode: 0644]
mysql-wsrep-5.6/debian/po/ca.po [new file with mode: 0644]
mysql-wsrep-5.6/debian/po/cs.po [new file with mode: 0644]
mysql-wsrep-5.6/debian/po/da.po [new file with mode: 0644]
mysql-wsrep-5.6/debian/po/de.po [new file with mode: 0644]
mysql-wsrep-5.6/debian/po/es.po [new file with mode: 0644]
mysql-wsrep-5.6/debian/po/eu.po [new file with mode: 0644]
mysql-wsrep-5.6/debian/po/fr.po [new file with mode: 0644]
mysql-wsrep-5.6/debian/po/gl.po [new file with mode: 0644]
mysql-wsrep-5.6/debian/po/it.po [new file with mode: 0644]
mysql-wsrep-5.6/debian/po/ja.po [new file with mode: 0644]
mysql-wsrep-5.6/debian/po/nb.po [new file with mode: 0644]
mysql-wsrep-5.6/debian/po/nl.po [new file with mode: 0644]
mysql-wsrep-5.6/debian/po/pt.po [new file with mode: 0644]
mysql-wsrep-5.6/debian/po/pt_BR.po [new file with mode: 0644]
mysql-wsrep-5.6/debian/po/ro.po [new file with mode: 0644]
mysql-wsrep-5.6/debian/po/ru.po [new file with mode: 0644]
mysql-wsrep-5.6/debian/po/sk.po [new file with mode: 0644]
mysql-wsrep-5.6/debian/po/sv.po [new file with mode: 0644]
mysql-wsrep-5.6/debian/po/templates.pot [new file with mode: 0644]
mysql-wsrep-5.6/debian/po/tr.po [new file with mode: 0644]
mysql-wsrep-5.6/debian/rules [new file with mode: 0755]
mysql-wsrep-5.6/debian/source.lintian-overrides [new file with mode: 0644]
mysql-wsrep-5.6/debian/source/format [new file with mode: 0644]
mysql-wsrep-5.6/debian/tests/build [new file with mode: 0755]
mysql-wsrep-5.6/debian/tests/control [new file with mode: 0644]
mysql-wsrep-5.6/debian/tests/smoke [new file with mode: 0644]
mysql-wsrep-5.6/debian/tests/upstream [new file with mode: 0755]
mysql-wsrep-5.6/debian/watch [new file with mode: 0644]
mysql-wsrep-5.6/extra/comp_err.c
mysql-wsrep-5.6/extra/innochecksum.cc
mysql-wsrep-5.6/extra/my_print_defaults.c
mysql-wsrep-5.6/extra/mysql_waitpid.c
mysql-wsrep-5.6/extra/perror.c
mysql-wsrep-5.6/extra/resolve_stack_dump.cc
mysql-wsrep-5.6/extra/resolveip.c
mysql-wsrep-5.6/extra/yassl/README
mysql-wsrep-5.6/extra/yassl/certs/dsa-cert.pem
mysql-wsrep-5.6/extra/yassl/include/openssl/ssl.h
mysql-wsrep-5.6/extra/yassl/src/log.cpp
mysql-wsrep-5.6/extra/yassl/src/ssl.cpp
mysql-wsrep-5.6/extra/yassl/taocrypt/CMakeLists.txt
mysql-wsrep-5.6/extra/yassl/taocrypt/include/aes.hpp
mysql-wsrep-5.6/extra/yassl/taocrypt/include/integer.hpp
mysql-wsrep-5.6/extra/yassl/taocrypt/src/aes.cpp
mysql-wsrep-5.6/extra/yassl/taocrypt/src/asn.cpp
mysql-wsrep-5.6/extra/yassl/taocrypt/src/dsa.cpp
mysql-wsrep-5.6/extra/yassl/taocrypt/test/test.cpp
mysql-wsrep-5.6/extra/yassl/testsuite/test.hpp
mysql-wsrep-5.6/include/atomic/nolock.h
mysql-wsrep-5.6/include/lf.h
mysql-wsrep-5.6/include/m_ctype.h
mysql-wsrep-5.6/include/my_atomic.h
mysql-wsrep-5.6/include/my_attribute.h
mysql-wsrep-5.6/include/my_default.h
mysql-wsrep-5.6/include/my_global.h
mysql-wsrep-5.6/include/my_pthread.h
mysql-wsrep-5.6/include/my_sys.h
mysql-wsrep-5.6/include/my_tree.h
mysql-wsrep-5.6/include/myisam.h
mysql-wsrep-5.6/include/mysql/psi/mysql_file.h
mysql-wsrep-5.6/include/mysql/psi/mysql_socket.h
mysql-wsrep-5.6/include/mysql/psi/mysql_thread.h
mysql-wsrep-5.6/libmysql/CMakeLists.txt
mysql-wsrep-5.6/libmysql/libmysql.c
mysql-wsrep-5.6/libmysql/libmysql.ver.in
mysql-wsrep-5.6/libmysql/libmysql.ver16.in [new file with mode: 0644]
mysql-wsrep-5.6/libmysqld/lib_sql.cc
mysql-wsrep-5.6/man/comp_err.1
mysql-wsrep-5.6/man/innochecksum.1
mysql-wsrep-5.6/man/msql2mysql.1
mysql-wsrep-5.6/man/my_print_defaults.1
mysql-wsrep-5.6/man/myisam_ftdump.1
mysql-wsrep-5.6/man/myisamchk.1
mysql-wsrep-5.6/man/myisamlog.1
mysql-wsrep-5.6/man/myisampack.1
mysql-wsrep-5.6/man/mysql-stress-test.pl.1
mysql-wsrep-5.6/man/mysql-test-run.pl.1
mysql-wsrep-5.6/man/mysql.1
mysql-wsrep-5.6/man/mysql.server.1
mysql-wsrep-5.6/man/mysql_client_test.1
mysql-wsrep-5.6/man/mysql_client_test_embedded.1
mysql-wsrep-5.6/man/mysql_config.1
mysql-wsrep-5.6/man/mysql_config_editor.1
mysql-wsrep-5.6/man/mysql_convert_table_format.1
mysql-wsrep-5.6/man/mysql_find_rows.1
mysql-wsrep-5.6/man/mysql_fix_extensions.1
mysql-wsrep-5.6/man/mysql_install_db.1
mysql-wsrep-5.6/man/mysql_plugin.1
mysql-wsrep-5.6/man/mysql_secure_installation.1
mysql-wsrep-5.6/man/mysql_setpermission.1
mysql-wsrep-5.6/man/mysql_tzinfo_to_sql.1
mysql-wsrep-5.6/man/mysql_upgrade.1
mysql-wsrep-5.6/man/mysql_waitpid.1
mysql-wsrep-5.6/man/mysql_zap.1
mysql-wsrep-5.6/man/mysqlaccess.1
mysql-wsrep-5.6/man/mysqladmin.1
mysql-wsrep-5.6/man/mysqlbinlog.1
mysql-wsrep-5.6/man/mysqlbug.1
mysql-wsrep-5.6/man/mysqlcheck.1
mysql-wsrep-5.6/man/mysqld.8
mysql-wsrep-5.6/man/mysqld_multi.1
mysql-wsrep-5.6/man/mysqld_safe.1
mysql-wsrep-5.6/man/mysqldump.1
mysql-wsrep-5.6/man/mysqldumpslow.1
mysql-wsrep-5.6/man/mysqlhotcopy.1
mysql-wsrep-5.6/man/mysqlimport.1
mysql-wsrep-5.6/man/mysqlshow.1
mysql-wsrep-5.6/man/mysqlslap.1
mysql-wsrep-5.6/man/mysqltest.1
mysql-wsrep-5.6/man/mysqltest_embedded.1
mysql-wsrep-5.6/man/perror.1
mysql-wsrep-5.6/man/replace.1
mysql-wsrep-5.6/man/resolve_stack_dump.1
mysql-wsrep-5.6/man/resolveip.1
mysql-wsrep-5.6/mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test
mysql-wsrep-5.6/mysql-test/extra/rpl_tests/rpl_extra_col_slave.test
mysql-wsrep-5.6/mysql-test/extra/rpl_tests/rpl_generate_mts_gap.test [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/extra/rpl_tests/rpl_mts_relay_log_recovery.test [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/include/explain_utils.inc
mysql-wsrep-5.6/mysql-test/include/galera_wait_ready.inc
mysql-wsrep-5.6/mysql-test/include/mtr_warnings.sql
mysql-wsrep-5.6/mysql-test/include/mysqld--help.inc
mysql-wsrep-5.6/mysql-test/include/mysqlhotcopy.inc
mysql-wsrep-5.6/mysql-test/include/plugin.defs
mysql-wsrep-5.6/mysql-test/include/range.inc
mysql-wsrep-5.6/mysql-test/include/subquery_sj.inc
mysql-wsrep-5.6/mysql-test/include/wait_condition.inc
mysql-wsrep-5.6/mysql-test/lib/My/SysInfo.pm
mysql-wsrep-5.6/mysql-test/mysql-test-run.pl
mysql-wsrep-5.6/mysql-test/r/alter_table.result
mysql-wsrep-5.6/mysql-test/r/events_2.result
mysql-wsrep-5.6/mysql-test/r/func_str.result
mysql-wsrep-5.6/mysql-test/r/insert.result
mysql-wsrep-5.6/mysql-test/r/mysql_client_test_qcache.result [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/r/mysql_config_editor.result
mysql-wsrep-5.6/mysql-test/r/mysql_plugin.result
mysql-wsrep-5.6/mysql-test/r/mysqlbinlog.result
mysql-wsrep-5.6/mysql-test/r/mysqld--help-notwin.result
mysql-wsrep-5.6/mysql-test/r/mysqld--help-win.result
mysql-wsrep-5.6/mysql-test/r/partition_symlink.result
mysql-wsrep-5.6/mysql-test/r/range_all.result
mysql-wsrep-5.6/mysql-test/r/range_icp.result
mysql-wsrep-5.6/mysql-test/r/range_icp_mrr.result
mysql-wsrep-5.6/mysql-test/r/range_mrr.result
mysql-wsrep-5.6/mysql-test/r/range_mrr_cost.result
mysql-wsrep-5.6/mysql-test/r/range_none.result
mysql-wsrep-5.6/mysql-test/r/sp-prelocking.result
mysql-wsrep-5.6/mysql-test/r/ssl_ca.result [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/r/ssl_crl.result
mysql-wsrep-5.6/mysql-test/r/subquery_sj_all.result
mysql-wsrep-5.6/mysql-test/r/subquery_sj_all_bka.result
mysql-wsrep-5.6/mysql-test/r/subquery_sj_all_bka_nixbnl.result
mysql-wsrep-5.6/mysql-test/r/subquery_sj_all_bkaunique.result
mysql-wsrep-5.6/mysql-test/r/subquery_sj_dupsweed.result
mysql-wsrep-5.6/mysql-test/r/subquery_sj_dupsweed_bka.result
mysql-wsrep-5.6/mysql-test/r/subquery_sj_dupsweed_bka_nixbnl.result
mysql-wsrep-5.6/mysql-test/r/subquery_sj_dupsweed_bkaunique.result
mysql-wsrep-5.6/mysql-test/r/subquery_sj_firstmatch.result
mysql-wsrep-5.6/mysql-test/r/subquery_sj_firstmatch_bka.result
mysql-wsrep-5.6/mysql-test/r/subquery_sj_firstmatch_bka_nixbnl.result
mysql-wsrep-5.6/mysql-test/r/subquery_sj_firstmatch_bkaunique.result
mysql-wsrep-5.6/mysql-test/r/subquery_sj_loosescan.result
mysql-wsrep-5.6/mysql-test/r/subquery_sj_loosescan_bka.result
mysql-wsrep-5.6/mysql-test/r/subquery_sj_loosescan_bka_nixbnl.result
mysql-wsrep-5.6/mysql-test/r/subquery_sj_loosescan_bkaunique.result
mysql-wsrep-5.6/mysql-test/r/subquery_sj_mat.result
mysql-wsrep-5.6/mysql-test/r/subquery_sj_mat_bka.result
mysql-wsrep-5.6/mysql-test/r/subquery_sj_mat_bka_nixbnl.result
mysql-wsrep-5.6/mysql-test/r/subquery_sj_mat_bkaunique.result
mysql-wsrep-5.6/mysql-test/r/subquery_sj_mat_nosj.result
mysql-wsrep-5.6/mysql-test/r/subquery_sj_none.result
mysql-wsrep-5.6/mysql-test/r/subquery_sj_none_bka.result
mysql-wsrep-5.6/mysql-test/r/subquery_sj_none_bka_nixbnl.result
mysql-wsrep-5.6/mysql-test/r/subquery_sj_none_bkaunique.result
mysql-wsrep-5.6/mysql-test/r/udf_services.result [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/r/validate_password_plugin.result
mysql-wsrep-5.6/mysql-test/r/variables-win.result [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/auth_sec/r/secure_file_priv_error.result [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/auth_sec/r/secure_file_priv_null.result [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/auth_sec/r/secure_file_priv_warnings.result [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/auth_sec/r/secure_file_priv_warnings_not_win.result [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/auth_sec/r/secure_file_priv_warnings_win.result [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/auth_sec/t/secure_file_priv_error.test [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/auth_sec/t/secure_file_priv_null.test [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/auth_sec/t/secure_file_priv_warnings.test [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/auth_sec/t/secure_file_priv_warnings_not_win.test [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/auth_sec/t/secure_file_priv_warnings_win.test [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/binlog/r/binlog_dmls_on_tmp_tables_readonly.result [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/binlog/r/binlog_index.result
mysql-wsrep-5.6/mysql-test/suite/binlog/r/binlog_killed.result
mysql-wsrep-5.6/mysql-test/suite/binlog/r/binlog_killed_simulate.result
mysql-wsrep-5.6/mysql-test/suite/binlog/r/binlog_sql_mode.result
mysql-wsrep-5.6/mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result
mysql-wsrep-5.6/mysql-test/suite/binlog/t/binlog_dmls_on_tmp_tables_readonly.test [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/binlog/t/binlog_index.test
mysql-wsrep-5.6/mysql-test/suite/binlog/t/binlog_killed.test
mysql-wsrep-5.6/mysql-test/suite/binlog/t/binlog_killed_simulate.test
mysql-wsrep-5.6/mysql-test/suite/binlog/t/binlog_sql_mode.test
mysql-wsrep-5.6/mysql-test/suite/connection_control/inc/check_connection_delay.inc [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/connection_control/inc/cleanup_proxy_accounts.inc [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/connection_control/inc/have_connection_control_plugin.inc [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/connection_control/inc/have_test_plugin.inc [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/connection_control/inc/install_connection_control_plugin.inc [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/connection_control/inc/set_after_marker.inc [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/connection_control/inc/set_before_marker.inc [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/connection_control/inc/setup_proxy_accounts.inc [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/connection_control/inc/uninstall_connection_control_plugin.inc [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/connection_control/r/connection_delay_anonymous_user.result [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/connection_control/r/connection_delay_info_schema_view.result [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/connection_control/r/connection_delay_invalid_users.result [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/connection_control/r/connection_delay_min_max.result [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/connection_control/r/connection_delay_proxy_users.result [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/connection_control/r/connection_delay_valid_users.result [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/connection_control/r/status_variables.result [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/connection_control/r/system_variables.result [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/connection_control/t/connection_delay_anonymous_user-master.opt [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/connection_control/t/connection_delay_anonymous_user.test [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/connection_control/t/connection_delay_info_schema_view-master.opt [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/connection_control/t/connection_delay_info_schema_view.test [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/connection_control/t/connection_delay_invalid_users-master.opt [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/connection_control/t/connection_delay_invalid_users.test [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/connection_control/t/connection_delay_min_max-master.opt [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/connection_control/t/connection_delay_min_max.test [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/connection_control/t/connection_delay_proxy_users-master.opt [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/connection_control/t/connection_delay_proxy_users.test [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/connection_control/t/connection_delay_valid_users-master.opt [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/connection_control/t/connection_delay_valid_users.test [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/connection_control/t/status_variables-master.opt [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/connection_control/t/status_variables.test [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/connection_control/t/system_variables-master.opt [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/connection_control/t/system_variables.test [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/galera/galera_2nodes.cnf
mysql-wsrep-5.6/mysql-test/suite/galera/galera_2nodes_as_master_slave.cnf [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/galera/galera_2nodes_as_master_with_repl_filter.cnf [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/galera/r/GAL-401.result [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/galera/r/GAL-419.result [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/galera/r/GAL-480.result [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/galera/r/MW-284.result [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/galera/r/MW-285.result [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/galera/r/MW-286.result [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/galera/r/MW-292.result [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/galera/r/MW-309.result [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/galera/r/MW-313.result [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/galera/r/MW-328A.result [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/galera/r/MW-328B.result [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/galera/r/MW-328C.result [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/galera/r/MW-328D.result [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/galera/r/MW-328E.result [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/galera/r/MW-329.result [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/galera/r/ev51914.result [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/galera/r/galera#414.result [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_account_management.result
mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_admin.result [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_as_slave_gtid_replicate_do_db.result [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_as_slave_gtid_replicate_do_db_cc.result [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_bf_abort.result
mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_bf_abort_flush_for_export.result
mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_defaults.result
mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_desync_overlapped.result [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_gcache_recover.result [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_gcache_recover_full_gcache.result [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_gcache_recover_manytrx.result [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_kill_ddl.result
mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_many_tables_pk.result
mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_parallel_simple.result
mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_repl_max_ws_size.result
mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_restart_on_unknown_option.result [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_split_brain.result
mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_ssl_upgrade.result
mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_toi_ddl_fk_update.result [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_toi_drop_database.result [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_toi_truncate.result [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_var_cluster_address.result
mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_var_max_ws_rows.result [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_var_max_ws_size.result
mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_var_retry_autocommit.result [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_wsrep_log_conficts.result [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_wsrep_provider_options_syntax.result [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/galera/r/lp1376747-2.result [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/galera/r/lp1376747-3.result [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/galera/r/lp1376747-4.result [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/galera/r/lp1376747.result [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/galera/r/pxc-421.result [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/galera/t/GAL-401.test [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/galera/t/GAL-419.test [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/galera/t/GAL-480.test [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/galera/t/MW-284.cnf [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/galera/t/MW-284.test [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/galera/t/MW-285.test [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/galera/t/MW-286.test [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/galera/t/MW-292.test [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/galera/t/MW-309.test [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/galera/t/MW-313-master.opt [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/galera/t/MW-313.test [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/galera/t/MW-328-footer.inc [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/galera/t/MW-328-header.inc [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/galera/t/MW-328A.test [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/galera/t/MW-328B.test [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/galera/t/MW-328C.test [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/galera/t/MW-328D.test [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/galera/t/MW-328E.test [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/galera/t/MW-329-master.opt [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/galera/t/MW-329.test [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/galera/t/ev51914.test [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/galera/t/galera#414.cnf [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/galera/t/galera#414.test [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_account_management.test
mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_admin.test [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_as_slave_gtid_replicate_do_db.cnf [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_as_slave_gtid_replicate_do_db.test [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_as_slave_gtid_replicate_do_db_cc.cnf [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_as_slave_gtid_replicate_do_db_cc.test [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_autoinc_sst_xtrabackup.cnf
mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_autoinc_sst_xtrabackup.test
mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_bf_abort.test
mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_bf_abort_flush_for_export.test
mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_desync_overlapped.test [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_flush_local.opt
mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_gcache_recover.cnf [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_gcache_recover.test [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_gcache_recover_full_gcache.cnf [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_gcache_recover_full_gcache.test [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_gcache_recover_manytrx.cnf [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_gcache_recover_manytrx.test [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_kill_ddl.test
mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_many_tables_pk.test
mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_parallel_simple.test
mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_repl_max_ws_size.test
mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_restart_nochanges.test
mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_restart_on_unknown_option.test [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_split_brain.test
mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_ssl_upgrade.test
mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_toi_ddl_fk_update.test [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_toi_drop_database.test [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_toi_truncate.test [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_var_cluster_address.test
mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_var_max_ws_rows.test [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_var_max_ws_size.test
mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_var_retry_autocommit.test [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_wsrep_log_conficts-master.opt [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_wsrep_log_conficts.test [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_wsrep_provider_options_syntax.test [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/galera/t/lp1376747-2.test [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/galera/t/lp1376747-3.test [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/galera/t/lp1376747-4.test [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/galera/t/lp1376747.test [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/galera/t/pxc-421.test [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/galera_3nodes/galera_3nodes.cnf
mysql-wsrep-5.6/mysql-test/suite/galera_3nodes/r/galera_pc_bootstrap.result
mysql-wsrep-5.6/mysql-test/suite/galera_3nodes/r/galera_pc_weight.result
mysql-wsrep-5.6/mysql-test/suite/galera_3nodes/r/galera_safe_to_bootstrap.result [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/galera_3nodes/t/galera_pc_bootstrap.cnf [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/galera_3nodes/t/galera_pc_bootstrap.test
mysql-wsrep-5.6/mysql-test/suite/galera_3nodes/t/galera_pc_weight.cnf [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/galera_3nodes/t/galera_pc_weight.test
mysql-wsrep-5.6/mysql-test/suite/galera_3nodes/t/galera_safe_to_bootstrap.test [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/galera_3nodes/t/galera_var_dirty_reads2.test
mysql-wsrep-5.6/mysql-test/suite/innodb/r/alter_rename_existing.result [changed mode: 0755->0644]
mysql-wsrep-5.6/mysql-test/suite/innodb/r/autoinc_debug.result [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/innodb/r/flush-hang.result [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/innodb/r/import_update_stats.result [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/innodb/r/innodb-index-online-norebuild.result [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/innodb/r/innodb-log-file-size-1.result
mysql-wsrep-5.6/mysql-test/suite/innodb/r/innodb_bug54044.result
mysql-wsrep-5.6/mysql-test/suite/innodb/r/innodb_deadlock_with_autoinc.result [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/innodb/r/innodb_mysql.result
mysql-wsrep-5.6/mysql-test/suite/innodb/r/innodb_stats_del_mark.result [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/innodb/r/monitor.result
mysql-wsrep-5.6/mysql-test/suite/innodb/t/alter_rename_existing.test [changed mode: 0755->0644]
mysql-wsrep-5.6/mysql-test/suite/innodb/t/autoinc_debug.test [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/innodb/t/flush-hang.test [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/innodb/t/galera.skip
mysql-wsrep-5.6/mysql-test/suite/innodb/t/import_update_stats.test [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/innodb/t/innodb-index-online-norebuild.test [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/innodb/t/innodb-log-file-size-1.test
mysql-wsrep-5.6/mysql-test/suite/innodb/t/innodb_bug54044.test
mysql-wsrep-5.6/mysql-test/suite/innodb/t/innodb_deadlock_with_autoinc-master.opt [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/innodb/t/innodb_deadlock_with_autoinc.test [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/innodb/t/innodb_stats_del_mark-master.opt [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/innodb/t/innodb_stats_del_mark.test [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/innodb/t/monitor.test
mysql-wsrep-5.6/mysql-test/suite/innodb_fts/r/innodb-fts-basic.result
mysql-wsrep-5.6/mysql-test/suite/innodb_fts/r/sync.result
mysql-wsrep-5.6/mysql-test/suite/innodb_fts/t/innodb-fts-basic.test
mysql-wsrep-5.6/mysql-test/suite/innodb_fts/t/sync.test
mysql-wsrep-5.6/mysql-test/suite/opt_trace/include/bugs.inc
mysql-wsrep-5.6/mysql-test/suite/opt_trace/r/bugs_no_prot_all.result
mysql-wsrep-5.6/mysql-test/suite/opt_trace/r/bugs_no_prot_none.result
mysql-wsrep-5.6/mysql-test/suite/opt_trace/r/bugs_ps_prot_all.result
mysql-wsrep-5.6/mysql-test/suite/opt_trace/r/bugs_ps_prot_none.result
mysql-wsrep-5.6/mysql-test/suite/opt_trace/validate_json.pl [new file with mode: 0755]
mysql-wsrep-5.6/mysql-test/suite/parts/inc/partition-dml-1-11.inc
mysql-wsrep-5.6/mysql-test/suite/parts/r/partition-dml-1-11-innodb.result
mysql-wsrep-5.6/mysql-test/suite/parts/r/partition-dml-1-11-myisam.result
mysql-wsrep-5.6/mysql-test/suite/rpl/r/rpl_autoinc_lock_style.result [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/rpl/r/rpl_extra_col_slave_innodb.result
mysql-wsrep-5.6/mysql-test/suite/rpl/r/rpl_extra_col_slave_myisam.result
mysql-wsrep-5.6/mysql-test/suite/rpl/r/rpl_mts_relay_log_post_crash_recovery.result [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/rpl/r/rpl_mts_relay_log_recovery_on_error.result [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/rpl/r/rpl_parallel_change_master.result
mysql-wsrep-5.6/mysql-test/suite/rpl/r/rpl_row_img_sanity.result
mysql-wsrep-5.6/mysql-test/suite/rpl/r/rpl_row_slave_skip_error_all.result [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/rpl/r/rpl_server_uuid.result
mysql-wsrep-5.6/mysql-test/suite/rpl/r/rpl_sql_thread_error.result [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/rpl/r/rpl_zombie_dump_threads.result [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/rpl/t/disabled.def
mysql-wsrep-5.6/mysql-test/suite/rpl/t/rpl_autoinc_lock_style.test [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/rpl/t/rpl_mts_relay_log_post_crash_recovery-slave.opt [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/rpl/t/rpl_mts_relay_log_post_crash_recovery.test [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/rpl/t/rpl_mts_relay_log_recovery_on_error-slave.opt [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/rpl/t/rpl_mts_relay_log_recovery_on_error.test [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/rpl/t/rpl_parallel_change_master.test
mysql-wsrep-5.6/mysql-test/suite/rpl/t/rpl_row_img_sanity.test
mysql-wsrep-5.6/mysql-test/suite/rpl/t/rpl_row_slave_skip_error_all-slave.opt [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/rpl/t/rpl_row_slave_skip_error_all.test [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/rpl/t/rpl_server_uuid.test
mysql-wsrep-5.6/mysql-test/suite/rpl/t/rpl_sql_thread_error.test [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/rpl/t/rpl_zombie_dump_threads.test [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/sys_vars/r/innodb_stats_include_delete_marked_basic.result [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/sys_vars/t/innodb_stats_include_delete_marked_basic.test [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/t/alter_table.test
mysql-wsrep-5.6/mysql-test/t/events_2.test
mysql-wsrep-5.6/mysql-test/t/func_str.test
mysql-wsrep-5.6/mysql-test/t/innodb_explain_json_non_select_all.test
mysql-wsrep-5.6/mysql-test/t/innodb_explain_json_non_select_none.test
mysql-wsrep-5.6/mysql-test/t/innodb_explain_non_select_all.test
mysql-wsrep-5.6/mysql-test/t/innodb_explain_non_select_none.test
mysql-wsrep-5.6/mysql-test/t/insert.test
mysql-wsrep-5.6/mysql-test/t/myisam_explain_json_non_select_all.test
mysql-wsrep-5.6/mysql-test/t/myisam_explain_json_non_select_none.test
mysql-wsrep-5.6/mysql-test/t/myisam_explain_non_select_all.test
mysql-wsrep-5.6/mysql-test/t/myisam_explain_non_select_none.test
mysql-wsrep-5.6/mysql-test/t/mysql_client_test_qcache-master.opt [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/t/mysql_client_test_qcache.test [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/t/mysql_config_editor.test
mysql-wsrep-5.6/mysql-test/t/mysqlbinlog.test
mysql-wsrep-5.6/mysql-test/t/partition_symlink.test
mysql-wsrep-5.6/mysql-test/t/sp-prelocking.test
mysql-wsrep-5.6/mysql-test/t/ssl_ca-master.opt [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/t/ssl_ca.test [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/t/ssl_crl.test
mysql-wsrep-5.6/mysql-test/t/udf_services-master.opt [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/t/udf_services.test [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/t/validate_password_plugin.test
mysql-wsrep-5.6/mysql-test/t/variables-win.test [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/t/wl6443_deprecation.test
mysql-wsrep-5.6/mysql-test/valgrind.supp
mysql-wsrep-5.6/mysys/CMakeLists.txt
mysql-wsrep-5.6/mysys/charset-def.c
mysql-wsrep-5.6/mysys/charset.c
mysql-wsrep-5.6/mysys/errors.c
mysql-wsrep-5.6/mysys/lf_alloc-pin.c
mysql-wsrep-5.6/mysys/mf_cache.c
mysql-wsrep-5.6/mysys/mf_iocache.c
mysql-wsrep-5.6/mysys/mf_keycache.c
mysql-wsrep-5.6/mysys/mf_keycaches.c
mysql-wsrep-5.6/mysys/mf_tempfile.c
mysql-wsrep-5.6/mysys/mf_unixpath.c
mysql-wsrep-5.6/mysys/my_access.c
mysql-wsrep-5.6/mysys/my_alarm.c
mysql-wsrep-5.6/mysys/my_alloc.c
mysql-wsrep-5.6/mysys/my_bitmap.c
mysql-wsrep-5.6/mysys/my_fopen.c
mysql-wsrep-5.6/mysys/my_fstream.c
mysql-wsrep-5.6/mysys/my_gethwaddr.c
mysql-wsrep-5.6/mysys/my_getsystime.c
mysql-wsrep-5.6/mysys/my_lib.c
mysql-wsrep-5.6/mysys/my_mess.c
mysql-wsrep-5.6/mysys/my_redel.c
mysql-wsrep-5.6/mysys/my_static.c
mysql-wsrep-5.6/mysys/my_symlink.c
mysql-wsrep-5.6/mysys/my_sync.c
mysql-wsrep-5.6/mysys/my_thr_init.c
mysql-wsrep-5.6/mysys/my_write.c
mysql-wsrep-5.6/mysys/psi_noop.c
mysql-wsrep-5.6/mysys/ptr_cmp.c
mysql-wsrep-5.6/mysys/stacktrace.c
mysql-wsrep-5.6/mysys/testhash.c
mysql-wsrep-5.6/mysys/thr_alarm.c
mysql-wsrep-5.6/mysys/thr_lock.c
mysql-wsrep-5.6/mysys/thr_mutex.c
mysql-wsrep-5.6/mysys/tree.c
mysql-wsrep-5.6/mysys/waiting_threads.c
mysql-wsrep-5.6/mysys_ssl/my_default.cc
mysql-wsrep-5.6/mysys_ssl/my_getopt.cc
mysql-wsrep-5.6/packaging/WiX/mysql_server.wxs.in
mysql-wsrep-5.6/packaging/deb-jessie/mysql-community-server.postinst
mysql-wsrep-5.6/packaging/deb-jessie/mysql-community-server.postrm
mysql-wsrep-5.6/packaging/deb-jessie/mysql-community-server.preinst
mysql-wsrep-5.6/packaging/deb-jessie/mysql-community-server.templates
mysql-wsrep-5.6/packaging/deb-jessie/source/include-binaries
mysql-wsrep-5.6/packaging/deb-precise/extra/apparmor-profile
mysql-wsrep-5.6/packaging/deb-precise/mysql-community-server.postinst
mysql-wsrep-5.6/packaging/deb-precise/mysql-community-server.postrm
mysql-wsrep-5.6/packaging/deb-precise/mysql-community-server.preinst
mysql-wsrep-5.6/packaging/deb-precise/mysql-community-server.templates
mysql-wsrep-5.6/packaging/deb-precise/source/include-binaries
mysql-wsrep-5.6/packaging/deb-trusty/extra/apparmor-profile
mysql-wsrep-5.6/packaging/deb-trusty/mysql-community-server.postinst
mysql-wsrep-5.6/packaging/deb-trusty/mysql-community-server.postrm
mysql-wsrep-5.6/packaging/deb-trusty/mysql-community-server.preinst
mysql-wsrep-5.6/packaging/deb-trusty/mysql-community-server.templates
mysql-wsrep-5.6/packaging/deb-trusty/source/include-binaries
mysql-wsrep-5.6/packaging/deb-utopic/source/include-binaries
mysql-wsrep-5.6/packaging/deb-vivid/source/include-binaries
mysql-wsrep-5.6/packaging/deb-wheezy/mysql-community-server.postinst
mysql-wsrep-5.6/packaging/deb-wheezy/mysql-community-server.postrm
mysql-wsrep-5.6/packaging/deb-wheezy/mysql-community-server.preinst
mysql-wsrep-5.6/packaging/deb-wheezy/mysql-community-server.templates
mysql-wsrep-5.6/packaging/deb-wheezy/source/include-binaries
mysql-wsrep-5.6/packaging/deb-wily/source/include-binaries
mysql-wsrep-5.6/packaging/deb-xenial/changelog [new file with mode: 0644]
mysql-wsrep-5.6/packaging/deb-xenial/compat [new file with mode: 0644]
mysql-wsrep-5.6/packaging/deb-xenial/control [new file with mode: 0644]
mysql-wsrep-5.6/packaging/deb-xenial/copyright [new file with mode: 0644]
mysql-wsrep-5.6/packaging/deb-xenial/extra/apparmor-profile [new file with mode: 0644]
mysql-wsrep-5.6/packaging/deb-xenial/extra/my.cnf.fallback [new file with mode: 0644]
mysql-wsrep-5.6/packaging/deb-xenial/extra/mysql-systemd-start [new file with mode: 0644]
mysql-wsrep-5.6/packaging/deb-xenial/extra/mysql.cnf [new file with mode: 0644]
mysql-wsrep-5.6/packaging/deb-xenial/extra/mysql.conf.cnf [new file with mode: 0644]
mysql-wsrep-5.6/packaging/deb-xenial/extra/mysql_embedded.1 [new file with mode: 0644]
mysql-wsrep-5.6/packaging/deb-xenial/extra/mysqld.cnf [new file with mode: 0644]
mysql-wsrep-5.6/packaging/deb-xenial/libmysqlclient-dev.install [new file with mode: 0644]
mysql-wsrep-5.6/packaging/deb-xenial/libmysqlclient-dev.lintian-overrides [new file with mode: 0644]
mysql-wsrep-5.6/packaging/deb-xenial/libmysqlclient18.install [new file with mode: 0644]
mysql-wsrep-5.6/packaging/deb-xenial/libmysqlclient18.lintian-overrides [new file with mode: 0644]
mysql-wsrep-5.6/packaging/deb-xenial/libmysqld-dev.install [new file with mode: 0644]
mysql-wsrep-5.6/packaging/deb-xenial/libmysqld-dev.lintian-overrides [new file with mode: 0644]
mysql-wsrep-5.6/packaging/deb-xenial/mysql-client.install [new file with mode: 0644]
mysql-wsrep-5.6/packaging/deb-xenial/mysql-client.lintian-overrides [new file with mode: 0644]
mysql-wsrep-5.6/packaging/deb-xenial/mysql-common.dirs [new file with mode: 0644]
mysql-wsrep-5.6/packaging/deb-xenial/mysql-common.install [new file with mode: 0644]
mysql-wsrep-5.6/packaging/deb-xenial/mysql-common.lintian-overrides [new file with mode: 0644]
mysql-wsrep-5.6/packaging/deb-xenial/mysql-common.postinst [new file with mode: 0644]
mysql-wsrep-5.6/packaging/deb-xenial/mysql-common.postrm [new file with mode: 0644]
mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-bench.install [new file with mode: 0644]
mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-bench.lintian-overrides [new file with mode: 0644]
mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-client.install [new file with mode: 0644]
mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-client.lintian-overrides [new file with mode: 0644]
mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-server.config [new file with mode: 0755]
mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-server.dirs [new file with mode: 0644]
mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-server.install [new file with mode: 0644]
mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-server.lintian-overrides [new file with mode: 0644]
mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-server.mysql.init [new file with mode: 0755]
mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-server.mysql.service [new file with mode: 0644]
mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-server.postinst [new file with mode: 0755]
mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-server.postrm [new file with mode: 0755]
mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-server.preinst [new file with mode: 0755]
mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-server.prerm [new file with mode: 0755]
mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-server.templates [new file with mode: 0644]
mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-source.install [new file with mode: 0644]
mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-source.lintian-overrides [new file with mode: 0644]
mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-test.install [new file with mode: 0644]
mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-test.links [new file with mode: 0644]
mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-test.lintian-overrides [new file with mode: 0644]
mysql-wsrep-5.6/packaging/deb-xenial/mysql-server.install [new file with mode: 0644]
mysql-wsrep-5.6/packaging/deb-xenial/mysql-server.lintian-overrides [new file with mode: 0644]
mysql-wsrep-5.6/packaging/deb-xenial/mysql-testsuite.install [new file with mode: 0644]
mysql-wsrep-5.6/packaging/deb-xenial/mysql-testsuite.lintian-overrides [new file with mode: 0644]
mysql-wsrep-5.6/packaging/deb-xenial/patches/fix-man-page-links.patch [new file with mode: 0644]
mysql-wsrep-5.6/packaging/deb-xenial/patches/fix-mtr-search-paths.patch [new file with mode: 0644]
mysql-wsrep-5.6/packaging/deb-xenial/patches/fix-mysql_install_db.patch [new file with mode: 0644]
mysql-wsrep-5.6/packaging/deb-xenial/patches/series [new file with mode: 0644]
mysql-wsrep-5.6/packaging/deb-xenial/rules [new file with mode: 0755]
mysql-wsrep-5.6/packaging/deb-xenial/source/format [new file with mode: 0644]
mysql-wsrep-5.6/packaging/deb-xenial/source/include-binaries [new file with mode: 0644]
mysql-wsrep-5.6/packaging/deb-xenial/watch [new file with mode: 0644]
mysql-wsrep-5.6/packaging/rpm-docker/mysql.spec.in
mysql-wsrep-5.6/packaging/rpm-fedora/CMakeLists.txt
mysql-wsrep-5.6/packaging/rpm-fedora/mysql-systemd-start
mysql-wsrep-5.6/packaging/rpm-fedora/mysql.spec.in
mysql-wsrep-5.6/packaging/rpm-fedora/mysql_config.sh
mysql-wsrep-5.6/packaging/rpm-fedora/mysqld.service
mysql-wsrep-5.6/packaging/rpm-oel/CMakeLists.txt
mysql-wsrep-5.6/packaging/rpm-oel/mysql-systemd-start
mysql-wsrep-5.6/packaging/rpm-oel/mysql.init
mysql-wsrep-5.6/packaging/rpm-oel/mysql.spec.in
mysql-wsrep-5.6/packaging/rpm-oel/mysql_config.sh
mysql-wsrep-5.6/packaging/rpm-oel/mysqld.service
mysql-wsrep-5.6/packaging/rpm-sles/mysql-systemd-start
mysql-wsrep-5.6/packaging/rpm-sles/mysql.init
mysql-wsrep-5.6/packaging/rpm-sles/mysql.spec.in
mysql-wsrep-5.6/packaging/rpm-sles/mysqld.service
mysql-wsrep-5.6/packaging/solaris/postinstall-solaris.sh
mysql-wsrep-5.6/plugin/audit_null/audit_null.c
mysql-wsrep-5.6/plugin/auth/dialog.c
mysql-wsrep-5.6/plugin/auth/mysql_no_login.c
mysql-wsrep-5.6/plugin/connection_control/CMakeLists.txt [new file with mode: 0644]
mysql-wsrep-5.6/plugin/connection_control/connection_control.cc [new file with mode: 0644]
mysql-wsrep-5.6/plugin/connection_control/connection_control.h [new file with mode: 0644]
mysql-wsrep-5.6/plugin/connection_control/connection_control_coordinator.cc [new file with mode: 0644]
mysql-wsrep-5.6/plugin/connection_control/connection_control_coordinator.h [new file with mode: 0644]
mysql-wsrep-5.6/plugin/connection_control/connection_control_data.h [new file with mode: 0644]
mysql-wsrep-5.6/plugin/connection_control/connection_control_interfaces.h [new file with mode: 0644]
mysql-wsrep-5.6/plugin/connection_control/connection_control_memory.h [new file with mode: 0644]
mysql-wsrep-5.6/plugin/connection_control/connection_delay.cc [new file with mode: 0644]
mysql-wsrep-5.6/plugin/connection_control/connection_delay.h [new file with mode: 0644]
mysql-wsrep-5.6/plugin/connection_control/connection_delay_api.h [new file with mode: 0644]
mysql-wsrep-5.6/plugin/connection_control/security_context_wrapper.cc [new file with mode: 0644]
mysql-wsrep-5.6/plugin/connection_control/security_context_wrapper.h [new file with mode: 0644]
mysql-wsrep-5.6/plugin/daemon_example/daemon_example.cc
mysql-wsrep-5.6/plugin/fulltext/plugin_example.c
mysql-wsrep-5.6/plugin/innodb_memcached/daemon_memcached/.gitignore [new file with mode: 0644]
mysql-wsrep-5.6/plugin/innodb_memcached/daemon_memcached/utilities/engine_loader.c
mysql-wsrep-5.6/plugin/innodb_memcached/innodb_memcache/.gitignore [new file with mode: 0644]
mysql-wsrep-5.6/plugin/innodb_memcached/innodb_memcache/src/innodb_engine.c
mysql-wsrep-5.6/plugin/password_validation/validate_password.cc
mysql-wsrep-5.6/plugin/semisync/semisync_master.cc
mysql-wsrep-5.6/plugin/udf_services/CMakeLists.txt [new file with mode: 0644]
mysql-wsrep-5.6/plugin/udf_services/test_udf_services.cc [new file with mode: 0644]
mysql-wsrep-5.6/regex/regcomp.c
mysql-wsrep-5.6/regex/split.c
mysql-wsrep-5.6/scripts/CMakeLists.txt
mysql-wsrep-5.6/scripts/mysqld_multi.sh
mysql-wsrep-5.6/scripts/mysqld_safe.sh
mysql-wsrep-5.6/sql-common/client.c
mysql-wsrep-5.6/sql-common/my_time.c
mysql-wsrep-5.6/sql/binlog.cc
mysql-wsrep-5.6/sql/binlog.h
mysql-wsrep-5.6/sql/field.cc
mysql-wsrep-5.6/sql/field.h
mysql-wsrep-5.6/sql/field_conv.cc
mysql-wsrep-5.6/sql/filesort.cc
mysql-wsrep-5.6/sql/gen_lex_hash.cc
mysql-wsrep-5.6/sql/ha_ndb_index_stat.cc
mysql-wsrep-5.6/sql/ha_ndbcluster.cc
mysql-wsrep-5.6/sql/ha_ndbcluster_binlog.cc
mysql-wsrep-5.6/sql/ha_partition.cc
mysql-wsrep-5.6/sql/handler.cc
mysql-wsrep-5.6/sql/handler.h
mysql-wsrep-5.6/sql/hostname.cc
mysql-wsrep-5.6/sql/init.h
mysql-wsrep-5.6/sql/item.cc
mysql-wsrep-5.6/sql/item.h
mysql-wsrep-5.6/sql/item_func.cc
mysql-wsrep-5.6/sql/item_geofunc.cc
mysql-wsrep-5.6/sql/item_geofunc.h
mysql-wsrep-5.6/sql/item_sum.cc
mysql-wsrep-5.6/sql/item_sum.h
mysql-wsrep-5.6/sql/item_timefunc.cc
mysql-wsrep-5.6/sql/log.cc
mysql-wsrep-5.6/sql/log.h
mysql-wsrep-5.6/sql/log_event.cc
mysql-wsrep-5.6/sql/log_event.h
mysql-wsrep-5.6/sql/log_event_old.cc
mysql-wsrep-5.6/sql/log_event_old.h
mysql-wsrep-5.6/sql/mdl.cc
mysql-wsrep-5.6/sql/mf_iocache.cc
mysql-wsrep-5.6/sql/mysqld.cc
mysql-wsrep-5.6/sql/mysqld.h
mysql-wsrep-5.6/sql/net_serv.cc
mysql-wsrep-5.6/sql/opt_range.cc
mysql-wsrep-5.6/sql/partition_info.cc
mysql-wsrep-5.6/sql/partition_info.h
mysql-wsrep-5.6/sql/password.c
mysql-wsrep-5.6/sql/rpl_filter.cc
mysql-wsrep-5.6/sql/rpl_info_dummy.cc
mysql-wsrep-5.6/sql/rpl_info_file.cc
mysql-wsrep-5.6/sql/rpl_info_table.cc
mysql-wsrep-5.6/sql/rpl_master.cc
mysql-wsrep-5.6/sql/rpl_master.h
mysql-wsrep-5.6/sql/rpl_mi.cc
mysql-wsrep-5.6/sql/rpl_record.cc
mysql-wsrep-5.6/sql/rpl_rli.cc
mysql-wsrep-5.6/sql/rpl_rli.h
mysql-wsrep-5.6/sql/rpl_rli_pdb.cc
mysql-wsrep-5.6/sql/rpl_slave.cc
mysql-wsrep-5.6/sql/rpl_utility.cc
mysql-wsrep-5.6/sql/sp.cc
mysql-wsrep-5.6/sql/sql_acl.cc
mysql-wsrep-5.6/sql/sql_analyse.cc
mysql-wsrep-5.6/sql/sql_analyse.h
mysql-wsrep-5.6/sql/sql_audit.cc
mysql-wsrep-5.6/sql/sql_audit.h
mysql-wsrep-5.6/sql/sql_base.cc
mysql-wsrep-5.6/sql/sql_cache.cc
mysql-wsrep-5.6/sql/sql_class.cc
mysql-wsrep-5.6/sql/sql_class.h
mysql-wsrep-5.6/sql/sql_connect.cc
mysql-wsrep-5.6/sql/sql_cursor.cc
mysql-wsrep-5.6/sql/sql_db.cc
mysql-wsrep-5.6/sql/sql_executor.cc
mysql-wsrep-5.6/sql/sql_executor.h
mysql-wsrep-5.6/sql/sql_handler.cc
mysql-wsrep-5.6/sql/sql_insert.cc
mysql-wsrep-5.6/sql/sql_lex.cc
mysql-wsrep-5.6/sql/sql_load.cc
mysql-wsrep-5.6/sql/sql_manager.cc
mysql-wsrep-5.6/sql/sql_optimizer.cc
mysql-wsrep-5.6/sql/sql_parse.cc
mysql-wsrep-5.6/sql/sql_parse.h
mysql-wsrep-5.6/sql/sql_planner.cc
mysql-wsrep-5.6/sql/sql_plugin.cc
mysql-wsrep-5.6/sql/sql_prepare.cc
mysql-wsrep-5.6/sql/sql_select.cc
mysql-wsrep-5.6/sql/sql_select.h
mysql-wsrep-5.6/sql/sql_servers.cc
mysql-wsrep-5.6/sql/sql_show.cc
mysql-wsrep-5.6/sql/sql_string.cc
mysql-wsrep-5.6/sql/sql_table.cc
mysql-wsrep-5.6/sql/sql_time.cc
mysql-wsrep-5.6/sql/sql_tmp_table.cc
mysql-wsrep-5.6/sql/sql_udf.cc
mysql-wsrep-5.6/sql/sql_update.cc
mysql-wsrep-5.6/sql/sql_yacc.yy
mysql-wsrep-5.6/sql/sys_vars.cc
mysql-wsrep-5.6/sql/table.cc
mysql-wsrep-5.6/sql/table.h
mysql-wsrep-5.6/sql/table_cache.cc
mysql-wsrep-5.6/sql/transaction.cc
mysql-wsrep-5.6/sql/tztime.cc
mysql-wsrep-5.6/sql/udf_example.cc
mysql-wsrep-5.6/sql/wsrep_applier.cc
mysql-wsrep-5.6/sql/wsrep_binlog.h
mysql-wsrep-5.6/sql/wsrep_hton.cc
mysql-wsrep-5.6/sql/wsrep_mysqld.cc
mysql-wsrep-5.6/sql/wsrep_mysqld.h
mysql-wsrep-5.6/sql/wsrep_sst.cc
mysql-wsrep-5.6/sql/wsrep_thd.cc
mysql-wsrep-5.6/sql/wsrep_var.cc
mysql-wsrep-5.6/sql/wsrep_var.h
mysql-wsrep-5.6/storage/archive/archive_reader.c
mysql-wsrep-5.6/storage/blackhole/ha_blackhole.cc
mysql-wsrep-5.6/storage/csv/ha_tina.cc
mysql-wsrep-5.6/storage/example/ha_example.cc
mysql-wsrep-5.6/storage/federated/ha_federated.cc
mysql-wsrep-5.6/storage/heap/hp_hash.c
mysql-wsrep-5.6/storage/heap/hp_test2.c
mysql-wsrep-5.6/storage/innobase/btr/btr0btr.cc
mysql-wsrep-5.6/storage/innobase/btr/btr0cur.cc
mysql-wsrep-5.6/storage/innobase/btr/btr0sea.cc
mysql-wsrep-5.6/storage/innobase/buf/buf0buddy.cc
mysql-wsrep-5.6/storage/innobase/buf/buf0buf.cc
mysql-wsrep-5.6/storage/innobase/buf/buf0dump.cc
mysql-wsrep-5.6/storage/innobase/buf/buf0flu.cc
mysql-wsrep-5.6/storage/innobase/buf/buf0lru.cc
mysql-wsrep-5.6/storage/innobase/data/data0data.cc
mysql-wsrep-5.6/storage/innobase/dict/dict0crea.cc
mysql-wsrep-5.6/storage/innobase/dict/dict0dict.cc
mysql-wsrep-5.6/storage/innobase/dict/dict0load.cc
mysql-wsrep-5.6/storage/innobase/dict/dict0mem.cc
mysql-wsrep-5.6/storage/innobase/dict/dict0stats.cc
mysql-wsrep-5.6/storage/innobase/dict/dict0stats_bg.cc
mysql-wsrep-5.6/storage/innobase/fil/fil0fil.cc
mysql-wsrep-5.6/storage/innobase/fsp/fsp0fsp.cc
mysql-wsrep-5.6/storage/innobase/fts/fts0blex.cc
mysql-wsrep-5.6/storage/innobase/fts/fts0fts.cc
mysql-wsrep-5.6/storage/innobase/fts/fts0opt.cc
mysql-wsrep-5.6/storage/innobase/fts/fts0que.cc
mysql-wsrep-5.6/storage/innobase/fts/fts0tlex.cc
mysql-wsrep-5.6/storage/innobase/fts/make_parser.sh
mysql-wsrep-5.6/storage/innobase/handler/ha_innodb.cc
mysql-wsrep-5.6/storage/innobase/handler/ha_innodb.h
mysql-wsrep-5.6/storage/innobase/handler/handler0alter.cc
mysql-wsrep-5.6/storage/innobase/handler/i_s.cc
mysql-wsrep-5.6/storage/innobase/ibuf/ibuf0ibuf.cc
mysql-wsrep-5.6/storage/innobase/include/api0api.h
mysql-wsrep-5.6/storage/innobase/include/btr0btr.h
mysql-wsrep-5.6/storage/innobase/include/btr0btr.ic
mysql-wsrep-5.6/storage/innobase/include/btr0cur.h
mysql-wsrep-5.6/storage/innobase/include/btr0pcur.h
mysql-wsrep-5.6/storage/innobase/include/btr0sea.h
mysql-wsrep-5.6/storage/innobase/include/btr0types.h
mysql-wsrep-5.6/storage/innobase/include/buf0buddy.h
mysql-wsrep-5.6/storage/innobase/include/buf0buddy.ic
mysql-wsrep-5.6/storage/innobase/include/buf0buf.h
mysql-wsrep-5.6/storage/innobase/include/buf0flu.h
mysql-wsrep-5.6/storage/innobase/include/buf0lru.h
mysql-wsrep-5.6/storage/innobase/include/data0data.h
mysql-wsrep-5.6/storage/innobase/include/data0data.ic
mysql-wsrep-5.6/storage/innobase/include/dict0boot.h
mysql-wsrep-5.6/storage/innobase/include/dict0crea.h
mysql-wsrep-5.6/storage/innobase/include/dict0crea.ic
mysql-wsrep-5.6/storage/innobase/include/dict0dict.h
mysql-wsrep-5.6/storage/innobase/include/dict0dict.ic
mysql-wsrep-5.6/storage/innobase/include/dict0load.h
mysql-wsrep-5.6/storage/innobase/include/dict0mem.h
mysql-wsrep-5.6/storage/innobase/include/dict0stats.h
mysql-wsrep-5.6/storage/innobase/include/dict0stats_bg.h
mysql-wsrep-5.6/storage/innobase/include/dyn0dyn.h
mysql-wsrep-5.6/storage/innobase/include/dyn0dyn.ic
mysql-wsrep-5.6/storage/innobase/include/fil0fil.h
mysql-wsrep-5.6/storage/innobase/include/fsp0fsp.h
mysql-wsrep-5.6/storage/innobase/include/fts0ast.h
mysql-wsrep-5.6/storage/innobase/include/fts0fts.h
mysql-wsrep-5.6/storage/innobase/include/fts0priv.h
mysql-wsrep-5.6/storage/innobase/include/fts0priv.ic
mysql-wsrep-5.6/storage/innobase/include/ha_prototypes.h
mysql-wsrep-5.6/storage/innobase/include/handler0alter.h
mysql-wsrep-5.6/storage/innobase/include/ibuf0ibuf.h
mysql-wsrep-5.6/storage/innobase/include/lock0lock.h
mysql-wsrep-5.6/storage/innobase/include/lock0priv.h
mysql-wsrep-5.6/storage/innobase/include/log0recv.h
mysql-wsrep-5.6/storage/innobase/include/mach0data.h
mysql-wsrep-5.6/storage/innobase/include/mem0mem.h
mysql-wsrep-5.6/storage/innobase/include/mem0mem.ic
mysql-wsrep-5.6/storage/innobase/include/mtr0mtr.h
mysql-wsrep-5.6/storage/innobase/include/mtr0mtr.ic
mysql-wsrep-5.6/storage/innobase/include/os0file.h
mysql-wsrep-5.6/storage/innobase/include/os0thread.h
mysql-wsrep-5.6/storage/innobase/include/page0cur.h
mysql-wsrep-5.6/storage/innobase/include/page0page.h
mysql-wsrep-5.6/storage/innobase/include/page0types.h
mysql-wsrep-5.6/storage/innobase/include/page0zip.h
mysql-wsrep-5.6/storage/innobase/include/pars0pars.h
mysql-wsrep-5.6/storage/innobase/include/read0read.h
mysql-wsrep-5.6/storage/innobase/include/rem0cmp.h
mysql-wsrep-5.6/storage/innobase/include/rem0rec.h
mysql-wsrep-5.6/storage/innobase/include/rem0rec.ic
mysql-wsrep-5.6/storage/innobase/include/row0ftsort.h
mysql-wsrep-5.6/storage/innobase/include/row0import.h
mysql-wsrep-5.6/storage/innobase/include/row0ins.h
mysql-wsrep-5.6/storage/innobase/include/row0log.h
mysql-wsrep-5.6/storage/innobase/include/row0merge.h
mysql-wsrep-5.6/storage/innobase/include/row0mysql.h
mysql-wsrep-5.6/storage/innobase/include/row0purge.h
mysql-wsrep-5.6/storage/innobase/include/row0quiesce.h
mysql-wsrep-5.6/storage/innobase/include/row0row.h
mysql-wsrep-5.6/storage/innobase/include/row0sel.h
mysql-wsrep-5.6/storage/innobase/include/row0uins.h
mysql-wsrep-5.6/storage/innobase/include/row0umod.h
mysql-wsrep-5.6/storage/innobase/include/row0upd.h
mysql-wsrep-5.6/storage/innobase/include/row0vers.h
mysql-wsrep-5.6/storage/innobase/include/srv0srv.h
mysql-wsrep-5.6/storage/innobase/include/srv0start.h
mysql-wsrep-5.6/storage/innobase/include/sync0arr.h
mysql-wsrep-5.6/storage/innobase/include/sync0rw.h
mysql-wsrep-5.6/storage/innobase/include/sync0rw.ic
mysql-wsrep-5.6/storage/innobase/include/sync0sync.h
mysql-wsrep-5.6/storage/innobase/include/trx0rec.h
mysql-wsrep-5.6/storage/innobase/include/trx0roll.h
mysql-wsrep-5.6/storage/innobase/include/trx0sys.h
mysql-wsrep-5.6/storage/innobase/include/trx0trx.h
mysql-wsrep-5.6/storage/innobase/include/trx0undo.h
mysql-wsrep-5.6/storage/innobase/include/univ.i
mysql-wsrep-5.6/storage/innobase/include/ut0byte.h
mysql-wsrep-5.6/storage/innobase/include/ut0dbg.h
mysql-wsrep-5.6/storage/innobase/include/ut0mem.h
mysql-wsrep-5.6/storage/innobase/include/ut0rnd.h
mysql-wsrep-5.6/storage/innobase/include/ut0ut.h
mysql-wsrep-5.6/storage/innobase/lock/lock0lock.cc
mysql-wsrep-5.6/storage/innobase/lock/lock0wait.cc
mysql-wsrep-5.6/storage/innobase/log/log0log.cc
mysql-wsrep-5.6/storage/innobase/log/log0recv.cc
mysql-wsrep-5.6/storage/innobase/mach/mach0data.cc
mysql-wsrep-5.6/storage/innobase/mem/mem0dbg.cc
mysql-wsrep-5.6/storage/innobase/mtr/mtr0mtr.cc
mysql-wsrep-5.6/storage/innobase/os/os0file.cc
mysql-wsrep-5.6/storage/innobase/os/os0thread.cc
mysql-wsrep-5.6/storage/innobase/page/page0page.cc
mysql-wsrep-5.6/storage/innobase/page/page0zip.cc
mysql-wsrep-5.6/storage/innobase/pars/lexyy.cc
mysql-wsrep-5.6/storage/innobase/pars/make_flex.sh
mysql-wsrep-5.6/storage/innobase/pars/pars0pars.cc
mysql-wsrep-5.6/storage/innobase/rem/rem0cmp.cc
mysql-wsrep-5.6/storage/innobase/rem/rem0rec.cc
mysql-wsrep-5.6/storage/innobase/row/row0ftsort.cc
mysql-wsrep-5.6/storage/innobase/row/row0import.cc
mysql-wsrep-5.6/storage/innobase/row/row0ins.cc
mysql-wsrep-5.6/storage/innobase/row/row0log.cc
mysql-wsrep-5.6/storage/innobase/row/row0merge.cc
mysql-wsrep-5.6/storage/innobase/row/row0mysql.cc
mysql-wsrep-5.6/storage/innobase/row/row0purge.cc
mysql-wsrep-5.6/storage/innobase/row/row0quiesce.cc
mysql-wsrep-5.6/storage/innobase/row/row0row.cc
mysql-wsrep-5.6/storage/innobase/row/row0sel.cc
mysql-wsrep-5.6/storage/innobase/row/row0uins.cc
mysql-wsrep-5.6/storage/innobase/row/row0umod.cc
mysql-wsrep-5.6/storage/innobase/row/row0undo.cc
mysql-wsrep-5.6/storage/innobase/row/row0upd.cc
mysql-wsrep-5.6/storage/innobase/srv/srv0mon.cc
mysql-wsrep-5.6/storage/innobase/srv/srv0srv.cc
mysql-wsrep-5.6/storage/innobase/srv/srv0start.cc
mysql-wsrep-5.6/storage/innobase/sync/sync0sync.cc
mysql-wsrep-5.6/storage/innobase/trx/trx0purge.cc
mysql-wsrep-5.6/storage/innobase/trx/trx0rec.cc
mysql-wsrep-5.6/storage/innobase/trx/trx0roll.cc
mysql-wsrep-5.6/storage/innobase/trx/trx0trx.cc
mysql-wsrep-5.6/storage/innobase/trx/trx0undo.cc
mysql-wsrep-5.6/storage/myisam/ft_boolean_search.c
mysql-wsrep-5.6/storage/myisam/ft_nlq_search.c
mysql-wsrep-5.6/storage/myisam/ft_parser.c
mysql-wsrep-5.6/storage/myisam/ft_stopwords.c
mysql-wsrep-5.6/storage/myisam/ha_myisam.cc
mysql-wsrep-5.6/storage/myisam/mi_check.c
mysql-wsrep-5.6/storage/myisam/mi_extrafunc.h
mysql-wsrep-5.6/storage/myisam/mi_keycache.c
mysql-wsrep-5.6/storage/myisam/mi_open.c
mysql-wsrep-5.6/storage/myisam/mi_packrec.c
mysql-wsrep-5.6/storage/myisam/mi_search.c
mysql-wsrep-5.6/storage/myisam/mi_static.c
mysql-wsrep-5.6/storage/myisam/mi_test1.c
mysql-wsrep-5.6/storage/myisam/myisam_ftdump.c
mysql-wsrep-5.6/storage/myisam/myisamchk.c
mysql-wsrep-5.6/storage/myisam/myisamlog.c
mysql-wsrep-5.6/storage/myisam/myisampack.c
mysql-wsrep-5.6/storage/myisam/rt_test.c
mysql-wsrep-5.6/storage/myisam/sort.c
mysql-wsrep-5.6/storage/myisam/sp_key.c
mysql-wsrep-5.6/storage/myisam/sp_test.c
mysql-wsrep-5.6/storage/myisammrg/ha_myisammrg.cc
mysql-wsrep-5.6/storage/ndb/include/ndb_global.h
mysql-wsrep-5.6/storage/ndb/include/util/ndb_opts.h
mysql-wsrep-5.6/storage/ndb/src/common/util/ndb_opts.c
mysql-wsrep-5.6/storage/ndb/src/cw/cpcd/main.cpp
mysql-wsrep-5.6/storage/ndb/tools/restore/restore_main.cpp
mysql-wsrep-5.6/storage/perfschema/pfs.cc
mysql-wsrep-5.6/storage/perfschema/pfs_digest.cc
mysql-wsrep-5.6/storage/perfschema/pfs_digest.h
mysql-wsrep-5.6/storage/perfschema/pfs_lock.h
mysql-wsrep-5.6/storage/perfschema/table_esms_by_digest.cc
mysql-wsrep-5.6/storage/perfschema/table_events_statements.cc
mysql-wsrep-5.6/strings/conf_to_src.c
mysql-wsrep-5.6/strings/ctype-big5.c
mysql-wsrep-5.6/strings/ctype-bin.c
mysql-wsrep-5.6/strings/ctype-cp932.c
mysql-wsrep-5.6/strings/ctype-czech.c
mysql-wsrep-5.6/strings/ctype-euc_kr.c
mysql-wsrep-5.6/strings/ctype-eucjpms.c
mysql-wsrep-5.6/strings/ctype-gb2312.c
mysql-wsrep-5.6/strings/ctype-gbk.c
mysql-wsrep-5.6/strings/ctype-latin1.c
mysql-wsrep-5.6/strings/ctype-mb.c
mysql-wsrep-5.6/strings/ctype-simple.c
mysql-wsrep-5.6/strings/ctype-sjis.c
mysql-wsrep-5.6/strings/ctype-tis620.c
mysql-wsrep-5.6/strings/ctype-ucs2.c
mysql-wsrep-5.6/strings/ctype-ujis.c
mysql-wsrep-5.6/strings/ctype-utf8.c
mysql-wsrep-5.6/strings/ctype-win1250ch.c
mysql-wsrep-5.6/support-files/mysql.server.sh
mysql-wsrep-5.6/support-files/mysql.spec.sh
mysql-wsrep-5.6/tests/mysql_client_fw.c
mysql-wsrep-5.6/tests/mysql_client_test.c
mysql-wsrep-5.6/tests/thread_test.c
mysql-wsrep-5.6/unittest/CMakeLists.txt
mysql-wsrep-5.6/unittest/gunit/CMakeLists.txt
mysql-wsrep-5.6/unittest/gunit/rpl_group_set-t.cc
mysql-wsrep-5.6/unittest/gunit/test_utils.cc
mysql-wsrep-5.6/unittest/gunit/yassl/CMakeLists.txt
mysql-wsrep-5.6/unittest/mytap/tap.h
mysql-wsrep-5.6/vio/test-sslclient.c
mysql-wsrep-5.6/vio/test-sslserver.c
mysql-wsrep-5.6/vio/vio.c
mysql-wsrep-5.6/vio/viosocket.c
mysql-wsrep-5.6/vio/viosslfactories.c
mysql-wsrep-5.6/wsrep/wsrep_dummy.c
mysql-wsrep-5.6/wsrep/wsrep_loader.c

diff --git a/debian/additions/mysql-systemd-start b/debian/additions/mysql-systemd-start
new file mode 100644 (file)
index 0000000..b8ce79c
--- /dev/null
@@ -0,0 +1,45 @@
+#!/bin/bash
+#
+# Scripts to run by MySQL systemd service
+#
+# Needed argument: pre | post
+#
+# pre mode  :  try to perform sanity check for configuration, log, data
+# post mode :  ping server until answer is received
+
+sanity () {
+  if [ ! -r /etc/mysql/my.cnf ]; then
+    echo "MySQL configuration not found at /etc/mysql/my.cnf. Please create one."
+    exit 1
+  fi
+
+  if [ ! -d /var/lib/mysql ] && [ ! -L /var/lib/mysql ]; then
+    echo "MySQL data dir not found at /var/lib/mysql. Please create one."
+    exit 1
+  fi
+
+  if [ ! -d /var/lib/mysql/mysql ] && [ ! -L /var/lib/mysql/mysql ]; then
+    echo "MySQL system database not found. Please run mysql_install_db tool."
+    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
+  if [ ! $server_up ]; then
+    echo "MySQL server not started"
+    exit 1
+  fi
+}
+
+case $1 in
+  "pre")  sanity ;;
+  "post") pinger ;;
+esac
index 12180b5c6680fd42407609cec88dd0ebe5452050..9e5573fa5ddbc50603653a54466830027608c3ac 100644 (file)
-mysql-wsrep-5.6 (5.6.30-0~u14.04+mos2) mos; urgency=high
+mysql-wsrep-5.6 (5.6.35-0~u14.04+mos1) mos; urgency=low
 
-  * SECURITY UPDATE: Fix CVE-2016-6662
-    - https://security-tracker.debian.org/tracker/CVE-2016-6662
+  * New release from codership merged with
+    https://github.com/codership/mysql-wsrep/pull/264
 
- -- Anton Chevychalov <mos-maintanance@mirantis.com>  Thu, 22 Sep 2016 17:01:53 +0300
+ -- Ivan Suzdal <mos-linux@mirantis.com>  Thu, 26 Jan 2017 12:42:43 +0000
 
-mysql-wsrep-5.6 (5.6.30-0~u14.04+mos1) mos; urgency=high
+mysql-wsrep-5.6 (5.6.34-0~u14.04+mos3) mos; urgency=low
 
-  * SECURITY UPDATE: Update to 5.6.30 to fix security issues (LP: #1572559)
-  * Closes: #1578370
-    - http://www.oracle.com/technetwork/security-advisory/cpuapr2016v3-2985753.html
-    - http://www.ubuntu.com/usn/usn-2953-1
-    - CVE-2016-0639
-    - CVE-2016-0640
-    - CVE-2016-0641
-    - CVE-2016-0642
-    - CVE-2016-0643
-    - CVE-2016-0644
-    - CVE-2016-0646
-    - CVE-2016-0647
-    - CVE-2016-0648
-    - CVE-2016-0649
-    - CVE-2016-0650
-    - CVE-2016-0655
-    - CVE-2016-0661
-    - CVE-2016-0665
-    - CVE-2016-0666
-    - CVE-2016-0668
-    - CVE-2016-2047
+  * Add replace for mysql-server-wsrep-core-5.6 package
 
-    Sourced from https://github.com/codership/mysql-wsrep/tree/wsrep_5.6.30-25.15
+ -- Ivan Suzdal <mos-linux@mirantis.com>  Thu, 01 Dec 2016 13:06:18 +0000
 
- -- Ivan Suzdal <mos-linux-team@mirantis.com>  Thu, 09 Jun 2016 15:21:53 +0000
+mysql-wsrep-5.6 (5.6.34-0~u14.04+mos2) mos; urgency=low
 
-mysql-wsrep-5.6 (5.6.23-1~u14.04+mos3) mos9.0; urgency=medium
+  * Add mysql-testsuite-5.6 metapackage
 
-  * Reverting temporary fix for LP Bug 1541338 as it's not RC
+ -- Ivan Suzdal <mos-linux@mirantis.com>  Tue, 29 Nov 2016 15:37:54 +0000
 
- -- Sergii Golovatiuk <sgolovatiuk@mirantis.com> Sat, 26 Mar 2016 13:19:00 +0100
+mysql-wsrep-5.6 (5.6.34-0~u14.04+mos1) mos; urgency=low
 
-mysql-wsrep-5.6 (5.6.23-1~u14.04+mos2) mos9.0; urgency=medium
+  * Newest version with merged pull request
+    https://github.com/codership/mysql-wsrep/pull/264
+  * Change replases for mysql-wsrep-common-5.6
 
-  * Temporary fix for LP Bug 1541338
+ -- Ivan Suzdal <mos-linux@mirantis.com>  Wed, 23 Nov 2016 12:48:39 +0000
 
- -- Dmitry Bilunov <dbilunov@mirantis.com>  Wed, 23 Mar 2016 13:54:00 +0300
+mysql-wsrep-5.6 (5.6.34-25.18) UNRELEASED; urgency=low
 
-mysql-wsrep-5.6 (5.6.23-1~u14.04+mos1) mos7.0; urgency=medium
-
-  * Update to MySQL 5.6.23:
-    - remove d/p/CVE-2014-0001.patch as it was merged.
-  * Update to wsrep 25.10 (Closes: #1438516):
-    - fix misuse of thread-safe functions in innodb-wsrep,
-    - patch obtained by diffing mysql-5.6.23 against mysql-wsrep-5.6.23-25.10
-      and resolving conflicts.
-
- -- Pavel Boldin <pboldin@mirantis.com>  Sun, 12 Apr 2015 17:40:48 +0300
-
-mysql-wsrep-5.6 (5.6.16-2~u14.04+mos2) mos6.1; urgency=low
-
-  * Fix version according to Fuel versioning policy:
-    https://github.com/stackforge/fuel-specs/blob/master/specs/6.1/separate-mos-from-linux.rst
-  * No actual changes in source package
-  * Partial-Bug: #1454382
-
- -- Ivan Udovichenko <iudovichenko@mirantis.com>  Tue, 12 May 2015 23:17:22 +0300
-
-mysql-wsrep-5.6 (5.6.16-2~u14.04+mos1) trusty; urgency=low
-
-  * The package is maintained by MOS Linux team, update the info accordingly.
-  * Adjust the package revision according to the blueprint separate-mos-from-linux
-    (https://review.openstack.org/148279)
-
- -- Alexei Sheplyakov <asheplyakov@mirantis.com>  Fri, 13 Mar 2015 12:18:26 +0300
-
-mysql-wsrep-5.6 (5.6.16-2~mos6.1+1) trusty; urgency=low
-
-  * Enable only the simplest tests (as test-mtr fails for unknown reasons)
-  * Adjust the version for Ubuntu 14.04 rebuild
-
- -- Alexei Sheplyakov <asheplyakov@mirantis.com>  Thu, 29 Jan 2015 15:52:10 +0300
-
-mysql-wsrep-5.6 (5.6.16-2) precise; urgency=low
-
-  * Add Set nice for wsrep_sst_mysqldump
-
- -- sgolovatiuk <sgolovatiuk@mirantis.com>  Thu, 31 Jul 2014 17:24:00 +0000
-
-mysql-wsrep-5.6 (5.6.16-1) precise; urgency=low
-
-  * Add wsrep patch
-
- -- dburmistrov <dburmistrov@mirantis.com>  Fri, 27 Jun 2014 16:00:06 +0400
-
-mysql-5.6 (5.6.16-1~exp1) experimental; urgency=medium
-
-  * New upstream point release:
-    - d/p/*: Refreshed.
-  * d/rules: Don't run dh_install with --fail-missing and exclusions until
-    package is a complete replacement for mysql-5.5.
-  * d/p/CVE-2014-0001.patch:
-    - Fix buffer overflow in client/mysql.cc via a long server version string.
-      CVE-2014-0001 (Closes: #741590).
-  * d/mysql-server-5.6.mysql.upstart: Add upstart configuration.
-  * d/tests/*,control: Add autopkgtest from mysql-5.5:
-    - disable binlog.binlog_server_start_options as it requires writable /usr.
-    - disable build autopkgtest until package ships libmysqlclient18.
-  * d/rules,mysql-server-5.6.install,apparmor-profile: Fixup install of
-    apparmor profile.
-
- -- James Page <james.page@ubuntu.com>  Mon, 17 Mar 2014 08:56:24 +0000
-
-mysql-5.6 (5.6.15-1~exp2) experimental; urgency=medium
-
-  * d/control,rules: Drop libmysqlclient18.1* and libmysqld-5.6* due to conflicts
-    with libmysqlclient{18}-dev and incorrect SONAME naming (Closes: #741200).
-    NOTE: libmysqlclient* and libmysqld* can be re-instated when the 5.5->5.6
-    transition happens.
-  * d/control: Align Conflicts/Breaks/Replaces/Provides with virtual-mysql-*
-    approach for switching in/out MySQL alternatives.
-  * d/mysql-server-5.6.mysql.init: Bump timeout on start to 30 seconds inline
-    with mysql-5.5 changes.
-
- -- James Page <james.page@ubuntu.com>  Mon, 10 Mar 2014 17:36:34 +0000
-
-mysql-5.6 (5.6.15-1~exp1) experimental; urgency=low
-
-  [ Akhil Mohan ]
-  * added libmysqlclient.so link to libmysqlclient18.1-dev package
-  * revisited patches in d/patches/series; removed extra patches not needed
-  * some patches were modified to handle 5.6 issues
-  * mysql-server-5.6 and mysql-client-5.6 now depend on mysql-common (>= 5.5)
-  * mysql-server-5.6 now provides only virtual-mysql-server
-  * mysql-client-5.6 now provides only virtual-mysql-client
-  * MySQL 5.6 now contains mysql-common-5.6 which is only suggested
-  * moved mysql-common/etc/mysql/my.cnf to
-      mysql-common-5.6/usr/share/mysql/my.cnf
-  * MySQL 5.6 now gives libmysqlclient18.1, libmysqlclient18.1-dev,
-      libmysqld-5.6-dev and libmysqld-5.6-pic
-  * libmysqlclient18.1-dev, libmysqld-5.6-dev and libmysqld-5.6-pic packages
-      conflict with their respective counterparts from MySQL 5.5
-  * link traversal for libmysqlclient is
-      libmysqlclient.so (contained in libmysqclient18.1-dev)  ->
-      libmysqlclient.so.18 (contained in libmysqclient18.1)   ->
-      libmysqlclient.so.18.1 (contained in libmysqclient18.1) ->
-      libmysqlclient.so.18.1.0 (contained in libmysqclient18.1)
-  * Placeholder packages mysql-server, mysql-client, mysql-testsuite 
-    have been discontinued
-  * d/rules, d/control removed gcc-4.4 dependency and disable X86 assembly in
-    taocrypt.
-    - Cherry-pick from Debian svn r2231 with thanks to Clint Byrum.
-  * changed mirror to download source tar
-  * replaced mysql_install_db script with small shell script to create
-    root accounts. This avoids creating anonymous users which were
-    security concern.
-  * Docs/mysql.info has been removed in the mysql 5.6.15 source
-  * removed debian/repack.* and 'DFSG and repacking' section in
-    debian/README.source because repack not needed
-  * dropped '+dfsg' from version in changelog since there is no repack
-  * simplified debian/watch since there is no repack
-  * removed redundant *_r* links to mysql client library in libmysqlclient18
-    and libmysqlclient-dev packages
-  * updated debian/control to allow mysql-*-5.6 packages upgrade/ replace
-    an existing installation of mysql-*-5.5 packages
-  * modified debian/rules to use system zlib library, install additional
-    man pages and remove execute bit on few test and result files
-  * added patches to fix link path in man page mysql_client_test_embedded.1
-    and mysqltest_embedded.1
-  * added man page for mysql_config_pic at debian/additions/mysql_config_pic.1
-  * added man page for mysql_embedded at debian/additions/mysql_embedded.1
-  * moved libmysqlcient.so link from libmysqlclient18 to libmysqlclient-dev
-    based on lintian warning non-dev-pkg-with-shlib-symlink
-  * moved mysql_client_test_embedded binary from mysql-testsuite-5.6 
-    package to mysql-client-5.6 package
-  * moved mysql_config_editor.1 man page to mysql-client-5.6 package
-  * moved mysql_embedded from mysql-testsuite-5.6 package to mysql-client-5.6
-    package
-  * moved mysqltest_embedded binary from mysql-testsuite-5.6
-    package to mysql-server-5.6 package
-  * removed absolute path for mysql_install_db script in mysql-server-5.6
-    postinst script based on lintian warning
-
-  [ Bjoern Boschman ]
-  * Initial release of mysql-5.6 package.
-  * mysql_install_db is now a perl script. Do not run it with bash.
-  * added innodb_data_file_path to my.cnf for mysql-5.1 => mysql-5.6 upgrade
-    path.
-  * added multiarch support 
-  * do not include .a files within libmysqlclient18
-
- -- James Page <jamespage@debian.org>  Wed, 12 Feb 2014 12:11:53 +0000
-
-mysql-5.5 (5.5.25+dfsg-2) quantal; urgency=low
-
-  [ Nicholas Bamber ]
-  * Made DFSG repacking mechanism independent of local installs and improved
-    the documentation
-  * Setting the gcc/g++ version to 4.4 on i386 platforms (Closes: #674267)
-    but see #678252 for follow up from upstream
-  * Danish debconf translation (Closes: #599483)
-  * Spanish debconf translation (Closes: #679053)
-
-  [ Bjoern Boschman ]
-  * mysqld_safe is now running as User 'mysql' (Closes: 664639)
-  * logrotate now handles all /var/log/mysql/*log files
-
- -- Bjoern Boschman <bjoern.boschman@nfon.net>  Wed, 09 Jan 2013 11:15:29 +0100
-
-mysql-5.5 (5.5.25+dfsg-1) experimental; urgency=low
-
-  * Fixing regular expression in tests to guard against build path containing
-    the '+' symbol (Closes: #674210)
-  * Setting the gcc/g++ version to 4.5 on i386 platforms (cf. #674267)
-  * Removed main_openssl_1 patch
-  * Set SYSTEM_TYPE according to GNU Build System
-  * In an effort to get a better handle on test coverage, made test failures
-    on kfreebsd-i386 fatal and re-enabled full tests on hurd, skipped certain
-    tests on kfreebsd and changed disabled tests to selectively skipped tests
-  * Updated French translation (Closes: #674025)
-  * Updated Dutch translation (Closes: #674124)
-  * Updated Russian translation (Closes: #674189)
-  * Updated Portuguese translation (Closes: #674953)
-  * Updated Swedish translation (Closes: #675108)
-  * Updated German translation (Closes: #675766)
-  * Migrated libmysqlclient-dev, mysql-client-5.5, mysql-server-core-5.5
-    and mysql-server-5.5 off dh_movefiles
-  * Removed dh_movefiles override
-  * Rewrote libmysqlclient_r linking stuff to generate
-    ephemeral dh_link files so that the hack is more comprehensible
-  * Stopped attempts to install non-existent files for libmysqlclient-dev
-    and mysql-server-5.5
-  * Added --fail-missing to dh_install to catch executables not being installed
-  * Distributed unused resources amongst packages appropriately
-  * Added fixes to mop up various permissions issues in auto-install rule
-  * Enhanced documentation around the source package and the reasons for it
-    being arch:any
-  * Removed source cruft: debian/additions/*.1 (apart from mysqlreport.1)
-  * Restored zlib1g-dev build dependency pending further investigation
-  * Removed the numerical prefix from the patch files
-  * Applied fix-mysqldump-test.patch from Ubuntu
-  * Applied mysql-testsuite and mysql-client-core-5.5 package definitions
-    from Ubuntu
-  * Located and installed upstream changelog
-  * Removed doxygen-latex, ghostscript as build dependency
-    as these were needed only for the NDB docs
-  * Added lintian overrides
-    - spelling false positive: yuR
-    - long lines in man pages that cannot be reformatted
-    - missing symbols file (cf. #590905)
-  * Added patch for hyphen/minus sign confusion
-  * Dropped mailx to Suggests clause (Closes: #535496)
-  * New upstream source
-  * Refreshed patches
-  * Standardized debian/watch and get-orig-source and made DFSG exclusion
-    of Docs/mysql.info explicit (Closes: #673528)
-  * Revert having libssl-dev as a build dependency and changed
-    WITH_SSL option to 'bundled' from 'yes' (Closes: #590905)
-    and (Closes: #673865)
-  * Added patch to libmysql/CMakeLists.txt to restore symbol versioning
-    and bumped dependency in shlibs (Closes: #660686)
-  * Ensured that /etc/mysql/conf.d is installed as part of mysql-common
-    so that client programs work without a co-located server (Closes: #672359)
-  * Added versioned dependency on initscripts and revert /var/run
-    to /run change (Closes: #676560)
-
- -- Nicholas Bamber <nicholas@periapt.co.uk>  Wed, 13 Jun 2012 16:09:54 +0100
-
-mysql-5.5 (5.5.23-2) unstable; urgency=low
-
-  * Stopped overriding the -j build parameter (Closes: #512964)
-  * Stopped testing for /proc filesystem. It is no longer used
-    for determining the number of CPUs.
-  * Removed unnecessary build dependencies:
-    - procps as it is required by cmake, cf. #96768
-    - zlib1g newer version required by cmake
-    - libtool obsoleted by cmake
-    - file required by debhelper
-  * Migrated libmysqld-dev, libmysqld-pic, libmysqlclient18 to using
-    dh_install rather than dh_movefiles
-  * Changed /var/run to /run as required by Debian Policy 3.9.3 (9.1.1)
-  * Raised standards version to 3.9.3
-  * Moved '-e' from shebang line to explicit 'set -e' as requested by lintian
-  * Restored ha_example.so to mysql-server-5.5 but added Breaks/Replaces
-    clauses (cf. LP: #912487) and (Closes: #666721)
-  * Added additional Breaks/Replaces clauses for other clashes:
-    - mysql-server-5.5 overwrites perror from mysql-client-5.1
-    - mysql-server-core-5.5 overwrites my_print_defaults from mysql-client-5.1
-
- -- Nicholas Bamber <nicholas@periapt.co.uk>  Tue, 08 May 2012 05:59:09 +0100
-
-mysql-5.5 (5.5.23-1) experimental; urgency=low
-
-  * Added patch to test suite to accept socket paths less than 40
-    characters long (Closes: #540153)
-  * Disabled some more tests including some reported by Olaf van der Speck
-  * Removed ha_example.so from mysql-server-5.5 install (Closes: #666721)
-  * New upstream release: unspecified security issues CVE-2012-1697,
-    CVE-2012-1696 
-  * Added patch to correct spelling mistakes: preceeding -> preceding
-
- -- Nicholas Bamber <nicholas@periapt.co.uk>  Thu, 03 May 2012 18:03:34 +0100
-
-mysql-5.5 (5.5.20-1) experimental; urgency=low
-
-  [ Guillaume Plessis ]
-  * d/rules: Enabling ARCHIVE, BLACKHOLE, and FEDERATED engines.
-    (Closes: #649484)
-  * d/rules: Turn off embedded libedit/readline.(Closes: #659566)
-
-  [ Clint Byrum ]
-  * New Upstream Release
-  * d/copyright: rearranging to have standalone license paragraphs
-    silencing lintian complaints about missing paragraphs.
-  * d/mysql-client-5.5.files: add mysql_plugin
-  * d/rules, d/control: 5.5.20 Fixes segfault on tests with gcc 4.6,
-    change compiler back to system default.
-  * Sync changes back from Ubuntu:
-      * d/control: need to also break mysql-client-core-5.1 and
-        mysql-server-core-5.1 as well so that apt knows not to
-        remove mysql-server/mysql-client.
-      * d/control: convert mysql-server back to a meta-package
-      * d/control: convert mysql-client back to a meta-package as well.
-      * d/patches/72_fix_standalone_tests.patch: fix testsuite so it
-        will run all tests when run from system /usr/lib/mysql-testsuite
-        directory.
-        5.1 is removed from the archive.
-      * d/control: mysql-common includes configuration items that only
-        work on mysql 5.5, so adding Breaks: for client and server 5.1.
-        This will make mysql-server-5.1 and mysql-client-5.1 
-        uninstallable which is actually desired.
-      * d/patches/71_disable_rpl_tests.patch: disables this test until
-        Ubuntu bug #894146 can be triaged.
-      * d/mysql-client-5.5.files: add missing mysql_plugin
-      * d/libmysqlcient18.files,libmysqlclient-dev.files,d/rules: re-add
-        libmysqlclient_r. In hindsight, removing it was not a productive
-        change.
-      * d/libmysqlclient-dev.files: ship entire contents of include dir,
-        some of these files are included internally by others in the 
-        main dir.
-      * d/patches/70_mysql_va_list.patch: cherry pick patch from
-        upstream bug tracker to fix ARM build failure. (LP: #700982)
-
-  [ Nicholas Bamber ]
-  * Added myself to Uploaders
-  * Added libssl-dev as a build dependency and patched main.openssl_1 test
-    so that it works with that library (Closes: #660799)
-  * Added patch to provide cmake options for GNU/Hurd (Closes: #651002)
-    and tweaked debian/rules so that only 'make test' is run on Hurd.
-  * Tweaked debian/rules to make build logs verbose (Closes: #651003)
-  * Refreshed patches - and added a new patch to disable a further flurry
-    of failing tests
-  * Switched on native AIO in linux builds (Closes: #659565)
-  * Numerous minor changes to improve lintian cleanliness (Closes: #663354)
-    - Added dh_lintian lines to debian/rules to ensure that lintian
-      overrides take effect and removed old commented out lines
-    - Clarified Hurd procps dependency in debian/control
-    - Rewrote short description of the libmysqld-pic package to be more accurate
-    - Depersonalised long description of mysql-client
-    - Removed dependencies relating to mysql-common-4.1
-    - Tightened Breaks clauses for mysql-common
-    - Removed duplicate entry from Replaces clauses for mysql-server-core-5.5
-    - Rexpressed Conflicts clause as versioned dependency
-      for mysql-testsuite-5.5
-    - Added DEP-5 header fields to two patches
-    - Refreshed and commented all lintian overrides and added override
-      concerning lack of upstream changelog to all packages
-    - Cleaned up debian/copyright
-      * upgraded to latest version of DEP-5
-      * encoding issues
-      * out of date FSF address
-      * Updated License short name from "PD" to "public-domain"
-  * Converted to short form debhelper rules
-    - Renamed stamp files to end in '-stamp' so that they are cleaned up
-      automatically by dh_clean
-    - Removed commented out lines
-    - Removed obsolete -DINSTALL_LIBDIR clause from pic build
-    - Overrode dh_auto_install so that the rules only run once
-    - Migrated mysql-source, mysql-testsuite, mysql-common from
-    dh_movefiles to dh_install
-
- -- Nicholas Bamber <nicholas@periapt.co.uk>  Sat, 28 Apr 2012 15:02:16 +0100
-
-mysql-5.5 (5.5.17-4) experimental; urgency=low
-
-  * d/control: Pre-Depend on multiarch-support and misc:Pre-Depends.
-    also bump debhelper Build-Dep for multiarch.
-    d/compat: raise to 9 for multiarch support.
-
- -- Clint Byrum <clint@ubuntu.com>  Thu, 17 Nov 2011 17:38:19 -0800
-
-mysql-5.5 (5.5.17-3) experimental; urgency=low
-
-  [Clint Byrum]
-  * d/control: setting Multi-Arch fields where appropriate.
-
-  [Norbert Tretkowski]
-  * Add Clint Byrum to Uploaders.
-
- -- Clint Byrum <clint@ubuntu.com>  Thu, 17 Nov 2011 14:36:50 -0800
-
-mysql-5.5 (5.5.17-2) experimental; urgency=low
-
-  * d/rules, d/control: Build with gcc 4.5 to avoid
-    gcc 4.6 compile problems (see Debian bug number 630471)
-  * d/rules, d/libmysqlclient*.files: changes to support
-    multiarch.
-  * d/libmysqlclient18.files, d/libmysqlclient-dev.files: install
-    symlinks to dev libraries properly and remove libmysqlclient_r
-    since it is no longer needed. libmysqlclient is now perfectly
-    thread safe. This will cause FTBFS but can be corrected by simply
-    removing _r, and avoids uncomfortable problem of trying to properly
-    mangle libmysqlclient_r symlinks to libmysqlclient.so.
-
- -- Clint Byrum <clint@ubuntu.com>  Wed, 09 Nov 2011 23:27:36 -0800
-
-mysql-5.5 (5.5.17-1) experimental; urgency=low
-
-  [Norbert Tretkowski]
-  * New upstream release.
-  * Fix empty libmysqld-pic package.
-  * Run dh_apparmor on Ubuntu only.
-
-  [Clint Byrum]
-  * Rewrote debian/copyright file from scratch.
-
- -- Clint Byrum <clint@ubuntu.com>  Tue, 08 Nov 2011 11:31:13 -0800
-
-mysql-5.5 (5.5.13-1) experimental; urgency=low
-
-  [Clint Byrum]
-  * New upstream major release. Changing source name to mysql-5.5.
-    (closes: #609592, #637274)
-  * Dropping usr/lib/libmysqlclient*.la as they are no longer built
-    by the cmake build, and are not necessary for linking properly.
-  * Removing obsolete automake and dpatch build deps.
-  * Converted source format to 3.0 (quilt).
-  * debian/patches: Converted to quilt, and removed all except disable
-    long filename check to allow building on sbuild/chroots.
-  * Renamed packages with -5.1 suffix to -5.5.
-  * Renaming mysql-testsuite to mysql-testsuite-5.5.
-  * Dropping unneeded docs files.
-  * Dropping libmysqlclient16-dev as transition is complete.
-  * Bumping libmysqlclient to v18 for new SONAME.
-
-  [Norbert Tretkowski]
-  * Update my.cnf to use --lc-messages-dir instead --language.
-
- -- Norbert Tretkowski <norbert@tretkowski.de>  Thu, 23 Jun 2011 10:25:33 +0200
-
-mysql-5.1 (5.1.58-1) unstable; urgency=low
-
-  * New upstream release.
-
- -- Norbert Tretkowski <norbert@tretkowski.de>  Sun, 17 Jul 2011 17:26:27 +0200
-
-mysql-5.1 (5.1.57-3) unstable; urgency=low
-
-  * Really fix syntax warning in preinst. (closes: #630672)
-
- -- Norbert Tretkowski <norbert@tretkowski.de>  Tue, 21 Jun 2011 10:33:25 +0200
-
-mysql-5.1 (5.1.57-2) unstable; urgency=low
-
-  * Acknowledge NMUs. (closes: #614044)
-  * Fix syntax warning in preinst. (closes: #630672)
-
- -- Norbert Tretkowski <norbert@tretkowski.de>  Sat, 18 Jun 2011 19:28:35 +0200
-
-mysql-5.1 (5.1.57-1.3) unstable; urgency=high
-
-  * Non-maintainer upload.
-  * Use correct DEB_HOST_GNU_TYPE and not DEB_HOST_BUILD_TYPE.
-
- -- Ondřej Surý <ondrej@debian.org>  Mon, 13 Jun 2011 17:02:50 +0200
-
-mysql-5.1 (5.1.57-1.2) unstable; urgency=high
-
-  * Non-maintainer upload.
-  * Prefix gcc-4.5 and g++-4.5 with DEB_BUILD_GNU_TYPE to fix FTBFS on
-    ia64, s390 and maybe more.
-
- -- Ondřej Surý <ondrej@debian.org>  Mon, 13 Jun 2011 13:20:37 +0200
-
-mysql-5.1 (5.1.57-1.1) unstable; urgency=high
-
-  * Non-maintainer upload (with permission of maintainer).
-  * Build with gcc-4.5 (Closes: #614044)
-  * Revert: "Build with -O2 instead -O3, MySQL seems not yet ready for -
-    O3 when using gcc-4.6." since we are building with gcc-4.5.
-
- -- Ondřej Surý <ondrej@debian.org>  Mon, 13 Jun 2011 08:51:51 +0200
-
-mysql-5.1 (5.1.57-1) unstable; urgency=medium
-
-  * Bump libmysqlclient16 shlibs to 5.1.50-1 as it introduced a new symbol.
-    (closes: #617240)
-  * Build with -O2 instead -O3, MySQL seems not yet ready for -O3 when using
-    gcc-4.6. (closes: #614044)
-  * Ignore errors in testsuite run on ia64.
-
- -- Norbert Tretkowski <norbert@tretkowski.de>  Sat, 14 May 2011 14:56:13 +0200
-
-mysql-5.1 (5.1.56-1) unstable; urgency=low
-
-  * New upstream release.
-  * Replace doxygen and texlive-latex-base build-deps with doxygen-latex.
-    (closes: #616270)
-
- -- Norbert Tretkowski <norbert@tretkowski.de>  Tue, 08 Mar 2011 20:59:41 +0100
-
-mysql-5.1 (5.1.55-1) unstable; urgency=low
-
-  * New upstream release.
-
- -- Norbert Tretkowski <norbert@tretkowski.de>  Tue, 08 Feb 2011 12:56:42 +0100
-
-mysql-5.1 (5.1.54-2) unstable; urgency=low
-
-  * Upload to unstable.
-  * Add mysql-source-5.1 package, patch from Clint Byrum. (closes: #611965)
-  * Update debconf translations:
-    - Dutch, from Eric Spreen. (closes: #605590)
-    - Slovak, from Slavko. (closes: #608885)
-  * Fix minor grammar infelicity in debian-start script. (closes: #582955)
-
- -- Norbert Tretkowski <norbert@tretkowski.de>  Fri, 04 Feb 2011 16:28:08 +0100
-
-mysql-5.1 (5.1.54-1) experimental; urgency=low
-
-  * New upstream release.
-
- -- Norbert Tretkowski <norbert@tretkowski.de>  Fri, 17 Dec 2010 06:06:18 +0100
-
-mysql-5.1 (5.1.53-1) experimental; urgency=low
-
-  * New upstream release.
-
- -- Norbert Tretkowski <norbert@tretkowski.de>  Wed, 01 Dec 2010 12:41:28 +0100
-
-mysql-5.1 (5.1.51-1) experimental; urgency=low
-
-   * New upstream release.
-
- -- Norbert Tretkowski <norbert@tretkowski.de>  Sat, 02 Oct 2010 16:18:30 +0200
-
-mysql-5.1 (5.1.50-1) experimental; urgency=low
-
-   * New upstream release.
-
- -- Norbert Tretkowski <norbert@tretkowski.de>  Sun, 12 Sep 2010 20:13:25 +0200 
-
-mysql-5.1 (5.1.49-3) unstable; urgency=high
-
-  * SECURITY UPDATE: denial of service via incorrect propagation of type
-    errors.
-    - debian/patches/61_CVE-2010-3833.dpatch: properly check for execution
-      errors in sql/item_func.cc. Add tests to mysql-test/*.
-    - CVE-2010-3833
-  * SECURITY UPDATE: denial of service via derived table materializing.
-    - debian/patches/61_CVE-2010-3834.dpatch: handle temporary tables in
-      sql/field.cc, sql/sql_select.*. Add tests to mysql-test/*.
-    - CVE-2010-3834
-  * SECURITY UPDATE: denial of service via user-variable assignment
-    expression.
-    - debian/patches/61_CVE-2010-3835.dpatch: fix logic in sql/item_func.*,
-      Add tests to mysql-test/*.
-    - CVE-2010-3835
-  * SECURITY UPDATE: denial of service via pre-evaluation of LIKE
-    predicates during view preparation.
-    - debian/patches/61_CVE-2010-3836.dpatch: make sure we're not in view
-      preparation mode in sql/item_cmpfunc.cc. Add tests to mysql-test/*.
-    - CVE-2010-3836
-  * SECURITY UPDATE: denial of service via use of GROUP_CONCAT() and
-    WITH ROLLUP together.
-    - debian/patches/61_CVE-2010-3837.dpatch: create a copy of the order
-      structures in sql/item_sum.cc, sql/table.h. Add tests to
-      mysql-test/*.
-    - CVE-2010-3837
-  * SECURITY UPDATE: denial of service via longblob and union or update
-    with subquery.
-    - debian/patches/61_CVE-2010-3838.dpatch: handle REAL_RESULT in
-      sql/item_func.cc. Add tests to mysql-test/*.
-    - CVE-2010-3838
-  * SECURITY UPDATE: denial of service via certain queries with nested
-    joins.
-    - debian/patches/61_CVE-2010-3839.dpatch: fix nesting in
-      sql/sql_select.cc. Add tests to mysql-test/*.
-    - CVE-2010-3839
-  * SECURITY UPDATE: denial of service via PolyFromWKB() function and
-    improper data.
-    - debian/patches/61_CVE-2010-3840.dpatch: improve data handling in
-      sql/spatial.cc. Add tests to mysql-test/*.
-    - CVE-2010-3840
-
-  * Patches and changelog entries taken from Ubuntu. (closes: #599937)
-  * Import and ACK NMU 5.1.49-2.1. (closes: #595120, #601152)
-
- -- Norbert Tretkowski <norbert@tretkowski.de>  Tue, 30 Nov 2010 09:20:33 +0100
-
-mysql-5.1 (5.1.49-2.1) unstable; urgency=high
-
-  * Non-maintainer upload.
-  * debian/mysql-server-5.1.mysql.init: Remove $named from
-    Should-Start/Should-Stop (closes: #595120).
-    Thanks for Clint Byrum <clint@ubuntu.com> patch.
-  * Update Portuguese translation (closes: #601152).
-    Thanks for Miguel Figueiredo <elmig@debianpt.org> patch.
-
- -- Xavier Oswald <xoswald@debian.org>  Sat, 27 Nov 2010 17:43:13 +0100
-
-mysql-5.1 (5.1.49-2) unstable; urgency=low
-
-  * Check for server binary before executing any script. (closes: #583611)
-  * Move my_print_defaults and perror from mysql-server-5.1 to mysql-client-5.1
-    package. (closes: #591373)
-  * Update debconf translations:
-    - Spanish, from Javier Fernández-Sanguino. (closes: #592171)
-    - Galician, from Jorge Barreiro. (closes: #592813)
-    - Arabic, from Ossama Khayat. (closes: #596169, #600884)
-    - Czech, from Miroslav Kure. (closes: #598339)
-    - Danish, from Joe Dalton. (closes: #599483)
-    - Portuguese, from Rui Branco. (closes: #599759)
-    - Catalan, from Jordi Mallach. (closes: #601098)
-  * Add patch 99_fix_testsuite_for_installed_env.dpatch from Ubuntu to fix
-    mysql-testsuite to work with the installation location.
-  * Add README.source file to make lintian happy.
-  * Update Standards-Version to 3.9.1, no changes required.
-
- -- Norbert Tretkowski <norbert@tretkowski.de>  Wed, 27 Oct 2010 14:41:19 +0200
-
-mysql-5.1 (5.1.49-1) unstable; urgency=low
-
-  * New upstream release.
-
- -- Norbert Tretkowski <norbert@tretkowski.de>  Sat, 31 Jul 2010 12:34:43 +0200
-
-mysql-5.1 (5.1.48-1) unstable; urgency=low
-
-  * New upstream release.
-
- -- Norbert Tretkowski <norbert@tretkowski.de>  Thu, 17 Jun 2010 22:38:56 +0200
-
-mysql-5.1 (5.1.47-1) unstable; urgency=low
-
-  * New upstream release. (closes: #582526)
-  * Add patch to fix compile issue with embedded enabled.
-
- -- Norbert Tretkowski <norbert@tretkowski.de>  Sat, 22 May 2010 08:59:41 +0200
-
-mysql-5.1 (5.1.46-1) unstable; urgency=low
-
-  * New upstream release.
-
- -- Norbert Tretkowski <norbert@tretkowski.de>  Tue, 11 May 2010 18:47:32 +0200
-
-mysql-5.1 (5.1.45-3) unstable; urgency=low
-
-  * Upload to unstable.
-
- -- Norbert Tretkowski <norbert@tretkowski.de>  Sat, 10 Apr 2010 19:22:55 +0200
-
-mysql-5.1 (5.1.45-2) experimental; urgency=low
-
-  * Add mysql-server-core-5.1 package, containing the package and its manpage,
-    to let packages like akonadi use the mysqld binary without using system
-    databases. Thanks to Didier Raboud for the patch! (closes: #548419)
-  * Add libterm-readkey-perl suggestion to mysql-client-5.1 package.
-    (closes: #574505, #575769)
-
- -- Norbert Tretkowski <norbert@tretkowski.de>  Wed, 31 Mar 2010 11:36:25 +0200
-
-mysql-5.1 (5.1.45-1) unstable; urgency=low
-
-  * New upstream release.
-  * Drop patch 10_readline_build_fix.dpatch.
-  * Rename source package to mysql-5.1.
-
- -- Norbert Tretkowski <norbert@tretkowski.de>  Wed, 17 Mar 2010 14:56:02 +0100
-
-mysql-dfsg-5.1 (5.1.44-3) unstable; urgency=low
-
-  * Add patch that reinstates the reloading of character set data when a
-    mysql_library_init() is done after a mysql_library_end().
-    (closes: #569549, #569595)
-
- -- Norbert Tretkowski <norbert@tretkowski.de>  Mon, 01 Mar 2010 18:22:35 +0100
-
-mysql-dfsg-5.1 (5.1.44-2) unstable; urgency=low
-
-  * Disable innodb.innodb_information_schema test in testsuite run, it fails
-    randomly on at least i386. (closes: #570693)
-
- -- Norbert Tretkowski <norbert@tretkowski.de>  Sun, 21 Feb 2010 20:45:59 +0100
-
-mysql-dfsg-5.1 (5.1.44-1) unstable; urgency=low
-
-  * New upstream release.
-
- -- Norbert Tretkowski <norbert@tretkowski.de>  Thu, 18 Feb 2010 21:38:09 +0100
-
-mysql-dfsg-5.1 (5.1.43-1) unstable; urgency=low
-
-  * New upstream release.
-  * Drop patches:
-    + 11_binlog_wrong_offset.dpatch
-    + 96_SECURITY_CVE-2009-4484.dpatch
-  * Disable SSL related test in the testsuite until MySQL gets shipped with an
-    updated SSL certificate.
-  * Include symlinks for mysqlcheck manpages. (closes: #558760)
-  * Fix some lintian warnings:
-    + debian-news-entry-has-unknown-version
-    + postinst-has-useless-call-to-ldconfig
-    + postrm-has-useless-call-to-ldconfig
-  * Bump Standards-Version to 3.8.4, no changes required.
-
- -- Norbert Tretkowski <norbert@tretkowski.de>  Mon, 01 Feb 2010 22:03:42 +0100
-
-mysql-dfsg-5.1 (5.1.41-4) unstable; urgency=high
-
-  * SECURITY:
-    Fix for CVE-2009-4484: Copying name tags into an internal buffer from
-    incoming stream we didn't check the buffer overflow. That may lead to
-    memory overrun, crash etc.
-  * Add -fno-strict-aliasing to $CFLAGS to get around testsuite errors when
-    building with gcc 4.4.x. (closes: #554207)
-
- -- Norbert Tretkowski <norbert@tretkowski.de>  Mon, 18 Jan 2010 19:03:25 +0100
-
-mysql-dfsg-5.1 (5.1.41-3) unstable; urgency=low
-
-  * Let mysql-server-5.1 replace libmysqlclient-dev (>= 5.1.41-1) because of
-    moved InnoDB plugin. (closes: #557806)
-
- -- Norbert Tretkowski <norbert@tretkowski.de>  Tue, 24 Nov 2009 19:20:36 +0100
-
-mysql-dfsg-5.1 (5.1.41-2) unstable; urgency=low
-
-  * Move InnoDB plugin into -server package.
-  * Fix some lintian errors and warnings:
-    + weak-library-dev-dependency
-    + dir-or-file-in-var-run
-    + command-with-path-in-maintainer-script
-  * Ignore errors in testsuite run on s390.
-
- -- Norbert Tretkowski <norbert@tretkowski.de>  Sat, 21 Nov 2009 13:37:17 +0100
-
-mysql-dfsg-5.1 (5.1.41-1) unstable; urgency=medium
-
-  * New upstream release.
-  * Drop patch 60_zlib_innodb_workaround.dpatch, merged upstream.
-  * Make $DATADIR readable/writeable only for user mysql. (closes: #555626)
-  * Build with --without-readline to use system readline instead of bundled
-    copy. (closes: #552003)
-
- -- Norbert Tretkowski <norbert@tretkowski.de>  Fri, 20 Nov 2009 17:35:42 +0100
-
-mysql-dfsg-5.1 (5.1.40-1) unstable; urgency=low
-
-  * New upstream release.
-  * Set thread_stack size to 192K rather than 128K.
-
- -- Norbert Tretkowski <norbert@tretkowski.de>  Fri, 23 Oct 2009 19:12:45 +0200
-
-mysql-dfsg-5.1 (5.1.39-1) unstable; urgency=low
-
-  * New upstream release.
-  * New patch 60_zlib_innodb_workaround.dpatch to fix an incompatibility
-    between zlib and innodb during testsuite run.
-  * Wait in the SIGHUP trap to avoid killing an existing mysqld process when a
-    HUP signal is sent to mysqld_safe, patch based based on Mathias Gug's fix
-    from 5.0 series. (closes: #545044)
-  * Update debconf translations:
-    - Japanese, from Hideki Yamane. (closes: #545329)
-    - Swedish, from Martin Bagge. (closes: #545731)
-  * Fix some options in my.cnf about log_file have their named changed, patch
-    from Mathias Gug. (closes: #545761)
-  * Do not upgrade if there is an ndb management node configured, patch from
-    Mathias Gug. (closes: #545760)
-  * Switch build-dependency from libreadline5-dev to libreadline-dev.
-
- -- Norbert Tretkowski <norbert@tretkowski.de>  Mon, 28 Sep 2009 17:41:51 +0200
-
-mysql-dfsg-5.1 (5.1.37-2) unstable; urgency=low
-
-  * Update debconf translations:
-    - Swedish, from Martin Bagge. (closes: #539207)
-    - Russian, from Yuri Kozlov. (closes: #540216)
-    - French, from Christian Perrier. (closes: #540508)
-    - Italian, from Luca Monducci. (closes: #541465)
-    - German, from Thomas Mueller. (closes: #544477)
-  * Handle DEB_BUILD_OPTIONS correctly, patch from Stephen Depooter.
-    (closes: #523928)
-  * Support ANSI mode in debian-start.inc.sh, patch from Mathias Gug.
-    (closes: #534606)
-  * Enable hardening. (closes: #542746)
-  * Drop old_passwords option. (closes: #540366)
-
- -- Norbert Tretkowski <norbert@tretkowski.de>  Wed, 02 Sep 2009 20:26:59 +0200
-
-mysql-dfsg-5.1 (5.1.37-1) unstable; urgency=low
-
-  * New upstream release.
-  * Drop empty transitional package libmysqlclient15-dev, and provide/replace
-    it with libmysqlclient-dev. (closes: #538659)
-  * Ignore errors in testsuite on all archs but amd64, i386, ia64 and s390.
-    (closes: #539679)
-  * Update debconf translations:
-    - French, from Christian Perrier. (closes: #539703)
-  * Fixed typo regarding log_type in my.cnf.
-
- -- Norbert Tretkowski <norbert@tretkowski.de>  Tue, 04 Aug 2009 19:25:45 +0200
-
-mysql-dfsg-5.1 (5.1.36-5) unstable; urgency=low
-
-  [ Christian Hammers ]
-  * Applied debconf template patch from debian-l10n-english (thanks to
-    Justin B Rye).
-  * Added a missing misc:Depends to debian/control for lintian.
-  * Fixes typo in initscript (thanks to Gaspar Lajos).
-
-  [ Norbert Tretkowski ]
-  * Ignore errors in testsuite run on mips. (closes: #539095)
-  * Update debconf translations:
-    - Basque, from Piarres Beobide. (closes: #539130)
-    - Russian, from Yuri Kozlov. (closes: #539459)
-
- -- Norbert Tretkowski <norbert@tretkowski.de>  Sat, 01 Aug 2009 11:13:55 +0200
-
-mysql-dfsg-5.1 (5.1.36-4) unstable; urgency=low
-
-  * dpkg-gensymbols caused a lot of FTBFS because the C++ libraries have
-    slightly different symbol names on other archs (long vs. int somebody
-    told me on IRC). We now limit the ABI compatibility check to amd64.
-
- -- Christian Hammers <ch@debian.org>  Sun, 26 Jul 2009 11:46:20 +0200
-
-mysql-dfsg-5.1 (5.1.36-3) unstable; urgency=low
-
-  * Moving from experimental to unstable!
-
- -- Christian Hammers <ch@debian.org>  Sat, 25 Jul 2009 20:42:39 +0200
-
-mysql-dfsg-5.1 (5.1.36-2) experimental; urgency=low
-
-  * Build both -fPIC (libmysql_pic.a) and non -fPIC (libmysqld.a) as
-    some packages seem to need the -fPIC variant for their own build
-    process. Documented in README.Debian. Thanks to Modestas Vainius
-    for the patch. Closes: #508406
-  * Switch to out-of-source true build mode was a side effect of this change.
-  * Added libmysqlclient16.symbols file (thanks to Raphael Hertzog).
-  * Raised debian/compat from 4 to 7.
-  * Updated innotop to 1.7.1.
-  * Minor cleanups that lintian suggested.
-
- -- Christian Hammers <ch@debian.org>  Sun, 19 Jul 2009 18:48:53 +0200
-
-mysql-dfsg-5.1 (5.1.36-1) experimental; urgency=low
-
-  * Ex-maintainer upload :)
-  * New upstream release.
-  * SECURITY: Upstream fix for "mysql client does not escape strings in 
-    --html mode." (CVE-2008-4456) Closes: #526254
-  * Upstream fixes REPEAT() function. Closes: #447028
-  * Upstream fixes problems when mixing ORDER and GROUP BY. Closes: #470854
-  * There were many innodb fixes in the last two years, probably
-    also for this unreproducible crash. CLoses: #447713
-  * Removed amd64 specific -fPIC compiler option that was introduced
-    especially for building the NDB cluster module which is no longer
-    part of this package (thanks to Modestas Vainius). Closes: #508406
-  * Put /etc/mysql/conf.d to mysql-server-5.1.dirs (thanks to Alexander 
-    Gerasiov). Closes: #515145
-  * Fixed mysql-test suite by adding 50_mysql-test__db_test.dpatch.
-    It now passes 100% of the tests again. Also Closes: #533999
-  * Preinst now prevents Installation if NDB configuration is detected.
-  * Applied Ubuntu patch that fixes privilege bootstrapping in postinst
-    (thanks to Mathias Gug). Closes: #535492
-  * Applied Ubuntu patch that sets the debconf prio for the root password
-    question to high and prevents it from being asked on 5.0 -> 5.1 upgrades
-    (thanks to Mathias Gug). Closes: #535500
-  * Removed the check for ISAM tables as the only supported upgrade path is
-    from lenny's MySQL-5.0.
-  * Added /etc/mysql/conf.d/mysqld_safe_syslog.cnf which enables mysqld_safe
-    to pipe all mysqld output into the syslog. The reason for not letting dpkg
-    handle it via a normal config file change was that my.cnf is usually
-    heavily tuned by the admin so the setting would go lost too easily.
-  * Updated mysqlreport to version 3.5 (including two minor patches by me).
-
- -- Christian Hammers <ch@debian.org>  Wed, 01 Jul 2009 20:54:58 +0200
-
-mysql-dfsg-5.1 (5.1.34-1) experimental; urgency=low
-
-  * New upstream release.
-
- -- Norbert Tretkowski <norbert@tretkowski.de>  Mon, 20 Apr 2009 20:23:10 +0200
-
-mysql-dfsg-5.1 (5.1.33-2) experimental; urgency=low
-
-  * Remove no longer active developers from uploaders field.
-  * Drop workaround for upgrades from MySQL 3.23, not necessary any more.
-
- -- Norbert Tretkowski <norbert@tretkowski.de>  Tue, 07 Apr 2009 11:23:25 +0200
-
-mysql-dfsg-5.1 (5.1.33-1) experimental; urgency=low
-
-  * New upstream release.
-
- -- Norbert Tretkowski <norbert@tretkowski.de>  Thu, 02 Apr 2009 21:12:23 +0200
-
-mysql-dfsg-5.1 (5.1.32-1) experimental; urgency=low
-
-  * New upstream release.
-
- -- Norbert Tretkowski <norbert@tretkowski.de>  Fri, 06 Mar 2009 18:48:23 +0100
-
-mysql-dfsg-5.1 (5.1.31-2) experimental; urgency=low
-
-  * Update SSL certificates, and re-enable SSL related tests when running
-    the testsuite.
-
- -- Norbert Tretkowski <norbert@tretkowski.de>  Tue, 10 Feb 2009 16:08:42 +0100
-
-mysql-dfsg-5.1 (5.1.31-1) experimental; urgency=low
-
-  * New upstream release.
-
- -- Norbert Tretkowski <norbert@tretkowski.de>  Sun, 08 Feb 2009 17:07:11 +0100
-
-mysql-dfsg-5.1 (5.1.30-2) experimental; urgency=low
-
-  * Drop MySQL Cluster support, it's deprecated since 5.1.24-RC.
-  * Fix FTBFS if build twice in a row. (closes: #487091)
-
- -- Norbert Tretkowski <norbert@tretkowski.de>  Fri, 05 Dec 2008 21:04:55 +0100
-
-mysql-dfsg-5.1 (5.1.30-1) experimental; urgency=low
-
-  * New upstream release.
-
- -- Norbert Tretkowski <norbert@tretkowski.de>  Thu, 27 Nov 2008 09:09:55 +0100
-
-mysql-dfsg-5.1 (5.1.29rc-1) experimental; urgency=low
-
-  * New upstream release.
-
- -- Norbert Tretkowski <norbert@tretkowski.de>  Mon, 27 Oct 2008 20:00:43 +0100
-
-mysql-dfsg-5.1 (5.1.26rc-1) experimental; urgency=low
-
-  * New upstream release.
-
- -- Norbert Tretkowski <norbert@tretkowski.de>  Mon, 14 Jul 2008 21:46:59 +0200
-
-mysql-dfsg-5.1 (5.1.25rc-1) experimental; urgency=low
-
-  * New upstream release.
-
- -- Norbert Tretkowski <norbert@tretkowski.de>  Sat, 21 Jun 2008 13:55:02 +0200
-
-mysql-dfsg-5.1 (5.1.24rc-1) experimental; urgency=low
-
-  * New upstream release.
-  * Ignore errors in testsuite on ia64 and s390.
-
- -- Norbert Tretkowski <norbert@tretkowski.de>  Wed, 16 Apr 2008 22:03:44 +0200
-
-mysql-dfsg-5.1 (5.1.23rc-1) experimental; urgency=low
-
-  * New upstream release.
-
-  [ Christian Hammers ]
-  * Add PIC support for NDB libraries on amd64 (thanks to Monty Taylor).
-  * Add extra information when aborting due to a detected downgrade (thanks to
-    Raphael Pinson).
-  * Move libndbclient.so.3 to its own package as it now has a version != 0
-    (thanks to Raphael Pinson for reminding me).
-
-  [ Monty Taylor ]
-  * Remove 85_ndb__staticlib.dpatch since we have a libndbclient package now.
-  * Add myself to the uploaders so that I don't get complaints about package
-    signing.
-  * Add libndbclient-dev package to go with libndbclient3.
-
-  [ Norbert Tretkowski ]
-  * Update patches:
-    + 41_scripts__mysql_install_db.sh__no_test.dpatch
-  * Drop patches:
-    + 70_upstream_debian__configure.dpatch
-    + 71_upstream_debian__Makefile.in.dpatch
-    + 99_TEMP_minmax.dpatch
-  * Remove Adam Conrad from uploaders on his request. Thanks for your work in
-    the past!
-  * Ignore errors in testsuite on amd64 and i386.
-
- -- Norbert Tretkowski <norbert@tretkowski.de>  Fri, 29 Feb 2008 10:38:27 +0100
-
-mysql-dfsg-5.1 (5.1.22rc-1) experimental; urgency=low
-
-  * New upstream version.
-  * Let mysql-server-5.1 pre-depend on debconf as it uses it in the preinst.
-  * Fixed mysql-client-5.1 menu entry for upcoming menu policy 1.4.
-
- -- Christian Hammers <ch@debian.org>  Tue, 02 Oct 2007 22:45:37 +0200
-
-mysql-dfsg-5.1 (5.1.21beta-1) experimental; urgency=low
-
-  * My "Greetings from FrOSCon!" release.
-  * New upstream version.
-  * libmysqlclient.so.15 has been superseded by libmysqlclient.so.16.
-  * Renamed libmysqlclient15-dev to libmysqlclient-dev but added an empty
-    package libmysqlclient15-dev to ease the transition for packages with
-    a versioned build-dep to libmysqlclient15-dev which is something that
-    currently does not work with "Provides:".
-  * Synced with 5.0 branch up to subversion release r909.
-  * Commented out most of the compile conditionals in the hope that
-    all architectures can be build the same way.
-  * Added a lot of new binaries and manpages.
-  * Switched to plugin based engines.
-
- -- Christian Hammers <ch@debian.org>  Sat, 25 Aug 2007 14:24:40 +0200
-
-mysql-dfsg-5.1 (5.1.19beta-1) experimental; urgency=low
-
-  * New upstream release.
-
- -- Christian Hammers <ch@debian.org>  Mon, 11 Jun 2007 23:18:35 +0200
-
-mysql-dfsg-5.1 (5.1.16beta-4) experimental; urgency=high
-
-  * Merged with 5.0 r850:
-    * SECURITY:
-      In some previous versions mysql_install_db was not idempotent and did
-      always create passwordless root accounts although it should only on
-      initial installs (thanks to Olaf van der Spek). Closes: #418672
-    * Added check for passwordless root accounts to debian-start.
-    * As MySQL-5.0 is, at least currently, incompatible with Kernel 2.4 the
-      installation is aborted for such old kernels. Debian Etch does not
-      support them anyway according to the release notes but this might be 
-      unexpected and many production servers still have self build ones 
-      installed (thanks to Marc-Christian Petersen). See: #416841
-    * Adjusted TeX build-deps to texlive.
-    * Added innotop. 
-    * Changed maintainer email address to
-      pkg-mysql-commits@lists.alioth.debian.org 
-
- -- Christian Hammers <ch@debian.org>  Thu, 19 Apr 2007 19:29:29 +0200
-
-mysql-dfsg-5.1 (5.1.16beta-3) experimental; urgency=low
-
-  * Merged with 5.0 r837:
-    * Activated the blackhole engine as it's needed for replicating partition
-      designs (thanks to Cyril SCETBON). 
-    * Fixed segfault on i486 systems without cpuid instruction (thanks to
-      Lennart Sorensen). Closes: #410474
-    * Only use of the non-essential debconf package in postrm if it is
-      still installed (thanks to Michael Ablassmeier). Closes: #416838
-
- -- Christian Hammers <ch@debian.org>  Sun, 18 Mar 2007 21:48:11 +0100
-
-mysql-dfsg-5.1 (5.1.16beta-2) experimental; urgency=low
-
-  * Merged with 5.0 r818:
-    * Fixed FTBFS on Sparc introduced with the "make -j" trick in
-      5.0.32-8 (thanks to Frank Lichtenheld). Closes: #415026
-
- -- Christian Hammers <ch@debian.org>  Sun, 18 Mar 2007 21:20:11 +0100
-
-mysql-dfsg-5.1 (5.1.16beta-1) experimental; urgency=low
-
-  * New upstream release. 
-    * SECURITY: Using an INFORMATION_SCHEMA table with ORDER BY in a subquery
-      could cause a server crash (CVE-2007-1420).
-    * Added temporary patch 90_TEMP_sqlparse-ifdef to avoid build problems.
-  * Merged with 5.0 r809:
-    * Updated mysqlreport to latest upstream (and patched --help usage
-      message and "return if qcache_size==0").
-  * Merged with 5.0 r798:
-    * Adapt MAKE_J to use the -j option with the number of available
-      processors. (thanks to Raphael Pinson).
-  * Merged with 5.0 r758:
-    * Changed minimum required version in dh_makeshlibs to 5.0.27-1 as
-      5.0.26 had an ABI breakage in it!
-      This is the cause for Perl programs crashing with the following error: 
-      Transactions not supported by database at /usr/lib/perl5/DBI.pm line 672
-    * Added some more comments to the default my.cnf.
-    * Added support for /etc/mysql/conf.d/.
-    * The debian-start script that runs on every server start now first upgrades
-      the system tables (if neccessary) and then check them as it sometimes did
-      not work the other way around (e.g. for MediaWiki). The script now uses 
-      mysql_update instead of mysql_update_script as recommended. See: 409780
-
- -- Christian Hammers <ch@debian.org>  Fri,  2 Mar 2007 01:00:55 +0100
-
-mysql-dfsg-5.1 (5.1.15beta-1) experimental; urgency=low
-
-  * New upstream release.
-  [Monty Taylor]
-  * Removed patches/25_mysys__default.c - fixed upstream.
-  * Removed patches/26_client__mysql_upgrade.c - fixed upstream.
-  * Removed patches/29_scripts__mysqlbug.sh - fixed upstream.
-  * Removed patches/39_scripts__mysqld_safe.sh__port_dir - fixed upstream.
-  * Removed patches/42_scripts__mysqldumpslow__slowdir - fixed upstream.
-  * Removed patches/45_warn-CLI-passwords - fixed upstream.
-  * Removed patches/89_ndb__records.dpatch - fixed upstream.
-  * Removed patches/86_ndbapi_tc_selection.dpatch - fixed upstream.
-  [Christian Hammers]
-  * Synced with 5.0.32-4.
-    * mysql-server-5.0 pre-depends on adduser now and has --disabled-login
-      explicitly added to be on the safe side (thanks to the puiparts team).
-      Closes: #408362
-    * Corrections the terminology regarding NDB in the comments of all config
-      files and init scripts (thanks to Geert Vanderkelen of MySQL).
-
- -- Christian Hammers <ch@debian.org>  Wed,  7 Feb 2007 11:34:52 -0200
-
-mysql-dfsg-5.1 (5.1.14beta-2) experimental; urgency=low
-
-  [Christian Hammers]
-  * Readded 85_ndb__staticlib.dpatch with slight modifications. 
-  * Backported debian-start scripts from 5.0.
-  [Monty Taylor]
-  * Now build-depends on bison.
-  * Updated to standards 3.7.2.
-  * Removed references to comp_err.
-  * build-depend on automake1.9 to match upstream 
-  * Merged runlevel changes from 5.0.
-  * Added 26_client__mysql_upgrade.c.dpatch to fix a segfault in mysql_upgrade
-    when using a password. It's been fixed upstream in 5.1.15. 
-  * Moved BDB check to sanity_checks() and added a note about deprecation.
-  * Use my_print_defaults instead of mysqld --print-defaults
-  * Changed NDB Data and Management node startup seqence. Prevented both
-    from restarting on upgrade to address rolling upgrade issues.
-  * Added a "start-initial" option to the Data Node init script to support
-    initial node starts.
-  * Added 86_ndbapi_tc_selection.dpatch to fix a bug that causes a segfault
-    when using the NdbApi. http://bugs.mysql.com/bug.php?id=24914
-    Fixed in 5.1.15
-  * Added 89_ndb__records.dpatch to fix
-    http://bugs.mysql.com/bug.php?id=25567, which causes a table scan per
-    table per query.
-
- -- Christian Hammers <ch@debian.org>  Wed, 31 Jan 2007 01:17:35 +0100
-
-mysql-dfsg-5.1 (5.1.14beta-1) experimental; urgency=low
-
-  * New upstream.
-  * Removed references to mysql_explain_log
-  * Changed context for patch to mysqld_multi.1
-  * Removed 70_kfreebsd.dpatch - applied to upstream
-  * Removed 87_ps_Hurd - applied to upstream
-  * Replaced --without-readline to --with-libedit to configure options, as
-    --without-readline doesn't seem to do the right thing anymore.
-
- -- Monty Taylor <mordred@inaugust.com>  Wed, 10 Jan 2007 12:59:55 -0800
-
-mysql-dfsg-5.1 (5.1.11beta-1) experimental; urgency=low
-
-  * Starting new 5.1 branch!
-  * FIXME: Following patch couldn't be applied:
-      ## 85_ndb__staticlib.dpatch by  <ch@debian.org>
-  * FIXME: Following patch couldn't be applied:
-      ## 86_PATH_MAX.dpatch
-
- -- Christian Hammers <ch@debian.org>  Sat, 29 Jul 2006 11:35:42 +0200
-
-mysql-dfsg-5.0 (5.0.84-1) unstable; urgency=low
-
-  * New upstream release.
-  * Update patches:
-    + debian/patches/60_disabled_tests.dpatch
-
- -- Norbert Tretkowski <norbert@tretkowski.de>  Fri, 24 Jul 2009 18:05:11 +0200
-
-mysql-dfsg-5.0 (5.0.83-1) unstable; urgency=low
-
-  * New upstream release.
-  * Update patches:
-    + debian/patches/45_warn-CLI-passwords.dpatch (closes: #536548)
-    + debian/patches/60_disabled_tests.dpatch
-
- -- Norbert Tretkowski <norbert@tretkowski.de>  Sat, 18 Jul 2009 08:18:53 +0200
-
-mysql-dfsg-5.0 (5.0.81-1) unstable; urgency=low
-
-  * New upstream release.
-  * Remove patches:
-    + debian/patches/63_update_ssl_certs.dpatch
-
- -- Norbert Tretkowski <norbert@tretkowski.de>  Mon, 04 May 2009 18:53:05 +0200
-
-mysql-dfsg-5.0 (5.0.77-1) unstable; urgency=low
-
-  * New upstream release.
-
- -- Norbert Tretkowski <norbert@tretkowski.de>  Tue, 17 Feb 2009 18:42:46 +0100
-
-mysql-dfsg-5.0 (5.0.75-1) unstable; urgency=low
-
-  * New upstream release.
-  * Update patches:
-    + debian/patches/33_scripts__mysql_create_system_tables__no_test.dpatch
-  * Remove patches:
-    + debian/patches/50_fix_agg_functions.dpatch
-
- -- Norbert Tretkowski <norbert@tretkowski.de>  Mon, 22 Dec 2008 11:01:38 +0100
-
-mysql-dfsg-5.0 (5.0.67-3) unstable; urgency=low
-
-  * Really apply patch from 5.0.74 to fix check for non-aggregated columns
-    in queries.
-
- -- Norbert Tretkowski <norbert@tretkowski.de>  Tue, 16 Dec 2008 07:19:23 +0100
-
-mysql-dfsg-5.0 (5.0.67-2) unstable; urgency=low
-
-  * New patch from 5.0.74 to fix check for non-aggregated columns in queries.
-    (closes: #505179, #505181)
-  * Add patch from Dan Munckton:
-    + Clearly indicate that we do not support running multiple instances
-      of mysqld by duplicating the init script.
-      (closes: #314785, #324834, #435165, #444216)
-    + Properly parameterize all existing references to the mysql config
-      file (/etc/mysql/my.cnf).
-  * Really fix FTBFS if build twice in a row. (closes: #442684)
-
- -- Norbert Tretkowski <norbert@tretkowski.de>  Sun, 14 Dec 2008 10:12:30 +0100
-
-mysql-dfsg-5.0 (5.0.67-1) unstable; urgency=low
-
-  * New upstream release.
-  * Update patches:
-    + debian/patches/25_mysys__default.c.dpatch
-    + debian/patches/80_fix_user_setup_on_localhost.dpatch
-  * Remove patches:
-    + debian/patches/50_fix_mysqldump.dpatch
-    + debian/patches/51_incorrect-order.dpatch
-    + debian/patches/52_ndb-gcc-4.2.dpatch
-    + debian/patches/53_integer-gcc-4.2.dpatch
-    + debian/patches/54_ssl-client-support.dpatch
-    + debian/patches/55_testsuite-2008.dpatch
-    + debian/patches/56_fix_order_by.dpatch
-    + debian/patches/57_fix_mysql_replication.dpatch
-    + debian/patches/58_disable-ndb-backup-print.dpatch
-    + debian/patches/59_fix_relay_logs_corruption.dpatch
-    + debian/patches/60_rpl_test_failure.dpatch
-    + debian/patches/90_upstreamdebiandir.dpatch
-    + debian/patches/91_SECURITY_CVE-2007-5925.dpatch
-    + debian/patches/92_SECURITY_CVE-2008-2079.dpatch
-    + debian/patches/93_SECURITY_CVE-2008-3963.dpatch
-  * Fix FTBFS if build twice in a row. (closes: #442684)
-
- -- Norbert Tretkowski <norbert@tretkowski.de>  Sun, 02 Nov 2008 13:51:50 +0100
-
-mysql-dfsg-5.0 (5.0.51a-24) testing-proposed-updates; urgency=low
-
-  * Update SSL certificates, and re-enable SSL related tests when running
-    the testsuite.
-
- -- Norbert Tretkowski <norbert@tretkowski.de>  Tue, 03 Feb 2009 15:40:47 +0100
-
-mysql-dfsg-5.0 (5.0.51a-23) testing-proposed-updates; urgency=medium
-
-  * Reset debconf password variable root_password_again immediately after
-    using it. (closes: #513262)
-  * Disable SSL related tests when running the testsuite until MySQL bug
-    #42366 gets fixed.
-
- -- Norbert Tretkowski <norbert@tretkowski.de>  Thu, 29 Jan 2009 14:07:32 +0100
-
-mysql-dfsg-5.0 (5.0.51a-22) testing-proposed-updates; urgency=low
-
-  * New patch 10_mysql_secure_installation.dpatch to fix failure on passwords
-    which need quoting. (closes: #511929)
-  * New patch 62_delete_with_self-join.dpatch from 5.0.54 to fix MyISAM
-    storage engine error (134) doing delete with self-join. (closes: #512651)
-
- -- Norbert Tretkowski <norbert@tretkowski.de>  Sun, 25 Jan 2009 10:02:35 +0100
-
-mysql-dfsg-5.0 (5.0.51a-21) testing-proposed-updates; urgency=low
-
-  * Ask for MySQL root password at high priority, because otherwise all
-    default installations will miss this question, thanks to Thijs Kinkhorst
-    for the patch. (closes: #510875)
-  * Do not fail checking tables when using sql-mode ansi-quotes, thanks to
-    Renato Alves for the patch. (closes: #507049)
-
- -- Norbert Tretkowski <norbert@tretkowski.de>  Fri, 09 Jan 2009 10:24:23 +0100
-
-mysql-dfsg-5.0 (5.0.51a-20) testing-proposed-updates; urgency=low
-
-  * New patch 60_fix_leap_seconds.dpatch from 5.0.74 to return leap second
-    values with a time part that ends with :59:59. (closes: #510177)
-
- -- Norbert Tretkowski <norbert@tretkowski.de>  Tue, 30 Dec 2008 10:32:46 +0100
-
-mysql-dfsg-5.0 (5.0.51a-19) testing-proposed-updates; urgency=low
-
-  * New patch 50_fix_mysqldump2.dpatch from 5.0.60 to fix dumping databases
-    from mysql 4.0 server. (closes: #507789)
-  * Do not create a guest account during bootstrap. (closes: #463704)
-
- -- Norbert Tretkowski <norbert@tretkowski.de>  Thu, 04 Dec 2008 23:07:19 +0100
-
-mysql-dfsg-5.0 (5.0.51a-18) testing-proposed-updates; urgency=high
-
-  * SECURITY:
-    Fix for CVE-2008-4098: Inadequate validation of paths used in DATA
-    DIRECTORY and INDEX DIRECTORY clauses of CREATE TABLE statements enabled
-    attackers to write to tables in other databases to which they could not
-    ordinarily have access.
-
- -- Devin Carraway <devin@debian.org>  Tue, 25 Nov 2008 05:38:45 +0000
-
-mysql-dfsg-5.0 (5.0.51a-17) testing-proposed-updates; urgency=low
-
-  * Don't use commented out passwords from debian.cnf. (closes: #453820)
-  * Update watch file to recognize releases > 5.0.45.
-
- -- Norbert Tretkowski <norbert@tretkowski.de>  Sun, 02 Nov 2008 13:31:32 +0100
-
-mysql-dfsg-5.0 (5.0.51a-16) unstable; urgency=low
-
-  * New patch 60_rpl_test_failure.dpatch from 5.0.54 to fix a race condition
-    with the rpl_packet test in some cases. (closes: #501413)
-
- -- Norbert Tretkowski <norbert@tretkowski.de>  Thu, 09 Oct 2008 08:50:43 +0200
-
-mysql-dfsg-5.0 (5.0.51a-15) unstable; urgency=high
-
-  * SECURITY:
-    Fix for CVE-2008-3963: An empty bit-string literal (b'') caused a server
-    crash. Now the value is parsed as an empty bit value (which is treated as
-    an empty string in string context or 0 in numeric context).
-    (closes: #498362)
-
- -- Norbert Tretkowski <norbert@tretkowski.de>  Sun, 14 Sep 2008 18:27:46 +0200
-
-mysql-dfsg-5.0 (5.0.51a-14) unstable; urgency=low
-
-  * Update debconf translations:
-    - Swedish, from Martin Bagge. (closes: #491688)
-    - Netherlands, from Thijs Kinkhorst. (closes: #492723)
-
- -- Norbert Tretkowski <norbert@tretkowski.de>  Sun, 07 Sep 2008 20:18:31 +0200
-
-mysql-dfsg-5.0 (5.0.51a-13) unstable; urgency=medium
-
-  * New patch 59_fix_relay_logs_corruption.dpatch from 5.0.56 to fix
-    corruption in relay logs. (closes: #463515)
-
- -- Norbert Tretkowski <norbert@tretkowski.de>  Wed, 03 Sep 2008 09:13:46 +0200
-
-mysql-dfsg-5.0 (5.0.51a-12) unstable; urgency=low
-
-  * Disable rpl_ndb_innodb_trans test when running the testsuite, fails
-    randomly on i386. (closes: #494238)
-
- -- Norbert Tretkowski <norbert@tretkowski.de>  Sat, 09 Aug 2008 15:56:45 +0200
-
-mysql-dfsg-5.0 (5.0.51a-11) unstable; urgency=low
-
-  * Disable innodb_handler test when running the testsuite, fails randomly
-    on s390. (closes: #491363)
-
- -- Norbert Tretkowski <norbert@tretkowski.de>  Wed, 23 Jul 2008 08:34:51 +0200
-
-mysql-dfsg-5.0 (5.0.51a-10) unstable; urgency=high
-
-  * Merge testing-security upload to finally fix CVE-2008-2079, thanks to
-    Devin Carraway and Steffen Joeris. (closes: #480292)
-  * New patch 58_disable-ndb-backup-print.dpatch from 5.0.54 to disable
-    ndb_backup_print, ndb_alter_table and ndb_replace tests when running the
-    testsuite. (closes: #474893)
-  * Reenable error handling in testsuite on i386, disabling it was just a
-    workaround for the problem which is now fixed with the above patch.
-  * Update debconf translations:
-    - Vietnamese, from Clytie Siddall. (closes: #486443)
-    - Spanish, from Javier Fernández-Sanguino Peña. (closes: #488740)
-    - Slovak, from helix84. (closes: #489266)
-  * Make lintian happy:
-    - Fix build-dependency on -1 revision.
-    - Fix deprecated chown usage.
-    - Fix spelling error in description.
-
- -- Norbert Tretkowski <norbert@tretkowski.de>  Tue, 15 Jul 2008 19:37:35 +0200
-
-mysql-dfsg-5.0 (5.0.51a-9+lenny2) testing-security; urgency=high
-
-  * Non-maintainer upload by the security team.
-  * Correct error number in symlink.test to avoid FTBFS on some archs.
-
- -- Steffen Joeris <white@debian.org>  Sun, 13 Jul 2008 11:44:57 +0000
-
-mysql-dfsg-5.0 (5.0.51a-9+lenny1) testing-security; urgency=high
-
-  * Non-maintainer upload by the security team.
-  * Correct and expand 92_SECURITY_CVE-2008-2079.dpatch to cover all symlinks
-    and check the output of fn_format(). (closes: #480292)
-    Fixes: CVE-2008-2079
-
- -- Steffen Joeris <white@debian.org>  Sat, 12 Jul 2008 05:30:39 +0000
-
-mysql-dfsg-5.0 (5.0.51a-9) unstable; urgency=low
-
-  * Ignore errors in testsuite on i386. (workaround for #474893)
-
- -- Norbert Tretkowski <norbert@tretkowski.de>  Wed, 25 Jun 2008 15:07:03 +0200
-
-mysql-dfsg-5.0 (5.0.51a-8) unstable; urgency=low
-
-  * New patch 80_fix_user_setup_on_localhost.dpatch from Daniel Hahler to fix
-    a duplicate key error when install MySQL server on a host with hostname
-    localhost. (closes: #478319)
-  * Really fix build on non-linux systems, this time without producing a build
-    error on some architectures. (closes: #485971)
-  * Update debconf translations:
-    - French, from Christian Perrier. (closes: #478553)
-    - German, from Alwin Meschede. (closes: #478672)
-    - Italian, from Luca Monducci. (closes: #479363)
-    - Czech, from Miroslav Kure. (closes: #480924)
-    - Galician, from Jacobo Tarrio. (closes: #480965)
-    - Basque, from Piarres Beobide. (closes: #481840)
-    - Swedish, from Martin Bagge. (closes: #482466, #486307)
-    - Turkish, from Mert Dirik. (closes: #484704)
-    - Russian, from Yuri Kozlov. (closes: #486149)
-    - Finnish, from Esko Arajärvi. (closes: #486554)
-    - Portuguese, from Miguel Figueiredo. (closes: #486709)
-    - Romanian, from Eddy Petrișor. (closes: #486944)
-    - Japanese, from Hideki Yamane. (closes: #487270)
-
- -- Norbert Tretkowski <norbert@tretkowski.de>  Sat, 21 Jun 2008 19:20:48 +0200
-
-mysql-dfsg-5.0 (5.0.51a-7) unstable; urgency=high
-
-  [ Norbert Tretkowski ]
-  * SECURITY:
-    Fix for CVE-2008-2079: It was possible to circumvent privileges through
-    the creation of MyISAM tables employing the DATA DIRECTORY and INDEX
-    DIRECTORY options to overwrite existing table files in the MySQL data
-    directory. Use of the MySQL data directory in DATA DIRECTORY and INDEX
-    DIRECTORY is now disallowed. Patch from openSUSE 11.0, thanks to Michal
-    Marek. (closes: #480292)
-  * Fix build on non-linux systems, like hurd-i386. (closes: #480362)
-  * Include symlinks for mysqlcheck. (closes: #480647)
-
-  [ Monty Taylor ]
-  * Remove ndb_cpcd, as it is only for the NDB test suite and not useful as a
-    public program.
-  * Fix debian-start.inc.sh for table names with characters needing quotes.
-    Thanks Felix Rublack! (closes: #480525, #481154, #481303, #484012) 
-  * Delete mysql-common.README.Debian. Nothing in it was relevant, and the
-    useful information is in mysql-server anyway. (closes: #480940)
-  * Remove a spurious HOME= in logrotate script.  
-
- -- Norbert Tretkowski <norbert@tretkowski.de>  Thu, 05 Jun 2008 11:49:45 +0200
-
-mysql-dfsg-5.0 (5.0.51a-6) unstable; urgency=low
-
-  * Fix debian-start.inc.sh to not print the row counts of the tables
-    queried. (closes: #478256, #479697)
-
- -- Monty Taylor <mordred@inaugust.com>  Wed, 14 May 2008 00:47:46 -0700
-
-mysql-dfsg-5.0 (5.0.51a-5) unstable; urgency=medium
-
-  * New patch 57_fix_mysql_replication.dpatch from 5.0.54 to fix directory for
-    relay logs when using replication.
-
- -- Norbert Tretkowski <norbert@tretkowski.de>  Sun, 27 Apr 2008 13:55:04 +0200
-
-mysql-dfsg-5.0 (5.0.51a-4) unstable; urgency=low
-
-  [ Monty Taylor ]
-  * Remove build of ndb docs, since they are not installed. Removed build deps
-    on TeX and doxygen since that's all they were there for.
-  * Replace script in check_for_crashed_tables with a myisam-recover option
-    and a script to trigger a check of those tables. (thanks HarrisonF and
-    kolbe)
-  * Replace direct calls to test suite with calls to the make targets used by
-    the MySQL build and qa teams for releases.
-  * Add --skip-ndbcluster to the postinst bootstrap command. It's really a
-    workaround for a bug in 5.1, but it's probably a good idea anyway since we
-    certainly don't need cluster to spin up, and if people have enabled
-    cluster in their my.cnf file, there could be postinst issues if cluster
-    isn't running.
-  * Remove reference to configure options that no longer exist.
-  * Add myself to uploaders.
-
-  [ Norbert Tretkowski ]
-  * New patch 56_fix_order_by.dpatch from Ubuntu to fix ORDER BY not working
-    with GROUP BY. (closes: #471737)
-  * Add note about filename extensions in the /etc/mysql/conf.d/ directory in
-    my.cnf. (closes: #461759)
-  * Confirm password on install, patch from Nicolas Valcárcel.
-    (closes: #471887)
-  * Remove Adam Conrad from uploaders on his request. Thanks for your work in
-    the past!
-  * Use lsb_release to detect distribution.
-
- -- Norbert Tretkowski <norbert@tretkowski.de>  Sat, 05 Apr 2008 21:51:43 +0200
-
-mysql-dfsg-5.0 (5.0.51a-3) unstable; urgency=low
-
-  * Disable patch 60_raise-max-keylength.dpatch in default build, but still
-    ship it in the source package.
-
- -- Norbert Tretkowski <norbert@tretkowski.de>  Sun, 17 Feb 2008 18:54:42 +0100
-
-mysql-dfsg-5.0 (5.0.51a-2) unstable; urgency=low
-
-  * Replace 54_ssl-client-support.dpatch added in 5.0.51-2 with patch from
-    upstream.
-  * Ignore errors in testsuite on powerpc.
-
- -- Norbert Tretkowski <norbert@tretkowski.de>  Sun, 17 Feb 2008 12:42:58 +0100
-
-mysql-dfsg-5.0 (5.0.51a-1) unstable; urgency=low
-
-  [ Norbert Tretkowski ]
-  * New upstream security hotfix release. Low priority upload anyway because
-    5.0.51-3 already contained all security fixes.
-  * Remove patches:
-    + debian/patches/51_mysqlcheck-result.dpatch
-    + debian/patches/92_SECURITY_CVE-2007-6303.dpatch
-    + debian/patches/93_SECURITY_CVE-2007-6304.dpatch
-    + debian/patches/94_SECURITY_CVE-2008-0226+0227.dpatch
-  * Add recommendation on libhtml-template-perl to -server package, used by
-    ndb_size. (closes: #462265)
-  * New patch 60_raise-max-keylength.dpatch to raise the maximum key length to
-    4005 bytes or 1335 UTF-8 characters. (closes: #463137)
-  * New patch 51_sort-order.dpatch from 5.0.52 to fix incorrect order when
-    using range conditions on 2 tables or more.
-  * Support DEB_BUILD_OPTIONS option 'nocheck' to skip tests.
-  * Update mysqlreport to 3.4a release.
-
-  [ Luk Claes ]
-  * Updated Japanese debconf translation. (closes: #462158)
-
- -- Norbert Tretkowski <norbert@tretkowski.de>  Wed, 06 Feb 2008 11:57:45 +0100
-
-mysql-dfsg-5.0 (5.0.51-3) unstable; urgency=high
-
-  * SECURITY:
-    Fix for CVE-2008-0226 and CVE-2008-0227: Three vulnerabilities in yaSSL
-    versions 1.7.5 and earlier were discovered that could lead to a server
-    crash or execution of unauthorized code. The exploit requires a server
-    with yaSSL enabled and TCP/IP connections enabled, but does not require
-    valid MySQL account credentials. The exploit does not apply to OpenSSL.
-    (closes: #460873)
-  * Fix LSB header in init scripts (patch from Petter Reinholdtsen).
-    (closes: #458798)
-  * Run testsuite on all archs, but ignore errors on alpha, arm, armel, hppa,
-    mipsel and sparc. (closes: #460402)
-
- -- Norbert Tretkowski <norbert@tretkowski.de>  Wed, 23 Jan 2008 11:37:11 +0100
-
-mysql-dfsg-5.0 (5.0.51-2) unstable; urgency=low
-
-  [ Monty Taylor ]
-  * Added --with-system-type to set the version_compile_os field.
-  * Cleaned up some lintian warnings.
-  * Removed 43_scripts__mysql_update__password.dpatch since we don't use
-    mysql_upgrade_shell anymore and use mysql_upgrade instead.
-  * Removed 88_mctype_attrib.dpatch, http://bugs.mysql.com/bug.php?id=25118 is
-    closed with http://lists.mysql.com/commits/24337
-  * Added mysql-community/mysql-enterprise virtual packages in provides and
-    conflicts to ease transitions between versions.
-
-  [ Norbert Tretkowski ]
-  * Add -fPIC to CFLAGS to allow other packages to be built against
-    libmysqld.a on amd64. (closes: #457915)
-  * New patch 55_testsuite-2008.dpatch to fix FTBFS in testsuite.
-    (closes: #458695)
-  * New patch 54_ssl-client-support.dpatch to fix SSL client support.
-  * Don't run testsuite on alpha, arm, hppa, mipsel and sparc.
-
- -- Norbert Tretkowski <norbert@tretkowski.de>  Wed, 02 Jan 2008 18:40:04 +0100
-
-mysql-dfsg-5.0 (5.0.51-1) unstable; urgency=low
-
-  * New upstream release.
-    + Fix a crash in mysql_client_test due to gcc 4.x optimizations.
-      (closes: #452558)
-  * Update patches:
-    + debian/patches/41_scripts__mysql_install_db.sh__no_test.dpatch
-    + debian/patches/89_ndb__staticlib.dpatch
-  * Run testsuite after build.
-  * Re-add manpages, they are licensed under GPL now and redistribution is
-    permitted.
-  * Drop linux-libc-dev build-dependency, it's now being pulled by libc-dev
-    which is build-essential. (closes: #431018)
-  * Remove old optimizations for MySQL 3.23.x, they are no longer required.
-    (closes: #436552)
-  * Don't fail when upgrading mysql-common if $datadir is empty or not defined
-    (patch from Edward Allcutt). (closes: #453127)
-  * New patch from 5.0.52 to fix mysqldump because 'null' is shown as type of
-    fields for view with bad definer. (closes: #454227)
-  * New patch from 5.0.52 to fix mysqlcheck test result.
-  * New patch from 5.0.52 to fix wrong optimization in ndb code when building
-    with gcc 4.2.x.
-  * New patch from 5.0.54 to fix wrong number output due to integer overflow
-    when building with gcc 4.2.x.
-  * New Finnish debconf translation from Esko Arajärvi. (closes: #448776)
-  * Update Basque debconf translation from Aitor Ibañez. (closes: #456193)
-  * Add Vcs-* and Homepage fields to source stanza in control file.
-  * Update mysqlreport to 3.2 release.
-  * Let mysql-server-5.0 pre-depend on debconf, because it's preinst is using
-    it.
-  * Drop menu item for innotop.
-
- -- Norbert Tretkowski <norbert@tretkowski.de>  Fri, 14 Dec 2007 09:59:36 +0100
-
-mysql-dfsg-5.0 (5.0.45-5) unstable; urgency=high
-
-  * SECURITY:
-    Fix for CVE-2007-6303: ALTER VIEW retained the original DEFINER value,
-    even when altered by another user, which could allow that user to gain the
-    access rights of the view. Now ALTER VIEW is allowed only to the original
-    definer or users with the SUPER privilege. (closes: #455737)
-  * SECURITY:
-    Fix for CVE-2007-6304: When using a FEDERATED table, the local server can
-    be forced to crash if the remote server returns a result with fewer columns
-    than expected.
-
- -- Norbert Tretkowski <norbert@tretkowski.de>  Wed, 12 Dec 2007 20:23:43 +0100
-
-mysql-dfsg-5.0 (5.0.45-4) unstable; urgency=high
-
-  * SECURITY:
-    Fix for CVE-2007-5969: Using RENAME TABLE against a table with explicit
-    DATA DIRECTORY and INDEX DIRECTORY options can be used to overwrite system
-    table information by replacing the file to which the symlink points.
-    (closes: #455010)
-
- -- Norbert Tretkowski <norbert@tretkowski.de>  Sun, 09 Dec 2007 12:29:54 +0100
-
-mysql-dfsg-5.0 (5.0.45-3) unstable; urgency=high
-
-  * SECURITY:
-    Fix for CVE-2007-5925: The convert_search_mode_to_innobase function in
-    ha_innodb.cc in the InnoDB engine in MySQL 5.1.23-BK and earlier allows
-    remote authenticated users to cause a denial of service (database crash)
-    via a certain CONTAINS operation on an indexed column, which triggers an
-    assertion error. (closes: #451235)
-
- -- Norbert Tretkowski <norbert@tretkowski.de>  Thu, 15 Nov 2007 18:40:11 +0100
-
-mysql-dfsg-5.0 (5.0.45-2) unstable; urgency=low
-
-  * Package is now team-maintained. (closes: #421026)
-
-  [ Sean Finney ]
-  * New/updated debconf translations:
-    - Spanish, from Javier Fernández-Sanguino Peña (closes: #426442).
-    - German, from Alwin Meschede (closes: #426545).
-    - Danish, from Claus Hindsgaul (closes: #426783).
-    - French, from Christian Perrier (closes: #430944).
-  * Add Recommends on libterm-readkey-perl for mysql-client-5.0 package, used
-    by mysqlreport add-on to mask password entry (closes: #438375).
-
-  [ Norbert Tretkowski ]
-  * Add myself to uploaders.
-  * Suggest usage of an update statement on the user table to change the mysql
-    root user password instead using mysqladmin, to catch all root users from
-    all hosts. (closes: #435744)
-  * Remove informations about a crash in the server during flush-logs when
-    having expire_logs_days enabled but log-bin not, this bug was fixed in
-    5.0.32 already. (closes: #368547)
-  * Disable log_bin option in default config file and add a note to the NEWS
-    file. (closes: #349661)
-  * Fix FTBFS if build twice in a row. (closes: #442684)
-  * Remove check for buggy options from init script.
-  * Update innotop to 1.6.0 release.
-  * Add mysqlreport and innotop to mysql-client description.
-  * Use shorter server version string.
-
- -- Norbert Tretkowski <norbert@tretkowski.de>  Wed, 14 Nov 2007 20:00:06 +0100
-
-mysql-dfsg-5.0 (5.0.45-1) unstable; urgency=low
-
-  * New upstream release.
-
-  [sean finney]
-  * removed patches that are incorporated into the latest release:
-    - 70_cpuid_on_i486.dpatch
-    - 91_SECURITY_CVE-2007-2691_alter-drop
-  * new patch 90_upstreamdebiandir.dpatch to keep a few lingering references
-    to the upstream ./debian dir out of the build, at least until we find
-    a nice way to collaborate on sharing the directory.
-  * updated CRUFT list to fix double-build breakage (closes: #424590).
-  * add conditional build-deps for linux-libc-dev to fix FTBFS for
-    non-linux arch's (closes: #431018).
-  * added notes to my.cnf and README.Debian about setting tmpdir when
-    configuring a replication slave.  thanks to Rudy Gevaert for pointing
-    this out (closes: #431825).
-
- -- sean finney <seanius@debian.org>  Tue, 17 Jul 2007 23:50:33 +0200
-
-mysql-dfsg-5.0 (5.0.41a-1) unstable; urgency=high
-
-  [sean finney]
-  * SECURITY:
-    Fix for CVE-2007-2691: DROP/RENAME TABLE statements (closes: #424778).
-  [Christian Hammers]
-  * Removed all manpages from the source (therefore the "41a") as they 
-    are not licensed under the GPL and redistribution is not permitted
-    (thanks to Mathias Gug). Closes: #430018
-  * Added linux-libc-dev to the build-depends as else an illegal dependency to
-    asm/atomic.h is generated in /usr/include/mysql/my_global.h. Closes: 424276
-  [Christian Perrier]
-  * Debconf templates and debian/control reviewed by the debian-l10n-
-    english team as part of the Smith review project. Closes: #419974
-  * Debconf translation updates:
-    - French. Closes: #422187
-    - Galician. Closes: #420118
-    - Italian. Closes: #421349
-    - Brazilian Portuguese. Closes: #421516
-    - Arabic. Closes: #421751
-    - Czech. Closes: #421766
-    - Portuguese. Closes: #422428
-
- -- Christian Hammers <ch@debian.org>  Sun, 24 Jun 2007 21:12:42 +0200
-
-mysql-dfsg-5.0 (5.0.41-2) unstable; urgency=low
-
-  * the previous "translation changes" inadvertently introduced unrelated
-    changes in the package control file.
-
- -- sean finney <seanius@debian.org>  Sun, 13 May 2007 12:32:45 +0200
-
-mysql-dfsg-5.0 (5.0.41-1) unstable; urgency=low
-
-  * New upstream release
-  [sean finney]
-  * Bump the priority of the debconf prompt for the root password to high, to 
-    ensure the question shows up in a default installation (closes: #418672).
-  * Debconf templates and debian/control reviewed by the debian-l10n-
-    english team as part of the Smith review project. Closes: #419974
-  * Debconf translation updates:
-    - French. Closes: #422187
-    - Galician. Closes: #420118
-    - Italian. Closes: #421349
-    - Brazilian Portuguese. Closes: #421516
-    - Arabic. Closes: #421751
-    - Czech. Closes: #421766
-    - Portuguese. Closes: #422428
-  * massaged the local PATH_MAX patch.
-  * removed temp sql parsing patch which has been incorporated upstream
-  * upstream no longer includes the mysql_create_system_tables command,
-    so removed our local patches for it.
-  * the following issues may have been fixed in a previous version of
-    mysql-server-5.0, but the exact version is not clear so they will be
-    marked as fixed in this version. 
-  * lots of NDB-related fixes, including those related to problems with
-    AUTO_INCREMENT (closes: #310878).
-  * fix for "connections remaining in sleep state" (closes: #318011).
-  * fix for "denies queries randomly" (closes: #399602).
-  * problems indexing on char() binary fields were ISAM specific, which is
-    no longer supported (closes: #326698).
-  * fix for problems with "complicated joins" (closes: 348682).
-  * fix for problems with "flushing logs, server crash" (closes: #348682).
-  * fix for AUTO_INCREMENT and duplicate keys (closes: #416145).
-  * fix for "DROP FUNCTIONS doesn't work" (closes: #290670).
-
- -- sean finney <seanius@debian.org>  Sat, 12 May 2007 12:10:20 +0200
-
-mysql-dfsg-5.0 (5.0.38-3) unstable; urgency=low
-
-  * Added innotop. 
-  * Changed maintainer email address to
-    pkg-mysql-commits@lists.alioth.debian.org 
-
- -- Christian Hammers <ch@debian.org>  Thu, 19 Apr 2007 19:21:15 +0200
-
-mysql-dfsg-5.0 (5.0.38-2) unstable; urgency=high
-
-  * SECURITY:
-    In some previous versions mysql_install_db was not idempotent and did
-    always create passwordless root accounts although it should only on
-    initial installs (thanks to Olaf van der Spek). Closes: #418672
-  * Added check for passwordless root accounts to debian-start.
-  * As MySQL-5.0 is, at least currently, incompatible with Kernel 2.4 the
-    installation is aborted for such old kernels. Debian Etch does not support
-    them anyway according to the release notes but this might be unexpected
-    and many production servers still have self build ones installed (thanks
-    to Marc-Christian Petersen). See: #416841
-  * Adjusted TeX build-deps to texlive.
-
- -- Christian Hammers <ch@debian.org>  Tue, 17 Apr 2007 01:00:41 +0200
-
-mysql-dfsg-5.0 (5.0.38-1) unstable; urgency=low
-
-  * New upstream release.
-  * Activated the blackhole engine as it's needed for replicating partition
-    designs (thanks to Cyril SCETBON). 
-  * Fixed segfault on i486 systems without cpuid instruction (thanks to
-    Lennart Sorensen). Closes: #410474
-  * Only use of the non-essential debconf package in postrm if it is still
-    installed (thanks to Michael Ablassmeier). Closes: #416838
-
- -- Christian Hammers <ch@debian.org>  Thu,  5 Apr 2007 22:43:41 +0200
-
-mysql-dfsg-5.0 (5.0.36-1) unstable; urgency=low
-
-  * New upstream release.
-    Closes: #400460, #408159, #408533
-
- -- Christian Hammers <ch@debian.org>  Thu, 22 Mar 2007 22:16:31 +0100
-
-mysql-dfsg-5.0 (5.0.32-10) unstable; urgency=high
-
-  * Really fixed FTBFS on Sparc introduced with the "make -j" trick in 
-    5.0.32-8 (thanks to Frank Lichtenheld). Closes: #415026
-
- -- Christian Hammers <ch@debian.org>  Sun, 18 Mar 2007 20:52:33 +0100
-
-mysql-dfsg-5.0 (5.0.32-9) unstable; urgency=high
-
-  * Fixed FTBFS on Sparc introduced with the "make -j" trick in 5.0.32-8
-    (thanks to Frank Lichtenheld). Closes: #415026
-
- -- Christian Hammers <ch@debian.org>  Tue, 15 Mar 2007 18:55:42 +0100
-
-mysql-dfsg-5.0 (5.0.32-8) unstable; urgency=high
-
-  [Sean Finney]
-  * SECURITY:
-    - CVE-2007-1420: Single Row Subselect DoS.  Specially crafted subselect
-      queries could crash the mysql server.  Patch backported from upstream
-      changeset 19685 (46_CVE-2007-1420_subselect_dos.dpatch) 
-      closes: #414790.
-  [Christian Hammers]
-  * Adapt MAKE_J to use the -j option with the number of available processors.
-    (thanks to Raphael Pinson).
-  * Updated mysqlreport to latest upstream (and patched --help usage message
-    and "return if qcache_size==0").
-
- -- sean finney <seanius@debian.org>  Wed, 14 Mar 2007 20:19:08 +0100
-
-mysql-dfsg-5.0 (5.0.32-7) unstable; urgency=low
-
-  * Updated French Debconf translation (thanks to Christian Perrier).
-    Closes: #411330
-  * Updated Danish Debconf translation (thanks to Claus Hindsgaul).
-    Closes: #411328
-  * Updated Portuguese Debconf translation (thanks to "Traduz").
-    Closes: #411339
-  * Updated Czech Debconf translation (thanks to Miroslav Kure).
-    Closes: #411341
-  * Added Norwegian Debconf translation (thanks to Bjorn Steensrud).
-    Closes: #411345
-  * Updated Spanish Debconf translation (thanks to Javier Fernandez-Sanguino
-    Pena). Closes: #411347
-  * Updated Japanese Debconf translation (thanks to Hideki Yamane).
-    Closes: #411368
-  * Updated Swedish Debconf translation (thanks to Andreas Henriksson).
-    Closes: #411370
-  * Updated Italian Debconf translation (thanks to Luca Monducci).
-    Closes: #411377
-  * Updated Galician Debconf translation (thanks to Jacobo Tarrio).
-    Closes: #411379
-  * Updated Russian Debconf translation (thanks to Yuriy Talakan).
-    Closes: #411442
-  * Updated Basque Debconf translation (thanks to Piarres Beobide).
-    Closes: #411457
-  * Updated German Debconf translation (thanks to Alwin Meschede).
-    Closes: #411480
-  * Updated Dutch Debconf translation (thanks to Thijs Kinkhorst).
-  * Updated Brazilian Portuguese translation (thanks to Andre Luis Lopes).
-    Closes: #411536
-  * Updated Romanian Debconf translation (thanks to Stan Ioan-Eugen). 
-    Closes: #411764
-
- -- Christian Hammers <ch@debian.org>  Fri, 16 Feb 2007 23:20:42 +0100
-
-mysql-dfsg-5.0 (5.0.32-6) unstable; urgency=low
-
-  * Changed wording in Debconf templates to better fit to the graphical
-    interface (thanks to Frank Kuester). Closes: #411165
-  * Lintian suggested style changes to some other Debconf questions.
-  * Removed accidently stdout output from init script.
-
- -- Christian Hammers <ch@debian.org>  Fri, 16 Feb 2007 20:29:18 +0100
-
-mysql-dfsg-5.0 (5.0.32-5) unstable; urgency=medium
-
-  * Backported upstream patch for a bug that crashed the server when using
-    certain join/group/limit combinations. 
-    Users of the Joomla CMS seemed to be affected by this. Closes: #403721
-  * The debian-start script that runs on every server start now first upgrades
-    the system tables (if neccessary) and then check them as it sometimes did
-    not work the other way around (e.g. for MediaWiki). The script now uses 
-    mysql_update instead of mysql_update_script as recommended. Closes: 409780
-  * Remove the Debconf generated config file in postrm.
-
- -- Christian Hammers <ch@debian.org>  Thu, 15 Feb 2007 04:47:04 +0100
-
-mysql-dfsg-5.0 (5.0.32-4) unstable; urgency=high
-
-  [Christian Hammers]
-  * Changed minimum required version in dh_makeshlibs to 5.0.27-1 as
-    5.0.26 had an ABI breakage in it!
-    This is the cause for Perl programs crashing with the following error: 
-    "Transactions not supported by database at /usr/lib/perl5/DBI.pm line 672"
-  * The old_passwords setting that is set according to a Debconf question is
-    now written to /etc/mysql/conf.d/old_passwords.cnf instead directly to the
-    conffile /etc/mysql/my.cnf which would be fobidden by policy (thanks to
-    Robert Bihlmeyer). Closes: #409750
-  * Added some more comments to the default my.cnf.
-  [Monty Taylor]
-  * Added bison to build dependencies.
-  * Added a "start-initial" option to the Data Node init script to support
-    initial node starts.
-  * Changed NDB Data and Management node startup seqence. Prevented both from
-    restarting on upgrade to address rolling upgrade issues.
-  * Updated build-depends to depend on automake1.9 instead of automake1.8
-    to match what upstream uses. 
-
- -- Christian Hammers <ch@debian.org>  Wed, 31 Jan 2007 01:14:09 +0100
-
-mysql-dfsg-5.0 (5.0.32-3) unstable; urgency=high
-
-  * mysql-server-5.0 pre-depends on adduser now and has --disabled-login
-    explicitly added to be on the safe side (thanks to the puiparts team).
-    Closes: #408362
-  * Corrections the terminology regarding NDB in the comments of all config
-    files and init scripts (thanks to Geert Vanderkelen of MySQL).
-  * Updated Swedish Debconf translation (thanks to Andreas Henriksson).
-    Closes: #407859
-  * Updated Czech Debconf translation (thanks to Miroslav Kure).
-    Closes: #407809
-
- -- Christian Hammers <ch@debian.org>  Thu, 11 Jan 2007 11:18:47 +0100
-
-mysql-dfsg-5.0 (5.0.32-2) unstable; urgency=high
-
-  * The last upload suffered from a regression that made NDB totally
-    unusable and caused a dependency to libmysqlclient15-dev in the
-    mysql-server-5.0 package. The relevant 85_* patch was re-added again.
-    Closes: #406435
-  * Added lintian-overrides for an error that does not affect our packages.
-    There are now only warnings and not errors left.
-
- -- Christian Hammers <ch@debian.org>  Tue,  9 Jan 2007 23:55:10 +0100
-
-mysql-dfsg-5.0 (5.0.32-1) unstable; urgency=high
-
-  * New upstream version.
-    * SECURITY: mysql_fix_privilege_tables.sql altered the 
-      table_privs.table_priv column to contain too few privileges, causing
-      loss of the CREATE VIEW and SHOW VIEW privileges. (MySQL Bug#20589)
-    * SECURITY (DoS): ALTER TABLE statements that performed both RENAME TO
-      and {ENABLE|DISABLE} KEYS operations caused a server crash. (MySQL
-      Bug#24089)
-    * SECURITY (DoS): LAST_DAY('0000-00-00') could cause a server crash.
-      (MySQL Bug#23653)
-    * SECURITY (DoS): Using EXPLAIN caused a server crash for queries that 
-      selected from INFORMATION_SCHEMA in a subquery in the FROM clause.
-      (MySQL Bug#22413)
-    * SECURITY (DoS): Invalidating the query cache (e.g. when using stored procedures) 
-      caused a server crash for INSERT INTO ... SELECT statements that 
-      selected from a view. (MySQL Bug#20045)
-    * Using mysql_upgrade with a password crashed the server. Closes: #406229
-    * yaSSL crashed on pre-Pentium Intel and Cyrix CPUs. (MySQL Bug#21765)
-      Closes: #383759
-    * Lots of small fixes to the NDB cluster storage engine.
-  * Updated Japanese Debconf template (thanks to Hideki Yamane).
-    Closes: #405793
-  * Fixed comment regarding "mycheck" in debian-start (thanks to
-    Enrico Zini). Closes: #405787
-
- -- Christian Hammers <ch@debian.org>  Sat,  6 Jan 2007 14:26:20 +0100
-
-mysql-dfsg-5.0 (5.0.30-3) unstable; urgency=low
-
-  * Updated Brazilian Debconf translation (thanks to Andre Luis Lopes).
-    Closes: #403821
-  * Added Romanian Debconf translation (thanks to Stan Ioan-Eugen).
-    Closes: #403943
-  * Updated Spanish Debconf translation (thanks to Javier Fernandez-Sanguino
-    Pena). Closes: #404084
-  * Updated Galician Debconf translation (thanks to Jacobo Tarrio).
-    Closes: #404318
-  * Updated Dutch Debconf translation (thanks to Vincent Zweije).
-    Closes: #404566
-  * Updated Danish Debconf translation (thanks to Claus Hindsgaul).
-    Closes: #405018
-
- -- Christian Hammers <ch@debian.org>  Thu, 21 Dec 2006 21:35:09 +0100
-
-mysql-dfsg-5.0 (5.0.30-2) unstable; urgency=high
-
-  * Fixed upstream regression in header files that lead to FTBFS for
-    mysql-admin, mysql-query-browser and probably other pacakges.
-    (thanks to Andreas Henriksson). Closes: #403081, #403082
-  * Fixed some upstream scripts by replacing /etc by /etc/mysql (thanks to
-    Julien Antony). Closes: #401083
-  * Updated French Debconf translation (thanks to Christian Perrier).
-    Closes: #401434
-  * Added Spanish Debconf translation (thanks to Javier Fernandez-Sanguino
-    Pena). Closes: #401953
-  * Marked a Debconf question that is just a dummy and only internally
-    used as not-needing-translation. Closes: #403163
-  * Fixed mysqlslowdump patch to not remove the usage() function (thanks 
-    to Monty Tailor).
-
- -- Christian Hammers <ch@debian.org>  Sun,  3 Dec 2006 19:20:10 +0100
-
-mysql-dfsg-5.0 (5.0.30-1) unstable; urgency=low
-
-  * New upstream version (switch to the MySQL Enterprise branch).
-  * Upstream bugfix for the Innodb performance bug:
-    "Very poor performance with multiple queries running
-     concurrently (Bug#15815)".
-  * Upstream bugfix for a possible server crash:
-    "Selecting from a MERGE table could result in a server crash if the
-     underlying tables had fewer indexes than the MERGE table itself
-     (Bug#22937)"
-  * Upstream bugfies for *lot* of NDB problems.
-  * Upstream bugfix for Innodb optimizer bug. Closes: #397597
-  * Updated Italian Debconf translation (thanks to Luca Monducci).
-    Closes: #401305 
-  * Updated debian/watch file to MySQL Enterprise branch.
-
- -- Christian Hammers <ch@debian.org>  Sat,  2 Dec 2006 16:36:38 +0100
-
-mysql-dfsg-5.0 (5.0.27-2) unstable; urgency=medium
-
-  * Disabled YaSSL x86 assembler as it was reported to crash applications
-    like pam-mysql or proftpd-mysql which are linked against libmysqlclient
-    on i486 and Cyrix (i586) CPUs. Closes: #385147
-  * Adjusted mysql-server-4.1 priority to extra and section to oldlibs
-    according to the ftp masters overrides.
-  * Updated German Debconf translation (thanks to Alwin Meschede).
-    Closes: #400809
-
- -- Christian Hammers <ch@debian.org>  Wed, 22 Nov 2006 13:36:31 +0100
-
-mysql-dfsg-5.0 (5.0.27-1) unstable; urgency=medium
-
-  * New upstream version (but no codechange, the only difference to 5.0.26
-    was a patch to the ABI change which Debian already included.
-  * When dist-upgrading from mysql-server-4.1/sarge dpkg does not longer
-    ask unnecessary "config file has changed" questions regarding
-    /etc/init.d/mysql, /etc/logrotate.d/mysql-server and
-    /etc/mysql/debian-start just because these files previously belonged
-    to mysql-server-4.1 and not to mysql-server-5.0.
-    To archive this mysql-server-5.0 now pre-depends on mysql-common which
-    provides current versions of those files.
-  * The automatic run mysql_upgrade now works with non-standard datadir
-    settings, too (thanks to Benjami Villoslada). Closes: #394607
-  * Debconf now asks if the old_passwords option is really needed.
-  * Improved explanations of the old_passwords variable in my.cnf.
-  * Removed possibly leftover cron script from MySQL-4.1 (thanks to
-    Mario Oyorzabal Salgado). Closes: #390889
-  * Postrm ignores failed "userdel mysql".
-  * Updated Danish Debconf translation (thanks to Claus Hindsgaul).
-    Closes: #398784
-  * Added Euskarian Debconf translation (thanks to Piarres Beobide).
-    Closes: #399045
-  * Updated Japanese Debconf translation (thanks to Hideki Yamane).
-    Closes: #399074
-  * Updated German Debconf translation (thanks to Alwin Meschede).
-    Closes: #399087
-  * New Portuguese debconf translations from Miguel Figueiredo. 
-    Closes: #398186
-
- -- Christian Hammers <ch@debian.org>  Tue,  7 Nov 2006 21:26:25 +0100
-
-mysql-dfsg-5.0 (5.0.26-3) unstable; urgency=high
-
-  [sean finney]
-  * Fix for the deadly ISAM trap.  Now during upgrades we will do our
-    very best to convert pre-existing ISAM format tables using the
-    binaries from the previous package.  Success is not guaranteed, but
-    this is probably as good as it gets.  Note that this also necessitates
-    re-introducing an (empty transitional) mysql-server-4.1 package.
-    Closes: #354544, #354850
-  * Remove a couple spurious and wrongly placed WARNING statements from
-    45_warn-CLI-passwords.dpatch.  thanks to Dan Jacobsen for pointing these
-    out.  Closes: #394262
-
- -- sean finney <seanius@debian.org>  Fri, 03 Nov 2006 18:34:46 +0100
-
-mysql-dfsg-5.0 (5.0.26-2) unstable; urgency=high
-
-  * Fixed FTBFS for Alpha by applying an upstream patch (thanks to Falk
-    Hueffner). Closes: #395921
-
- -- Christian Hammers <ch@debian.org>  Sat, 28 Oct 2006 20:13:46 +0200
-
-mysql-dfsg-5.0 (5.0.26-1) unstable; urgency=high
-
-  * SECURITY: 
-    This combined release of 5.0.25 and 5.0.26 fixes lot of possible server
-    crashs so it should get into Etch. Quoting the changelog (bug numbers are
-    bugs.mysql.com ones):
-    - character_set_results can be NULL to signify no conversion, but some
-      code did not check for NULL, resulting in a server crash. (Bug#21913)
-    - Using cursors with READ COMMITTED isolation level could cause InnoDB to
-      crash. (Bug#19834)
-    - Some prepared statements caused a server crash when executed a second
-      time. (Bug#21166)
-    - When DROP DATABASE or SHOW OPEN TABLES was issued while concurrently 
-      issuing DROP TABLE (or RENAME TABLE, CREATE TABLE LIKE or any other 
-      statement that required a name lock) in another connection, the server 
-      crashed. (Bug#21216)
-    - Use of zero-length variable names caused a server crash. (Bug#20908)
-    - For InnoDB tables, the server could crash when executing NOT IN () 
-      subqueries. (Bug#21077) 
-    - Repeated DROP TABLE statements in a stored procedure could sometimes
-      cause the server to crash. (Bug#19399)
-    - Performing an INSERT on a view that was defined using a SELECT that 
-      specified a collation and a column alias caused the server to crash 
-      (Bug#21086).
-    - A query of the form shown here caused the server to crash. (Bug#21007)
-    - NDB Cluster: Some queries involving joins on very large NDB tables could
-      crash the MySQL server. (Bug#21059)
-    - The character set was not being properly initialized for CAST() with a
-      type like CHAR(2) BINARY, which resulted in incorrect results or even a 
-      server crash. (Bug#17903)
-    - For certain queries, the server incorrectly resolved a reference to an
-      aggregate function and crashed. (Bug#20868)
-    - The server crashed when using the range access method to execut a
-      subquery with a ORDER BY DESC  clause. (Bug#20869)
-    - Triggers on tables in the mysql database caused a server crash. Triggers
-      for tables in this database now are disallowed. (Bug#18361)
-    - Using SELECT on a corrupt MyISAM table using the dynamic record format 
-      could cause a server crash. (Bug#19835) 
-    - Use of MIN() or MAX()  with GROUP BY on a ucs2  column could cause a
-      server crash. (Bug#20076)
-    - Selecting from a MERGE table could result in a server crash if the
-      underlying tables had fewer indexes than the MERGE table itself. 
-      (Bug#21617, Bug#22937)
-
-  * New upstream release.
-    - This bug would cause trouble for Sarge->Etch upgrades, it was supposed to
-      have been fixed in 5.0.16 but that apparently did not fix the whole
-      problem:
-      Using tables from MySQL 4.x in MySQL 5.x, in particular those with VARCHAR
-      fields and using INSERT DELAYED to update data in the table would result in
-      either data corruption or a server crash. (Bug#16611, Bug#16218, Bug#17294) 
-      Closes: #386337
-    - Fixes data corruption as an automatic client reconnect used to set
-      the wrong character set. Closes: #365050
-    - Fixes an undefined ulong type in an include file. Closes: #389102
-    - Fixes wrong output format when using Unicode characters. Closes: #355302
-    - Fixes mysql_upgrade when using a password. Closes: #371841
-  [Christian Hammers]
-  * Removed --sysconfdir from debian/rules as it puts /etc/mysql/ at the
-    end of the my.cnf search patch thus overriding $HOME/my.cnf
-    (thanks to Christoph Biedl). Closes: #394992
-  * The provided patch from bug #385947 was wrong, the variable is called
-    BLOCKSIZE not BLOCK_SIZE according to "strings `which df`" (thanks to
-    Bruno Muller). Closes: #385947
-
-  [sean finney]
-  * new dutch debconf translations from Vincent Zweije (closes: #392809).
-  * new japanese debconf translations from Hideki Yamane (closes: #391625).
-  * new italian debconf translations from Luca Monducci (closes: #391741).
-  * new french debconf translations from Christian Perrier (closes: #393334).
-  * ran debconf-updatepo to merge the fuzzies into svn.
-  * massage the following patches so they continue to apply cleanly:
-    - 44_scripts__mysql_config__libs.dpatch to cleanly apply.
-    - 45_warn-CLI-passwords.dpatch
-    - 96_TEMP__libmysqlclient_ssl_symbols.dpatch (note, this patch might
-      no longer be needed, but is retained "just in case" after massaging it)
-  * the following patches have been incorporated upstream:
-    - 70_kfreebsd.dpatch
-    - 80_hurd_mach.dpatch
-    - 87_ps_Hurd.dpatch
-    - 90_TEMP__client__mysql_upgrade__O_EXEC.dpatch
-    - 91_TEMP__client__mysql_upgrade__password.dpatch
-    - 92_TEMP__client__mysql_upgrade__defaultgroups.dpatch
-    - 94_TEMP__CVE-2006-4227.dpatch
-    - 95_TEMP__CVE-2006-4226.dpatch
-  * the udf_example.cc has disappeared from the source code, but there's
-    a udf_example.c which seems to be a good example to use instead :)
-  * update documentation in the configuration to no longer reference
-    using my.cnf in the DATADIR, as it's never been the recommended
-    method for debian systems and hasn't worked since 5.0 was released
-    anyway (closes: #393868).
-
- -- Christian Hammers <ch@debian.org>  Wed, 25 Oct 2006 19:54:04 +0200
-
-mysql-dfsg-5.0 (5.0.24a-9) unstable; urgency=medium
-
-  * Having expire_logs_days enabled but log-bin not crashes the server. Using
-    both or none of those options is safe. To prevent this happening during the 
-    nightly log rotation via /etc/logrotate.d/mysql the initscript checks for 
-    malicious combination of options. See: #368547
-  * The Sarge package "mysql-server" which used to include the mysqld daemon
-    may still be in unselected-configured state (i.e. after a remove but not
-    purge) in which case its now obsolete cronscript has to be moved away
-    (thanks to Charles Lepple). Closes: #385669
-  * Updated Danish Debconf translation (thanks to Claus Hindsgaul).
-    Closes: #390315
-  * Updated Frensh Debconf translation (thanks to Christian Perrier).
-    Closes: #390980
-
- -- Christian Hammers <ch@debian.org>  Tue,  3 Oct 2006 14:55:31 +0200
-
-mysql-dfsg-5.0 (5.0.24a-8) unstable; urgency=low
-
-  * (broken upload)
-
- -- Christian Hammers <ch@debian.org>  Tue,  3 Oct 2006 14:55:31 +0200
-
-mysql-dfsg-5.0 (5.0.24a-7) unstable; urgency=low
-
-  * Stopped mysql_config from announcing unnecessary library dependencies
-    which until now cause "NEEDED" dependencies in the "readelf -d" output
-    of libraries who only depend on libmysqlclient.so (thanks to Michal
-    Cihar). Closes: #390692
-
- -- Christian Hammers <ch@debian.org>  Sun,  1 Oct 2006 23:59:43 +0200
-
-mysql-dfsg-5.0 (5.0.24a-6) unstable; urgency=low
-
-  [sean finney]
-  * finally add support for setting a root password at install.
-    while this is not a random password as requested in one bug
-    report, we believe it is the best solution and provides a
-    means to set a random password via preseeding if it's really
-    desired (Closes: #316127, #298295).
-
- -- sean finney <seanius@debian.org>  Sun, 01 Oct 2006 23:34:30 +0200
-
-mysql-dfsg-5.0 (5.0.24a-5) unstable; urgency=low
-
-  * Added ${shlibs:Depends} to debian/control section libmysqlclient-dev as it
-    contains the experimental /usr/lib/mysql/libndbclient.so.0.0.0.
-  * Bumped standards version to 3.7.2.
-  * Added LSB info section to init scripts.
-  * Rephrased Debconf templates as suggested by lintian.
-  * Added benchmark suite in /usr/share/mysql/sql-bench/.
-  * The mysql.timezone* tables are now filled by the postinst script (thanks
-    to Mark Sheppard). Closes: #388491
-  * Moved Debconf install notes to README.Debian. Displaying them with
-    medium priority was a bug anyway. Closes: #388941
-  * Replaced /usr/bin/mysql_upgrade by /usr/bin/mysql_upgrade_shell in
-    /etc/mysql/debian-start.sh as it works without errors (thanks to Javier
-    Kohen). Closes: #389443
-
- -- Christian Hammers <ch@debian.org>  Wed, 20 Sep 2006 15:01:42 +0200
-
-mysql-dfsg-5.0 (5.0.24a-4) unstable; urgency=high
-
-  * libmysqlclient.so.15 from 5.0.24 accidentaly exports some symbols that are
-    historically exported by OpenSSL's libcrypto.so. This bug was supposed to
-    be fixed in 5.0.24a bug according to the mysql bug tracking system will
-    only be fixed in 5.0.25 so I backported the patch. People already reported
-    crashing apps due to this (thanks to Duncan Simpson). See also: #385348
-    Closes: #388262
-  * Fixed BLOCKSIZE to BLOCK_SIZE in initscript (thanks to Bruno Muller).
-    Closes: #385947
-  * Added hint to "--extended-insert=0" to mysqldump manpage (thanks to Martin
-    Schulze).
-  * Documented the meaning of "NDB" in README.Debian (thanks to Dan Jacobson).
-    Closes: #386274
-  * Added patch to build on hurd-i386 (thanks to Cyril Brulebois). Closes: #387369
-  * Fixed debian-start script to work together with the recend LSB modifications in
-    the initscript (thanks to wens). Closes: #387481
-  * Reverted tmpdir change in my.cnf back to /tmp to comply with FHS (thanks
-    to Alessandro Valente). Closes: #382778
-  * Added logcheck filter rule (thanks to Paul Wise). Closes: #381043
-  * I will definetly not disable InnoDB but added a note to the default my.cnf
-    that disabling it saves about 100MB virtual memory (thanks to Olivier
-    Berger). Closes: #384399
-  * Added thread_cache_size=8 to default my.cnf as this variable seems to have
-    a negligible memory footprint but can improve performance when lots of
-    threads connect simultaneously as often seen on web servers.
-
- -- Christian Hammers <ch@debian.org>  Mon,  4 Sep 2006 00:21:50 +0200
-
-mysql-dfsg-5.0 (5.0.24a-3) unstable; urgency=low
-
-  * Fixed potential tempfile problem in the newly added mysqlreport script.
-
- -- Christian Hammers <ch@debian.org>  Sun,  3 Sep 2006 23:17:24 +0200
-
-mysql-dfsg-5.0 (5.0.24a-2) unstable; urgency=low
-
-  * Added "mysqlreport" (GPL'ed) from hackmysql.com.
-  * Temporarily disabled expire_days option as it causes the server
-    to crash. See #368547
-  * Made output of init scripts LSB compliant (thanks to David Haerdeman).
-    Closes: #385874
-
- -- Christian Hammers <ch@debian.org>  Sun,  3 Sep 2006 19:06:53 +0200
-
-mysql-dfsg-5.0 (5.0.24a-1) unstable; urgency=high
-
-  * New upstream version.
-  * The shared library in the 5.0.24 upstream release accidently exported 
-    some symbols that are also exported by the OpenSSL libraries (notably
-    BN_bin2bn) causing unexpected behaviour in applications using these 
-    functions (thanks to Peter Cernak). Closes: #385348
-  * Added note about possible crash on certain i486 clone CPUs.
-  * Made recipient address of startup mysqlcheck output configurable
-    (thanks to Mattias Guns). Closes: #385119
-
- -- Christian Hammers <ch@debian.org>  Mon, 28 Aug 2006 01:22:12 +0200
-
-mysql-dfsg-5.0 (5.0.24-3) unstable; urgency=high
-
-  * SECURITY:
-    CVE-2006-4226:
-    When run on case-sensitive filesystems, MySQL allows remote
-    authenticated users to create or access a database when the database 
-    name differs only in case from a database for which they have
-    permissions.
-    CVE-2006-4227:
-    MySQL evaluates arguments of suid routines in the security context of
-    the routine's definer instead of the routine's caller, which allows
-    remote authenticated users to gain privileges through a routine that 
-    has been made available using GRANT EXECUTE.
-    Thanks to Stefan Fritsch for reporting. Closes: #384798
-
- -- Christian Hammers <ch@debian.org>  Sat, 26 Aug 2006 04:55:17 +0200
-
-mysql-dfsg-5.0 (5.0.24-2) unstable; urgency=high
-
-  * 5.0.24-1 introduced an ABI incompatibility, which this patch reverts.
-    Programs compiled against 5.0.24-1 are not compatible with any other
-    version and needs a rebuild.
-    This bug already caused a lot of segfaults and crashes in various 
-    programs. Thanks to Chad MILLER from MySQL for quickly providing a patch.
-    The shlibdeps version has been increased to 5.0.24-2.
-    Closes: #384047, #384221, #383700
-
- -- Christian Hammers <ch@debian.org>  Fri, 25 Aug 2006 21:47:35 +0200
-
-mysql-dfsg-5.0 (5.0.24-1) unstable; urgency=high
-  * SECURITY: Upstream fixes a security bug which allows a user to continue
-    accessing a table using a MERGE TABLE after the right to direct access to
-    the database has been revoked (CVE-2006-4031, MySQL bug #15195).
-    (Well they did not exactly fixed it, they documented the behaviour and
-    allow the admin to disable merge table alltogether...). Closes: #380271
-  * SECURITY: Applied patch that fixes a possibly insecure filehandling
-    in the recently added mysql_upgrade binary file (MySQL bug #10320).
-  * New upstream version.
-    - Fixes nasty MySQL bug #19618 that leads to crashes when using
-      "SELECT ... WHERE ... not in (1, -1)" (e.g. vbulletin was affected).
-    - Fixes upstream bug #16803 so that linking ~/.mysql_history to /dev/null
-      now has the desired effect of having no history.
-  * Really fixed the runlevels. Closes: #377651
-  * Added patch for broken upstream handling of "host=" to mysql_upgrade.c.
-  * Adjusted /etc/mysql/debian-start to new mysql_upgrade.c
-
- -- Christian Hammers <ch@debian.org>  Tue,  8 Aug 2006 00:44:13 +0200
-
-mysql-dfsg-5.0 (5.0.22-5) unstable; urgency=low
-
-  * Added further line to the logcheck ignore files (thanks to Paul Wise).
-    Closes: #381038
-
- -- Christian Hammers <ch@debian.org>  Wed,  2 Aug 2006 00:28:50 +0200
-
-mysql-dfsg-5.0 (5.0.22-4) unstable; urgency=low
-
-  * Upstream fixes a bug in the (never released) version 5.0.23 which could
-    maybe used to crash the server if the mysqlmanager daemon is in use
-    which is not yet the default in Debian. (CVE-2006-3486 *DISPUTED*)
-  * Changed runlevel priority of mysqld from 20 to 19 so that it gets started
-    before apache and proftpd etc. which might depend on an already running
-    database server (thanks to Martin Gruner). Closes: #377651
-  * Added patch which sets PATH_MAX in ndb (thanks to Cyril Brulebois).
-    Closes: #378949
-  * Activated YaSSL as licence issues are settled according to:
-    http://bugs.mysql.com/?id=16755. This also closes the FTBFS bug
-    regarding OpenSSL as it is discouraged to use now. Closes: #368639
-  * Removed SSL-MINI-HOWTO as the official documentation is good enough now.
-  * mysql_upgrade no longer gives --password on the commandline which would
-    be insecure (thanks to Dean Gaudet). Closes: #379199
-  * Adjusted debian/patches/45* to make consecutive builds in the same source
-    tree possible (thanks to Bob Tanner). Closes: #368661
-  * mysql-server-5.0 is now suggesting tinyca as yaSSL is enabled and tinyca
-    was found to be really cool :)
-  * Moved tempdir from /tmp to /var/tmp as it will more likely have enough
-    free space as /tmp is often on the root partition and /var or at least
-    /var/tmp is on a bigger one.
-
- -- Christian Hammers <ch@debian.org>  Mon, 10 Jul 2006 23:30:26 +0200
-
-mysql-dfsg-5.0 (5.0.22-3) unstable; urgency=low
-
-  * Added patch for MySQL bug #19618: "select x from x
-    where x not in(1,-1)" may crash the server" (thanks to
-    Ruben Puettmann).
-
- -- Christian Hammers <ch@debian.org>  Fri,  9 Jun 2006 01:41:44 +0200
-
-mysql-dfsg-5.0 (5.0.22-2) unstable; urgency=high
-
-  * Fixed debian-sys-maint related bug in postinst (thanks to
-    Jean-Christophe Dubacq). Closes: #369970
-  * The last upload was a security patch (which I did not know as I
-    uploaded before the announcement came). I now added the CVE id for
-    reference and set urgency to high as the last entry did not.
-
- -- Christian Hammers <ch@debian.org>  Wed, 31 May 2006 01:04:11 +0200
-
-mysql-dfsg-5.0 (5.0.22-1) unstable; urgency=low
-
-  * SECURITY: This upstream release fixes an SQL-injection with multibyte 
-    encoding problem. (CVE-2006-2753)
-  * New upstream release.
-  * Upstream fixes REPAIR TABLE problem. Closes: #354300
-  * Upstream fixes problem that empty strings in varchar and text columns
-    are displayed as NULL. Closes: #368663
-
- -- Christian Hammers <ch@debian.org>  Tue, 30 May 2006 23:43:24 +0200
-
-mysql-dfsg-5.0 (5.0.21-4) unstable; urgency=low
-
-  * Added "BLOCKSIZE=" to the diskfree check (thanks to Farzad FARID).
-    Closes: #367027, #367083
-  * Further fixed mysql_upgrade upstream script (thanks to Andreas Pakulat)
-    Closes: #366155
-  * Adjusted the /proc test in debian/rules from /proc/1 to /proc/self
-    to make building on grsec systems possible (thanks to K. Rosenegger).
-    Closes: #366824
-  * Updated Russion Debconf translation (thanks to Yuriy Talakan).
-    Closes: #367141
-  * Updated Czech Debconf translation (thanks to Kiroslav Kure).
-    Closes: #367160
-  * Updated Galician Debconf translation (thanks to Jacobo Tarrio).
-    Closes: #367384
-  * Updated Swedish Debconf translation (thanks to Daniel Nylander).
-    Closes: #368186
-
- -- Christian Hammers <ch@debian.org>  Wed, 10 May 2006 08:45:42 +0200
-
-mysql-dfsg-5.0 (5.0.21-3) unstable; urgency=low
-
-  * Fixed FTBFS problem which was caused by a patch that modifies Makefile.am
-    as well as Makefile.in and was not deteced because my desktop was fast
-    enough to patch both files within the same second and so fooled automake.
-    (thanks to Blars Blarson for notifying me). Closes: #366534
-
- -- Christian Hammers <ch@debian.org>  Sat,  6 May 2006 19:03:58 +0200
-
-mysql-dfsg-5.0 (5.0.21-2) unstable; urgency=low
-
-  * Fixed bug in postinst that did not correctly rewrite 
-    /etc/mysql/debian.cnf (thanks to Daniel Leidert). 
-    Closes: #365433, #366155
-
- -- Christian Hammers <ch@debian.org>  Thu,  4 May 2006 02:37:03 +0200
-
-mysql-dfsg-5.0 (5.0.21-1) unstable; urgency=high
-
-  * SECURITY: New upstream release with some security relevant bugfixes:
-    * "Buffer over-read in check_connection with usernames lacking a
-      trailing null byte" (CVE-2006-1516)
-    * "Anonymous Login Handshake - Information Leakage" (CVE-2006-1517)
-    * "COM_TABLE_DUMP Information Leakage and Arbitrary command execution"
-       (CVE-2006-1518)
-    Closes: #365938, #365939
-  * Added diskfree check to the init script (thanks to Tim Baverstock).
-    Closes: #365460
-  * First amd64 upload!
-
- -- Christian Hammers <ch@debian.org>  Sat, 29 Apr 2006 04:31:27 +0200
-  
-mysql-dfsg-5.0 (5.0.20a-2) unstable; urgency=low
-
-  * The new mysql-upgrade which is started from /etc/mysql/debian-start
-    does now use the debian-sys-maint user for authentication (thanks to
-    Philipp). Closes: #364991
-  * Wrote patch debian/patches/43* which adds a password option to
-    mysql_update. See MySQL bug #19400.
-  * Added "Provides: libmysqlclient-dev" to libmysqlclient15-dev as I saw no
-    obvious reasons against it (problems should be documented in
-    debian/README.Maintainer!) (thanks to Olaf van der Spek). Closes: #364899
-  * Updated Netherlands debconf translation (thanks to Vincent Zweije)
-    Closes: #364464
-  * Updated French debconf translation (thanks to Christian Perrier)
-    Closes: #364401
-  * Updated Danish debconf translation (thanks to Claus Hindsgaul)
-    Closes: #365135
-
- -- Christian Hammers <ch@debian.org>  Wed, 26 Apr 2006 01:14:53 +0200
-
-mysql-dfsg-5.0 (5.0.20a-1) unstable; urgency=low
-
-  * New upstream release.
-  * Added the new mysql_upgrade script and added it to
-    /etc/mysql/debian-start (thanks to Alessandro Polverini). 
-    The script is currently very noise that is a known bug and will be
-    fixed in the next release!
-    Closes: #363458
-  * No longer creates the "test" database. This actuallay had been tried
-    to archive before (at least patches) exists but apparently was not the
-    case in the last versions (thanks to Olaf van der Spek). Closes: #362126
-  * Reformatted libmysqlclient15off.NEWS.Debian to changelog format
-    (thanks to Peter Palfrader). Closes: #363062
-
- -- Christian Hammers <ch@debian.org>  Sat, 15 Apr 2006 13:05:22 +0200
-
-mysql-dfsg-5.0 (5.0.20-1) unstable; urgency=high
-
-  * Upstream contains a fix for a nasty bug (MySQL#18153) that users 
-    already experienced and that caused corrupted triggers after
-    REPAIR/OPTIMIZE/ALTER TABLE statements.
-    (thanks to Jerome Despatis for pointing out)
-  * Added patch for the "updates on multiple tables is buggy after 
-    upgrading from 4.1 to 5.0" problem which MySQL has been committed
-    for the upcoming 5.0.21 release. Closes #352704
-  * Added Netherlands debconf translation (thanks to Vincent Zweije).
-    Closes: #360443
-  * Added Galician debconf translation (thanks to Jacobo Tarrio).
-    Closes: #361257
-
- -- Christian Hammers <ch@debian.org>  Fri,  7 Apr 2006 00:00:43 +0200
-
-mysql-dfsg-5.0 (5.0.19-3) unstable; urgency=high
-
-  [ Christian Hammers ]
-  * Fixed libmysqlclient15.README.Debian regarding package name changes
-    (thanks to Leppo).
-  * Moved libheap.a etc. back to /usr/lib/mysql/ as their names are just
-    too generic. Closes: #353924
-  [ Sean Finney ]
-  * updated danish debconf translation, thanks to Claus Hindsgaul
-    (closes: #357424).
-  [ Adam Conrad ]
-  * Send stderr from 'find' in preinst to /dev/null to tidy up chatter.
-  * Backport patch for CVE-2006-0903 from the upcoming release to resolve
-    a log bypass vulnerability when using non-binary logs (closes: #359701)
-
- -- Adam Conrad <adconrad@0c3.net>  Tue,  4 Apr 2006 15:23:18 +1000
-
-mysql-dfsg-5.0 (5.0.19-2) unstable; urgency=medium
-
-  * New upstream release.
-  * Renamed package libmysqlclient15 to libmysqlclient15off due to
-    binary incompatible changes.
-    See /usr/share/doc/libmysqlclient15off/README.Debian
-  * Updated Czech debconf translation (thanks to Miroslav Kure).
-    Closes: #356503
-  * Updated French debconf translation (thanks to Christian Perrier).
-    Closes: #356332
-  * Improved README.Debian (thanks to Olaf van der Spek). Closes: #355702
-  * Fixed 5.0.18-8 changelog by saying in which package the NEWS.Debian
-    file is (thanks to Ross Boylan). Closes: #355978
-
- -- Christian Hammers <ch@debian.org>  Fri, 17 Mar 2006 02:32:19 +0100
-
-mysql-dfsg-5.0 (5.0.19-1) experimental; urgency=medium
-
-  * New upstream release.
-  * SECURITY: CVE-2006-3081: A bug where str_to_date(1,NULL) lead to a 
-    server crash has been fixed. 
-    (this note has been added subsequently for reference)
-  * Renamed package libmysqlclient15 to libmysqlclient15off.
-    See /usr/share/doc/libmysqlclient15off/NEWS.Debian
-  * Updated Czech debconf translation (thanks to Miroslav Kure).
-    Closes: #356503
-  * Updated French debconf translation (thanks to Christian Perrier).
-    Closes: #356332
-  * Improved README.Debian (thanks to Olaf van der Spek). Closes: #355702
-  * Fixed 5.0.18-8 changelog by saying in which package the NEWS.Debian
-    file is (thanks to Ross Boylan). Closes: #355978
-
- -- Christian Hammers <ch@debian.org>  Tue, 14 Mar 2006 22:56:13 +0100
-
-mysql-dfsg-5.0 (5.0.18-9) unstable; urgency=medium
-
-  [ Christian Hammers ]
-  * When using apt-get the check for left-over ISAM tables can abort the
-    installation of mysql-server-5.0 but not prevent the mysql-server-4.1
-    package from getting removed. The only thing I can do is reflect this
-    in the Debconf notice that is shown and suggest to reinstall
-    mysql-server-4.1 for converting. See: #354850
-  * Suggests removing of /etc/cron.daily/mysql-server in last NEWS message
-    (thanks to Mourad De Clerck). Closes: #354111
-  * Added versioned symbols for kfreebsd and Hurd, too (thanks to Aurelien
-    Jarno and Michael Bank). Closes: #353971 
-  * Added versioned symbols for kfreebsd, too (thanks to Aurelien Jarno).
-    Closes: #353971
-  [ Adam Conrad ]
-  * Add 39_scripts__mysqld_safe.sh__port_dir.dpatch to ensure that the
-    permissions on /var/run/mysqld are always correct, even on a tmpfs.
-
- -- Christian Hammers <ch@debian.org>  Mon,  6 Mar 2006 21:42:13 +0100
-
-mysql-dfsg-5.0 (5.0.18-8) unstable; urgency=low
-
-  * The rotation of the binary logs is now configured via
-    expire-logs-days in /etc/mysql/my.cnf and handled completely
-    by the server and no longer in configured in debian-log-rotate.conf
-    and handled by a cron job. Thanks to David Johnson.
-    See /usr/share/doc/mysql-server-5.0/NEWS.Debian
-  * Ran aspell over some files in debian/ and learned a lot :)
-  * debian/rules: Added check if versioned symbols are really there.
-  * Updated SSL-MINI-HOWTO.
-  * Updated copyright (removed the parts regarding the now removed
-    BerkeleyDB table handler and mysql-doc package).
-  * Relocated a variable in preinst (thanks to Michael Heldebrant).
-    Closes: #349258, #352587, #351216
-  * Updated Danish debconf translation (thanks to Claus Hindsgaul).
-    Closes: #349013  
-  * Updated Swedish debconf translation (thanks to Daniel Nylander).
-    Closes: #349522
-  * Updated French debconf translation (thanks to Christian Perrier).
-    Closes: #349592
-  * Fixed typo in README.Debian (thanks to Vincent Ricard).
-  * Prolonged waiting time for mysqld in the init script. Closes: #352070
-
- -- Christian Hammers <ch@debian.org>  Mon, 23 Jan 2006 23:13:46 +0100
-
-mysql-dfsg-5.0 (5.0.18-7) unstable; urgency=low
-
-  * Made mailx in debian-start.inc.sh optional and changed the dependency on it
-    on it to a mere recommendation. Closes: #316297
-  * the previous FTBFS patches for GNU/Hurd inadvertently led to configure
-    being regenerating, losing a couple trivial things like our versioned
-    symbols patch, causing many nasty problems (closes: #348854).
-
- -- sean finney <seanius@debian.org>  Fri, 20 Jan 2006 20:59:27 +0100
-
-mysql-dfsg-5.0 (5.0.18-6) unstable; urgency=low
-
-  * Added version comment (thanks to Daniel van Eeden). 
-  * Added two patches to build on GNU/Hurd (thanks to Michael Bank).
-    Closes: #348182
-  * Abort upgrade if old and now unsupported ISAM tables are present
-    (thanks to David Coe). Closes: #345895
-
- -- Christian Hammers <ch@debian.org>  Tue, 17 Jan 2006 19:25:59 +0100
-
-mysql-dfsg-5.0 (5.0.18-5) unstable; urgency=low
-
-  * Bump shlibdeps for libmysqlclient15 to (>= 5.0.15-1), which was
-    the first non-beta release from upstream, as well as being shortly
-    after we broke the ABI in Debian by introducing versioned symbols.
-
- -- Adam Conrad <adconrad@0c3.net>  Fri, 13 Jan 2006 13:18:03 +1100
-
-mysql-dfsg-5.0 (5.0.18-4) unstable; urgency=low
-
-  * Munge our dependencies further to smooth upgrades even more, noting
-    that we really need 5.0 to conflict with 4.1, and stealing a page from
-    the book of mysql-common, it doesn't hurt to hint package managers in
-    the direction of "hey, this stuff is a complete replacement for 4.1"
-  * Change the description of mysql-server and mysql-client to remove the
-    references to it being "transition", and instead point out that it's
-    the way to get the "current best version" of each package installed.
-
- -- Adam Conrad <adconrad@0c3.net>  Wed, 11 Jan 2006 11:39:45 +1100
-
-mysql-dfsg-5.0 (5.0.18-3) unstable; urgency=low
-
-  * Make the mysql-{client,server}-5.0 conflict against mysql-{client,server}
-    versioned, so they can be installed side-by-side and upgrade properly.
-  * Add myself to Uploaders; since I have access to the alioth repository.
-
- -- Adam Conrad <adconrad@0c3.net>  Tue, 10 Jan 2006 19:15:48 +1100
-
-mysql-dfsg-5.0 (5.0.18-2) unstable; urgency=low
-
-  * Removed the transitional package that forced an upgrade from
-    mysql-server-4.1 to mysql-server-5.0 as I was convinced that
-    having a general "mysql-server" package with adjusted dependencies
-    is enough (thanks to Adam Conrad).
-  * Updated logcheck.ignore files (thanks to Jamie McCarthy). Closes: #340193
-
- -- Christian Hammers <ch@debian.org>  Mon,  9 Jan 2006 21:54:53 +0100
-
-mysql-dfsg-5.0 (5.0.18-1) unstable; urgency=low
-
-  * New upstream version. 
-  * Added empty transitional packages that force an upgrade from the
-    server and client packages that have been present in Sarge.
-  * Fixed SSL-MINI-HOWTO (thanks to Jonas Smedegaard). Closes: #340589 
-
- -- Christian Hammers <ch@debian.org>  Mon,  2 Jan 2006 21:17:51 +0100
-
-mysql-dfsg-5.0 (5.0.17-1) unstable; urgency=low
-
-  * Never released as Debian package.
-
- -- Christian Hammers <ch@debian.org>  Thu, 22 Dec 2005 07:49:52 +0100
-
-mysql-dfsg-5.0 (5.0.16-1) unstable; urgency=low
-
-  * New upstream version.
-  * Removed the error logs from the logrotate script as Debian does
-    not use them anymore. Closes: #339628
-
- -- Christian Hammers <ch@debian.org>  Tue, 22 Nov 2005 01:19:11 +0100
-
-mysql-dfsg-5.0 (5.0.15-2) unstable; urgency=medium
-
-  * Added 14_configure__gcc-atomic.h.diff to fix FTBFS on m68k
-    (thanks to Stephen R Marenka). Closes: #337082
-  * Removed dynamic linking against libstdc++ as it was not really
-    needed (thanks to Adam Conrad). Closes: #328613
-  * Fixed the "/var/lib/mysql is a symlink" workaround that accidently
-    left a stalled symlink (thanks to Thomas Lamy). Closes: #336759
-  * As the init script cannot distinguish between a broken startup and
-    one that just takes very long the "failed" message now says
-    "or took more than 6s" (thanks to Olaf van der Spek). Closes: #335547
-
- -- Christian Hammers <ch@debian.org>  Thu,  3 Nov 2005 22:00:15 +0100
-
-mysql-dfsg-5.0 (5.0.15-1) unstable; urgency=low
-
-  * New upstream version. 5.0 has finally been declared STABLE!
-  * Added small patch to debian/rules that fixed sporadic build errors
-    where stdout and stderr were piped together, got mixed up and broke
-  * Added --with-big-tables to ./configure (thanks to tj.trevelyan).
-    Closes: #333090
-  * Added capability to parse "-rc" to debian/watch.
-  * Fixed cronscript (thanks to Andrew Deason). Closes: #335244
-  * Added Swedish debconf translation (thanks to Daniel Nylander).
-    Closes: #333670
-  * Added comment to README.Debian regarding applications that manually
-    set new-style passwords... Closes: #334444
-  * Sean Finney:
-    - Fix duplicate reference to [-e|--extended-insert]. Closes: #334957
-    - Fix default behavior for mysqldumpslow. Closes: #334517
-    - Reference documentation issue in mysql manpage. Closes: #335219
-
- -- Christian Hammers <ch@debian.org>  Fri, 30 Sep 2005 00:10:39 +0200
-
-mysql-dfsg-5.0 (5.0.13rc-1) unstable; urgency=low
-
-  * New upstream release. Now "release-candidate"! 
-  * Removed any dynamic link dependencies to libndbclient.so.0 which
-    is due to its version only distributed as a static library.
-  * Sean Finney:
-    - FTBFS fix related to stripping rpath in debian/rules
-
- -- Christian Hammers <ch@debian.org>  Mon, 26 Sep 2005 22:09:26 +0200
-
-mysql-dfsg-5.0 (5.0.12beta-5) unstable; urgency=low
-
-  * The recent FTBFS were probably result of a timing bug in the
-    debian/patches/75_*.dpatch file where Makefile.in got patched just
-    before the Makefile.shared which it depended on. For that reason
-    only some of the autobuilders failed. Closes: #330149
-  * Fixed chrpath removal (option -k had to be added).
-  * Corrected debconf dependency as requested by Joey Hess.
-
- -- Christian Hammers <ch@debian.org>  Mon, 26 Sep 2005 18:37:07 +0200
-
-mysql-dfsg-5.0 (5.0.12beta-4) unstable; urgency=low
-
-  * Removed experimental shared library libndbclient.so.0.0.0 as it
-    is doomed to cause trouble as long as it is present in both MySQL 4.1
-    and 5.0 without real soname and its own package. We still have
-    libndbclient.a for developers. (thanks to Adam Conrad and 
-    mediaforest.net). Closes: #329772
-
- -- Christian Hammers <ch@debian.org>  Fri, 23 Sep 2005 12:36:48 +0200
-
-mysql-dfsg-5.0 (5.0.12beta-3) unstable; urgency=medium
-
-  * Symbol versioning support!  wooooohoooooo!
-    (thanks to Steve Langasek) Closes: #236288
-  * Moved libndbcclient.so.0 to the -dev package as it is provided by
-    libmysqlclient14 and -15 which must be installable simultaneously.
-  * Removed mysql-*-doc suggestions.
-
- -- Christian Hammers <ch@debian.org>  Tue, 20 Sep 2005 00:07:03 +0200
-
-mysql-dfsg-5.0 (5.0.12beta-2) unstable; urgency=low
-
-  * Added patch to build on GNU/kFreeBSD (thanks to Aurelien Jarno).
-    Closes: #327702
-  * Added patch that was already been present on the 4.1 branch which
-    makes the "status" command of the init script more sensible
-    (thanks to Stephen Gildea). Closes: #311836
-  * Added Vietnamese Debconf translation (thanks to Clytie Siddal).
-    Closes: #313006
-  * Updated German Debconf translation (thanks to Jens Seidel).
-    Closes: #313957
-  * Corrected commends in example debian-log-rotate.conf. The default is
-    unlike the mysql-sever-4.1 package which needed to stay backwards
-    compatible now 2 to avoid filling up the disk endlessly.
-  * Fixed watch file to be "-beta" aware.
-
- -- Christian Hammers <ch@debian.org>  Thu, 15 Sep 2005 20:50:19 +0200
-
-mysql-dfsg-5.0 (5.0.12beta-1) unstable; urgency=medium
-
-  * Christian Hammers:
-    - New upstream release.
-    - Changed build-dep to libreadline5-dev as requested by Matthias Klose.
-      Closes: #326316
-    - Applied fix for changed output format of SHOW MASTER LOGS for
-      binary log rotation (thanks to Martin Krueger). Closes: #326427, #326427
-    - Removed explicit setting of $PATH as I saw no sense in it and
-      it introduced a bug (thanks to Quim Calpe). Closes: #326769
-    - Removed PID file creation from /etc/init.d/mysql-ndb as it does
-      not work with this daemon (thanks to Quim Calpe).
-    - Updated French Debconf translation (thanks to Christian Perrier).
-      Closes: #324805
-    - Moved conflicts line in debian/control from libmysqlclient15 to
-      libmysqlclient15-dev and removed some pre-sarge conflicts as
-      suggested by Adam Majer. Closes: #324623
-  * Sean Finney:
-    - For posterity, CAN-2005-2558 has been fixed since 5.0.7beta.
-
- -- Christian Hammers <ch@debian.org>  Thu, 15 Sep 2005 19:58:22 +0200
-
-mysql-dfsg-5.0 (5.0.11beta-3) unstable; urgency=low
-
-  * Temporarily build only with -O2 to circumvent gcc internal errors
-    (thanks to Matthias Klose). Related to: #321165 
-
- -- Christian Hammers <ch@debian.org>  Thu, 18 Aug 2005 15:44:04 +0200
-
-mysql-dfsg-5.0 (5.0.11beta-2) unstable; urgency=low
-
-  * Fixed README.Debian regarding the status of mysql-doc.
-  * Added "set +e" around chgrp in mysql-server-5.0.preinst to
-    not fail on .journal files (thanks to Christophe Nowicki).
-    Closes: #318435
-
- -- Christian Hammers <ch@debian.org>  Sun, 14 Aug 2005 18:02:08 +0200
-
-mysql-dfsg-5.0 (5.0.11beta-1) unstable; urgency=low
-
-  * New upstream version. 
-  * Added Danish Debconf translations (thanks to Claus Hindsgaul).
-    Closes: #322384
-  * Updated Czech Debconf translations (thanks to Miroslav Kure).
-    Closes: #321765
-
- -- Christian Hammers <ch@debian.org>  Sat, 13 Aug 2005 11:56:15 +0000
-
-mysql-dfsg-5.0 (5.0.10beta-1) unstable; urgency=low
-
-  * New upstream release.
-  * Christian Hammers:
-    - Added check for mounted /proc to debian/rules.
-  * Sean Finney:
-    - fix for fix_mysql_privilege_tables/mysql_fix_privilege_tables typo
-      in mysql-server-5.0's README.Debian (see #319838).
-
- -- Christian Hammers <ch@debian.org>  Sun, 31 Jul 2005 00:30:45 +0200
-
-mysql-dfsg-5.0 (5.0.7beta-1) unstable; urgency=low
-
-  * Second try for new upstream release. 
-  * Renamed mysql-common-5.0 to mysql-common as future libmysqlclient16
-    from e.g. MySQL-5.1 would else introduce mysql-common-5.1 which makes
-    a simultanous installation of libmysqlclient14 impossible as that
-    depends on either mysql-common or mysql-common-5.0 but not on future
-    versions. Thus we decided to always let the newest MySQL version
-    provide mysql-common.
-  * Added ${misc:Depends} as suggested by debhelper manpage. 
-  * Raised standard in control file to 3.6.2.
-  * Removed DH_COMPAT from rules in faviour of debian/compat.
-  * Checkes for presence of init script before executing it in preinst.
-    Referres: 315959
-  * Added 60_includes_mysys.h__gcc40.dpatch for GCC-4.0 compatibility.
-
- -- Christian Hammers <ch@debian.org>  Wed, 29 Jun 2005 00:39:05 +0200
-
-mysql-dfsg-5.0 (5.0.5beta-1) unstable; urgency=low
-
-  * New major release! Still beta so be carefull...
-  * Added federated storage engine.
-
- -- Christian Hammers <ch@debian.org>  Wed,  8 Jun 2005 19:29:45 +0200
-
-mysql-dfsg-4.1 (4.1.12-1) unstable; urgency=low
-
-  * Christian Hammers:
-    - New upstream release.
-    - Disabled BerkeleyDB finally. It has been obsoleted by InnoDB.
-  * Sean Finney:
-    - Updated French translation from Christian Perrier (Closes: #310526).
-    - Updated Japanese translation from Hideki Yamane (Closes: #310263).
-    - Updated Russian translation from Yuriy Talakan (Closes: #310197).
-
- -- Christian Hammers <ch@debian.org>  Sat,  4 Jun 2005 05:49:11 +0200
-
-mysql-dfsg-4.1 (4.1.11a-4) unstable; urgency=high
-
-  * Fixed FTBFS problem which was caused due to the fact that last uploads
-    BerkeleyDB patch was tried to applied on all architectures and not only
-    on those where BerkeleyDB is actually beeing built. Closes: #310296
-
- -- Christian Hammers <ch@debian.org>  Mon, 23 May 2005 00:54:51 +0200
-
-mysql-dfsg-4.1 (4.1.11a-3) unstable; urgency=high
-
-  * Added patch from Piotr Roszatycki to compile the bundled db3 library
-    that is needed for the BerkeleyDB support with versioned symbols so
-    that mysqld no longer crashes when it gets linked together with the
-    Debian db3 version which happens when e.g. using libnss-db.
-    Closes: #308966
-
- -- Christian Hammers <ch@debian.org>  Thu, 19 May 2005 01:41:14 +0200
-
-mysql-dfsg-4.1 (4.1.11a-2) unstable; urgency=high
-
-  * Okay, the hackery with /var/lib/dpkg/info/mysql-server.list will not
-    stand and is removed from the preinst of mysql-server.
-  * New workaround for the symlink problem that does not involve mucking
-    with dpkg's file lists is storing the symlinks in a temporary location
-    across upgrades.
-    As this sometimes fails since apt-get does not always call new.preinst
-    before old.postrm, some remarks were added to README.Debian and the
-    Debconf installation notes to minimize the inconvinience this causes.
-
- -- sean finney <seanius@debian.org>  Sun, 15 May 2005 10:25:31 -0400
-
-mysql-dfsg-4.1 (4.1.11a-1) unstable; urgency=high
-
-  * Added the "a" to the version number to be able to upload a new
-    .orig.tar.gz file which now has the non-free Docs/ directory removed
-    as this has been forgotten in the 4.1.11 release (thanks to Goeran
-    Weinholt). Closes: #308691
-  * The Woody package listed /var/lib/mysql and /var/log/mysql in its
-    /var/lib/dpkg/info/mysql-server.list. These directories are often
-    replaced by symlinks to data partitions which triggers a dpkg bug
-    that causes these symlinks to be removed on upgrades. The new preinst
-    prevents this by removing the two lines from the .list file
-    (thanks to Andreas Barth and Jamin W. Collins). See dpkg bug #287978.
-  * Updated French Debconf translation (thanks to Christian Perrier).
-    Closes: #308353
-
- -- Christian Hammers <ch@debian.org>  Thu, 12 May 2005 21:52:46 +0200
-
-mysql-dfsg-4.1 (4.1.11-3) unstable; urgency=high
-
-  * The "do you want to remove /var/lib/mysql when purging the package" flag
-    from old versions is removed once this package is beeing installed so
-    that purging an old Woody mysql-server package while having a
-    mysql-server-4.1 package installed can no longer lead to the removal of
-    all databases. Additionaly clarified the wording of this versions Debconf
-    template and added a check that skips this purge in the postrm script
-    if another mysql-server* package has /usr/sbin/mysqld installed.
-    (thanks to Adrian Bunk for spotting that problem) Closes: #307473
-  * Cronfile was not beeing installed as the filename was not in the
-    correct format for "dh_installcron --name" (thanks to Tomislav
-    Gountchev). Closes: #302712
-
- -- Christian Hammers <ch@debian.org>  Sat, 23 Apr 2005 22:55:15 +0200
-
-mysql-dfsg-4.1 (4.1.11-2) unstable; urgency=low
-
-  * Sean Finney:
-    - don't freak out if we can't remove /etc/mysql during purge.
-    - debian/rules clean works again.
-  * Christian Hammers:
-    - Fixed typo in README.Debian (thanks to Joerg Rieger). Closes: #304897
-    - Completely removed the passwordless test user as it was not only
-      insecure but also lead to irritations as MySQL checks first the
-      permissions of this user and then those of a password having one.
-      See bug report from Hilko Bengen for details. Closes: #301741
-
- -- Christian Hammers <ch@debian.org>  Sat, 16 Apr 2005 15:55:00 +0200
-
-mysql-dfsg-4.1 (4.1.11-1) unstable; urgency=low
-
-  * New upstream version. 
-  * Upstream fix for charset/collation problem. Closes: #282256
-  * Upstream fix for subselect crash. Closes: #297687
-  * Corrected minor issue in Debconf template regarding skip-networking
-    (thanks to Isaac Clerencia). Closes: #303417
-  * Made dependency to gawk unnecessary (thanks to Zoran Dzelajlija).
-    Closes: #302284
-  * Removed obsolete 50_innodb_mixlen.dpatch.
-  * Removed obsolete 51_CAN-2004-0957_db_grant_underscore.dpatch.
-
- -- Christian Hammers <ch@debian.org>  Fri,  8 Apr 2005 00:23:53 +0200
-
-mysql-dfsg-4.1 (4.1.10a-7) unstable; urgency=low
-
-  * Sean Finney:
-    - fix for the mysteriously disappeared cronjob.  thanks to
-      Peter Palfrader <weasel@debian.org> for pointing out this omission.
-      (closes: #302712).
-
- -- sean finney <seanius@debian.org>  Sat, 02 Apr 2005 16:54:13 -0500
-
-mysql-dfsg-4.1 (4.1.10a-6) unstable; urgency=high
-
-  * Sean Finney:
-    - the previous upload did not completely address the issue.  this one
-      should do so.  d'oh.
-
- -- sean finney <seanius@debian.org>  Thu, 31 Mar 2005 03:35:50 +0000
-
-mysql-dfsg-4.1 (4.1.10a-5) unstable; urgency=high
-
-  * Sean Finney:
-    - the following security issue is addressed in this upload:
-      CAN-2004-0957 (grant privilege escalation on tables with underscores)
-      thanks to sergei at mysql for all his help with this.
-
- -- sean finney <seanius@debian.org>  Wed, 30 Mar 2005 21:19:26 -0500
-
-mysql-dfsg-4.1 (4.1.10a-4) unstable; urgency=low
-
-  * Sean Finney:
-    - FTBFS fix for amd64/gcc-4.0.  Thanks to Andreas Jochens <aj@andaco.de>
-      for reporting this (closes: #301807).
-    - ANSI-compatible quoting fix in daily cron job.  thanks to 
-      Karl Hammar <karl@aspodata.se> for pointing out the problem in
-      the 4.0 branch.
-    - Added myself as a co-maintainer in the control file (closes: #295312).
-
- -- sean finney <seanius@debian.org>  Tue, 29 Mar 2005 18:54:42 -0500
-
-mysql-dfsg-4.1 (4.1.10a-3) unstable; urgency=low
-
-  * BerkeleyDB is now disabled by default as its use is discouraged by MySQL.
-  * Added embedded server libraries as they finally do compile.
-    They are currently in libmysqlclient-dev as they are still 
-    experimental and only available as .a library (thanks to Keith Packard).
-    Closes: #297062
-  * Fixed obsolete "tail" syntax (thanks to Sven Mueller). Closes: #301413
-  * Added CAN numbers for the latest security bugfix upload.
-  * Updated manpage of mysqlmanager (thanks to Justin Pryzby). Closes: #299844
-  * Added comments to default configuration.
-
- -- Christian Hammers <ch@debian.org>  Sun, 20 Mar 2005 17:40:18 +0100
-
-mysql-dfsg-4.1 (4.1.10a-2) unstable; urgency=low
-
-  * Disabled "--with-mysqld-ldflags=-all-static" as it causes sig11 crashes
-    if LDAP is used for groups in /etc/nsswitch.conf. Confirmed by Sean Finney
-    and Daniel Dehennin. Closes: #299382
-
- -- Christian Hammers <ch@debian.org>  Mon, 14 Mar 2005 03:01:03 +0100
-
-mysql-dfsg-4.1 (4.1.10a-1) unstable; urgency=high
-
-  * SECURITY:
-    - The following security related updates are addressed: 
-      CAN-2005-0711 (temporary file creation with "CREATE TEMPORARY TABLE")
-      CAN-2005-0709 (arbitrary library injection in udf_init())
-      CAN-2005-0710 (arbitrary code execution via "CREATE FUNCTION")
-      Closes: #299029, #299031, #299065
-  * New Upstream Release.
-    - Fixes some server crash conditions.
-    - Upstream includes fix for TMPDIR overriding my.cnf tmpdir setting
-      Closes: #294347
-    - Fixes InnoDB error message. Closes: #298875
-    - Fixes resouce limiting. Closes: #285044
-  * Improved checking whether or not the server is alive in the init script
-    which should make it possible to run several mysqld instances in
-    different chroot environments. Closes: #297772
-  * Fixed cron script name as dots are not allowed (thanks to Michel
-    v/d Ven). Closes: #298447
-  * Added -O3 and --with-mysqld-ldflags=-all-static as MySQL recommends to
-    build the server binary statically in order to gain about 13% more
-    performance (thanks to Marcin Kowalski).
-  * Added patch to let mysqld_safe react to signals (thanks to Erich 
-    Schubert). Closes: #208364
-  * (Thanks to Sean Finney for doing a great share of work for this release!)
-
- -- Christian Hammers <ch@debian.org>  Thu,  3 Mar 2005 02:36:39 +0100
-
-mysql-dfsg-4.1 (4.1.10-4) unstable; urgency=medium
-
-  * Fixed bug that prevented MySQL from starting after upgrades.
-    Closes: #297198, #296403
-  * Added comment about logging to syslog to the default my.cnf
-    and the logrotate script (thanks to Ryszard Lach). Closes: #295507
-
- -- Christian Hammers <ch@debian.org>  Thu,  3 Mar 2005 00:28:02 +0100
-
-mysql-dfsg-4.1 (4.1.10-3) unstable; urgency=low
-
-  * Sean Finney: Cronjobs now exit silently when the server package
-    has been removed but not purged (thanks to Vineet Kumar).
-    Closes: #297404
-  * Fixed comments of /etc/mysql/debian-log-rotate.conf (thanks to
-    Philip Ross). Closes: #297467
-  * Made mysqld_safe reacting sane on signals (thanks to Erich Schubert).
-    Closes: #208364
- -- Christian Hammers <ch@debian.org>  Tue,  1 Mar 2005 19:44:34 +0100
-
-mysql-dfsg-4.1 (4.1.10-2) unstable; urgency=low
-
-  * Converted to dpatch.
-  * debian/ is now maintained via Subversion on svn.debian.org. 
-
- -- Christian Hammers <ch@debian.org>  Tue,  1 Mar 2005 02:16:36 +0100
-
-mysql-dfsg-4.1 (4.1.10-1) unstable; urgency=low
-
-  * New upstream version.
-  * Upstream fixed memleak bug. Closes: #205587
-  * Added debian/copyright.more for personal reference.
-  * Lowered default query cache size as suggested by Arjen from MySQL.
-  * Switched from log to log-bin as suggested by Arjen from MySQL.
-  * Fixed typo in my.cnf (thanks to Sebastian Feltel). Closes: #295247
-  * Replaced --defaults-extra-file by --defaults-file in Debian scripts
-    as former lets password/host etc be overwriteable by /root/.my.cnf.
-    Added socket to /etc/mysql/debian.cnf to let it work. (thanks to
-    SATOH Fumiyasu). Closes: #295170
-
- -- Christian Hammers <ch@debian.org>  Tue, 15 Feb 2005 23:47:02 +0100
-
-mysql-dfsg-4.1 (4.1.9-4) unstable; urgency=low
-
-  * Improved the way mysqld is started and registered with update-rc.d
-    in cases where the admin modifies the runlevel configuration.
-    Most notably removed the debconf question whether or not mysql should
-    start on when booting. Closes: #274264
-  * Renamed configuration option old-passwords to the more preferred
-    naming convention old_passwords. Same for some others (thanks to
-    Patrice Pawlak). Closes: #293983
-
- -- Christian Hammers <ch@debian.org>  Tue,  8 Feb 2005 02:21:18 +0100
-
-mysql-dfsg-4.1 (4.1.9-3) unstable; urgency=low
-
-  * Renamed ca_ES.po to ca.po to reach a broader audience (thanks to 
-    Christian Perrier). Closes: #293786 
-  * Expicitly disabled mysqlfs support as it has never been enabled by
-    configure during the autodetection but fails due to broken upstream
-    code when users try to build the package theirselves while having
-    liborbit-dev installed which triggers the mysqlfs autodetection
-    (thanks to Max Kellermann). Closes: #293431
-  * Added dependencies to gawk as one script does not work with original-awk
-    (thanks to Petr Ferschmann). Closes: #291634
-
- -- Christian Hammers <ch@debian.org>  Sun,  6 Feb 2005 23:33:11 +0100
-
-mysql-dfsg-4.1 (4.1.9-2) unstable; urgency=high
-
-  * SECURITY:
-    For historical reasons /usr/share/mysql/ was owned and writable by
-    the user "mysql". This is a security problem as some scripts that
-    are run by root are in this directory and could be modified and used
-    by a malicious user who already has mysql privileges to gain full root
-    rights (thanks to Matt Brubeck). Closes: #293345
-  * Changed "skip-networking" to "bind-address 127.0.0.1" which is more
-    compatible and not less secure but maybe even more, as less people enable
-    networking for all interfaces (thanks to Arjen Lentz).
-  * Enabled InnoDB by default as recommended by Arjen Lentz from MySQL.
-  * Added remarks about hosts.allow to README.Debian (thanks to David
-    Chappell). Closes: #291300
-  * mysql-server-4.1 now provides mysql-server (thanks to Paul van den Berg).
-    Closes: #287735
-
- -- Christian Hammers <ch@debian.org>  Wed,  2 Feb 2005 23:31:55 +0100
-
-mysql-dfsg-4.1 (4.1.9-1) unstable; urgency=low
-
-  * New upstream version.
-  * mysql-client-4.1 now provides "mysql-client" so that packages depending
-    on mysql-client (ca. 40) can now be used with MySQL-4.1, too.
-
- -- Christian Hammers <ch@debian.org>  Sun, 23 Jan 2005 22:52:48 +0100
-
-mysql-dfsg-4.1 (4.1.8a-6) unstable; urgency=high
-
-  * SECURITY:
-    Javier Fernandez-Sanguino Pena from the Debian Security Audit Project
-    discovered a temporary file vulnerability in the mysqlaccess script of
-    MySQL that could allow an unprivileged user to let root overwrite
-    arbitrary files via a symlink attack and could also could unveil the
-    contents of a temporary file which might contain sensitive information.
-    (CAN-2005-0004, http://lists.mysql.com/internals/20600) Closes: #291122
-
- -- Christian Hammers <ch@debian.org>  Tue, 18 Jan 2005 23:11:48 +0100
-
-mysql-dfsg-4.1 (4.1.8a-5) unstable; urgency=medium
-
-  * Fixed important upstream bug that causes from_unixtime(0) to return
-    NULL instead of "1970-01-01 00:00:00" which fails on NOT NULL columns.
-    Closes: #287792
-  * Fixes upstream bug in mysql_list_fields() . Closes: #282486
-  * Fixes bug that lead to double rotated logfiles when mysql-server 4.0
-    was previously installed (thanks to Olaf van der Spek). Closes: #289851
-  * Fixed typo in README.Debian (thanks to Mark Nipper). Closes: #289131
-  * Changed max_allowed_packet in my.cnf to 16M as in 4.0.x (thanks to
-    Olaf van der Spek). Closes: #289840
-  * Updated French debconf translation (thanks to Christian Perrier).
-    Closes: #287955
-
- -- Christian Hammers <ch@debian.org>  Thu, 13 Jan 2005 01:29:05 +0100
-
-mysql-dfsg-4.1 (4.1.8a-4) unstable; urgency=low
-
-  * Broken patch again :-(
-
- -- Christian Hammers <ch@debian.org>  Sun,  9 Jan 2005 23:47:55 +0100
-
-mysql-dfsg-4.1 (4.1.8a-3) unstable; urgency=low
-
-  * The mutex patch was a bit too x86 centric. This broke the alpha build.
-
- -- Christian Hammers <ch@debian.org>  Sun,  9 Jan 2005 14:18:49 +0100
-
-mysql-dfsg-4.1 (4.1.8a-2) unstable; urgency=medium
-  * Some Makefiles that were patched by me got overwritten by the GNU
-    autotools, probably because I also patched ./configure. Fixed now,
-    the critical mutex patch is now back in again. Closes: #286961
-  * Added patch to make MySQL compile on ARM (thanks to Adam Majer).
-    Closes: #285071
-
- -- Christian Hammers <ch@debian.org>  Thu,  6 Jan 2005 09:30:13 +0100
-
-mysql-dfsg-4.1 (4.1.8a-1) unstable; urgency=medium
-
-  * Upstream 4.1.8 had some problems in their GNU Autotools files so they
-    released 4.1.8a. Debian's 4.1.8 was fixed by running autoreconf but this
-    again overwrote MySQL changes to ltmain.sh which are supposed to fix some
-    problems on uncommon architectures (maybe the FTBFS on alpha, arm, m68k
-    and sparc?).
-  * libmysqlclient_r.so.14 from 4.1.8-3 also missed a link dependency to
-    libz which lead to unresolved symbols visible with "ldd -r" (thanks
-    to Laurent Bonnaud). Closes: #287573
-
- -- Christian Hammers <ch@debian.org>  Wed, 29 Dec 2004 14:26:33 +0100
-
-mysql-dfsg-4.1 (4.1.8-3) unstable; urgency=low
-
-  * Fixed checking for error messages by forcing english language
-    output by adding LC_ALL=C to debian-start (thanks to Rene
-    Konasz) Closes: #285709
-  * Fixed bashisms in Debian scripts. Closes: #286863
-  * Updated Japanese Debconf translation (thanks to Hideki Yamane).
-    Closes: #287003
-  * Improved 4.0 to 4.1 upgrade if /var/lib/mysql is a symlink
-    (thanks to Thomas Lamy). Closes: #286560
-  * Added patch for FTBFS problem where no LinuxThreads can be found.
-    I don't know if this still applies but it should not hurt.
-    The patch is debian/patches/configure__AMD64-LinuxThreads-vs-NPTL.diff
-
- -- Christian Hammers <ch@debian.org>  Sun, 26 Dec 2004 14:04:20 +0100
-
-mysql-dfsg-4.1 (4.1.8-2) unstable; urgency=low
-
-  * If /var/lib/mysql is a symlink then it is kept as such.
-  * Added the old-passwords option to the default my.cnf to stay
-    compatible to clients that are still compiled to libmysqlclient10
-    and libmysqlclient12 for licence reasons. 
-  * Adjusted tetex build-deps to ease backporting (thanks to Norbert
-    Tretkowski from backports.org).
-
- -- Christian Hammers <ch@debian.org>  Tue, 21 Dec 2004 01:00:27 +0100
-
-mysql-dfsg-4.1 (4.1.8-1) unstable; urgency=medium
-
-  * New upstream version. Closes: #286175
-  * Added conflict to libmysqlclient-dev (thanks to Adam Majer).
-    Closes: #286538
-  * Added debconf-updatepo to debian/rules:clean.
-  * Updated Japanese Debconf translation (thanks to Hideki Yamane).
-    Closes: #285107
-  * Updated French Debconf translation (thanks to Christian Perrier).
-    Closes: #285977
-  * Renamed cz.po to cs.po (thanks to Miroslav Kure). Closes: #285438
-  * Aplied patch for changed server notice to debian-start (thanks to
-    Adam Majer). Closes: #286035
-  * Changed nice value in default my.cnf as nohup changed its behaviour
-    (thanks to Dariush Pietrzak). Closes: #285446
-  * Increased verbosity of preinst script in cases where it cannot stop
-    a running server (thanks to Jan Minar). Closes: #285982
-  * Splitted the code parts of /etc/mysql/debian-start to
-    /usr/share/mysql/debian-start.inc.sh (thanks to Jan Minar).
-    Closes: #285988
-
- -- Christian Hammers <ch@debian.org>  Mon, 20 Dec 2004 00:33:21 +0100
-
-mysql-dfsg-4.1 (4.1.7-4) unstable; urgency=medium
-
-  * Removed OpenSSL support.
-    After a short discussion with MySQL, I decided to drop OpenSSL support as
-    1. MySQL started shipping their binaries without it, too and do not
-       seem to support it in favour of using a different library somewhen.
-    2. MySQL did not adjust their licence to grant permission to link
-       against OpenSSL.
-    3. Even if they did, third parties who use libmysqlclient.so often
-       do not realise licencing problems or even do not want OpenSSL.
-    (thanks to Jordi Mallach and the responders to MySQL bug #6924)
-    Closes: #283786
-  * debian/control: Improved depends and conflicts to mysql-4.0.
-
- -- Christian Hammers <ch@debian.org>  Thu,  2 Dec 2004 22:02:28 +0100
-
-mysql-dfsg-4.1 (4.1.7-3) unstable; urgency=low
-
-  * Raised version to make it higher as the one in experimental. 
-
- -- Christian Hammers <ch@debian.org>  Wed,  1 Dec 2004 21:09:20 +0100
-
-mysql-dfsg-4.1 (4.1.7-2) unstable; urgency=low
-
-  * Patched scripts/mysql_install_db so that it no longer creates a
-    passwordless test database during installation (thanks to Patrick
-    Schnorbus). Closes: #281158
-  * Added Czech debconf translation (thanks to Miroslav Kure).
-    Closes: #283222
-
- -- Christian Hammers <ch@debian.org>  Wed,  1 Dec 2004 01:29:31 +0100
-
-mysql-dfsg-4.1 (4.1.7-1) unstable; urgency=low
-
-  * New upstream branch! 
-  * Adjusted debian/control to make this package suitable to get parallel
-    to version 4.0.x into unstable and sarge. The package names are
-    different so that "mysql-server" still defaults to the rock-stable
-    4.0 instead to this announced-to-be-stable 4.1.
-  * Added --with-mutex=i86/gcc-assemler to the Berkeley-DB configure
-    to prevent the use of NPLT threads when compiling under kernel 2.6
-    because the binaries are else not runable on kernel 2.4 hosts.
-    Closes: #278638, #274598 
-
- -- Christian Hammers <ch@debian.org>  Sun, 31 Oct 2004 20:15:03 +0100
-
-mysql-dfsg (4.1.6-1) experimental; urgency=low
-
-  * New upstream version.
-  * Fixed symlinks in libmysqlclient-dev package. Closes: #277028
-  * This time I did not update the libtool files as they were pretty
-    up to date and I want to have a shorter diff file.
-
- -- Christian Hammers <ch@debian.org>  Wed, 20 Oct 2004 00:07:58 +0200
-
-mysql-dfsg (4.1.5-3) experimental; urgency=low
-
-  * debian/postinst: mysql_install_db changed parameter from --IN-RPM
-    to --rpm which caused problems during installs. Closes: #276320
-
- -- Christian Hammers <ch@debian.org>  Sat, 16 Oct 2004 20:36:46 +0200
-
-mysql-dfsg (4.1.5-2) experimental; urgency=low
-
-  * Activated support for ndb clustering (thanks to Kevin M. Rosenberg).
-    Closes: #275109
-
- -- Christian Hammers <ch@debian.org>  Wed,  6 Oct 2004 01:58:00 +0200
-
-mysql-dfsg (4.1.5-1) experimental; urgency=low
-
-  * WARNING:
-    The upstream branch 4.1 is still considered BETA.
-    The Debian packages for 4.1 were done without big testing. If you miss
-    a new functionality or binary, contact me and I check add the relevant
-    configure option or include the program.
-  * New MAJOR upstream version.
-    Thanks to the great demand here's now the first MySQL 4.1 experimental
-    release. FEEDBACK IS WELCOME.
-  * 4.0->4.1 notes:
-    - debian/patches/alpha.diff could not be applied, I fix that later
-    - debian/patches/scripts__mysql_install_db.sh.diff was obsolete
-    - debian/patches/scripts__Makefile.in was neccessary due to a dependency
-      to the removed non-free Docs/ directory. Upstream has been contacted.
-    - Build-Deps: += automake1.7
-    - debian/rules: embedded servers examples did not compile, removed
-
- -- Christian Hammers <ch@debian.org>  Sun, 26 Sep 2004 19:46:47 +0200
-
-mysql-dfsg (4.0.21-3) unstable; urgency=low
-
-  * Upstream tried to fix a security bug in mysqlhotcopy and broke it :-)
-    Applied a patch (see debian/patches) from Martin Pitt. Closes: #271632
-  * Between 4.0.20 and 4.0.21 the Debian specific changes in
-    /usr/bin/mysqld_safe that piped the error log to syslog got lost
-    and are now back again. 
-  * Fixed capitalization in debconf headings.
-  * Changed wording of the initscript status message to make heartbeat
-    happier. Closes: #271591
-
- -- Christian Hammers <ch@debian.org>  Fri, 17 Sep 2004 18:42:25 +0200
-
-mysql-dfsg (4.0.21-2) unstable; urgency=medium
-
-  * The dependencies between mysql-client and libmysqlclient12 were
-    too loose, when upgrading only the client this can lead to non working
-    binaries due to relocation errors (thanks to Dominic Cleal).
-    Closes: #271803
-  * Fixed typo in mysqldump.1 manpage (thanks to Nicolas Francois).
-    Closes: #271334
-
- -- Christian Hammers <ch@debian.org>  Wed, 15 Sep 2004 15:38:11 +0200
-
-mysql-dfsg (4.0.21-1) unstable; urgency=high
-
-  * SECURITY:
-    This upstream version fixes some security problems that might at least
-    allow a DoS attack on the server.
-    * Fixed an old bug in concurrent accesses to `MERGE' tables (even
-      one `MERGE' table and `MyISAM' tables), that could've resulted in
-      a crash or hang of the server. (Bug #2408)
-    * Fixed bug in privilege checking where, under some conditions, one
-      was able to grant privileges on the database, he has no privileges
-      on. (Bug #3933)
-    * Fixed crash in `MATCH ... AGAINST()' on a phrase search operator
-      with a missing closing double quote. (Bug #3870)
-    * Fixed potential memory overrun in `mysql_real_connect()' (which
-      required a compromised DNS server and certain operating systems).
-      (Bug #4017)
-  * New upstream version.
-    * Fixes bug that made x="foo" in WHERE sometimes the same as x="foo ".
-      Closes: #211618
-  * Updated Japanese Debconf translation (thanks to Hideki Yamane).
-    Closes: #271097
-
- -- Christian Hammers <ch@debian.org>  Sat, 11 Sep 2004 23:15:44 +0200
-
-mysql-dfsg (4.0.20-14) unstable; urgency=low
-
-  * Dave Rolsky spottet that -DBIG_JOINS was not properly enabled.
-    It allowes joining 64 instead of an 32 tables to join.
-
- -- Christian Hammers <ch@debian.org>  Thu,  9 Sep 2004 20:24:02 +0200
-
-mysql-dfsg (4.0.20-13) unstable; urgency=medium
-
-  * Fixed a bug in the initscript which caused the check for not properly
-    closed i.e. corrupt tables that is executed when the server starts
-    not to run in background as supposed.
-    Although the check does not repair anything on servers with several
-    thousand tables the script was reported to take some minutes which
-    is quite annoying. (Thanks to Jakob Goldbach). Closes: #270800
-
- -- Christian Hammers <ch@debian.org>  Thu,  9 Sep 2004 17:11:05 +0200
-
-mysql-dfsg (4.0.20-12) unstable; urgency=medium
-
-  * Filter messages regarding table handles that do not support CHECK TABLE
-    in the script that checks for corrupted tables on every start which lead
-    to unnecessary mails (thanks to David Everly). Closes: #269811 
-  * Added a note to the corrupt-table-check mail which notes that a
-    false-positive is reported in the case that immediately after starting
-    the server a client starts using a table (thanks to Uwe Kappe).
-    Closes: #269985
-  * Added "quote-names" as default to the [mysqldump] section in
-    /etc/mysql/my.cnf as too many users stumble over dump files that
-    could not be read in again due to the valid use of reserved words
-    as table names. This has also be done by upstream in 4.1.1 and has
-    no known drawbacks. Closes: #269865
-  * Binary logs can now be rotated as well. Defaults to off, though, for
-    compatibilty reasons (thanks to Mark Ferlatte). Closes: #94230, #269110
-  * The mysql user "debian-sys-maint" now gets all possible rights which
-    makes binary logging possible and helps other package maintainer who
-    wants to use it to create package specific databases and users.
-  * Added example how to change daemon nice level via /etc/mysql/my.cnf
-  * Updated French debconf translations (thanks to Christian Perrier).
-    Closes: #265811
-  * Renamed options in the default config file that still had old names
-    (thanks to Yves Kreis). Closes: #266445
-  * Fixed spelling in debconf note.
-  * Added -l and -L to dh_shlibdeps.
-
- -- Christian Hammers <ch@debian.org>  Fri,  3 Sep 2004 20:10:46 +0200
-
-mysql-dfsg (4.0.20-11) unstable; urgency=high
-
-  * SECURITY
-    This version fixes a security flaw in mysqlhotcopy which created
-    temporary files in /tmp which had predictable filenames and such
-    could be used for a tempfile run attack.
-    The issue has been recorded as CAN-2004-0457.
-
- -- Christian Hammers <ch@debian.org>  Sat, 14 Aug 2004 18:27:19 +0200
-
-mysql-dfsg (4.0.20-10) unstable; urgency=low
-
-  * MySQL finally updated their copyright page and installed v1.5 of
-    the "Free/Libre and Open Source Software License (FLOSS) - Exception"
-    which will hopefully end the license hell they created by putting the
-    client libraries under GPL instead of LGPL which conflicts with PHP and
-    other software that used to link against MySQL.
-    The license text is not yet in any release MySQL version but visible
-    on their web site and copied into the debian/copyright file.
-    Special thanks to Zak Greant <zak@mysql.com> and the debian-legal list
-    for helping to solve this release critical problem.
-    Closes: #242449
-  * Updated Brazil debconf translation (thanks to Andre Luis Lopes).
-    Closes: #264233
-  * Updated Japanese debconf translation (thanks to Hideki Yamane).
-    Closes: #264620
-  * Fixed minor typo in debconf description (thanks to TROJETTE Mohammed
-    Adnene). Closes: #264840
-  * Improved init and preinst script which now detects stalled servers which
-    do no longer communicate but are present in the process list (thanks to
-    Henrik Johansson). Closes: #263215
-
- -- Christian Hammers <ch@debian.org>  Mon,  9 Aug 2004 19:44:28 +0200
-
-mysql-dfsg (4.0.20-9) unstable; urgency=medium
-
-  * Partly reverted the last patch which gave the mysql-user
-    "debian-sys-maint" more rights as there are old versions of MySQL which
-    have fewer privlige columns. Now only those are set (thanks to Alan Tam).
-    Closes: #263111
-
- -- Christian Hammers <ch@debian.org>  Tue,  3 Aug 2004 13:03:02 +0200
-
-mysql-dfsg (4.0.20-8) unstable; urgency=low
-
-  * The mysqlcheck that is started from the initscript will now be
-    backgrounded because it might else prevent the boot process to continue.
-    It also now notifies root by mail and syslog if a table is corrupt.
-  * The "debian-sys-maint" MySQL user now has almost full rights so that other
-    packages might use this account to create databases and user (thanks to
-    Andreas Barth). Closes: #262541
-  * Added paranoid rules for logcheck.
-
- -- Christian Hammers <ch@debian.org>  Sun,  1 Aug 2004 21:00:55 +0200
-
-mysql-dfsg (4.0.20-8) unstable; urgency=low
-
-  * Upload stalled. Not released.
-
- -- Christian Hammers <ch@debian.org>  Sun,  1 Aug 2004 20:27:55 +0200
-
-mysql-dfsg (4.0.20-7) unstable; urgency=medium
-
-  * Solved the upstream bug that error messages of the server are written
-    in a file that is then rotated away leaving mysqld logging effectively
-    to /dev/null. It now logs to a /usr/bin/logger process which puts the
-    messages into the syslog.
-    Modified files: /etc/init.d/mysql, /usr/bin/mysqld_safe and the 
-    logchecker files. Closes: #254070
-  * The initscript does no longer call mysqlcheck directly but via
-    /etc/mysql/debian-start which is a user customizable config script.
-  * Splitted the debconf "install and update notes" and only show them
-    when it is appropriate (thanks to Steve Langasek). Closes: #240515
-  * Added NEWS.Debian.
-  * Added hint to -DBIG_ROWS, which is currently not used, to README.Debian.
-  * Corrected typo in myisampack manpage (thanks to Marc Lehmann). 
-    Closes: #207090
-  * Added Catalan debconf translation (thanks to Aleix Badia i Bosch).
-    Closes: #236651
-
- -- Christian Hammers <ch@debian.org>  Wed, 28 Jul 2004 01:41:51 +0200
-
-mysql-dfsg (4.0.20-6) unstable; urgency=low
-
-  * The build arch detected by configure was "pc-linux-gnu (i686)"
-    instead of "pc-linux-gnu (i386)". Was no problem AFAIK but
-    Adam Majer asked me to explicitly change it to i386. Closes: #261382
-  * Removed some unused shell scripts from /usr/share/mysql.
-  * Added lintian overrides.
-  * Removed rpath by using chrpath.
-
- -- Christian Hammers <ch@debian.org>  Mon, 26 Jul 2004 00:17:12 +0200
-
-mysql-dfsg (4.0.20-5) unstable; urgency=medium
-
-  * The mysqlcheck in the init script is only called when the server
-    is really alive. Also, the mysql-user 'debian-sys-maint' now has
-    global select rights (thanks to Nathan Poznick). Closes: #261130 
-  * Moved the debconf question whether to remove the databases or not
-    from mysql-server.config to mysql-server.postrm so that it shows
-    up on purge time and not months earlier (thanks to Wouter Verhelst).
-    Closes: #251838
-
- -- Christian Hammers <ch@debian.org>  Fri, 23 Jul 2004 22:41:13 +0200
-
-mysql-dfsg (4.0.20-4) unstable; urgency=low
-
-  * Added a "mysqlcheck -A --fast" to the 'start' section of the
-    init script to help admins detect corrupt tables after a server crash.
-    Currently it exists with an error message but leaves the server
-    running. Feedback appreciated!
-  * Made postinst script more robust by calling db_stop earlier and
-    so prevent pipe-deadlocks.
-  * Fixed minor typos in initscript (thanks to "C.Y.M."). Closes: 259518
-  * Added the undocumented "-DBIG_JOINS" that MySQL apparently uses in
-    their MAX binaries. It enables 62 instead of 30 tables in a "join".
-    (thanks to Dave Rolsky). Closes: #260843
-  * Added a "df --portability /var/lib/mysql/." check to the preinst
-    script as users experienced hard to kill hanging mysqlds in such
-    a situation (thanks to Vaidas Pilkauskas). Closes: #260306
-
- -- Christian Hammers <ch@debian.org>  Fri, 23 Jul 2004 00:51:32 +0200
-
-mysql-dfsg (4.0.20-3) unstable; urgency=low
-
-  * Improved tolerance if the init script has been deleted (thanks to
-    Leonid Shulov for spotting the problem).
-  * Minor wording changes to README.Debian generalizing /root/ by $HOME
-    (thanks to Santiago Vila). Closes: #257725
-  * Added Japanese debconf translation (thanks to Hideki Yamane).
-    Closes: #256485
-  * Fixed commend in my.cnf regarding logfile directory (thanks to Jayen
-    Ashar). Closes: #253434
-  * Correted "ease to" by "ease of" in package description (thanks to
-    Johannes Berg). Closes: #253510 
-
- -- Christian Hammers <ch@debian.org>  Fri,  9 Jul 2004 00:57:42 +0200
-
-mysql-dfsg (4.0.20-2) unstable; urgency=low
-
-  * Removed RPM .spec file from the included documentation as it is pretty
-    useless (thanks to Loic Minier).
-  * Added turkish debconf translation (thanks to Recai Oktas). Closes: #252802
-
- -- Christian Hammers <ch@debian.org>  Sun,  6 Jun 2004 14:48:26 +0200
-
-mysql-dfsg (4.0.20-1) unstable; urgency=low
-
-  * New upstream version. 
-
- -- Christian Hammers <ch@debian.org>  Mon, 31 May 2004 23:36:39 +0200
-
-mysql-dfsg (4.0.18-8) unstable; urgency=low
-
-  * Updated french translation (thanks to Christian Perrier). Closes: #246789
-
- -- Christian Hammers <ch@debian.org>  Tue,  4 May 2004 23:26:54 +0200
-
-mysql-dfsg (4.0.18-7) unstable; urgency=low
-
-  * Added CVE ids for the recent security fixes.
-    4.0.18-4 is CAN-2004-0381 (mysqlbug) and
-    4.0.18-6 is CAN-2004-0388 (mysql_multi)
-
- -- Christian Hammers <ch@debian.org>  Mon, 19 Apr 2004 18:32:03 +0200
-
-mysql-dfsg (4.0.18-6) unstable; urgency=medium
-
-  * SECURITY:
-    Fixed minor tempfile-run security problem in mysqld_multi.
-    Unprivileged users could create symlinks to files which were then
-    unknowingly overwritten by run when this script gets executed.
-    Upstream informed. Thanks to Martin Schulze for finding this.
-
- -- Christian Hammers <ch@debian.org>  Wed,  7 Apr 2004 01:28:22 +0200
-
-mysql-dfsg (4.0.18-5) unstable; urgency=low
-
-  * Little improvements in debian scripts for last upload. 
-  * Added check to logrotate script for the case that a mysql
-    server is running but not be accessible with the username and
-    password from /etc/mysql/debian.conf (thanks to Jeffrey W. Baker).
-    Closes: 239421
-
- -- Christian Hammers <ch@debian.org>  Sun,  4 Apr 2004 15:27:40 +0200
-
-mysql-dfsg (4.0.18-4) unstable; urgency=medium
-
-  * SECURITY: 
-    Aplied fix for unprobable tempfile-symlink security problem in 
-    mysqlbug reported by Shaun Colley on bugtraq on 2004-03-24.
-  * Updated french debconf translation (thanks to Christian Perrier).
-    Closes: #236878 
-  * Updated portugesian debconf translation (thanks to Nuno Senica).
-    Closes: #239168
-  * Updated german debconf translation (thanks to Alwin Meschede).
-    Closes: #241749
-  * Improved debconf template regarding fix_privileges_tables (thanks 
-    to Matt Zimmermann for suggestions). Closes: #219400
-  * Improved README.Debian regarding to password settings (thanks to
-    Yann Dirson). Closes: #241328
-
- -- Christian Hammers <ch@debian.org>  Sat,  3 Apr 2004 19:52:15 +0200
-
-mysql-dfsg (4.0.18-3) unstable; urgency=medium
-
-  * Added Build-Depend to po-debconf to let it build everywhere.
-
- -- Christian Hammers <ch@debian.org>  Wed, 31 Mar 2004 23:43:33 +0200
-
-mysql-dfsg (4.0.18-2) unstable; urgency=low
-
-  * Added a "2>/dev/null" to a "which" command as there are two
-    "which" versions in Debian of which one needs it. Closes: #235363
-
- -- Christian Hammers <ch@debian.org>  Tue,  2 Mar 2004 23:31:28 +0100
-
-mysql-dfsg (4.0.18-1) unstable; urgency=low
-
-  * New upstream version.
-  * Should now compile and run on ia64 (thanks to Thorsten Werner and
-    David Mosberger-Tang). Closes: #226863 #228834 
-  * Converted init scripts to invoce-rc.d (thanks to Erich Schubert).
-    Closes: 232118 
-  * Secondlast upload changed logfile location. Closes: #182655
-  * Updated Brasilian translation (thanks to Andre Luis Lopes). Closes:
-    #219847
-
- -- Christian Hammers <ch@debian.org>  Tue, 17 Feb 2004 23:44:58 +0100
-
-mysql-dfsg (4.0.17-2) unstable; urgency=low
-
-  * Improved manpage for mysqldumpslow.1 (thanks to Anthony DeRobertis).
-    Closes: #231039
-  * Improved stopping of crashed daemons in init script (thanks to
-    Matthias Urlichs). Closes: #230327
-
- -- Christian Hammers <ch@debian.org>  Mon,  9 Feb 2004 21:54:29 +0100
-
-mysql-dfsg (4.0.17-1) unstable; urgency=low
-
-  * Made logging into /var/log/mysql/ the default. Closes: #225206
-  * New upstream version. Closes: #225028
-  * Turned on a 25MB query cache by default (thanks to Cyril Bouthors).
-    Closes: #226789
-  * Updated russian translation (thanks to Ilgiz Kalmetev). Closes: #219263
-  * Upstream fixes the problem that AND was not commutative (thanks for
-    Iain D Broadfoot for mentioning). Closes: #227927
-  * Fixed minor typo in my.cnf comments (thanks to James Renken). 
-    Closes: #221496
-  * Better documents regex. Closes: #214952
-  * Fixed minor germanism in debconf template (thanks to Marc Haber).
-    Closes: #224148
-  * Added explaining comment to my.cnf regarding quoted passwords 
-    (Thanks to Patrick von der Hagen). Closes: #224906
-  * Changed "find -exec" to "find -print0 | xargs -0" in preinst to
-    speed it up. Thanks to Cyril Bouthors. Closes: #220229
-
- -- Christian Hammers <ch@debian.org>  Sun, 18 Jan 2004 16:16:25 +0100
-
-mysql-dfsg (4.0.16-2) unstable; urgency=low
-
-  * Tried to repair undefined weak symbols by adding a little Makefile
-    patch. Closes: #215973
-
- -- Christian Hammers <ch@debian.org>  Mon, 27 Oct 2003 22:52:10 +0100
-
-mysql-dfsg (4.0.16-1) unstable; urgency=low
-
-  * New upstream release.
-    (Mostly little memory problems and other bugfixes it seems)
-  * Replaced "." by ":" in chown calls to comply with the env setting
-       "_POSIX2_VERSION=2000112" (thanks to Robert Luberda). Closes: #217399
-  * Adjusted syntax in my.cnf to 4.x standard (thanks to Guillaume Plessis).
-    Closes: #217273
-  * Improved README.Debian password instructions (thanks to Levi Waldron).
-    Closes: #215046
-  * Improved NIS warning debconf-template (thanks to Jeff Breidenbach).
-    Closes: #215791
-  * Explicitly added libssl-dev to the libmysqlclient-dev package as it
-    is needed for mysql_config and the libmysqlclient package only depends
-    on libssl which has no unnumbered .so version (thanks to Simon Peter
-    and Davor Ocelic). Closes: #214436, #216162
-  * Added "-lwrap" to "mysql_config --libmysqld-libs" and filed it as
-    upstream bug #1650 (thanks to Noah Levitt). Closes: #214636
-
- -- Christian Hammers <ch@debian.org>  Sat, 25 Oct 2003 01:09:27 +0200
-
-mysql-dfsg (4.0.15a-1) unstable; urgency=low
-
-  * Same package as 4.0.15-2 but I could not convince the Debian
-    installer to move the packages out of incoming.
-
- -- Christian Hammers <ch@debian.org>  Tue,  7 Oct 2003 15:10:26 +0200
-
-mysql-dfsg (4.0.15-2) unstable; urgency=low
-
-  * Updated package description (thanks to Adrian Bunk). Closes: #210988 
-  * Fixed small typos in manpages (thanks to Nicolas Francois).
-    Closes: #211983
-  * More updates to package description (thanks to Matthias Lutz/ddtp).
-    Closes: #213456
-  * Updated standards to 3.6.1.
-  * Closes "new 4.0.15 available" bug. Closes: #213349
-  * Updated README.Debian with notes regarding the MySQL manual section
-    "2.4 Post-installation Setup and Testing" (thanks to Daniel B.).
-    Closes: #210841
-
- -- Christian Hammers <ch@debian.org>  Fri,  3 Oct 2003 15:59:39 +0200
-
-mysql-dfsg (4.0.15-1) unstable; urgency=high
-
-  * SECURITY:
-    Users who are able to use the "ALTER TABLE" command on the "mysql"
-    database may be able to exploit this vulnerability to gain a shell with
-    the privileges of the mysql server (usually running as the 'mysql' user).
-    Closes: #210403
-  * Fixes small description typos (thanks to Oscar Jarkvik).
-  * Updated Brazilian Portuguese debconf translation. (thanks to Andre Luis
-    Lopes). Closes: 208030
-  * Replaced depricated '.' by ':' in chown (thanks to Matt Zimmerman).
-  * Fixed manpage typo (thanks to Marc Lehmann). Closes: #207090
-
- -- Christian Hammers <ch@debian.org>  Fri,  3 Oct 2003 15:59:35 +0200
-
-mysql-dfsg (4.0.14-1) unstable; urgency=low
-
-  * New upstream version. 
-
- -- Christian Hammers <ch@debian.org>  Sun, 24 Aug 2003 16:40:36 +0200
-
-mysql-dfsg (4.0.13-3) unstable; urgency=low
-
-  * Now start mysqld as default unless you choose not when configurig
-    with debconf priority low. So packages depending on the server when
-    installing can access it. Thanks Matt Zimmermann (Closes: #200277)
-  * Made mysql-server de-installable if the config and database files were
-    removed by hand before. Thanks to Ard van Breemen (Closes: #200304)
-
- -- Christian Hammers <ch@debian.org>  Tue,  8 Jul 2003 22:30:40 +0200
-
-mysql-dfsg (4.0.13-2) unstable; urgency=low
-
-  * Added "nice" option for mysqld_safe to give mysqld a different priority.
-    Submitted to upstream as MySQL Bug #627. Closes: #192087
-  * Fixed possible unbound variable in init script. Closes: #194621
-  * Fixed french debconf translation (thx Christian Perrier) Closes: #194739
-  * Get rid of automake1.5 (for Eric Dorland). 
-
- -- Christian Hammers <ch@debian.org>  Wed, 11 Jun 2003 18:58:32 +0200
-
-mysql-dfsg (4.0.13-1) unstable; urgency=medium
-
-  * New upstream version.
-    !!! Fixes a very bad natural join bug which justifies the urgency=medium.
-    !!! http://bugs.mysql.com/bug.php?id=291
-  * Fixed mysql_fix_privileges manpage (Frederic Briere) Closes: #191776
-  * preinst: "which" is more chatty normal executable than as builtin.
-    (Thanks to David B Harris). Closes: #188659
-
- -- Christian Hammers <ch@debian.org>  Tue,  6 May 2003 22:03:45 +0200
-
-mysql-dfsg (4.0.12-3) unstable; urgency=medium
-
-  * Reincluded new way of creating my debian-sys-maint user from
-    an old release from experimental. Now works again with old
-    and new privilege table format. (Thanks to Vincent Danjean
-    for spotting the problem) Closes: #188201
-  * Reincluded hurd build dependency fix from 3.23 branch.
-    (Thanks to Robert Millan). Closes: #185929
-  * Fixed soname in libmysqlclient-dev.  Closes: #188160
-  * Remove /var/log/mysql/ when purging the package. Closes: #188064
-  * Removed /usr/share/doc/mysql/ from mysql-server. Closes: #188066
-  * Let group "adm" be able to read logfiles. Closes: #188067
-  * Do not call usermod on every upgrade. Closes: #188248
-    (Thanks to Philippe Troin for the last three)
-  * Fixed mysql-server.preinst so that it works on shells where 
-    which is a builtin, too. (Thanks to Erich Schubert) Closes: #181525
-
- -- Christian Hammers <ch@debian.org>  Fri, 11 Apr 2003 11:32:45 +0200
-
-mysql-dfsg (4.0.12-2) unstable; urgency=low
-
-  *
-  * NEW MAJOR UPSTREAM RELEASE:
-  *
-    MySQL 4 has finally been declared as 'stable'. Hurray! Read changelogs.
-    Thanks to all testers, esp. Jose Luis Tallon, of the versions
-    that were in the "experimental" section before.
-  * Modified postinst script to run mysql_fix_privileges on every update.
-    IMPORTANT: Please report if this breaks anything, it is not supposed to.
-  * Wrote a SSL-MINI-HOWTO.txt!
-  * Added zlib1g-dev to libmysqlclient12-dev. Closes: 186656
-  * Changed section of libmysqlclient12-dev to libdevel.
-  * Added even more selfwritten manpages.
-  * Fixed typos.
-
- -- Christian Hammers <ch@debian.org>  Sun,  6 Apr 2003 13:47:32 +0200
-
-mysql-dfsg (4.0.10.gamma-1) experimental; urgency=low
-
-  * New upstream version.
-  * They merged some of my patches from debian/patches. Whoa!
-  * This release should fix the error-logfile problem where mysqld
-    keeps the error.log open while logrotate removes it.
-
- -- Christian Hammers <ch@debian.org>  Wed, 12 Feb 2003 22:39:48 +0100
-
-mysql-dfsg (4.0.9.gamma-1) experimental; urgency=low
-
-  * New upstream version. 
-  * Updated the GNU autoconf files to make building on MIPS work.
-    See bug #176829.
-
- -- Christian Hammers <ch@debian.org>  Wed, 29 Jan 2003 22:07:44 +0100
-
-mysql-dfsg (4.0.8.gamma-1) experimental; urgency=low
-
-  * New upstream release. 
-  * Improved logging of init script. Closes: #174790
-  * We have now libmysqlclient.so.12 instead of .11.
-
- -- Christian Hammers <ch@debian.org>  Thu,  9 Jan 2003 20:14:11 +0100
-
-mysql-dfsg (4.0.7.gamma-1) experimental; urgency=high
-
-  * SECURITY: This version fixes an upstream security release that is only
-              present in the 4.x branch which is currently only in the
-              experimental distribution and therefore will not get a DSA. 
-  * New upstream release.
-
- -- Christian Hammers <ch@debian.org>  Sat, 28 Dec 2002 15:51:39 +0100
-
-mysql-dfsg (4.0.6.gamma-2) experimental; urgency=low
-
-  * Added --system to addgroup. Closes: #173866
-
- -- Christian Hammers <ch@debian.org>  Sat, 21 Dec 2002 15:28:26 +0100
-
-mysql-dfsg (4.0.6.gamma-1) experimental; urgency=low
-
-  * New upstream version. Now Gamma!
-  * There are no longer changes to the .orig.tar.gz neccessary to make diff
-    happy. docs/ has still to be deleted, although, as it is non-free.
-  * Incorporated patches from unstable.
-  * Added mysqlmanager and a couple of other new scripts.
-  * Enabled libmysqld embedded server library.
-  * Enabled SSL and Virtual-IO support.
-    (CORBA based MySQL-FS seems to be not existing..)
-
- -- Christian Hammers <ch@debian.org>  Fri, 20 Dec 2002 22:30:51 +0100
-
-mysql-dfsg (4.0.5a.beta-3) experimental; urgency=low
-
-  * Modified postinst to work with old and new mysql.user table format
-    and fixed spelling typo in postinst. Thanks to Roger Aich.
-  * Updated config.{guess,sub} to make the mipsel porters happy.
-    Thanks to Ryan Murray. Closes: #173553
-
- -- Christian Hammers <ch@debian.org>  Wed, 18 Dec 2002 15:56:34 +0100
-
-mysql-dfsg (4.0.5a.beta-2) experimental; urgency=low
-
-  * Upstream removed option "--skip-gemini". So did I. Closes: 173142
-
- -- Christian Hammers <ch@debian.org>  Tue, 17 Dec 2002 10:35:49 +0100
-
-mysql-dfsg (4.0.5a.beta-1) experimental; urgency=low
-
-  * First 4.x experimental package due to continuous user requests :-)
-    Please test and report!
-  * upstream: safe_mysqld has been renamed to mysqld_safe
-  * upstream: new library soname version libmysqlclient.so.11
-  * Renamed libmysqlclientXX-dev to libmysqlclient-dev as I don't plan to
-    support more than one development environment and this makes the 
-    dependencies easier.
-  * FIXME: Skipped parts of the debian/patches/alpha patch as the global.h 
-    is not existing.
-  * FIXME: How to get rid this? Old ltconfig patch already applied.
-    "lintian: binary-or-shlib-defines-rpath ./usr/bin/mysql /usr/lib/mysql"
-
- -- Christian Hammers <ch@debian.org>  Sun,  1 Dec 2002 18:32:32 +0100
-
-mysql-dfsg (3.23.53-4) unstable; urgency=medium
-
-  * Fixed errno.h problem. Closes: #168533, #168535 
-
- -- Christian Hammers <ch@debian.org>  Sun, 10 Nov 2002 18:32:08 +0100
-
-mysql-dfsg (3.23.53-3) unstable; urgency=medium
-
-  * Changed automake build-dep to unversioned automake1.4. Closes: #166391
-  * Fixed description. Closes: #167270
-    (Thanks to Soren Boll Overgaard)
-
- -- Christian Hammers <ch@debian.org>  Tue,  5 Nov 2002 01:25:01 +0100
-mysql-dfsg (3.23.53-2) unstable; urgency=low
-
-  * Reverted user creation in init scripts. Closes: #166432
-    (Thanks to Birzan George Cristian) 
-
- -- Christian Hammers <ch@debian.org>  Thu, 31 Oct 2002 15:36:25 +0100
-
-mysql-dfsg (3.23.53-1) unstable; urgency=low
-
-  * New upstream release. 
-
- -- Christian Hammers <ch@debian.org>  Thu, 24 Oct 2002 23:04:16 +0200
-
-mysql-dfsg (3.23.52-3) unstable; urgency=low
-
-  * Substituted the first-install 'debian-sys-maint' user creation by
-    something ANSI SQL compliant. Closes: #163497
-    (Thanks to Karl Hammar)
-  * Tightend dependency to debhelper (>= 4.0.12) to be sure that
-    debconf-utils gets installed, too, as I use dh_installdebconf.
-  * Fixed upstream manpage bug in mysqldump.1. Closes: #159779
-    (Thanks to Colin Watson) 
-  * Added comment about MIN_WORD_LEN to mysql-server.README.Debian
-    (Thanks to Philipp Dreimann)
-  * Added a dependency for zlib1g-dev to libmysqlclient10-dev.
-    (Thanks to Jordi Mallach)
-
- -- Christian Hammers <ch@debian.org>  Sun, 15 Sep 2002 17:14:44 +0200
-
-mysql-dfsg (3.23.52-2) unstable; urgency=low
-
-  * Fixed typo in preinst scripts.
-  * Removed bashism in init script.
-  * Fixed ambiguous debconf example. Closes: #158884
-
- -- Christian Hammers <ch@debian.org>  Fri, 30 Aug 2002 00:51:29 +0200
-
-mysql-dfsg (3.23.52-1) unstable; urgency=low
-
-  * New upstream version. Closes: #157731
-  * Clearified the meaning of the debian-sys-maint special user in the
-    README.Debian file. Closes: #153702
-  * Wrote some words regarding the skip-networking in README.Debian.
-    Closes: #157038
-  * Added dependency to passwd. 
-  * Fixes typo and unnecessarily complication in is_mysql_alive().
-  * Added check for /etc/mysql/my.cnf in init script.
-
- -- Christian Hammers <ch@debian.org>  Tue, 27 Aug 2002 01:53:32 +0200
-
-mysql-dfsg (3.23.51-4) unstable; urgency=low
-
-  * Added a compressed "nm mysqld" output to allow people to trace
-    core dumps with /usr/bin/resolve_stack_dump as suggested in the
-    INSTALL-SOURCE file. Thanks to atudor@labs.agilent.com for the hint.
-
- -- Christian Hammers <ch@debian.org>  Wed, 24 Jul 2002 20:44:55 +0200
-
-mysql-dfsg (3.23.51-3) unstable; urgency=low
-
-  * Corrected copyright file: the MySQL client library is licenced under
-    the LGPL-2 not the GPL. From version 4.x it actually will be GPL this
-    is why parts of http://www.mysql.com/ already say so. Closes: #153591
-  * Corrected german translation.
-    Thanks to Roland Rosenfeld <roland@spinnaker.de>. Closes: #151903 
-
- -- Christian Hammers <ch@debian.org>  Thu, 11 Jul 2002 20:32:28 +0200
-
-mysql-dfsg (3.23.51-2) unstable; urgency=low
-
-  * Improved NIS tolerance in preinst script. 
-
- -- Christian Hammers <ch@debian.org>  Sun,  7 Jul 2002 04:43:28 +0200
-
-mysql-dfsg (3.23.51-1) unstable; urgency=medium
-
-  * New upstream version.
-  * I applied a patch that fixes a binary imcompatibility in
-    the shared libary libmysqlclient.so.10 between 3.23.50 and
-    some versions earlier. Upstream has been contacted and asked
-    for clarification. Closes: #149952
-  * Added support for NIS i.e. it shows a warning and fails if the
-    needed 'mysql' user does not exists but works if it does.
-    Closes: #143282, #147869
-  * Substituted $0 in init scripts by something really weird so that
-    "./S20mysql restart" works now, too. (BTW: S20? install file-rc!!!)
-    Closes: #148658
-  * Now postinst works even if /etc/init.d/mysql is removed. Closes: #151021
-  * Decided to leave "set +x" in postinst but wrote comment. Closes: #151022
-
- -- Christian Hammers <ch@debian.org>  Sun,  7 Jul 2002 04:43:25 +0200
-
-mysql-dfsg (3.23.50-1) unstable; urgency=medium
-
-  * New upstream version.
-    Fixes a very annoying and important bug that lets all mysql programs
-    including perl scripts etc. segfault when using the read_default_group()
-    function. 3.23.50 is currently a pre-release and expected to be released
-    next week. I plan to propose it for woody as soon as its stability has
-    been proven. The following bug reports are all regarding this issue.
-    Closes: #144960, #145322, #136798, #138143,
-
- -- Christian Hammers <ch@debian.org>  Sat, 18 May 2002 21:14:01 +0200
-
-mysql-dfsg (3.23.49x-1) unstable; urgency=low
-
-  * I had to split the package to seperate the manual as it is not GPL
-    like the rest of the software and docs but under a license that
-    e.g. forbids selling printed versions. 
-    .
-    The upstream authors were contacted a while ago but did not like to
-    change the situation.
-    .
-    The names of the resulting packages have not changed as the manual
-    already was in a seperate mysql-doc package due to it's size. 
-    The source packages are now splitted from one "mysql" to 
-    "mysql-dfsg" in main and "mysql-nonfree" in non-free.
-  * No code change! 
-    The "x" at the end of the version number ist just to be able to 
-    upload a new source package. ("a" was already taken by upstream 
-    for their binary upload correction)  
-
- -- Christian Hammers <ch@debian.org>  Wed,  8 May 2002 02:01:41 +0200
-
-mysql (3.23.49-8) unstable; urgency=low
-
-  * Substituted $0 in init script to let e.g. "/etc# ./init.d/mysql restart"
-    works, too. Closes: #141555
-
- -- Christian Hammers <ch@debian.org>  Sun,  7 Apr 2002 15:00:44 +0200
-
-mysql (3.23.49-7) unstable; urgency=low
-
-  * The Makefiles are totally broken for the --enable-local-infile
-    option. I now patched libmysql/libmysql.c#mysql_init() manually.
-    Closes: #138347 
-
- -- Christian Hammers <ch@debian.org>  Fri, 29 Mar 2002 23:55:15 +0100
-
-mysql (3.23.49-6) unstable; urgency=low
-
-  * Moved mysqlcheck from server to client package. Closes: #139799
-  * Added manpage for mysqlhotcopy. Regarding: #87097 
-  * Added 'sharedscripts' directive to the logrotate script.
-  * Replaced grep by /usr/bin/getent to let the group/user checking work
-    on NIS/LDAP systems, too. Closes: #115677, #101529
-
- -- Christian Hammers <ch@debian.org>  Fri, 22 Mar 2002 22:40:51 +0100
-
-mysql (3.23.49-5) unstable; urgency=low
-
-  * Added skip-innodb to default my.cnf.
-  * Enabled --enable-local-infile, it seems to be a new option that
-    defaults to disable a formerly enabled feaure. Closes: #137115
-
- -- Christian Hammers <ch@debian.org>  Sat, 16 Mar 2002 00:29:10 +0100
-
-mysql (3.23.49-4) unstable; urgency=medium
-
-  * Recompiled against fixed libz.
-
-  * Enabled --enable-local-infile, it seems to be a new option that
-    defaults to disable a formerly enabled feaure. Closes: #137115
-  * Fixed README.compile_on_potato. Closes: #136529 
-  * Now a ext3 .jounal file in /var/lib/mysql does not prevent the
-    installation (happens when creating a jounal on an already mounted
-    partition). Closes: #137146
-
- -- Christian Hammers <ch@debian.org>  Wed, 13 Mar 2002 13:34:24 +0100
-
-mysql (3.23.49-3) unstable; urgency=low
-
-  * Added Russian translation. Closes: #135846
-  * Fixed installation of .info documents. Closes: #135030
-
- -- Christian Hammers <ch@debian.org>  Wed, 27 Feb 2002 23:36:35 +0100
-
-mysql (3.23.49-2) unstable; urgency=low
-
-  * Updated french translation and split template files. Closes: #134754 
-  * Fixed a small debian.cnf related bug in mysql-server.postinst.
-
- -- Christian Hammers <ch@debian.org>  Tue, 19 Feb 2002 23:13:58 +0100
-
-mysql (3.23.49-1) unstable; urgency=low
-
-  * New upstream release.
-    (Mainly InnoDB related fixes)
-  * Exported a $HOME variable in the scripts so that /root/.my.cnf
-    is not read anymore. This will avoid problems when admins put 
-    only passwords but no usernames in this file. Closes: #132048
-  * New debian-sys-maint password algorithm (now ~96bit :-)) Closes: #133863
-  * Recreating debian-sys-main pwd on every install to help people who
-    accidently delete user or password files...
-  * Added /var/log/mysql so that user can put the binary logs in there as
-    mysql cannot write the .001 etc files itself in /var/log which is 
-    owned by root.
-
- -- Christian Hammers <ch@debian.org>  Thu, 14 Feb 2002 22:17:45 +0100
-
-mysql (3.23.47-6) unstable; urgency=low
-
-  * Dropped a sentence about the new debian-sys-maint user in the
-    debconf note and updated the README.Debian.  Related: #132048
-  * Added more french translation. Closes: #132390 
-
- -- Christian Hammers <ch@debian.org>  Wed,  6 Feb 2002 09:41:29 +0100
-
-mysql (3.23.47-5) unstable; urgency=low
-
-  * Fixed grammar error in template. Closes: #132238 
-  * Really fixed typo in logrotate script. Closes: #131711
-
- -- Christian Hammers <ch@debian.org>  Tue,  5 Feb 2002 14:20:08 +0100
-
-mysql (3.23.47-4) unstable; urgency=medium
-
-  * Fixes typo in postinst that let init script fail. Closes: #131743
-  * Fixed bashism bug that failed on ash. Closes: #131697
-  * Fixed typo in logrotate script. Closes: #131711
-
- -- Christian Hammers <ch@debian.org>  Thu, 31 Jan 2002 23:58:46 +0100
-
-mysql (3.23.47-3) unstable; urgency=low
-
-  * Added new Debian specific mysql user called 'debian-sys-maint' which
-    is used for pinging the server status, flushing the logs or shutting
-    down the server in maintenance scripts. The credentials of this user
-    are stored in the UID0-only readable file /etc/mysql/debian.cnf.
-    Closes: #129887, #130326, #99274
-  * Fixed unintended server startup at boottime. Closes: #122676, #130105
-  * New upstream fixes command line parsing bug: Closes: #128473
-  * Fixed manpage headers to let apropos work: Closes: #119122
-  * Added "status" options for /etc/init.d/mysql. Closes: #129020
-
- -- Christian Hammers <ch@debian.org>  Sun, 27 Jan 2002 19:46:11 +0100
-
-mysql (3.23.47-2) unstable; urgency=low
-
-  * Enhanced init scripts by using mysqladmin instead of kill $pid.
-    Thanks to Aaron Brick. 
-
- -- Christian Hammers <ch@debian.org>  Fri, 18 Jan 2002 01:42:23 +0100
-
-mysql (3.23.47-1) unstable; urgency=low
-
-  * New upstream release.
-  * Updated brazilian translation of debconf descriptions. Closes: #123332
-
- -- Christian Hammers <ch@debian.org>  Sun,  6 Jan 2002 21:11:17 +0100
-
-mysql (3.23.46-3) unstable; urgency=low
-
-  * Fixed bug in postinst where a script was accidently called with
-    "bash -c <script> -IN_RPM" prevting the first argument to take effect
-    and then leading to failures on hosts with unresolvable hostnames.
-    Closes: #126147
-  * Small changes and comments in postinst. 
-
- -- Christian Hammers <ch@debian.org>  Sat, 22 Dec 2001 14:03:02 +0100
-
-mysql (3.23.46-2) unstable; urgency=low
-
-  * Start/stop behaviour now configurable via debconf. Closes: #112174 
-
- -- Christian Hammers <ch@debian.org>  Sun,  9 Dec 2001 21:38:54 +0100
-
-mysql (3.23.46-1) unstable; urgency=low
-
-  * New upstream release. 
-    Only few fixes, mainly innodb related. 
-
- -- Christian Hammers <ch@debian.org>  Sun,  2 Dec 2001 03:08:48 +0100
-
-mysql (3.23.45-1) unstable; urgency=low
-
-  * New upstream version. 
-    Only few fixes, mainly innodb related. 
-  * Added debconf note regarding the skip-networking option.
-
- -- Christian Hammers <ch@debian.org>  Sun, 25 Nov 2001 16:50:37 +0100
-
-mysql (3.23.44-2) unstable; urgency=low
-
-  * Finally removed debconf toggled "skip-networking" line add/remove 
-    code for /etc/mysql/my.cnf. I don't like editing a file that's tagged
-    as configuration file.
-    I disabled networking by default for security reasons. Better ideas?
-
- -- Christian Hammers <ch@debian.org>  Fri, 16 Nov 2001 02:11:02 +0100
-
-mysql (3.23.44-1) unstable; urgency=low
-
-  * New upstream release.
-    - fixes replication bug (core dump)
-  * Made description better english :) Thanks to D. Welton. 
-
- -- Christian Hammers <ch@debian.org>  Sun, 11 Nov 2001 15:44:07 +0100
-
-mysql (3.23.43-4) unstable; urgency=low
-
-  * Disabled statically linking. 
-
- -- Christian Hammers <ch@debian.org>  Sat, 10 Nov 2001 03:15:56 +0100
-
-mysql (3.23.43-3) unstable; urgency=low
-
-  * Changed compiler settings after one user reported instabilities.
-    See #116631 for more information. 
-
- -- Christian Hammers <ch@debian.org>  Tue, 30 Oct 2001 21:39:17 +0100
-
-mysql (3.23.43-2) unstable; urgency=low
-
-  * Patched sparc mutexes again. Closes: #113430 
-
- -- Christian Hammers <ch@debian.org>  Sun,  7 Oct 2001 15:09:00 +0200
-
-mysql (3.23.43-1) unstable; urgency=low
-
-  * New upstream version.
-    - Fixed some unlikely(sic!) bugs and core dumps.
-    - Fixed a bug with BDB tables and UNIQUE columns that are NULL.
-    - [more minor bugs were fixed; see changelog]
-  * Adjusted build depends on libwrap0 for IA-64. Closes: #114582
-  * Added the mysqlcheck binary. Closes: #114490
-  * Fixed rules for arm architecture. Closes: #88186
-  * Renamed mysql_print_defaults to the original name my_print_defaults.
-    Isn't as descriptive but else I'd have to patch too much. Closes: #114492
-
- -- Christian Hammers <ch@debian.org>  Fri,  5 Oct 2001 22:24:40 +0200
-
-mysql (3.23.42-2) unstable; urgency=low
-
-  * Applied patch for m68k compile. Closes: #112904 
-
- -- Christian Hammers <ch@debian.org>  Sun, 23 Sep 2001 21:32:57 +0200
-
-mysql (3.23.42-1) unstable; urgency=low
-
-  * New upstream releae.
-    Fixes critical bug with InnoDB and large BLOBs. 
-
- -- Christian Hammers <ch@debian.org>  Tue, 18 Sep 2001 22:25:47 +0200
-
-mysql (3.23.41-2) unstable; urgency=low
-
-  * Fixed shlibs.local problem. Closes: #111573 
-  * Replaced emacs by sensible-editor in mysqlbug.sh. Thanks Hans Ginzel.
-
- -- Christian Hammers <ch@debian.org>  Sun,  9 Sep 2001 17:16:42 +0200
-
-mysql (3.23.41-1) unstable; urgency=low
-
-  * New upstream release
-  * Fixed build problem on ia64. Closes: #110624
-
- -- Christian Hammers <ch@debian.org>  Tue, 14 Aug 2001 23:20:35 +0200
-
-mysql (3.23.40-1) unstable; urgency=low
-
-  * New upstream release
-
- -- Christian Hammers <ch@debian.org>  Sun,  5 Aug 2001 19:46:18 +0200
-
-mysql (3.23.39-5) unstable; urgency=low
-
-  * Added debconf template for brazil. Closes: #106934, #106752 
-  * Tightened dependencies on debconf.
-  * Adjusted mysql.err permissions in logrotate script to 0600. Closes: #105672
-
- -- Christian Hammers <ch@debian.org>  Mon, 30 Jul 2001 00:10:12 +0200
-
-mysql (3.23.39-4.1) unstable; urgency=low
-
-  * Maintainer-requested NMU.
-  * Fixing thread mutexes on Sparc and Alpha
-    (closes: Bug#101783)
-  * Added --enable-assembler for sparc.  This should
-    allow mysql on sparc to use assembler versions of
-    some string functions (read: should speed up a bit).
-
- -- Christopher C. Chimelis <chris@debian.org>  Fri, 13 Jul 2001 15:09:30 -0400
-  
-mysql (3.23.39-4) unstable; urgency=low
-
-  * Porting fixes.
-
- -- Christian Hammers <ch@debian.org>  Mon,  9 Jul 2001 17:56:54 +0200
-
-mysql (3.23.39-3.1) unstable; urgency=low
-
-  * NMU (for porting)
-  * Update config.sub and config.guess for hppa, sh & s390.
-  * Add --with-client-ldflags=-lstdc++ to configure line.  Closes: #100884
-
- -- Matthew Wilcox <willy@debian.org>  Sun,  8 Jul 2001 19:26:59 -0600
-
-mysql (3.23.39-3) unstable; urgency=low
-
-  * Disabled berkeley-db on sparc again. Mutexes aren't working again :-( 
-
- -- Christian Hammers <ch@debian.org>  Sat,  7 Jul 2001 18:30:08 +0200
-
-mysql (3.23.39-2) unstable; urgency=low
-
-  * Bugfixed the m68k mutex patch. Thanks to Michael Fedrowitz. Closes: #103145 
-  * Removed config.cache files in bdb/ and innobase/. Closes: #103143
-
- -- Christian Hammers <ch@debian.org>  Wed,  4 Jul 2001 22:06:58 +0200
-
-mysql (3.23.39-1) unstable; urgency=low
-
-  * New upstream release. Minor bugfixes only. 
-
- -- Christian Hammers <ch@debian.org>  Thu, 14 Jun 2001 13:53:03 +0200
-
-mysql (3.23.38-4) unstable; urgency=low
-
-  * Added logcheck files. Closes: #99131
-    (I can't let the usermod away since I don't know of an easy way to
-    retrive "passwd" information in a shell script considering that 
-    people use different storage methods like LDAP/NIS instead of passwd.)
-
- -- Christian Hammers <ch@debian.org>  Fri,  8 Jun 2001 21:04:25 +0200
-
-mysql (3.23.38-3) unstable; urgency=low
-
-  * Explicit pointet to /root/.my.cnf to let /etc/init.d/mysql stop
-    work in sudo environments with $HOME!=/root work, too. Closes: #98324
-  * Removes empty /etc/mysql on purge. Closes: #98164
-
- -- Christian Hammers <ch@debian.org>  Tue, 22 May 2001 10:13:06 +0200
-
-mysql (3.23.38-2) unstable; urgency=low
-
-  * Added depends to libdbd-mysql-perl for mysql-server. Closes: #94306
-
- -- Christian Hammers <ch@debian.org>  Sat, 19 May 2001 19:43:26 +0200
-
-mysql (3.23.38-1) unstable; urgency=low
-
-  * New upstream release. 
-  * Added Build-Depends to procps. Closes: #96768
-
- -- Christian Hammers <ch@debian.org>  Sun, 13 May 2001 17:30:15 +0200
-
-mysql (3.23.37-5) unstable; urgency=low
-
-  * Applied mutex patch for bdb support on m68k. 
-    Thanks to Michael Fedrowitz for the patch.
-
- -- Christian Hammers <ch@debian.org>  Mon,  7 May 2001 12:30:40 +0200
-
-mysql (3.23.37-4) unstable; urgency=low
-
-  * Enable bdb support for m68k architecture.
-
- -- Christian Hammers <ch@debian.org>  Sat,  5 May 2001 16:47:36 +0200
-
-mysql (3.23.37-3) unstable; urgency=low
-
-  * Added thread-safe client library. Thanks to Shane Wegner. Closes: #95441 
-
- -- Christian Hammers <ch@debian.org>  Sat, 28 Apr 2001 09:45:00 -0400
-
-mysql (3.23.37-2) unstable; urgency=low
-
-  * Added sparc to the list of BDB supporting architectures after some
-    tests on vore.debian.org and mails with Ben Collons.
-
- -- Christian Hammers <ch@debian.org>  Fri, 27 Apr 2001 09:30:09 -0400
-
-mysql (3.23.37-1) unstable; urgency=low
-
-  * New upstream version. 
-  * Added gemini table support.
-  * Does anybody know how to enable SSL?
-  * Fixed ARM compilation problem. Closes: #88186
-
- -- Christian Hammers <ch@debian.org>  Sat, 21 Apr 2001 11:48:46 -0400
-
-mysql (3.23.36-2) unstable; urgency=low
-
-  * Added patch by Christopher C. Chimelis <chris@debian.org> to make
-    Berkeley db3 work again on Alpha architecture. Closes: #92787
-
- -- Christian Hammers <ch@debian.org>  Tue,  3 Apr 2001 23:41:46 +0200
-
-mysql (3.23.36-1) unstable; urgency=high
-
-  * New upstream version.
-  * SECURITY FIX: One could place database tables outside the database
-    directory by using '..' in one of the mysql helper programs where the
-    table name was not checked correctly. This could lead to root compromise
-    if the server would be running as root else you could at least do bad
-    things as user mysql.
-  * upstream: Fixed bug when thread creation failed.
-  * upstream: Fixed problem in Innobase with non-latin1 charsets
-  * upstream: Fixed a core-dump bug when using very complex query with DISTINGT
-  * upstream: many others so called minor bugs...
-  * fixes bug in init script. Closes: #90257 
-    (this report was agains some older problem that has been fixed too in .33)
-
- -- Christian Hammers <ch@debian.org>  Fri, 30 Mar 2001 02:55:12 +0200
-
-mysql (3.23.35-1) unstable; urgency=medium
-
-  * New upstream relase.
-  * Fixes problem in ORDER BY clause. People using 3.33.34 should upgrade!
-  * Includes innobase support.
-    (Hope this is not such a catastrophe like berkeley db...)
-
- -- Christian Hammers <ch@debian.org>  Fri, 16 Mar 2001 23:30:30 +0100
-
-mysql (3.23.33-3) unstable; urgency=low
-
-  * Forgot #!/bin/sh at top of mysql-doc.postinst. Closes: #89801 
-
- -- Christian Hammers <ch@vore.debian.org>  Thu, 15 Mar 2001 20:38:35 -0500
-
-mysql (3.23.33-2) unstable; urgency=low
-
-  * Added some missing scripts and manpages. Closes: #84068
-  * Added dependency to perl-5.6. Closes: #81942 
-  * Added french templates somewhen ago. Closes: #83790
-  * Added patch to get db3 working on Alpha. Closes: #86033
-    Thanks to Christopher C. Chimelis <chris@debian.org>. The patch
-    itself is included as debian/patch.alpha, too.
-
- -- Christian Hammers <ch@debian.org>  Sun, 18 Feb 2001 06:40:40 +0100
-
-mysql (3.23.33-1) unstable; urgency=high
-
-  * Fixes two security bugs that allowes crashing the server and maybe
-    gaining the UID of the process that is linked against libmysqlclient!
-
- -- Christian Hammers <ch@debian.org>  Tue, 13 Feb 2001 23:01:18 +0100
-
-mysql (3.23.32-1) unstable; urgency=low
-
-  * New upstream releaes.
-    (just minor fixes)
-  * Added french and german debconf templates. 
-
- -- Christian Hammers <ch@debian.org>  Sun,  4 Feb 2001 17:27:07 +0100
-
-mysql (3.23.31-1) unstable; urgency=high
-
-  * New upstream release.
-  * Fixes security bug that was announced at BUGTRAQ mailing list.
-    (Disappointingly not by mysql.com!). And allows a buffer overflow
-    and therefore access to the mysql UID and all databases when already
-    having a valid account. Closes: #82881
-
- -- Christian Hammers <ch@debian.org>  Sat, 20 Jan 2001 11:14:36 +0100
-
-mysql (3.23.30-2) unstable; urgency=low
-
-  * Recompiled with new dpkg-dev. 
-
- -- Christian Hammers <ch@debian.org>  Sun, 14 Jan 2001 22:20:55 +0100
-
-mysql (3.23.30-1) unstable; urgency=low
-
-  * New upstream release. 
-
- -- Christian Hammers <ch@debian.org>  Sun,  7 Jan 2001 22:10:18 +0100
-
-mysql (3.23.28-10) testing unstable; urgency=low
-
-  * I must upload to "testing" to get it into woody, right?! 
-
- -- Christian Hammers <ch@debian.org>  Fri, 29 Dec 2000 14:43:57 +0100
-
-mysql (3.23.28-9) unstable; urgency=low
-
-  * Made it a replacement for libmysqlclient9. 
-
- -- Christian Hammers <ch@westend.com>  Mon, 25 Dec 2000 19:15:04 +0100
-
-mysql (3.23.28-8) unstable; urgency=low
-
-  * Applied patch from a user to get the skip-networking option working!
-    Approved from a mysql employee but please test anyways.
-    This finally: Closes: #79672, #78634, #79660, #79658
-
- -- Christian Hammers <ch@debian.org>  Sat, 16 Dec 2000 14:01:36 +0100
-
-mysql (3.23.28-6) unstable; urgency=medium
-
-  * Fixed error in postinst. Closes: #79392, #79400, #79451, #79550
-  * Added .info files again on user request. Closes: #78988, #75737 
-
- -- Christian Hammers <ch@debian.org>  Wed, 13 Dec 2000 21:18:24 +0100
-
-mysql (3.23.28-5) unstable; urgency=low
-
-  * Fixed a stupid bug in mysql-server.postinst regarding the 
-    configuration of skip-networking. Closes: #78639, 78634
-  * Used patched bdb which hopefully enables mutexes on Alpha. Closes: #78197
-  * Added dependency to adduser. Closes: #76798
-
- -- Christian Hammers <ch@debian.org>  Sun, 10 Dec 2000 16:55:48 +0100
-
-mysql (3.23.28-4) unstable; urgency=low
-
-  [never uploaded]
-  * Fixed a stupid bug in mysql-server.postinst regarding the 
-    configuration of skip-networking. Closes: #78639, 78634
-  * Used patched bdb which hopefully enables mutexes on Alpha. Closes: #78197
-
- -- Christian Hammers <ch@debian.org>  Sun,  3 Dec 2000 17:49:44 +0100
-
-mysql (3.23.28-3) unstable; urgency=low
-
-  * This time really fixed m68k build error. Closes: #78235 
-
- -- Christian Hammers <ch@debian.org>  Sun,  3 Dec 2000 15:02:55 +0100
-
-mysql (3.23.28-2) unstable; urgency=low
-
-  * Adjusted rules file to make it buildable on m86k. Closes: #78235 
-
- -- Christian Hammers <ch@debian.org>  Fri,  1 Dec 2000 20:07:26 +0100
-
-mysql (3.23.28-1) unstable; urgency=low
-
-  * New upstream vesrion. Now gamma! 
-  * Changed umask of mysql.log making it o-rw
-  * Disabled listening on network reachable TCP ports by default due to
-    security considerations.
-
- -- Christian Hammers <ch@debian.org>  Thu, 23 Nov 2000 20:12:50 +0100
-
-mysql (3.23.27-1) unstable; urgency=low
-
-  * New upstream version.
-  * Closes: #75711
-
- -- Christian Hammers <ch@debian.org>  Sun, 29 Oct 2000 14:29:51 +0100
-
-mysql (3.23.25-4) unstable; urgency=low
-
-  * Recompiled to get rid of the dependency for zlib1 (libc5).
-    Closes: #74952, #74939
-
- -- Christian Hammers <ch@debian.org>  Tue, 17 Oct 2000 14:34:52 +0200
-
-mysql (3.23.25-3.1) unstable; urgency=low
-
-  * Maintainer-approved NMU.
-  * Includes patch to fix and enable db3 support on Alpha.
-  * Enable support for thread mutexes in db3 on sparc
-    (it works after all, according to Ben Collins)
-  * Removed atomic_ functions for Alpha since they are no
-    longer supported in the current glibc in woody.
-  * Cleaned up rules file a bit.
-
- -- Christopher C. Chimelis <chris@debian.org>  Sat, 14 Oct 2000 04:22:02 -0400
-
-mysql (3.23.25-3) unstable; urgency=low
-
-  * Upstream decided not to include my_config.h,my_dir.h into the installed
-    header files. As this file contains at least informative material
-    and more important is checked by several autoconf scripts I
-    included it by hand again.
-  * Made building of berkeley db conditional to architecture until
-    I get response whether it works on sparc/alpha now.
-
- -- Christian Hammers <ch@debian.org>  Wed, 11 Oct 2000 23:58:38 +0200
-
-mysql (3.23.25-2) unstable; urgency=medium
-
-  * Last build went terrible wrong.. Here's the changelog again:
-  * New upstream release.
-  * Shared library version was raised from 9 to 10.
-    Maintainers of packets using libmysqlclient9 must recompile!
-
- -- Christian Hammers <ch@debian.org>  Wed, 11 Oct 2000 01:16:34 +0200
-
-mysql (3.23.25-1) unstable; urgency=low
-
-  * New upstream release.
-  * Shared library version was raised from 9 to 10.
-    Maintainers of packets using libmysqlclient9 must recompile!
-
- -- Christian Hammers <ch@debian.org>  Sat,  7 Oct 2000 18:21:51 +0200
-
-mysql (3.23.24-2) unstable; urgency=low
-
-  * Applied upstream patch regarding quoting of mysqldump.
-  * Updated to db-3.1.17-patched (from www.mysql.com)
-
- -- Christian Hammers <ch@debian.org>  Fri, 15 Sep 2000 18:58:14 +0200
-
-mysql (3.23.24-1) unstable; urgency=medium
-
-  * New upstream version with some important fixes.
-  * upstream: Last version corrupted CHAR/VARCHAR/BLOB columns with 
-    chararacters above ASCII 128! Check and repair all these tables. 
-  * upstream: fixed small memory leak
-  * upstream: fixed problem with BDB tables and reading on unique
-              (not primary) key.
-  * Disabled BDB tables on all architectures except i386 due to many
-    bug reports (see #71206).  -> HELP APPRECIATED <-
-
- -- Christian Hammers <ch@debian.org>  Tue, 12 Sep 2000 06:18:54 +0200
-
-mysql (3.23.23-2) unstable; urgency=low
-
-  * Strange... "nohup nice" gives differnet results and let therefore
-    crash safe_mysqld when starting up. Apparently it seems to be
-    kernel dependand. Now fixed by another conditional. This
-    more or less Closes: #71057
-  * This bug was reported (accidently) in the following identical reports:
-    Closes: #71253, #71254, #71257, #71258, #71259, #71262, #71266, #71267
-    Closes: #71268, #71271, #71275, #71277, #71278, #71283, #71291
-
- -- Christian Hammers <ch@debian.org>  Sat,  9 Sep 2000 20:13:50 +0200
-
-mysql (3.23.23-1) unstable; urgency=low
-
-  * New upstream version. Feature freeze!
-  * Fixed source build problem. Closes: #70707 
-
- -- Christian Hammers <ch@debian.org>  Thu, 31 Aug 2000 10:03:35 +0200
-
-mysql (3.23.22b-1) unstable; urgency=low
-
-  * Reorganised docs. Now we have several small html files instead of
-    one with almost 2M. Closes: 70431
-  * Removed pdf,ps and html from source package shrinked it about 3M
-    (therefore the .orig.tar.gz is called 3.23.22b!)
-  * -> Last upload failed due to problems at the FTP site so here the 
-    -> changelog again:
-  * Fixes memory leak, commit/rollback, reserved word "MASTER" ...
-  * Added Berkeley DB3 source code to the Debian diff to be able to
-    compile with bdb transaction support! (Great feature!!!)
-  * Upstream correction of error message. Closes: #68939
-  * Upstream correction of reserved word "source".
-
- -- Christian Hammers <ch@debian.org>  Fri, 25 Aug 2000 19:21:24 +0200
-
-mysql (3.23.22-1) unstable; urgency=low
-
-  * New upstream version.
-  * Fixes memory leak, commit/rollback, reserved word "MASTER" ...
-  * Added Berkeley DB3 source code to the Debian diff to be able to
-    compile with bdb transaction support! (Great feature!!!)
-  * Upstream correction of error message. Closes: #68939
-  * Upstream correction of reserved word "source".
-
- -- Christian Hammers <ch@debian.org>  Sun, 20 Aug 2000 09:05:48 +0200
-
-mysql (3.23.21-4) unstable; urgency=low
-
-  * Added libmysqlclient9.shlibs and shlibs.local file. Closes: #68669
-
- -- Christian Hammers <ch@debian.org>  Wed,  9 Aug 2000 14:22:49 +0200
-
-mysql (3.23.21-3) unstable; urgency=low
-
-  * Let "/etc/init.d/mysql restart" wait until the pid has been
-    removed before (but max 6 seconds) before restarting. Closes: 65070
-  * Added build dependencies. 
-
- -- Christian Hammers <ch@debian.org>  Sun, 30 Jul 2000 16:16:48 +0200
-
-mysql (3.23.21-2) unstable; urgency=low
-
-  * Typo in safe_mysqld prevents start.
-
- -- Christian Hammers <ch@debian.org>  Sat, 29 Jul 2000 13:40:50 +0200
-
-mysql (3.23.21-1) unstable; urgency=low
-
-  * New upstream version.
-
- -- Christian Hammers <ch@debian.org>  Mon, 10 Jul 2000 22:54:17 +0200
-
-mysql (3.23.20-1) unstable; urgency=low
-
-  * MySQL finally got fully GPL'ed! This means that there is only one
-    souce package and only main/* binary packages from now on.
-  * Fixed symlink in libmysqlclient9-dev. Closes: 66452
-  * Apart from that the usual bug fixes for BETA software.
-
- -- Christian Hammers <ch@debian.org>  Mon,  3 Jul 2000 20:05:38 +0200
-
-mysql-pd (3.23.16-1) unstable; urgency=low
-
-  * New upstream release. (Actually a brand new upstream branch!)
-  * Added mysql-common package as the configuration file can be used
-    by all versions of the mysql client library.
-    Did some more package reorganisations, too. See README.Debian file!
-  * libmysqlclient.so raised major version from 6 to 9.
-  * Minor beautifications in the debian/ directory.
-
- -- Christian Hammers <ch@debian.org>  Sat, 27 May 2000 20:30:01 +0200
-
-mysql-gpl (3.22.30-2) frozen unstable; urgency=low
-
-  * Fixed path in libmysqlclient.la. Closes: #58875 
-
- -- Christian Hammers <ch@debian.org>  Sat, 25 Jan 2000 20:27:29 -0700
-
-mysql-gpl (3.22.30-1) frozen unstable; urgency=low
-
-  * A small change in the libmysqlclient6 causes mysqladmin to print an
-    shared library error when displaying the defaults. Everything else
-    works fine so this error wasn't detected untill now. Closes: #58033
-  * TcX released a new MySQL version that includes another security patch,
-    this time against mysqlaccess. The author told me that it would be 
-    fine if I just included the new .c in this source since I don't want
-    go to 3.22.32 in frozen.
-  * ->Release Manager: Although the version number increased there is
-    no new coded except for the shared library. The rest is the same
-    as in mysql-server and mysql-client.
-
- -- Christian Hammers <ch@debian.org>  Tue, 15 Feb 2000 23:26:54 +0100
-
-mysql-gpl (3.22.29-1) unstable; urgency=low
-
-  * New upstream version.
-
- -- Christian Hammers <ch@debian.org>  Thu,  6 Jan 2000 20:37:23 +0100
-
-mysql-gpl (3.22.27a-3) unstable; urgency=low
-
-  * Use system readline instead of bundled version. Closes: #50069 
-    Any objections ?
-
- -- Christian Hammers <ch@debian.org>  Sun, 14 Nov 1999 18:09:48 +0100
-
-mysql-gpl (3.22.27a-2) unstable; urgency=low
-
-  * Now building mysql-gpl-doc in binary-indep. 
-
- -- Christian Hammers <ch@debian.org>  Sat, 23 Oct 1999 04:22:36 +0200
-
-mysql-gpl (3.22.27a-1) unstable; urgency=low
-
-  * Adjusted version number to allow new orig.tar.gz.
-    The old seems broken :-( People reported compilation problems.
-  * Changed mysql-gpl-doc to "Architecture: all". 
-
- -- Christian Hammers <ch@debian.org>  Sun, 17 Oct 1999 13:01:35 +0200
-
-mysql-gpl (3.22.27-1) unstable; urgency=low
-
-  * New upstream release. Fixes charset problem.
-
- -- Christian Hammers <ch@debian.org>  Mon, 11 Oct 1999 18:01:40 +0200
-
-mysql-gpl (3.22.26a-1) unstable; urgency=low
-
-  * New upstream version. Just some small bug fixes.
-  * FHS compliance.
-
- -- Christian Hammers <ch@debian.org>  Sun,  3 Oct 1999 10:16:14 +0200
-
-mysql-gpl (3.22.25-2) unstable; urgency=low
-
-  * Added conflict to all old mysql-dev packages. (fixes: #42966) 
-
- -- Christian Hammers <ch@debian.org>  Sun, 15 Aug 1999 11:35:46 +0200
-
-mysql-gpl (3.22.25-1) unstable; urgency=low
-
-  * New upstream version. (We are waiting for 3.23.x !)
-  * Fixes some upstream small bugs.
-
- -- Christian Hammers <ch@debian.org>  Sun, 18 Jul 1999 22:02:06 +0200
-
-mysql-gpl (3.22.23b-4) unstable; urgency=low
-
-  * Rebuild for new perl. 
-
- -- Christian Hammers <ch@debian.org>  Thu,  8 Jul 1999 01:09:57 +0200
-
-mysql-gpl (3.22.23b-3) unstable; urgency=low
-
-  * libmysqlclient had the wrong socket path.
-
- -- Christian Hammers <ch@debian.org>  Sun, 03 Jul 1999 23:13:30 +0200
-
-mysql-gpl (3.22.23b-2) unstable; urgency=low
-
-  * Missed one replace tag to an very old version of mysql-devel.
-
- -- Christian Hammers <ch@debian.org>  Sun, 27 Jun 1999 19:13:30 +0200
-
-mysql-gpl (3.22.23b-1) unstable; urgency=low
-
-  * New upstream minor version.
-  * Cleaned up the dependencies a bit.
-
- -- Christian Hammers <ch@debian.org>  Sun, 27 Jun 1999 19:13:30 +0200
-
-mysql-gpl (3.22.22-1) unstable; urgency=low
-
-  * New upstream version. (closes Bug#36493,37340)
-  * New maintainer upload.
-  * Package reorganisation: We prepare for the GPL'ed server which will
-  *  be released soon and make the structure more clear to the user.
-
- -- Christian Hammers <ch@debian.org>  Mon,  3 May 1999 20:43:41 +0200
-
-mysql (3.22.21-1) unstable; urgency=low
-
-  * Never released. TcX was too fast :-)
-
- -- Christian Hammers <ch@debian.org>  Tue, 20 Apr 1999 17:22:04 +0200
-
-mysql-freebits (3.21.33b-3) unstable; urgency=low
-
-  * Recompile with libncurses
-
- -- Scott Hanson <shanson@debian.org>  Sat, 31 Oct 1998 15:04:39 +0100
-
-mysql-freebits (3.21.33b-2) unstable; urgency=low
-
-  * Recompile with libstdc++2.9 (fixes #27792)
-
- -- Scott Hanson <shanson@debian.org>  Mon, 12 Oct 1998 18:47:25 +0200
-
-mysql-freebits (3.21.33b-1) unstable; urgency=low
-
-  * New upstream version (probably the last for 3.21)
-
- -- Scott Hanson <shanson@debian.org>  Tue,  8 Sep 1998 18:59:37 +0200
-
-mysql-freebits (3.21.33-4) unstable; urgency=low
-
-  * Separate out non-free source files, move mysql-base, mysql-dev, and
-  *  mysql-doc to main distribution
-  * Locale files /usr/share/mysql/ now in server, not base; therefore...
-  * Add conflict to mysql-server <=3.21.33-3
-
- -- Scott Hanson <shanson@debian.org>  Fri, 31 Jul 1998 19:16:08 +0200
-
-mysql (3.21.33-3) unstable; urgency=low
-
-  * Release to unstable with moved socket (fixes #24574)
-  * Add conflict to old libdbd-mysql-perl package
-
- -- Scott Hanson <shanson@debian.org>  Wed, 22 Jul 1998 22:17:43 +0200
-
-mysql (3.21.33-2) experimental; urgency=low
-
-  * Move socket from /tmp to /var/run (see #24574) 
-  * Release to experimental, since this breaks everything statically
-  *  linked to libmysqlclient!
-
- -- Scott Hanson <shanson@debian.org>  Wed, 15 Jul 1998 19:37:01 +0200
-
-mysql (3.21.33-1) unstable; urgency=low
-
-  * New upstream release
-
- -- Scott Hanson <shanson@debian.org>  Sun, 12 Jul 1998 08:18:18 +0200
-
-mysql (3.21.32a-1) unstable; urgency=low
-
-  * New upstream release 
-  * Lintian bugs: ldconfig, missing manpage, call to perl5
-  * Lintian bug shlib-with-non-pic-code _not_ yet fixed 
-
- -- Scott Hanson <shanson@debian.org>  Sat,  4 Jul 1998 07:57:13 +0200
-
-mysql (3.21.31-1) unstable frozen; urgency=low
-
-  * New upstream release for hamm and slink (bug fixes only)
-  * Fix unsecure use of temp file in mysqlbug (fixes #23606) 
-  * Added brief licensing information to control file
-
- -- Scott Hanson <shanson@debian.org>  Tue, 16 Jun 1998 10:52:44 +0200
-
-mysql (3.21.30-3) unstable; urgency=low
-
-  * Restore missing shared library dependencies for mysql-server
-
- -- Scott Hanson <shanson@debian.org>  Mon, 15 Jun 1998 07:51:58 +0200
-
-mysql (3.21.30-2) unstable; urgency=low
-
-  * Simplify debian/rules (fixes #17662)
-  * Edit manual.texi to add "Debian notes" to documentation
-  * Add note about passwords on command line (fixes #16471)
-  * Add note about getting privleges for users (fixes #22891)
-  * Correct "Possible license changes" heading (fixes #22711)
-  * Add uninstalled header files to /usr/doc/mysql-dev/examples (fixes #22627)
-  * Add udf_example.cc to /usr/doc/mysql-dev/examples (fixes #22710)
-
- -- Scott Hanson <shanson@debian.org>  Sun,  7 Jun 1998 13:05:37 +0200
-
-mysql (3.21.30-1) unstable; urgency=low
-
-  * Stable upstream release
-
- -- Scott Hanson <shanson@debian.org>  Tue, 12 May 1998 22:13:25 +0200
-
-mysql (3.21.29gamma-1) unstable; urgency=low
-
-  * New upstream release
-  * Do not create 'mysql' subdirectory for libs and headers (fixes #19020)
-  * Remove 'CXX=gcc' flag from configure (g++ now standard)
-      
- -- Scott Hanson <shanson@debian.org>  Sun, 12 Apr 1998 18:38:03 +0200
-
-mysql (3.21.28gamma-1) unstable; urgency=low
-
-  * New upstream release
-  * Unstable-only release; hamm stays at 3.21.25 for now
-
- -- Scott Hanson <shanson@debian.org>  Thu,  2 Apr 1998 21:33:51 +0200
-
-mysql (3.21.25gamma-3) unstable frozen; urgency=low
-
-  * Have mysql-base suggest perl >= 5.004 for mysqlaccess (fixes #19593)
-  * Fix shlibs to refer to mysql-base rather than the no-longer-existant mysql
-
- -- Scott Hanson <shanson@debian.org>  Thu, 26 Mar 1998 18:22:59 +0100
-
-mysql (3.21.25gamma-2) unstable; urgency=low
-
-  * Restore libmysqlclient.so symlink to mysql-dev (fixes #19036)
-
- -- Scott Hanson <shanson@debian.org>  Sun,  8 Mar 1998 10:46:43 +0100
-
-mysql (3.21.25gamma-1) unstable; urgency=low
-
-  * Check if running as root in init.d script (fixes #18577)
-  * New upstream release
-
- -- Scott Hanson <shanson@debian.org>  Fri, 27 Feb 1998 20:01:30 +0100
-
-mysql (3.21.24gamma-1) unstable; urgency=low
-
-  * New upstream release
-
- -- Scott Hanson <shanson@debian.org>  Mon, 23 Feb 1998 08:14:17 +0100
-
-mysql (3.21.23beta-3) unstable; urgency=low
-
-  * Squashed errors found by lintian
-
- -- Scott Hanson <shanson@debian.org>  Tue, 17 Feb 1998 20:19:01 +0100
-
-mysql (3.21.23beta-2) unstable; urgency=low
-
-  * Fixed overlaps with old mysql package (fixes #17843)
-
- -- Scott Hanson <shanson@debian.org>  Thu,  5 Feb 1998 22:55:00 +0100
-
-mysql (3.21.23beta-1) unstable; urgency=low
-
-  * New upstream release
-  * Fix include lines in mysql.h (fixes #17827)
-  * Move /usr/include/mysql to mysql-dev
-
- -- Scott Hanson <shanson@debian.org>  Wed,  4 Feb 1998 19:59:14 +0100
-
-mysql (3.21.22beta-3) unstable; urgency=low
-
-  * Correct descriptions in control file (fixes #17698)
-  * Clean up output of shutdown script
-
- -- Scott Hanson <shanson@debian.org>  Sat, 31 Jan 1998 19:04:29 +0100
-
-mysql (3.21.22beta-2) unstable; urgency=low
-
-  * Split out mysql-dev and mysql-bench subpackages
-
- -- Scott Hanson <shanson@debian.org>  Wed, 28 Jan 1998 19:52:27 +0100
-
-mysql (3.21.22beta-1) unstable; urgency=low
-
-  * New upstream release 
-  
- -- Scott Hanson <shanson@debian.org>  Wed, 28 Jan 1998 18:59:09 +0100
-
-mysql (3.21.21a.beta-2) unstable; urgency=low
-
-  * Compile with libpthreads from libc6-dev_2.0.6-3 rather than statically 
-    linking to patched libpthreads (see changes to 3.20.29-2)
-  
- -- Scott Hanson <shanson@debian.org>  Sun, 25 Jan 1998 13:17:15 +0100
-
-mysql (3.21.21a.beta-1) unstable; urgency=low
-
-  * Put initial database, mysql_install_db, safe_mysqld, isamlog and 
-    isamchk in mysql-server    
-  * Correct upstream release number so source packages are correctly built
-
- -- Scott Hanson <shanson@debian.org>  Mon, 19 Jan 1998 07:52:48 +0100
-
-mysql (3.21.21.beta-1) unstable; urgency=low
-
-  * Use debhelper where possible in rules
-  * Split binary packages into mysql-base, mysql-client, mysql-doc     
-  * New upstream release
-
- -- Scott Hanson <shanson@debian.org>  Thu, 15 Jan 1998 08:12:17 +0100
-
-mysql (3.21.19.beta-1) unstable; urgency=low
-
-  * Offer to set root password in mysql_install_db
-  * Kill `pidof mysqld` on shutdown rather than use mysqladmin
-  * New upstream version
-
- -- Scott Hanson <shanson@debian.org>  Fri,  9 Jan 1998 20:06:35 +0100
-
-mysql (3.21.17a.beta-2) unstable; urgency=low
-
-  * Remove perl stuff (it's going back into libdbd-mysql-perl)
-  * Remove conflict with libdbd-mysql-perl
-  * Do not compress *html files (fixes #16314)
-
- -- Scott Hanson <shanson@debian.org>  Tue, 30 Dec 1997 07:34:20 +0100
-
-mysql (3.21.17a.beta-1) unstable; urgency=low
-
-  * Add conflict to libdbd-mysql-perl
-  * Use --pid-file option to place pid file in /var/run rather than patching 
-  * Add install-info to postinst and postrm
-  * Add filename to message shown by mysql_install_db (fixes #16621)
-  * New upstream version
-
- -- Scott Hanson <shanson@debian.org>  Sun, 21 Dec 1997 19:41:45 +0100
-
-mysql (3.20.32a-5) unstable; urgency=low
-
-  * Move mysqld to /usr/lib/mysql, per policy discussion
-  * Adjust makefiles so perl libs get installed 
-
- -- Scott Hanson <shanson@debian.org>  Wed,  3 Dec 1997 22:37:45 +0100
-
-mysql (3.20.32a-4) unstable; urgency=low
-
-  * Move mysqld to /usr/sbin to comply with FSSTND
-
- -- Scott Hanson <shanson@debian.org>  Mon,  3 Nov 1997 20:12:29 +0100
-
-mysql (3.20.32a-3) unstable; urgency=low
-
-  * Comment out tests in mysql_install_db... for real this time!
-
- -- Scott Hanson <shanson@debian.org>  Mon,  3 Nov 1997 07:32:53 +0100
-
-mysql (3.20.32a-2) unstable; urgency=low
-
-  * Comment out tests in mysql_install_db (fixes #14304)
-
- -- Scott Hanson <shanson@debian.org>  Sat,  1 Nov 1997 18:45:25 +0100
-
-mysql (3.20.32a-1) unstable; urgency=low
-
-  * New upstream version
-
- -- Scott Hanson <shanson@debian.org>  Wed, 29 Oct 1997 07:11:42 +0100
-
-mysql (3.20.29-2) unstable; urgency=low
-  * New maintainer
-  * Statically link mysqld to patched glibc-2.0.5 libpthread 
-    (works around #13586; see README.debian.glibc-2.0.5)
-  * Conflict with libpthread0 (fixes #13448)
-  * Don't link libg++, avoiding problems with glibc libpthread 
-
- -- Scott Hanson <shanson@debian.org>  Thu, 16 Oct 1997 19:25:23 +0200
-
-mysql (3.20.29-1) unstable; urgency=low
-
-  * New upstream version
-  * Recompiled with libc6
-  * Include mysql-faq_toc.html (fixes #10885)
-  * Reworked /etc/init.d/mysql script (thanks to Heiko)
-  * Remove file /usr/lib/libmysqlclient.so.4 when package is removed.
-  * Use absolute path specification for conffile
-  * Use /usr/bin/perl instead of /bin/perl (fixes #10654)
-  * Do not depend on mysql (fixes #12427)
-  * Installed missing manpage for Mysql perl module
-  * Don't use debstd anymore
-  * Pristine source
-  * Set section to `non-free/devel'
-  * Upgraded to standards version 2.3.0.0
-
- -- Christian Schwarz <schwarz@debian.org>  Fri, 12 Sep 1997 02:12:58 +0200
-
-mysql (3.20.16beta-2) unstable; urgency=low
-
-  * Uses /usr/bin/perl instead of /bin/perl (fixes bug #9731)
-  * Don't run mysqld with --log option
-  * Don't install regex manual pages
-  * Suggest package mysql-manual
-  * Fixed typo in changelog
-  * Upgrade to policy 2.1.3.2
-
- -- Christian Schwarz <schwarz@debian.org>  Sun, 11 May 1997 14:19:26 +0200
-
-mysql (3.20.16beta-1) unstable; urgency=low
-
-  * Initial Release.
-
- -- Christian Schwarz <schwarz@debian.org>  Sat, 12 Apr 1997 13:51:28 +0200
+  * Bumped version numbers
+  * Added systemd service profile and script
+  * Standards version moved up to 3.9.6 in d/control
+  * Added dependencies to gawk as one script does not work with original-awk
+  * Dropped explicit dependency on multiarch-support, this is already managed
+    by ${misc:Pre-Depends).
+  * Added wsrep_sst_xtrabackup-v2 to d/mysql-wsrep-server-5.6.install
+  * Added "Provides: libmysqlclient-dev" to mysql-wsrep-libmysqlclient-dev
+  * Added "Replaces: libmysqlclient-dev" to mysql-wsrep-libmysqlclient-dev
+  * Moved mysql_plugin to server package as it controls the server plugins
+  * Removed langueage dublication from d/mysql-wsrep-server-5.6.install
+  * Make builds parallel Use MAKEFLAGS for parallel builds
+  * Added parallel build support via DEB_BUILD_OPTIONS
+  * d/rules: call dh_apparmor from override_dh_install so that it is run
+    before dh_installinit. This causes the AppArmor profile to be loaded
+    correctly before mysqld is started.
+  * Added innodb_stress tests to d/rules
+
+ -- Sergii Golovatiuk <sgolovatiuk@mirantis.com>  Mon, 13 Jun 2016 11:16:00 +0200
+
+mysql-wsrep-5.6 (5.6.30-25.15-1) UNRELEASED; urgency=low
+
+  * Bump version numbers
+
+ -- Otto Kekäläinen <otto@seravo.fi>  Wed, 22 Jun 2016 11:58:20 +0300
index 9272a803127d78f85d840c7844062e14568f853a..cd547330b47dddcb96ec8bcc559b302e92d07475 100644 (file)
 Source: mysql-wsrep-5.6
 Section: database
 Priority: optional
-Maintainer: MOS Linux team <mos-linux-team@mirantis.com>
-XSBC-Orig-Maintainer: Debian MySQL Maintainers <pkg-mysql-maint@lists.alioth.debian.org>
-Build-Depends:
- bison,
- chrpath,
- cmake,
- debhelper (>= 8.1.3~),
- dh-apparmor,
- gawk,
- hardening-wrapper,
- libaio-dev[linux-any],
- libncurses5-dev (>= 5.0-6),
- libreadline-dev,
- libwrap0-dev (>= 7.6-8.3),
- lsb-release,
- perl,
- po-debconf,
- psmisc,
- zlib1g-dev (>= 1:1.1.3-5),
- libssl-dev,
- libedit-dev
-Standards-Version: 3.9.3
-Homepage: http://dev.mysql.com/
-Vcs-Git: git://git.debian.org/git/pkg-mysql/mysql-5.6.git
-Vcs-Browser: http://git.debian.org/?p=pkg-mysql/mysql-5.6.git
-XS-Testsuite: autopkgtest
+Maintainer: MOS Linux Team <mos-linux@mirantis.com>
+Build-Depends: bison,
+               chrpath,
+               cmake,
+               debhelper (>= 9),
+               dh-apparmor,
+               dh-systemd (>= 1.5),
+               dpkg-dev (>= 1.16.1~),
+               gawk,
+               libaio-dev[linux-any],
+               libedit-dev,
+               libncurses5-dev (>= 5.0-6),
+               libssl-dev,
+               libwrap0-dev (>= 7.6-8.3),
+               lsb-release,
+               perl,
+               po-debconf,
+               psmisc,
+               zlib1g-dev (>= 1:1.1.3-5)
+Standards-Version: 3.9.8
+Homepage: http://galeracluster.com/
+Vcs-Git: https://github.com/codership/mysql-wsrep.git
+Vcs-Browser: https://github.com/codership/mysql-wsrep
 
-Package: mysql-wsrep-common-5.6
-Architecture: all
-Depends: mysql-common, ${misc:Depends}, ${shlibs:Depends}
-Multi-Arch: foreign
-Description: MySQL 5.6 specific common files, e.g. /etc/mysql/conf.d/my-5.6.cnf
+Package: mysql-wsrep-libmysqlclient18
+Section: libs
+Architecture: any
+Depends: mysql-wsrep-common-5.6, ${misc:Depends}, ${shlibs:Depends}
+Pre-Depends: ${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
  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: mysql-client-core-5.6
+Package: mysql-wsrep-libmysqlclient-dev
 Architecture: any
-Depends: ${misc:Depends}, ${shlibs:Depends}
-Provides: virtual-mysql-client-core, mysql-client-core
-Breaks: mysql-client-5.5, mysql-client-core-5.5, virtual-mysql-client-core
-Replaces: mysql-client-5.5, mysql-client-core-5.5, virtual-mysql-client-core
-Description: MySQL database core client binaries
+Section: libdevel
+Replaces: libmysqlclient-dev
+Provides: libmysqlclient-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
  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.
+ This package includes development libraries and header files.
 
-Package: mysql-client-5.6
-Architecture: any
-Depends:
- debianutils (>=1.6),
- libdbd-mysql-perl (>= 1.2202),
- libdbi-perl,
- libterm-readkey-perl,
- mysql-client-core-5.6,
- mysql-common (>= 5.5),
- ${misc:Depends},
- ${perl:Depends},
- ${shlibs:Depends}
-Recommends: mysql-wsrep-common-5.6
-Provides: virtual-mysql-client, virtual-mysql-client-wsrep, mysql-client, mysql-client-wsrep
-Breaks: mysql-client-5.5, virtual-mysql-client, virtual-mysql-client-wsrep
-Replaces: mysql-client-5.5, virtual-mysql-client, virtual-mysql-client-wsrep
-Description: MySQL database client binaries
+Package: mysql-wsrep-common-5.6
+Architecture: all
+Depends: mysql-common, ${misc:Depends}, ${shlibs:Depends}
+Conflicts: mariadb-server-5.5,
+           mysql-server-5.5,
+           percona-xtradb-cluster-common-5.5
+Replaces: mariadb-server-5.5,
+          mysql-common,
+          mysql-common-5.5,
+          mysql-common-5.6,
+          mysql-server-5.5,
+          percona-xtradb-cluster-common-5.5
+Breaks: mariadb-common (<< 10.0.20-3~)
+Multi-Arch: foreign
+Description: MySQL database common files, e.g. /etc/mysql/conf.d/my-5.6.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 the client binaries and the additional tools
innotop and mysqlreport.
+ This package includes files needed by all versions of the client library,
e.g. /etc/mysql/my.cnf.
 
-Package: mysql-server-wsrep-core-5.6
+Package: mysql-client-5.6
 Architecture: any
-Depends: ${misc:Depends}, ${shlibs:Depends}
-Provides: virtual-mysql-server-core, mysql-server-core, mysql-server-wsrep-core
-Breaks: mysql-server-core-5.5, virtual-mysql-server-core
-Replaces: mysql-server-core-5.5, virtual-mysql-server-core
-Description: MySQL database server binaries
+Depends: debianutils (>=1.6),
+         mysql-wsrep-common-5.6,
+         mysql-wsrep-libmysqlclient18,
+         ${misc:Depends},
+         ${perl:Depends},
+         ${shlibs:Depends}
+Provides: virtual-mysql-client,
+          mysql-client-5.6,
+          mysql-client-core-5.6,
+          mysql-wsrep-client-5.6
+Conflicts: mysql-client-5.5,
+Breaks: mysql-client-5.6,
+        mysql-client-5.5,
+        mysql-client-core-5.5,
+        mysql-client-core-5.6
+Replaces: mysql-client-5.6,
+          mysql-client-5.5,
+          mysql-client-core-5.5,
+          mysql-client-core-5.6,
+          virtual-mysql-client
+Recommends: libdbd-mysql-perl (>= 1.2202),
+            libdbi-perl,
+            libterm-readkey-perl
+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 server binaries but doesn't contain all the
- infrastructure needed to setup system databases.
+ This package includes the client binaries and the additional tools
+ innotop and mysqlreport.
 
 Package: mysql-server-wsrep-5.6
 Architecture: any
 Recommends: libhtml-template-perl
 Suggests: mailx, tinyca
 Pre-Depends: adduser (>= 3.40), debconf, mysql-wsrep-common-5.6
-Depends:
- initscripts,
- libdbi-perl,
- lsb-base (>= 3.0-10),
- mysql-client-5.6 (>= ${binary:Version}),
- mysql-server-wsrep-core-5.6 (= ${binary:Version}),
- passwd,
- perl (>= 5.6),
- psmisc,
- ${misc:Depends},
- ${shlibs:Depends}
-Provides: virtual-mysql-server, virtual-mysql-server-wsrep, mysql-server, mysql-server-wsrep
-Breaks: mysql-server-5.5, virtual-mysql-server, virtual-mysql-server-wsrep
-Replaces: mysql-server-5.5, virtual-mysql-server, virtual-mysql-server-wsrep
-Description: MySQL database server binaries and system database setup
+Depends: initscripts,
+         libdbi-perl,
+         lsb-base (>= 3.0-10),
+         lsof,
+         mysql-wsrep-client-5.6 (>= ${binary:Version}) | mysql-client-5.6 (>= ${binary:Version}),
+         passwd,
+         perl (>= 5.6),
+         psmisc,
+         rsync,
+         socat,
+         ${misc:Depends},
+         ${shlibs:Depends}
+Provides: virtual-mysql-server,
+          mysql-server-5.6,
+          mysql-wsrep-server-5.6,
+          mysql-wsrep-server-core-5.6,
+          mysql-server-wsrep-core-5.6
+Breaks: mysql-server-5.5,
+        mysql-server-5.6,
+        mysql-server-core-5.5,
+        mysql-server-core-5.6,
+        virtual-mysql-server
+Replaces: mysql-server-5.5, mysql-server-5.6, virtual-mysql-server, mysql-server-wsrep-core-5.6, mysql-wsrep-common-5.6
+Description: MySQL database wsrep 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
@@ -120,16 +152,16 @@ Description: MySQL database server binaries and system database setup
  This package contains all the infrastructure needed to setup system
  databases.
 
-Package: mysql-testsuite-5.6
+Package: mysql-wsrep-testsuite-5.6
 Architecture: any
-Depends:
mysql-client-5.6 (= ${binary:Version}),
mysql-server-wsrep-5.6 (= ${binary:Version}),
- ${misc:Depends},
- ${shlibs:Depends}
-Provides: virtual-mysql-testsuite, mysql-testsuite
-Breaks: mysql-testsuite-5.5, virtual-mysql-testsuite
-Replaces: mysql-testsuite-5.5, virtual-mysql-testsuite
+Depends: mysql-wsrep-client-5.6 (= ${binary:Version}) | mysql-client-5.6 (= ${binary:Version}),
        mysql-wsrep-server-5.6 (= ${binary:Version}) | mysql-server-wsrep-5.6 (= ${binary:Version}),
        libjson-perl,
        ${misc:Depends},
        ${shlibs:Depends}
+Provides: virtual-mysql-testsuite
+Breaks: mysql-testsuite-5.5, mysql-testsuite-5.6 (<< ${binary:Version}), virtual-mysql-testsuite
+Replaces: mysql-testsuite-5.5, mysql-testsuite-5.6, virtual-mysql-testsuite
 Description: MySQL 5.6 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
@@ -138,15 +170,14 @@ Description: MySQL 5.6 testsuite
  .
  This package includes the MySQL testsuite.
 
-Package: mysql-source-5.6
+Package: mysql-testsuite-5.6
+Architecture: any
+Depends: mysql-wsrep-testsuite-5.6 (= ${binary:Version})
+Description: Metapackage for trick our repotest
+
+Package: mysql-wsrep-5.6
 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
- - but after the arch specific configuration. This is currently required for
- building plugins.
+Depends: mysql-wsrep-client-5.6 (= ${binary:Version}) | mysql-client-5.6 (= ${binary:Version}),
+         mysql-wsrep-server-5.6 (= ${binary:Version}) | mysql-server-wsrep-5.6 (= ${binary:Version}),
+         ${misc:Depends}
+Description: Metapackage that installs mysql-wsrep client and server packages.
index 7ade7b1aab2e5d8d4ec2f732d78c2aa4c54ee576..e69ccf83fb01041cdaf6fe65ff479891161975b5 100644 (file)
@@ -1,5 +1,8 @@
 [DEFAULT]
-debian-branch = 5.6-debian
-upstream-branch = 5.6-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.6
 upstream-tree = branch
 pristine-tar = False
diff --git a/debian/libmysqld-dev.install b/debian/libmysqld-dev.install
new file mode 100644 (file)
index 0000000..f050094
--- /dev/null
@@ -0,0 +1 @@
+usr/lib/*/libmysqlservices.a
diff --git a/debian/libmysqld-pic.README.Debian b/debian/libmysqld-pic.README.Debian
new file mode 100644 (file)
index 0000000..4ec22b7
--- /dev/null
@@ -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.install b/debian/libmysqld-pic.install
new file mode 100644 (file)
index 0000000..7ff38b3
--- /dev/null
@@ -0,0 +1,2 @@
+usr/bin/mysql_config_pic
+usr/lib/mysql/libmysqld_pic.a
diff --git a/debian/libmysqld-pic.manpages b/debian/libmysqld-pic.manpages
new file mode 100644 (file)
index 0000000..3e2e2b2
--- /dev/null
@@ -0,0 +1 @@
+debian/tmp/usr/share/man/man1/mysql_config_pic.1
index bb32476e10dff5b1aa55e011527af6877d57a4ba..94e3710c9761fb8ab20820c83714713762f9eeee 100644 (file)
@@ -1,17 +1,18 @@
+# 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_client_test
-#usr/bin/mysql_client_test_embedded
 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
index 7e3dc125103b3f94d0aec7f5be40416701d0b986..2458e1f30ef8a537316c70c7b65b5861d0ff9b64 100644 (file)
@@ -1,19 +1,4 @@
 debian/additions/innotop/innotop.1
-debian/tmp/usr/share/man/man1/myisam_ftdump.1
-debian/tmp/usr/share/man/man1/mysqlaccess.1
-debian/tmp/usr/share/man/man1/mysqladmin.1
-debian/tmp/usr/share/man/man1/mysqlbug.1
-debian/tmp/usr/share/man/man1/mysql_client_test.1
-#debian/tmp/usr/share/man/man1/mysql_client_test_embedded.1
-debian/tmp/usr/share/man/man1/mysql_config_editor.1
-debian/tmp/usr/share/man/man1/mysqldump.1
-debian/tmp/usr/share/man/man1/mysqldumpslow.1
-debian/tmp/usr/share/man/man1/mysql_find_rows.1
-debian/tmp/usr/share/man/man1/mysql_fix_extensions.1
-debian/tmp/usr/share/man/man1/mysqlimport.1
 debian/tmp/usr/share/man/man1/mysqlman.1
 debian/additions/mysqlreport.1
-debian/tmp/usr/share/man/man1/mysqlshow.1
-debian/tmp/usr/share/man/man1/mysqlslap.1
-debian/tmp/usr/share/man/man1/mysql_waitpid.1
-debian/tmp/usr/share/man/man1/mysql_plugin.1
+debian/tmp/usr/share/man/man1/mysql_embedded.1
old mode 100755 (executable)
new mode 100644 (file)
diff --git a/debian/mysql-server-wsrep-5.6.config b/debian/mysql-server-wsrep-5.6.config
new file mode 100644 (file)
index 0000000..c2f016e
--- /dev/null
@@ -0,0 +1,48 @@
+#!/bin/bash
+
+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 }
+
+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.6/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
index bca0108e4804d0cbac41588f0c30347921fa078a..da0935388a20e89d671bf631f79e9eae5ce30fd4 100644 (file)
@@ -1,6 +1,2 @@
-etc/init.d
-etc/logrotate.d
 etc/mysql/conf.d
-usr/bin
-usr/share/mysql
 var/lib/mysql-upgrade
index e0d832fe447c2058ce35c9208aef4784f659e01f..219e7bc025b35f266709ce90605c17c7e14efe70 100644 (file)
@@ -1,3 +1,3 @@
-debian/tmp/usr/share/mysql/*cnf
+debian/tmp/usr/share/mysql/wsrep.cnf
 debian/tmp/usr/share/mysql/magic
 debian/tmp/usr/lib/mysql/plugin/daemon_example.ini
index b75a78e11df5b17829e62fd00aa3b0193e0a6cad..009adc4148c0e963bd25f1514ad1be5d47b767b6 100644 (file)
@@ -2,33 +2,77 @@
 #usr/share/mysql/config.medium.ini
 #usr/share/mysql/config.small.ini
 #usr/share/mysql/ndb-config-2-node.ini
-#debian/additions/mysqld_safe_syslog.cnf etc/mysql/conf.d/
+debian/additions/mysqld_safe_syslog.cnf etc/mysql/conf.d/
+etc/apparmor.d/usr.sbin.mysqld
+etc/init.d/mysql
 etc/mysql/debian-start
 usr/bin/msql2mysql
+usr/bin/my_print_defaults
 usr/bin/myisamchk
 usr/bin/myisamlog
 usr/bin/myisampack
 usr/bin/mysql_convert_table_format
+usr/bin/mysql_install_db
+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/mysql_zap
 usr/bin/mysqlbinlog
 usr/bin/mysqld_multi
 usr/bin/mysqld_safe
 usr/bin/mysqlhotcopy
 usr/bin/mysqltest
-#usr/bin/mysqltest_embedded
 usr/bin/perror
 usr/bin/replace
 usr/bin/resolve_stack_dump
 usr/bin/resolveip
+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/lib/mysql/plugin/*.so
+usr/sbin/mysqld
 usr/share/doc/mysql-server-5.6/
+usr/share/mysql/bulgarian
+usr/share/mysql/charsets
+usr/share/mysql/czech
+usr/share/mysql/danish
 usr/share/mysql/debian-start.inc.sh
 usr/share/mysql/debian_create_root_user.sql
+usr/share/mysql/dictionary.txt
+usr/share/mysql/dutch
 usr/share/mysql/echo_stderr
+usr/share/mysql/english
 usr/share/mysql/errmsg-utf8.txt
+usr/share/mysql/mysql-systemd-start
+usr/share/mysql/estonian
+usr/share/mysql/fill_help_tables.sql
+usr/share/mysql/french
+usr/share/mysql/german
+usr/share/mysql/greek
+usr/share/mysql/hungarian
+usr/share/mysql/innodb_memcached_config.sql
+usr/share/mysql/italian
+usr/share/mysql/japanese
+usr/share/mysql/korean
+usr/share/mysql/mysql_security_commands.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
-#etc/apparmor.d/usr.sbin.mysqld
+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/share/mysql/wsrep.cnf
+usr/share/mysql/my-default.cnf
index 2600138c55a841a2fc54703394b0cf02d53d454d..a0e6f63510fb89bd7b83a948bf3e04335e448d56 100644 (file)
@@ -1,3 +1,5 @@
 # These long lines reproduce actual output and to reformat them
 # would damage the integrity of the man page.
 # mysql-server-5.6: manpage-has-errors-from-man usr/share/man/man1/mysqlbinlog.1.gz 1405: warning [p 9, 7.5i, div `3tbd3,2', 0.8i]: can't break line
+# These are random occurrences of a pseudo word in a binary.
+mysql-server-5.6: spelling-error-in-binary usr/sbin/mysqld yuR your
index a986ffddaddfc813796a834ce38a068e775b78e8..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -1,20 +0,0 @@
-debian/tmp/usr/share/man/man1/msql2mysql.1
-debian/tmp/usr/share/man/man1/myisamchk.1
-debian/tmp/usr/share/man/man1/myisamlog.1
-debian/tmp/usr/share/man/man1/myisampack.1
-debian/tmp/usr/share/man/man1/mysqlbinlog.1
-debian/tmp/usr/share/man/man1/mysql_convert_table_format.1
-debian/tmp/usr/share/man/man1/mysqld_multi.1
-debian/tmp/usr/share/man/man1/mysqld_safe.1
-debian/tmp/usr/share/man/man1/mysqlhotcopy.1
-debian/tmp/usr/share/man/man1/mysql_secure_installation.1
-debian/tmp/usr/share/man/man1/mysql_setpermission.1
-debian/tmp/usr/share/man/man1/mysqltest.1
-#debian/tmp/usr/share/man/man1/mysqltest_embedded.1
-debian/tmp/usr/share/man/man1/mysql_zap.1
-debian/tmp/usr/share/man/man1/perror.1
-debian/tmp/usr/share/man/man1/replace.1
-debian/tmp/usr/share/man/man1/resolveip.1
-debian/tmp/usr/share/man/man1/resolve_stack_dump.1
-debian/tmp/usr/share/man/man1/innochecksum.1
-debian/tmp/usr/share/man/man1/mysql_tzinfo_to_sql.1
diff --git a/debian/mysql-server-wsrep-5.6.mysql.service b/debian/mysql-server-wsrep-5.6.mysql.service
new file mode 100644 (file)
index 0000000..b26f233
--- /dev/null
@@ -0,0 +1,20 @@
+# MySQL systemd service file
+
+[Unit]
+Description=MySQL Community Server
+After=network.target
+
+[Install]
+WantedBy=multi-user.target
+
+[Service]
+User=mysql
+Group=mysql
+PermissionsStartOnly=true
+ExecStartPre=/usr/share/mysql/mysql-systemd-start pre
+ExecStart=/usr/bin/mysqld_safe
+ExecStartPost=/usr/share/mysql/mysql-systemd-start post
+TimeoutSec=600
+Restart=on-failure
+RuntimeDirectory=mysqld
+RuntimeDirectoryMode=755
diff --git a/debian/mysql-server-wsrep-5.6.mysql.upstart.disabled b/debian/mysql-server-wsrep-5.6.mysql.upstart.disabled
new file mode 100644 (file)
index 0000000..a9247a0
--- /dev/null
@@ -0,0 +1,63 @@
+description     "MySQL 5.6 Server"
+author          "Mario Limonciello <superm1@ubuntu.com>"
+
+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
index 6fca71c6de1e4b82b7a9b5771bd5f86dd2c2eb7b..61d3a0a5fac2ccb804d8a559443b90e156b24a29 100644 (file)
@@ -1,4 +1,66 @@
-#!/bin/sh
+#!/bin/bash
+
+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
+
+# 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 >/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)
@@ -8,12 +70,14 @@ case "$1" in
     mysql_logdir=/var/log/mysql
     mysql_cfgdir=/etc/mysql
     mysql_upgradedir=/var/lib/mysql-upgrade
+    mysql_filesdir=/var/lib/mysql-files
 
     # 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_logdir"         -a ! -L "$mysql_logdir"         ]; then mkdir "$mysql_logdir"; fi
+    if [ ! -d "$mysql_filesdir"       -a ! -L "$mysql_filesdir"       ]; then mkdir "$mysql_filesdir"; 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
@@ -25,9 +89,111 @@ case "$1" in
     if [ ! -d "$mysql_rundir" ]; then mkdir "$mysql_rundir"; fi
     chown -R mysql $mysql_rundir
     touch $mysql_logdir/error.log
+    chown -R mysql:mysql $mysql_filesdir
+    chmod 700 $mysql_filesdir
     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-server/postrm_remove_database false || true
+
+    # To avoid downgrades.
+    touch $mysql_statedir/debian-5.6.flag
+
+    # initiate databases. Output is not allowed by debconf :-(
+    # Debian: can safely run on upgrades with existing databases 
+
+    set +e
+    tfile_select_db=`mktemp`
+    echo "USE mysql;" > $tfile_select_db
+    MYSQL_EXTRA_OPTS=" --default-storage-engine=myisam --lc-messages-dir=/usr/share/mysql/english/.."
+    MYSQL_CMDLINE=$MYSQL_BOOTSTRAP$MYSQL_EXTRA_OPTS
+    cat $tfile_select_db $mysql_datadir/mysql_system_tables.sql $mysql_datadir/debian_create_root_user.sql $mysql_datadir/fill_help_tables.sql | $MYSQL_CMDLINE 2>&1 | $ERR_LOGGER
+    rm $tfile_select_db
+    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
+
+    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'; "`;
+    # 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 IF NOT EXISTS 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');" `
+
+    db_get mysql-server/root_password && rootpw="$RET"
+    if ! set_mysql_rootpw; then
+        password_error="yes"
+    fi
+
+    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)
@@ -39,16 +205,30 @@ case "$1" in
   ;;
 esac
 
-# ESP Package Manager v4.2
-update-rc.d -f mysql remove >/dev/null || exit 
-ldconfig -n /usr/lib/mysql
-#test -d /var/lib/mysql || (mysql_install_db --user=mysql --datadir=/var/lib/mysql)
-# Run mysql_install_db only if postinst was called during install, not upgrade
-if [ -z "$2" ]; then
-    # it seems that we can run mysql_install_db regardless of existing tables.
-    mysql_install_db --wsrep-on=0 --user=mysql --datadir=/var/lib/mysql --basedir=/usr
+# 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
-# 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 
+
+db_stop # in case invoke failes
+
+#DEBHELPER#
+
+exit 0
diff --git a/debian/mysql-server-wsrep-5.6.postrm b/debian/mysql-server-wsrep-5.6.postrm
new file mode 100644 (file)
index 0000000..70c6fb5
--- /dev/null
@@ -0,0 +1,79 @@
+#!/bin/bash
+
+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 }
+
+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.6/postrm_remove_databases || true
+  db_go || true
+  db_get mysql-server-5.6/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
+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
index 9d5cd60ef5df70e285673ab3a62696dafafffdc2..320c748d511f16e1029ab54b387fcb459ee70843 100644 (file)
@@ -1,8 +1,185 @@
-#!/bin/sh
-# ESP Package Manager v4.2
-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
-[ -e "/usr/bin/my_print_defaults" ] || \
-( cd /usr/bin && ln -sf my_print_defaults_wsrep my_print_defaults ) 
+#!/bin/bash
+#
+# summary of how this script can be called:
+#        * <new-preinst> install
+#        * <new-preinst> install <old-version>
+#        * <new-preinst> upgrade <old-version>
+#        * <old-preinst> abort-upgrade <new-version>
+#
+
+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
+
+# 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.6
+
+# 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 <<EOT
+6691f2fdc5c6d27ff0260eb79813e1bc  /etc/init.d/mysql
+b53b9552d44661361d39157c3c7c51d3  /etc/logrotate.d/mysql-server
+57f3e58f72582ca55100dc1ba0f1a8ae  /etc/mysql/debian-start
+EOT
+
+db_stop
+
+#DEBHELPER#
+
+exit 0
index 6d7d7a478366142001d082d2b0b96ad8c2e4ce92..0371bbfc844d43a0e339833ecdf708f02cfa18d0 100644 (file)
@@ -1,11 +1,10 @@
-#!/bin/sh
-# ESP Package Manager v4.2
-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 || exit 
-[ ! -L /usr/bin/my_print_defaults ] || rm -rf /usr/bin/my_print_defaults
-[ ! -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 
+#!/bin/bash
+
+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/debian/mysql-server-wsrep-5.6.templates b/debian/mysql-server-wsrep-5.6.templates
new file mode 100644 (file)
index 0000000..3e72c90
--- /dev/null
@@ -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.6/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.6/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.6/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.6/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.6/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.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/.
index d85fee7eced3317f906fad4d609840279d46b3ee..9ead64156b82cab2c28acca496bdb983c6666941 100644 (file)
@@ -1,5 +1,2 @@
-#debian/additions/my5.6.cnf etc/mysql/conf.d/
-builddir/support-files/wsrep.cnf etc/mysql/conf.d/
-builddir/support-files/wsrep.cnf usr/share/mysql/
-builddir/support-files/my-default.cnf usr/share/mysql/
-
+debian/additions/my.cnf etc/mysql/
+debian/additions/my5.6.cnf etc/mysql/conf.d/
diff --git a/debian/mysql-wsrep-libmysqlclient-dev.README.Maintainer b/debian/mysql-wsrep-libmysqlclient-dev.README.Maintainer
new file mode 100644 (file)
index 0000000..f24cdcd
--- /dev/null
@@ -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/mysql-wsrep-libmysqlclient-dev.dirs b/debian/mysql-wsrep-libmysqlclient-dev.dirs
new file mode 100644 (file)
index 0000000..f6ad287
--- /dev/null
@@ -0,0 +1,2 @@
+usr/include/
+usr/lib/
diff --git a/debian/mysql-wsrep-libmysqlclient-dev.examples b/debian/mysql-wsrep-libmysqlclient-dev.examples
new file mode 100644 (file)
index 0000000..80a749f
--- /dev/null
@@ -0,0 +1 @@
+sql/udf_example.cc
diff --git a/debian/mysql-wsrep-libmysqlclient-dev.install b/debian/mysql-wsrep-libmysqlclient-dev.install
new file mode 100644 (file)
index 0000000..769007d
--- /dev/null
@@ -0,0 +1,7 @@
+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/share/aclocal/mysql.m4
diff --git a/debian/mysql-wsrep-libmysqlclient-dev.manpages b/debian/mysql-wsrep-libmysqlclient-dev.manpages
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/debian/mysql-wsrep-libmysqlclient18.dirs b/debian/mysql-wsrep-libmysqlclient18.dirs
new file mode 100644 (file)
index 0000000..2964de6
--- /dev/null
@@ -0,0 +1 @@
+usr/lib/
diff --git a/debian/mysql-wsrep-libmysqlclient18.install b/debian/mysql-wsrep-libmysqlclient18.install
new file mode 100644 (file)
index 0000000..0feb497
--- /dev/null
@@ -0,0 +1,2 @@
+usr/lib/*/libmysqlclient.so.18*
+usr/lib/*/libmysqlclient_r.so.18*
diff --git a/debian/mysql-wsrep-libmysqlclient18.lintian-overrides b/debian/mysql-wsrep-libmysqlclient18.lintian-overrides
new file mode 100644 (file)
index 0000000..7aff544
--- /dev/null
@@ -0,0 +1,3 @@
+# I take this issue seriously but as per bug #590905
+# it will need playing with in experimental. - periapt
+libmysqlclient18: no-symbols-control-file usr/lib/i386-linux-gnu/libmysqlclient.so.18.1.0
diff --git a/debian/mysql-wsrep-testsuite-5.6.dirs b/debian/mysql-wsrep-testsuite-5.6.dirs
new file mode 100644 (file)
index 0000000..e637692
--- /dev/null
@@ -0,0 +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
diff --git a/debian/mysql-wsrep-testsuite-5.6.install b/debian/mysql-wsrep-testsuite-5.6.install
new file mode 100644 (file)
index 0000000..ccadd9f
--- /dev/null
@@ -0,0 +1 @@
+usr/share/mysql-test/* usr/lib/mysql-testsuite/
diff --git a/debian/mysql-wsrep-testsuite-5.6.lintian-overrides b/debian/mysql-wsrep-testsuite-5.6.lintian-overrides
new file mode 100644 (file)
index 0000000..e94549f
--- /dev/null
@@ -0,0 +1,4 @@
+# These are random occurrences of a pseudo word in a binary.
+mysql-testsuite-5.6: spelling-error-in-binary usr/bin/mysql_client_test_embedded yuR your
+mysql-testsuite-5.6: spelling-error-in-binary usr/bin/mysql_embedded yuR your
+mysql-testsuite-5.6: spelling-error-in-binary usr/bin/mysqltest_embedded yuR your
index 164bca36e4bc1bc8bf0a935569726695ef899146..08ed2f90f446531e42e11465042d704012b851ef 100644 (file)
@@ -2,5 +2,3 @@ hurd.patch
 scripts__mysqld_safe.sh__signals.patch
 fix_standalone_tests.patch
 kfreebsd_tests.patch
-fix-mysqlhotcopy-test-failure.patch
-debian_patches_CVE-2016-6662.patch
index fa73641f8336421a2604fae612130155de5922b1..9573ed734b31445d4a432f4552e8fcdbb355697c 100644 (file)
@@ -1 +1 @@
-[type: gettext/rfc822deb] mysql-server-5.6.templates
+[type: gettext/rfc822deb] mysql-server-wsrep-5.6.templates
index 4ab9a4270b219f7d2ad3b9021e168d07e86b9084..4c371ff9e90ccab49000d7cec4ae678f95c19b7a 100644 (file)
@@ -6,8 +6,8 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: templates\n"
-"Report-Msgid-Bugs-To: mysql-5.6@packages.debian.org\n"
-"POT-Creation-Date: 2011-11-08 11:42-0800\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 <okhayat@yahoo.com>\n"
 "Language-Team: Arabic <support@arabeyes.org>\n"
@@ -27,19 +27,19 @@ msgstr ""
 
 #. Type: boolean
 #. Description
-#: ../mysql-server-5.6.templates:2001
+#: ../mysql-wsrep-server-5.6.templates:2001
 msgid "Really proceed with downgrade?"
 msgstr "هل فعلاً تريد التثبيط؟"
 
 #. Type: boolean
 #. Description
-#: ../mysql-server-5.6.templates:2001
+#: ../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-server-5.6.templates:2001
+#: ../mysql-wsrep-server-5.6.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.6.templates:2001
+#: ../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."
@@ -62,13 +62,13 @@ msgstr ""
 
 #. Type: note
 #. Description
-#: ../mysql-server-5.6.templates:3001
+#: ../mysql-wsrep-server-5.6.templates:3001
 msgid "Important note for NIS/YP users"
 msgstr "ملاحظة هامة لمستخدمي NIS/YP"
 
 #. Type: note
 #. Description
-#: ../mysql-server-5.6.templates:3001
+#: ../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:"
@@ -76,7 +76,7 @@ msgstr ""
 
 #. Type: note
 #. Description
-#: ../mysql-server-5.6.templates:3001
+#: ../mysql-wsrep-server-5.6.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.6.templates:4001
+#: ../mysql-wsrep-server-5.6.templates:4001
 msgid "Remove all MySQL databases?"
 msgstr "إزالة جميع قواعد بيانات MySQL؟"
 
 #. Type: boolean
 #. Description
-#: ../mysql-server-5.6.templates:4001
+#: ../mysql-wsrep-server-5.6.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.6.templates:4001
+#: ../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 "
@@ -113,13 +113,13 @@ msgstr ""
 
 #. Type: boolean
 #. Description
-#: ../mysql-server-5.6.templates:5001
+#: ../mysql-wsrep-server-5.6.templates:5001
 msgid "Start the MySQL server on boot?"
 msgstr "تشغيل خادم MySQL عند الإقلاع؟"
 
 #. Type: boolean
 #. Description
-#: ../mysql-server-5.6.templates:5001
+#: ../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."
@@ -129,13 +129,13 @@ msgstr ""
 
 #. Type: password
 #. Description
-#: ../mysql-server-5.6.templates:6001
+#: ../mysql-wsrep-server-5.6.templates:6001
 msgid "New password for the MySQL \"root\" user:"
 msgstr "كلمة المرور الجديدة لمستخد \"root\" الخاص بـMySQL:"
 
 #. Type: password
 #. Description
-#: ../mysql-server-5.6.templates:6001
+#: ../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."
@@ -145,7 +145,7 @@ msgstr ""
 
 #. Type: password
 #. Description
-#: ../mysql-server-5.6.templates:6001
+#: ../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."
@@ -153,7 +153,7 @@ msgstr "إن ترك الحقل فارغاً، فلن يتم تغيير كلمة
 
 #. Type: password
 #. Description
-#: ../mysql-server-5.6.templates:7001
+#: ../mysql-wsrep-server-5.6.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.6.templates:8001
+#: ../mysql-wsrep-server-5.6.templates:8001
 msgid "Unable to set password for the MySQL \"root\" user"
 msgstr "تعذر تعيين كلمة مرور للمستخدم \"root\" الخاص بـMySQL."
 
 #. Type: error
 #. Description
-#: ../mysql-server-5.6.templates:8001
+#: ../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 "
@@ -179,7 +179,7 @@ msgstr ""
 
 #. Type: error
 #. Description
-#: ../mysql-server-5.6.templates:8001
+#: ../mysql-wsrep-server-5.6.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.6.templates:8001
+#: ../mysql-wsrep-server-5.6.templates:8001
 #, fuzzy
 #| msgid ""
 #| "Please read the /usr/share/doc/mysql-server-5.6/README.Debian file for "
@@ -202,25 +202,25 @@ msgstr ""
 
 #. Type: error
 #. Description
-#: ../mysql-server-5.6.templates:9001
+#: ../mysql-wsrep-server-5.6.templates:9001
 msgid "Password input error"
 msgstr ""
 
 #. Type: error
 #. Description
-#: ../mysql-server-5.6.templates:9001
+#: ../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-server-5.6.templates:10001
+#: ../mysql-wsrep-server-5.6.templates:10001
 msgid "NDB Cluster seems to be in use"
 msgstr ""
 
 #. Type: error
 #. Description
-#: ../mysql-server-5.6.templates:10001
+#: ../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 "
index 215a9ad1871b273e51aede7da11041821f244251..7b0721c63dab5daf23098fdc628242a962225b68 100644 (file)
@@ -5,8 +5,8 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: mysql-dfsg-4.1\n"
-"Report-Msgid-Bugs-To: mysql-5.6@packages.debian.org\n"
-"POT-Creation-Date: 2011-11-08 11:42-0800\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 <abadia@ica.es>\n"
 "Language-Team: Debian L10n Catalan <debian-l10n-catalan@lists.debian.org>\n"
@@ -17,19 +17,19 @@ msgstr ""
 
 #. Type: boolean
 #. Description
-#: ../mysql-server-5.6.templates:2001
+#: ../mysql-wsrep-server-5.6.templates:2001
 msgid "Really proceed with downgrade?"
 msgstr ""
 
 #. Type: boolean
 #. Description
-#: ../mysql-server-5.6.templates:2001
+#: ../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-server-5.6.templates:2001
+#: ../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."
@@ -39,7 +39,7 @@ msgstr ""
 
 #. Type: boolean
 #. Description
-#: ../mysql-server-5.6.templates:2001
+#: ../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."
@@ -49,7 +49,7 @@ msgstr ""
 
 #. Type: note
 #. Description
-#: ../mysql-server-5.6.templates:3001
+#: ../mysql-wsrep-server-5.6.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.6.templates:3001
+#: ../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:"
@@ -67,7 +67,7 @@ msgstr ""
 
 #. Type: note
 #. Description
-#: ../mysql-server-5.6.templates:3001
+#: ../mysql-wsrep-server-5.6.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.6.templates:4001
+#: ../mysql-wsrep-server-5.6.templates:4001
 msgid "Remove all MySQL databases?"
 msgstr ""
 
 #. Type: boolean
 #. Description
-#: ../mysql-server-5.6.templates:4001
+#: ../mysql-wsrep-server-5.6.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.6.templates:4001
+#: ../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 "
@@ -105,7 +105,7 @@ msgstr ""
 
 #. Type: boolean
 #. Description
-#: ../mysql-server-5.6.templates:5001
+#: ../mysql-wsrep-server-5.6.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.6.templates:5001
+#: ../mysql-wsrep-server-5.6.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.6.templates:6001
+#: ../mysql-wsrep-server-5.6.templates:6001
 msgid "New password for the MySQL \"root\" user:"
 msgstr ""
 
 #. Type: password
 #. Description
-#: ../mysql-server-5.6.templates:6001
+#: ../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."
@@ -140,25 +140,25 @@ msgstr ""
 
 #. Type: password
 #. Description
-#: ../mysql-server-5.6.templates:6001
+#: ../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-server-5.6.templates:7001
+#: ../mysql-wsrep-server-5.6.templates:7001
 msgid "Repeat password for the MySQL \"root\" user:"
 msgstr ""
 
 #. Type: error
 #. Description
-#: ../mysql-server-5.6.templates:8001
+#: ../mysql-wsrep-server-5.6.templates:8001
 msgid "Unable to set password for the MySQL \"root\" user"
 msgstr ""
 
 #. Type: error
 #. Description
-#: ../mysql-server-5.6.templates:8001
+#: ../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 "
@@ -170,7 +170,7 @@ msgstr ""
 
 #. Type: error
 #. Description
-#: ../mysql-server-5.6.templates:8001
+#: ../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ó "
@@ -178,7 +178,7 @@ msgstr ""
 
 #. Type: error
 #. Description
-#: ../mysql-server-5.6.templates:8001
+#: ../mysql-wsrep-server-5.6.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.6.templates:9001
+#: ../mysql-wsrep-server-5.6.templates:9001
 msgid "Password input error"
 msgstr ""
 
 #. Type: error
 #. Description
-#: ../mysql-server-5.6.templates:9001
+#: ../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-server-5.6.templates:10001
+#: ../mysql-wsrep-server-5.6.templates:10001
 msgid "NDB Cluster seems to be in use"
 msgstr ""
 
 #. Type: error
 #. Description
-#: ../mysql-server-5.6.templates:10001
+#: ../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 "
index 38b78cb1c1c215ce205afe59ecf1d13232fc7fd3..a6be13baaa856c722aa18887ec1cded6c4d03fc6 100644 (file)
@@ -14,8 +14,8 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: mysql-dfsg-5.6\n"
-"Report-Msgid-Bugs-To: mysql-5.6@packages.debian.org\n"
-"POT-Creation-Date: 2011-11-08 11:42-0800\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 <kurem@debian.cz>\n"
 "Language-Team: Czech <debian-l10n-czech@lists.debian.org>\n"
@@ -26,19 +26,19 @@ msgstr ""
 
 #. Type: boolean
 #. Description
-#: ../mysql-server-5.6.templates:2001
+#: ../mysql-wsrep-server-5.6.templates:2001
 msgid "Really proceed with downgrade?"
 msgstr "Opravdu pokračovat v degradaci?"
 
 #. Type: boolean
 #. Description
-#: ../mysql-server-5.6.templates:2001
+#: ../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-server-5.6.templates:2001
+#: ../mysql-wsrep-server-5.6.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.6.templates:2001
+#: ../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."
@@ -60,13 +60,13 @@ msgstr ""
 
 #. Type: note
 #. Description
-#: ../mysql-server-5.6.templates:3001
+#: ../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-server-5.6.templates:3001
+#: ../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:"
@@ -74,7 +74,7 @@ msgstr ""
 
 #. Type: note
 #. Description
-#: ../mysql-server-5.6.templates:3001
+#: ../mysql-wsrep-server-5.6.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.6.templates:4001
+#: ../mysql-wsrep-server-5.6.templates:4001
 msgid "Remove all MySQL databases?"
 msgstr "Odstranit všechny MySQL databáze?"
 
 #. Type: boolean
 #. Description
-#: ../mysql-server-5.6.templates:4001
+#: ../mysql-wsrep-server-5.6.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.6.templates:4001
+#: ../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 "
@@ -114,13 +114,13 @@ msgstr ""
 
 #. Type: boolean
 #. Description
-#: ../mysql-server-5.6.templates:5001
+#: ../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-server-5.6.templates:5001
+#: ../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."
@@ -130,13 +130,13 @@ msgstr ""
 
 #. Type: password
 #. Description
-#: ../mysql-server-5.6.templates:6001
+#: ../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-server-5.6.templates:6001
+#: ../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."
@@ -146,7 +146,7 @@ msgstr ""
 
 #. Type: password
 #. Description
-#: ../mysql-server-5.6.templates:6001
+#: ../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."
@@ -154,7 +154,7 @@ msgstr "Ponecháte-li pole prázdné, heslo se nezmění."
 
 #. Type: password
 #. Description
-#: ../mysql-server-5.6.templates:7001
+#: ../mysql-wsrep-server-5.6.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.6.templates:8001
+#: ../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-server-5.6.templates:8001
+#: ../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 "
@@ -180,7 +180,7 @@ msgstr ""
 
 #. Type: error
 #. Description
-#: ../mysql-server-5.6.templates:8001
+#: ../mysql-wsrep-server-5.6.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.6.templates:8001
+#: ../mysql-wsrep-server-5.6.templates:8001
 #, fuzzy
 #| msgid ""
 #| "Please read the /usr/share/doc/mysql-server-5.6/README.Debian file for "
@@ -202,25 +202,25 @@ msgstr ""
 
 #. Type: error
 #. Description
-#: ../mysql-server-5.6.templates:9001
+#: ../mysql-wsrep-server-5.6.templates:9001
 msgid "Password input error"
 msgstr ""
 
 #. Type: error
 #. Description
-#: ../mysql-server-5.6.templates:9001
+#: ../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-server-5.6.templates:10001
+#: ../mysql-wsrep-server-5.6.templates:10001
 msgid "NDB Cluster seems to be in use"
 msgstr ""
 
 #. Type: error
 #. Description
-#: ../mysql-server-5.6.templates:10001
+#: ../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 "
index 81ccf104b1df695d4378590a821868cffbbacfed..94019aa36b73ec3b221ab9db36465b69351dd770 100644 (file)
@@ -7,8 +7,8 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: mysql-5.1\n"
-"Report-Msgid-Bugs-To: mysql-5.6@packages.debian.org\n"
-"POT-Creation-Date: 2011-11-08 11:42-0800\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 <joedalton2@yahoo.dk>\n"
 "Language-Team: Danish <debian-l10n-danish@lists.debian.org> \n"
@@ -19,19 +19,19 @@ msgstr ""
 
 #. Type: boolean
 #. Description
-#: ../mysql-server-5.6.templates:2001
+#: ../mysql-wsrep-server-5.6.templates:2001
 msgid "Really proceed with downgrade?"
 msgstr "Ønsker du virkelig at fortsætte nedgraderingen?"
 
 #. Type: boolean
 #. Description
-#: ../mysql-server-5.6.templates:2001
+#: ../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-server-5.6.templates:2001
+#: ../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."
@@ -41,7 +41,7 @@ msgstr ""
 
 #. Type: boolean
 #. Description
-#: ../mysql-server-5.6.templates:2001
+#: ../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."
@@ -51,13 +51,13 @@ msgstr ""
 
 #. Type: note
 #. Description
-#: ../mysql-server-5.6.templates:3001
+#: ../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-server-5.6.templates:3001
+#: ../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:"
@@ -67,7 +67,7 @@ msgstr ""
 
 #. Type: note
 #. Description
-#: ../mysql-server-5.6.templates:3001
+#: ../mysql-wsrep-server-5.6.templates:3001
 msgid ""
 "You should also check the permissions and ownership of the /var/lib/mysql "
 "directory:"
@@ -76,13 +76,13 @@ msgstr ""
 
 #. Type: boolean
 #. Description
-#: ../mysql-server-5.6.templates:4001
+#: ../mysql-wsrep-server-5.6.templates:4001
 msgid "Remove all MySQL databases?"
 msgstr "Fjern alle MySQL-databaser?"
 
 #. Type: boolean
 #. Description
-#: ../mysql-server-5.6.templates:4001
+#: ../mysql-wsrep-server-5.6.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.6.templates:4001
+#: ../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 "
@@ -104,13 +104,13 @@ msgstr ""
 
 #. Type: boolean
 #. Description
-#: ../mysql-server-5.6.templates:5001
+#: ../mysql-wsrep-server-5.6.templates:5001
 msgid "Start the MySQL server on boot?"
 msgstr "Start MySQL-serveren under systemopstart?"
 
 #. Type: boolean
 #. Description
-#: ../mysql-server-5.6.templates:5001
+#: ../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."
@@ -120,13 +120,13 @@ msgstr ""
 
 #. Type: password
 #. Description
-#: ../mysql-server-5.6.templates:6001
+#: ../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-server-5.6.templates:6001
+#: ../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."
@@ -136,25 +136,25 @@ msgstr ""
 
 #. Type: password
 #. Description
-#: ../mysql-server-5.6.templates:6001
+#: ../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-server-5.6.templates:7001
+#: ../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-server-5.6.templates:8001
+#: ../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-server-5.6.templates:8001
+#: ../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 "
@@ -167,13 +167,13 @@ msgstr ""
 
 #. Type: error
 #. Description
-#: ../mysql-server-5.6.templates:8001
+#: ../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-server-5.6.templates:8001
+#: ../mysql-wsrep-server-5.6.templates:8001
 #, fuzzy
 #| msgid ""
 #| "Please read the /usr/share/doc/mysql-server-5.1/README.Debian file for "
@@ -187,26 +187,26 @@ msgstr ""
 
 #. Type: error
 #. Description
-#: ../mysql-server-5.6.templates:9001
+#: ../mysql-wsrep-server-5.6.templates:9001
 msgid "Password input error"
 msgstr "Inddatafejl for adgangskode"
 
 #. Type: error
 #. Description
-#: ../mysql-server-5.6.templates:9001
+#: ../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-server-5.6.templates:10001
+#: ../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-server-5.6.templates:10001
+#: ../mysql-wsrep-server-5.6.templates:10001
 #, fuzzy
 #| msgid ""
 #| "MySQL-5.1 no longer provides NDB Cluster support. Please migrate to the "
index beac04fab5e40ebba2ae76d802c184e91882e33d..844f393c4b0b7149129dd6f32290e3c7920e3932 100644 (file)
@@ -15,8 +15,8 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: mysql-dfsg 5.6.23-2\n"
-"Report-Msgid-Bugs-To: mysql-5.6@packages.debian.org\n"
-"POT-Creation-Date: 2011-11-08 11:42-0800\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 <thomas.mueller@tmit.eu>\n"
 "Language-Team: german <debian-l10n-german@lists.debian.org>\n"
@@ -29,13 +29,13 @@ msgstr ""
 
 #. Type: boolean
 #. Description
-#: ../mysql-server-5.6.templates:2001
+#: ../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-server-5.6.templates:2001
+#: ../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-*."
@@ -43,7 +43,7 @@ msgstr ""
 
 #. Type: boolean
 #. Description
-#: ../mysql-server-5.6.templates:2001
+#: ../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."
@@ -53,7 +53,7 @@ msgstr ""
 
 #. Type: boolean
 #. Description
-#: ../mysql-server-5.6.templates:2001
+#: ../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."
@@ -63,13 +63,13 @@ msgstr ""
 
 #. Type: note
 #. Description
-#: ../mysql-server-5.6.templates:3001
+#: ../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-server-5.6.templates:3001
+#: ../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:"
@@ -79,7 +79,7 @@ msgstr ""
 
 #. Type: note
 #. Description
-#: ../mysql-server-5.6.templates:3001
+#: ../mysql-wsrep-server-5.6.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.6.templates:4001
+#: ../mysql-wsrep-server-5.6.templates:4001
 msgid "Remove all MySQL databases?"
 msgstr "Alle MySQL-Datenbanken entfernen?"
 
 #. Type: boolean
 #. Description
-#: ../mysql-server-5.6.templates:4001
+#: ../mysql-wsrep-server-5.6.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.6.templates:4001
+#: ../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 "
@@ -117,13 +117,13 @@ msgstr ""
 
 #. Type: boolean
 #. Description
-#: ../mysql-server-5.6.templates:5001
+#: ../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-server-5.6.templates:5001
+#: ../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."
@@ -133,13 +133,13 @@ msgstr ""
 
 #. Type: password
 #. Description
-#: ../mysql-server-5.6.templates:6001
+#: ../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-server-5.6.templates:6001
+#: ../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."
@@ -149,25 +149,25 @@ msgstr ""
 
 #. Type: password
 #. Description
-#: ../mysql-server-5.6.templates:6001
+#: ../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-server-5.6.templates:7001
+#: ../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-server-5.6.templates:8001
+#: ../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-server-5.6.templates:8001
+#: ../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 "
@@ -180,7 +180,7 @@ msgstr ""
 
 #. Type: error
 #. Description
-#: ../mysql-server-5.6.templates:8001
+#: ../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 "
@@ -188,7 +188,7 @@ msgstr ""
 
 #. Type: error
 #. Description
-#: ../mysql-server-5.6.templates:8001
+#: ../mysql-wsrep-server-5.6.templates:8001
 msgid ""
 "Please read the /usr/share/doc/mysql-server-5.6/README.Debian file for more "
 "information."
@@ -198,13 +198,13 @@ msgstr ""
 
 #. Type: error
 #. Description
-#: ../mysql-server-5.6.templates:9001
+#: ../mysql-wsrep-server-5.6.templates:9001
 msgid "Password input error"
 msgstr "Passwort-Eingabefehler"
 
 #. Type: error
 #. Description
-#: ../mysql-server-5.6.templates:9001
+#: ../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 "
@@ -212,19 +212,19 @@ msgstr ""
 
 #. Type: error
 #. Description
-#: ../mysql-server-5.6.templates:10001
+#: ../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-server-5.6.templates:10001
+#: ../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/."
+"Ihr System zum neuen »mysql-cluster-server«-Paket und entfernen Sie alle "
+"Zeilen, die mit »ndb« beginnen aus allen Konfigurationsdateien im "
+"Verzeichnis /etc/mysql/."
index c772190aed304f3e870c7223c41f07db549f9660..10f715cf815ed9841299bd5b006fa3c910e543ec 100644 (file)
@@ -40,8 +40,8 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: mysql-5.6\n"
-"Report-Msgid-Bugs-To: mysql-5.6@packages.debian.org\n"
-"POT-Creation-Date: 2011-11-08 11:42-0800\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 <jfs@debian.org>\n"
 "Language-Team: Debian l10 Spanish <debian-l10n-spanish@lists.debian.org>\n"
@@ -54,20 +54,20 @@ msgstr ""
 
 #. Type: boolean
 #. Description
-#: ../mysql-server-5.6.templates:2001
+#: ../mysql-wsrep-server-5.6.templates:2001
 msgid "Really proceed with downgrade?"
 msgstr "¿Desea realmente continuar con la desactualización?"
 
 #. Type: boolean
 #. Description
-#: ../mysql-server-5.6.templates:2001
+#: ../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-server-5.6.templates:2001
+#: ../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."
@@ -77,7 +77,7 @@ msgstr ""
 
 #. Type: boolean
 #. Description
-#: ../mysql-server-5.6.templates:2001
+#: ../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."
@@ -87,13 +87,13 @@ msgstr ""
 
 #. Type: note
 #. Description
-#: ../mysql-server-5.6.templates:3001
+#: ../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-server-5.6.templates:3001
+#: ../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:"
@@ -103,7 +103,7 @@ msgstr ""
 
 #. Type: note
 #. Description
-#: ../mysql-server-5.6.templates:3001
+#: ../mysql-wsrep-server-5.6.templates:3001
 msgid ""
 "You should also check the permissions and ownership of the /var/lib/mysql "
 "directory:"
@@ -113,13 +113,13 @@ msgstr ""
 
 #. Type: boolean
 #. Description
-#: ../mysql-server-5.6.templates:4001
+#: ../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-server-5.6.templates:4001
+#: ../mysql-wsrep-server-5.6.templates:4001
 msgid ""
 "The /var/lib/mysql directory which contains the MySQL databases is about to "
 "be removed."
@@ -129,7 +129,7 @@ msgstr ""
 
 #. Type: boolean
 #. Description
-#: ../mysql-server-5.6.templates:4001
+#: ../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 "
@@ -141,13 +141,13 @@ msgstr ""
 
 #. Type: boolean
 #. Description
-#: ../mysql-server-5.6.templates:5001
+#: ../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-server-5.6.templates:5001
+#: ../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."
@@ -157,13 +157,13 @@ msgstr ""
 
 #. Type: password
 #. Description
-#: ../mysql-server-5.6.templates:6001
+#: ../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-server-5.6.templates:6001
+#: ../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."
@@ -173,25 +173,25 @@ msgstr ""
 
 #. Type: password
 #. Description
-#: ../mysql-server-5.6.templates:6001
+#: ../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-server-5.6.templates:7001
+#: ../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-server-5.6.templates:8001
+#: ../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-server-5.6.templates:8001
+#: ../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 "
@@ -204,7 +204,7 @@ msgstr ""
 
 #. Type: error
 #. Description
-#: ../mysql-server-5.6.templates:8001
+#: ../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 "
@@ -212,7 +212,7 @@ msgstr ""
 
 #. Type: error
 #. Description
-#: ../mysql-server-5.6.templates:8001
+#: ../mysql-wsrep-server-5.6.templates:8001
 msgid ""
 "Please read the /usr/share/doc/mysql-server-5.6/README.Debian file for more "
 "information."
@@ -221,34 +221,34 @@ msgstr ""
 
 #. Type: error
 #. Description
-#: ../mysql-server-5.6.templates:9001
+#: ../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-server-5.6.templates:9001
+#: ../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-server-5.6.templates:10001
+#: ../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-server-5.6.templates:10001
+#: ../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/."
+"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 "
index 4dd5185622f11953d4e053efa06c3abc4ac6bc9f..e9878c0d2085be28d3337636b7a2da7b41582018 100644 (file)
@@ -6,8 +6,8 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: eu\n"
-"Report-Msgid-Bugs-To: mysql-5.6@packages.debian.org\n"
-"POT-Creation-Date: 2011-11-08 11:42-0800\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 <pi@beobide.net>\n"
 "Language-Team: Euskara <debian-l10n-eu@lists.debian.org>\n"
@@ -20,19 +20,19 @@ msgstr ""
 
 #. Type: boolean
 #. Description
-#: ../mysql-server-5.6.templates:2001
+#: ../mysql-wsrep-server-5.6.templates:2001
 msgid "Really proceed with downgrade?"
 msgstr "Benetan bertsio zaharragora itzuli nahi duzu?"
 
 #. Type: boolean
 #. Description
-#: ../mysql-server-5.6.templates:2001
+#: ../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-server-5.6.templates:2001
+#: ../mysql-wsrep-server-5.6.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.6.templates:2001
+#: ../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."
@@ -56,13 +56,13 @@ msgstr ""
 
 #. Type: note
 #. Description
-#: ../mysql-server-5.6.templates:3001
+#: ../mysql-wsrep-server-5.6.templates:3001
 msgid "Important note for NIS/YP users"
 msgstr "NIS/YP erabiltzaileentzat ohar garrantzitsua"
 
 #. Type: note
 #. Description
-#: ../mysql-server-5.6.templates:3001
+#: ../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:"
@@ -70,7 +70,7 @@ msgstr ""
 
 #. Type: note
 #. Description
-#: ../mysql-server-5.6.templates:3001
+#: ../mysql-wsrep-server-5.6.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.6.templates:4001
+#: ../mysql-wsrep-server-5.6.templates:4001
 msgid "Remove all MySQL databases?"
 msgstr "Ezabatu MySQL datubase guztiak?"
 
 #. Type: boolean
 #. Description
-#: ../mysql-server-5.6.templates:4001
+#: ../mysql-wsrep-server-5.6.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.6.templates:4001
+#: ../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 "
@@ -110,13 +110,13 @@ msgstr ""
 
 #. Type: boolean
 #. Description
-#: ../mysql-server-5.6.templates:5001
+#: ../mysql-wsrep-server-5.6.templates:5001
 msgid "Start the MySQL server on boot?"
 msgstr "Abioan MySQL zerbitzaria abiarazi?"
 
 #. Type: boolean
 #. Description
-#: ../mysql-server-5.6.templates:5001
+#: ../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."
@@ -126,13 +126,13 @@ msgstr ""
 
 #. Type: password
 #. Description
-#: ../mysql-server-5.6.templates:6001
+#: ../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-server-5.6.templates:6001
+#: ../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."
@@ -142,7 +142,7 @@ msgstr ""
 
 #. Type: password
 #. Description
-#: ../mysql-server-5.6.templates:6001
+#: ../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."
@@ -150,19 +150,19 @@ msgstr "Eremua hau zurian utziaz gero ez da pasahitza aldatuko."
 
 #. Type: password
 #. Description
-#: ../mysql-server-5.6.templates:7001
+#: ../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-server-5.6.templates:8001
+#: ../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-server-5.6.templates:8001
+#: ../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 "
@@ -174,14 +174,14 @@ msgstr ""
 
 #. Type: error
 #. Description
-#: ../mysql-server-5.6.templates:8001
+#: ../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-server-5.6.templates:8001
+#: ../mysql-wsrep-server-5.6.templates:8001
 #, fuzzy
 #| msgid ""
 #| "Please read the /usr/share/doc/mysql-server-5.6/README.Debian file for "
@@ -195,25 +195,25 @@ msgstr ""
 
 #. Type: error
 #. Description
-#: ../mysql-server-5.6.templates:9001
+#: ../mysql-wsrep-server-5.6.templates:9001
 msgid "Password input error"
 msgstr "Pasahitz sarrera errorea"
 
 #. Type: error
 #. Description
-#: ../mysql-server-5.6.templates:9001
+#: ../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-server-5.6.templates:10001
+#: ../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-server-5.6.templates:10001
+#: ../mysql-wsrep-server-5.6.templates:10001
 #, fuzzy
 #| msgid ""
 #| "MySQL-5.6 has orphaned NDB Cluster support. Please migrate to the new "
index a3048e2dfe17efc4697bc60ab3c82ecc5f08ffe1..9ced0c0402310dc9088452337294bc2fa0e47414 100644 (file)
@@ -7,8 +7,8 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: fr\n"
-"Report-Msgid-Bugs-To: mysql-5.6@packages.debian.org\n"
-"POT-Creation-Date: 2011-11-08 11:42-0800\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 <bubulle@debian.org>\n"
 "Language-Team: French <debian-l10n-french@lists.debian.org>\n"
@@ -22,19 +22,19 @@ msgstr ""
 
 #. Type: boolean
 #. Description
-#: ../mysql-server-5.6.templates:2001
+#: ../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-server-5.6.templates:2001
+#: ../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-server-5.6.templates:2001
+#: ../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."
@@ -44,7 +44,7 @@ msgstr ""
 
 #. Type: boolean
 #. Description
-#: ../mysql-server-5.6.templates:2001
+#: ../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."
@@ -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.6.templates:3001
+#: ../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-server-5.6.templates:3001
+#: ../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:"
@@ -68,7 +68,7 @@ msgstr ""
 
 #. Type: note
 #. Description
-#: ../mysql-server-5.6.templates:3001
+#: ../mysql-wsrep-server-5.6.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.6.templates:4001
+#: ../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-server-5.6.templates:4001
+#: ../mysql-wsrep-server-5.6.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.6.templates:4001
+#: ../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 "
@@ -105,13 +105,13 @@ msgstr ""
 
 #. Type: boolean
 #. Description
-#: ../mysql-server-5.6.templates:5001
+#: ../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-server-5.6.templates:5001
+#: ../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."
@@ -121,13 +121,13 @@ msgstr ""
 
 #. Type: password
 #. Description
-#: ../mysql-server-5.6.templates:6001
+#: ../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-server-5.6.templates:6001
+#: ../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."
@@ -137,26 +137,26 @@ msgstr ""
 
 #. Type: password
 #. Description
-#: ../mysql-server-5.6.templates:6001
+#: ../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-server-5.6.templates:7001
+#: ../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-server-5.6.templates:8001
+#: ../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-server-5.6.templates:8001
+#: ../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 "
@@ -168,7 +168,7 @@ msgstr ""
 
 #. Type: error
 #. Description
-#: ../mysql-server-5.6.templates:8001
+#: ../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 "
@@ -176,7 +176,7 @@ msgstr ""
 
 #. Type: error
 #. Description
-#: ../mysql-server-5.6.templates:8001
+#: ../mysql-wsrep-server-5.6.templates:8001
 msgid ""
 "Please read the /usr/share/doc/mysql-server-5.6/README.Debian file for more "
 "information."
@@ -186,13 +186,13 @@ msgstr ""
 
 #. Type: error
 #. Description
-#: ../mysql-server-5.6.templates:9001
+#: ../mysql-wsrep-server-5.6.templates:9001
 msgid "Password input error"
 msgstr "Erreur de saisie du mot de passe"
 
 #. Type: error
 #. Description
-#: ../mysql-server-5.6.templates:9001
+#: ../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 "
@@ -200,13 +200,13 @@ msgstr ""
 
 #. Type: error
 #. Description
-#: ../mysql-server-5.6.templates:10001
+#: ../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-server-5.6.templates:10001
+#: ../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 "
index 0623ca078c8128c57d428f9aad531ffb5e131ee3..6bb14076e0ee65e3fc75e64f6d1f00e704dc6806 100644 (file)
@@ -5,8 +5,8 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: mysql-dfsg-5.6\n"
-"Report-Msgid-Bugs-To: mysql-5.6@packages.debian.org\n"
-"POT-Creation-Date: 2011-11-08 11:42-0800\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 <jtarrio@debian.org>\n"
 "Language-Team: Galician <proxecto@trasno.net>\n"
@@ -17,19 +17,19 @@ msgstr ""
 
 #. Type: boolean
 #. Description
-#: ../mysql-server-5.6.templates:2001
+#: ../mysql-wsrep-server-5.6.templates:2001
 msgid "Really proceed with downgrade?"
 msgstr "¿Quere pasar a unha versión anterior?"
 
 #. Type: boolean
 #. Description
-#: ../mysql-server-5.6.templates:2001
+#: ../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-server-5.6.templates:2001
+#: ../mysql-wsrep-server-5.6.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.6.templates:2001
+#: ../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."
@@ -53,13 +53,13 @@ msgstr ""
 
 #. Type: note
 #. Description
-#: ../mysql-server-5.6.templates:3001
+#: ../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-server-5.6.templates:3001
+#: ../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:"
@@ -67,7 +67,7 @@ msgstr ""
 
 #. Type: note
 #. Description
-#: ../mysql-server-5.6.templates:3001
+#: ../mysql-wsrep-server-5.6.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.6.templates:4001
+#: ../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-server-5.6.templates:4001
+#: ../mysql-wsrep-server-5.6.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.6.templates:4001
+#: ../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 "
@@ -109,13 +109,13 @@ msgstr ""
 
 #. Type: boolean
 #. Description
-#: ../mysql-server-5.6.templates:5001
+#: ../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-server-5.6.templates:5001
+#: ../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."
@@ -125,13 +125,13 @@ msgstr ""
 
 #. Type: password
 #. Description
-#: ../mysql-server-5.6.templates:6001
+#: ../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-server-5.6.templates:6001
+#: ../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."
@@ -141,7 +141,7 @@ msgstr ""
 
 #. Type: password
 #. Description
-#: ../mysql-server-5.6.templates:6001
+#: ../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."
@@ -149,7 +149,7 @@ msgstr "Se deixa o campo en branco, non se ha cambiar o contrasinal."
 
 #. Type: password
 #. Description
-#: ../mysql-server-5.6.templates:7001
+#: ../mysql-wsrep-server-5.6.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.6.templates:8001
+#: ../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-server-5.6.templates:8001
+#: ../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 "
@@ -175,7 +175,7 @@ msgstr ""
 
 #. Type: error
 #. Description
-#: ../mysql-server-5.6.templates:8001
+#: ../mysql-wsrep-server-5.6.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.6.templates:8001
+#: ../mysql-wsrep-server-5.6.templates:8001
 #, fuzzy
 #| msgid ""
 #| "Please read the /usr/share/doc/mysql-server-5.6/README.Debian file for "
@@ -198,25 +198,25 @@ msgstr ""
 
 #. Type: error
 #. Description
-#: ../mysql-server-5.6.templates:9001
+#: ../mysql-wsrep-server-5.6.templates:9001
 msgid "Password input error"
 msgstr ""
 
 #. Type: error
 #. Description
-#: ../mysql-server-5.6.templates:9001
+#: ../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-server-5.6.templates:10001
+#: ../mysql-wsrep-server-5.6.templates:10001
 msgid "NDB Cluster seems to be in use"
 msgstr ""
 
 #. Type: error
 #. Description
-#: ../mysql-server-5.6.templates:10001
+#: ../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 "
index 7a9641069a7879d2707872e376e09bf97749b98b..b0567e55508b96bc616834c278ff04f4baa638aa 100644 (file)
@@ -1,13 +1,13 @@
-# 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 <luca.mo@tiscali.it>, 2006 - 2009.
-# 
+# Italian (it) translation of debconf templates for mysql-dfsg-5.6\r
+# Copyright (C) 2009 Software in the Public Interest\r
+# This file is distributed under the same license as the mysql-dfsg-5.6 package.\r
+# Luca Monducci <luca.mo@tiscali.it>, 2006 - 2009.\r
+# \r
 msgid ""
 msgstr ""
 "Project-Id-Version: mysql-dfsg-5.6 5.6.8 italian debconf templates\n"
-"Report-Msgid-Bugs-To: mysql-5.6@packages.debian.org\n"
-"POT-Creation-Date: 2011-11-08 11:42-0800\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 <luca.mo@tiscali.it>\n"
 "Language-Team: Italian <debian-l10n-italian@lists.debian.org>\n"
@@ -18,20 +18,20 @@ msgstr ""
 
 #. Type: boolean
 #. Description
-#: ../mysql-server-5.6.templates:2001
+#: ../mysql-wsrep-server-5.6.templates:2001
 msgid "Really proceed with downgrade?"
 msgstr "Procedere realmente con l'abbassamento di versione?"
 
 #. Type: boolean
 #. Description
-#: ../mysql-server-5.6.templates:2001
+#: ../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-server-5.6.templates:2001
+#: ../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."
@@ -41,7 +41,7 @@ msgstr ""
 
 #. Type: boolean
 #. Description
-#: ../mysql-server-5.6.templates:2001
+#: ../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."
@@ -51,13 +51,13 @@ msgstr ""
 
 #. Type: note
 #. Description
-#: ../mysql-server-5.6.templates:3001
+#: ../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-server-5.6.templates:3001
+#: ../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:"
@@ -67,7 +67,7 @@ msgstr ""
 
 #. Type: note
 #. Description
-#: ../mysql-server-5.6.templates:3001
+#: ../mysql-wsrep-server-5.6.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.6.templates:4001
+#: ../mysql-wsrep-server-5.6.templates:4001
 msgid "Remove all MySQL databases?"
 msgstr "Eliminare tutti i database MySQL?"
 
 #. Type: boolean
 #. Description
-#: ../mysql-server-5.6.templates:4001
+#: ../mysql-wsrep-server-5.6.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.6.templates:4001
+#: ../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 "
@@ -105,13 +105,13 @@ msgstr ""
 
 #. Type: boolean
 #. Description
-#: ../mysql-server-5.6.templates:5001
+#: ../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-server-5.6.templates:5001
+#: ../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."
@@ -121,13 +121,13 @@ msgstr ""
 
 #. Type: password
 #. Description
-#: ../mysql-server-5.6.templates:6001
+#: ../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-server-5.6.templates:6001
+#: ../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."
@@ -137,25 +137,25 @@ msgstr ""
 
 #. Type: password
 #. Description
-#: ../mysql-server-5.6.templates:6001
+#: ../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-server-5.6.templates:7001
+#: ../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-server-5.6.templates:8001
+#: ../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-server-5.6.templates:8001
+#: ../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 "
@@ -168,14 +168,14 @@ msgstr ""
 
 #. Type: error
 #. Description
-#: ../mysql-server-5.6.templates:8001
+#: ../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-server-5.6.templates:8001
+#: ../mysql-wsrep-server-5.6.templates:8001
 #, fuzzy
 #| msgid ""
 #| "Please read the /usr/share/doc/mysql-server-5.6/README.Debian file for "
@@ -189,25 +189,25 @@ msgstr ""
 
 #. Type: error
 #. Description
-#: ../mysql-server-5.6.templates:9001
+#: ../mysql-wsrep-server-5.6.templates:9001
 msgid "Password input error"
 msgstr "Errore di inserimento della password"
 
 #. Type: error
 #. Description
-#: ../mysql-server-5.6.templates:9001
+#: ../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-server-5.6.templates:10001
+#: ../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-server-5.6.templates:10001
+#: ../mysql-wsrep-server-5.6.templates:10001
 #, fuzzy
 #| msgid ""
 #| "MySQL-5.6 no longer provides NDB Cluster support. Please migrate to the "
index ee1c92c56e2dc126a28ab1601366ee6bedfc266c..796d5e3efc2c499b79dcff87b1d66d27f9ae740b 100644 (file)
@@ -15,8 +15,8 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: mysql-dfsg-5.6 5.6.8-1\n"
-"Report-Msgid-Bugs-To: mysql-5.6@packages.debian.org\n"
-"POT-Creation-Date: 2011-11-08 11:42-0800\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) <henrich@debian.or.jp>\n"
 "Language-Team: Japanese <debian-japanese@lists.debian.org>\n"
@@ -27,13 +27,13 @@ msgstr ""
 
 #. Type: boolean
 #. Description
-#: ../mysql-server-5.6.templates:2001
+#: ../mysql-wsrep-server-5.6.templates:2001
 msgid "Really proceed with downgrade?"
 msgstr "本当にダウングレードを実行しますか?"
 
 #. Type: boolean
 #. Description
-#: ../mysql-server-5.6.templates:2001
+#: ../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 という名前のファイルが存在して"
@@ -41,7 +41,7 @@ msgstr ""
 
 #. Type: boolean
 #. Description
-#: ../mysql-server-5.6.templates:2001
+#: ../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."
@@ -51,7 +51,7 @@ msgstr ""
 
 #. Type: boolean
 #. Description
-#: ../mysql-server-5.6.templates:2001
+#: ../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."
@@ -61,13 +61,13 @@ msgstr ""
 
 #. Type: note
 #. Description
-#: ../mysql-server-5.6.templates:3001
+#: ../mysql-wsrep-server-5.6.templates:3001
 msgid "Important note for NIS/YP users"
 msgstr "NIS/YP ユーザへの重要な注意"
 
 #. Type: note
 #. Description
-#: ../mysql-server-5.6.templates:3001
+#: ../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:"
@@ -77,7 +77,7 @@ msgstr ""
 
 #. Type: note
 #. Description
-#: ../mysql-server-5.6.templates:3001
+#: ../mysql-wsrep-server-5.6.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.6.templates:4001
+#: ../mysql-wsrep-server-5.6.templates:4001
 msgid "Remove all MySQL databases?"
 msgstr "すべての MySQL データベースを削除しますか?"
 
 #. Type: boolean
 #. Description
-#: ../mysql-server-5.6.templates:4001
+#: ../mysql-wsrep-server-5.6.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.6.templates:4001
+#: ../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 "
@@ -113,13 +113,13 @@ msgstr ""
 
 #. Type: boolean
 #. Description
-#: ../mysql-server-5.6.templates:5001
+#: ../mysql-wsrep-server-5.6.templates:5001
 msgid "Start the MySQL server on boot?"
 msgstr "MySQL をシステム起動時に開始しますか?"
 
 #. Type: boolean
 #. Description
-#: ../mysql-server-5.6.templates:5001
+#: ../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."
@@ -129,13 +129,13 @@ msgstr ""
 
 #. Type: password
 #. Description
-#: ../mysql-server-5.6.templates:6001
+#: ../mysql-wsrep-server-5.6.templates:6001
 msgid "New password for the MySQL \"root\" user:"
 msgstr "MySQL の \"root\" ユーザに対する新しいパスワード:"
 
 #. Type: password
 #. Description
-#: ../mysql-server-5.6.templates:6001
+#: ../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."
@@ -145,25 +145,25 @@ msgstr ""
 
 #. Type: password
 #. Description
-#: ../mysql-server-5.6.templates:6001
+#: ../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-server-5.6.templates:7001
+#: ../mysql-wsrep-server-5.6.templates:7001
 msgid "Repeat password for the MySQL \"root\" user:"
 msgstr "MySQL の \"root\" ユーザに対する新しいパスワード:"
 
 #. Type: error
 #. Description
-#: ../mysql-server-5.6.templates:8001
+#: ../mysql-wsrep-server-5.6.templates:8001
 msgid "Unable to set password for the MySQL \"root\" user"
 msgstr "MySQL の \"root\" ユーザのパスワードを設定できません"
 
 #. Type: error
 #. Description
-#: ../mysql-server-5.6.templates:8001
+#: ../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 "
@@ -175,14 +175,14 @@ msgstr ""
 
 #. Type: error
 #. Description
-#: ../mysql-server-5.6.templates:8001
+#: ../mysql-wsrep-server-5.6.templates:8001
 msgid "You should check the account's password after the package installation."
 msgstr ""
 "パッケージのインストール後、アカウントのパスワードを確認する必要があります。"
 
 #. Type: error
 #. Description
-#: ../mysql-server-5.6.templates:8001
+#: ../mysql-wsrep-server-5.6.templates:8001
 #, fuzzy
 #| msgid ""
 #| "Please read the /usr/share/doc/mysql-server-5.6/README.Debian file for "
@@ -195,25 +195,25 @@ msgstr ""
 
 #. Type: error
 #. Description
-#: ../mysql-server-5.6.templates:9001
+#: ../mysql-wsrep-server-5.6.templates:9001
 msgid "Password input error"
 msgstr "パスワード入力エラー"
 
 #. Type: error
 #. Description
-#: ../mysql-server-5.6.templates:9001
+#: ../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-server-5.6.templates:10001
+#: ../mysql-wsrep-server-5.6.templates:10001
 msgid "NDB Cluster seems to be in use"
 msgstr "NDB クラスタが利用されているようです"
 
 #. Type: error
 #. Description
-#: ../mysql-server-5.6.templates:10001
+#: ../mysql-wsrep-server-5.6.templates:10001
 #, fuzzy
 #| msgid ""
 #| "MySQL-5.6 no longer provides NDB Cluster support. Please migrate to the "
index 367cfef55c6aa65628f661ad25471b1ff7ac96dc..d3c9d0e391c25169d745aa564a880c1da1383b10 100644 (file)
@@ -6,8 +6,8 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: mysql_nb\n"
-"Report-Msgid-Bugs-To: mysql-5.6@packages.debian.org\n"
-"POT-Creation-Date: 2011-11-08 11:42-0800\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 <bjornst@powertech.no>\n"
 "Language-Team: Norwegian Bokmål <i18n-nb@lister.ping.uio.no>\n"
@@ -19,7 +19,7 @@ msgstr ""
 
 #. Type: boolean
 #. Description
-#: ../mysql-server-5.6.templates:2001
+#: ../mysql-wsrep-server-5.6.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.6.templates:2001
+#: ../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-server-5.6.templates:2001
+#: ../mysql-wsrep-server-5.6.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.6.templates:2001
+#: ../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."
@@ -57,7 +57,7 @@ msgstr ""
 
 #. Type: note
 #. Description
-#: ../mysql-server-5.6.templates:3001
+#: ../mysql-wsrep-server-5.6.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.6.templates:3001
+#: ../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:"
@@ -73,7 +73,7 @@ msgstr ""
 
 #. Type: note
 #. Description
-#: ../mysql-server-5.6.templates:3001
+#: ../mysql-wsrep-server-5.6.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.6.templates:4001
+#: ../mysql-wsrep-server-5.6.templates:4001
 msgid "Remove all MySQL databases?"
 msgstr ""
 
 #. Type: boolean
 #. Description
-#: ../mysql-server-5.6.templates:4001
+#: ../mysql-wsrep-server-5.6.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.6.templates:4001
+#: ../mysql-wsrep-server-5.6.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.6.templates:5001
+#: ../mysql-wsrep-server-5.6.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.6.templates:5001
+#: ../mysql-wsrep-server-5.6.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.6.templates:6001
+#: ../mysql-wsrep-server-5.6.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.6.templates:6001
+#: ../mysql-wsrep-server-5.6.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.6.templates:6001
+#: ../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-server-5.6.templates:7001
+#: ../mysql-wsrep-server-5.6.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.6.templates:8001
+#: ../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"
@@ -178,7 +178,7 @@ msgstr "Klarer ikke angi passord for MySQLs «root»-bruker"
 
 #. Type: error
 #. Description
-#: ../mysql-server-5.6.templates:8001
+#: ../mysql-wsrep-server-5.6.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.6.templates:8001
+#: ../mysql-wsrep-server-5.6.templates:8001
 msgid "You should check the account's password after the package installation."
 msgstr ""
 
 #. Type: error
 #. Description
-#: ../mysql-server-5.6.templates:8001
+#: ../mysql-wsrep-server-5.6.templates:8001
 msgid ""
 "Please read the /usr/share/doc/mysql-server-5.6/README.Debian file for more "
 "information."
@@ -210,25 +210,25 @@ msgstr ""
 
 #. Type: error
 #. Description
-#: ../mysql-server-5.6.templates:9001
+#: ../mysql-wsrep-server-5.6.templates:9001
 msgid "Password input error"
 msgstr ""
 
 #. Type: error
 #. Description
-#: ../mysql-server-5.6.templates:9001
+#: ../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-server-5.6.templates:10001
+#: ../mysql-wsrep-server-5.6.templates:10001
 msgid "NDB Cluster seems to be in use"
 msgstr ""
 
 #. Type: error
 #. Description
-#: ../mysql-server-5.6.templates:10001
+#: ../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 "
index 63264e4e81e4cb21eeaff64aae6ec60969c4b626..8ddab3c159f4a4d93f44eb15172120b465fe30f4 100644 (file)
@@ -7,8 +7,8 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: mysql-5.6 5.6.6-1\n"
-"Report-Msgid-Bugs-To: mysql-5.6@packages.debian.org\n"
-"POT-Creation-Date: 2011-11-08 11:42-0800\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 10:26+0200\n"
 "Last-Translator: Jeroen Schot <schot@a-eskwadraat.nl>\n"
 "Language-Team: Debian l10n Dutch <debian-l10n-dutch@lists.debian.org>\n"
@@ -19,20 +19,20 @@ msgstr ""
 
 #. Type: boolean
 #. Description
-#: ../mysql-server-5.6.templates:2001
+#: ../mysql-wsrep-server-5.6.templates:2001
 msgid "Really proceed with downgrade?"
 msgstr "Wilt u echt een oude versie herstellen?"
 
 #. Type: boolean
 #. Description
-#: ../mysql-server-5.6.templates:2001
+#: ../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-server-5.6.templates:2001
+#: ../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."
@@ -42,7 +42,7 @@ msgstr ""
 
 #. Type: boolean
 #. Description
-#: ../mysql-server-5.6.templates:2001
+#: ../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."
@@ -52,13 +52,13 @@ msgstr ""
 
 #. Type: note
 #. Description
-#: ../mysql-server-5.6.templates:3001
+#: ../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-server-5.6.templates:3001
+#: ../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:"
@@ -68,7 +68,7 @@ msgstr ""
 
 #. Type: note
 #. Description
-#: ../mysql-server-5.6.templates:3001
+#: ../mysql-wsrep-server-5.6.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.6.templates:4001
+#: ../mysql-wsrep-server-5.6.templates:4001
 msgid "Remove all MySQL databases?"
 msgstr "Wilt u alle MySQL-databases verwijderen?"
 
 #. Type: boolean
 #. Description
-#: ../mysql-server-5.6.templates:4001
+#: ../mysql-wsrep-server-5.6.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.6.templates:4001
+#: ../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 "
@@ -106,13 +106,13 @@ msgstr ""
 
 #. Type: boolean
 #. Description
-#: ../mysql-server-5.6.templates:5001
+#: ../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-server-5.6.templates:5001
+#: ../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."
@@ -122,13 +122,13 @@ msgstr ""
 
 #. Type: password
 #. Description
-#: ../mysql-server-5.6.templates:6001
+#: ../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-server-5.6.templates:6001
+#: ../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."
@@ -138,26 +138,26 @@ msgstr ""
 
 #. Type: password
 #. Description
-#: ../mysql-server-5.6.templates:6001
+#: ../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-server-5.6.templates:7001
+#: ../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-server-5.6.templates:8001
+#: ../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-server-5.6.templates:8001
+#: ../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 "
@@ -170,7 +170,7 @@ msgstr ""
 
 #. Type: error
 #. Description
-#: ../mysql-server-5.6.templates:8001
+#: ../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 "
@@ -178,7 +178,7 @@ msgstr ""
 
 #. Type: error
 #. Description
-#: ../mysql-server-5.6.templates:8001
+#: ../mysql-wsrep-server-5.6.templates:8001
 msgid ""
 "Please read the /usr/share/doc/mysql-server-5.6/README.Debian file for more "
 "information."
@@ -188,13 +188,13 @@ msgstr ""
 
 #. Type: error
 #. Description
-#: ../mysql-server-5.6.templates:9001
+#: ../mysql-wsrep-server-5.6.templates:9001
 msgid "Password input error"
 msgstr "Fout bij invoer wachtwoord"
 
 #. Type: error
 #. Description
-#: ../mysql-server-5.6.templates:9001
+#: ../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 "
@@ -202,13 +202,13 @@ msgstr ""
 
 #. Type: error
 #. Description
-#: ../mysql-server-5.6.templates:10001
+#: ../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-server-5.6.templates:10001
+#: ../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 "
index a7a8ffd45ba4128c1013e5a5fb98634a7a557a56..f142e868937c8167e6139bbfc451de75f975de4b 100644 (file)
@@ -6,8 +6,8 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: mysql-dfsg-5.6\n"
-"Report-Msgid-Bugs-To: mysql-5.6@packages.debian.org\n"
-"POT-Creation-Date: 2011-11-08 11:42-0800\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 <elmig@debianpt.org>\n"
 "Language-Team: Portuguese <traduz@debianpt.org>\n"
@@ -18,20 +18,20 @@ msgstr ""
 
 #. Type: boolean
 #. Description
-#: ../mysql-server-5.6.templates:2001
+#: ../mysql-wsrep-server-5.6.templates:2001
 msgid "Really proceed with downgrade?"
 msgstr "Deseja mesmo fazer downgrade?"
 
 #. Type: boolean
 #. Description
-#: ../mysql-server-5.6.templates:2001
+#: ../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-server-5.6.templates:2001
+#: ../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."
@@ -41,7 +41,7 @@ msgstr ""
 
 #. Type: boolean
 #. Description
-#: ../mysql-server-5.6.templates:2001
+#: ../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."
@@ -51,13 +51,13 @@ msgstr ""
 
 #. Type: note
 #. Description
-#: ../mysql-server-5.6.templates:3001
+#: ../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-server-5.6.templates:3001
+#: ../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:"
@@ -67,7 +67,7 @@ msgstr ""
 
 #. Type: note
 #. Description
-#: ../mysql-server-5.6.templates:3001
+#: ../mysql-wsrep-server-5.6.templates:3001
 msgid ""
 "You should also check the permissions and ownership of the /var/lib/mysql "
 "directory:"
@@ -76,13 +76,13 @@ msgstr ""
 
 #. Type: boolean
 #. Description
-#: ../mysql-server-5.6.templates:4001
+#: ../mysql-wsrep-server-5.6.templates:4001
 msgid "Remove all MySQL databases?"
 msgstr "Remover todas as bases de dados MySQL?"
 
 #. Type: boolean
 #. Description
-#: ../mysql-server-5.6.templates:4001
+#: ../mysql-wsrep-server-5.6.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.6.templates:4001
+#: ../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 "
@@ -104,13 +104,13 @@ msgstr ""
 
 #. Type: boolean
 #. Description
-#: ../mysql-server-5.6.templates:5001
+#: ../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-server-5.6.templates:5001
+#: ../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."
@@ -120,13 +120,13 @@ msgstr ""
 
 #. Type: password
 #. Description
-#: ../mysql-server-5.6.templates:6001
+#: ../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-server-5.6.templates:6001
+#: ../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."
@@ -136,27 +136,27 @@ msgstr ""
 
 #. Type: password
 #. Description
-#: ../mysql-server-5.6.templates:6001
+#: ../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-server-5.6.templates:7001
+#: ../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-server-5.6.templates:8001
+#: ../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-server-5.6.templates:8001
+#: ../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 "
@@ -169,14 +169,14 @@ msgstr ""
 
 #. Type: error
 #. Description
-#: ../mysql-server-5.6.templates:8001
+#: ../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-server-5.6.templates:8001
+#: ../mysql-wsrep-server-5.6.templates:8001
 msgid ""
 "Please read the /usr/share/doc/mysql-server-5.6/README.Debian file for more "
 "information."
@@ -186,13 +186,13 @@ msgstr ""
 
 #. Type: error
 #. Description
-#: ../mysql-server-5.6.templates:9001
+#: ../mysql-wsrep-server-5.6.templates:9001
 msgid "Password input error"
 msgstr "Erro de entrada da palavra-passe"
 
 #. Type: error
 #. Description
-#: ../mysql-server-5.6.templates:9001
+#: ../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 "
@@ -200,13 +200,13 @@ msgstr ""
 
 #. Type: error
 #. Description
-#: ../mysql-server-5.6.templates:10001
+#: ../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-server-5.6.templates:10001
+#: ../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 "
index 07a6a20136ed2f97409ea40995b220dfd1b8fb59..e5fa5ee82c469418e38067b1d29159c5affefc47 100644 (file)
@@ -8,8 +8,8 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: mysql-dfsg-5.6\n"
-"Report-Msgid-Bugs-To: mysql-5.6@packages.debian.org\n"
-"POT-Creation-Date: 2011-11-08 11:42-0800\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 <andrelop@debian.org>\n"
 "Language-Team: Debian-BR Project <debian-l10n-portuguese@lists.debian.org>\n"
@@ -21,19 +21,19 @@ msgstr ""
 
 #. Type: boolean
 #. Description
-#: ../mysql-server-5.6.templates:2001
+#: ../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-server-5.6.templates:2001
+#: ../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-server-5.6.templates:2001
+#: ../mysql-wsrep-server-5.6.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.6.templates:2001
+#: ../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."
@@ -57,13 +57,13 @@ msgstr ""
 
 #. Type: note
 #. Description
-#: ../mysql-server-5.6.templates:3001
+#: ../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-server-5.6.templates:3001
+#: ../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:"
@@ -71,7 +71,7 @@ msgstr ""
 
 #. Type: note
 #. Description
-#: ../mysql-server-5.6.templates:3001
+#: ../mysql-wsrep-server-5.6.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.6.templates:4001
+#: ../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-server-5.6.templates:4001
+#: ../mysql-wsrep-server-5.6.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.6.templates:4001
+#: ../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 "
@@ -112,13 +112,13 @@ msgstr ""
 
 #. Type: boolean
 #. Description
-#: ../mysql-server-5.6.templates:5001
+#: ../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-server-5.6.templates:5001
+#: ../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."
@@ -128,13 +128,13 @@ msgstr ""
 
 #. Type: password
 #. Description
-#: ../mysql-server-5.6.templates:6001
+#: ../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-server-5.6.templates:6001
+#: ../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."
@@ -144,7 +144,7 @@ msgstr ""
 
 #. Type: password
 #. Description
-#: ../mysql-server-5.6.templates:6001
+#: ../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."
@@ -152,7 +152,7 @@ msgstr "Caso este campo seja deixado em branco, a senha não sera mudada."
 
 #. Type: password
 #. Description
-#: ../mysql-server-5.6.templates:7001
+#: ../mysql-wsrep-server-5.6.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.6.templates:8001
+#: ../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-server-5.6.templates:8001
+#: ../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 "
@@ -179,7 +179,7 @@ msgstr ""
 
 #. Type: error
 #. Description
-#: ../mysql-server-5.6.templates:8001
+#: ../mysql-wsrep-server-5.6.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.6.templates:8001
+#: ../mysql-wsrep-server-5.6.templates:8001
 #, fuzzy
 #| msgid ""
 #| "Please read the /usr/share/doc/mysql-server-5.6/README.Debian file for "
@@ -202,25 +202,25 @@ msgstr ""
 
 #. Type: error
 #. Description
-#: ../mysql-server-5.6.templates:9001
+#: ../mysql-wsrep-server-5.6.templates:9001
 msgid "Password input error"
 msgstr ""
 
 #. Type: error
 #. Description
-#: ../mysql-server-5.6.templates:9001
+#: ../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-server-5.6.templates:10001
+#: ../mysql-wsrep-server-5.6.templates:10001
 msgid "NDB Cluster seems to be in use"
 msgstr ""
 
 #. Type: error
 #. Description
-#: ../mysql-server-5.6.templates:10001
+#: ../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 "
index c1e9cbe7972cbe3d2ea93941037eb9c93aa8b7c9..0e482258bd4f0aed92dc0db6461ef377dc4b7ce4 100644 (file)
@@ -6,8 +6,8 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: po-debconf://mysql-dfsg\n"
-"Report-Msgid-Bugs-To: mysql-5.6@packages.debian.org\n"
-"POT-Creation-Date: 2011-11-08 11:42-0800\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 <stan.ieugen@gmail.com>\n"
 "Language-Team: romanian <debian-l10n-romanian@lists.debian.org>\n"
@@ -19,7 +19,7 @@ msgstr ""
 
 #. Type: boolean
 #. Description
-#: ../mysql-server-5.6.templates:2001
+#: ../mysql-wsrep-server-5.6.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.6.templates:2001
+#: ../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-server-5.6.templates:2001
+#: ../mysql-wsrep-server-5.6.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.6.templates:2001
+#: ../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."
@@ -58,7 +58,7 @@ msgstr ""
 
 #. Type: note
 #. Description
-#: ../mysql-server-5.6.templates:3001
+#: ../mysql-wsrep-server-5.6.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.6.templates:3001
+#: ../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:"
@@ -74,7 +74,7 @@ msgstr ""
 
 #. Type: note
 #. Description
-#: ../mysql-server-5.6.templates:3001
+#: ../mysql-wsrep-server-5.6.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.6.templates:4001
+#: ../mysql-wsrep-server-5.6.templates:4001
 msgid "Remove all MySQL databases?"
 msgstr ""
 
 #. Type: boolean
 #. Description
-#: ../mysql-server-5.6.templates:4001
+#: ../mysql-wsrep-server-5.6.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.6.templates:4001
+#: ../mysql-wsrep-server-5.6.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.6.templates:5001
+#: ../mysql-wsrep-server-5.6.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.6.templates:5001
+#: ../mysql-wsrep-server-5.6.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.6.templates:6001
+#: ../mysql-wsrep-server-5.6.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.6.templates:6001
+#: ../mysql-wsrep-server-5.6.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.6.templates:6001
+#: ../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-server-5.6.templates:7001
+#: ../mysql-wsrep-server-5.6.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.6.templates:8001
+#: ../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"
@@ -179,7 +179,7 @@ msgstr "Nu s-a putut stabili parola pentru utilizatorul „root” al MySQL"
 
 #. Type: error
 #. Description
-#: ../mysql-server-5.6.templates:8001
+#: ../mysql-wsrep-server-5.6.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.6.templates:8001
+#: ../mysql-wsrep-server-5.6.templates:8001
 msgid "You should check the account's password after the package installation."
 msgstr ""
 
 #. Type: error
 #. Description
-#: ../mysql-server-5.6.templates:8001
+#: ../mysql-wsrep-server-5.6.templates:8001
 msgid ""
 "Please read the /usr/share/doc/mysql-server-5.6/README.Debian file for more "
 "information."
@@ -211,25 +211,25 @@ msgstr ""
 
 #. Type: error
 #. Description
-#: ../mysql-server-5.6.templates:9001
+#: ../mysql-wsrep-server-5.6.templates:9001
 msgid "Password input error"
 msgstr ""
 
 #. Type: error
 #. Description
-#: ../mysql-server-5.6.templates:9001
+#: ../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-server-5.6.templates:10001
+#: ../mysql-wsrep-server-5.6.templates:10001
 msgid "NDB Cluster seems to be in use"
 msgstr ""
 
 #. Type: error
 #. Description
-#: ../mysql-server-5.6.templates:10001
+#: ../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 "
index 6056d4ebca214e6349d5e60c96ebc55c9f279632..59fbe33f11768b8efc55ca236479734303ca7961 100644 (file)
@@ -17,8 +17,8 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: mysql-dfsg-5.6 5.6.8-1\n"
-"Report-Msgid-Bugs-To: mysql-5.6@packages.debian.org\n"
-"POT-Creation-Date: 2011-11-08 11:42-0800\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 <yuray@komyakino.ru>\n"
 "Language-Team: Russian <debian-l10n-russian@lists.debian.org>\n"
@@ -32,19 +32,19 @@ msgstr ""
 
 #. Type: boolean
 #. Description
-#: ../mysql-server-5.6.templates:2001
+#: ../mysql-wsrep-server-5.6.templates:2001
 msgid "Really proceed with downgrade?"
 msgstr "Действительно установить более старую версию?"
 
 #. Type: boolean
 #. Description
-#: ../mysql-server-5.6.templates:2001
+#: ../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-server-5.6.templates:2001
+#: ../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."
@@ -54,7 +54,7 @@ msgstr ""
 
 #. Type: boolean
 #. Description
-#: ../mysql-server-5.6.templates:2001
+#: ../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."
@@ -64,13 +64,13 @@ msgstr ""
 
 #. Type: note
 #. Description
-#: ../mysql-server-5.6.templates:3001
+#: ../mysql-wsrep-server-5.6.templates:3001
 msgid "Important note for NIS/YP users"
 msgstr "Важное замечание для пользователей NIS/YP"
 
 #. Type: note
 #. Description
-#: ../mysql-server-5.6.templates:3001
+#: ../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:"
@@ -80,7 +80,7 @@ msgstr ""
 
 #. Type: note
 #. Description
-#: ../mysql-server-5.6.templates:3001
+#: ../mysql-wsrep-server-5.6.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.6.templates:4001
+#: ../mysql-wsrep-server-5.6.templates:4001
 msgid "Remove all MySQL databases?"
 msgstr "Удалить все базы данных MySQL?"
 
 #. Type: boolean
 #. Description
-#: ../mysql-server-5.6.templates:4001
+#: ../mysql-wsrep-server-5.6.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.6.templates:4001
+#: ../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 "
@@ -115,13 +115,13 @@ msgstr ""
 
 #. Type: boolean
 #. Description
-#: ../mysql-server-5.6.templates:5001
+#: ../mysql-wsrep-server-5.6.templates:5001
 msgid "Start the MySQL server on boot?"
 msgstr "Запускать MySQL при загрузке системы?"
 
 #. Type: boolean
 #. Description
-#: ../mysql-server-5.6.templates:5001
+#: ../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."
@@ -131,13 +131,13 @@ msgstr ""
 
 #. Type: password
 #. Description
-#: ../mysql-server-5.6.templates:6001
+#: ../mysql-wsrep-server-5.6.templates:6001
 msgid "New password for the MySQL \"root\" user:"
 msgstr "Новый пароль для MySQL пользователя «root»:"
 
 #. Type: password
 #. Description
-#: ../mysql-server-5.6.templates:6001
+#: ../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."
@@ -147,25 +147,25 @@ msgstr ""
 
 #. Type: password
 #. Description
-#: ../mysql-server-5.6.templates:6001
+#: ../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-server-5.6.templates:7001
+#: ../mysql-wsrep-server-5.6.templates:7001
 msgid "Repeat password for the MySQL \"root\" user:"
 msgstr "Повторите ввод пароля для MySQL пользователя «root»:"
 
 #. Type: error
 #. Description
-#: ../mysql-server-5.6.templates:8001
+#: ../mysql-wsrep-server-5.6.templates:8001
 msgid "Unable to set password for the MySQL \"root\" user"
 msgstr "Невозможно задать пароль MySQL пользователю «root»"
 
 #. Type: error
 #. Description
-#: ../mysql-server-5.6.templates:8001
+#: ../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 "
@@ -177,13 +177,13 @@ msgstr ""
 
 #. Type: error
 #. Description
-#: ../mysql-server-5.6.templates:8001
+#: ../mysql-wsrep-server-5.6.templates:8001
 msgid "You should check the account's password after the package installation."
 msgstr "Проверьте пароль учётной записи после установки пакета."
 
 #. Type: error
 #. Description
-#: ../mysql-server-5.6.templates:8001
+#: ../mysql-wsrep-server-5.6.templates:8001
 msgid ""
 "Please read the /usr/share/doc/mysql-server-5.6/README.Debian file for more "
 "information."
@@ -191,25 +191,25 @@ msgstr "Подробности см. в файле /usr/share/doc/mysql-server-5
 
 #. Type: error
 #. Description
-#: ../mysql-server-5.6.templates:9001
+#: ../mysql-wsrep-server-5.6.templates:9001
 msgid "Password input error"
 msgstr "Ошибка ввода пароля"
 
 #. Type: error
 #. Description
-#: ../mysql-server-5.6.templates:9001
+#: ../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-server-5.6.templates:10001
+#: ../mysql-wsrep-server-5.6.templates:10001
 msgid "NDB Cluster seems to be in use"
 msgstr "NDB Cluster уже используется"
 
 #. Type: error
 #. Description
-#: ../mysql-server-5.6.templates:10001
+#: ../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 "
index 4104175ea3acf69a9da13849017871c0273f9ff3..630a9a17e85d37a841a6c83afefea787d1529e96 100644 (file)
@@ -7,8 +7,8 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: mysql-5.1 5.1.49-3\n"
-"Report-Msgid-Bugs-To: mysql-5.6@packages.debian.org\n"
-"POT-Creation-Date: 2011-11-08 11:42-0800\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 <linux@slavino.sk>\n"
 "Language-Team: Slovak <nomail>\n"
@@ -20,19 +20,19 @@ msgstr ""
 
 #. Type: boolean
 #. Description
-#: ../mysql-server-5.6.templates:2001
+#: ../mysql-wsrep-server-5.6.templates:2001
 msgid "Really proceed with downgrade?"
 msgstr "Naozaj pokračovať v znížení verzie?"
 
 #. Type: boolean
 #. Description
-#: ../mysql-server-5.6.templates:2001
+#: ../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-server-5.6.templates:2001
+#: ../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."
@@ -42,7 +42,7 @@ msgstr ""
 
 #. Type: boolean
 #. Description
-#: ../mysql-server-5.6.templates:2001
+#: ../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."
@@ -52,13 +52,13 @@ msgstr ""
 
 #. Type: note
 #. Description
-#: ../mysql-server-5.6.templates:3001
+#: ../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-server-5.6.templates:3001
+#: ../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:"
@@ -68,7 +68,7 @@ msgstr ""
 
 #. Type: note
 #. Description
-#: ../mysql-server-5.6.templates:3001
+#: ../mysql-wsrep-server-5.6.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.6.templates:4001
+#: ../mysql-wsrep-server-5.6.templates:4001
 msgid "Remove all MySQL databases?"
 msgstr "Odstrániť všetky databázy MySQL?"
 
 #. Type: boolean
 #. Description
-#: ../mysql-server-5.6.templates:4001
+#: ../mysql-wsrep-server-5.6.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.6.templates:4001
+#: ../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 "
@@ -103,13 +103,13 @@ msgstr ""
 
 #. Type: boolean
 #. Description
-#: ../mysql-server-5.6.templates:5001
+#: ../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-server-5.6.templates:5001
+#: ../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."
@@ -119,13 +119,13 @@ msgstr ""
 
 #. Type: password
 #. Description
-#: ../mysql-server-5.6.templates:6001
+#: ../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-server-5.6.templates:6001
+#: ../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."
@@ -135,25 +135,25 @@ msgstr ""
 
 #. Type: password
 #. Description
-#: ../mysql-server-5.6.templates:6001
+#: ../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-server-5.6.templates:7001
+#: ../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-server-5.6.templates:8001
+#: ../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-server-5.6.templates:8001
+#: ../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 "
@@ -165,13 +165,13 @@ msgstr ""
 
 #. Type: error
 #. Description
-#: ../mysql-server-5.6.templates:8001
+#: ../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-server-5.6.templates:8001
+#: ../mysql-wsrep-server-5.6.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.6.templates:9001
+#: ../mysql-wsrep-server-5.6.templates:9001
 msgid "Password input error"
 msgstr "Chyba pri zadávaní hesla"
 
 #. Type: error
 #. Description
-#: ../mysql-server-5.6.templates:9001
+#: ../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-server-5.6.templates:10001
+#: ../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-server-5.6.templates:10001
+#: ../mysql-wsrep-server-5.6.templates:10001
 #, fuzzy
 #| msgid ""
 #| "MySQL-5.1 no longer provides NDB Cluster support. Please migrate to the "
index 64d81042346e6b37d3d2db618332567c1c69f840..ebbb49790c3a68a6fb782ffe19dddc2ae0344f7c 100644 (file)
@@ -1,14 +1,14 @@
-# Translation of mysql-5.6 debconf template to Swedish
-# Copyright (C) 2009, 2012 Martin Bagge <brother@bsnet.se>
-# This file is distributed under the same license as the mysql-5.6 package.
-# 
-# Andreas Henriksson <andreas@fatal.se>, 2007
-# Martin Bagge <brother@bsnet.se>, 2009, 2012
+# Translation of mysql-5.6 debconf template to Swedish\r
+# Copyright (C) 2009, 2012 Martin Bagge <brother@bsnet.se>\r
+# This file is distributed under the same license as the mysql-5.6 package.\r
+# \r
+# Andreas Henriksson <andreas@fatal.se>, 2007\r
+# Martin Bagge <brother@bsnet.se>, 2009, 2012\r
 msgid ""
 msgstr ""
 "Project-Id-Version: mysql-dfsg-5.6 5.0.21-3\n"
-"Report-Msgid-Bugs-To: mysql-5.6@packages.debian.org\n"
-"POT-Creation-Date: 2011-11-08 11:42-0800\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 <brother@bsnet.se>\n"
 "Language-Team: Swedish <debian-l10n-swedish@lists.debian.org>\n"
@@ -21,19 +21,19 @@ msgstr ""
 
 #. Type: boolean
 #. Description
-#: ../mysql-server-5.6.templates:2001
+#: ../mysql-wsrep-server-5.6.templates:2001
 msgid "Really proceed with downgrade?"
 msgstr "Vill du verkligen genomföra nedgraderingen?"
 
 #. Type: boolean
 #. Description
-#: ../mysql-server-5.6.templates:2001
+#: ../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-server-5.6.templates:2001
+#: ../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."
@@ -43,7 +43,7 @@ msgstr ""
 
 #. Type: boolean
 #. Description
-#: ../mysql-server-5.6.templates:2001
+#: ../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."
@@ -53,13 +53,13 @@ msgstr ""
 
 #. Type: note
 #. Description
-#: ../mysql-server-5.6.templates:3001
+#: ../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-server-5.6.templates:3001
+#: ../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:"
@@ -69,7 +69,7 @@ msgstr ""
 
 #. Type: note
 #. Description
-#: ../mysql-server-5.6.templates:3001
+#: ../mysql-wsrep-server-5.6.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.6.templates:4001
+#: ../mysql-wsrep-server-5.6.templates:4001
 msgid "Remove all MySQL databases?"
 msgstr "Ta bort alla MySQL-databaser?"
 
 #. Type: boolean
 #. Description
-#: ../mysql-server-5.6.templates:4001
+#: ../mysql-wsrep-server-5.6.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.6.templates:4001
+#: ../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 "
@@ -106,13 +106,13 @@ msgstr ""
 
 #. Type: boolean
 #. Description
-#: ../mysql-server-5.6.templates:5001
+#: ../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-server-5.6.templates:5001
+#: ../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."
@@ -122,13 +122,13 @@ msgstr ""
 
 #. Type: password
 #. Description
-#: ../mysql-server-5.6.templates:6001
+#: ../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-server-5.6.templates:6001
+#: ../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."
@@ -138,25 +138,25 @@ msgstr ""
 
 #. Type: password
 #. Description
-#: ../mysql-server-5.6.templates:6001
+#: ../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-server-5.6.templates:7001
+#: ../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-server-5.6.templates:8001
+#: ../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-server-5.6.templates:8001
+#: ../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 "
@@ -169,13 +169,13 @@ msgstr ""
 
 #. Type: error
 #. Description
-#: ../mysql-server-5.6.templates:8001
+#: ../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-server-5.6.templates:8001
+#: ../mysql-wsrep-server-5.6.templates:8001
 msgid ""
 "Please read the /usr/share/doc/mysql-server-5.6/README.Debian file for more "
 "information."
@@ -184,25 +184,25 @@ msgstr ""
 
 #. Type: error
 #. Description
-#: ../mysql-server-5.6.templates:9001
+#: ../mysql-wsrep-server-5.6.templates:9001
 msgid "Password input error"
 msgstr "Fel vid inmatning av lösenord"
 
 #. Type: error
 #. Description
-#: ../mysql-server-5.6.templates:9001
+#: ../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-server-5.6.templates:10001
+#: ../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-server-5.6.templates:10001
+#: ../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 "
index 01d0418259a41b5116acee8d867912f31c06bdbb..a3c155a1d1d0eb3ffaebb27675928fdb88a97839 100644 (file)
@@ -6,9 +6,9 @@
 #, fuzzy
 msgid ""
 msgstr ""
-"Project-Id-Version: PACKAGE VERSION\n"
-"Report-Msgid-Bugs-To: mysql-5.6@packages.debian.org\n"
-"POT-Creation-Date: 2011-11-08 11:42-0800\n"
+"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 <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -19,19 +19,19 @@ msgstr ""
 
 #. Type: boolean
 #. Description
-#: ../mysql-server-5.6.templates:2001
+#: ../mysql-server-wsrep-5.6.templates:2001
 msgid "Really proceed with downgrade?"
 msgstr ""
 
 #. Type: boolean
 #. Description
-#: ../mysql-server-5.6.templates:2001
+#: ../mysql-server-wsrep-5.6.templates:2001
 msgid "A file named /var/lib/mysql/debian-*.flag exists on this system."
 msgstr ""
 
 #. Type: boolean
 #. Description
-#: ../mysql-server-5.6.templates:2001
+#: ../mysql-server-wsrep-5.6.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.6.templates:2001
+#: ../mysql-server-wsrep-5.6.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.6.templates:3001
+#: ../mysql-server-wsrep-5.6.templates:3001
 msgid "Important note for NIS/YP users"
 msgstr ""
 
 #. Type: note
 #. Description
-#: ../mysql-server-5.6.templates:3001
+#: ../mysql-server-wsrep-5.6.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.6.templates:3001
+#: ../mysql-server-wsrep-5.6.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.6.templates:4001
+#: ../mysql-server-wsrep-5.6.templates:4001
 msgid "Remove all MySQL databases?"
 msgstr ""
 
 #. Type: boolean
 #. Description
-#: ../mysql-server-5.6.templates:4001
+#: ../mysql-server-wsrep-5.6.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.6.templates:4001
+#: ../mysql-server-wsrep-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 "
@@ -92,13 +92,13 @@ msgstr ""
 
 #. Type: boolean
 #. Description
-#: ../mysql-server-5.6.templates:5001
+#: ../mysql-server-wsrep-5.6.templates:5001
 msgid "Start the MySQL server on boot?"
 msgstr ""
 
 #. Type: boolean
 #. Description
-#: ../mysql-server-5.6.templates:5001
+#: ../mysql-server-wsrep-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."
@@ -106,13 +106,13 @@ msgstr ""
 
 #. Type: password
 #. Description
-#: ../mysql-server-5.6.templates:6001
+#: ../mysql-server-wsrep-5.6.templates:6001
 msgid "New password for the MySQL \"root\" user:"
 msgstr ""
 
 #. Type: password
 #. Description
-#: ../mysql-server-5.6.templates:6001
+#: ../mysql-server-wsrep-5.6.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.6.templates:6001
+#: ../mysql-server-wsrep-5.6.templates:6001
 msgid "If this field is left blank, the password will not be changed."
 msgstr ""
 
 #. Type: password
 #. Description
-#: ../mysql-server-5.6.templates:7001
+#: ../mysql-server-wsrep-5.6.templates:7001
 msgid "Repeat password for the MySQL \"root\" user:"
 msgstr ""
 
 #. Type: error
 #. Description
-#: ../mysql-server-5.6.templates:8001
+#: ../mysql-server-wsrep-5.6.templates:8001
 msgid "Unable to set password for the MySQL \"root\" user"
 msgstr ""
 
 #. Type: error
 #. Description
-#: ../mysql-server-5.6.templates:8001
+#: ../mysql-server-wsrep-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 "
@@ -147,13 +147,13 @@ msgstr ""
 
 #. Type: error
 #. Description
-#: ../mysql-server-5.6.templates:8001
+#: ../mysql-server-wsrep-5.6.templates:8001
 msgid "You should check the account's password after the package installation."
 msgstr ""
 
 #. Type: error
 #. Description
-#: ../mysql-server-5.6.templates:8001
+#: ../mysql-server-wsrep-5.6.templates:8001
 msgid ""
 "Please read the /usr/share/doc/mysql-server-5.6/README.Debian file for more "
 "information."
@@ -161,25 +161,25 @@ msgstr ""
 
 #. Type: error
 #. Description
-#: ../mysql-server-5.6.templates:9001
+#: ../mysql-server-wsrep-5.6.templates:9001
 msgid "Password input error"
 msgstr ""
 
 #. Type: error
 #. Description
-#: ../mysql-server-5.6.templates:9001
+#: ../mysql-server-wsrep-5.6.templates:9001
 msgid "The two passwords you entered were not the same. Please try again."
 msgstr ""
 
 #. Type: error
 #. Description
-#: ../mysql-server-5.6.templates:10001
+#: ../mysql-server-wsrep-5.6.templates:10001
 msgid "NDB Cluster seems to be in use"
 msgstr ""
 
 #. Type: error
 #. Description
-#: ../mysql-server-5.6.templates:10001
+#: ../mysql-server-wsrep-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 "
index 96bb7ea3c884b53c132584353ddfe4ef5b7f2285..f721a65c20d1a8d3cf30d3d043576a84189e5787 100644 (file)
@@ -5,8 +5,8 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: mysql-dfsg-4.1\n"
-"Report-Msgid-Bugs-To: mysql-5.6@packages.debian.org\n"
-"POT-Creation-Date: 2011-11-08 11:42-0800\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 <gurkan@iaslan.com>\n"
 "Language-Team: Turkish <debian-l10n-turkish@lists.debian.org>\n"
@@ -18,19 +18,19 @@ msgstr ""
 
 #. Type: boolean
 #. Description
-#: ../mysql-server-5.6.templates:2001
+#: ../mysql-wsrep-server-5.6.templates:2001
 msgid "Really proceed with downgrade?"
 msgstr ""
 
 #. Type: boolean
 #. Description
-#: ../mysql-server-5.6.templates:2001
+#: ../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-server-5.6.templates:2001
+#: ../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."
@@ -38,7 +38,7 @@ msgstr ""
 
 #. Type: boolean
 #. Description
-#: ../mysql-server-5.6.templates:2001
+#: ../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."
@@ -46,7 +46,7 @@ msgstr ""
 
 #. Type: note
 #. Description
-#: ../mysql-server-5.6.templates:3001
+#: ../mysql-wsrep-server-5.6.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.6.templates:3001
+#: ../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:"
@@ -62,7 +62,7 @@ msgstr ""
 
 #. Type: note
 #. Description
-#: ../mysql-server-5.6.templates:3001
+#: ../mysql-wsrep-server-5.6.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.6.templates:4001
+#: ../mysql-wsrep-server-5.6.templates:4001
 msgid "Remove all MySQL databases?"
 msgstr ""
 
 #. Type: boolean
 #. Description
-#: ../mysql-server-5.6.templates:4001
+#: ../mysql-wsrep-server-5.6.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.6.templates:4001
+#: ../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 "
@@ -93,7 +93,7 @@ msgstr ""
 
 #. Type: boolean
 #. Description
-#: ../mysql-server-5.6.templates:5001
+#: ../mysql-wsrep-server-5.6.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.6.templates:5001
+#: ../mysql-wsrep-server-5.6.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.6.templates:6001
+#: ../mysql-wsrep-server-5.6.templates:6001
 msgid "New password for the MySQL \"root\" user:"
 msgstr ""
 
 #. Type: password
 #. Description
-#: ../mysql-server-5.6.templates:6001
+#: ../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."
@@ -127,25 +127,25 @@ msgstr ""
 
 #. Type: password
 #. Description
-#: ../mysql-server-5.6.templates:6001
+#: ../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-server-5.6.templates:7001
+#: ../mysql-wsrep-server-5.6.templates:7001
 msgid "Repeat password for the MySQL \"root\" user:"
 msgstr ""
 
 #. Type: error
 #. Description
-#: ../mysql-server-5.6.templates:8001
+#: ../mysql-wsrep-server-5.6.templates:8001
 msgid "Unable to set password for the MySQL \"root\" user"
 msgstr ""
 
 #. Type: error
 #. Description
-#: ../mysql-server-5.6.templates:8001
+#: ../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 "
@@ -154,13 +154,13 @@ msgstr ""
 
 #. Type: error
 #. Description
-#: ../mysql-server-5.6.templates:8001
+#: ../mysql-wsrep-server-5.6.templates:8001
 msgid "You should check the account's password after the package installation."
 msgstr ""
 
 #. Type: error
 #. Description
-#: ../mysql-server-5.6.templates:8001
+#: ../mysql-wsrep-server-5.6.templates:8001
 msgid ""
 "Please read the /usr/share/doc/mysql-server-5.6/README.Debian file for more "
 "information."
@@ -168,25 +168,25 @@ msgstr ""
 
 #. Type: error
 #. Description
-#: ../mysql-server-5.6.templates:9001
+#: ../mysql-wsrep-server-5.6.templates:9001
 msgid "Password input error"
 msgstr ""
 
 #. Type: error
 #. Description
-#: ../mysql-server-5.6.templates:9001
+#: ../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-server-5.6.templates:10001
+#: ../mysql-wsrep-server-5.6.templates:10001
 msgid "NDB Cluster seems to be in use"
 msgstr ""
 
 #. Type: error
 #. Description
-#: ../mysql-server-5.6.templates:10001
+#: ../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 "
index 9b64bc2303ae9eaaf0f94fefd9525c0e08ec3630..44ee56cce0c49b9e6f70f7bacc44a442bf4a5e8e 100755 (executable)
@@ -28,11 +28,22 @@ EXPORTED_SOURCE_TARBALL := debian/mysql-source-5.6.tar.gz
 TESTSUITE_FAIL_CMD:=true
 TMP := $(CURDIR)/debian/tmp/
 USE_ASSEMBLER:=--enable-assembler
+NUMJOBS=$(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
 
+ifeq (,$(NUMJOBS))
+       NUMJOBS=1
+endif
+
+MAKEFLAGS += -j $(NUMJOBS)
 
 export MYSQL_BUILD_CC=$(DEB_HOST_GNU_TYPE)-gcc
 export MYSQL_BUILD_CXX=$(DEB_HOST_GNU_TYPE)-g++
 
+# The full upstream test suite takes a very long time to run, so we run
+# only the main test suite unless fulltest is specified.
+ifeq ($(findstring fulltest,$(DEB_BUILD_OPTIONS)),)
+    MTR_SUITE=--suite=main
+endif
 
 ifneq (,$(filter $(ARCH), i386 kfreebsd-i386 hurd-i386))
        TAOCRYPT_OPT="-DTAOCRYPT_DISABLE_X86ASM"
@@ -110,18 +121,27 @@ configure-stamp configure-pic-stamp:
 
 override_dh_auto_build: build-stamp
 
-build-stamp:
+# $(EXPORTED_SOURCE_TARBALL) must be built before the builds commence, since
+# the builds change some of the files picked up by this tar invocation, and
+# this can race against tar with an error like "tar:
+# ./builddir-pic/strings/CMakeFiles/strings.dir: file changed as we read it".
+# So define the rule for building it here, and have the build rules depend on
+# it.
+$(EXPORTED_SOURCE_TARBALL):
+       GZIP=-n tar -zcf $(EXPORTED_SOURCE_TARBALL) \
+           --exclude=debian . \
+           --transform="s,^\./,mysql-5.6/,"
+
+build-stamp: $(EXPORTED_SOURCE_TARBALL)
        @echo "RULES.$@"
-       [ -f $(EXPORTED_SOURCE_TARBALL) ] || tar -zcf $(EXPORTED_SOURCE_TARBALL) \
-       --exclude=debian . \
-       --transform="s,^\./,mysql-5.6/,"
        cd $(builddir) && $(MAKE)
        touch $@
 
-build-pic-stamp:
+build-pic-stamp: $(EXPORTED_SOURCE_TARBALL)
        # Don't call this section from dh_auto_build as
        # linmysqld does not exsist in mysql-wsrep
        @echo "RULES.$@"
+       cd $(builddir) && $(MAKE) -C sql
        cd $(builddir) && $(MAKE) -C scripts
        cd $(builddir) && $(MAKE) -C libmysqld
        touch $@
@@ -129,11 +149,18 @@ build-pic-stamp:
 override_dh_auto_test:
        @echo "RULES.$@"
 ifeq ($(findstring nocheck,$(DEB_BUILD_OPTIONS)),)
-       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/
-       cd $(builddir) && $(MAKE) $(MAKE_TEST_TARGET) || $(TESTSUITE_FAIL_CMD) ;
+ifeq ($(ARCH_OS),hurd)
+       # Tests not fully working under Hurd, see
+       # http://bugs.mysql.com/bug.php?id=64685. Run unit tests only.
+       cd $(builddir) && $(MAKE) test || $(TESTSUITE_FAIL_CMD) ;
+else
+       # Skip replication tests since they are timing sensitive and may
+       # result in false positives.
+       cd $(builddir)/mysql-test && ./mtr --parallel=$(NUMJOBS) --skip-rpl $(MTR_SUITE) || $(TESTSUITE_FAIL_CMD) ;
+endif
 endif
 
 override_dh_auto_install: auto_install-stamp
@@ -144,6 +171,14 @@ auto_install-stamp:
        dh_testroot
        # 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
        # install libmysqld built with -FPIC
        install -d -m 0755 -o root -g root $(TMP)/usr/lib/mysql
        # linmysqld does not exsist in mysql-wsrep
@@ -155,7 +190,7 @@ auto_install-stamp:
        nm -n $(BUILDDIR)/sql/mysqld |gzip -9 > $(TMP)/usr/share/doc/mysql-server-5.6/mysqld.sym.gz
        install -m 0644 support-files/wsrep.cnf $(TMP)/usr/share/mysql
        # This seems to be the only safe place to fix permissions issues
-        # not handled by dh_fixperms.
+       # not handled by dh_fixperms.
        mkdir -p $(TMP)/etc/mysql/conf.d/
        touch $(TMP)/etc/mysql/conf.d/.keepme
        install -D -m 0755 $(builddir)/support-files/mysql.server $(TMP)/etc/init.d/mysql
@@ -165,6 +200,7 @@ auto_install-stamp:
        install -m 0644 debian/additions/mysql_config_pic.1 $(TMP)/usr/share/man/man1
        install -m 0644 debian/additions/mysql_embedded.1 $(TMP)/usr/share/man/man1
        install -m 0644 debian/additions/debian_create_root_user.sql $(TMP)/usr/share/mysql/
+       install -m 0755 debian/additions/mysql-systemd-start $(TMP)/usr/share/mysql/
        # install AppArmor profile
        install -D -m 644 debian/apparmor-profile $(TMP)/etc/apparmor.d/usr.sbin.mysqld
        chmod 0755 $(TMP)/usr/share/mysql-test/std_data/checkDBI_DBD-mysql.pl
@@ -172,6 +208,10 @@ auto_install-stamp:
        install -D -m 644 debian/mysql-server-5.6.py $(TMP)/usr/share/apport/package-hooks/source_mysql-5.6.py
        # chmod 0644 $(TMP)/usr/share/mysql/*.ini
        chmod 0644 $(TMP)/usr/bin/mysqlaccess.conf
+       chmod 0644 $(TMP)/usr/share/mysql-test/suite/innodb_stress/include/innodb_stress.inc
+       chmod 0644 $(TMP)/usr/share/mysql-test/suite/innodb_stress/t/load_generator.py
+       chmod 0644 $(TMP)/usr/share/mysql-test/suite/innodb_stress/t/*.test
+       chmod 0644 $(TMP)/usr/share/mysql-test/suite/innodb_stress/t/*.opt
        touch $@
 
 # Use the --fail-missing to check for stuff that we should be installing
@@ -209,12 +249,22 @@ auto_install-stamp:
 
 override_dh_installlogrotate-arch:
        dh_installlogrotate --name mysql-server
+
+override_dh_install:
+       dh_install
        dh_apparmor -pmysql-server-5.6 --profile-name=usr.sbin.mysqld
 
+override_dh_installchangelogs:
+       dh_installchangelogs Docs/ChangeLog
+
+override_dh_systemd_enable:
+       dh_systemd_enable --name=mysql --no-enable
+
 # Start mysql in runlevel 19 before 20 where apache, proftpd etc gets
 # started which might depend on a running database server.
 override_dh_installinit-arch:
        dh_installinit --name=mysql -- defaults 19 21
+       #dh_systemd_start --restart-after-upgrade
 
 override_dh_installcron-arch:
        dh_installcron --name mysql-server
@@ -228,4 +278,4 @@ get-orig-source:
        uscan --force-download --verbose
 
 %:
-       dh $@ --parallel
+       dh $@ --parallel --with systemd
index ae62d194b0beabc02bb90a4223c9f7d929d7341d..617815c5d3b7fa55d9912bda0842f94092474f7b 100644 (file)
@@ -446,6 +446,13 @@ IF(WITH_UNIT_TESTS)
  ENABLE_TESTING()
 ENDIF()
 
+OPTION(WITH_SYMVER16
+  "Export libmysqlclient_16 and libmysqlclient_18 symbol versions" OFF)
+
+IF(WITH_SYMVER16)
+  ADD_DEFINITIONS(-DEXPORT_SYMVER16)
+ENDIF()
+
 IF(NOT WITHOUT_SERVER)
   SET (MYSQLD_STATIC_PLUGIN_LIBS "" CACHE INTERNAL "")
   # Add storage engines and plugins.
@@ -468,10 +475,6 @@ ADD_SUBDIRECTORY(wsrep)
 ENDIF()
 
 IF(WITH_UNIT_TESTS)
-  ADD_SUBDIRECTORY(unittest)
-  ADD_SUBDIRECTORY(unittest/examples)
-  ADD_SUBDIRECTORY(unittest/mytap)
-  ADD_SUBDIRECTORY(unittest/mytap/t)
   # Visual Studio 11 needs this extra flag in order to compile gmock.
   IF(WIN32)
     ADD_DEFINITIONS( /D _VARIADIC_MAX=10 )
@@ -480,7 +483,10 @@ IF(WITH_UNIT_TESTS)
   IF(HAVE_LLVM_LIBCPP)
     ADD_DEFINITIONS(-DGTEST_USE_OWN_TR1_TUPLE=1)
   ENDIF()
-  ADD_SUBDIRECTORY(unittest/gunit)
+  ADD_SUBDIRECTORY(unittest)
+  ADD_SUBDIRECTORY(unittest/examples)
+  ADD_SUBDIRECTORY(unittest/mytap)
+  ADD_SUBDIRECTORY(unittest/mytap/t)
 ENDIF()
 
 ADD_SUBDIRECTORY(extra)
diff --git a/mysql-wsrep-5.6/CONTRIBUTORS.txt b/mysql-wsrep-5.6/CONTRIBUTORS.txt
new file mode 100644 (file)
index 0000000..1b0f7ee
--- /dev/null
@@ -0,0 +1,25 @@
+All contributors are required to add their name and [Github username/email]
+to this file in connection with their first contribution. If you are making
+a contribution on behalf of a company, you should add the said company name.
+
+By adding your name and [Github username/email] to this file you agree that
+your contribution is a contribution under a contributior agreement between
+you and Codership Oy. To the extent that you are an employee of a company and
+contribute in that role, you confirm that your contribution is a contribution
+under the contribution license agreement between your employer and Codership
+Oy; and that you have the authorization to give such confirmation. You confirm
+that you have read, understood and signed the contributor license agreement
+applicable to you.
+
+For the individual contributor agreement see file CONTRIBUTOR_AGREEMENT.txt
+in the same directory as this file.
+
+Authors from Codership Oy:
+
+ * 
+ [Codership employees, add name and email/username above this line, but leave this line intact]
+
+Other contributors:
+
+ * 
+ [add name and email/username above this line, but leave this line intact]
diff --git a/mysql-wsrep-5.6/CONTRIBUTOR_AGREEMENT.txt b/mysql-wsrep-5.6/CONTRIBUTOR_AGREEMENT.txt
new file mode 100644 (file)
index 0000000..d8024dd
--- /dev/null
@@ -0,0 +1,197 @@
+Codership Individual Contributor License Agreement
+
+Thank you for your interest in contributing to Galera Cluster, a project
+managed by Codership Oy, a legal entity established under Finnish laws, with
+its principal address at Pohjolankatu 64 A, 00600 Helsinki Finland (“We”, “Us”
+or “Our”).
+
+This contributor agreement (“Agreement”) documents the rights granted by
+contributors to Us. To make this document effective, please either accept it
+in an electronic service such as clahub.com or sign and scan it and send it
+to Us by email. This is a legally binding document, so  please  read  it
+carefully before agreeing to it. This Agreement covers the Galera Cluster
+project: the Galera library, the Wsrep patch for MySQL and other eventual
+patches to MySQL or other technologies.
+
+(1) Definitions
+
+“You” means the individual who Submits a Contribution to Us.
+
+“Contribution” means any work of authorship that is Submitted by You to Us in
+which You own or assert ownership of the Copyright. If You do not own the
+Copyright  in  the  entire  work  of authorship, you need to have a separate
+permission from Us.
+
+“Copyright”  means  all  rights  protecting  works  of  authorship  owned  or
+controlled  by  You,  including  copyright,  moral  and  neighboring  rights,
+as appropriate, for the full term of their existence including any extensions
+by You.
+
+“Material” means the work of authorship which is made available by Us to third
+parties, i.e. the Galera library, the Wsrep patch for MySQL; other eventual
+patches to MySQL; other eventual patches to other database technologies; all
+these together with a database technology, such as MySQL, or its derivatives.
+After You Submit the Contribution, it may be included in the Material.
+
+“Submit” means any form of electronic, verbal, or written communication sent
+to Us or our representatives, including but not limited to electronic mailing
+lists, source code control systems, and issue tracking systems that are
+managed by, or on behalf of, Us for the purpose of discussing and improving
+the Material, provided that such communication is (i) conspicuously marked or
+otherwise designated in writing by You or Your employee as a “Contribution” or
+(ii) submitted in source code control system pursuant to Section 3 (e).
+
+“Submission Date” means the date on which You Submit a Contribution to Us.
+
+“Effective Date” means the date You execute this Agreement or the date You
+first Submit a Contribution to Us, whichever is earlier.
+
+“Media” means any portion of a Contribution which is not software.
+
+(2) Grant of Rights
+
+2.1 Copyright License
+
+(a) You retain ownership of the Copyright in Your Contribution and have the
+same rights to use or license the Contribution which You would have had
+without entering into the Agreement. In case we have in writing permitted
+submitting a sublicense to licensed rights, You will not transfer the original
+license, but grant us a sublicense in accordance with this Agreement.
+
+(b) To the maximum extent permitted by the relevant law, You grant to Us
+a perpetual, worldwide, non-exclusive, transferable, royalty-free, irrevocable
+license  under  the  Copyright  covering  the  Contribution, with  the right
+to sublicense such rights through multiple tiers of sublicensees, to reproduce,
+modify,  display,  perform  and  distribute  the  Contribution  as  part
+of the Material; provided that this license is conditioned upon compliance
+with Section 2.3.
+
+2.2 Patent License
+
+For patent claims including, without limitation, method, process, and
+apparatus claims which You own, control or have the right to grant, now or
+in the future, You grant to Us a perpetual, worldwide, non-exclusive,
+transferable, royalty-free, irrevocable patent license, with the right
+to sublicense these rights to multiple tiers of sublicensees, to make, have
+made,  use,  sell,  offer  for  sale,  import  and  otherwise  transfer
+the Contribution and the Contribution in combination with the Material
+(and portions of such combination). This license is granted only to the extent
+ that the exercise of the licensed rights infringes such patent claims;
+and provided that this license is conditioned upon compliance with Section 2.3.
+
+2.3 Outbound License
+
+As a condition on the grant of rights in Sections 2.1 and 2.2, to the extent
+we include Your Contribution or a part of it in a Material, we agree to
+license the Contribution only under the terms of the license or licenses which
+We are using on the Submission Date for the Material or any licenses which are
+approved by the Open Source Initiative (“OSI”) on or after the Effective Date,
+including both permissive and copyleft licenses, whether or not such licenses
+are subsequently disapproved (including any right to adopt any future version
+of a license if approved by the OSI). In addition to above defined licenses,
+We may use the following licenses for Media in the Contribution: Creative
+Commons BY 3.0 or Creative Commons BY-SA 3.0 (including the right to adopt any
+future version of a license).
+
+2.4 Moral Rights.
+
+If moral rights apply to the Contribution, to the maximum extent permitted by
+law, You waive and agree not to assert such moral rights against Us or our
+successors in interest, or any of our licensees, either direct or indirect.
+
+2.5 Enforcement.
+
+You,  as  a  copyright  holder  to  Your  Contribution, hereby authorize us
+to enforce the OSI approved license applied by Us to a Material, but only
+to the extent Your Contribution has been included in a Material and always
+subject to Our free discretion on whether such enforcement is necessary or not.
+
+2.6 Our Rights.
+
+You acknowledge that We are not obligated to use Your Contribution as part of
+the  Material  and  may  decide  to  include  any  Contribution  We  consider
+appropriate.
+
+2.7 Reservation of Rights.
+
+Any rights not expressly licensed under this section are expressly reserved
+by You.
+
+(3) Agreement
+
+You confirm that:
+
+(a) You have the legal authority to enter into this Agreement.
+
+(b) You own the Copyright and patent claims covering the Contribution which
+    are required to grant the rights under Section 2.
+
+(c) The grant of rights under Section 2 does not violate any grant of rights
+    which You have made to third parties, including Your employer. If You are
+    an employee, You have had Your employer approve this Agreement or sign the
+    Entity version of this document. If You are less than eighteen years old,
+    please have Your parents or guardian sign the Agreement.
+
+(d) You have not Submitted any Code You do not own without written permission
+    from US.
+
+(e) All  pull  or  merge  requests  issued  under  usernames confirmed by You
+    in writing are issued by You; and all such pull or merge requests contain
+    Your Contributions under this Agreement. You will notify Us in writing
+    in the event of You no longer control such usernames.
+
+(4) Disclaimer
+
+EXCEPT FOR THE EXPRESS WARRANTIES IN SECTION 3, THE CONTRIBUTION IS PROVIDED
+“AS IS”. MORE PARTICULARLY, ALL EXPRESS OR IMPLIED WARRANTIES INCLUDING,
+WITHOUT LIMITATION, ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE EXPRESSLY DISCLAIMED BY YOU TO US. TO THE EXTENT THAT ANY SUCH WARRANTIES CANNOT BE DISCLAIMED, SUCH WARRANTY IS LIMITED IN DURATION TO THE MINIMUM PERIOD PERMITTED BY LAW.
+
+(5) Consequential Damage Waiver
+
+TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, IN NO EVENT WILL YOU BE
+LIABLE FOR ANY LOSS OF PROFITS, LOSS OF ANTICIPATED SAVINGS, LOSS OF DATA,
+INDIRECT, SPECIAL, INCIDENTAL, CONSEQUENTIAL AND EXEMPLARY DAMAGES ARISING
+OUT OF THIS AGREEMENT REGARDLESS OF THE LEGAL OR EQUITABLE THEORY (CONTRACT,
+TORT OR OTHERWISE) UPON WHICH THE CLAIM IS BASED. THIS WAIVER DOES NOT APPLY
+TO GROSS NEGLIGENT OR MALICIOUS ACTS OR FRAUD.
+
+(6) Miscellaneous
+
+6.1 This Agreement will be governed by and construed in accordance with the
+laws of Finland excluding its conflicts of law provisions. Under certain
+circumstances, the governing law in this section might be superseded by the
+United Nations Convention on Contracts for the International Sale of Goods
+(“UN Convention”) and the parties intend to avoid the application of the
+UN Convention to this Agreement and, thus, exclude the application of the
+UN Convention in its entirety to this Agreement.
+
+6.2 Any and all Submissions done by You prior to execution of this Agreement
+shall be nonetheless covered by this Agreement.
+
+6.3 This Agreement sets out the entire agreement between You and Us for Your
+Contributions to Us and overrides all other agreements or understandings.
+
+6.4 If You or We assign the rights or obligations received through this
+Agreement to a third party, as a condition of the assignment, that third party
+must agree in writing to abide by all the rights and obligations in the
+Agreement.
+
+6.5 The failure of either party to require performance by the other party of
+any provision of this Agreement in one situation shall not affect the right
+of a party to require such performance at any time in the future. A waiver of
+performance under a provision in one situation shall not be considered a
+waiver of the performance of the provision in the future or a waiver of the
+provision in its entirety.
+
+6.6 If any provision of this Agreement is found void and unenforceable, such
+provision will be replaced to the extent possible with a provision that comes
+closest to the meaning of the original provision and which is enforceable.
+The  terms  and  conditions  set  forth  in  this  Agreement  shall  apply
+notwithstanding any failure of essential purpose of this Agreement or any
+limited remedy to the maximum extent possible under law.
+
+This document has been drafted based on Harmony Inividual Contributor License
+Agreement (HA-CLA-I) Version 1.0 July 4, 2011. HA- CLA-I is available from
+harmonyagreements.org and is licensed by under Creative Commons Attribution
+3.0 Unported License.
index 373e0b2d4b9486b4efc424d230ec990c1f735610..929bbfc2ed14f37b0f7aa0220bbc5d58b7fbb4fa 100644 (file)
@@ -1,4 +1,4 @@
 MYSQL_VERSION_MAJOR=5
 MYSQL_VERSION_MINOR=6
-MYSQL_VERSION_PATCH=30
+MYSQL_VERSION_PATCH=35
 MYSQL_VERSION_EXTRA=
index fbe60f4f5f7e523b5df03b37731b1690a49b4b74..cf63ae94b1cba3f97dc9f13c642a1b0060464e68 100644 (file)
@@ -139,7 +139,7 @@ MYSQL *mysql_connect_ssl_check(MYSQL *mysql_arg, const char *host,
                                const char *user, const char *passwd,
                                const char *db, uint port,
                                const char *unix_socket, ulong client_flag,
-                               my_bool ssl_required __attribute__((unused)))
+                               my_bool ssl_required MY_ATTRIBUTE((unused)))
 {
   MYSQL *mysql= mysql_real_connect(mysql_arg, host, user, passwd, db, port,
                                    unix_socket, client_flag);
index af0af9d1e4ed3c3b1146414bf5716a076bf0c8fa..7ab706fb86410d4f077ccad7cd8c7da51b6a8a9e 100644 (file)
@@ -1819,7 +1819,7 @@ static void usage(int version)
 
 
 my_bool
-get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
+get_one_option(int optid, const struct my_option *opt MY_ATTRIBUTE((unused)),
               char *argument)
 {
   switch(optid) {
@@ -2755,8 +2755,8 @@ static void initialize_readline (char *name)
 */
 
 static char **new_mysql_completion(const char *text,
-                                   int start __attribute__((unused)),
-                                   int end __attribute__((unused)))
+                                   int start MY_ATTRIBUTE((unused)),
+                                   int end MY_ATTRIBUTE((unused)))
 {
   if (!status.batch && !quick)
 #if defined(USE_NEW_READLINE_INTERFACE)
@@ -3166,8 +3166,8 @@ static void print_help_item(MYSQL_ROW *cur, int num_name, int num_cat, char *las
 }
 
 
-static int com_server_help(String *buffer __attribute__((unused)),
-                          char *line __attribute__((unused)), char *help_arg)
+static int com_server_help(String *buffer MY_ATTRIBUTE((unused)),
+                          char *line MY_ATTRIBUTE((unused)), char *help_arg)
 {
   MYSQL_ROW cur;
   const char *server_cmd;
@@ -3273,8 +3273,8 @@ err:
 }
 
 static int
-com_help(String *buffer __attribute__((unused)),
-        char *line __attribute__((unused)))
+com_help(String *buffer MY_ATTRIBUTE((unused)),
+        char *line MY_ATTRIBUTE((unused)))
 {
   reg1 int i, j;
   char * help_arg= strchr(line,' '), buff[32], *end;
@@ -3313,7 +3313,7 @@ com_help(String *buffer __attribute__((unused)),
 
        /* ARGSUSED */
 static int
-com_clear(String *buffer,char *line __attribute__((unused)))
+com_clear(String *buffer,char *line MY_ATTRIBUTE((unused)))
 {
 #ifdef HAVE_READLINE
   if (status.add_to_history)
@@ -3325,7 +3325,7 @@ com_clear(String *buffer,char *line __attribute__((unused)))
 
        /* ARGSUSED */
 static int
-com_charset(String *buffer __attribute__((unused)), char *line)
+com_charset(String *buffer MY_ATTRIBUTE((unused)), char *line)
 {
   char buff[256], *param;
   const CHARSET_INFO *new_cs;
@@ -3357,7 +3357,7 @@ com_charset(String *buffer __attribute__((unused)), char *line)
 
 
 static int
-com_go(String *buffer,char *line __attribute__((unused)))
+com_go(String *buffer,char *line MY_ATTRIBUTE((unused)))
 {
   char         buff[200]; /* about 110 chars used so far */
   char         time_buff[52+3+1]; /* time max + space&parens + NUL */
@@ -4118,8 +4118,8 @@ print_tab_data(MYSQL_RES *result)
 }
 
 static int
-com_tee(String *buffer __attribute__((unused)),
-        char *line __attribute__((unused)))
+com_tee(String *buffer MY_ATTRIBUTE((unused)),
+        char *line MY_ATTRIBUTE((unused)))
 {
   char file_name[FN_REFLEN], *end, *param;
 
@@ -4161,8 +4161,8 @@ com_tee(String *buffer __attribute__((unused)),
 
 
 static int
-com_notee(String *buffer __attribute__((unused)),
-         char *line __attribute__((unused)))
+com_notee(String *buffer MY_ATTRIBUTE((unused)),
+         char *line MY_ATTRIBUTE((unused)))
 {
   if (opt_outfile)
     end_tee();
@@ -4176,8 +4176,8 @@ com_notee(String *buffer __attribute__((unused)),
 
 #ifdef USE_POPEN
 static int
-com_pager(String *buffer __attribute__((unused)),
-          char *line __attribute__((unused)))
+com_pager(String *buffer MY_ATTRIBUTE((unused)),
+          char *line MY_ATTRIBUTE((unused)))
 {
   char pager_name[FN_REFLEN], *end, *param;
 
@@ -4220,8 +4220,8 @@ com_pager(String *buffer __attribute__((unused)),
 
 
 static int
-com_nopager(String *buffer __attribute__((unused)),
-           char *line __attribute__((unused)))
+com_nopager(String *buffer MY_ATTRIBUTE((unused)),
+           char *line MY_ATTRIBUTE((unused)))
 {
   strmov(pager, "stdout");
   opt_nopager=1;
@@ -4238,7 +4238,7 @@ com_nopager(String *buffer __attribute__((unused)),
 
 #ifdef USE_POPEN
 static int
-com_edit(String *buffer,char *line __attribute__((unused)))
+com_edit(String *buffer,char *line MY_ATTRIBUTE((unused)))
 {
   char filename[FN_REFLEN],buff[160];
   int  fd,tmp;
@@ -4282,16 +4282,16 @@ err:
 /* If arg is given, exit without errors. This happens on command 'quit' */
 
 static int
-com_quit(String *buffer __attribute__((unused)),
-        char *line __attribute__((unused)))
+com_quit(String *buffer MY_ATTRIBUTE((unused)),
+        char *line MY_ATTRIBUTE((unused)))
 {
   status.exit_status=0;
   return 1;
 }
 
 static int
-com_rehash(String *buffer __attribute__((unused)),
-        char *line __attribute__((unused)))
+com_rehash(String *buffer MY_ATTRIBUTE((unused)),
+        char *line MY_ATTRIBUTE((unused)))
 {
 #ifdef HAVE_READLINE
   build_completion_hash(1, 0);
@@ -4302,8 +4302,8 @@ com_rehash(String *buffer __attribute__((unused)),
 
 #ifdef USE_POPEN
 static int
-com_shell(String *buffer __attribute__((unused)),
-          char *line __attribute__((unused)))
+com_shell(String *buffer MY_ATTRIBUTE((unused)),
+          char *line MY_ATTRIBUTE((unused)))
 {
   char *shell_cmd;
 
@@ -4330,7 +4330,7 @@ com_shell(String *buffer __attribute__((unused)),
 
 
 static int
-com_print(String *buffer,char *line __attribute__((unused)))
+com_print(String *buffer,char *line MY_ATTRIBUTE((unused)))
 {
   tee_puts("--------------", stdout);
   (void) tee_fputs(buffer->c_ptr(), stdout);
@@ -4395,7 +4395,7 @@ com_connect(String *buffer, char *line)
 }
 
 
-static int com_source(String *buffer __attribute__((unused)),
+static int com_source(String *buffer MY_ATTRIBUTE((unused)),
                       char *line)
 {
   char source_name[FN_REFLEN], *end, *param;
@@ -4450,7 +4450,7 @@ static int com_source(String *buffer __attribute__((unused)),
 
        /* ARGSUSED */
 static int
-com_delimiter(String *buffer __attribute__((unused)), char *line)
+com_delimiter(String *buffer MY_ATTRIBUTE((unused)), char *line)
 {
   char buff[256], *tmp;
 
@@ -4479,7 +4479,7 @@ com_delimiter(String *buffer __attribute__((unused)), char *line)
 
        /* ARGSUSED */
 static int
-com_use(String *buffer __attribute__((unused)), char *line)
+com_use(String *buffer MY_ATTRIBUTE((unused)), char *line)
 {
   char *tmp, buff[FN_REFLEN + 1];
   int select_db;
@@ -4624,8 +4624,8 @@ normalize_dbname(const char *line, char *buff, uint buff_size)
 }
 
 static int
-com_warnings(String *buffer __attribute__((unused)),
-   char *line __attribute__((unused)))
+com_warnings(String *buffer MY_ATTRIBUTE((unused)),
+   char *line MY_ATTRIBUTE((unused)))
 {
   show_warnings = 1;
   put_info("Show warnings enabled.",INFO_INFO);
@@ -4633,8 +4633,8 @@ com_warnings(String *buffer __attribute__((unused)),
 }
 
 static int
-com_nowarnings(String *buffer __attribute__((unused)),
-   char *line __attribute__((unused)))
+com_nowarnings(String *buffer MY_ATTRIBUTE((unused)),
+   char *line MY_ATTRIBUTE((unused)))
 {
   show_warnings = 0;
   put_info("Show warnings disabled.",INFO_INFO);
@@ -4914,8 +4914,8 @@ sql_connect(char *host,char *database,char *user,char *password,uint silent)
 
 
 static int
-com_status(String *buffer __attribute__((unused)),
-          char *line __attribute__((unused)))
+com_status(String *buffer MY_ATTRIBUTE((unused)),
+          char *line MY_ATTRIBUTE((unused)))
 {
   const char *status_str;
   char buff[40];
@@ -5555,7 +5555,7 @@ static void init_username()
   }
 }
 
-static int com_prompt(String *buffer __attribute__((unused)),
+static int com_prompt(String *buffer MY_ATTRIBUTE((unused)),
                       char *line)
 {
   char *ptr=strchr(line, ' ');
index 51a4d09c93258f2b0c37a2c5e9dc3b246310dd94..6b7bef61f7d9fd06b6a7595d0aaa8a86baafbd40 100644 (file)
@@ -1,5 +1,5 @@
 /*
-   Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
+   Copyright (c) 2012, 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
@@ -209,7 +209,7 @@ static struct my_option my_help_command_options[]=
 
 my_bool
 my_program_get_one_option(int optid,
-                          const struct my_option *opt __attribute__((unused)),
+                          const struct my_option *opt MY_ATTRIBUTE((unused)),
                           char *argument)
 {
   switch(optid) {
@@ -230,7 +230,7 @@ my_program_get_one_option(int optid,
 
 my_bool
 my_set_command_get_one_option(int optid,
-                              const struct my_option *opt __attribute__((unused)),
+                              const struct my_option *opt MY_ATTRIBUTE((unused)),
                               char *argument)
 {
   switch(optid) {
@@ -257,7 +257,7 @@ my_set_command_get_one_option(int optid,
 
 my_bool
 my_remove_command_get_one_option(int optid,
-                                 const struct my_option *opt __attribute__((unused)),
+                                 const struct my_option *opt MY_ATTRIBUTE((unused)),
                                  char *argument)
 {
   switch(optid) {
@@ -281,7 +281,7 @@ my_remove_command_get_one_option(int optid,
 
 my_bool
 my_print_command_get_one_option(int optid,
-                                const struct my_option *opt __attribute__((unused)),
+                                const struct my_option *opt MY_ATTRIBUTE((unused)),
                                 char *argument)
 {
   switch(optid) {
@@ -305,7 +305,7 @@ my_print_command_get_one_option(int optid,
 
 my_bool
 my_reset_command_get_one_option(int optid,
-                                const struct my_option *opt __attribute__((unused)),
+                                const struct my_option *opt MY_ATTRIBUTE((unused)),
                                 char *argument)
 {
   switch(optid) {
index ab7ee09825be144aec833a9c5c2a19f73924aaab..6ff6d9745d89ce21bf5bb8dc34f091d541a13e9b 100644 (file)
@@ -1,5 +1,5 @@
 /*
-   Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
+   Copyright (c) 2011, 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
@@ -406,7 +406,7 @@ exit:
 static void usage(void)
 {
   PRINT_VERSION;
-  puts("Copyright (c) 2011, 2015, Oracle and/or its affiliates. "
+  puts("Copyright (c) 2011, 2016, Oracle and/or its affiliates. "
        "All rights reserved.\n");
   puts("Enable or disable plugins.");
   printf("\nUsage: %s [options] <plugin> ENABLE|DISABLE\n\nOptions:\n",
@@ -471,7 +471,7 @@ static void print_default_values(void)
 
 static my_bool
 get_one_option(int optid,
-               const struct my_option *opt __attribute__((unused)),
+               const struct my_option *opt MY_ATTRIBUTE((unused)),
                char *argument)
 {
   switch(optid) {
index ab959c71da25ba9a7f0220a6c4a9ba5889483c4c..99e9b77471022b3c92a664f590bc4214f83f784a 100644 (file)
@@ -237,7 +237,7 @@ static struct my_option my_long_options[] =
 static const char *load_default_groups[]= { "mysqladmin","client",0 };
 
 my_bool
-get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
+get_one_option(int optid, const struct my_option *opt MY_ATTRIBUTE((unused)),
               char *argument)
 {
   int error = 0;
@@ -528,7 +528,7 @@ int main(int argc,char *argv[])
 }
 
 
-sig_handler endprog(int signal_number __attribute__((unused)))
+sig_handler endprog(int signal_number MY_ATTRIBUTE((unused)))
 {
   interrupted=1;
 }
@@ -1106,7 +1106,7 @@ retry:
 
           int offset= sprintf(buffer, "ALTER USER USER() IDENTIFIED BY '");
           int length= (int)mysql_real_escape_string(mysql, buffer + offset,
-                                                    typed_password,
+                                                    typed_password, (ulong)
                                                     strlen(typed_password));
           if (length == -1)
           {
@@ -1416,7 +1416,7 @@ static void print_top(MYSQL_RES *result)
 
 /* 3.rd argument, uint row, is not in use. Don't remove! */
 static void print_row(MYSQL_RES *result, MYSQL_ROW cur,
-                     uint row __attribute__((unused)))
+                     uint row MY_ATTRIBUTE((unused)))
 {
   uint i,length;
   MYSQL_FIELD *field;
@@ -1451,9 +1451,9 @@ static void print_relative_row(MYSQL_RES *result, MYSQL_ROW cur, uint row)
 }
 
 
-static void print_relative_row_vert(MYSQL_RES *result __attribute__((unused)),
+static void print_relative_row_vert(MYSQL_RES *result MY_ATTRIBUTE((unused)),
                                    MYSQL_ROW cur,
-                                   uint row __attribute__((unused)))
+                                   uint row MY_ATTRIBUTE((unused)))
 {
   uint length;
   ulonglong tmp;
@@ -1564,8 +1564,10 @@ static my_bool get_pidfile(MYSQL *mysql, char *pidfile)
 
   if (mysql_query(mysql, "SHOW VARIABLES LIKE 'pid_file'"))
   {
-    my_printf_error(0, "query failed; error: '%s'", error_flags,
-                   mysql_error(mysql));
+    my_printf_error(mysql_errno(mysql),
+                    "The query to get the server's pid file failed,"
+                    " error: '%s'. Continuing.", error_flags,
+                    mysql_error(mysql));
   }
   result = mysql_store_result(mysql);
   if (result)
index e305de00dc3ac81279f33d17916669b0e752cc02..9cbd4cf52b0ae3c6c0fbfea71ef6f32ba11a775b 100644 (file)
@@ -1,5 +1,5 @@
 /*
-   Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
+   Copyright (c) 2000, 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
@@ -1819,7 +1819,7 @@ static my_time_t convert_str_to_timestamp(const char* str)
 
 
 extern "C" my_bool
-get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
+get_one_option(int optid, const struct my_option *opt MY_ATTRIBUTE((unused)),
               char *argument)
 {
   bool tty_password=0;
@@ -1917,6 +1917,12 @@ static int parse_args(int *argc, char*** argv)
 */
 static Exit_status safe_connect()
 {
+  /*
+    A possible old connection's resources are reclaimed now
+    at new connect attempt. The final safe_connect resources
+    are mysql_closed at the end of program, explicitly.
+  */
+  mysql_close(mysql);
   mysql= mysql_init(NULL);
 
   if (!mysql)
index 6c3f4064f526555b4b109f966630959c978f7627..258ea475f83a3e4cbf114d8653b7142fc9cb195b 100644 (file)
@@ -225,13 +225,13 @@ static int process_selected_tables(char *db, char **table_names, int tables);
 static int process_all_tables_in_db(char *database);
 static int process_one_db(char *database);
 static int use_db(char *database);
-static int handle_request_for_tables(char *tables, uint length);
+static int handle_request_for_tables(char *tables, size_t length);
 static int dbConnect(char *host, char *user,char *passwd);
 static void dbDisconnect(char *host);
 static void DBerror(MYSQL *mysql, const char *when);
 static void safe_exit(int error);
 static void print_result();
-static uint fixed_name_length(const char *name);
+static size_t fixed_name_length(const char *name);
 static char *fix_table_name(char *dest, char *src);
 int what_to_do = 0;
 
@@ -270,7 +270,7 @@ static void usage(void)
 
 
 static my_bool
-get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
+get_one_option(int optid, const struct my_option *opt MY_ATTRIBUTE((unused)),
               char *argument)
 {
   int orig_what_to_do= what_to_do;
@@ -501,7 +501,7 @@ static int process_selected_tables(char *db, char **table_names, int tables)
       *end++= ',';
     }
     *--end = 0;
-    handle_request_for_tables(table_names_comma_sep + 1, (uint) (tot_length - 1));
+    handle_request_for_tables(table_names_comma_sep + 1, tot_length - 1);
     my_free(table_names_comma_sep);
   }
   else
@@ -511,10 +511,10 @@ static int process_selected_tables(char *db, char **table_names, int tables)
 } /* process_selected_tables */
 
 
-static uint fixed_name_length(const char *name)
+static size_t fixed_name_length(const char *name)
 {
   const char *p;
-  uint extra_length= 2;  /* count the first/last backticks */
+  size_t extra_length= 2;  /* count the first/last backticks */
   
   for (p= name; *p; p++)
   {
@@ -523,7 +523,7 @@ static uint fixed_name_length(const char *name)
     else if (*p == '.')
       extra_length+= 2;
   }
-  return (uint) ((p - name) + extra_length);
+  return (size_t) ((p - name) + extra_length);
 }
 
 
@@ -579,7 +579,7 @@ static int process_all_tables_in_db(char *database)
      */
 
     char *tables, *end;
-    uint tot_length = 0;
+    size_t tot_length = 0;
 
     while ((row = mysql_fetch_row(res)))
       tot_length+= fixed_name_length(row[0]) + 2;
@@ -637,7 +637,9 @@ static int fix_table_storage_name(const char *name)
   int rc= 0;
   if (strncmp(name, "#mysql50#", 9))
     return 1;
-  sprintf(qbuf, "RENAME TABLE `%s` TO `%s`", name, name + 9);
+  my_snprintf(qbuf, sizeof(qbuf), "RENAME TABLE `%s` TO `%s`",
+              name, name + 9);
+
   rc= run_query(qbuf);
   if (verbose)
     printf("%-50s %s\n", name, rc ? "FAILED" : "OK");
@@ -650,7 +652,8 @@ static int fix_database_storage_name(const char *name)
   int rc= 0;
   if (strncmp(name, "#mysql50#", 9))
     return 1;
-  sprintf(qbuf, "ALTER DATABASE `%s` UPGRADE DATA DIRECTORY NAME", name);
+  my_snprintf(qbuf, sizeof(qbuf), "ALTER DATABASE `%s` UPGRADE DATA DIRECTORY "
+              "NAME", name);
   rc= run_query(qbuf);
   if (verbose)
     printf("%-50s %s\n", name, rc ? "FAILED" : "OK");
@@ -668,7 +671,7 @@ static int rebuild_table(char *name)
   ptr= strmov(query, "ALTER TABLE ");
   ptr= fix_table_name(ptr, name);
   ptr= strxmov(ptr, " FORCE", NullS);
-  if (mysql_real_query(sock, query, (uint)(ptr - query)))
+  if (mysql_real_query(sock, query, (ulong)(ptr - query)))
   {
     fprintf(stderr, "Failed to %s\n", query);
     fprintf(stderr, "Error: %s\n", mysql_error(sock));
@@ -721,10 +724,10 @@ static int disable_binlog()
   return run_query(stmt);
 }
 
-static int handle_request_for_tables(char *tables, uint length)
+static int handle_request_for_tables(char *tables, size_t length)
 {
   char *query, *end, options[100], message[100];
-  uint query_length= 0;
+  size_t query_length= 0, query_size= sizeof(char)*(length+110);
   const char *op = 0;
 
   options[0] = 0;
@@ -755,10 +758,14 @@ static int handle_request_for_tables(char *tables, uint length)
     return fix_table_storage_name(tables);
   }
 
-  if (!(query =(char *) my_malloc((sizeof(char)*(length+110)), MYF(MY_WME))))
+  if (!(query =(char *) my_malloc(query_size, MYF(MY_WME))))
+  {
     return 1;
+  }
   if (opt_all_in_1)
   {
+    DBUG_ASSERT(strlen(op)+strlen(tables)+strlen(options)+8+1 <= query_size);
+
     /* No backticks here as we added them before */
     query_length= sprintf(query, "%s TABLE %s %s", op, tables, options);
   }
@@ -769,7 +776,7 @@ static int handle_request_for_tables(char *tables, uint length)
     ptr= strmov(strmov(query, op), " TABLE ");
     ptr= fix_table_name(ptr, tables);
     ptr= strxmov(ptr, " ", options, NullS);
-    query_length= (uint) (ptr - query);
+    query_length= (size_t) (ptr - query);
   }
   if (mysql_real_query(sock, query, query_length))
   {
@@ -853,7 +860,10 @@ static void print_result()
               prev_alter[0]= 0;
             }
             else
-              strcpy(prev_alter, alter_txt);
+            {
+              strncpy(prev_alter, alter_txt, MAX_ALTER_STR_SIZE-1);
+              prev_alter[MAX_ALTER_STR_SIZE-1]= 0;
+            }
           }
         }
       }
@@ -1008,7 +1018,7 @@ int main(int argc, char **argv)
     process_databases(argv);
   if (opt_auto_repair)
   {
-    uint i;
+    size_t i;
 
     if (!opt_silent && (tables4repair.elements || tables4rebuild.elements))
       puts("\nRepairing tables");
index f7d7241249a0c8bb4f7f9847114f607468a324f5..17637e4e57d1a7f4f045a514c606697bf59c2be6 100644 (file)
@@ -87,7 +87,7 @@
 
 static void add_load_option(DYNAMIC_STRING *str, const char *option,
                              const char *option_value);
-static ulong find_set(TYPELIB *lib, const char *x, uint length,
+static ulong find_set(TYPELIB *lib, const char *x, size_t length,
                       char **err_pos, uint *err_len);
 static char *alloc_query_str(ulong size);
 
@@ -762,7 +762,7 @@ static void write_footer(FILE *sql_file)
 
 
 uchar* get_table_key(const char *entry, size_t *length,
-                     my_bool not_used __attribute__((unused)))
+                     my_bool not_used MY_ATTRIBUTE((unused)))
 {
   *length= strlen(entry);
   return (uchar*) entry;
@@ -770,7 +770,7 @@ uchar* get_table_key(const char *entry, size_t *length,
 
 
 static my_bool
-get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
+get_one_option(int optid, const struct my_option *opt MY_ATTRIBUTE((unused)),
                char *argument)
 {
   switch (optid) {
@@ -885,7 +885,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
       opt_set_charset= 0;
       opt_compatible_mode_str= argument;
       opt_compatible_mode= find_set(&compatible_mode_typelib,
-                                    argument, (uint) strlen(argument),
+                                    argument, strlen(argument),
                                     &err_ptr, &err_len);
       if (err_len)
       {
@@ -895,7 +895,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
       }
 #if !defined(DBUG_OFF)
       {
-        uint size_for_sql_mode= 0;
+        size_t size_for_sql_mode= 0;
         const char **ptr;
         for (ptr= compatible_mode_names; *ptr; ptr++)
           size_for_sql_mode+= strlen(*ptr);
@@ -1182,8 +1182,8 @@ static int fetch_db_collation(const char *db_name,
       break;
     }
 
-    strncpy(db_cl_name, db_cl_row[0], db_cl_size);
-    db_cl_name[db_cl_size - 1]= 0; /* just in case. */
+    strncpy(db_cl_name, db_cl_row[0], db_cl_size-1);
+    db_cl_name[db_cl_size - 1]= 0;
 
   } while (FALSE);
 
@@ -1194,7 +1194,7 @@ static int fetch_db_collation(const char *db_name,
 
 
 static char *my_case_str(const char *str,
-                         uint str_len,
+                         size_t str_len,
                          const char *token,
                          uint token_len)
 {
@@ -1410,7 +1410,7 @@ static int switch_character_set_results(MYSQL *mysql, const char *cs_name)
 */
 
 static char *cover_definer_clause(const char *stmt_str,
-                                  uint stmt_length,
+                                  size_t stmt_length,
                                   const char *definer_version_str,
                                   uint definer_version_length,
                                   const char *stmt_version_str,
@@ -1603,14 +1603,14 @@ static void dbDisconnect(char *host)
 } /* dbDisconnect */
 
 
-static void unescape(FILE *file,char *pos,uint length)
+static void unescape(FILE *file,char *pos, size_t length)
 {
   char *tmp;
   DBUG_ENTER("unescape");
   if (!(tmp=(char*) my_malloc(length*2+1, MYF(MY_WME))))
     die(EX_MYSQLERR, "Couldn't allocate memory");
 
-  mysql_real_escape_string(&mysql_connection, tmp, pos, length);
+  mysql_real_escape_string(&mysql_connection, tmp, pos, (ulong)length);
   fputc('\'', file);
   fputs(tmp, file);
   fputc('\'', file);
@@ -1724,7 +1724,7 @@ static char *quote_for_like(const char *name, char *buff)
     Quote '<' '>' '&' '\"' chars and print a string to the xml_file.
 */
 
-static void print_quoted_xml(FILE *xml_file, const char *str, ulong len,
+static void print_quoted_xml(FILE *xml_file, const char *str, size_t len,
                              my_bool is_attribute_name)
 {
   const char *end;
@@ -1921,7 +1921,7 @@ static void print_xml_row(FILE *xml_file, const char *row_name,
                           const char *str_create)
 {
   uint i;
-  my_bool body_found __attribute__((unused)) = 0;
+  my_bool body_found MY_ATTRIBUTE((unused)) = 0;
   char *create_stmt_ptr= NULL;
   ulong create_stmt_len= 0;
   MYSQL_FIELD *field;
@@ -1983,7 +1983,7 @@ static void print_xml_row(FILE *xml_file, const char *row_name,
     squeezed to a single hyphen.
 */
 
-static void print_xml_comment(FILE *xml_file, ulong len,
+static void print_xml_comment(FILE *xml_file, size_t len,
                               const char *comment_string)
 {
   const char* end;
@@ -2100,7 +2100,7 @@ static uint dump_events_for_db(char *db)
   DBUG_ENTER("dump_events_for_db");
   DBUG_PRINT("enter", ("db: '%s'", db));
 
-  mysql_real_escape_string(mysql, db_name_buff, db, strlen(db));
+  mysql_real_escape_string(mysql, db_name_buff, db, (ulong)strlen(db));
 
   /* nice comments */
   print_comment(sql_file, 0,
@@ -2219,6 +2219,11 @@ static uint dump_events_for_db(char *db)
                   (const char *) (query_str != NULL ? query_str : row[3]),
                   (const char *) delimiter);
 
+          if(query_str)
+          {
+            my_free(query_str);
+            query_str= NULL;
+          }
           restore_time_zone(sql_file, delimiter);
           restore_sql_mode(sql_file, delimiter);
 
@@ -2312,7 +2317,7 @@ static uint dump_routines_for_db(char *db)
   DBUG_ENTER("dump_routines_for_db");
   DBUG_PRINT("enter", ("db: '%s'", db));
 
-  mysql_real_escape_string(mysql, db_name_buff, db, strlen(db));
+  mysql_real_escape_string(mysql, db_name_buff, db, (ulong)strlen(db));
 
   /* nice comments */
   print_comment(sql_file, 0,
@@ -2366,9 +2371,9 @@ static uint dump_routines_for_db(char *db)
             if the user has EXECUTE privilege he see routine names, but NOT the
             routine body of other routines that are not the creator of!
           */
-          DBUG_PRINT("info",("length of body for %s row[2] '%s' is %d",
+          DBUG_PRINT("info",("length of body for %s row[2] '%s' is %zu",
                              routine_name, row[2] ? row[2] : "(null)",
-                             row[2] ? (int) strlen(row[2]) : 0));
+                             row[2] ? strlen(row[2]) : 0));
           if (row[2] == NULL)
           {
             print_comment(sql_file, 1, "\n-- insufficient privileges to %s\n",
@@ -3915,7 +3920,7 @@ static int dump_tablespaces_for_tables(char *db, char **table_names, int tables)
   int i;
   char name_buff[NAME_LEN*2+3];
 
-  mysql_real_escape_string(mysql, name_buff, db, strlen(db));
+  mysql_real_escape_string(mysql, name_buff, db, (ulong)strlen(db));
 
   init_dynamic_string_checked(&where, " AND TABLESPACE_NAME IN ("
                       "SELECT DISTINCT TABLESPACE_NAME FROM"
@@ -3928,7 +3933,7 @@ static int dump_tablespaces_for_tables(char *db, char **table_names, int tables)
   for (i=0 ; i<tables ; i++)
   {
     mysql_real_escape_string(mysql, name_buff,
-                             table_names[i], strlen(table_names[i]));
+                             table_names[i], (ulong)strlen(table_names[i]));
 
     dynstr_append_checked(&where, "'");
     dynstr_append_checked(&where, name_buff);
@@ -3959,7 +3964,7 @@ static int dump_tablespaces_for_databases(char** databases)
   {
     char db_name_buff[NAME_LEN*2+3];
     mysql_real_escape_string(mysql, db_name_buff,
-                             databases[i], strlen(databases[i]));
+                             databases[i], (ulong)strlen(databases[i]));
     dynstr_append_checked(&where, "'");
     dynstr_append_checked(&where, db_name_buff);
     dynstr_append_checked(&where, "',");
@@ -4281,7 +4286,7 @@ RETURN VALUES
   0        Success.
   1        Failure.
 */
-int init_dumping_views(char *qdatabase __attribute__((unused)))
+int init_dumping_views(char *qdatabase MY_ATTRIBUTE((unused)))
 {
     return 0;
 } /* init_dumping_views */
@@ -5086,7 +5091,7 @@ static int start_transaction(MYSQL *mysql_con)
 }
 
 
-static ulong find_set(TYPELIB *lib, const char *x, uint length,
+static ulong find_set(TYPELIB *lib, const char *x, size_t length,
                       char **err_pos, uint *err_len)
 {
   const char *end= x + length;
@@ -5144,7 +5149,7 @@ static void print_value(FILE *file, MYSQL_RES  *result, MYSQL_ROW row,
         fputc(' ',file);
         fputs(prefix, file);
         if (string_value)
-          unescape(file,row[0],(uint) strlen(row[0]));
+          unescape(file,row[0], strlen(row[0]));
         else
           fputs(row[0], file);
         check_io(file);
@@ -5554,8 +5559,8 @@ static my_bool get_view_structure(char *table, char* db)
   verbose_msg("-- Retrieving view structure for table %s...\n", table);
 
 #ifdef NOT_REALLY_USED_YET
-  sprintf(insert_pat,"SET SQL_QUOTE_SHOW_CREATE=%d",
-          (opt_quoted || opt_keywords));
+  dynstr_append_checked(&insert_pat, "SET SQL_QUOTE_SHOW_CREATE=");
+  dynstr_append_checked(&insert_pat, (opt_quoted || opt_keywords)? "1":"0");
 #endif
 
   result_table=     quote_name(table, table_buff, 1);
@@ -5825,7 +5830,10 @@ int main(int argc, char **argv)
     if (flush_logs || opt_delete_master_logs)
     {
       if (mysql_refresh(mysql, REFRESH_LOG))
+      {
+        DB_error(mysql, "when doing refresh");
         goto err;
+      }
       verbose_msg("-- main : logs flushed successfully!\n");
     }
 
index 487fcfc662a457ebc3ee82c5941736ed99a44664..cec3b08d7fc1f6b34eb85de803fc874d8cce50a6 100644 (file)
@@ -31,6 +31,7 @@
 
 /* Global Thread counter */
 uint counter;
+pthread_mutex_t init_mutex;
 pthread_mutex_t counter_mutex;
 pthread_cond_t count_threshhold;
 
@@ -222,7 +223,7 @@ file. The SQL command 'LOAD DATA INFILE' is used to import the rows.\n");
 
 
 static my_bool
-get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
+get_one_option(int optid, const struct my_option *opt MY_ATTRIBUTE((unused)),
               char *argument)
 {
   switch(optid) {
@@ -425,8 +426,19 @@ static MYSQL *db_connect(char *host, char *database,
   MYSQL *mysql;
   if (verbose)
     fprintf(stdout, "Connecting to %s\n", host ? host : "localhost");
-  if (!(mysql= mysql_init(NULL)))
-    return 0;
+  if (opt_use_threads && !lock_tables)
+  {
+    pthread_mutex_lock(&init_mutex);
+    if (!(mysql= mysql_init(NULL)))
+    {
+      pthread_mutex_unlock(&init_mutex);
+      return 0;
+    }
+    pthread_mutex_unlock(&init_mutex);
+  }
+  else
+    if (!(mysql= mysql_init(NULL)))
+      return 0;
   if (opt_compress)
     mysql_options(mysql,MYSQL_OPT_COMPRESS,NullS);
   if (opt_local_file)
@@ -611,7 +623,7 @@ error:
   pthread_cond_signal(&count_threshhold);
   pthread_mutex_unlock(&counter_mutex);
   mysql_thread_end();
-
+  pthread_exit(0);
   return 0;
 }
 
@@ -637,15 +649,31 @@ int main(int argc, char **argv)
 
   if (opt_use_threads && !lock_tables)
   {
-    pthread_t mainthread;            /* Thread descriptor */
-    pthread_attr_t attr;          /* Thread attributes */
+    char **save_argv;
+    uint worker_thread_count= 0, table_count= 0, i= 0;
+    pthread_t *worker_threads;       /* Thread descriptor */
+    pthread_attr_t attr;             /* Thread attributes */
     pthread_attr_init(&attr);
     pthread_attr_setdetachstate(&attr,
-                                PTHREAD_CREATE_DETACHED);
+                                PTHREAD_CREATE_JOINABLE);
 
+    pthread_mutex_init(&init_mutex, NULL);
     pthread_mutex_init(&counter_mutex, NULL);
     pthread_cond_init(&count_threshhold, NULL);
 
+    /* Count the number of tables. This number denotes the total number
+       of threads spawn.
+    */
+    save_argv= argv;
+    for (table_count= 0; *argv != NULL; argv++)
+      table_count++;
+    argv= save_argv;
+
+    if (!(worker_threads= (pthread_t*) my_malloc(table_count *
+                                                 sizeof(*worker_threads),
+                                                 MYF(0))))
+      return -2;
+
     for (counter= 0; *argv != NULL; argv++) /* Loop through tables */
     {
       pthread_mutex_lock(&counter_mutex);
@@ -660,15 +688,16 @@ int main(int argc, char **argv)
       counter++;
       pthread_mutex_unlock(&counter_mutex);
       /* now create the thread */
-      if (pthread_create(&mainthread, &attr, worker_thread, 
-                         (void *)*argv) != 0)
+      if (pthread_create(&worker_threads[worker_thread_count], &attr,
+                         worker_thread, (void *)*argv) != 0)
       {
         pthread_mutex_lock(&counter_mutex);
         counter--;
         pthread_mutex_unlock(&counter_mutex);
-        fprintf(stderr,"%s: Could not create thread\n",
-                my_progname);
+        fprintf(stderr,"%s: Could not create thread\n", my_progname);
+        continue;
       }
+      worker_thread_count++;
     }
 
     /*
@@ -683,9 +712,18 @@ int main(int argc, char **argv)
       pthread_cond_timedwait(&count_threshhold, &counter_mutex, &abstime);
     }
     pthread_mutex_unlock(&counter_mutex);
+    pthread_mutex_destroy(&init_mutex);
     pthread_mutex_destroy(&counter_mutex);
     pthread_cond_destroy(&count_threshhold);
     pthread_attr_destroy(&attr);
+
+    for(i= 0; i < worker_thread_count; i++)
+    {
+      if (pthread_join(worker_threads[i], NULL))
+        fprintf(stderr,"%s: Could not join worker thread.\n", my_progname);
+    }
+
+    my_free(worker_threads);
   }
   else
   {
index aeaa05e536181d87563ef5a6cac448182bd646ba..10a4cf0526236517f6a5c0f02f114904d89f7861 100644 (file)
@@ -55,9 +55,9 @@ static int list_tables(MYSQL *mysql,const char *db,const char *table);
 static int list_table_status(MYSQL *mysql,const char *db,const char *table);
 static int list_fields(MYSQL *mysql,const char *db,const char *table,
                       const char *field);
-static void print_header(const char *header,uint head_length,...);
-static void print_row(const char *header,uint head_length,...);
-static void print_trailer(uint length,...);
+static void print_header(const char *header,size_t head_length,...);
+static void print_row(const char *header,size_t head_length,...);
+static void print_trailer(size_t length,...);
 static void print_res_header(MYSQL_RES *result);
 static void print_res_top(MYSQL_RES *result);
 static void print_res_row(MYSQL_RES *result,MYSQL_ROW cur);
@@ -314,7 +314,7 @@ are shown.");
 
 
 static my_bool
-get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
+get_one_option(int optid, const struct my_option *opt MY_ATTRIBUTE((unused)),
               char *argument)
 {
   switch(optid) {
@@ -397,7 +397,8 @@ static int
 list_dbs(MYSQL *mysql,const char *wild)
 {
   const char *header;
-  uint length, counter = 0;
+  size_t length = 0;
+  uint counter = 0;
   ulong rowcount = 0L;
   char tables[NAME_LEN+1], rows[NAME_LEN+1];
   char query[NAME_LEN + 100];
@@ -435,7 +436,7 @@ list_dbs(MYSQL *mysql,const char *wild)
     printf("Wildcard: %s\n",wild);
 
   header="Databases";
-  length=(uint) strlen(header);
+  length= strlen(header);
   field=mysql_fetch_field(result);
   if (length < field->max_length)
     length=field->max_length;
@@ -523,7 +524,8 @@ static int
 list_tables(MYSQL *mysql,const char *db,const char *table)
 {
   const char *header;
-  uint head_length, counter = 0;
+  size_t head_length;
+  uint counter = 0;
   char query[NAME_LEN + 100], rows[NAME_LEN], fields[16];
   MYSQL_FIELD *field;
   MYSQL_RES *result;
@@ -560,7 +562,7 @@ list_tables(MYSQL *mysql,const char *db,const char *table)
   putchar('\n');
 
   header="Tables";
-  head_length=(uint) strlen(header);
+  head_length= strlen(header);
   field=mysql_fetch_field(result);
   if (head_length < field->max_length)
     head_length=field->max_length;
@@ -678,7 +680,7 @@ list_table_status(MYSQL *mysql,const char *db,const char *wild)
   len= sizeof(query);
   len-= my_snprintf(query, len, "show table status from `%s`", db);
   if (wild && wild[0] && len)
-    strxnmov(query + strlen(query), len, " like '", wild, "'", NullS);
+    strxnmov(query + strlen(query), len - 1, " like '", wild, "'", NullS);
   if (mysql_query(mysql,query) || !(result=mysql_store_result(mysql)))
   {
     fprintf(stderr,"%s: Cannot get status for db: %s, table: %s: %s\n",
@@ -711,7 +713,7 @@ list_fields(MYSQL *mysql,const char *db,const char *table,
            const char *wild)
 {
   char query[NAME_LEN + 100];
-  int len;
+  size_t len;
   MYSQL_RES *result;
   MYSQL_ROW row;
   ulong UNINIT_VAR(rows);
@@ -741,7 +743,7 @@ list_fields(MYSQL *mysql,const char *db,const char *table,
   len-= my_snprintf(query, len, "show /*!32332 FULL */ columns from `%s`",
                     table);
   if (wild && wild[0] && len)
-    strxnmov(query + strlen(query), len, " like '", wild, "'", NullS);
+    strxnmov(query + strlen(query), len - 1, " like '", wild, "'", NullS);
   if (mysql_query(mysql,query) || !(result=mysql_store_result(mysql)))
   {
     fprintf(stderr,"%s: Cannot list columns in db: %s, table: %s: %s\n",
@@ -789,10 +791,10 @@ list_fields(MYSQL *mysql,const char *db,const char *table,
 *****************************************************************************/
 
 static void
-print_header(const char *header,uint head_length,...)
+print_header(const char *header,size_t head_length,...)
 {
   va_list args;
-  uint length,i,str_length,pre_space;
+  size_t length,i,str_length,pre_space;
   const char *field;
 
   va_start(args,head_length);
@@ -815,10 +817,10 @@ print_header(const char *header,uint head_length,...)
   putchar('|');
   for (;;)
   {
-    str_length=(uint) strlen(field);
+    str_length= strlen(field);
     if (str_length > length)
       str_length=length+1;
-    pre_space=(uint) (((int) length-(int) str_length)/2)+1;
+    pre_space= ((length- str_length)/2)+1;
     for (i=0 ; i < pre_space ; i++)
       putchar(' ');
     for (i = 0 ; i < str_length ; i++)
@@ -852,11 +854,11 @@ print_header(const char *header,uint head_length,...)
 
 
 static void
-print_row(const char *header,uint head_length,...)
+print_row(const char *header,size_t head_length,...)
 {
   va_list args;
   const char *field;
-  uint i,length,field_length;
+  size_t i,length,field_length;
 
   va_start(args,head_length);
   field=header; length=head_length;
@@ -865,7 +867,7 @@ print_row(const char *header,uint head_length,...)
     putchar('|');
     putchar(' ');
     fputs(field,stdout);
-    field_length=(uint) strlen(field);
+    field_length= strlen(field);
     for (i=field_length ; i <= length ; i++)
       putchar(' ');
     if (!(field=va_arg(args,char *)))
@@ -879,10 +881,10 @@ print_row(const char *header,uint head_length,...)
 
 
 static void
-print_trailer(uint head_length,...)
+print_trailer(size_t head_length,...)
 {
   va_list args;
-  uint length,i;
+  size_t length,i;
 
   va_start(args,head_length);
   length=head_length;
@@ -925,7 +927,7 @@ static void print_res_top(MYSQL_RES *result)
   mysql_field_seek(result,0);
   while((field = mysql_fetch_field(result)))
   {
-    if ((length=(uint) strlen(field->name)) > field->max_length)
+    if ((length= strlen(field->name)) > field->max_length)
       field->max_length=length;
     else
       length=field->max_length;
index 6ef47367bd4bdb30f67446e12662acd373e1ccdf..ad0bb965657be4f2547e0c5a14b35beeadf11015 100644 (file)
@@ -736,7 +736,7 @@ static void usage(void)
 
 
 static my_bool
-get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
+get_one_option(int optid, const struct my_option *opt MY_ATTRIBUTE((unused)),
                char *argument)
 {
   DBUG_ENTER("get_one_option");
index 0ac93bb059f6627bb8bbeb3de4867391a0c5be57..1e133b31c66a3733bf384681e74eaf783d2f8a47 100644 (file)
@@ -547,12 +547,12 @@ struct st_replace *glob_replace= 0;
 void replace_strings_append(struct st_replace *rep, DYNAMIC_STRING* ds,
 const char *from, int len);
 
-static void cleanup_and_exit(int exit_code) __attribute__((noreturn));
+static void cleanup_and_exit(int exit_code) MY_ATTRIBUTE((noreturn));
 
 void die(const char *fmt, ...)
-  ATTRIBUTE_FORMAT(printf, 1, 2) __attribute__((noreturn));
+  ATTRIBUTE_FORMAT(printf, 1, 2) MY_ATTRIBUTE((noreturn));
 void abort_not_supported_test(const char *fmt, ...)
-  ATTRIBUTE_FORMAT(printf, 1, 2) __attribute__((noreturn));
+  ATTRIBUTE_FORMAT(printf, 1, 2) MY_ATTRIBUTE((noreturn));
 void verbose_msg(const char *fmt, ...)
   ATTRIBUTE_FORMAT(printf, 1, 2);
 void log_msg(const char *fmt, ...)
@@ -2121,7 +2121,7 @@ static void strip_parentheses(struct st_command *command)
 C_MODE_START
 
 static uchar *get_var_key(const uchar* var, size_t *len,
-                          my_bool __attribute__((unused)) t)
+                          my_bool MY_ATTRIBUTE((unused)) t)
 {
   register char* key;
   key = ((VAR*)var)->name;
@@ -2449,7 +2449,7 @@ void var_query_set(VAR *var, const char *query, const char** query_end)
   init_dynamic_string(&ds_query, 0, (end - query) + 32, 256);
   do_eval(&ds_query, query, end, FALSE);
 
-  if (mysql_real_query(mysql, ds_query.str, ds_query.length)
+  if (mysql_real_query(mysql, ds_query.str, ds_query.length) || !(res= mysql_store_result(mysql)))
   {
     handle_error (curr_command, mysql_errno(mysql), mysql_error(mysql),
                   mysql_sqlstate(mysql), &ds_res);
@@ -2459,8 +2459,6 @@ void var_query_set(VAR *var, const char *query, const char** query_end)
     DBUG_VOID_RETURN;
   }
   
-  if (!(res= mysql_store_result(mysql)))
-    die("Query '%s' didn't return a result set", ds_query.str);
   dynstr_free(&ds_query);
 
   if ((row= mysql_fetch_row(res)) && row[0])
@@ -4320,7 +4318,7 @@ int do_echo(struct st_command *command)
 }
 
 
-void do_wait_for_slave_to_stop(struct st_command *c __attribute__((unused)))
+void do_wait_for_slave_to_stop(struct st_command *c MY_ATTRIBUTE((unused)))
 {
   static int SLAVE_POLL_INTERVAL= 300000;
   MYSQL* mysql = &cur_con->mysql;
@@ -8418,7 +8416,7 @@ void update_expected_errors(struct st_command* command)
 
 */
 
-void mark_progress(struct st_command* command __attribute__((unused)),
+void mark_progress(struct st_command* command MY_ATTRIBUTE((unused)),
                    int line)
 {
   static ulonglong progress_start= 0; // < Beware
@@ -9465,7 +9463,7 @@ typedef struct st_replace_found {
 
 void replace_strings_append(REPLACE *rep, DYNAMIC_STRING* ds,
                             const char *str,
-                            int len __attribute__((unused)))
+                            int len MY_ATTRIBUTE((unused)))
 {
   reg1 REPLACE *rep_pos;
   reg2 REPLACE_STRING *rep_str;
index a27ff7acfa860908412c27ed68276ca055f8fb81..d28da10662b2311f90374de21f7e15dc98d4e77f 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2012, 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
@@ -66,11 +66,9 @@ IF(UNIX)
       SET(SUNPRO_CXX_LIBRARY "stlport4" CACHE STRING
         "What C++ library to use. The server needs stlport4. It is possible to build the client libraries with -DWITHOUT_SERVER=1 -DSUNPRO_CXX_LIBRARY=Cstd")
 
-      MESSAGE(STATUS "SUNPRO_CXX_LIBRARY ${SUNPRO_CXX_LIBRARY}")
-
       IF(CMAKE_SYSTEM_PROCESSOR MATCHES "i386")
         SET(COMMON_C_FLAGS                   "-g -mt -fsimple=1 -ftrap=%none -nofstore -xbuiltin=%all -xlibmil -xlibmopt -xtarget=generic")
-        SET(COMMON_CXX_FLAGS                 "-g0 -mt -fsimple=1 -ftrap=%none -nofstore -xbuiltin=%all -xlibmil -xlibmopt -xtarget=generic -library=${SUNPRO_CXX_LIBRARY}")
+        SET(COMMON_CXX_FLAGS                 "-g0 -mt -fsimple=1 -ftrap=%none -nofstore -xbuiltin=%all -xlibmil -xlibmopt -xtarget=generic")
         # We have to specify "-xO1" for DEBUG flags here,
         # see http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6879978
         SET(CMAKE_C_FLAGS_DEBUG              "-xO1 ${COMMON_C_FLAGS}")
@@ -84,8 +82,8 @@ IF(UNIX)
         ENDIF()
       ELSE() 
         # Assume !x86 is SPARC
-        SET(COMMON_C_FLAGS                 "-g -Xa -xstrconst -mt")
-        SET(COMMON_CXX_FLAGS               "-g0 -mt -library=${SUNPRO_CXX_LIBRARY}")
+        SET(COMMON_C_FLAGS                 "-g -xstrconst -mt")
+        SET(COMMON_CXX_FLAGS               "-g0 -mt")
         IF(32BIT)
           SET(COMMON_C_FLAGS               "${COMMON_C_FLAGS} -xarch=sparc")
           SET(COMMON_CXX_FLAGS             "${COMMON_CXX_FLAGS} -xarch=sparc")
index 5cd47af0343c12e4c21236f08fdce033c2520c1e..b691bfa1c84d27a72c1025d6effe10c11eadb34d 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2010, 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
@@ -22,7 +22,7 @@
 #    and relative links.  Windows zip uses the same tarball layout but without
 #    the build prefix.
 #
-#  RPM
+#  RPM, SLES
 #    Build as per default RPM layout, with prefix=/usr
 #    Note: The layout for ULN RPMs differs, see the "RPM" section.
 #
 #  SVR4
 #    Solaris package layout suitable for pkg* tools, prefix=/opt/mysql/mysql
 #
+#  FREEBSD, GLIBC, OSX, TARGZ
+#    Build with prefix=/usr/local/mysql, create tarball with install prefix="."
+#    and relative links.
+#
+#  WIN
+#     Windows zip : same as tarball layout but without the build prefix
+#
 # To force a directory layout, use -DINSTALL_LAYOUT=<layout>.
 #
 # The default is STANDALONE.
 #
+# Note : At present, RPM and SLES layouts are similar. This is also true
+#        for layouts like FREEBSD, GLIBC, OSX, TARGZ. However, they provide
+#        opportunity to fine-tune deployment for each platform without
+#        affecting all other types of deployment.
+#
 # There is the possibility to further fine-tune installation directories.
 # Several variables can be overwritten:
 #
@@ -60,6 +72,7 @@
 # - INSTALL_SUPPORTFILESDIR (various extra support files)
 #
 # - INSTALL_MYSQLDATADIR    (data directory)
+# - INSTALL_SECURE_FILE_PRIVDIR (--secure-file-priv directory)
 #
 # When changing this page,  _please_ do not forget to update public Wiki
 # http://forge.mysql.com/wiki/CMake#Fine-tuning_installation_paths
@@ -69,10 +82,11 @@ IF(NOT INSTALL_LAYOUT)
 ENDIF()
 
 SET(INSTALL_LAYOUT "${DEFAULT_INSTALL_LAYOUT}"
-CACHE STRING "Installation directory layout. Options are: STANDALONE (as in zip or tar.gz installer), RPM, DEB, SVR4")
+CACHE STRING "Installation directory layout. Options are: TARGZ (as in tar.gz installer), WIN (as in zip installer), STANDALONE, RPM, DEB, SVR4, FREEBSD, GLIBC, OSX, SLES")
 
 IF(UNIX)
-  IF(INSTALL_LAYOUT MATCHES "RPM")
+  IF(INSTALL_LAYOUT MATCHES "RPM" OR
+     INSTALL_LAYOUT MATCHES "SLES")
     SET(default_prefix "/usr")
   ELSEIF(INSTALL_LAYOUT MATCHES "DEB")
     SET(default_prefix "/opt/mysql/server-${MYSQL_BASE_VERSION}")
@@ -87,7 +101,7 @@ IF(UNIX)
     SET(CMAKE_INSTALL_PREFIX ${default_prefix}
       CACHE PATH "install prefix" FORCE)
   ENDIF()
-  SET(VALID_INSTALL_LAYOUTS "RPM" "STANDALONE" "DEB" "SVR4")
+  SET(VALID_INSTALL_LAYOUTS "RPM" "DEB" "SVR4" "FREEBSD" "GLIBC" "OSX" "TARGZ" "SLES" "STANDALONE")
   LIST(FIND VALID_INSTALL_LAYOUTS "${INSTALL_LAYOUT}" ind)
   IF(ind EQUAL -1)
     MESSAGE(FATAL_ERROR "Invalid INSTALL_LAYOUT parameter:${INSTALL_LAYOUT}."
@@ -99,6 +113,15 @@ IF(UNIX)
   MARK_AS_ADVANCED(SYSCONFDIR)
 ENDIF()
 
+IF(WIN32)
+  SET(VALID_INSTALL_LAYOUTS "TARGZ" "STANDALONE" "WIN")
+  LIST(FIND VALID_INSTALL_LAYOUTS "${INSTALL_LAYOUT}" ind)
+  IF(ind EQUAL -1)
+    MESSAGE(FATAL_ERROR "Invalid INSTALL_LAYOUT parameter:${INSTALL_LAYOUT}."
+    " Choose between ${VALID_INSTALL_LAYOUTS}" )
+  ENDIF()
+ENDIF()
+
 #
 # plugin_tests's value should not be used by imported plugins,
 # just use if(INSTALL_PLUGINTESTDIR).
@@ -109,6 +132,22 @@ FILE(GLOB plugin_tests
   ${CMAKE_SOURCE_DIR}/internal/plugin/*/tests
 )
 
+#
+# DEFAULT_SECURE_FILE_PRIV_DIR/DEFAULT_SECURE_FILE_PRIV_EMBEDDED_DIR
+#
+IF(INSTALL_LAYOUT MATCHES "STANDALONE" OR
+   INSTALL_LAYOUT MATCHES "WIN")
+  SET(secure_file_priv_path "NULL")
+ELSEIF(INSTALL_LAYOUT MATCHES "RPM" OR
+       INSTALL_LAYOUT MATCHES "SLES" OR
+       INSTALL_LAYOUT MATCHES "SVR4" OR
+       INSTALL_LAYOUT MATCHES "DEB")
+  SET(secure_file_priv_path "/var/lib/mysql-files")
+ELSE()
+  SET(secure_file_priv_path "${default_prefix}/mysql-files")
+ENDIF()
+SET(secure_file_priv_embedded_path "NULL")
+
 #
 # STANDALONE layout
 #
@@ -134,6 +173,148 @@ SET(INSTALL_SUPPORTFILESDIR_STANDALONE  "support-files")
 #
 SET(INSTALL_MYSQLDATADIR_STANDALONE     "data")
 SET(INSTALL_PLUGINTESTDIR_STANDALONE    ${plugin_tests})
+SET(INSTALL_SECURE_FILE_PRIVDIR_STANDALONE ${secure_file_priv_path})
+SET(INSTALL_SECURE_FILE_PRIV_EMBEDDEDDIR_STANDALONE ${secure_file_priv_embedded_path})
+
+#
+# WIN layout
+#
+SET(INSTALL_BINDIR_WIN           "bin")
+SET(INSTALL_SBINDIR_WIN          "bin")
+SET(INSTALL_SCRIPTDIR_WIN        "scripts")
+#
+SET(INSTALL_LIBDIR_WIN           "lib")
+SET(INSTALL_PLUGINDIR_WIN        "lib/plugin")
+#
+SET(INSTALL_INCLUDEDIR_WIN       "include")
+#
+SET(INSTALL_DOCDIR_WIN           "docs")
+SET(INSTALL_DOCREADMEDIR_WIN     ".")
+SET(INSTALL_MANDIR_WIN           "man")
+SET(INSTALL_INFODIR_WIN          "docs")
+#
+SET(INSTALL_SHAREDIR_WIN         "share")
+SET(INSTALL_MYSQLSHAREDIR_WIN    "share")
+SET(INSTALL_MYSQLTESTDIR_WIN     "mysql-test")
+SET(INSTALL_SQLBENCHDIR_WIN      ".")
+SET(INSTALL_SUPPORTFILESDIR_WIN  "support-files")
+#
+SET(INSTALL_MYSQLDATADIR_WIN     "data")
+SET(INSTALL_PLUGINTESTDIR_WIN    ${plugin_tests})
+SET(INSTALL_SECURE_FILE_PRIVDIR_WIN ${secure_file_priv_path})
+SET(INSTALL_SECURE_FILE_PRIV_EMBEDDEDDIR_WIN ${secure_file_priv_embedded_path})
+
+#
+# FREEBSD layout
+#
+SET(INSTALL_BINDIR_FREEBSD           "bin")
+SET(INSTALL_SBINDIR_FREEBSD          "bin")
+SET(INSTALL_SCRIPTDIR_FREEBSD        "scripts")
+#
+SET(INSTALL_LIBDIR_FREEBSD           "lib")
+SET(INSTALL_PLUGINDIR_FREEBSD        "lib/plugin")
+#
+SET(INSTALL_INCLUDEDIR_FREEBSD       "include")
+#
+SET(INSTALL_DOCDIR_FREEBSD           "docs")
+SET(INSTALL_DOCREADMEDIR_FREEBSD     ".")
+SET(INSTALL_MANDIR_FREEBSD           "man")
+SET(INSTALL_INFODIR_FREEBSD          "docs")
+#
+SET(INSTALL_SHAREDIR_FREEBSD         "share")
+SET(INSTALL_MYSQLSHAREDIR_FREEBSD    "share")
+SET(INSTALL_MYSQLTESTDIR_FREEBSD     "mysql-test")
+SET(INSTALL_SQLBENCHDIR_FREEBSD      ".")
+SET(INSTALL_SUPPORTFILESDIR_FREEBSD  "support-files")
+#
+SET(INSTALL_MYSQLDATADIR_FREEBSD     "data")
+SET(INSTALL_PLUGINTESTDIR_FREEBSD    ${plugin_tests})
+SET(INSTALL_SECURE_FILE_PRIVDIR_FREEBSD ${secure_file_priv_path})
+SET(INSTALL_SECURE_FILE_PRIV_EMBEDDEDDIR_FREEBSD ${secure_file_priv_embedded_path})
+
+#
+# GLIBC layout
+#
+SET(INSTALL_BINDIR_GLIBC           "bin")
+SET(INSTALL_SBINDIR_GLIBC          "bin")
+SET(INSTALL_SCRIPTDIR_GLIBC        "scripts")
+#
+SET(INSTALL_LIBDIR_GLIBC           "lib")
+SET(INSTALL_PLUGINDIR_GLIBC        "lib/plugin")
+#
+SET(INSTALL_INCLUDEDIR_GLIBC       "include")
+#
+SET(INSTALL_DOCDIR_GLIBC           "docs")
+SET(INSTALL_DOCREADMEDIR_GLIBC     ".")
+SET(INSTALL_MANDIR_GLIBC           "man")
+SET(INSTALL_INFODIR_GLIBC          "docs")
+#
+SET(INSTALL_SHAREDIR_GLIBC         "share")
+SET(INSTALL_MYSQLSHAREDIR_GLIBC    "share")
+SET(INSTALL_MYSQLTESTDIR_GLIBC     "mysql-test")
+SET(INSTALL_SQLBENCHDIR_GLIBC      ".")
+SET(INSTALL_SUPPORTFILESDIR_GLIBC  "support-files")
+#
+SET(INSTALL_MYSQLDATADIR_GLIBC     "data")
+SET(INSTALL_PLUGINTESTDIR_GLIBC    ${plugin_tests})
+SET(INSTALL_SECURE_FILE_PRIVDIR_GLIBC ${secure_file_priv_path})
+SET(INSTALL_SECURE_FILE_PRIV_EMBEDDEDDIR_GLIBC ${secure_file_priv_embedded_path})
+
+#
+# OSX layout
+#
+SET(INSTALL_BINDIR_OSX           "bin")
+SET(INSTALL_SBINDIR_OSX          "bin")
+SET(INSTALL_SCRIPTDIR_OSX        "scripts")
+#
+SET(INSTALL_LIBDIR_OSX           "lib")
+SET(INSTALL_PLUGINDIR_OSX        "lib/plugin")
+#
+SET(INSTALL_INCLUDEDIR_OSX       "include")
+#
+SET(INSTALL_DOCDIR_OSX           "docs")
+SET(INSTALL_DOCREADMEDIR_OSX     ".")
+SET(INSTALL_MANDIR_OSX           "man")
+SET(INSTALL_INFODIR_OSX          "docs")
+#
+SET(INSTALL_SHAREDIR_OSX         "share")
+SET(INSTALL_MYSQLSHAREDIR_OSX    "share")
+SET(INSTALL_MYSQLTESTDIR_OSX     "mysql-test")
+SET(INSTALL_SQLBENCHDIR_OSX      ".")
+SET(INSTALL_SUPPORTFILESDIR_OSX  "support-files")
+#
+SET(INSTALL_MYSQLDATADIR_OSX     "data")
+SET(INSTALL_PLUGINTESTDIR_OSX    ${plugin_tests})
+SET(INSTALL_SECURE_FILE_PRIVDIR_OSX ${secure_file_priv_path})
+SET(INSTALL_SECURE_FILE_PRIV_EMBEDDEDDIR_OSX ${secure_file_priv_embedded_path})
+
+#
+# TARGZ layout
+#
+SET(INSTALL_BINDIR_TARGZ           "bin")
+SET(INSTALL_SBINDIR_TARGZ          "bin")
+SET(INSTALL_SCRIPTDIR_TARGZ        "scripts")
+#
+SET(INSTALL_LIBDIR_TARGZ           "lib")
+SET(INSTALL_PLUGINDIR_TARGZ        "lib/plugin")
+#
+SET(INSTALL_INCLUDEDIR_TARGZ       "include")
+#
+SET(INSTALL_DOCDIR_TARGZ           "docs")
+SET(INSTALL_DOCREADMEDIR_TARGZ     ".")
+SET(INSTALL_MANDIR_TARGZ           "man")
+SET(INSTALL_INFODIR_TARGZ          "docs")
+#
+SET(INSTALL_SHAREDIR_TARGZ         "share")
+SET(INSTALL_MYSQLSHAREDIR_TARGZ    "share")
+SET(INSTALL_MYSQLTESTDIR_TARGZ     "mysql-test")
+SET(INSTALL_SQLBENCHDIR_TARGZ      ".")
+SET(INSTALL_SUPPORTFILESDIR_TARGZ  "support-files")
+#
+SET(INSTALL_MYSQLDATADIR_TARGZ     "data")
+SET(INSTALL_PLUGINTESTDIR_TARGZ    ${plugin_tests})
+SET(INSTALL_SECURE_FILE_PRIVDIR_TARGZ ${secure_file_priv_path})
+SET(INSTALL_SECURE_FILE_PRIV_EMBEDDEDDIR_TARGZ ${secure_file_priv_embedded_path})
 
 #
 # RPM layout
@@ -172,6 +353,41 @@ SET(INSTALL_SUPPORTFILESDIR_RPM         "share/mysql")
 #
 SET(INSTALL_MYSQLDATADIR_RPM            "/var/lib/mysql")
 SET(INSTALL_PLUGINTESTDIR_RPM           ${plugin_tests})
+SET(INSTALL_SECURE_FILE_PRIVDIR_RPM     ${secure_file_priv_path})
+SET(INSTALL_SECURE_FILE_PRIV_EMBEDDEDDIR_RPM     ${secure_file_priv_embedded_path})
+
+#
+# SLES layout
+#
+SET(INSTALL_BINDIR_SLES                  "bin")
+SET(INSTALL_SBINDIR_SLES                 "sbin")
+SET(INSTALL_SCRIPTDIR_SLES               "bin")
+#
+IF(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64")
+  SET(INSTALL_LIBDIR_SLES                "lib64")
+  SET(INSTALL_PLUGINDIR_SLES             "lib64/mysql/plugin")
+ELSE()
+  SET(INSTALL_LIBDIR_SLES                "lib")
+  SET(INSTALL_PLUGINDIR_SLES             "lib/mysql/plugin")
+ENDIF()
+#
+SET(INSTALL_INCLUDEDIR_SLES              "include/mysql")
+#
+#SET(INSTALL_DOCDIR_SLES                 unset - installed directly by SLES)
+#SET(INSTALL_DOCREADMEDIR_SLES           unset - installed directly by SLES)
+SET(INSTALL_INFODIR_SLES                 "share/info")
+SET(INSTALL_MANDIR_SLES                  "share/man")
+#
+SET(INSTALL_SHAREDIR_SLES                "share")
+SET(INSTALL_MYSQLSHAREDIR_SLES           "share/mysql")
+SET(INSTALL_MYSQLTESTDIR_SLES            "share/mysql-test")
+SET(INSTALL_SQLBENCHDIR_SLES             "")
+SET(INSTALL_SUPPORTFILESDIR_SLES         "share/mysql")
+#
+SET(INSTALL_MYSQLDATADIR_SLES            "/var/lib/mysql")
+SET(INSTALL_PLUGINTESTDIR_SLES           ${plugin_tests})
+SET(INSTALL_SECURE_FILE_PRIVDIR_SLES     ${secure_file_priv_path})
+SET(INSTALL_SECURE_FILE_PRIV_EMBEDDEDDIR_SLES     ${secure_file_priv_embedded_path})
 
 #
 # DEB layout
@@ -198,6 +414,8 @@ SET(INSTALL_SUPPORTFILESDIR_DEB         "support-files")
 #
 SET(INSTALL_MYSQLDATADIR_DEB            "data")
 SET(INSTALL_PLUGINTESTDIR_DEB           ${plugin_tests})
+SET(INSTALL_SECURE_FILE_PRIVDIR_DEB     ${secure_file_priv_path})
+SET(INSTALL_SECURE_FILE_PRIV_EMBEDDEDDIR_DEB     ${secure_file_priv_embedded_path})
 
 #
 # SVR4 layout
@@ -224,6 +442,8 @@ SET(INSTALL_SUPPORTFILESDIR_SVR4        "support-files")
 #
 SET(INSTALL_MYSQLDATADIR_SVR4           "/var/lib/mysql")
 SET(INSTALL_PLUGINTESTDIR_SVR4          ${plugin_tests})
+SET(INSTALL_SECURE_FILE_PRIVDIR_SVR4    ${secure_file_priv_path})
+SET(INSTALL_SECURE_FILE_PRIV_EMBEDDEDDIR_SVR4    ${secure_file_priv_embedded_path})
 
 
 # Clear cached variables if install layout was changed
@@ -238,8 +458,29 @@ SET(OLD_INSTALL_LAYOUT ${INSTALL_LAYOUT} CACHE INTERNAL "")
 # will be defined  as ${INSTALL_BINDIR_STANDALONE} by default if STANDALONE
 # layout is chosen)
 FOREACH(var BIN SBIN LIB MYSQLSHARE SHARE PLUGIN INCLUDE SCRIPT DOC MAN
-  INFO MYSQLTEST SQLBENCH DOCREADME SUPPORTFILES MYSQLDATA PLUGINTEST)
+  INFO MYSQLTEST SQLBENCH DOCREADME SUPPORTFILES MYSQLDATA PLUGINTEST
+  SECURE_FILE_PRIV SECURE_FILE_PRIV_EMBEDDED)
   SET(INSTALL_${var}DIR  ${INSTALL_${var}DIR_${INSTALL_LAYOUT}}
   CACHE STRING "${var} installation directory" ${FORCE})
   MARK_AS_ADVANCED(INSTALL_${var}DIR)
 ENDFOREACH()
+
+#
+# Set DEFAULT_SECURE_FILE_PRIV_DIR
+# This is used as default value for --secure-file-priv
+#
+IF(INSTALL_SECURE_FILE_PRIVDIR)
+  SET(DEFAULT_SECURE_FILE_PRIV_DIR "\"${INSTALL_SECURE_FILE_PRIVDIR}\""
+      CACHE INTERNAL "default --secure-file-priv directory" FORCE)
+ELSE()
+  SET(DEFAULT_SECURE_FILE_PRIV_DIR \"\"
+      CACHE INTERNAL "default --secure-file-priv directory" FORCE)
+ENDIF()
+
+IF(INSTALL_SECURE_FILE_PRIV_EMBEDDEDDIR)
+  SET(DEFAULT_SECURE_FILE_PRIV_EMBEDDED_DIR "\"${INSTALL_SECURE_FILE_PRIV_EMBEDDEDDIR}\""
+    CACHE INTERNAL "default --secure-file-priv directory (for embedded library)" FORCE)
+ELSE()
+  SET(DEFAULT_SECURE_FILE_PRIV_EMBEDDED_DIR "NULL"
+    CACHE INTERNAL "default --secure-file-priv directory (for embedded library)" FORCE)
+ENDIF()
index 9da409feb361dd563c1ed04d9478d5d35e4293ba..f0b03f239832e3339046274900f132004dcf5308 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2010, 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
@@ -17,6 +17,33 @@ INCLUDE(CheckSymbolExists)
 INCLUDE(CheckCSourceRuns)
 INCLUDE(CheckCSourceCompiles) 
 
+# We require SunStudio 12u2 (CC 5.11)
+IF(NOT FORCE_UNSUPPORTED_COMPILER)
+  IF(CMAKE_C_COMPILER_ID MATCHES "SunPro")
+    # CC -V yields
+    # CC: Studio 12.5 Sun C++ 5.14 SunOS_sparc Dodona 2016/04/04
+    # CC: Sun C++ 5.13 SunOS_sparc Beta 2014/03/11
+    # CC: Sun C++ 5.11 SunOS_sparc 2010/08/13
+    EXECUTE_PROCESS(
+      COMMAND ${CMAKE_CXX_COMPILER} "-V"
+      OUTPUT_VARIABLE stdout
+      ERROR_VARIABLE  stderr
+      RESULT_VARIABLE result
+    )
+    STRING(REGEX MATCH "CC: Sun C\\+\\+ 5\\.([0-9]+)" VERSION_STRING ${stderr})
+    IF (NOT CMAKE_MATCH_1 OR CMAKE_MATCH_1 STREQUAL "")
+      STRING(REGEX MATCH "CC: Studio 12\\.5 Sun C\\+\\+ 5\\.([0-9]+)"
+        VERSION_STRING ${stderr})
+    ENDIF()
+    SET(CC_MINOR_VERSION ${CMAKE_MATCH_1})
+    IF(${CC_MINOR_VERSION} LESS 11)
+      MESSAGE(FATAL_ERROR "SunStudio 12u2 or newer is required!")
+    ENDIF()
+  ELSE()
+    MESSAGE(FATAL_ERROR "Unsupported compiler!")
+  ENDIF()
+ENDIF()
+
 # Enable 64 bit file offsets
 SET(_FILE_OFFSET_BITS 64)
 
@@ -29,7 +56,7 @@ SET(LIBM m)
 
 # CMake defined -lthread as thread flag. This crashes in dlopen 
 # when trying to load plugins workaround with -lpthread
-SET(CMAKE_THREADS_LIBS_INIT -lpthread CACHE INTERNAL "" FORCE)
+SET(CMAKE_THREAD_LIBS_INIT -lpthread CACHE INTERNAL "" FORCE)
 
 # Solaris specific large page support
 CHECK_SYMBOL_EXISTS(MHA_MAPSIZE_VA sys/mman.h  HAVE_DECL_MHA_MAPSIZE_VA)
index 7b60a268f7e83002832363f06b8b1b64c48f2281..974a50120231ac52d5a4065f96f07686ecc8c1a6 100644 (file)
@@ -34,7 +34,6 @@ SET(HAVE_BACKTRACE_SYMBOLS_FD CACHE  INTERNAL "")
 SET(HAVE_BMOVE CACHE  INTERNAL "")
 SET(HAVE_BSD_SIGNALS CACHE  INTERNAL "")
 SET(HAVE_BSEARCH 1 CACHE  INTERNAL "")
-SET(HAVE_BSS_START CACHE  INTERNAL "")
 SET(HAVE_CHOWN CACHE  INTERNAL "")
 SET(HAVE_CLOCK_GETTIME CACHE  INTERNAL "")
 SET(HAVE_COMPRESS CACHE  INTERNAL "")
@@ -45,7 +44,6 @@ SET(HAVE_CXX_NEW 1 CACHE  INTERNAL "")
 SET(HAVE_CXXABI_H CACHE INTERNAL "")
 SET(HAVE_DECL_MADVISE CACHE  INTERNAL "")
 SET(HAVE_DIRECTIO CACHE  INTERNAL "")
-SET(HAVE_DIRENT_H CACHE  INTERNAL "")
 SET(HAVE_DLERROR CACHE  INTERNAL "")
 SET(HAVE_DLFCN_H CACHE  INTERNAL "")
 SET(HAVE_DLOPEN CACHE  INTERNAL "")
@@ -164,7 +162,6 @@ SET(HAVE_PTHREAD_YIELD_ZERO_ARG CACHE  INTERNAL "")
 SET(HAVE_PUTENV 1 CACHE  INTERNAL "")
 SET(HAVE_PWD_H CACHE  INTERNAL "")
 SET(HAVE_RDTSCLL CACHE  INTERNAL "")
-SET(HAVE_READDIR_R CACHE  INTERNAL "")
 SET(HAVE_READLINK CACHE  INTERNAL "")
 SET(HAVE_READ_REAL_TIME CACHE  INTERNAL "")
 SET(HAVE_REALPATH CACHE  INTERNAL "")
index 1f5eebb4820973ff98cb32b1117072fe5204de7e..7c395168f0874701f07d2c855423c1ebe3469c16 100644 (file)
@@ -17,7 +17,7 @@
 # so WSREP_VERSION is produced regardless
 
 # Set the patch version
-SET(WSREP_PATCH_VERSION "15")
+SET(WSREP_PATCH_VERSION "19")
 
 # Obtain patch revision number
 SET(WSREP_REVISION $ENV{WSREP_REV})
index e9d795e93318ae7f84b3d65a7ec4a36308178d4f..3309fe3ea0fb6ec5f112657beec20d9d963be387 100644 (file)
@@ -31,7 +31,6 @@
 #cmakedefine HAVE_CXXABI_H 1
 #cmakedefine HAVE_NCURSES_H 1
 #cmakedefine HAVE_NDIR_H 1
-#cmakedefine HAVE_DIRENT_H 1
 #cmakedefine HAVE_DLFCN_H 1
 #cmakedefine HAVE_EXECINFO_H 1
 #cmakedefine HAVE_FCNTL_H 1
 #cmakedefine HAVE_PUTENV 1
 #cmakedefine HAVE_RE_COMP 1
 #cmakedefine HAVE_REGCOMP 1
-#cmakedefine HAVE_READDIR_R 1
 #cmakedefine HAVE_READLINK 1
 #cmakedefine HAVE_REALPATH 1
 #cmakedefine HAVE_RENAME 1
 #cmakedefine HAVE_AIO_READ 1
 /* Symbols we may use */
 /* used by stacktrace functions */
-#cmakedefine HAVE_BSS_START 1
 #cmakedefine HAVE_BACKTRACE 1
 #cmakedefine HAVE_BACKTRACE_SYMBOLS 1
 #cmakedefine HAVE_BACKTRACE_SYMBOLS_FD 1
 #cmakedefine CPU_LEVEL1_DCACHE_LINESIZE @CPU_LEVEL1_DCACHE_LINESIZE@
 #cmakedefine HAVE_LIBNUMA 1
 
+/* For --secure-file-priv */
+#cmakedefine DEFAULT_SECURE_FILE_PRIV_DIR @DEFAULT_SECURE_FILE_PRIV_DIR@
+#cmakedefine DEFAULT_SECURE_FILE_PRIV_EMBEDDED_DIR @DEFAULT_SECURE_FILE_PRIV_EMBEDDED_DIR@
+
 #endif
index f94b0000775885855a046a4ca4c7f8979880873f..6559406cfa3a256943eb612e80ef78ebbb6c971e 100644 (file)
@@ -67,17 +67,27 @@ SET(SIGNAL_WITH_VIO_SHUTDOWN 1)
 
 # The default C++ library for SunPro is really old, and not standards compliant.
 # http://www.oracle.com/technetwork/server-storage/solaris10/cmp-stlport-libcstd-142559.html
-# Use stlport rather than Rogue Wave.
+# Use stlport rather than Rogue Wave,
+#   unless otherwise specified on command line.
 IF(CMAKE_SYSTEM_NAME MATCHES "SunOS")
   IF(CMAKE_CXX_COMPILER_ID MATCHES "SunPro")
-    IF(SUNPRO_CXX_LIBRARY)
-      SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -library=${SUNPRO_CXX_LIBRARY}")
-      IF(SUNPRO_CXX_LIBRARY STREQUAL "stdcxx4")
-        ADD_DEFINITIONS(-D__MATHERR_RENAME_EXCEPTION)
-        SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -template=extdef")
-      ENDIF()
+    IF(CMAKE_CXX_FLAGS MATCHES "-std=")
+      ADD_DEFINITIONS(-D__MATHERR_RENAME_EXCEPTION)
+      SET(CMAKE_SHARED_LIBRARY_C_FLAGS
+        "${CMAKE_SHARED_LIBRARY_C_FLAGS} -lc")
+      SET(CMAKE_SHARED_LIBRARY_CXX_FLAGS
+        "${CMAKE_SHARED_LIBRARY_CXX_FLAGS} -lstdc++ -lgcc_s -lCrunG3 -lc")
+      SET(QUOTED_CMAKE_CXX_LINK_FLAGS "-lstdc++ -lgcc_s -lCrunG3 -lc")
     ELSE()
-      SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -library=stlport4")
+      IF(SUNPRO_CXX_LIBRARY)
+        SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -library=${SUNPRO_CXX_LIBRARY}")
+        IF(SUNPRO_CXX_LIBRARY STREQUAL "stdcxx4")
+          ADD_DEFINITIONS(-D__MATHERR_RENAME_EXCEPTION)
+          SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -template=extdef")
+        ENDIF()
+      ELSE()
+        SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -library=stlport4")
+      ENDIF()
     ENDIF()
   ENDIF()
 ENDIF()
@@ -143,6 +153,7 @@ IF(CMAKE_SYSTEM_NAME MATCHES "SunOS" AND
   GET_FILENAME_COMPONENT(CXX_REALPATH ${CMAKE_CXX_COMPILER} REALPATH)
 
   # CC -V yields
+  # CC: Studio 12.5 Sun C++ 5.14 SunOS_sparc Dodona 2016/04/04
   # CC: Sun C++ 5.13 SunOS_sparc Beta 2014/03/11
   # CC: Sun C++ 5.11 SunOS_sparc 2010/08/13
 
@@ -157,9 +168,13 @@ IF(CMAKE_SYSTEM_NAME MATCHES "SunOS" AND
   ENDIF()
 
   STRING(REGEX MATCH "CC: Sun C\\+\\+ 5\\.([0-9]+)" VERSION_STRING ${stderr})
+  IF (NOT CMAKE_MATCH_1 OR CMAKE_MATCH_1 STREQUAL "")
+    STRING(REGEX MATCH "CC: Studio 12\\.5 Sun C\\+\\+ 5\\.([0-9]+)"
+      VERSION_STRING ${stderr})
+  ENDIF()
   SET(CC_MINOR_VERSION ${CMAKE_MATCH_1})
 
-  IF(${CC_MINOR_VERSION} EQUAL 13)
+  IF(${CC_MINOR_VERSION} GREATER 12)
     SET(STLPORT_SUFFIX "lib/compilers/stlport4")
     IF(SIZEOF_VOIDP EQUAL 8 AND CMAKE_SYSTEM_PROCESSOR MATCHES "sparc")
       SET(STLPORT_SUFFIX "lib/compilers/stlport4/sparcv9")
@@ -274,10 +289,14 @@ IF(UNIX)
   IF(NOT LIBRT)
     MY_SEARCH_LIBS(clock_gettime rt LIBRT)
   ENDIF()
+  MY_SEARCH_LIBS(backtrace execinfo LIBEXECINFO)
+
   FIND_PACKAGE(Threads)
 
   SET(CMAKE_REQUIRED_LIBRARIES 
-    ${LIBM} ${LIBNSL} ${LIBBIND} ${LIBCRYPT} ${LIBSOCKET} ${LIBDL} ${CMAKE_THREAD_LIBS_INIT} ${LIBRT})
+    ${LIBM} ${LIBNSL} ${LIBBIND} ${LIBCRYPT} ${LIBSOCKET} ${LIBDL}
+    ${CMAKE_THREAD_LIBS_INIT} ${LIBRT} ${LIBEXECINFO}
+  )
   # Need explicit pthread for gcc -fsanitize=address
   IF(CMAKE_USE_PTHREADS_INIT AND CMAKE_C_FLAGS MATCHES "-fsanitize=")
     SET(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} pthread)
@@ -328,7 +347,6 @@ CHECK_INCLUDE_FILES (aio.h HAVE_AIO_H)
 CHECK_INCLUDE_FILES (arpa/inet.h HAVE_ARPA_INET_H)
 CHECK_INCLUDE_FILES (crypt.h HAVE_CRYPT_H)
 CHECK_INCLUDE_FILES (cxxabi.h HAVE_CXXABI_H)
-CHECK_INCLUDE_FILES (dirent.h HAVE_DIRENT_H)
 CHECK_INCLUDE_FILES (dlfcn.h HAVE_DLFCN_H)
 CHECK_INCLUDE_FILES (execinfo.h HAVE_EXECINFO_H)
 CHECK_INCLUDE_FILES (fcntl.h HAVE_FCNTL_H)
@@ -550,7 +568,6 @@ CHECK_FUNCTION_EXISTS (pthread_sigmask HAVE_PTHREAD_SIGMASK)
 CHECK_FUNCTION_EXISTS (pthread_threadmask HAVE_PTHREAD_THREADMASK)
 CHECK_FUNCTION_EXISTS (pthread_yield_np HAVE_PTHREAD_YIELD_NP)
 CHECK_FUNCTION_EXISTS (putenv HAVE_PUTENV)
-CHECK_FUNCTION_EXISTS (readdir_r HAVE_READDIR_R)
 CHECK_FUNCTION_EXISTS (readlink HAVE_READLINK)
 CHECK_FUNCTION_EXISTS (re_comp HAVE_RE_COMP)
 CHECK_FUNCTION_EXISTS (regcomp HAVE_REGCOMP)
@@ -1063,14 +1080,6 @@ CHECK_CXX_SOURCE_COMPILES("
   HAVE_ABI_CXA_DEMANGLE)
 ENDIF()
 
-CHECK_C_SOURCE_COMPILES("
-  int main(int argc, char **argv) 
-  {
-    extern char *__bss_start;
-    return __bss_start ? 1 : 0;
-  }"
-HAVE_BSS_START)
-
 CHECK_C_SOURCE_COMPILES("
     int main()
     {
index 5fb84d48ffc0c70bd532073c014dc85d8612b466..c8ccb9b29f3f869a1bc81e9689595b87071131a1 100644 (file)
@@ -73,7 +73,7 @@ int main (int argc, char *argv[])
             DBUG_EVALUATE_IF("evaluate_if", "ON", "OFF"));
     DBUG_EXECUTE_IF("pop",  DBUG_POP(); );
     {
-      char s[1000] __attribute__((unused));
+      char s[1000] MY_ATTRIBUTE((unused));
       DBUG_EXPLAIN(s, sizeof(s)-1);
       DBUG_PRINT("explain", ("dbug explained: %s", s));
     }
diff --git a/mysql-wsrep-5.6/debian/README.Maintainer b/mysql-wsrep-5.6/debian/README.Maintainer
new file mode 100644 (file)
index 0000000..b1e0a60
--- /dev/null
@@ -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 <public@codenode.com>.
+
+#
+# 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/mysql-wsrep-5.6/debian/additions/Docs__Images__Makefile.in b/mysql-wsrep-5.6/debian/additions/Docs__Images__Makefile.in
new file mode 100644 (file)
index 0000000..f7316d4
--- /dev/null
@@ -0,0 +1,6 @@
+all:
+
+distclean:
+       -rm -f Makefile
+
+.PHONY: all distclean clean install check
diff --git a/mysql-wsrep-5.6/debian/additions/Docs__Makefile.in b/mysql-wsrep-5.6/debian/additions/Docs__Makefile.in
new file mode 100644 (file)
index 0000000..f7316d4
--- /dev/null
@@ -0,0 +1,6 @@
+all:
+
+distclean:
+       -rm -f Makefile
+
+.PHONY: all distclean clean install check
diff --git a/mysql-wsrep-5.6/debian/additions/debian-start b/mysql-wsrep-5.6/debian/additions/debian-start
new file mode 100644 (file)
index 0000000..1ea1207
--- /dev/null
@@ -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/mysql-wsrep-5.6/debian/additions/debian-start.inc.sh b/mysql-wsrep-5.6/debian/additions/debian-start.inc.sh
new file mode 100644 (file)
index 0000000..f507128
--- /dev/null
@@ -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/mysql-wsrep-5.6/debian/additions/debian_create_root_user.sql b/mysql-wsrep-5.6/debian/additions/debian_create_root_user.sql
new file mode 100644 (file)
index 0000000..fd45cec
--- /dev/null
@@ -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/mysql-wsrep-5.6/debian/additions/echo_stderr b/mysql-wsrep-5.6/debian/additions/echo_stderr
new file mode 100644 (file)
index 0000000..67b3ed7
--- /dev/null
@@ -0,0 +1,2 @@
+#!/bin/bash
+echo "$*" 1>&2
diff --git a/mysql-wsrep-5.6/debian/additions/innotop/changelog.innotop b/mysql-wsrep-5.6/debian/additions/innotop/changelog.innotop
new file mode 100644 (file)
index 0000000..ab4c154
--- /dev/null
@@ -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/mysql-wsrep-5.6/debian/additions/innotop/innotop b/mysql-wsrep-5.6/debian/additions/innotop/innotop
new file mode 100644 (file)
index 0000000..646f0d7
--- /dev/null
@@ -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 <options> <innodb-status-file>\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 <<USAGE;
+
+innotop is a MySQL and InnoDB transaction/status monitor, like 'top' for
+MySQL.  It displays queries, InnoDB transactions, lock waits, deadlocks,
+foreign key errors, open tables, replication status, buffer information,
+row operations, logs, I/O operations, load graph, and more.  You can
+monitor many servers at once with innotop. 
+
+USAGE
+   exit(1);
+}
+
+# Meta-data (table definitions etc) {{{2
+# ###########################################################################
+
+# Expressions {{{3
+# Convenience so I can copy/paste these in several places...
+# ###########################################################################
+my %exprs = (
+   Host              => 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 = <STDIN>;
+   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/(?<![_ ])[aeiou]//g;
+   $text =~ s/(.)\1+/$1/g;
+   return $text;
+}
+
+# collapse_ws {{{3
+# Collapses all whitespace to a single space.
+sub collapse_ws {
+   my ( $text ) = @_;
+   return '' unless defined $text;
+   $text =~ s/\s+/ /g;
+   return $text;
+}
+
+# Strips out non-printable characters within fields, which freak terminals out.
+sub no_ctrl_char {
+   my ( $text ) = @_;
+   return '' unless defined $text;
+   my $charset = $config{charset}->{val};
+   if ( $charset && $charset eq 'unicode' ) {
+      $text =~ s/
+         ("(?:(?!(?<!\\)").)*"  # Double-quoted string
+         |'(?:(?!(?<!\\)').)*') # Or single-quoted string
+         /$1 =~ m#\p{IsC}# ? "[BINARY]" : $1/egx;
+   }
+   elsif ( $charset && $charset eq 'none' ) {
+      $text =~ s/
+         ("(?:(?!(?<!\\)").)*"
+         |'(?:(?!(?<!\\)').)*')
+         /[TEXT]/gx;
+   }
+   else { # The default is 'ascii'
+      $text =~ s/
+         ("(?:(?!(?<!\\)").)*"
+         |'(?:(?!(?<!\\)').)*')
+         /$1 =~ m#[^\040-\176]# ? "[BINARY]" : $1/egx;
+   }
+   return $text;
+}
+
+# word_wrap {{{3
+# Wraps text at word boundaries so it fits the screen.
+sub word_wrap {
+   my ( $text, $width) = @_;
+   $width ||= $this_term_size[0];
+   $text =~ s/(.{0,$width})(?:\s+|$)/$1\n/g;
+   $text =~ s/ +$//mg;
+   return $text;
+}
+
+# draw_screen {{{3
+# Prints lines to the screen.  The first argument is an arrayref.  Each
+# element of the array is either a string or an arrayref.  If it's a string it
+# just gets printed.  If it's an arrayref, the first element is the string to
+# print, and the second is args to colored().
+sub draw_screen {
+   my ( $display_lines, $prefs ) = @_;
+   if ( !$opts{n} && $config{show_statusbar}->{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/(?<!\{|\$)\b([A-Za-z]\w{2,})\b/is_func($1) ? $1 : "\$set->{$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+)='((?:(?!(?<!\\)').)*)'/g; # Properties are single-quoted
+      next unless $parts{text} && $parts{tbls};
+
+      foreach my $prop ( keys %parts ) {
+         # Un-escape escaping
+         $parts{$prop} =~ s/\\\\/\\/g;
+         $parts{$prop} =~ s/\\'/'/g;
+      }
+
+      my ( $sub, $err ) = compile_filter($parts{text});
+      my @tbls = unique(split(/\s+/, $parts{tbls}));
+      @tbls = grep { exists $tbl_meta{$_} } @tbls;
+      $filters{$key} = {
+         func => $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+)='((?:(?!(?<!\\)').)*)'/g; # Properties are single-quoted
+
+      # Each section read from the config file has one extra property: which table it
+      # goes in.
+      my $tbl  = $parts{tbl}     or die "There's no table for tbl_meta $col";
+      my $meta = $tbl_meta{$tbl} or die "There's no table in tbl_meta named $tbl";
+
+      # The section is user-defined by definition (if that makes sense).
+      $parts{user} = 1;
+
+      # The column may already exist in the table, in which case this is just a
+      # customization.
+      $meta->{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+)='((?:(?!(?<!\\)').)*)'/g; # Properties are single-quoted
+      next unless $parts{col} && exists $tbl_meta{$tbl}->{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 <username> -p <password> -h <hostname>
+
+=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<http://dev.mysql.com/doc/en/innodb-monitor.html>).  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<mytop>'s
+query list mode.  This mode does B<not> 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<vmstat>.  The 'g'
+key changes the view to a graph of the same numbers, sort of like B<tload>.
+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<top>-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<http://dbi.perl.org/docs/>, and especially at
+L<http://search.cpan.org/~timb/DBI/DBI.pm>.
+
+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<http://code.google.com/p/innotop/>.  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/mysql-wsrep-5.6/debian/additions/innotop/innotop.1 b/mysql-wsrep-5.6/debian/additions/innotop/innotop.1
new file mode 100644 (file)
index 0000000..b2e7fce
--- /dev/null
@@ -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 <username> \-p <password> \-h <hostname>
+.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 (<http://dev.mysql.com/doc/en/innodb\-monitor.html>).  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 <http://dbi.perl.org/docs/>, and especially at
+<http://search.cpan.org/~timb/DBI/DBI.pm>.
+.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
+<http://code.google.com/p/innotop/>.  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/mysql-wsrep-5.6/debian/additions/my.cnf b/mysql-wsrep-5.6/debian/additions/my.cnf
new file mode 100644 (file)
index 0000000..4df5bd0
--- /dev/null
@@ -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/mysql-wsrep-5.6/debian/additions/my5.6.cnf b/mysql-wsrep-5.6/debian/additions/my5.6.cnf
new file mode 100644 (file)
index 0000000..da49311
--- /dev/null
@@ -0,0 +1,13 @@
+#
+# The MySQL 5.6 database server configuration file.
+#
+# This custom MySQL 5.6 specific configuration file
+# adds on top of the existing default my.cnf file at
+# - /etc/mysql/my.cnf.
+# 
+# Please add any extra MySQL 5.6 options in this file
+# for sake of clarity.
+#
+# You may uncomment any existing option to enable it
+#
+# sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
diff --git a/mysql-wsrep-5.6/debian/additions/mysql-server.lintian-overrides b/mysql-wsrep-5.6/debian/additions/mysql-server.lintian-overrides
new file mode 100644 (file)
index 0000000..9d741cf
--- /dev/null
@@ -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/mysql-wsrep-5.6/debian/additions/mysql_config_pic.1 b/mysql-wsrep-5.6/debian/additions/mysql_config_pic.1
new file mode 100644 (file)
index 0000000..4c9de7b
--- /dev/null
@@ -0,0 +1 @@
+.so man1/mysql_config.1
diff --git a/mysql-wsrep-5.6/debian/additions/mysql_embedded.1 b/mysql-wsrep-5.6/debian/additions/mysql_embedded.1
new file mode 100644 (file)
index 0000000..735c4e0
--- /dev/null
@@ -0,0 +1 @@
+.so man1/mysql.1
diff --git a/mysql-wsrep-5.6/debian/additions/mysqld_safe_syslog.cnf b/mysql-wsrep-5.6/debian/additions/mysqld_safe_syslog.cnf
new file mode 100644 (file)
index 0000000..3b0445d
--- /dev/null
@@ -0,0 +1,2 @@
+[mysqld_safe]
+syslog
diff --git a/mysql-wsrep-5.6/debian/additions/mysqlreport b/mysql-wsrep-5.6/debian/additions/mysqlreport
new file mode 100644 (file)
index 0000000..402a5be
--- /dev/null
@@ -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'} = <STDIN>);
+      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, "</dev/null");
+   open(STDOUT, "> $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(<MYCNF>)
+   {
+      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 $/;  <INFILE> };
+      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(<INFILE>)
+         {
+            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(<INFILE>)
+   {
+      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
+            $_ = <INFILE>; # 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
+            $_ = <INFILE>; # 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}; }
+
+            $_ = <INFILE>; # 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 = <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/mysql-wsrep-5.6/debian/additions/mysqlreport.1 b/mysql-wsrep-5.6/debian/additions/mysqlreport.1
new file mode 100644 (file)
index 0000000..5ae6b9e
--- /dev/null
@@ -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/mysql-wsrep-5.6/debian/apparmor-profile b/mysql-wsrep-5.6/debian/apparmor-profile
new file mode 100644 (file)
index 0000000..04272ac
--- /dev/null
@@ -0,0 +1 @@
+# This file is intensionally empty to disable apparmor by default
diff --git a/mysql-wsrep-5.6/debian/changelog b/mysql-wsrep-5.6/debian/changelog
new file mode 100644 (file)
index 0000000..0b2f759
--- /dev/null
@@ -0,0 +1,5 @@
+mysql-wsrep-5.6 (5.6.30-25.15-1) UNRELEASED; urgency=low
+
+  * Bump version numbers
+
+ -- Otto Kekäläinen <otto@seravo.fi>  Wed, 22 Jun 2016 11:58:20 +0300
diff --git a/mysql-wsrep-5.6/debian/clean b/mysql-wsrep-5.6/debian/clean
new file mode 100644 (file)
index 0000000..16b91f4
--- /dev/null
@@ -0,0 +1,2 @@
+debian/libmysqlclient18.links
+debian/libmysqlclient-dev.links
diff --git a/mysql-wsrep-5.6/debian/compat b/mysql-wsrep-5.6/debian/compat
new file mode 100644 (file)
index 0000000..ec63514
--- /dev/null
@@ -0,0 +1 @@
+9
diff --git a/mysql-wsrep-5.6/debian/control b/mysql-wsrep-5.6/debian/control
new file mode 100644 (file)
index 0000000..7385d8d
--- /dev/null
@@ -0,0 +1,159 @@
+Source: mysql-wsrep-5.6
+Section: database
+Priority: optional
+Maintainer: Codership Oy <info@codership.com>
+Build-Depends: bison,
+               chrpath,
+               cmake,
+               debhelper (>= 8.1.3~),
+               dh-apparmor,
+               dpkg-dev (>= 1.16.1~),
+               libaio-dev[linux-any],
+               libedit-dev,
+               libncurses5-dev (>= 5.0-6),
+               libwrap0-dev (>= 7.6-8.3),
+               lsb-release,
+               perl,
+               po-debconf,
+               psmisc,
+               zlib1g-dev (>= 1:1.1.3-5),
+               libssl-dev
+Standards-Version: 3.9.3
+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
+Section: libs
+Architecture: any
+Depends: mysql-wsrep-common-5.6, ${misc:Depends}, ${shlibs: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
+ 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: mysql-wsrep-libmysqlclient-dev
+Architecture: any
+Section: libdevel
+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
+ 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-wsrep-common-5.6
+Architecture: all
+Depends: ${misc:Depends}, ${shlibs:Depends}
+Multi-Arch: foreign
+Provides: mysql-common, mysql-common-5.6
+Replaces: mysql-common, mysql-common-5.6
+Description: MySQL 5.6 specific common files, e.g. /etc/mysql/conf.d/my-5.6.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 also includes files needed by all versions of the client library,
+ e.g. /etc/mysql/my.cnf.
+
+Package: mysql-wsrep-client-5.6
+Architecture: any
+Depends: debianutils (>=1.6),
+         mysql-wsrep-common-5.6,
+         mysql-wsrep-libmysqlclient18,
+         ${misc:Depends},
+         ${perl:Depends},
+         ${shlibs:Depends}
+Provides: virtual-mysql-client
+Breaks: mysql-client-5.5,
+        mysql-client-5.6,
+        mysql-client-core-5.5,
+        mysql-client-core-5.6,
+        virtual-mysql-client
+Replaces: mysql-client-5.5,
+          mysql-client-5.6,
+          mysql-client-core-5.5,
+          mysql-client-core-5.6,
+          virtual-mysql-client
+Recommends: libdbd-mysql-perl (>= 1.2202),
+            libdbi-perl,
+            libterm-readkey-perl
+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-wsrep-server-5.6
+Architecture: any
+Recommends: libhtml-template-perl
+Suggests: mailx, tinyca
+Pre-Depends: adduser (>= 3.40), debconf, mysql-wsrep-common-5.6
+Depends: initscripts,
+         libdbi-perl,
+         lsb-base (>= 3.0-10),
+         lsof,
+         mysql-wsrep-client-5.6 (>= ${binary:Version}),
+         passwd,
+         perl (>= 5.6),
+         psmisc,
+         rsync,
+         socat,
+         ${misc:Depends},
+         ${shlibs:Depends}
+Provides: virtual-mysql-server
+Breaks: mysql-server-5.5,
+        mysql-server-5.6,
+        mysql-server-core-5.5,
+        mysql-server-core-5.6,
+        virtual-mysql-server
+Replaces: mysql-server-5.5, mysql-server-5.6, virtual-mysql-server
+Description: MySQL database wsrep 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-wsrep-testsuite-5.6
+Architecture: any
+Depends: mysql-wsrep-client-5.6 (= ${binary:Version}),
+         mysql-wsrep-server-5.6 (= ${binary:Version}),
+         python,
+         ${misc:Depends},
+         ${shlibs:Depends}
+Provides: virtual-mysql-testsuite
+Breaks: mysql-testsuite-5.5, mysql-testsuite-5.6, virtual-mysql-testsuite
+Replaces: mysql-testsuite-5.5, mysql-testsuite-5.6, virtual-mysql-testsuite
+Description: MySQL 5.6 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-wsrep-5.6
+Architecture: any
+Depends: mysql-wsrep-client-5.6 (= ${binary:Version}),
+         mysql-wsrep-server-5.6 (= ${binary:Version}),
+         ${misc:Depends}
+Description: Metapackage that installs mysql-wsrep client and server packages.
diff --git a/mysql-wsrep-5.6/debian/copyright b/mysql-wsrep-5.6/debian/copyright
new file mode 100644 (file)
index 0000000..73f971f
--- /dev/null
@@ -0,0 +1,773 @@
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: MySQL 5.6
+Upstream-Contact: http://bugs.mysql.com/
+Source: http://dev.mysql.com/downloads/mysql/5.6.html
+Comments:
+ The file Docs/mysql.info is removed from the upstream source
+ because it is incompatible with the Debian Free Software Guidelines.
+ See debian/README.source for how this repacking was done.
+ .
+ Originally produced by a modified version of licensecheck2dep5
+ from CDBS by Clint Byrum <clint@ubuntu.com>. 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
+ <http://www.mysql.com/about/legal/licensing/foss-exception.html>.
+ .
+ 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 affiliates.
+
+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/*
+ Docs/*
+ 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: public-domain
+ 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.,
+ 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, 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 <Todd.Miller@courtesan.com>
+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: public-domain
+ 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: public-domain
+ 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.,
+ 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, 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 <thep@links.nectec.or.th>
+ 1989-1991 Samphan Raruenrom <samphan@thai.com>
+ 2000-2010 Oracle and/or its affiliates.
+ 2003 Sathit Jittanupat
+ 2001 Korakot Chaovavanich <korakot@iname.com> and
+ 1998-1999 Pruet Boonma <pruet@eng.cmu.ac.th>
+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: public-domain
+ This file is public domain and comes with NO WARRANTY of any kind
+
+Files: dbug/dbug_analyze.c
+Copyright: 1987 June Binayak Banerjee
+License: public-domain
+ 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/mysql-wsrep-5.6/debian/gbp.conf b/mysql-wsrep-5.6/debian/gbp.conf
new file mode 100644 (file)
index 0000000..e69ccf8
--- /dev/null
@@ -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
+upstream-tree = branch
+pristine-tar = False
diff --git a/mysql-wsrep-5.6/debian/libmysqld-dev.install b/mysql-wsrep-5.6/debian/libmysqld-dev.install
new file mode 100644 (file)
index 0000000..f050094
--- /dev/null
@@ -0,0 +1 @@
+usr/lib/*/libmysqlservices.a
diff --git a/mysql-wsrep-5.6/debian/libmysqld-pic.README.Debian b/mysql-wsrep-5.6/debian/libmysqld-pic.README.Debian
new file mode 100644 (file)
index 0000000..4ec22b7
--- /dev/null
@@ -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/mysql-wsrep-5.6/debian/libmysqld-pic.install b/mysql-wsrep-5.6/debian/libmysqld-pic.install
new file mode 100644 (file)
index 0000000..7ff38b3
--- /dev/null
@@ -0,0 +1,2 @@
+usr/bin/mysql_config_pic
+usr/lib/mysql/libmysqld_pic.a
diff --git a/mysql-wsrep-5.6/debian/libmysqld-pic.manpages b/mysql-wsrep-5.6/debian/libmysqld-pic.manpages
new file mode 100644 (file)
index 0000000..3e2e2b2
--- /dev/null
@@ -0,0 +1 @@
+debian/tmp/usr/share/man/man1/mysql_config_pic.1
diff --git a/mysql-wsrep-5.6/debian/mysql-server-5.6.py b/mysql-wsrep-5.6/debian/mysql-server-5.6.py
new file mode 100644 (file)
index 0000000..3888c05
--- /dev/null
@@ -0,0 +1,52 @@
+'''apport package hook for mysql-5.6
+
+(c) 2009 Canonical Ltd.
+Author: Mathias Gug <mathias.gug@canonical.com>
+'''
+
+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')
+    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'] = 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/mysql-wsrep-5.6/debian/mysql-wsrep-client-5.6.README.Debian b/mysql-wsrep-5.6/debian/mysql-wsrep-client-5.6.README.Debian
new file mode 100644 (file)
index 0000000..b245638
--- /dev/null
@@ -0,0 +1,4 @@
+FAQ:
+
+Q: My <tab> completition is gone, why?
+A: You have "no-auto-rehash" in the "[mysql]" section of /etc/mysql/my.cnf!
diff --git a/mysql-wsrep-5.6/debian/mysql-wsrep-client-5.6.dirs b/mysql-wsrep-5.6/debian/mysql-wsrep-client-5.6.dirs
new file mode 100644 (file)
index 0000000..ceda592
--- /dev/null
@@ -0,0 +1,3 @@
+usr/bin/
+usr/share/man/man1/
+usr/share/perl5/
diff --git a/mysql-wsrep-5.6/debian/mysql-wsrep-client-5.6.docs b/mysql-wsrep-5.6/debian/mysql-wsrep-client-5.6.docs
new file mode 100644 (file)
index 0000000..2144685
--- /dev/null
@@ -0,0 +1,2 @@
+debian/additions/innotop/changelog.innotop
+README
diff --git a/mysql-wsrep-5.6/debian/mysql-wsrep-client-5.6.examples b/mysql-wsrep-5.6/debian/mysql-wsrep-client-5.6.examples
new file mode 100644 (file)
index 0000000..ef08ce1
--- /dev/null
@@ -0,0 +1 @@
+debian/tmp/usr/bin/mysqlaccess.conf
diff --git a/mysql-wsrep-5.6/debian/mysql-wsrep-client-5.6.install b/mysql-wsrep-5.6/debian/mysql-wsrep-client-5.6.install
new file mode 100644 (file)
index 0000000..29fd8df
--- /dev/null
@@ -0,0 +1,21 @@
+# 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_client_test
+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/mysql-wsrep-5.6/debian/mysql-wsrep-client-5.6.links b/mysql-wsrep-5.6/debian/mysql-wsrep-client-5.6.links
new file mode 100644 (file)
index 0000000..0b86e87
--- /dev/null
@@ -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/mysql-wsrep-5.6/debian/mysql-wsrep-client-5.6.lintian-overrides b/mysql-wsrep-5.6/debian/mysql-wsrep-client-5.6.lintian-overrides
new file mode 100644 (file)
index 0000000..0b99bae
--- /dev/null
@@ -0,0 +1,9 @@
+# Will look at man pages later 
+# 2012-03-08 periapt
+# still no update
+# 2012-01-09 jesusch-guest
+mysql-client-5.6: binary-without-manpage usr/bin/innochecksum
+# These long lines reproduce actual output and to reformat them
+# would damage the integrity of the man page.
+mysql-client-5.6: manpage-has-errors-from-man usr/share/man/man1/mysqladmin.1.gz 28: warning [p 1, 1.5i]: can't break line
+mysql-client-5.6: manpage-has-errors-from-man usr/share/man/man1/mysqldump.1.gz 2151: warning [p 12, 6.5i, div `3tbd2,1', 0.2i]: can't break line
diff --git a/mysql-wsrep-5.6/debian/mysql-wsrep-client-5.6.manpages b/mysql-wsrep-5.6/debian/mysql-wsrep-client-5.6.manpages
new file mode 100644 (file)
index 0000000..2458e1f
--- /dev/null
@@ -0,0 +1,4 @@
+debian/additions/innotop/innotop.1
+debian/tmp/usr/share/man/man1/mysqlman.1
+debian/additions/mysqlreport.1
+debian/tmp/usr/share/man/man1/mysql_embedded.1
diff --git a/mysql-wsrep-5.6/debian/mysql-wsrep-common-5.6.dirs b/mysql-wsrep-5.6/debian/mysql-wsrep-common-5.6.dirs
new file mode 100644 (file)
index 0000000..a5a88ed
--- /dev/null
@@ -0,0 +1 @@
+etc/mysql/conf.d/
diff --git a/mysql-wsrep-5.6/debian/mysql-wsrep-common-5.6.install b/mysql-wsrep-5.6/debian/mysql-wsrep-common-5.6.install
new file mode 100644 (file)
index 0000000..9ead641
--- /dev/null
@@ -0,0 +1,2 @@
+debian/additions/my.cnf etc/mysql/
+debian/additions/my5.6.cnf etc/mysql/conf.d/
diff --git a/mysql-wsrep-5.6/debian/mysql-wsrep-common-5.6.postrm b/mysql-wsrep-5.6/debian/mysql-wsrep-common-5.6.postrm
new file mode 100644 (file)
index 0000000..8b12d46
--- /dev/null
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+set -e
+
+if [ "$1" = "purge" ]; then
+  rmdir /etc/mysql 2>/dev/null || true
+fi
+
+#DEBHELPER#
diff --git a/mysql-wsrep-5.6/debian/mysql-wsrep-libmysqlclient-dev.README.Maintainer b/mysql-wsrep-5.6/debian/mysql-wsrep-libmysqlclient-dev.README.Maintainer
new file mode 100644 (file)
index 0000000..f24cdcd
--- /dev/null
@@ -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/mysql-wsrep-5.6/debian/mysql-wsrep-libmysqlclient-dev.dirs b/mysql-wsrep-5.6/debian/mysql-wsrep-libmysqlclient-dev.dirs
new file mode 100644 (file)
index 0000000..f6ad287
--- /dev/null
@@ -0,0 +1,2 @@
+usr/include/
+usr/lib/
diff --git a/mysql-wsrep-5.6/debian/mysql-wsrep-libmysqlclient-dev.examples b/mysql-wsrep-5.6/debian/mysql-wsrep-libmysqlclient-dev.examples
new file mode 100644 (file)
index 0000000..80a749f
--- /dev/null
@@ -0,0 +1 @@
+sql/udf_example.cc
diff --git a/mysql-wsrep-5.6/debian/mysql-wsrep-libmysqlclient-dev.install b/mysql-wsrep-5.6/debian/mysql-wsrep-libmysqlclient-dev.install
new file mode 100644 (file)
index 0000000..769007d
--- /dev/null
@@ -0,0 +1,7 @@
+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/share/aclocal/mysql.m4
diff --git a/mysql-wsrep-5.6/debian/mysql-wsrep-libmysqlclient-dev.manpages b/mysql-wsrep-5.6/debian/mysql-wsrep-libmysqlclient-dev.manpages
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/mysql-wsrep-5.6/debian/mysql-wsrep-libmysqlclient18.dirs b/mysql-wsrep-5.6/debian/mysql-wsrep-libmysqlclient18.dirs
new file mode 100644 (file)
index 0000000..2964de6
--- /dev/null
@@ -0,0 +1 @@
+usr/lib/
diff --git a/mysql-wsrep-5.6/debian/mysql-wsrep-libmysqlclient18.install b/mysql-wsrep-5.6/debian/mysql-wsrep-libmysqlclient18.install
new file mode 100644 (file)
index 0000000..0feb497
--- /dev/null
@@ -0,0 +1,2 @@
+usr/lib/*/libmysqlclient.so.18*
+usr/lib/*/libmysqlclient_r.so.18*
diff --git a/mysql-wsrep-5.6/debian/mysql-wsrep-libmysqlclient18.lintian-overrides b/mysql-wsrep-5.6/debian/mysql-wsrep-libmysqlclient18.lintian-overrides
new file mode 100644 (file)
index 0000000..7aff544
--- /dev/null
@@ -0,0 +1,3 @@
+# I take this issue seriously but as per bug #590905
+# it will need playing with in experimental. - periapt
+libmysqlclient18: no-symbols-control-file usr/lib/i386-linux-gnu/libmysqlclient.so.18.1.0
diff --git a/mysql-wsrep-5.6/debian/mysql-wsrep-server-5.6.NEWS b/mysql-wsrep-5.6/debian/mysql-wsrep-server-5.6.NEWS
new file mode 100644 (file)
index 0000000..44baefe
--- /dev/null
@@ -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 <ch@debian.org>  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 <mordred@inaugust.com>  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 <norbert@tretkowski.de>  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 <ch@debian.org>  Tue, 24 Jan 2006 22:18:21 +0100
diff --git a/mysql-wsrep-5.6/debian/mysql-wsrep-server-5.6.README.Debian b/mysql-wsrep-5.6/debian/mysql-wsrep-server-5.6.README.Debian
new file mode 100644 (file)
index 0000000..741243f
--- /dev/null
@@ -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/mysql-wsrep-5.6/debian/mysql-wsrep-server-5.6.config b/mysql-wsrep-5.6/debian/mysql-wsrep-server-5.6.config
new file mode 100644 (file)
index 0000000..c2f016e
--- /dev/null
@@ -0,0 +1,48 @@
+#!/bin/bash
+
+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 }
+
+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.6/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/mysql-wsrep-5.6/debian/mysql-wsrep-server-5.6.dirs b/mysql-wsrep-5.6/debian/mysql-wsrep-server-5.6.dirs
new file mode 100644 (file)
index 0000000..6c3fdac
--- /dev/null
@@ -0,0 +1,8 @@
+etc/init.d
+etc/logrotate.d
+etc/mysql/conf.d
+usr/bin
+usr/share/mysql
+var/lib/mysql-upgrade
+usr/sbin
+usr/share/man/man8
diff --git a/mysql-wsrep-5.6/debian/mysql-wsrep-server-5.6.examples b/mysql-wsrep-5.6/debian/mysql-wsrep-server-5.6.examples
new file mode 100644 (file)
index 0000000..219e7bc
--- /dev/null
@@ -0,0 +1,3 @@
+debian/tmp/usr/share/mysql/wsrep.cnf
+debian/tmp/usr/share/mysql/magic
+debian/tmp/usr/lib/mysql/plugin/daemon_example.ini
diff --git a/mysql-wsrep-5.6/debian/mysql-wsrep-server-5.6.install b/mysql-wsrep-5.6/debian/mysql-wsrep-server-5.6.install
new file mode 100644 (file)
index 0000000..eb40f0b
--- /dev/null
@@ -0,0 +1,100 @@
+#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
+debian/additions/mysqld_safe_syslog.cnf etc/mysql/conf.d/
+etc/apparmor.d/usr.sbin.mysqld
+etc/init.d/mysql
+etc/mysql/debian-start
+usr/bin/msql2mysql
+usr/bin/my_print_defaults
+usr/bin/myisamchk
+usr/bin/myisamlog
+usr/bin/myisampack
+usr/bin/mysql_convert_table_format
+usr/bin/mysql_install_db
+usr/bin/mysql_secure_installation
+usr/bin/mysql_setpermission
+usr/bin/mysql_tzinfo_to_sql
+usr/bin/mysql_upgrade
+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/bin/wsrep_sst_common
+usr/bin/wsrep_sst_mysqldump
+usr/bin/wsrep_sst_rsync
+usr/bin/wsrep_sst_xtrabackup
+usr/lib/mysql/plugin/*.so
+usr/sbin/mysqld
+usr/sbin/mysqld
+usr/share/doc/mysql-server-5.6/
+usr/share/mysql/bulgarian
+usr/share/mysql/charsets
+usr/share/mysql/charsets
+usr/share/mysql/czech
+usr/share/mysql/czech
+usr/share/mysql/danish
+usr/share/mysql/danish
+usr/share/mysql/debian-start.inc.sh
+usr/share/mysql/debian_create_root_user.sql
+usr/share/mysql/dictionary.txt
+usr/share/mysql/dutch
+usr/share/mysql/dutch
+usr/share/mysql/echo_stderr
+usr/share/mysql/english
+usr/share/mysql/english
+usr/share/mysql/errmsg-utf8.txt
+usr/share/mysql/estonian
+usr/share/mysql/estonian
+usr/share/mysql/fill_help_tables.sql
+usr/share/mysql/french
+usr/share/mysql/french
+usr/share/mysql/german
+usr/share/mysql/german
+usr/share/mysql/greek
+usr/share/mysql/greek
+usr/share/mysql/hungarian
+usr/share/mysql/hungarian
+usr/share/mysql/innodb_memcached_config.sql
+usr/share/mysql/italian
+usr/share/mysql/italian
+usr/share/mysql/japanese
+usr/share/mysql/japanese
+usr/share/mysql/korean
+usr/share/mysql/korean
+usr/share/mysql/mysql_security_commands.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/norwegian
+usr/share/mysql/norwegian
+usr/share/mysql/norwegian-ny
+usr/share/mysql/norwegian-ny
+usr/share/mysql/polish
+usr/share/mysql/polish
+usr/share/mysql/portuguese
+usr/share/mysql/portuguese
+usr/share/mysql/romanian
+usr/share/mysql/romanian
+usr/share/mysql/russian
+usr/share/mysql/russian
+usr/share/mysql/serbian
+usr/share/mysql/serbian
+usr/share/mysql/slovak
+usr/share/mysql/slovak
+usr/share/mysql/spanish
+usr/share/mysql/spanish
+usr/share/mysql/swedish
+usr/share/mysql/swedish
+usr/share/mysql/ukrainian
+usr/share/mysql/ukrainian
+usr/share/mysql/wsrep.cnf
+usr/share/mysql/my-default.cnf
diff --git a/mysql-wsrep-5.6/debian/mysql-wsrep-server-5.6.lintian-overrides b/mysql-wsrep-5.6/debian/mysql-wsrep-server-5.6.lintian-overrides
new file mode 100644 (file)
index 0000000..a0e6f63
--- /dev/null
@@ -0,0 +1,5 @@
+# These long lines reproduce actual output and to reformat them
+# would damage the integrity of the man page.
+# mysql-server-5.6: manpage-has-errors-from-man usr/share/man/man1/mysqlbinlog.1.gz 1405: warning [p 9, 7.5i, div `3tbd3,2', 0.8i]: can't break line
+# These are random occurrences of a pseudo word in a binary.
+mysql-server-5.6: spelling-error-in-binary usr/sbin/mysqld yuR your
diff --git a/mysql-wsrep-5.6/debian/mysql-wsrep-server-5.6.logcheck.ignore.paranoid b/mysql-wsrep-5.6/debian/mysql-wsrep-server-5.6.logcheck.ignore.paranoid
new file mode 100644 (file)
index 0000000..00cc5c3
--- /dev/null
@@ -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/mysql-wsrep-5.6/debian/mysql-wsrep-server-5.6.logcheck.ignore.server b/mysql-wsrep-5.6/debian/mysql-wsrep-server-5.6.logcheck.ignore.server
new file mode 100644 (file)
index 0000000..37f25cb
--- /dev/null
@@ -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/mysql-wsrep-5.6/debian/mysql-wsrep-server-5.6.logcheck.ignore.workstation b/mysql-wsrep-5.6/debian/mysql-wsrep-server-5.6.logcheck.ignore.workstation
new file mode 100644 (file)
index 0000000..37f25cb
--- /dev/null
@@ -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/mysql-wsrep-5.6/debian/mysql-wsrep-server-5.6.manpages b/mysql-wsrep-5.6/debian/mysql-wsrep-server-5.6.manpages
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/mysql-wsrep-5.6/debian/mysql-wsrep-server-5.6.mysql-server.logrotate b/mysql-wsrep-5.6/debian/mysql-wsrep-server-5.6.mysql-server.logrotate
new file mode 100644 (file)
index 0000000..2d9c71a
--- /dev/null
@@ -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/mysql-wsrep-5.6/debian/mysql-wsrep-server-5.6.mysql.upstart.disabled b/mysql-wsrep-5.6/debian/mysql-wsrep-server-5.6.mysql.upstart.disabled
new file mode 100644 (file)
index 0000000..a9247a0
--- /dev/null
@@ -0,0 +1,63 @@
+description     "MySQL 5.6 Server"
+author          "Mario Limonciello <superm1@ubuntu.com>"
+
+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/mysql-wsrep-5.6/debian/mysql-wsrep-server-5.6.postinst b/mysql-wsrep-5.6/debian/mysql-wsrep-server-5.6.postinst
new file mode 100644 (file)
index 0000000..18d4e3d
--- /dev/null
@@ -0,0 +1,241 @@
+#!/bin/bash
+
+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
+
+# 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 >/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
+    mysql_cfgdir=/etc/mysql
+    mysql_upgradedir=/var/lib/mysql-upgrade
+    mysql_filesdir=/var/lib/mysql-files
+
+    # Ensure the existence and right permissions for the database and
+    # log files.
+
+    # MySQL 5.6.34 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_logdir"         -a ! -L "$mysql_logdir"         ]; then mkdir "$mysql_logdir"; 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
+    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-server/postrm_remove_database false || true
+
+    # To avoid downgrades.
+    touch $mysql_statedir/debian-5.6.flag
+
+    # initiate databases. Output is not allowed by debconf :-(
+    # Debian: can safely run on upgrades with existing databases 
+
+    set +e
+    tfile_select_db=`mktemp`
+    echo "USE mysql;" > $tfile_select_db
+    MYSQL_EXTRA_OPTS=" --default-storage-engine=myisam --lc-messages-dir=/usr/share/mysql/english/.."
+    MYSQL_CMDLINE=$MYSQL_BOOTSTRAP$MYSQL_EXTRA_OPTS
+    cat $tfile_select_db $mysql_datadir/mysql_system_tables.sql $mysql_datadir/debian_create_root_user.sql $mysql_datadir/fill_help_tables.sql | $MYSQL_CMDLINE 2>&1 | $ERR_LOGGER
+    rm $tfile_select_db
+    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
+
+    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'; "`;
+    # 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 IF NOT EXISTS 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');" `
+
+    db_get mysql-server/root_password && rootpw="$RET"
+    if ! set_mysql_rootpw; then
+        password_error="yes"
+    fi
+
+    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/mysql-wsrep-5.6/debian/mysql-wsrep-server-5.6.postrm b/mysql-wsrep-5.6/debian/mysql-wsrep-server-5.6.postrm
new file mode 100644 (file)
index 0000000..70c6fb5
--- /dev/null
@@ -0,0 +1,79 @@
+#!/bin/bash
+
+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 }
+
+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.6/postrm_remove_databases || true
+  db_go || true
+  db_get mysql-server-5.6/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
+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/mysql-wsrep-5.6/debian/mysql-wsrep-server-5.6.preinst b/mysql-wsrep-5.6/debian/mysql-wsrep-server-5.6.preinst
new file mode 100644 (file)
index 0000000..320c748
--- /dev/null
@@ -0,0 +1,185 @@
+#!/bin/bash
+#
+# summary of how this script can be called:
+#        * <new-preinst> install
+#        * <new-preinst> install <old-version>
+#        * <new-preinst> upgrade <old-version>
+#        * <old-preinst> abort-upgrade <new-version>
+#
+
+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
+
+# 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.6
+
+# 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 <<EOT
+6691f2fdc5c6d27ff0260eb79813e1bc  /etc/init.d/mysql
+b53b9552d44661361d39157c3c7c51d3  /etc/logrotate.d/mysql-server
+57f3e58f72582ca55100dc1ba0f1a8ae  /etc/mysql/debian-start
+EOT
+
+db_stop
+
+#DEBHELPER#
+
+exit 0
diff --git a/mysql-wsrep-5.6/debian/mysql-wsrep-server-5.6.prerm b/mysql-wsrep-5.6/debian/mysql-wsrep-server-5.6.prerm
new file mode 100644 (file)
index 0000000..0371bbf
--- /dev/null
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+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/mysql-wsrep-5.6/debian/mysql-wsrep-server-5.6.templates b/mysql-wsrep-5.6/debian/mysql-wsrep-server-5.6.templates
new file mode 100644 (file)
index 0000000..3e72c90
--- /dev/null
@@ -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.6/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.6/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.6/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.6/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.6/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.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/.
diff --git a/mysql-wsrep-5.6/debian/mysql-wsrep-testsuite-5.6.dirs b/mysql-wsrep-5.6/debian/mysql-wsrep-testsuite-5.6.dirs
new file mode 100644 (file)
index 0000000..e637692
--- /dev/null
@@ -0,0 +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
diff --git a/mysql-wsrep-5.6/debian/mysql-wsrep-testsuite-5.6.install b/mysql-wsrep-5.6/debian/mysql-wsrep-testsuite-5.6.install
new file mode 100644 (file)
index 0000000..ccadd9f
--- /dev/null
@@ -0,0 +1 @@
+usr/share/mysql-test/* usr/lib/mysql-testsuite/
diff --git a/mysql-wsrep-5.6/debian/mysql-wsrep-testsuite-5.6.lintian-overrides b/mysql-wsrep-5.6/debian/mysql-wsrep-testsuite-5.6.lintian-overrides
new file mode 100644 (file)
index 0000000..e94549f
--- /dev/null
@@ -0,0 +1,4 @@
+# These are random occurrences of a pseudo word in a binary.
+mysql-testsuite-5.6: spelling-error-in-binary usr/bin/mysql_client_test_embedded yuR your
+mysql-testsuite-5.6: spelling-error-in-binary usr/bin/mysql_embedded yuR your
+mysql-testsuite-5.6: spelling-error-in-binary usr/bin/mysqltest_embedded yuR your
diff --git a/mysql-wsrep-5.6/debian/patches/fix_standalone_tests.patch b/mysql-wsrep-5.6/debian/patches/fix_standalone_tests.patch
new file mode 100644 (file)
index 0000000..faedcc4
--- /dev/null
@@ -0,0 +1,17 @@
+From: Clint Byrum <clint@ubuntu.com>
+Description: makes mtr look in the standard location from the 
+ mysql-testsuite-5.5 package.
+Forwarded: not-needed
+
+--- a/mysql-test/lib/mtr_cases.pm
++++ b/mysql-test/lib/mtr_cases.pm
+@@ -287,7 +287,8 @@ sub collect_one_suite($)
+     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/mysql-wsrep-5.6/debian/patches/hurd.patch b/mysql-wsrep-5.6/debian/patches/hurd.patch
new file mode 100644 (file)
index 0000000..b64feeb
--- /dev/null
@@ -0,0 +1,41 @@
+Author: Pino Toscano <pino@debian.org>
+Subject: cmake options for GNU/Hurd
+Bug: http://bugs.mysql.com/bug.php?id=64685
+Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=651002
+Last-Update: 2012-03-18
+Reviewed-by: Nicholas Bamber <nicholas@periapt.co.uk>
+--- /dev/null
++++ b/cmake/os/GNU.cmake
+@@ -0,0 +1,20 @@
++# This file includes GNU/Hurd specific options and quirks, related to system checks
++
++INCLUDE(CheckSymbolExists)
++
++SET(_GNU_SOURCE 1)
++
++# Fix CMake (< 2.8) flags. -rdynamic exports too many symbols.
++FOREACH(LANG C CXX)
++  STRING(REPLACE "-rdynamic" ""
++  CMAKE_SHARED_LIBRARY_LINK_${LANG}_FLAGS
++  "${CMAKE_SHARED_LIBRARY_LINK_${LANG}_FLAGS}"
++  )
++ENDFOREACH()
++
++# Ensure we have clean build for shared libraries
++# without unresolved symbols
++SET(LINK_FLAG_NO_UNDEFINED "-Wl,--no-undefined")
++
++# 64 bit file offset support flag
++SET(_FILE_OFFSET_BITS 64)
+--- a/mysql-test/lib/My/Platform.pm
++++ b/mysql-test/lib/My/Platform.pm
+@@ -110,6 +110,9 @@ sub check_socket_path_length {
+   # This may not be true, but we can't test for it on AIX due to Perl bug
+   # See Bug #45771
+   return 0 if ($^O eq 'aix');
++  # Similarly the path length is hidden.
++  # See Debian bug #651002
++  return 0 if ($^O eq 'gnu');
+   require IO::Socket::UNIX;
diff --git a/mysql-wsrep-5.6/debian/patches/kfreebsd_tests.patch b/mysql-wsrep-5.6/debian/patches/kfreebsd_tests.patch
new file mode 100644 (file)
index 0000000..981e0a9
--- /dev/null
@@ -0,0 +1,18 @@
+Author: Nicholas Bamber <nicholas@periapt.co.uk>
+Debian-Bug: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=540153
+Subject: tests not getting started on kFreeBSD
+ As per #670722 I found that the test socket created to test
+ file name truncation was barfing even for the shortened form.
+Forwarded: no
+Last-Update: 2012-04-28
+--- a/mysql-test/lib/My/Platform.pm
++++ b/mysql-test/lib/My/Platform.pm
+@@ -113,6 +113,8 @@ sub check_socket_path_length {
+   # Similarly the path length is hidden.
+   # See Debian bug #651002
+   return 0 if ($^O eq 'gnu');
++  # See Debian bug #670722 - failing on kFreeBSD even after setting short path
++  return 0 if length $path < 40;
+   require IO::Socket::UNIX;
diff --git a/mysql-wsrep-5.6/debian/patches/scripts__mysqld_safe.sh__signals.patch b/mysql-wsrep-5.6/debian/patches/scripts__mysqld_safe.sh__signals.patch
new file mode 100644 (file)
index 0000000..984fd8c
--- /dev/null
@@ -0,0 +1,45 @@
+Author: Christian Hammers  <ch@debian.org>
+Subject: Executes /etc/init.d/mysql on signals
+ Note if you check the bug report on mysql.com the patch is accepted
+ as interesting but they were waiting on Christian Hammers to sign an SCA.
+ Meanwhile this bug report fell off in the transition from 5.0 to 5.1.
+Bug: http://bugs.mysql.com/bug.php?id=31361
+Debian-Bug: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=527623
+Last-Update: 2012-03-07
+Reviewed-by: Nicholas Bamber <nicholas@periapt.co.uk>
+
+--- a/scripts/mysqld_safe.sh
++++ b/scripts/mysqld_safe.sh
+@@ -29,9 +29,6 @@ err_log=
+ syslog_tag_mysqld=mysqld
+ syslog_tag_mysqld_safe=mysqld_safe
+-trap '' 1 2 3 15                      # we shouldn't let anyone kill us
+-trap '' 13                              # not even SIGPIPE
+-
+ # 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,
+@@ -154,7 +151,7 @@ eval_log_error () {
+       # 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):" \
+@@ -815,6 +815,13 @@ mysqld daemon not started"
+ 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/mysql-wsrep-5.6/debian/patches/series b/mysql-wsrep-5.6/debian/patches/series
new file mode 100644 (file)
index 0000000..08ed2f9
--- /dev/null
@@ -0,0 +1,4 @@
+hurd.patch
+scripts__mysqld_safe.sh__signals.patch
+fix_standalone_tests.patch
+kfreebsd_tests.patch
diff --git a/mysql-wsrep-5.6/debian/patches/spelling.patch b/mysql-wsrep-5.6/debian/patches/spelling.patch
new file mode 100644 (file)
index 0000000..7b7b8d1
--- /dev/null
@@ -0,0 +1,249 @@
+Author <nicholas@periapt.co.uk>
+Subject: spelling errors
+ Preceeding -> preceding
+Last-Update: 2012-05-19
+Forwarded: no
+--- a/libevent/event.3
++++ b/libevent/event.3
+@@ -253,7 +253,7 @@ the type of event which will be either
+ or
+ .Va EV_WRITE .
+ Additionally, an event which has registered interest in more than one of the
+-preceeding events, via bitwise-OR to
++preceding events, via bitwise-OR to
+ .Fn event_set ,
+ can provide its callback function with a bitwise-OR of more than one triggered
+ event.
+--- a/mysql-test/extra/rpl_tests/rpl_ddl.test
++++ b/mysql-test/extra/rpl_tests/rpl_ddl.test
+@@ -98,8 +98,8 @@
+ #       --> less switching of AUTOCOMMIT mode on master side.
+ #
+ #    4. Never use a test object, which was direct or indirect affected by a
+-#       preceeding test sequence again.
+-#       If one preceeding test sequence hits a (sometimes not visible,
++#       preceding test sequence again.
++#       If one preceding test sequence hits a (sometimes not visible,
+ #       because the sql error code of the statement might be 0) bug
+ #       and these rules are ignored, a following test sequence might earn ugly
+ #       effects like failing 'sync_slave_with_master', crashes of the slave or
+--- a/mysql-test/extra/rpl_tests/rpl_row_basic.test
++++ b/mysql-test/extra/rpl_tests/rpl_row_basic.test
+@@ -221,7 +221,7 @@ INSERT INTO t7 VALUES (1,3), (2,6), (3,9
+ SELECT * FROM t7 ORDER BY C1;
+ # since bug#31552/31609 idempotency is not default any longer. In order
+-# the preceeding test INSERT INTO t7 to pass the mode is switched
++# the preceding test INSERT INTO t7 to pass the mode is switched
+ # temprorarily
+ set @@global.slave_exec_mode= 'IDEMPOTENT';
+@@ -260,7 +260,7 @@ INSERT INTO t8 VALUES (1,2,3), (2,4,6),
+ SELECT * FROM t8 ORDER BY a;
+ # since bug#31552/31609 idempotency is not default any longer. In order
+-# the preceeding test INSERT INTO t8 to pass the mode is switched
++# the preceding test INSERT INTO t8 to pass the mode is switched
+ # temprorarily
+ set @@global.slave_exec_mode= 'IDEMPOTENT';
+--- a/mysql-test/include/wait_until_count_sessions.inc
++++ b/mysql-test/include/wait_until_count_sessions.inc
+@@ -10,7 +10,7 @@
+ #    1. We wait for $current_sessions <= $count_sessions because in the use case
+ #       with count_sessions.inc before and wait_until_count_sessions.inc after
+ #       the core of the test it could happen that the disconnects of sessions
+-#       belonging to the preceeding test are not finished.
++#       belonging to the preceding test are not finished.
+ #       sessions at test begin($count_sessions) =  m + n
+ #       sessions of the previous test which will be soon disconnected = n (n >= 0)
+ #       sessions at test end ($current sessions, assuming the test disconnects
+--- a/mysql-test/suite/funcs_1/views/func_view.inc
++++ b/mysql-test/suite/funcs_1/views/func_view.inc
+@@ -285,7 +285,7 @@ INSERT INTO t1_values SET
+ #               other interesting value
+ #     numbers   -> 0
+ #     strings, blobs, binaries -> not full length of used data type, "exotic"
+-#                                 characters and preceeding and trailing spaces
++#                                 characters and preceding and trailing spaces
+ #     FIXME enum, set ??
+ INSERT INTO t1_values SET
+        my_char_30 = ' ---äÖüß@µ*$-- ',
+--- a/mysql-test/suite/funcs_1/views/views_master.inc
++++ b/mysql-test/suite/funcs_1/views/views_master.inc
+@@ -545,7 +545,7 @@ let $message= Testcase 3.3.1.7 ;
+ #                   view names are accepted, at creation time, alteration time,
+ #                   and drop time.
+ ###############################################################################
+-# Note(mleich): non-qualified view name means a view name without preceeding
++# Note(mleich): non-qualified view name means a view name without preceding
+ #               database name
+ --disable_warnings
+ DROP VIEW  IF EXISTS v1 ;
+--- a/mysql-test/suite/rpl/t/rpl_ddl.test
++++ b/mysql-test/suite/rpl/t/rpl_ddl.test
+@@ -13,10 +13,10 @@
+ #         sequences start.
+ #
+ #      2. Never use a test object, which was direct or indirect affected by a
+-#         preceeding test sequence again.
++#         preceding test sequence again.
+ #         Except table d1.t1 where ONLY DML is allowed.
+ #
+-#         If one preceeding test sequence hits a (sometimes not good visible,
++#         If one preceding test sequence hits a (sometimes not good visible,
+ #         because the sql error code of the statement might be 0) bug
+ #         and these rules are ignored, a following test sequence might earn ugly
+ #         effects like failing 'sync_slave_with_master', crashes of the slave or
+--- a/mysql-test/suite/rpl/t/rpl_row_basic_11bugs.test
++++ b/mysql-test/suite/rpl/t/rpl_row_basic_11bugs.test
+@@ -239,7 +239,7 @@ INSERT INTO t1 VALUES (1,'master,slave')
+ UPDATE t1 SET a = 5, b = 'slave' WHERE a = 1;
+ SELECT * FROM t1 ORDER BY a;
+ # since bug#31552/31609 idempotency is not default any longer. In
+-# order for the preceeding test UPDATE t1 to pass, the mode is switched
++# order for the preceding test UPDATE t1 to pass, the mode is switched
+ # temprorarily
+ set @@global.slave_exec_mode= 'IDEMPOTENT';
+ --echo **** On Master ****
+--- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_ddl.test
++++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_ddl.test
+@@ -13,10 +13,10 @@
+ #         sequences start.
+ #
+ #      2. Never use a test object, which was direct or indirect affected by a
+-#         preceeding test sequence again.
++#         preceding test sequence again.
+ #         Except table d1.t1 where ONLY DML is allowed.
+ #
+-#         If one preceeding test sequence hits a (sometimes not good visible,
++#         If one preceding test sequence hits a (sometimes not good visible,
+ #         because the sql error code of the statement might be 0) bug
+ #         and these rules are ignored, a following test sequence might earn ugly
+ #         effects like failing 'sync_slave_with_master', crashes of the slave or
+--- a/sql/abstract_query_plan.cc
++++ b/sql/abstract_query_plan.cc
+@@ -336,7 +336,7 @@ namespace AQP
+       {
+         /*
+           use_quick == 2 means that the decision on which access method to use
+-          will be taken late (as rows from the preceeding operation arrive).
++          will be taken late (as rows from the preceding operation arrive).
+           This operation is therefor not pushable.
+         */
+         DBUG_PRINT("info",
+--- a/sql/ha_ndbcluster_push.cc
++++ b/sql/ha_ndbcluster_push.cc
+@@ -1271,7 +1271,7 @@ ndb_pushed_builder_ctx::build_key(const
+         if (m_join_scope.contain(referred_table_no))
+         {
+           // Locate the parent operation for this 'join_items[]'.
+-          // May refer any of the preceeding parent tables
++          // May refer any of the preceding parent tables
+           const NdbQueryOperationDef* const parent_op= m_tables[referred_table_no].m_op;
+           DBUG_ASSERT(parent_op != NULL);
+--- a/sql/log_event.cc
++++ b/sql/log_event.cc
+@@ -4625,7 +4625,7 @@ int Query_log_event::do_apply_event(Rela
+     if ((error= rows_event_stmt_cleanup(const_cast<Relay_log_info*>(rli), thd)))
+     {
+       const_cast<Relay_log_info*>(rli)->report(ERROR_LEVEL, error,
+-                  "Error in cleaning up after an event preceeding the commit; "
++                  "Error in cleaning up after an event preceding the commit; "
+                   "the group log file/position: %s %s",
+                   const_cast<Relay_log_info*>(rli)->get_group_master_log_name(),
+                   llstr(const_cast<Relay_log_info*>(rli)->get_group_master_log_pos(),
+--- a/sql/rpl_utility.cc
++++ b/sql/rpl_utility.cc
+@@ -1564,7 +1564,7 @@ bool Deferred_log_events::execute(Relay_
+ void Deferred_log_events::rewind()
+ {
+   /*
+-    Reset preceeding Query log event events which execution was
++    Reset preceding Query log event events which execution was
+     deferred because of slave side filtering.
+   */
+   if (!is_empty())
+--- a/sql/sql_optimizer.cc
++++ b/sql/sql_optimizer.cc
+@@ -971,7 +971,7 @@ JOIN::optimize()
+         }
+       }
+     }
+-    else if (order &&                      // ORDER BY wo/ preceeding GROUP BY
++    else if (order &&                      // ORDER BY wo/ preceding GROUP BY
+              (simple_order || skip_sort_order)) // which is possibly skippable
+     {
+       if (test_if_skip_sort_order(tab, order, m_select_limit, false, 
+--- a/sql/sql_rewrite.cc
++++ b/sql/sql_rewrite.cc
+@@ -40,7 +40,7 @@
+ /**
+-  Append a key/value pair to a string, with an optional preceeding comma.
++  Append a key/value pair to a string, with an optional preceding comma.
+   For numeric values.
+   @param           str                  The string to append to
+@@ -72,7 +72,7 @@ bool append_int(String *str, bool comma,
+ /**
+   Append a key/value pair to a string if the value is non-NULL,
+-  with an optional preceeding comma.
++  with an optional preceding comma.
+   @param           str                  The string to append to
+   @param           comma                Prepend a comma?
+--- a/sql/sql_yacc.cc
++++ b/sql/sql_yacc.cc
+@@ -35151,7 +35151,7 @@ yyreduce:
+             {
+               /*
+                 Not in trigger assigning value to new row,
+-                and option_type preceeding local variable is illegal.
++                and option_type preceding local variable is illegal.
+               */
+               my_parse_error(ER(ER_SYNTAX_ERROR));
+               MYSQL_YYABORT;
+--- a/sql/sql_yacc.yy
++++ b/sql/sql_yacc.yy
+@@ -14573,7 +14573,7 @@ opt_var_ident_type:
+         | SESSION_SYM '.' { $$=OPT_SESSION; }
+         ;
+-// Option values with preceeding option_type.
++// Option values with preceding option_type.
+ option_value_following_option_type:
+           internal_variable_name equal set_expr_or_default
+           {
+@@ -14590,7 +14590,7 @@ option_value_following_option_type:
+             {
+               /*
+                 Not in trigger assigning value to new row,
+-                and option_type preceeding local variable is illegal.
++                and option_type preceding local variable is illegal.
+               */
+               my_parse_error(ER(ER_SYNTAX_ERROR));
+               MYSQL_YYABORT;
+@@ -14598,7 +14598,7 @@ option_value_following_option_type:
+           }
+         ;
+-// Option values without preceeding option_type.
++// Option values without preceding option_type.
+ option_value_no_option_type:
+           internal_variable_name equal
+           {
+--- a/storage/myisam/mi_rnext.c
++++ b/storage/myisam/mi_rnext.c
+@@ -65,7 +65,7 @@ int mi_rnext(MI_INFO *info, uchar *buf,
+       Normally SQL layer would never request "search next" if
+       "search first" failed. But HANDLER may do anything.
+-      As mi_rnext() without preceeding mi_rkey()/mi_rfirst()
++      As mi_rnext() without preceding mi_rkey()/mi_rfirst()
+       equals to mi_rfirst(), we must restore original state
+       as if failing mi_rfirst() was not called.
+     */
diff --git a/mysql-wsrep-5.6/debian/po/POTFILES.in b/mysql-wsrep-5.6/debian/po/POTFILES.in
new file mode 100644 (file)
index 0000000..f9b5a05
--- /dev/null
@@ -0,0 +1 @@
+[type: gettext/rfc822deb] mysql-wsrep-server-5.6.templates
diff --git a/mysql-wsrep-5.6/debian/po/ar.po b/mysql-wsrep-5.6/debian/po/ar.po
new file mode 100644 (file)
index 0000000..4c371ff
--- /dev/null
@@ -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 <okhayat@yahoo.com>, 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 <okhayat@yahoo.com>\n"
+"Language-Team: Arabic <support@arabeyes.org>\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/mysql-wsrep-5.6/debian/po/ca.po b/mysql-wsrep-5.6/debian/po/ca.po
new file mode 100644 (file)
index 0000000..7b0721c
--- /dev/null
@@ -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 <abadia@ica.es> 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 <abadia@ica.es>\n"
+"Language-Team: Debian L10n Catalan <debian-l10n-catalan@lists.debian.org>\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/mysql-wsrep-5.6/debian/po/cs.po b/mysql-wsrep-5.6/debian/po/cs.po
new file mode 100644 (file)
index 0000000..a6be13b
--- /dev/null
@@ -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 <kurem@debian.cz>\n"
+"Language-Team: Czech <debian-l10n-czech@lists.debian.org>\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/mysql-wsrep-5.6/debian/po/da.po b/mysql-wsrep-5.6/debian/po/da.po
new file mode 100644 (file)
index 0000000..94019aa
--- /dev/null
@@ -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 <claus_h@image.dk> 2005, 2006, 2007.
+# Joe Hansen <joedalton2@yahoo.dk>, 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 <joedalton2@yahoo.dk>\n"
+"Language-Team: Danish <debian-l10n-danish@lists.debian.org> \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/mysql-wsrep-5.6/debian/po/de.po b/mysql-wsrep-5.6/debian/po/de.po
new file mode 100644 (file)
index 0000000..844f393
--- /dev/null
@@ -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 <ameschede@gmx.de>, 2006, 2007.
+# Thomas Mueller <thomas.mueller@tmit.eu>, 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 <thomas.mueller@tmit.eu>\n"
+"Language-Team: german <debian-l10n-german@lists.debian.org>\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/mysql-wsrep-5.6/debian/po/es.po b/mysql-wsrep-5.6/debian/po/es.po
new file mode 100644 (file)
index 0000000..10f715c
--- /dev/null
@@ -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 (<debian-l10n-spanish@lists.debian.org>)
+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 <jfs@debian.org>\n"
+"Language-Team: Debian l10 Spanish <debian-l10n-spanish@lists.debian.org>\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/mysql-wsrep-5.6/debian/po/eu.po b/mysql-wsrep-5.6/debian/po/eu.po
new file mode 100644 (file)
index 0000000..e9878c0
--- /dev/null
@@ -0,0 +1,236 @@
+# translation of eu.po to Euskara
+# Piarres BEobide <pi@beobide.net>, 2006.
+# Piarres Beobide <pi@beobide.net>, 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 <pi@beobide.net>\n"
+"Language-Team: Euskara <debian-l10n-eu@lists.debian.org>\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/mysql-wsrep-5.6/debian/po/fr.po b/mysql-wsrep-5.6/debian/po/fr.po
new file mode 100644 (file)
index 0000000..9ced0c0
--- /dev/null
@@ -0,0 +1,242 @@
+# Translation of mysql-dfsg-* debconf templates to French
+# Copyright (C) 2004-2009 Debian French l10n team <debian-l10n-french@lists.debian.org>
+# This file is distributed under the same license as the mysql-dfsg-* packages.
+#
+# Translators:
+# Christian Perrier <bubulle@debian.org>, 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 <bubulle@debian.org>\n"
+"Language-Team: French <debian-l10n-french@lists.debian.org>\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/mysql-wsrep-5.6/debian/po/gl.po b/mysql-wsrep-5.6/debian/po/gl.po
new file mode 100644 (file)
index 0000000..6bb1407
--- /dev/null
@@ -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 <jtarrio@debian.org>, 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 <jtarrio@debian.org>\n"
+"Language-Team: Galician <proxecto@trasno.net>\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/mysql-wsrep-5.6/debian/po/it.po b/mysql-wsrep-5.6/debian/po/it.po
new file mode 100644 (file)
index 0000000..b0567e5
--- /dev/null
@@ -0,0 +1,223 @@
+# Italian (it) translation of debconf templates for mysql-dfsg-5.6\r
+# Copyright (C) 2009 Software in the Public Interest\r
+# This file is distributed under the same license as the mysql-dfsg-5.6 package.\r
+# Luca Monducci <luca.mo@tiscali.it>, 2006 - 2009.\r
+# \r
+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 <luca.mo@tiscali.it>\n"
+"Language-Team: Italian <debian-l10n-italian@lists.debian.org>\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/mysql-wsrep-5.6/debian/po/ja.po b/mysql-wsrep-5.6/debian/po/ja.po
new file mode 100644 (file)
index 0000000..796d5e3
--- /dev/null
@@ -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) <henrich@debian.or.jp>\n"
+"Language-Team: Japanese <debian-japanese@lists.debian.org>\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/mysql-wsrep-5.6/debian/po/nb.po b/mysql-wsrep-5.6/debian/po/nb.po
new file mode 100644 (file)
index 0000000..d3c9d0e
--- /dev/null
@@ -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 <bjornst@powertech.no>, 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 <bjornst@powertech.no>\n"
+"Language-Team: Norwegian Bokmål <i18n-nb@lister.ping.uio.no>\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/mysql-wsrep-5.6/debian/po/nl.po b/mysql-wsrep-5.6/debian/po/nl.po
new file mode 100644 (file)
index 0000000..8ddab3c
--- /dev/null
@@ -0,0 +1,219 @@
+# Dutch mysql-dfsg-5.6 po-debconf translation,
+# Copyright (C) 2006 THE PACKAGE'S COPYRIGHT HOLDER
+#
+# Vincent Zweije <zweije@xs4all.nl>, 2006.
+# Eric Spreen <erispre@gmail.com, 2010.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: mysql-5.6 5.6.6-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 10:26+0200\n"
+"Last-Translator: Jeroen Schot <schot@a-eskwadraat.nl>\n"
+"Language-Team: Debian l10n Dutch <debian-l10n-dutch@lists.debian.org>\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/mysql-wsrep-5.6/debian/po/pt.po b/mysql-wsrep-5.6/debian/po/pt.po
new file mode 100644 (file)
index 0000000..f142e86
--- /dev/null
@@ -0,0 +1,296 @@
+# Portuguese translation for mysql-dfsg-5.6's debconf messages
+# Copyright (C) 2006 Miguel Figueiredo <elmig@debianpt.org>
+# This file is distributed under the same license as the mysql-dfsg-5.6 package.
+# Miguel Figueiredo <elmig@debianpt.org>, 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 <elmig@debianpt.org>\n"
+"Language-Team: Portuguese <traduz@debianpt.org>\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/mysql-wsrep-5.6/debian/po/pt_BR.po b/mysql-wsrep-5.6/debian/po/pt_BR.po
new file mode 100644 (file)
index 0000000..e5fa5ee
--- /dev/null
@@ -0,0 +1,443 @@
+# Brazilian Portuguese (pt_BR) debconf template translation for
+# Debian's mysql-dfsg source package.
+# Debian-BR Project <debian-l10n-portuguese@lists.debian.org>
+# André Luís Lopes, <andrelop@debian.org> , 2004
+# André Luís Lopes, <andrelop@debian.org> , 2006
+# André Luís Lopes, <andrelop@debian.org> , 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 <andrelop@debian.org>\n"
+"Language-Team: Debian-BR Project <debian-l10n-portuguese@lists.debian.org>\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/mysql-wsrep-5.6/debian/po/ro.po b/mysql-wsrep-5.6/debian/po/ro.po
new file mode 100644 (file)
index 0000000..0e48225
--- /dev/null
@@ -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 <stan.ieugen@gmail.com>, 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 <stan.ieugen@gmail.com>\n"
+"Language-Team: romanian <debian-l10n-romanian@lists.debian.org>\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/mysql-wsrep-5.6/debian/po/ru.po b/mysql-wsrep-5.6/debian/po/ru.po
new file mode 100644 (file)
index 0000000..59fbe33
--- /dev/null
@@ -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 <translator@ilgiz.pp.ru>, 2003.
+# Yuriy Talakan' <yt@amur.elektra.ru>, 2005, 2006.
+# Yuriy Talakan' <yt@drsk.ru>, 2007.
+# Yuri Kozlov <yuray@komyakino.ru>, 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 <yuray@komyakino.ru>\n"
+"Language-Team: Russian <debian-l10n-russian@lists.debian.org>\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/mysql-wsrep-5.6/debian/po/sk.po b/mysql-wsrep-5.6/debian/po/sk.po
new file mode 100644 (file)
index 0000000..630a9a1
--- /dev/null
@@ -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 <linux@slavino.sk>, 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 <linux@slavino.sk>\n"
+"Language-Team: Slovak <nomail>\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/mysql-wsrep-5.6/debian/po/sv.po b/mysql-wsrep-5.6/debian/po/sv.po
new file mode 100644 (file)
index 0000000..ebbb497
--- /dev/null
@@ -0,0 +1,220 @@
+# Translation of mysql-5.6 debconf template to Swedish\r
+# Copyright (C) 2009, 2012 Martin Bagge <brother@bsnet.se>\r
+# This file is distributed under the same license as the mysql-5.6 package.\r
+# \r
+# Andreas Henriksson <andreas@fatal.se>, 2007\r
+# Martin Bagge <brother@bsnet.se>, 2009, 2012\r
+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 <brother@bsnet.se>\n"
+"Language-Team: Swedish <debian-l10n-swedish@lists.debian.org>\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/mysql-wsrep-5.6/debian/po/templates.pot b/mysql-wsrep-5.6/debian/po/templates.pot
new file mode 100644 (file)
index 0000000..f9b2dca
--- /dev/null
@@ -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 <EMAIL@ADDRESS>, 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 <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\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/mysql-wsrep-5.6/debian/po/tr.po b/mysql-wsrep-5.6/debian/po/tr.po
new file mode 100644 (file)
index 0000000..f721a65
--- /dev/null
@@ -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 <gurkan@iaslan.com>, 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 <gurkan@iaslan.com>\n"
+"Language-Team: Turkish <debian-l10n-turkish@lists.debian.org>\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/mysql-wsrep-5.6/debian/rules b/mysql-wsrep-5.6/debian/rules
new file mode 100755 (executable)
index 0000000..9b64bc2
--- /dev/null
@@ -0,0 +1,231 @@
+#!/usr/bin/make -f
+
+export DH_VERBOSE=1
+
+# enable Debian Hardening
+# see: https://wiki.debian.org/Hardening
+export DEB_BUILD_MAINT_OPTIONS = hardening=+all,-pie
+DPKG_EXPORT_BUILDFLAGS = 1
+include /usr/share/dpkg/buildflags.mk
+
+ARCH := $(shell dpkg-architecture -qDEB_BUILD_ARCH)
+ARCH_OS := $(shell dpkg-architecture -qDEB_BUILD_ARCH_OS)
+BUILDDIR := builddir
+BUILDDIR_PIC := builddir-pic
+builddir = $(if $(findstring -pic,$@),$(BUILDDIR_PIC),$(BUILDDIR))
+DEBVERSION := $(shell dpkg-parsechangelog | awk '/^Version: / { print $$2 }' | sed 's/^.*-//' )
+DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+DEB_BUILD_GNU_SYSTEM ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_SYSTEM)
+DEB_HOST_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
+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)
+DISTRIBUTION := $(shell lsb_release -i -s)
+EXPORTED_SOURCE_TARBALL := debian/mysql-source-5.6.tar.gz
+TESTSUITE_FAIL_CMD:=true
+TMP := $(CURDIR)/debian/tmp/
+USE_ASSEMBLER:=--enable-assembler
+
+
+export MYSQL_BUILD_CC=$(DEB_HOST_GNU_TYPE)-gcc
+export MYSQL_BUILD_CXX=$(DEB_HOST_GNU_TYPE)-g++
+
+
+ifneq (,$(filter $(ARCH), i386 kfreebsd-i386 hurd-i386))
+       TAOCRYPT_OPT="-DTAOCRYPT_DISABLE_X86ASM"
+endif
+
+# make test-bt is the testsuite run by the MySQL build team
+# before a release, but it is long
+MAKE_TEST_TARGET:=test-mtr
+ifneq ($(findstring fulltest,$(DEB_BUILD_OPTIONS)),)
+    MAKE_TEST_TARGET:=test-bt
+endif
+ifeq ($(ARCH_OS),hurd)
+# Tests not fully working under Hurd
+# See http://bugs.mysql.com/bug.php?id=64685
+    MAKE_TEST_TARGET:=test
+endif
+
+
+# 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
+
+override_dh_auto_clean:
+       @echo "RULES.$@"
+       dh_testdir
+       dh_testroot
+       [ ! -d mysql-test/var ] || rm -rf mysql-test/var
+       rm -rf $(BUILDDIR) $(BUILDDIR_PIC) .pc
+       debconf-updatepo
+       rm -f $(EXPORTED_SOURCE_TARBALL)
+       rm -f cmake/os/GNU.cmake
+
+override_dh_prep:
+
+override_dh_auto_configure: configure-stamp
+
+configure-pic-stamp: FORCE_FPIC_CFLAGS=-fPIC
+configure-pic-stamp: FORCE_FPIC=-DWITH_PIC=On
+
+configure-stamp configure-pic-stamp:
+       @echo "RULES.$@"
+       dh_testdir
+       ( test -d $(builddir) || mkdir $(builddir) ) && cd $(builddir) && \
+       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 ${TAOCRYPT_OPT}"} \
+               CXX=$${MYSQL_BUILD_CXX:-g++} \
+               CXXFLAGS=$${MYSQL_BUILD_CXXFLAGS:-"-O3 -DBIG_JOINS=1 -felide-constructors -fpermissive ${FORCE_FPIC_CFLAGS} -fno-strict-aliasing ${TAOCRYPT_OPT}"} \
+               cmake -DCMAKE_INSTALL_PREFIX=/usr \
+               -DCMAKE_VERBOSE_MAKEFILE=ON \
+               $(FORCE_FPIC) \
+               -DMYSQL_UNIX_ADDR=/var/run/mysqld/mysqld.sock \
+               -DCMAKE_BUILD_TYPE=RelWithDebInfo \
+               -DWITH_WSREP=1 \
+               -DWITH_LIBWRAP=ON \
+               -DWITH_ZLIB=system \
+               -DWITH_EDITLINE=system \
+               $(USE_STATIC_MYSQLD) \
+               -DWITH_SSL=system \
+               -DCOMPILATION_COMMENT="($(DISTRIBUTION))" \
+               -DMYSQL_SERVER_SUFFIX="-$(DEBVERSION)" \
+               -DSYSTEM_TYPE="debian-$(DEB_BUILD_GNU_SYSTEM)" \
+               -DINSTALL_LAYOUT=RPM \
+               -DINSTALL_LIBDIR=lib/$(DEB_HOST_MULTIARCH) \
+               -DINSTALL_PLUGINDIR=lib/mysql/plugin \
+               -DWITH_EMBEDDED_SERVER=ON \
+               -DWITH_ARCHIVE_STORAGE_ENGINE=ON \
+               -DWITH_BLACKHOLE_STORAGE_ENGINE=ON \
+               -DWITH_FEDERATED_STORAGE_ENGINE=ON \
+               -DWITH_EXTRA_CHARSETS=all ..'
+       touch $@
+
+override_dh_auto_build: build-stamp
+
+build-stamp:
+       @echo "RULES.$@"
+       [ -f $(EXPORTED_SOURCE_TARBALL) ] || tar -zcf $(EXPORTED_SOURCE_TARBALL) \
+       --exclude=debian . \
+       --transform="s,^\./,mysql-5.6/,"
+       cd $(builddir) && $(MAKE)
+       touch $@
+
+build-pic-stamp:
+       # Don't call this section from dh_auto_build as
+       # linmysqld does not exsist in mysql-wsrep
+       @echo "RULES.$@"
+       cd $(builddir) && $(MAKE) -C scripts
+       cd $(builddir) && $(MAKE) -C libmysqld
+       touch $@
+
+override_dh_auto_test:
+       @echo "RULES.$@"
+ifeq ($(findstring nocheck,$(DEB_BUILD_OPTIONS)),)
+       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/
+       cd $(builddir) && $(MAKE) $(MAKE_TEST_TARGET) || $(TESTSUITE_FAIL_CMD) ;
+endif
+
+override_dh_auto_install: auto_install-stamp
+
+auto_install-stamp:
+       @echo "RULES.$@"
+       dh_testdir
+       dh_testroot
+       # make install (trailing slash needed for innobase)
+       cd $(builddir) && $(MAKE) install DESTDIR=$(TMP)/
+       # install libmysqld built with -FPIC
+       install -d -m 0755 -o root -g root $(TMP)/usr/lib/mysql
+       # linmysqld does not exsist in mysql-wsrep
+       # 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
+       mkdir -p $(TMP)/usr/share/doc/mysql-server-5.6
+       install -m 0644 Docs/README-wsrep $(TMP)/usr/share/doc/mysql-server-5.6
+       nm -n $(BUILDDIR)/sql/mysqld |gzip -9 > $(TMP)/usr/share/doc/mysql-server-5.6/mysqld.sym.gz
+       install -m 0644 support-files/wsrep.cnf $(TMP)/usr/share/mysql
+       # This seems to be the only safe place to fix permissions issues
+        # not handled by dh_fixperms.
+       mkdir -p $(TMP)/etc/mysql/conf.d/
+       touch $(TMP)/etc/mysql/conf.d/.keepme
+       install -D -m 0755 $(builddir)/support-files/mysql.server $(TMP)/etc/init.d/mysql
+       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 -m 0644 debian/additions/mysql_config_pic.1 $(TMP)/usr/share/man/man1
+       install -m 0644 debian/additions/mysql_embedded.1 $(TMP)/usr/share/man/man1
+       install -m 0644 debian/additions/debian_create_root_user.sql $(TMP)/usr/share/mysql/
+       # install AppArmor profile
+       install -D -m 644 debian/apparmor-profile $(TMP)/etc/apparmor.d/usr.sbin.mysqld
+       chmod 0755 $(TMP)/usr/share/mysql-test/std_data/checkDBI_DBD-mysql.pl
+       # install Apport hook
+       install -D -m 644 debian/mysql-server-5.6.py $(TMP)/usr/share/apport/package-hooks/source_mysql-5.6.py
+       # chmod 0644 $(TMP)/usr/share/mysql/*.ini
+       chmod 0644 $(TMP)/usr/bin/mysqlaccess.conf
+       touch $@
+
+# Use the --fail-missing to check for stuff that we should be installing
+#       Exclusion                                       Package         Type
+#       usr/share/man/                                  various         man
+#       usr/share/mysql/magic                           M-server-5.6    example
+#       usr/bin/mysqlaccess.conf                        M-client-5.6    example
+#       usr/lib/mysql/plugin/daemon_example.ini         M-server-5.6    example
+#       usr/share/mysql/my-                             M-server-5.6    example
+# The following exclusions have been inherited from pre short form
+# debian/rules days.
+#        usr/share/mysql/mi_test_all
+#        usr/share/mysql/mysql-log-rotate
+#        usr/share/mysql/mysql.server
+#        usr/share/mysql/binary-configure
+# NOTE(james-page) usr/include -> end can be dropped when 5.6 becomes default
+# NOTE(james-page) skip --fail-missing until package is complete 5.5 replacement
+#override_dh_install:
+#      dh_install --fail-missing                       \
+#        -Xusr/share/man/                                \
+#        -Xusr/share/info/mysql.info                     \
+#        -Xusr/share/mysql/magic                         \
+#        -Xusr/share/mysql/solaris/postinstall-solaris   \
+#        -Xusr/lib/mysql/plugin/daemon_example.ini       \
+#        -Xusr/bin/mysqlaccess.conf                      \
+#        -Xusr/share/mysql/mi_test_all                   \
+#        -Xusr/share/mysql/mysql-log-rotate              \
+#        -Xusr/share/mysql/mysql.server                  \
+#        -Xusr/share/mysql/binary-configure              \
+#        -Xusr/share/mysql/my-                           \
+#        -Xusr/include                                   \
+#        -Xusr/bin/mysql_config                          \
+#        -Xusr/share/aclocal/mysql.m4                    \
+#        -Xlibmysql
+
+override_dh_installlogrotate-arch:
+       dh_installlogrotate --name mysql-server
+       dh_apparmor -pmysql-server-5.6 --profile-name=usr.sbin.mysqld
+
+# Start mysql in runlevel 19 before 20 where apache, proftpd etc gets
+# started which might depend on a running database server.
+override_dh_installinit-arch:
+       dh_installinit --name=mysql -- defaults 19 21
+
+override_dh_installcron-arch:
+       dh_installcron --name mysql-server
+
+override_dh_strip:
+       @echo "Notice: not stripping debug symbols from any binaries"
+
+binary:        binary-indep binary-arch
+
+get-orig-source:
+       uscan --force-download --verbose
+
+%:
+       dh $@ --parallel
diff --git a/mysql-wsrep-5.6/debian/source.lintian-overrides b/mysql-wsrep-5.6/debian/source.lintian-overrides
new file mode 100644 (file)
index 0000000..c48b90c
--- /dev/null
@@ -0,0 +1,7 @@
+# The mysql-server-5.6.postrm script handles 
+# what debhelper normally would.
+# This is apparently related to #526464.
+maintainer-script-lacks-debhelper-token debian/mysql-server-5.6.postrm
+# Probably best to keep the debhelper version low in
+# case someone needs to backport
+package-needs-versioned-debhelper-build-depends 9
diff --git a/mysql-wsrep-5.6/debian/source/format b/mysql-wsrep-5.6/debian/source/format
new file mode 100644 (file)
index 0000000..163aaf8
--- /dev/null
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/mysql-wsrep-5.6/debian/tests/build b/mysql-wsrep-5.6/debian/tests/build
new file mode 100755 (executable)
index 0000000..e88bd22
--- /dev/null
@@ -0,0 +1,35 @@
+#!/bin/sh
+# autopkgtest check: Build and run a program against libmysqlclient, to verify that the
+# headers and pkg-config file are installed correctly
+# (C) 2012 Canonical Ltd.
+# Author: Daniel Kessel <d.kessel@gmx.de>
+
+echo "test 'build' starting"
+set -e
+
+WORKDIR=$(mktemp -d)
+trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM
+cd $WORKDIR
+
+cat <<EOF > libmysqltest.c
+#include <stdio.h>
+#include <mysql.h>
+
+int main()
+{
+    if (mysql_library_init(0, NULL, NULL)) {
+        fprintf(stderr, "failed to initialize mysql client library\n");
+       return 1;
+    }
+
+    mysql_library_end();
+    return 0;
+}
+EOF
+
+echo "building..."
+gcc -o libmysqltest libmysqltest.c `/usr/bin/mysql_config --cflags --libs` -Wall -Werror
+echo "build: OK"
+[ -x libmysqltest ]
+./libmysqltest
+echo "run: OK"
diff --git a/mysql-wsrep-5.6/debian/tests/control b/mysql-wsrep-5.6/debian/tests/control
new file mode 100644 (file)
index 0000000..ba148bb
--- /dev/null
@@ -0,0 +1,3 @@
+Tests: smoke upstream
+Depends: mysql-testsuite-5.6
+Restrictions: allow-stderr needs-root breaks-testbed
diff --git a/mysql-wsrep-5.6/debian/tests/smoke b/mysql-wsrep-5.6/debian/tests/smoke
new file mode 100644 (file)
index 0000000..58afe8b
--- /dev/null
@@ -0,0 +1,59 @@
+#!/bin/sh
+set -ex
+
+# dep8 smoke test for mysql-server
+# Author: Robie Basak <robie.basak at canonical.com>
+#
+# This test should be declared in debian/tests/control with a dependency
+# on the package that provides a configured MySQL server (eg.
+# mysql-server-5.6).
+#
+# This test should be declared in debian/tests/control with the
+# following restrictions:
+#
+# needs-root (needed to reset the root mysql password)
+# breaks-testbed (because it resets the root mysql password)
+# allow-stderr
+#
+# This test:
+#
+# 1) Configures packaged mysql server root password with maintainer
+# scripts.
+#
+# 2) Creates a test database and test user as the root user.
+#
+# 3) Creates a test table and checks it appears to operate normally
+# using the test user and test database.
+
+debconf-set-selections <<EOT
+mysql-server-5.6 mysql-server/root_password password rootpassword
+mysql-server-5.6 mysql-server/root_password_again password rootpassword
+EOT
+
+DEBIAN_FRONTEND=noninteractive dpkg-reconfigure mysql-server-5.6
+
+mysql --user=root --password=rootpassword <<EOT
+CREATE DATABASE testdatabase;
+CREATE USER 'testuser'@'localhost' identified by 'testpassword';
+GRANT ALL ON testdatabase.* TO 'testuser'@'localhost';
+EOT
+
+mysql --user=testuser --password=testpassword testdatabase <<EOT
+CREATE TABLE foo (bar INTEGER);
+INSERT INTO foo (bar) VALUES (41);
+EOT
+
+result=`echo 'SELECT bar+1 FROM foo;'|mysql --batch --skip-column-names --user=testuser --password=testpassword testdatabase`
+if [ "$result" != "42" ]; then
+       echo "Unexpected result" >&2
+       exit 1
+fi
+
+mysql --user=testuser --password=testpassword testdatabase <<EOT
+DROP TABLE foo;
+EOT
+
+mysql --user=root --password=rootpassword <<EOT
+DROP DATABASE testdatabase;
+DROP USER 'testuser'@'localhost';
+EOT
diff --git a/mysql-wsrep-5.6/debian/tests/upstream b/mysql-wsrep-5.6/debian/tests/upstream
new file mode 100755 (executable)
index 0000000..0a8b952
--- /dev/null
@@ -0,0 +1,34 @@
+#!/bin/sh
+# autopkgtest check: Build and run the upstream test suite.
+# (C) 2012 Canonical Ltd.
+# Author: Daniel Kessel <d.kessel@gmx.de>
+
+# running the mysql testsuite as described in:
+# https://bugs.launchpad.net/ubuntu/+source/mysql-5.5/+bug/959683
+
+echo "running test 'testsuite'"
+set -e
+
+SKIP_TEST_LST="/tmp/skip-test.lst"
+WORKDIR=$(mktemp -d)
+trap "rm -rf $WORKDIRi $SKIP_TEST_LST" 0 INT QUIT ABRT PIPE TERM
+cd $WORKDIR
+
+mkdir var
+mkdir tmp
+
+echo "using vardir: $WORKDIR/var"
+echo "using tmpdir: $WORKDIR/tmp"
+
+echo "Setting up skip-tests-list"
+cat > $SKIP_TEST_LST << EOF
+binlog.binlog_server_start_options : Requires writable /usr
+main.ctype_uca : Requires writable /usr
+EOF
+
+cd /usr/lib/mysql-testsuite
+echo "starting mysql-test-tun.pl..."
+./mysql-test-run.pl --force --vardir=$WORKDIR/var --tmpdir=$WORKDIR/tmp \
+    --comment=normal --timer --skip-ndbcluster --report-features \
+    --skip-test-list=$SKIP_TEST_LST $@ 2>&1
+echo "run: OK"
diff --git a/mysql-wsrep-5.6/debian/watch b/mysql-wsrep-5.6/debian/watch
new file mode 100644 (file)
index 0000000..9e04cd9
--- /dev/null
@@ -0,0 +1,3 @@
+# See debian/README.source for more information about the DFSG repacking here.
+version=3
+http://mysql.mirrors.pair.com/Downloads/MySQL-5.6/mysql-([\d\.]+).tar.gz
index fdeb72f0d991e789067636778f4ed4ea77dfe47c..ac5d113c847fe13817c85788e75d730d5294035d 100644 (file)
@@ -1,5 +1,5 @@
 /*
-   Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+   Copyright (c) 2000, 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
@@ -1023,8 +1023,8 @@ static void print_version(void)
 
 
 static my_bool
-get_one_option(int optid, const struct my_option *opt __attribute__ ((unused)),
-              char *argument __attribute__ ((unused)))
+get_one_option(int optid, const struct my_option *opt MY_ATTRIBUTE ((unused)),
+              char *argument MY_ATTRIBUTE ((unused)))
 {
   DBUG_ENTER("get_one_option");
   switch (optid) {
index 7116e4f35a422332334998ae3fba5977e8ad6f21..9c6ca996577d33be6191311ea1fdfdac61e356d6 100644 (file)
@@ -1,5 +1,5 @@
 /*
-   Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+   Copyright (c) 2005, 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
@@ -235,8 +235,8 @@ extern "C" my_bool
 innochecksum_get_one_option(
 /*========================*/
   int optid,
-  const struct my_option *opt __attribute__((unused)),
-  char *argument __attribute__((unused)))
+  const struct my_option *opt MY_ATTRIBUTE((unused)),
+  char *argument MY_ATTRIBUTE((unused)))
 {
   switch (optid) {
   case 'd':
index 9587077dc300802adccd1b12cb8ba278744718cc..6ccb08f7cf06f121c19addbe1afdb1e872befaae 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
-   Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
+   Copyright (c) 2000, 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
@@ -118,8 +118,8 @@ static void usage(my_bool version)
 
 
 static my_bool
-get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
-              char *argument __attribute__((unused)))
+get_one_option(int optid, const struct my_option *opt MY_ATTRIBUTE((unused)),
+              char *argument MY_ATTRIBUTE((unused)))
 {
   switch (optid) {
     case 'c':
@@ -172,7 +172,7 @@ int main(int argc, char **argv)
 
   org_argv= argv;
   args_used= get_defaults_options(argc, argv, &defaults, &extra_defaults,
-                                  &group_suffix, &login_path);
+                                  &group_suffix, &login_path, FALSE);
 
   /* Copy defaults-xxx arguments & program name */
   count=args_used+1;
index 9e0c76e002170b07d6209d942ed73411ccfa865b..bf4147d7b6cdfe90c97a8bd9d0c1df5f8ce17679 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2003, 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
@@ -43,8 +43,8 @@ static struct my_option my_long_options[] =
 };
 
 static my_bool
-get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
-              char *argument __attribute__((unused)))
+get_one_option(int optid, const struct my_option *opt MY_ATTRIBUTE((unused)),
+              char *argument MY_ATTRIBUTE((unused)))
 {
   switch(optid) {
   case 'V':
index 3bb3388ec7b911ada1466bc9067d588625697ff3..427aeb834030261359b7d152e22f3c67a21207ab 100644 (file)
@@ -1,5 +1,5 @@
 /*
-   Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+   Copyright (c) 2000, 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
@@ -94,8 +94,8 @@ static void usage(void)
 
 
 static my_bool
-get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
-              char *argument __attribute__((unused)))
+get_one_option(int optid, const struct my_option *opt MY_ATTRIBUTE((unused)),
+              char *argument MY_ATTRIBUTE((unused)))
 {
   switch (optid) {
   case 's':
index c94a1bbe4dc580dc12c4bb205ed59f1cefae0539..05ca4ea2a98fda55aaf225297b3f895b039fa6c7 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2001, 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
@@ -51,7 +51,7 @@ static char* dump_fname = 0, *sym_fname = 0;
 static std::vector<sym_entry> sym_table;
 static FILE* fp_dump, *fp_sym = 0, *fp_out; 
 static void die(const char* fmt, ...)
-  __attribute__((noreturn)) __attribute__((format(printf, 1, 2)));
+  MY_ATTRIBUTE((noreturn)) MY_ATTRIBUTE((format(printf, 1, 2)));
 
 static struct my_option my_long_options[] =
 {
@@ -107,8 +107,8 @@ static void die(const char* fmt, ...)
 
 
 static my_bool
-get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
-              char *argument __attribute__((unused)))
+get_one_option(int optid, const struct my_option *opt MY_ATTRIBUTE((unused)),
+              char *argument MY_ATTRIBUTE((unused)))
 {
   switch(optid) {
   case 'V':
index f69aa7fec5fe6a3e48b7203d4bbc58b00a32fd2e..66debab6609496cc8904cb01cb7549557657b19e 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 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
@@ -72,8 +72,8 @@ static void usage(void)
 
 
 static my_bool
-get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
-              char *argument __attribute__((unused)))
+get_one_option(int optid, const struct my_option *opt MY_ATTRIBUTE((unused)),
+              char *argument MY_ATTRIBUTE((unused)))
 {
   switch (optid) {
   case 'V': print_version(); exit(0);
index b5eb88824fb0dee69b300c17eb9c537828fdde69..a3d4f60f56128c055e64f6cda5a23214cada55ae 100644 (file)
@@ -12,6 +12,24 @@ before calling SSL_new();
 
 *** end Note ***
 
+yaSSL Release notes, version 2.4.2 (9/22/2016)
+    This release of yaSSL fixes a medium security vulnerability. A fix for
+    potential AES side channel leaks is included that a local user monitoring
+    the same CPU core cache could exploit.  VM users, hyper-threading users,
+    and users where potential attackers have access to the CPU cache will need
+    to update if they utilize AES.
+
+    DSA padding fixes for unusual sizes is included as well.  Users with DSA
+    certficiates should update.
+
+yaSSL Release notes, version 2.4.0 (5/20/2016)
+    This release of yaSSL fixes the OpenSSL compatibility function
+    SSL_CTX_load_verify_locations() when using the path directory to allow
+    unlimited path sizes.  Minor Windows build fixes are included.
+    No high level security fixes in this version but we always recommend
+    updating.
+
+
 yaSSL Release notes, version 2.3.9b (2/03/2016)
     This release of yaSSL fixes the OpenSSL compatibility function
     X509_NAME_get_index_by_NID() to use the actual index of the common name
index 10d533edc88b0387cdba979146cd25db663e0dbe..10794cbee7313d199c86bcbcf017f791d8c0555a 100644 (file)
@@ -1,22 +1,22 @@
 -----BEGIN CERTIFICATE-----
-MIIDqzCCA2ugAwIBAgIJAMGqrgDU6DyhMAkGByqGSM44BAMwgY4xCzAJBgNVBAYT
+MIIDrzCCA2+gAwIBAgIJAK1zRM7YFcNjMAkGByqGSM44BAMwgZAxCzAJBgNVBAYT
 AlVTMQ8wDQYDVQQIDAZPcmVnb24xETAPBgNVBAcMCFBvcnRsYW5kMRAwDgYDVQQK
-DAd3b2xmU1NMMRAwDgYDVQQLDAd0ZXN0aW5nMRYwFAYDVQQDDA13d3cueWFzc2wu
-Y29tMR8wHQYJKoZIhvcNAQkBFhBpbmZvQHdvbGZzc2wuY29tMB4XDTEzMDQyMjIw
-MDk0NFoXDTE2MDExNzIwMDk0NFowgY4xCzAJBgNVBAYTAlVTMQ8wDQYDVQQIDAZP
-cmVnb24xETAPBgNVBAcMCFBvcnRsYW5kMRAwDgYDVQQKDAd3b2xmU1NMMRAwDgYD
-VQQLDAd0ZXN0aW5nMRYwFAYDVQQDDA13d3cueWFzc2wuY29tMR8wHQYJKoZIhvcN
-AQkBFhBpbmZvQHdvbGZzc2wuY29tMIIBuDCCASwGByqGSM44BAEwggEfAoGBAL1R
-7koy4IrH6sbh6nDEUUPPKgfhxxLCWCVexF2+qzANEr+hC9M002haJXFOfeS9DyoO
-WFbL0qMZOuqv+22CaHnoUWl7q3PjJOAI3JH0P54ZyUPuU1909RzgTdIDp5+ikbr7
-KYjnltL73FQVMbjTZQKthIpPn3MjYcF+4jp2W2zFAhUAkcntYND6MGf+eYzIJDN2
-L7SonHUCgYEAklpxErfqznIZjVvqqHFaq+mgAL5J8QrKVmdhYZh/Y8z4jCjoCA8o
-TDoFKxf7s2ZzgaPKvglaEKiYqLqic9qY78DYJswzQMLFvjsF4sFZ+pYCBdWPQI4N
-PgxCiznK6Ce+JH9ikSBvMvG+tevjr2UpawDIHX3+AWYaZBZwKADAaboDgYUAAoGB
-AJ3LY89yHyvQ/TsQ6zlYbovjbk/ogndsMqPdNUvL4RuPTgJP/caaDDa0XJ7ak6A7
-TJ+QheLNwOXoZPYJC4EGFSDAXpYniGhbWIrVTCGe6lmZDfnx40WXS0kk3m/DHaC0
-3ElLAiybxVGxyqoUfbT3Zv1JwftWMuiqHH5uADhdXuXVo1AwTjAdBgNVHQ4EFgQU
-IJjk416o4v8qpH9LBtXlR9v8gccwHwYDVR0jBBgwFoAUIJjk416o4v8qpH9LBtXl
-R9v8gccwDAYDVR0TBAUwAwEB/zAJBgcqhkjOOAQDAy8AMCwCFCjGKIdOSV12LcTu
-k08owGM6YkO1AhQe+K173VuaO/OsDNsxZlKpyH8+1g==
+DAd3b2xmU1NMMRAwDgYDVQQLDAd0ZXN0aW5nMRgwFgYDVQQDDA93d3cud29sZnNz
+bC5jb20xHzAdBgkqhkiG9w0BCQEWEGluZm9Ad29sZnNzbC5jb20wHhcNMTYwOTIy
+MjEyMzA0WhcNMjIwMzE1MjEyMzA0WjCBkDELMAkGA1UEBhMCVVMxDzANBgNVBAgM
+Bk9yZWdvbjERMA8GA1UEBwwIUG9ydGxhbmQxEDAOBgNVBAoMB3dvbGZTU0wxEDAO
+BgNVBAsMB3Rlc3RpbmcxGDAWBgNVBAMMD3d3dy53b2xmc3NsLmNvbTEfMB0GCSqG
+SIb3DQEJARYQaW5mb0B3b2xmc3NsLmNvbTCCAbgwggEsBgcqhkjOOAQBMIIBHwKB
+gQC9Ue5KMuCKx+rG4epwxFFDzyoH4ccSwlglXsRdvqswDRK/oQvTNNNoWiVxTn3k
+vQ8qDlhWy9KjGTrqr/ttgmh56FFpe6tz4yTgCNyR9D+eGclD7lNfdPUc4E3SA6ef
+opG6+ymI55bS+9xUFTG402UCrYSKT59zI2HBfuI6dltsxQIVAJHJ7WDQ+jBn/nmM
+yCQzdi+0qJx1AoGBAJJacRK36s5yGY1b6qhxWqvpoAC+SfEKylZnYWGYf2PM+Iwo
+6AgPKEw6BSsX+7Nmc4Gjyr4JWhComKi6onPamO/A2CbMM0DCxb47BeLBWfqWAgXV
+j0CODT4MQos5yugnviR/YpEgbzLxvrXr469lKWsAyB19/gFmGmQWcCgAwGm6A4GF
+AAKBgQCdy2PPch8r0P07EOs5WG6L425P6IJ3bDKj3TVLy+Ebj04CT/3Gmgw2tFye
+2pOgO0yfkIXizcDl6GT2CQuBBhUgwF6WJ4hoW1iK1UwhnupZmQ358eNFl0tJJN5v
+wx2gtNxJSwIsm8VRscqqFH2092b9ScH7VjLoqhx+bgA4XV7l1aNQME4wHQYDVR0O
+BBYEFCCY5ONeqOL/KqR/SwbV5Ufb/IHHMB8GA1UdIwQYMBaAFCCY5ONeqOL/KqR/
+SwbV5Ufb/IHHMAwGA1UdEwQFMAMBAf8wCQYHKoZIzjgEAwMvADAsAhQRYSCVN/Ge
+agV3mffU3qNZ92fI0QIUPH7Jp+iASI7U1ocaYDc10qXGaGY=
 -----END CERTIFICATE-----
index b74a289ecb9c3a5ead63a465542dcddb2208a0cd..068fcdab9c051219702fe50b9a15ad443a167d4b 100644 (file)
@@ -34,7 +34,7 @@
 #include "rsa.h"
 
 
-#define YASSL_VERSION "2.3.9b"
+#define YASSL_VERSION "2.4.2"
 
 
 #if defined(__cplusplus)
index c6cb8e6e4c047f61c7798317318229d6537b6b64..2f112ac35f96578ca966250a08a53eb7847d960e 100644 (file)
@@ -1,5 +1,5 @@
 /*
-   Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
+   Copyright (c) 2000, 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
@@ -60,6 +60,7 @@ namespace yaSSL {
         time_t clicks = time(0);
         char   timeStr[32];
 
+        memset(timeStr, 0, sizeof(timeStr));
         // get rid of newline
         strncpy(timeStr, ctime(&clicks), sizeof(timeStr));
         unsigned int len = strlen(timeStr);
index ad79002a6a86a57b69c9f03e0b5e901493a5678f..8d4473653a3993c3f34b07936c80c1b79b8a2755 100644 (file)
@@ -161,7 +161,7 @@ int read_file(SSL_CTX* ctx, const char* file, int format, CertType type)
             TaoCrypt::DSA_PrivateKey dsaKey;
             dsaKey.Initialize(dsaSource);
 
-            if (rsaSource.GetError().What()) {
+            if (dsaSource.GetError().What()) {
                 // neither worked
                 ret = SSL_FAILURE;
             }
@@ -784,40 +784,67 @@ int SSL_CTX_load_verify_locations(SSL_CTX* ctx, const char* file,
         WIN32_FIND_DATA FindFileData;
         HANDLE hFind;
 
-        char name[MAX_PATH + 1];  // directory specification
-        strncpy(name, path, MAX_PATH - 3);
-        strncat(name, "\\*", 3);
+        const int DELIMITER_SZ      = 2;
+        const int DELIMITER_STAR_SZ = 3;
+        int pathSz = (int)strlen(path);
+        int nameSz = pathSz + DELIMITER_STAR_SZ + 1; // plus 1 for terminator
+        char* name = NEW_YS char[nameSz];  // directory specification
+        memset(name, 0, nameSz);
+        strncpy(name, path, nameSz - DELIMITER_STAR_SZ - 1);
+        strncat(name, "\\*", DELIMITER_STAR_SZ);
 
         hFind = FindFirstFile(name, &FindFileData);
-        if (hFind == INVALID_HANDLE_VALUE) return SSL_BAD_PATH;
+        if (hFind == INVALID_HANDLE_VALUE) {
+            ysArrayDelete(name);
+            return SSL_BAD_PATH;
+        }
 
         do {
-            if (FindFileData.dwFileAttributes != FILE_ATTRIBUTE_DIRECTORY) {
-                strncpy(name, path, MAX_PATH - 2 - HALF_PATH);
-                strncat(name, "\\", 2);
-                strncat(name, FindFileData.cFileName, HALF_PATH);
+            if (!(FindFileData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)) {
+                int curSz = (int)strlen(FindFileData.cFileName);
+                if (pathSz + curSz + DELIMITER_SZ + 1 > nameSz) {
+                    ysArrayDelete(name);
+                    // plus 1 for terminator
+                    nameSz = pathSz + curSz + DELIMITER_SZ + 1;
+                    name = NEW_YS char[nameSz];
+                }
+                memset(name, 0, nameSz);
+                strncpy(name, path, nameSz - curSz - DELIMITER_SZ - 1);
+                strncat(name, "\\", DELIMITER_SZ);
+                strncat(name, FindFileData.cFileName,
+                                            nameSz - pathSz - DELIMITER_SZ - 1);
                 ret = read_file(ctx, name, SSL_FILETYPE_PEM, CA);
             }
         } while (ret == SSL_SUCCESS && FindNextFile(hFind, &FindFileData));
 
+        ysArrayDelete(name);
         FindClose(hFind);
 
 #else   // _WIN32
-
-        const int MAX_PATH = 260;
-
         DIR* dir = opendir(path);
         if (!dir) return SSL_BAD_PATH;
 
         struct dirent* entry;
         struct stat    buf;
-        char           name[MAX_PATH + 1];
+        const int DELIMITER_SZ = 1;
+        int pathSz = (int)strlen(path);
+        int nameSz = pathSz + DELIMITER_SZ + 1; //plus 1 for null terminator
+        char* name = NEW_YS char[nameSz];  // directory specification
 
         while (ret == SSL_SUCCESS && (entry = readdir(dir))) {
-            strncpy(name, path, MAX_PATH - 1 - HALF_PATH);
-            strncat(name, "/", 1);
-            strncat(name, entry->d_name, HALF_PATH);
+            int curSz = (int)strlen(entry->d_name);
+            if (pathSz + curSz + DELIMITER_SZ + 1 > nameSz) {
+                ysArrayDelete(name);
+                nameSz = pathSz + DELIMITER_SZ + curSz + 1;
+                name = NEW_YS char[nameSz];
+            }
+            memset(name, 0, nameSz);
+            strncpy(name, path, nameSz - curSz - 1);
+            strncat(name, "/",  DELIMITER_SZ);
+            strncat(name, entry->d_name, nameSz - pathSz - DELIMITER_SZ - 1);
+
             if (stat(name, &buf) < 0) {
+                ysArrayDelete(name);
                 closedir(dir);
                 return SSL_BAD_STAT;
             }
@@ -826,6 +853,7 @@ int SSL_CTX_load_verify_locations(SSL_CTX* ctx, const char* file,
                 ret = read_file(ctx, name, SSL_FILETYPE_PEM, CA);
         }
 
+        ysArrayDelete(name);
         closedir(dir);
 
 #endif
index 267030ea095360af77d11bd1b1b2fff175910907..a00fa8a169f00397a715778c2e93ca019cf8208e 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2006, 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,6 +13,8 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
 
+INCLUDE(${MYSQL_CMAKE_SCRIPT_DIR}/compile_flags.cmake)
+
 INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/extra/yassl/taocrypt/mySTL
                     ${CMAKE_SOURCE_DIR}/extra/yassl/taocrypt/include)
 
@@ -29,6 +31,14 @@ SET(TAOCRYPT_SOURCES         src/aes.cpp src/aestables.cpp src/algebra.cpp src/arc4.cpp
                                include/random.hpp include/ripemd.hpp include/rsa.hpp include/sha.hpp
                                include/rabbit.hpp include/hc128.hpp)
 
+# Segfaults with SIGILL at high optimization levels in:
+# ModularArithmetic::SimultaneousExponentiate
+IF(CMAKE_CXX_COMPILER_ID MATCHES "SunPro")
+  IF(CMAKE_CXX_FLAGS MATCHES "-std=")
+    ADD_COMPILE_FLAGS(src/integer.cpp COMPILE_FLAGS "-xO1")
+  ENDIF()
+ENDIF()
+
 IF(HAVE_EXPLICIT_TEMPLATE_INSTANTIATION)
   SET(TAOCRYPT_SOURCES ${TAOCRYPT_SOURCES} src/template_instnt.cpp)
 ENDIF()
index 017630331560bf491faad4f0bb150b2fb432cba9..bccf6e73fc720f26b756a07307e142267e19ad1d 100644 (file)
@@ -60,6 +60,7 @@ private:
 
     static const word32 Te[5][256];
     static const word32 Td[5][256];
+    static const byte   CTd4[256];
 
     static const word32* Te0;
     static const word32* Te1;
@@ -80,11 +81,68 @@ private:
 
     void ProcessAndXorBlock(const byte*, const byte*, byte*) const;
 
+    word32 PreFetchTe() const;
+    word32 PreFetchTd() const;
+    word32 PreFetchCTd4() const;
+
     AES(const AES&);            // hide copy
     AES& operator=(const AES&); // and assign
 };
 
 
+#if defined(__x86_64__) || defined(_M_X64) || \
+           (defined(__ILP32__) && (__ILP32__ >= 1))
+    #define TC_CACHE_LINE_SZ 64
+#else
+    /* default cache line size */
+    #define TC_CACHE_LINE_SZ 32
+#endif
+
+inline word32 AES::PreFetchTe() const
+{
+    word32 x = 0;
+
+    /* 4 tables of 256 entries */
+    for (int i = 0; i < 4; i++) {
+        /* each entry is 4 bytes */
+        for (int j = 0; j < 256; j += TC_CACHE_LINE_SZ/4) {
+            x &= Te[i][j];
+        }
+    }
+
+    return x;
+}
+
+
+inline word32 AES::PreFetchTd() const
+{
+    word32 x = 0;
+
+    /* 4 tables of 256 entries */
+    for (int i = 0; i < 4; i++) {
+        /* each entry is 4 bytes */
+        for (int j = 0; j < 256; j += TC_CACHE_LINE_SZ/4) {
+            x &= Td[i][j];
+        }
+    }
+
+    return x;
+}
+
+
+inline word32 AES::PreFetchCTd4() const
+{
+    word32 x = 0;
+    int i;
+
+    for (i = 0; i < 256; i += TC_CACHE_LINE_SZ) {
+        x &= CTd4[i];
+    }
+
+    return x;
+}
+
+
 typedef BlockCipher<ENCRYPTION, AES, ECB> AES_ECB_Encryption;
 typedef BlockCipher<DECRYPTION, AES, ECB> AES_ECB_Decryption;
 
index 75a3ee3d3df80a4adfef8a7889318a67b6a93e1c..05fe189fd585f6500fb6dc42ac402f6d125c1e22 100644 (file)
@@ -119,6 +119,9 @@ namespace TaoCrypt {
 
 
 
+#ifdef _WIN32
+    #undef max // avoid name clash
+#endif
 // general MAX
 template<typename T> inline
 const T& max(const T& a, const T& b)
index ee4c7a6e8a1d35174966ea6463821d37738c6156..3fcf80ac202076917c9f24f755a4c583280558a7 100644 (file)
@@ -109,10 +109,10 @@ void AES::SetKey(const byte* userKey, word32 keylen, CipherDir /*dummy*/)
         {
             temp  = rk[3];
             rk[4] = rk[0] ^
-                (Te4[GETBYTE(temp, 2)] & 0xff000000) ^
-                (Te4[GETBYTE(temp, 1)] & 0x00ff0000) ^
-                (Te4[GETBYTE(temp, 0)] & 0x0000ff00) ^
-                (Te4[GETBYTE(temp, 3)] & 0x000000ff) ^
+                (Te2[GETBYTE(temp, 2)] & 0xff000000) ^
+                (Te3[GETBYTE(temp, 1)] & 0x00ff0000) ^
+                (Te0[GETBYTE(temp, 0)] & 0x0000ff00) ^
+                (Te1[GETBYTE(temp, 3)] & 0x000000ff) ^
                 rcon_[i];
             rk[5] = rk[1] ^ rk[4];
             rk[6] = rk[2] ^ rk[5];
@@ -128,10 +128,10 @@ void AES::SetKey(const byte* userKey, word32 keylen, CipherDir /*dummy*/)
         {
             temp = rk[ 5];
             rk[ 6] = rk[ 0] ^
-                (Te4[GETBYTE(temp, 2)] & 0xff000000) ^
-                (Te4[GETBYTE(temp, 1)] & 0x00ff0000) ^
-                (Te4[GETBYTE(temp, 0)] & 0x0000ff00) ^
-                (Te4[GETBYTE(temp, 3)] & 0x000000ff) ^
+                (Te2[GETBYTE(temp, 2)] & 0xff000000) ^
+                (Te3[GETBYTE(temp, 1)] & 0x00ff0000) ^
+                (Te0[GETBYTE(temp, 0)] & 0x0000ff00) ^
+                (Te1[GETBYTE(temp, 3)] & 0x000000ff) ^
                 rcon_[i];
             rk[ 7] = rk[ 1] ^ rk[ 6];
             rk[ 8] = rk[ 2] ^ rk[ 7];
@@ -149,10 +149,10 @@ void AES::SetKey(const byte* userKey, word32 keylen, CipherDir /*dummy*/)
         {
             temp = rk[ 7];
             rk[ 8] = rk[ 0] ^
-                (Te4[GETBYTE(temp, 2)] & 0xff000000) ^
-                (Te4[GETBYTE(temp, 1)] & 0x00ff0000) ^
-                (Te4[GETBYTE(temp, 0)] & 0x0000ff00) ^
-                (Te4[GETBYTE(temp, 3)] & 0x000000ff) ^
+                (Te2[GETBYTE(temp, 2)] & 0xff000000) ^
+                (Te3[GETBYTE(temp, 1)] & 0x00ff0000) ^
+                (Te0[GETBYTE(temp, 0)] & 0x0000ff00) ^
+                (Te1[GETBYTE(temp, 3)] & 0x000000ff) ^
                 rcon_[i];
             rk[ 9] = rk[ 1] ^ rk[ 8];
             rk[10] = rk[ 2] ^ rk[ 9];
@@ -161,10 +161,10 @@ void AES::SetKey(const byte* userKey, word32 keylen, CipherDir /*dummy*/)
                 break;
             temp = rk[11];
             rk[12] = rk[ 4] ^
-                (Te4[GETBYTE(temp, 3)] & 0xff000000) ^
-                (Te4[GETBYTE(temp, 2)] & 0x00ff0000) ^
-                (Te4[GETBYTE(temp, 1)] & 0x0000ff00) ^
-                (Te4[GETBYTE(temp, 0)] & 0x000000ff);
+                (Te2[GETBYTE(temp, 3)] & 0xff000000) ^
+                (Te3[GETBYTE(temp, 2)] & 0x00ff0000) ^
+                (Te0[GETBYTE(temp, 1)] & 0x0000ff00) ^
+                (Te1[GETBYTE(temp, 0)] & 0x000000ff);
             rk[13] = rk[ 5] ^ rk[12];
             rk[14] = rk[ 6] ^ rk[13];
             rk[15] = rk[ 7] ^ rk[14];
@@ -191,25 +191,25 @@ void AES::SetKey(const byte* userKey, word32 keylen, CipherDir /*dummy*/)
         for (i = 1; i < rounds_; i++) {
             rk += 4;
             rk[0] =
-                Td0[Te4[GETBYTE(rk[0], 3)] & 0xff] ^
-                Td1[Te4[GETBYTE(rk[0], 2)] & 0xff] ^
-                Td2[Te4[GETBYTE(rk[0], 1)] & 0xff] ^
-                Td3[Te4[GETBYTE(rk[0], 0)] & 0xff];
+                Td0[Te1[GETBYTE(rk[0], 3)] & 0xff] ^
+                Td1[Te1[GETBYTE(rk[0], 2)] & 0xff] ^
+                Td2[Te1[GETBYTE(rk[0], 1)] & 0xff] ^
+                Td3[Te1[GETBYTE(rk[0], 0)] & 0xff];
             rk[1] =
-                Td0[Te4[GETBYTE(rk[1], 3)] & 0xff] ^
-                Td1[Te4[GETBYTE(rk[1], 2)] & 0xff] ^
-                Td2[Te4[GETBYTE(rk[1], 1)] & 0xff] ^
-                Td3[Te4[GETBYTE(rk[1], 0)] & 0xff];
+                Td0[Te1[GETBYTE(rk[1], 3)] & 0xff] ^
+                Td1[Te1[GETBYTE(rk[1], 2)] & 0xff] ^
+                Td2[Te1[GETBYTE(rk[1], 1)] & 0xff] ^
+                Td3[Te1[GETBYTE(rk[1], 0)] & 0xff];
             rk[2] =
-                Td0[Te4[GETBYTE(rk[2], 3)] & 0xff] ^
-                Td1[Te4[GETBYTE(rk[2], 2)] & 0xff] ^
-                Td2[Te4[GETBYTE(rk[2], 1)] & 0xff] ^
-                Td3[Te4[GETBYTE(rk[2], 0)] & 0xff];
+                Td0[Te1[GETBYTE(rk[2], 3)] & 0xff] ^
+                Td1[Te1[GETBYTE(rk[2], 2)] & 0xff] ^
+                Td2[Te1[GETBYTE(rk[2], 1)] & 0xff] ^
+                Td3[Te1[GETBYTE(rk[2], 0)] & 0xff];
             rk[3] =
-                Td0[Te4[GETBYTE(rk[3], 3)] & 0xff] ^
-                Td1[Te4[GETBYTE(rk[3], 2)] & 0xff] ^
-                Td2[Te4[GETBYTE(rk[3], 1)] & 0xff] ^
-                Td3[Te4[GETBYTE(rk[3], 0)] & 0xff];
+                Td0[Te1[GETBYTE(rk[3], 3)] & 0xff] ^
+                Td1[Te1[GETBYTE(rk[3], 2)] & 0xff] ^
+                Td2[Te1[GETBYTE(rk[3], 1)] & 0xff] ^
+                Td3[Te1[GETBYTE(rk[3], 0)] & 0xff];
         }
     }
 }
@@ -244,6 +244,7 @@ void AES::encrypt(const byte* inBlock, const byte* xorBlock,
     s2 ^= rk[2];
     s3 ^= rk[3];
    
+    s0 |= PreFetchTe();
     /*
      * Nr - 1 full rounds:
      */
@@ -312,28 +313,28 @@ void AES::encrypt(const byte* inBlock, const byte* xorBlock,
      */
 
     s0 =
-        (Te4[GETBYTE(t0, 3)] & 0xff000000) ^
-        (Te4[GETBYTE(t1, 2)] & 0x00ff0000) ^
-        (Te4[GETBYTE(t2, 1)] & 0x0000ff00) ^
-        (Te4[GETBYTE(t3, 0)] & 0x000000ff) ^
+        (Te2[GETBYTE(t0, 3)] & 0xff000000) ^
+        (Te3[GETBYTE(t1, 2)] & 0x00ff0000) ^
+        (Te0[GETBYTE(t2, 1)] & 0x0000ff00) ^
+        (Te1[GETBYTE(t3, 0)] & 0x000000ff) ^
         rk[0];
     s1 =
-        (Te4[GETBYTE(t1, 3)] & 0xff000000) ^
-        (Te4[GETBYTE(t2, 2)] & 0x00ff0000) ^
-        (Te4[GETBYTE(t3, 1)] & 0x0000ff00) ^
-        (Te4[GETBYTE(t0, 0)] & 0x000000ff) ^
+        (Te2[GETBYTE(t1, 3)] & 0xff000000) ^
+        (Te3[GETBYTE(t2, 2)] & 0x00ff0000) ^
+        (Te0[GETBYTE(t3, 1)] & 0x0000ff00) ^
+        (Te1[GETBYTE(t0, 0)] & 0x000000ff) ^
         rk[1];
     s2 =
-        (Te4[GETBYTE(t2, 3)] & 0xff000000) ^
-        (Te4[GETBYTE(t3, 2)] & 0x00ff0000) ^
-        (Te4[GETBYTE(t0, 1)] & 0x0000ff00) ^
-        (Te4[GETBYTE(t1, 0)] & 0x000000ff) ^
+        (Te2[GETBYTE(t2, 3)] & 0xff000000) ^
+        (Te3[GETBYTE(t3, 2)] & 0x00ff0000) ^
+        (Te0[GETBYTE(t0, 1)] & 0x0000ff00) ^
+        (Te1[GETBYTE(t1, 0)] & 0x000000ff) ^
         rk[2];
     s3 =
-        (Te4[GETBYTE(t3, 3)] & 0xff000000) ^
-        (Te4[GETBYTE(t0, 2)] & 0x00ff0000) ^
-        (Te4[GETBYTE(t1, 1)] & 0x0000ff00) ^
-        (Te4[GETBYTE(t2, 0)] & 0x000000ff) ^
+        (Te2[GETBYTE(t3, 3)] & 0xff000000) ^
+        (Te3[GETBYTE(t0, 2)] & 0x00ff0000) ^
+        (Te0[GETBYTE(t1, 1)] & 0x0000ff00) ^
+        (Te1[GETBYTE(t2, 0)] & 0x000000ff) ^
         rk[3];
 
 
@@ -358,6 +359,8 @@ void AES::decrypt(const byte* inBlock, const byte* xorBlock,
     s2 ^= rk[2];
     s3 ^= rk[3];
 
+    s0 |= PreFetchTd();
+
     /*
      * Nr - 1 full rounds:
      */
@@ -423,29 +426,32 @@ void AES::decrypt(const byte* inBlock, const byte* xorBlock,
      * apply last round and
      * map cipher state to byte array block:
      */
+
+    t0 |= PreFetchCTd4();
+
     s0 =
-        (Td4[GETBYTE(t0, 3)] & 0xff000000) ^
-        (Td4[GETBYTE(t3, 2)] & 0x00ff0000) ^
-        (Td4[GETBYTE(t2, 1)] & 0x0000ff00) ^
-        (Td4[GETBYTE(t1, 0)] & 0x000000ff) ^
+        ((word32)CTd4[GETBYTE(t0, 3)] << 24) ^
+        ((word32)CTd4[GETBYTE(t3, 2)] << 16) ^
+        ((word32)CTd4[GETBYTE(t2, 1)] <<  8) ^
+        ((word32)CTd4[GETBYTE(t1, 0)]) ^
         rk[0];
     s1 =
-        (Td4[GETBYTE(t1, 3)] & 0xff000000) ^
-        (Td4[GETBYTE(t0, 2)] & 0x00ff0000) ^
-        (Td4[GETBYTE(t3, 1)] & 0x0000ff00) ^
-        (Td4[GETBYTE(t2, 0)] & 0x000000ff) ^
+        ((word32)CTd4[GETBYTE(t1, 3)]  << 24) ^
+        ((word32)CTd4[GETBYTE(t0, 2)]  << 16) ^
+        ((word32)CTd4[GETBYTE(t3, 1)]  <<  8) ^
+        ((word32)CTd4[GETBYTE(t2, 0)]) ^
         rk[1];
     s2 =
-        (Td4[GETBYTE(t2, 3)] & 0xff000000) ^
-        (Td4[GETBYTE(t1, 2)] & 0x00ff0000) ^
-        (Td4[GETBYTE(t0, 1)] & 0x0000ff00) ^
-        (Td4[GETBYTE(t3, 0)] & 0x000000ff) ^
+        ((word32)CTd4[GETBYTE(t2, 3)] << 24  ) ^
+        ((word32)CTd4[GETBYTE(t1, 2)] << 16 ) ^
+        ((word32)CTd4[GETBYTE(t0, 1)] <<  8 ) ^
+        ((word32)CTd4[GETBYTE(t3, 0)]) ^
         rk[2];
     s3 =
-        (Td4[GETBYTE(t3, 3)] & 0xff000000) ^
-        (Td4[GETBYTE(t2, 2)] & 0x00ff0000) ^
-        (Td4[GETBYTE(t1, 1)] & 0x0000ff00) ^
-        (Td4[GETBYTE(t0, 0)] & 0x000000ff) ^
+        ((word32)CTd4[GETBYTE(t3, 3)] << 24) ^
+        ((word32)CTd4[GETBYTE(t2, 2)] << 16) ^
+        ((word32)CTd4[GETBYTE(t1, 1)] <<  8) ^
+        ((word32)CTd4[GETBYTE(t0, 0)]) ^
         rk[3];
 
     gpBlock::Put(xorBlock, outBlock)(s0)(s1)(s2)(s3);
@@ -1826,18 +1832,52 @@ const word32 AES::Td[5][256] = {
 }
 };
 
+const byte AES::CTd4[256] =
+{
+    0x52U, 0x09U, 0x6aU, 0xd5U, 0x30U, 0x36U, 0xa5U, 0x38U,
+    0xbfU, 0x40U, 0xa3U, 0x9eU, 0x81U, 0xf3U, 0xd7U, 0xfbU,
+    0x7cU, 0xe3U, 0x39U, 0x82U, 0x9bU, 0x2fU, 0xffU, 0x87U,
+    0x34U, 0x8eU, 0x43U, 0x44U, 0xc4U, 0xdeU, 0xe9U, 0xcbU,
+    0x54U, 0x7bU, 0x94U, 0x32U, 0xa6U, 0xc2U, 0x23U, 0x3dU,
+    0xeeU, 0x4cU, 0x95U, 0x0bU, 0x42U, 0xfaU, 0xc3U, 0x4eU,
+    0x08U, 0x2eU, 0xa1U, 0x66U, 0x28U, 0xd9U, 0x24U, 0xb2U,
+    0x76U, 0x5bU, 0xa2U, 0x49U, 0x6dU, 0x8bU, 0xd1U, 0x25U,
+    0x72U, 0xf8U, 0xf6U, 0x64U, 0x86U, 0x68U, 0x98U, 0x16U,
+    0xd4U, 0xa4U, 0x5cU, 0xccU, 0x5dU, 0x65U, 0xb6U, 0x92U,
+    0x6cU, 0x70U, 0x48U, 0x50U, 0xfdU, 0xedU, 0xb9U, 0xdaU,
+    0x5eU, 0x15U, 0x46U, 0x57U, 0xa7U, 0x8dU, 0x9dU, 0x84U,
+    0x90U, 0xd8U, 0xabU, 0x00U, 0x8cU, 0xbcU, 0xd3U, 0x0aU,
+    0xf7U, 0xe4U, 0x58U, 0x05U, 0xb8U, 0xb3U, 0x45U, 0x06U,
+    0xd0U, 0x2cU, 0x1eU, 0x8fU, 0xcaU, 0x3fU, 0x0fU, 0x02U,
+    0xc1U, 0xafU, 0xbdU, 0x03U, 0x01U, 0x13U, 0x8aU, 0x6bU,
+    0x3aU, 0x91U, 0x11U, 0x41U, 0x4fU, 0x67U, 0xdcU, 0xeaU,
+    0x97U, 0xf2U, 0xcfU, 0xceU, 0xf0U, 0xb4U, 0xe6U, 0x73U,
+    0x96U, 0xacU, 0x74U, 0x22U, 0xe7U, 0xadU, 0x35U, 0x85U,
+    0xe2U, 0xf9U, 0x37U, 0xe8U, 0x1cU, 0x75U, 0xdfU, 0x6eU,
+    0x47U, 0xf1U, 0x1aU, 0x71U, 0x1dU, 0x29U, 0xc5U, 0x89U,
+    0x6fU, 0xb7U, 0x62U, 0x0eU, 0xaaU, 0x18U, 0xbeU, 0x1bU,
+    0xfcU, 0x56U, 0x3eU, 0x4bU, 0xc6U, 0xd2U, 0x79U, 0x20U,
+    0x9aU, 0xdbU, 0xc0U, 0xfeU, 0x78U, 0xcdU, 0x5aU, 0xf4U,
+    0x1fU, 0xddU, 0xa8U, 0x33U, 0x88U, 0x07U, 0xc7U, 0x31U,
+    0xb1U, 0x12U, 0x10U, 0x59U, 0x27U, 0x80U, 0xecU, 0x5fU,
+    0x60U, 0x51U, 0x7fU, 0xa9U, 0x19U, 0xb5U, 0x4aU, 0x0dU,
+    0x2dU, 0xe5U, 0x7aU, 0x9fU, 0x93U, 0xc9U, 0x9cU, 0xefU,
+    0xa0U, 0xe0U, 0x3bU, 0x4dU, 0xaeU, 0x2aU, 0xf5U, 0xb0U,
+    0xc8U, 0xebU, 0xbbU, 0x3cU, 0x83U, 0x53U, 0x99U, 0x61U,
+    0x17U, 0x2bU, 0x04U, 0x7eU, 0xbaU, 0x77U, 0xd6U, 0x26U,
+    0xe1U, 0x69U, 0x14U, 0x63U, 0x55U, 0x21U, 0x0cU, 0x7dU,
+};
+
 
 const word32* AES::Te0 = AES::Te[0];
 const word32* AES::Te1 = AES::Te[1];
 const word32* AES::Te2 = AES::Te[2];
 const word32* AES::Te3 = AES::Te[3];
-const word32* AES::Te4 = AES::Te[4];
 
 const word32* AES::Td0 = AES::Td[0];
 const word32* AES::Td1 = AES::Td[1];
 const word32* AES::Td2 = AES::Td[2];
 const word32* AES::Td3 = AES::Td[3];
-const word32* AES::Td4 = AES::Td[4];
 
 
 
index 24f7664893f9295832e13b71f41502dcea79e804..e0aef45fc276c7e3db99921c82ce29048cc50503 100644 (file)
@@ -1223,17 +1223,17 @@ word32 DecodeDSA_Signature(byte* decoded, const byte* encoded, word32 sz)
     }
     word32 rLen = GetLength(source);
     if (rLen != 20) {
-        if (rLen == 21) {       // zero at front, eat
+        while (rLen > 20 && source.remaining() > 0) {  // zero's at front, eat
             source.next();
             --rLen;
         }
-        else if (rLen == 19) {  // add zero to front so 20 bytes
+        if (rLen < 20) { // add zero's to front so 20 bytes
+            word32 tmpLen = rLen;
+            while (tmpLen < 20) {
             decoded[0] = 0;
             decoded++;
+                tmpLen++;
         }
-        else {
-            source.SetError(DSA_SZ_E);
-            return 0;
         }
     }
     memcpy(decoded, source.get_buffer() + source.get_index(), rLen);
@@ -1246,17 +1246,17 @@ word32 DecodeDSA_Signature(byte* decoded, const byte* encoded, word32 sz)
     }
     word32 sLen = GetLength(source);
     if (sLen != 20) {
-        if (sLen == 21) {
-            source.next();          // zero at front, eat
+        while (sLen > 20 && source.remaining() > 0) {
+            source.next();          // zero's at front, eat
             --sLen;
         }
-        else if (sLen == 19) {
-            decoded[rLen] = 0;      // add zero to front so 20 bytes
+        if (sLen < 20) { // add zero's to front so 20 bytes
+            word32 tmpLen = sLen;
+            while (tmpLen < 20) {
+                decoded[rLen] = 0;
             decoded++;
+                tmpLen++;
         }
-        else {
-            source.SetError(DSA_SZ_E);
-            return 0;
         }
     }
     memcpy(decoded + rLen, source.get_buffer() + source.get_index(), sLen);
index bf116d3e48d12b268940c7cb981bf1621d829124..b19fed9235b2402fd39c8288152d3073d052d1e9 100644 (file)
@@ -172,6 +172,7 @@ word32 DSA_Signer::Sign(const byte* sha_digest, byte* sig,
     const Integer& q = key_.GetSubGroupOrder();
     const Integer& g = key_.GetSubGroupGenerator();
     const Integer& x = key_.GetPrivatePart();
+    byte* tmpPtr = sig;  // initial signature output
 
     Integer k(rng, 1, q - 1);
 
@@ -187,22 +188,23 @@ word32 DSA_Signer::Sign(const byte* sha_digest, byte* sig,
         return -1;
 
     int rSz = r_.ByteCount();
+    int tmpSz = rSz;
 
-    if (rSz == 19) {
-        sig[0] = 0;
-        sig++;
+    while (tmpSz++ < SHA::DIGEST_SIZE) {
+        *sig++ = 0;
     }
     
     r_.Encode(sig,  rSz);
 
+    sig = tmpPtr + SHA::DIGEST_SIZE;  // advance sig output to s
     int sSz = s_.ByteCount();
+    tmpSz = sSz;
 
-    if (sSz == 19) {
-        sig[rSz] = 0;
-        sig++;
+    while (tmpSz++ < SHA::DIGEST_SIZE) {
+        *sig++ = 0;
     }
 
-    s_.Encode(sig + rSz, sSz);
+    s_.Encode(sig, sSz);
 
     return 40;
 }
index a7d5cb3e8af35c42828f0581b6adf2a8fa253c45..fc1f0e8762ddc658faa024a9fed58510ecb07091 100644 (file)
@@ -1277,6 +1277,9 @@ int dsa_test()
     if (!verifier.Verify(digest, decoded))
         return -90;
 
+    if (!verifier.Verify(digest, signature))
+        return -91;
+
     return 0;
 }
 
index 94ab24fd041f8e540cd91e518d6802ed27b52788..92d41706c61eefb3482047d8881c2ab4b09bc857 100644 (file)
@@ -22,7 +22,6 @@
 #define yaSSL_TEST_HPP
 
 #include "runtime.hpp"
-#include "openssl/ssl.h"   /* openssl compatibility test */
 #include "error.hpp"
 #include <stdio.h>
 #include <stdlib.h>
@@ -56,6 +55,7 @@
 #endif
     #define SOCKET_T int
 #endif /* _WIN32 */
+#include "openssl/ssl.h"   /* openssl compatibility test */
 
 
 #ifdef _MSC_VER
index 190901a22887a8f5f03d390ae0d253d1e0c7783e..23a5b7af2a51d404cfcc5691abb65e17bc765cbf 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef ATOMIC_NOLOCK_INCLUDED
 #define ATOMIC_NOLOCK_INCLUDED
 
-/* Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved. reserved.
+/* Copyright (c) 2006, 2016, Oracle and/or its affiliates. All rights reserved. reserved.
    reserved.
 
    This program is free software; you can redistribute it and/or modify
@@ -44,7 +44,7 @@
   Type not used so minimal size (emptry struct has different size between C
   and C++, zero-length array is gcc-specific).
 */
-typedef char my_atomic_rwlock_t __attribute__ ((unused));
+typedef char my_atomic_rwlock_t MY_ATTRIBUTE ((unused));
 #define my_atomic_rwlock_destroy(name)
 #define my_atomic_rwlock_init(name)
 #define my_atomic_rwlock_rdlock(name)
index d807b216651b350ff4a0def0ccaac61d56bfce9a..958dedf07c09da3b367b47f7a3136f185fd64d15 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2007, 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
 #ifndef _lf_h
 #define _lf_h
 
-#include <my_atomic.h>
+#include "my_global.h"
+#include "my_atomic.h"
+#include "my_sys.h"
+#include "hash.h"
 
 C_MODE_START
 
@@ -111,13 +114,12 @@ typedef struct {
 typedef struct {
   void * volatile pin[LF_PINBOX_PINS];
   LF_PINBOX *pinbox;
-  void  **stack_ends_here;
   void  *purgatory;
   uint32 purgatory_count;
   uint32 volatile link;
 /* we want sizeof(LF_PINS) to be 64 to avoid false sharing */
-#if SIZEOF_INT*2+SIZEOF_CHARP*(LF_PINBOX_PINS+3) != 64
-  char pad[64-sizeof(uint32)*2-sizeof(void*)*(LF_PINBOX_PINS+3)];
+#if SIZEOF_INT*2+SIZEOF_CHARP*(LF_PINBOX_PINS+2) != 64
+  char pad[64-sizeof(uint32)*2-sizeof(void*)*(LF_PINBOX_PINS+2)];
 #endif
 } LF_PINS;
 
@@ -138,7 +140,7 @@ typedef struct {
 #if defined(__GNUC__) && defined(MY_LF_EXTRA_DEBUG)
 #define LF_REQUIRE_PINS(N)                                      \
   static const char require_pins[LF_PINBOX_PINS-N]              \
-                             __attribute__ ((unused));          \
+                             MY_ATTRIBUTE ((unused));          \
   static const int LF_NUM_PINS_IN_THIS_FILE= N;
 #define _lf_pin(PINS, PIN, ADDR)                                \
   (                                                             \
@@ -211,15 +213,6 @@ lock_wrap(lf_alloc_new, void *,
           (pins),
           &pins->pinbox->pinarray.lock)
 
-C_MODE_END
-
-/*
-  extendible hash, lf_hash.c
-*/
-#include <hash.h>
-
-C_MODE_START
-
 #define LF_HASH_UNIQUE 1
 
 /* lf_hash overhead per element (that is, sizeof(LF_SLIST) */
index 2c9c5f75dadb6215b4041e16e56763b7e72f3398..f6933edd3c9b637d64d8e380fecd5f26c2d38718 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 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
@@ -658,10 +658,10 @@ int my_wildcmp_mb_bin(const CHARSET_INFO *cs,
                       const char *wildstr,const char *wildend,
                       int escape, int w_one, int w_many);
 
-int my_strcasecmp_mb_bin(const CHARSET_INFO * cs __attribute__((unused)),
+int my_strcasecmp_mb_bin(const CHARSET_INFO * cs MY_ATTRIBUTE((unused)),
                          const char *s, const char *t);
 
-void my_hash_sort_mb_bin(const CHARSET_INFO *cs __attribute__((unused)),
+void my_hash_sort_mb_bin(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
                          const uchar *key, size_t len,ulong *nr1, ulong *nr2);
 
 size_t my_strnxfrm_mb(const CHARSET_INFO *,
index 705f531e30eb31f0b8bc0c643f061c7ccdd907d0..1539d1eb4ec967856cb23fd2b4d56a3606972208 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef MY_ATOMIC_INCLUDED
 #define MY_ATOMIC_INCLUDED
 
-/* Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2006, 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
         typedef union {                                         \
           int  ## S  i;                                         \
           uint ## S  u;                                         \
-        } U_ ## S   __attribute__ ((transparent_union));        \
+        } U_ ## S   MY_ATTRIBUTE ((transparent_union));        \
         typedef union {                                         \
           int  ## S volatile *i;                                \
           uint ## S volatile *u;                                \
-        } Uv_ ## S   __attribute__ ((transparent_union));
+        } Uv_ ## S   MY_ATTRIBUTE ((transparent_union));
 #define uintptr intptr
 make_transparent_unions(8)
 make_transparent_unions(16)
index 78999f25675f39f0f924a8a083c3fd51c8244d9d..5ee4eb1616a39882a64c753c4107ee7631cdcb16 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 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
 #endif
 
 /*
-  Disable __attribute__() on gcc < 2.7, g++ < 3.4, and non-gcc compilers.
+  Disable MY_ATTRIBUTE() on g++ < 3.4, and non-gcc compilers.
   Some forms of __attribute__ are actually supported in earlier versions of
   g++, but we just disable them all because we only use them to generate
   compilation warnings.
 */
-#ifndef __attribute__
-# if !defined(__GNUC__)
-#  define __attribute__(A)
-# elif GCC_VERSION < 2008
-#  define __attribute__(A)
-# elif defined(__cplusplus) && GCC_VERSION < 3004
-#  define __attribute__(A)
-# endif
+#ifndef MY_ATTRIBUTE
+#if defined(__GNUC__) && GCC_VERSION > 3003
+#  define MY_ATTRIBUTE(A) __attribute__(A)
+#else
+#  define MY_ATTRIBUTE(A)
+#endif
 #endif
 
 /*
-  __attribute__((format(...))) is only supported in gcc >= 2.8 and g++ >= 3.4
-  But that's already covered by the __attribute__ tests above, so this is
+  __attribute__((format(...))) is only supported in g++ >= 3.4
+  But that's already covered by the MY_ATTRIBUTE tests above, so this is
   just a convenience macro.
 */
 #ifndef ATTRIBUTE_FORMAT
-# define ATTRIBUTE_FORMAT(style, m, n) __attribute__((format(style, m, n)))
+#  define ATTRIBUTE_FORMAT(style, m, n) MY_ATTRIBUTE((format(style, m, n)))
 #endif
 
-/*
-
-   __attribute__((format(...))) on a function pointer is not supported
-   until  gcc 3.1
-*/
 #ifndef ATTRIBUTE_FORMAT_FPTR
-# if (GCC_VERSION >= 3001)
 #  define ATTRIBUTE_FORMAT_FPTR(style, m, n) ATTRIBUTE_FORMAT(style, m, n)
-# else
-#  define ATTRIBUTE_FORMAT_FPTR(style, m, n)
-# endif /* GNUC >= 3.1 */
 #endif
 
 
index 1c217d452917ef96078f7775d73f634eb787a834..66d6d918ef96e556697b2621b10f7e45e3798420 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2012, 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
@@ -25,6 +25,7 @@ extern const char *my_defaults_extra_file;
 extern const char *my_defaults_group_suffix;
 extern const char *my_defaults_file;
 extern my_bool my_getopt_use_args_separator;
+extern my_bool my_defaults_read_login_file;
 
 /* Define the type of function to be passed to process_default_option_files */
 typedef int (*Process_option_func)(void *ctx, const char *group_name,
@@ -33,16 +34,18 @@ typedef int (*Process_option_func)(void *ctx, const char *group_name,
 my_bool my_getopt_is_args_separator(const char* arg);
 int get_defaults_options(int argc, char **argv,
                          char **defaults, char **extra_defaults,
-                         char **group_suffix, char **login_path);
+                         char **group_suffix, char **login_path,
+                         my_bool found_no_defaults);
 int my_load_defaults(const char *conf_file, const char **groups,
                      int *argc, char ***argv, const char ***);
-int check_file_permissions(const char *file_name);
+int check_file_permissions(const char *file_name, my_bool is_login_file);
 int load_defaults(const char *conf_file, const char **groups,
                   int *argc, char ***argv);
 int my_search_option_files(const char *conf_file, int *argc,
                            char ***argv, uint *args_used,
                            Process_option_func func, void *func_ctx,
-                           const char **default_directories);
+                           const char **default_directories,
+                           my_bool is_login_file, my_bool found_no_defaults);
 void free_defaults(char **argv);
 void my_print_default_files(const char *conf_file);
 void print_defaults(const char *conf_file, const char **groups);
index aadaffe5e083c0799285f9ca536aaf142198075a..5f716d4eb89d409bb1783edfb7af36845e2797c7 100644 (file)
@@ -1,5 +1,5 @@
 /*
-   Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
+   Copyright (c) 2001, 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
   other reason to use them is for documentation
 */
 
-#if !defined(__GNUC__) || (__GNUC__ == 2 && __GNUC_MINOR__ < 96)
+#if !defined(__builtin_expect)
 #define __builtin_expect(x, expected_value) (x)
 #endif
 
@@ -374,7 +374,7 @@ C_MODE_END
 #define compile_time_assert(X)                                  \
   do                                                            \
   {                                                             \
-    typedef char compile_time_assert[(X) ? 1 : -1] __attribute__((unused)); \
+    typedef char compile_time_assert[(X) ? 1 : -1] MY_ATTRIBUTE((unused)); \
   } while(0)
 #endif
 
index 6463ceeac3480ccf47bbbbd6540a85b50b36a270..7dd8a8f606f4aa2ca47aacd28c19d9fa8a4d48ea 100644 (file)
@@ -853,14 +853,13 @@ struct st_my_thread_var
   my_bool init;
   struct st_my_thread_var *next,**prev;
   void *opt_info;
-  void  *stack_ends_here;
 #ifndef DBUG_OFF
   void *dbug;
   char name[THREAD_NAME_SIZE+1];
 #endif
 };
 
-extern struct st_my_thread_var *_my_thread_var(void) __attribute__ ((const));
+extern struct st_my_thread_var *_my_thread_var(void) MY_ATTRIBUTE ((const));
 extern int set_mysys_var(struct st_my_thread_var *mysys_var);
 extern void **my_thread_var_dbug();
 extern uint my_thread_end_wait_time;
index 76f0be71124c152b44c2dd9c78a2082917528302..fa1203b46ce8cc87aad6ea56f84e5125da605791 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 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
@@ -84,6 +84,7 @@ typedef struct my_aio_result {
 #define MY_RESOLVE_LINK 128    /* my_realpath(); Only resolve links */
 #define MY_HOLD_ORIGINAL_MODES 128  /* my_copy() holds to file modes */
 #define MY_REDEL_MAKE_BACKUP 256
+#define MY_REDEL_NO_COPY_STAT 512 /* my_redel() doesn't call my_copystat() */
 #define MY_SEEK_NOT_DONE 32    /* my_lock may have to do a seek */
 #define MY_DONT_WAIT   64      /* my_lock() don't wait if can't lock */
 #define MY_ZEROFILL    32      /* my_malloc(), fill array with zero */
@@ -712,7 +713,6 @@ extern size_t cleanup_dirname(char * to,const char *from);
 extern size_t system_filename(char * to,const char *from);
 extern size_t unpack_filename(char * to,const char *from);
 extern char * intern_filename(char * to,const char *from);
-extern char * directory_file_name(char * dst, const char *src);
 extern int pack_filename(char * to, const char *name, size_t max_length);
 extern char * my_path(char * to,const char *progname,
                         const char *own_pathname_part);
index c86e48b0fd360e7ecf7077fb37df6da20c22a381..3db7b3904f352a0e98a3f812111e2ae7f11ba454 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 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
@@ -62,7 +62,7 @@ typedef struct st_tree {
 } TREE;
 
        /* Functions on whole tree */
-void init_tree(TREE *tree, ulong default_alloc_size, ulong memory_limit,
+void init_tree(TREE *tree, size_t default_alloc_size, ulong memory_limit,
                int size, qsort_cmp2 compare, my_bool with_delete,
               tree_element_free free_element, const void *custom_arg);
 void delete_tree(TREE*);
index 770bb7269a70f4de1d204dd8b0ddcdce58e9762d..63248097700de49734dbe93ceb4548ba010eb217 100644 (file)
@@ -1,5 +1,5 @@
 /*
-   Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+   Copyright (c) 2000, 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
@@ -426,12 +426,13 @@ int chk_size(MI_CHECK *param, MI_INFO *info);
 int chk_key(MI_CHECK *param, MI_INFO *info);
 int chk_data_link(MI_CHECK *param, MI_INFO *info,int extend);
 int mi_repair(MI_CHECK *param, register MI_INFO *info,
-             char * name, int rep_quick);
-int mi_sort_index(MI_CHECK *param, register MI_INFO *info, char * name);
+             char * name, int rep_quick, my_bool no_copy_stat);
+int mi_sort_index(MI_CHECK *param, register MI_INFO *info, char * name,
+                  my_bool no_copy_stat);
 int mi_repair_by_sort(MI_CHECK *param, register MI_INFO *info,
-                     const char * name, int rep_quick);
+                     const char * name, int rep_quick, my_bool no_copy_stat);
 int mi_repair_parallel(MI_CHECK *param, register MI_INFO *info,
-                     const char * name, int rep_quick);
+                       const char * name, int rep_quick, my_bool no_copy_stat);
 int change_to_newfile(const char * filename, const char * old_ext,
                      const char * new_ext, myf myflags);
 int lock_file(MI_CHECK *param, File file, my_off_t start, int lock_type,
index c839b2b019bbb337d367158bd3ec98292648a52b..a83e2ef8a1df526bfd6e32b2676f8f02dd733545 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2008, 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
@@ -511,9 +511,9 @@ static inline void inline_mysql_file_register(
   PSI_file_info *info,
   int count
 #else
-  const char *category __attribute__ ((unused)),
-  void *info __attribute__ ((unused)),
-  int count __attribute__ ((unused))
+  const char *category MY_ATTRIBUTE ((unused)),
+  void *info MY_ATTRIBUTE ((unused)),
+  int count MY_ATTRIBUTE ((unused))
 #endif
 )
 {
index e1d56539f853ccc85b6a7de5fea7d99ec49db96b..209f113ffe272ba66f1824caef88d5635640afa3 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2010, 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
@@ -114,9 +114,9 @@ mysql_socket_set_address(
   const struct sockaddr *addr,
   socklen_t addr_len
 #else
-  MYSQL_SOCKET socket __attribute__ ((unused)),
-  const struct sockaddr *addr __attribute__ ((unused)),
-  socklen_t addr_len __attribute__ ((unused))
+  MYSQL_SOCKET socket MY_ATTRIBUTE ((unused)),
+  const struct sockaddr *addr MY_ATTRIBUTE ((unused)),
+  socklen_t addr_len MY_ATTRIBUTE ((unused))
 #endif
 )
 {
@@ -136,7 +136,7 @@ mysql_socket_set_thread_owner(
 #ifdef HAVE_PSI_SOCKET_INTERFACE
 MYSQL_SOCKET socket
 #else
-MYSQL_SOCKET socket __attribute__ ((unused))
+MYSQL_SOCKET socket MY_ATTRIBUTE ((unused))
 #endif
 )
 {
index 99fcd348e87fbaf8846c015205e47418511daf09..ee2693d2863baed24250a47719ae433a5e2f12ee 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2008, 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
@@ -587,9 +587,9 @@ static inline void inline_mysql_mutex_register(
   PSI_mutex_info *info,
   int count
 #else
-  const char *category __attribute__ ((unused)),
-  void *info __attribute__ ((unused)),
-  int count __attribute__ ((unused))
+  const char *category MY_ATTRIBUTE ((unused)),
+  void *info MY_ATTRIBUTE ((unused)),
+  int count MY_ATTRIBUTE ((unused))
 #endif
 )
 {
@@ -771,9 +771,9 @@ static inline void inline_mysql_rwlock_register(
   PSI_rwlock_info *info,
   int count
 #else
-  const char *category __attribute__ ((unused)),
-  void *info __attribute__ ((unused)),
-  int count __attribute__ ((unused))
+  const char *category MY_ATTRIBUTE ((unused)),
+  void *info MY_ATTRIBUTE ((unused)),
+  int count MY_ATTRIBUTE ((unused))
 #endif
 )
 {
@@ -1089,9 +1089,9 @@ static inline void inline_mysql_cond_register(
   PSI_cond_info *info,
   int count
 #else
-  const char *category __attribute__ ((unused)),
-  void *info __attribute__ ((unused)),
-  int count __attribute__ ((unused))
+  const char *category MY_ATTRIBUTE ((unused)),
+  void *info MY_ATTRIBUTE ((unused)),
+  int count MY_ATTRIBUTE ((unused))
 #endif
 )
 {
@@ -1231,9 +1231,9 @@ static inline void inline_mysql_thread_register(
   PSI_thread_info *info,
   int count
 #else
-  const char *category __attribute__ ((unused)),
-  void *info __attribute__ ((unused)),
-  int count __attribute__ ((unused))
+  const char *category MY_ATTRIBUTE ((unused)),
+  void *info MY_ATTRIBUTE ((unused)),
+  int count MY_ATTRIBUTE ((unused))
 #endif
 )
 {
index 790888b533173c1a7371bfa2ec5275ba7bc8ffc9..7b9c76266039a390807619665462cab9db6e2326 100644 (file)
@@ -234,7 +234,11 @@ 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(WITH_SYMVER16)
+      CONFIGURE_FILE(libmysql.ver16.in ${CMAKE_CURRENT_BINARY_DIR}/libmysql.ver)
+    ELSE()
+      CONFIGURE_FILE(libmysql.ver.in ${CMAKE_CURRENT_BINARY_DIR}/libmysql.ver)
+    ENDIF()
 
     GET_TARGET_PROPERTY(libmysql_link_flags libmysql LINK_FLAGS)
     IF(NOT libmysql_link_flag)
index af8f3d6f7e070611c106559110725a42a38351b4..e57d95a095db11c76654b02f430ab5d18f779064 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 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
@@ -111,9 +111,9 @@ typedef struct st_mysql_stmt_extension
     1  could not initialize environment (out of memory or thread keys)
 */
 
-int STDCALL mysql_server_init(int argc __attribute__((unused)),
-                             char **argv __attribute__((unused)),
-                             char **groups __attribute__((unused)))
+int STDCALL mysql_server_init(int argc MY_ATTRIBUTE((unused)),
+                             char **argv MY_ATTRIBUTE((unused)),
+                             char **groups MY_ATTRIBUTE((unused)))
 {
   int result= 0;
   if (!mysql_client_init)
@@ -128,7 +128,7 @@ int STDCALL mysql_server_init(int argc __attribute__((unused)),
     if (!mysql_port)
     {
       char *env;
-      struct servent *serv_ptr __attribute__((unused));
+      struct servent *serv_ptr MY_ATTRIBUTE((unused));
 
       mysql_port = MYSQL_PORT;
 
@@ -264,7 +264,7 @@ append_wild(char *to, char *end, const char *wild)
 **************************************************************************/
 
 void STDCALL
-mysql_debug(const char *debug __attribute__((unused)))
+mysql_debug(const char *debug MY_ATTRIBUTE((unused)))
 {
 #ifndef DBUG_OFF
   char *env;
@@ -299,7 +299,7 @@ mysql_debug(const char *debug __attribute__((unused)))
 **************************************************************************/
 
 sig_handler
-my_pipe_sig_handler(int sig __attribute__((unused)))
+my_pipe_sig_handler(int sig MY_ATTRIBUTE((unused)))
 {
   DBUG_PRINT("info",("Hit by signal %d",sig));
 #ifdef SIGNAL_HANDLER_RESET_ON_DELIVERY
@@ -559,7 +559,7 @@ typedef struct st_default_local_infile
 */
 
 static int default_local_infile_init(void **ptr, const char *filename,
-             void *userdata __attribute__ ((unused)))
+             void *userdata MY_ATTRIBUTE ((unused)))
 {
   default_local_infile_data *data;
   char tmp_name[FN_REFLEN];
@@ -2341,15 +2341,15 @@ stmt_read_row_from_cursor(MYSQL_STMT *stmt, unsigned char **row)
 */
 
 static int
-stmt_read_row_no_data(MYSQL_STMT *stmt  __attribute__((unused)),
-                      unsigned char **row  __attribute__((unused)))
+stmt_read_row_no_data(MYSQL_STMT *stmt  MY_ATTRIBUTE((unused)),
+                      unsigned char **row  MY_ATTRIBUTE((unused)))
 {
   return MYSQL_NO_DATA;
 }
 
 static int
-stmt_read_row_no_result_set(MYSQL_STMT *stmt  __attribute__((unused)),
-                      unsigned char **row  __attribute__((unused)))
+stmt_read_row_no_result_set(MYSQL_STMT *stmt  MY_ATTRIBUTE((unused)),
+                      unsigned char **row  MY_ATTRIBUTE((unused)))
 {
   set_stmt_error(stmt, CR_NO_RESULT_SET, unknown_sqlstate, NULL);
   return 1;
@@ -3708,7 +3708,7 @@ static void fetch_result_short(MYSQL_BIND *param, MYSQL_FIELD *field,
 }
 
 static void fetch_result_int32(MYSQL_BIND *param,
-                               MYSQL_FIELD *field __attribute__((unused)),
+                               MYSQL_FIELD *field MY_ATTRIBUTE((unused)),
                                uchar **row)
 {
   my_bool field_is_unsigned= MY_TEST(field->flags & UNSIGNED_FLAG);
@@ -3719,7 +3719,7 @@ static void fetch_result_int32(MYSQL_BIND *param,
 }
 
 static void fetch_result_int64(MYSQL_BIND *param,
-                               MYSQL_FIELD *field __attribute__((unused)),
+                               MYSQL_FIELD *field MY_ATTRIBUTE((unused)),
                                uchar **row)
 {
   my_bool field_is_unsigned= MY_TEST(field->flags & UNSIGNED_FLAG);
@@ -3730,7 +3730,7 @@ static void fetch_result_int64(MYSQL_BIND *param,
 }
 
 static void fetch_result_float(MYSQL_BIND *param,
-                               MYSQL_FIELD *field __attribute__((unused)),
+                               MYSQL_FIELD *field MY_ATTRIBUTE((unused)),
                                uchar **row)
 {
   float value;
@@ -3740,7 +3740,7 @@ static void fetch_result_float(MYSQL_BIND *param,
 }
 
 static void fetch_result_double(MYSQL_BIND *param,
-                                MYSQL_FIELD *field __attribute__((unused)),
+                                MYSQL_FIELD *field MY_ATTRIBUTE((unused)),
                                 uchar **row)
 {
   double value;
@@ -3750,7 +3750,7 @@ static void fetch_result_double(MYSQL_BIND *param,
 }
 
 static void fetch_result_time(MYSQL_BIND *param,
-                              MYSQL_FIELD *field __attribute__((unused)),
+                              MYSQL_FIELD *field MY_ATTRIBUTE((unused)),
                               uchar **row)
 {
   MYSQL_TIME *tm= (MYSQL_TIME *)param->buffer;
@@ -3758,7 +3758,7 @@ static void fetch_result_time(MYSQL_BIND *param,
 }
 
 static void fetch_result_date(MYSQL_BIND *param,
-                              MYSQL_FIELD *field __attribute__((unused)),
+                              MYSQL_FIELD *field MY_ATTRIBUTE((unused)),
                               uchar **row)
 {
   MYSQL_TIME *tm= (MYSQL_TIME *)param->buffer;
@@ -3766,7 +3766,7 @@ static void fetch_result_date(MYSQL_BIND *param,
 }
 
 static void fetch_result_datetime(MYSQL_BIND *param,
-                                  MYSQL_FIELD *field __attribute__((unused)),
+                                  MYSQL_FIELD *field MY_ATTRIBUTE((unused)),
                                   uchar **row)
 {
   MYSQL_TIME *tm= (MYSQL_TIME *)param->buffer;
@@ -3774,7 +3774,7 @@ static void fetch_result_datetime(MYSQL_BIND *param,
 }
 
 static void fetch_result_bin(MYSQL_BIND *param,
-                             MYSQL_FIELD *field __attribute__((unused)),
+                             MYSQL_FIELD *field MY_ATTRIBUTE((unused)),
                              uchar **row)
 {
   ulong length= net_field_length(row);
@@ -3786,7 +3786,7 @@ static void fetch_result_bin(MYSQL_BIND *param,
 }
 
 static void fetch_result_str(MYSQL_BIND *param,
-                             MYSQL_FIELD *field __attribute__((unused)),
+                             MYSQL_FIELD *field MY_ATTRIBUTE((unused)),
                              uchar **row)
 {
   ulong length= net_field_length(row);
@@ -3807,7 +3807,7 @@ static void fetch_result_str(MYSQL_BIND *param,
 */
 
 static void skip_result_fixed(MYSQL_BIND *param,
-                             MYSQL_FIELD *field __attribute__((unused)),
+                             MYSQL_FIELD *field MY_ATTRIBUTE((unused)),
                              uchar **row)
 
 {
@@ -3815,8 +3815,8 @@ static void skip_result_fixed(MYSQL_BIND *param,
 }
 
 
-static void skip_result_with_length(MYSQL_BIND *param __attribute__((unused)),
-                                   MYSQL_FIELD *field __attribute__((unused)),
+static void skip_result_with_length(MYSQL_BIND *param MY_ATTRIBUTE((unused)),
+                                   MYSQL_FIELD *field MY_ATTRIBUTE((unused)),
                                    uchar **row)
 
 {
@@ -3825,7 +3825,7 @@ static void skip_result_with_length(MYSQL_BIND *param __attribute__((unused)),
 }
 
 
-static void skip_result_string(MYSQL_BIND *param __attribute__((unused)),
+static void skip_result_string(MYSQL_BIND *param MY_ATTRIBUTE((unused)),
                               MYSQL_FIELD *field,
                               uchar **row)
 
@@ -4922,3 +4922,615 @@ my_bool STDCALL mysql_read_query_result(MYSQL *mysql)
   return (*mysql->methods->read_query_result)(mysql);
 }
 
+#if defined(EXPORT_SYMVER16)
+#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
+#endif  /* EXPORT_SYMVER16 */
index 20eb0fd41bb3f08aec61bd3b76e8261e94ad23e1..98dbfe2d2fcc4861f8917d5ff25f3499eec8211e 100644 (file)
@@ -1 +1,16 @@
+/* Copyright (c) 2006, 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 */
+
 libmysqlclient_@SHARED_LIB_MAJOR_VERSION@ { global: *; };
diff --git a/mysql-wsrep-5.6/libmysql/libmysql.ver16.in b/mysql-wsrep-5.6/libmysql/libmysql.ver16.in
new file mode 100644 (file)
index 0000000..7b0cab4
--- /dev/null
@@ -0,0 +1,151 @@
+/* Copyright (c) 2014, 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 */
+
+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;
index 4cdb5ec99f9d6f47c685a3e4e911955c54b2ea41..f1794d9c35a7d1c1e0ef763b61dc871a55e3997d 100644 (file)
@@ -2,7 +2,7 @@
  * Copyright (c)  2000
  * SWsoft  company
  *
- * Modifications copyright (c) 2001, 2015. Oracle and/or its affiliates.
+ * Modifications copyright (c) 2001, 2016. Oracle and/or its affiliates.
  * All rights reserved.
  *
  * This material is provided "as is", with absolutely no warranty expressed
@@ -213,8 +213,8 @@ static void emb_flush_use_result(MYSQL *mysql, my_bool)
 */
 
 static MYSQL_DATA *
-emb_read_rows(MYSQL *mysql, MYSQL_FIELD *mysql_fields __attribute__((unused)),
-             unsigned int fields __attribute__((unused)))
+emb_read_rows(MYSQL *mysql, MYSQL_FIELD *mysql_fields MY_ATTRIBUTE((unused)),
+             unsigned int fields MY_ATTRIBUTE((unused)))
 {
   MYSQL_DATA *result= ((THD*)mysql->thd)->cur_data;
   ((THD*)mysql->thd)->cur_data= 0;
@@ -1426,7 +1426,7 @@ bool Protocol::net_store_data(const uchar *from, size_t length)
 #define vsnprintf _vsnprintf
 #endif
 
-int vprint_msg_to_log(enum loglevel level __attribute__((unused)),
+int vprint_msg_to_log(enum loglevel level MY_ATTRIBUTE((unused)),
                        const char *format, va_list argsi)
 {
   my_vsnprintf(mysql_server_last_error, sizeof(mysql_server_last_error),
index be76ce5b3d0a972f4cf36ca37b3147d9956a5c4f..35f2caee16287a697ba2152a9a311e7ffe82b4d3 100644 (file)
@@ -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 <http://docbook.sf.net/>
-.\"      Date: 03/02/2016
+.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
+.\"      Date: 08/25/2016
 .\"    Manual: MySQL Database System
 .\"    Source: MySQL 5.6
 .\"  Language: English
 .\"
-.TH "\FBCOMP_ERR\FR" "1" "03/02/2016" "MySQL 5\&.6" "MySQL Database System"
+.TH "\FBCOMP_ERR\FR" "1" "08/25/2016" "MySQL 5\&.6" "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"
@@ -45,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
@@ -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,13 +158,11 @@ 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
 The name of the input file\&. The default is
-\&.\&./sql/share/errmsg\&.txt\&.
+\&.\&./sql/share/errmsg\-utf8\&.txt\&.
 .RE
 .sp
 .RS 4
@@ -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
index 91804062895f6e96ad360783bdb25de41ed4d645..26dee3e682491a4207c4f7146d0ee235ab00656c 100644 (file)
@@ -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 <http://docbook.sf.net/>
-.\"      Date: 03/02/2016
+.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
+.\"      Date: 08/25/2016
 .\"    Manual: MySQL Database System
 .\"    Source: MySQL 5.6
 .\"  Language: English
 .\"
-.TH "\FBINNOCHECKSUM\FR" "1" "03/02/2016" "MySQL 5\&.6" "MySQL Database System"
+.TH "\FBINNOCHECKSUM\FR" "1" "08/25/2016" "MySQL 5\&.6" "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"
index 8fcf95547fda4466084c2fd6445dbede70335d0b..d2c1c5be6a784a91bcc6136336e0a7f28ffeba70 100644 (file)
@@ -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 <http://docbook.sf.net/>
-.\"      Date: 03/02/2016
+.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
+.\"      Date: 08/25/2016
 .\"    Manual: MySQL Database System
 .\"    Source: MySQL 5.6
 .\"  Language: English
 .\"
-.TH "\FBMSQL2MYSQL\FR" "1" "03/02/2016" "MySQL 5\&.6" "MySQL Database System"
+.TH "\FBMSQL2MYSQL\FR" "1" "08/25/2016" "MySQL 5\&.6" "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"
index f1ab6e5abcdf11ccb6041dff617b02676e541ee0..b083cbbab815c4c911390116d1ddfc814742ccdb 100644 (file)
@@ -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 <http://docbook.sf.net/>
-.\"      Date: 03/02/2016
+.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
+.\"      Date: 08/25/2016
 .\"    Manual: MySQL Database System
 .\"    Source: MySQL 5.6
 .\"  Language: English
 .\"
-.TH "\FBMY_PRINT_DEFAULTS" "1" "03/02/2016" "MySQL 5\&.6" "MySQL Database System"
+.TH "\FBMY_PRINT_DEFAULTS" "1" "08/25/2016" "MySQL 5\&.6" "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,7 +147,6 @@ In addition to the groups named on the command line, read groups that have the g
 .sp -1
 .IP \(bu 2.3
 .\}
-.\" login-path option
 \fB\-\-login\-path=\fR\fB\fIname\fR\fR,
 \fB\-l \fR\fB\fIname\fR\fR
 .sp
@@ -184,8 +168,6 @@ utility\&. See
 .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
@@ -200,8 +182,6 @@ Return an empty string\&.
 .sp -1
 .IP \(bu 2.3
 .\}
-.\" my_print_defaults: show option
-.\" show option: my_print_defaults
 \fB\-\-show\fR,
 \fB\-s\fR
 .sp
@@ -218,8 +198,6 @@ masks passwords by default\&. Use this option to display passwords in cleartext\
 .sp -1
 .IP \(bu 2.3
 .\}
-.\" my_print_defaults: verbose option
-.\" verbose option: my_print_defaults
 \fB\-\-verbose\fR,
 \fB\-v\fR
 .sp
@@ -234,8 +212,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
index 5bfada6851059f2d8e85edfdba8b954edf7224b3..5c129d583af7e50d5070f26fccb50bb6b4744648 100644 (file)
@@ -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 <http://docbook.sf.net/>
-.\"      Date: 03/02/2016
+.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
+.\"      Date: 08/25/2016
 .\"    Manual: MySQL Database System
 .\"    Source: MySQL 5.6
 .\"  Language: English
 .\"
-.TH "\FBMYISAM_FTDUMP\FR" "1" "03/02/2016" "MySQL 5\&.6" "MySQL Database System"
+.TH "\FBMYISAM_FTDUMP\FR" "1" "08/25/2016" "MySQL 5\&.6" "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
index b7fa9bd64dd7612b7cb0dfbe50cc95971f920b09..5ed1b29175e3d39c423d563b5c8fa18d58d11482 100644 (file)
@@ -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 <http://docbook.sf.net/>
-.\"      Date: 03/02/2016
+.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
+.\"      Date: 08/25/2016
 .\"    Manual: MySQL Database System
 .\"    Source: MySQL 5.6
 .\"  Language: English
 .\"
-.TH "\FBMYISAMCHK\FR" "1" "03/02/2016" "MySQL 5\&.6" "MySQL Database System"
+.TH "\FBMYISAMCHK\FR" "1" "08/25/2016" "MySQL 5\&.6" "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\&.
@@ -335,8 +324,6 @@ is interpreted relative to the current directory if given as a relative path nam
 .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\&.
@@ -352,8 +339,6 @@ is interpreted relative to the current directory if given as a relative path nam
 .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,
@@ -405,8 +388,6 @@ utility\&. See
 .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\&.
@@ -420,8 +401,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
@@ -440,8 +419,6 @@ very silent\&.
 .sp -1
 .IP \(bu 2.3
 .\}
-.\" myisamchk: verbose option
-.\" verbose option: myisamchk
 \fB\-\-verbose\fR,
 \fB\-v\fR
 .sp
@@ -462,8 +439,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
@@ -478,8 +453,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
@@ -493,18 +466,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.
@@ -738,8 +699,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:
@@ -752,8 +711,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
@@ -768,8 +725,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
@@ -784,8 +739,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
@@ -815,8 +768,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
@@ -831,8 +782,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
@@ -853,8 +802,6 @@ option\&.
 .sp -1
 .IP \(bu 2.3
 .\}
-.\" myisamchk: information option
-.\" information option: myisamchk
 \fB\-\-information\fR,
 \fB\-i\fR
 .sp
@@ -869,8 +816,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
@@ -887,8 +832,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
@@ -907,8 +850,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
@@ -921,8 +862,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
@@ -939,8 +878,6 @@ is given):
 .sp -1
 .IP \(bu 2.3
 .\}
-.\" myisamchk: backup option
-.\" backup option: myisamchk
 \fB\-\-backup\fR,
 \fB\-B\fR
 .sp
@@ -958,8 +895,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
@@ -974,8 +909,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\&.
@@ -989,8 +922,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
@@ -1006,8 +937,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
@@ -1027,8 +956,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
@@ -1044,8 +971,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
@@ -1062,8 +987,6 @@ For
 .sp -1
 .IP \(bu 2.3
 .\}
-.\" myisamchk: no-symlinks option
-.\" no-symlinks option: myisamchk
 \fB\-\-no\-symlinks\fR,
 \fB\-l\fR
 .sp
@@ -1080,8 +1003,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
@@ -1097,8 +1018,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
@@ -1117,8 +1036,6 @@ and
 .sp -1
 .IP \(bu 2.3
 .\}
-.\" myisamchk: quick option
-.\" quick option: myisamchk
 \fB\-\-quick\fR,
 \fB\-q\fR
 .sp
@@ -1135,8 +1052,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
@@ -1163,8 +1078,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
@@ -1191,8 +1104,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\&.
@@ -1206,8 +1117,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
@@ -1224,8 +1133,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
@@ -1246,8 +1153,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
@@ -1267,8 +1172,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
@@ -1287,8 +1190,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
@@ -1303,8 +1204,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
@@ -1322,8 +1221,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
@@ -1346,8 +1243,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
@@ -1362,8 +1257,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
@@ -1383,10 +1276,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
@@ -2449,7 +2338,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\&.
index d8d223ed8b292487731433876c1e221a1ddb7270..dbc7b278666edee5dac58746c22732b5563a8465 100644 (file)
@@ -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 <http://docbook.sf.net/>
-.\"      Date: 03/02/2016
+.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
+.\"      Date: 08/25/2016
 .\"    Manual: MySQL Database System
 .\"    Source: MySQL 5.6
 .\"  Language: English
 .\"
-.TH "\FBMYISAMLOG\FR" "1" "03/02/2016" "MySQL 5\&.6" "MySQL Database System"
+.TH "\FBMYISAMLOG\FR" "1" "08/25/2016" "MySQL 5\&.6" "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"
index 294e20ee3d71ed90c5dba904a341ecec54eb528e..6a86a12792b8ec8a7e06bae0ddd0efbe4fd5234b 100644 (file)
@@ -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 <http://docbook.sf.net/>
-.\"      Date: 03/02/2016
+.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
+.\"      Date: 08/25/2016
 .\"    Manual: MySQL Database System
 .\"    Source: MySQL 5.6
 .\"  Language: English
 .\"
-.TH "\FBMYISAMPACK\FR" "1" "03/02/2016" "MySQL 5\&.6" "MySQL Database System"
+.TH "\FBMYISAMPACK\FR" "1" "08/25/2016" "MySQL 5\&.6" "MySQL Database System"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
 .\" -----------------------------------------------------------------
 .\" * 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
index 029040dd0b631cccf239ff61e470b84f6ba6dcc9..9b1116b8582b0e5ed0bfeda3099341fc08cc3f1d 100644 (file)
@@ -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 <http://docbook.sf.net/>
-.\"      Date: 03/02/2016
+.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
+.\"      Date: 08/25/2016
 .\"    Manual: MySQL Database System
 .\"    Source: MySQL
 .\"  Language: English
 .\"
-.TH "\FBMYSQL\-STRESS\-TE" "1" "03/02/2016" "MySQL" "MySQL Database System"
+.TH "\FBMYSQL\-STRESS\-TE" "1" "08/25/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\&.
index 856c0a66f229460ffdefdc5f01669760e87bbbb8..553fa257edf87a01e9eb814ea4e7cd65e12947ed 100644 (file)
@@ -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 <http://docbook.sf.net/>
-.\"      Date: 03/02/2016
+.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
+.\"      Date: 08/25/2016
 .\"    Manual: MySQL Database System
 .\"    Source: MySQL
 .\"  Language: English
 .\"
-.TH "\FBMYSQL\-TEST\-RUN\" "1" "03/02/2016" "MySQL" "MySQL Database System"
+.TH "\FBMYSQL\-TEST\-RUN\" "1" "08/25/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"
@@ -167,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
@@ -175,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
@@ -231,44 +238,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.
@@ -292,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
@@ -301,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
@@ -331,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
@@ -342,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\&.
@@ -351,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
@@ -361,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
@@ -378,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
@@ -430,8 +406,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 +420,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 +438,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 +455,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 +472,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 +479,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 +493,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 +520,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 +536,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 +549,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 +565,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 +578,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 +595,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 +612,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 +627,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 +644,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 +657,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 +686,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 +702,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 +715,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 +733,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 +750,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 +767,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 +780,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 +795,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 +812,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 +834,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 +860,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 +874,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 +887,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,17 +900,42 @@ 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
+\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,
@@ -1014,8 +961,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 +983,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 +998,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 +1013,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 +1036,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 +1051,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 +1085,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 +1099,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 +1116,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 +1129,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 +1144,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 +1161,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 +1176,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 +1190,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 +1207,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 +1237,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 +1252,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 +1265,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 +1280,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 +1294,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 +1308,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 +1322,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 +1336,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 +1350,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 +1385,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 +1403,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 +1422,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 +1438,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 +1455,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 +1470,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 +1485,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 +1498,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 +1513,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 +1530,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,16 +1543,32 @@ 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
 \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
@@ -1671,8 +1579,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 +1605,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 +1618,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 +1634,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 +1650,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 +1663,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 +1678,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 +1694,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 +1716,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 +1741,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 +1754,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 +1767,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 +1780,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 +1794,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 +1808,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 +1821,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 +1836,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 +1855,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 +1890,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 +1906,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 +1922,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 +1944,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 +1978,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 +1994,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 +2008,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 +2023,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 +2046,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 +2068,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 +2090,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 +2107,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 +2120,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 +2133,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 +2147,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 +2163,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 +2176,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 +2192,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 +2209,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 +2226,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 +2239,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 +2260,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 +2288,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 +2309,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 +2325,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 +2341,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 +2355,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 +2370,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 +2386,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 +2399,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 +2412,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 +2428,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 +2443,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 +2460,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 +2474,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
index 9c25395156b6fc67f4b2a4b3b4d273ca4970cf7b..f3c703b1914021f4989414b4c7173de561ea1272 100644 (file)
@@ -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 <http://docbook.sf.net/>
-.\"      Date: 03/02/2016
+.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
+.\"      Date: 08/25/2016
 .\"    Manual: MySQL Database System
 .\"    Source: MySQL 5.6
 .\"  Language: English
 .\"
-.TH "\FBMYSQL\FR" "1" "03/02/2016" "MySQL 5\&.6" "MySQL Database System"
+.TH "\FBMYSQL\FR" "1" "08/25/2016" "MySQL 5\&.6" "MySQL Database System"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
 .\" -----------------------------------------------------------------
 .\" * 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: binary-mode option
-.\" binary-mode option: mysql
 \fB\-\-binary\-mode\fR
 .sp
 This option helps when processing
@@ -275,8 +255,6 @@ This option was added in MySQL 5\&.6\&.3\&.
 .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\&.
@@ -292,8 +270,6 @@ This option is supported beginning with MySQL 5\&.6\&.1\&.
 .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
@@ -308,8 +284,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\&.
@@ -323,8 +297,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\&.
@@ -338,8 +310,6 @@ Display result set metadata\&.
 .sp -1
 .IP \(bu 2.3
 .\}
-.\" mysql: comments option
-.\" comments option: mysql
 \fB\-\-comments\fR,
 \fB\-c\fR
 .sp
@@ -354,8 +324,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
@@ -370,8 +338,6 @@ Compress all information sent between the client and the server if both support
 .sp -1
 .IP \(bu 2.3
 .\}
-.\" mysql: connect-expired-password option
-.\" connect-expired-password option: mysql
 \fB\-\-connect\-expired\-password\fR
 .sp
 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
@@ -388,8 +354,6 @@ Section\ \&6.3.6, \(lqPassword Expiration and Sandbox Mode\(rq\&.) This option w
 .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
@@ -404,8 +368,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
@@ -429,8 +391,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\&.
@@ -444,8 +404,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
@@ -460,8 +418,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
@@ -476,24 +432,19 @@ Section\ \&6.3.7, \(lqPluggable Authentication\(rq\&.
 .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
+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
@@ -504,8 +455,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\&.
@@ -521,8 +470,6 @@ is interpreted relative to the current directory if given as a relative path nam
 .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\&.
@@ -538,8 +485,6 @@ is interpreted relative to the current directory if given as a relative path nam
 .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
@@ -568,8 +513,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)\&.
@@ -583,8 +526,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
@@ -605,14 +546,12 @@ 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
 mysql_clear_password
 cleartext authentication plugin\&. (See
-Section\ \&6.4.1.7, \(lqThe Cleartext Client-Side Authentication Plugin\(rq\&.) This option was added in MySQL 5\&.6\&.7\&.
+Section\ \&6.5.1.7, \(lqThe Cleartext Client-Side Authentication Plugin\(rq\&.) This option was added in MySQL 5\&.6\&.7\&.
 .RE
 .sp
 .RS 4
@@ -623,8 +562,6 @@ Section\ \&6.4.1.7, \(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
@@ -643,8 +580,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
@@ -659,8 +594,6 @@ Continue even if an SQL error occurs\&.
 .sp -1
 .IP \(bu 2.3
 .\}
-.\" mysql: histignore option
-.\" histignore option: mysql
 \fB\-\-histignore\fR
 .sp
 A colon\-separated list of one or more patterns specifying statements to ignore for logging purposes\&. These patterns are added to the default pattern list ("*IDENTIFIED*:*PASSWORD*")\&. The value specified for this option affects logging of statements written to the history file\&. For more information, see
@@ -675,8 +608,6 @@ the section called \(lqMYSQL LOGGING\(rq\&. This option was added in MySQL 5\&.6
 .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
@@ -691,8 +622,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
@@ -707,8 +636,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
@@ -726,8 +653,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\&.
@@ -741,8 +666,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
@@ -757,8 +680,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
@@ -783,8 +704,6 @@ has no effect if the server does not also support it\&.
 .sp -1
 .IP \(bu 2.3
 .\}
-.\" mysql: login-path option
-.\" login-path option: mysql
 \fB\-\-login\-path=\fR\fB\fIname\fR\fR
 .sp
 Read options from the named login path in the
@@ -805,8 +724,6 @@ utility\&. See
 .sp -1
 .IP \(bu 2.3
 .\}
-.\" mysql: named-commands option
-.\" named-commands option: mysql
 \fB\-\-named\-commands\fR,
 \fB\-G\fR
 .sp
@@ -830,8 +747,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
@@ -848,8 +763,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
@@ -864,8 +777,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,
@@ -891,8 +802,6 @@ utility\&. See
 .sp -1
 .IP \(bu 2.3
 .\}
-.\" mysql: one-database option
-.\" one-database option: mysql
 \fB\-\-one\-database\fR,
 \fB\-o\fR
 .sp
@@ -995,8 +904,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
@@ -1017,8 +924,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
@@ -1046,8 +951,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
@@ -1062,8 +965,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
@@ -1082,9 +983,6 @@ Section\ \&6.3.7, \(lqPluggable Authentication\(rq\&.
 .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
@@ -1099,8 +997,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\&.
@@ -1114,8 +1010,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
@@ -1131,8 +1025,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
@@ -1147,8 +1039,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
@@ -1165,8 +1055,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
@@ -1220,8 +1108,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
@@ -1236,10 +1122,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
@@ -1262,8 +1144,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\&. As of MySQL 5\&.6\&.7, this option is enabled by default; use
@@ -1282,7 +1162,22 @@ to disable it\&.
 .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 will be removed in a future MySQL release\&. For account upgrade instructions, see
-Section\ \&6.4.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
+.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 deprecated and will be removed in a future release\&. As of MySQL 5\&.7\&.5, it is always enabled and attempting to disable it produces an error\&.
 .sp .5v
 .RE
 .RE
@@ -1295,8 +1190,6 @@ Section\ \&6.4.1.3, \(lqMigrating Away from Pre-4.1 Password Hashing and the mys
 .sp -1
 .IP \(bu 2.3
 .\}
-.\" mysql: server-public-key-path option
-.\" server-public-key-path option: mysql
 \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
@@ -1308,7 +1201,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\ \&6.4.1.4, \(lqThe SHA-256 Authentication Plugin\(rq\&.
+Section\ \&6.5.1.4, \(lqThe SHA-256 Authentication Plugin\(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
@@ -1324,8 +1217,6 @@ and renamed in 5\&.6\&.7 to
 .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
@@ -1344,8 +1235,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\&.
@@ -1359,8 +1248,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
@@ -1377,8 +1264,6 @@ Control+C)\&.
 .sp -1
 .IP \(bu 2.3
 .\}
-.\" mysql: silent option
-.\" silent option: mysql
 \fB\-\-silent\fR,
 \fB\-s\fR
 .sp
@@ -1397,8 +1282,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
@@ -1413,8 +1296,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
@@ -1429,8 +1310,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
@@ -1446,14 +1325,12 @@ 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
 \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, \(lqCommand Options for Secure Connections\(rq\&.
+Section\ \&6.4.5, \(lqCommand Options for Secure Connections\(rq\&.
 .RE
 .sp
 .RS 4
@@ -1464,8 +1341,6 @@ Section\ \&6.3.9.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
@@ -1480,8 +1355,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\&.
@@ -1496,8 +1369,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
@@ -1512,8 +1383,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
@@ -1528,8 +1397,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
@@ -1546,8 +1413,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
@@ -1562,8 +1427,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
@@ -1579,8 +1442,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
@@ -1595,8 +1456,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
@@ -1666,8 +1525,6 @@ You can also set the following variables by using
 .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
@@ -1682,7 +1539,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\&.
@@ -1696,7 +1552,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
@@ -1711,7 +1566,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\&.)
@@ -1725,7 +1579,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
@@ -1745,7 +1598,6 @@ or
 at the
 mysql>
 prompt:
-.\" mysql commands: list of
 .sp
 .if n \{\
 .RS 4
@@ -1816,8 +1668,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],
@@ -1832,7 +1682,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
@@ -1843,8 +1693,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
@@ -1863,8 +1711,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
@@ -1879,8 +1725,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
@@ -1895,8 +1739,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
@@ -1937,8 +1779,6 @@ Section\ \&20.1, \(lqDefining Stored Programs\(rq)\&.
 .sp -1
 .IP \(bu 2.3
 .\}
-.\" mysql: edit command
-.\" edit command: mysql
 edit,
 \ee
 .sp
@@ -1965,8 +1805,6 @@ command works only in Unix\&.
 .sp -1
 .IP \(bu 2.3
 .\}
-.\" mysql: ego command
-.\" ego command: mysql
 ego,
 \eG
 .sp
@@ -1981,8 +1819,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
@@ -1998,8 +1834,6 @@ Exit
 .sp -1
 .IP \(bu 2.3
 .\}
-.\" mysql: go command
-.\" go command: mysql
 go,
 \eg
 .sp
@@ -2014,8 +1848,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
@@ -2035,8 +1867,6 @@ command works only in Unix\&.
 .sp -1
 .IP \(bu 2.3
 .\}
-.\" mysql: notee command
-.\" notee command: mysql
 notee,
 \et
 .sp
@@ -2052,8 +1882,6 @@ tee\&.
 .sp -1
 .IP \(bu 2.3
 .\}
-.\" mysql: nowarning command
-.\" nowarning command: mysql
 nowarning,
 \ew
 .sp
@@ -2068,8 +1896,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
@@ -2108,8 +1934,6 @@ for browsing output in some situations\&.
 .sp -1
 .IP \(bu 2.3
 .\}
-.\" mysql: print command
-.\" print command: mysql
 print,
 \ep
 .sp
@@ -2124,8 +1948,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
@@ -2149,8 +1971,6 @@ mysql>\&.
 .sp -1
 .IP \(bu 2.3
 .\}
-.\" mysql: quit command
-.\" quit command: mysql
 quit,
 \eq
 .sp
@@ -2166,8 +1986,6 @@ Exit
 .sp -1
 .IP \(bu 2.3
 .\}
-.\" mysql: rehash command
-.\" rehash command: mysql
 rehash,
 \e#
 .sp
@@ -2184,8 +2002,6 @@ option\&.)
 .sp -1
 .IP \(bu 2.3
 .\}
-.\" mysql: source command
-.\" source command: mysql
 source \fIfile_name\fR,
 \e\&. \fIfile_name\fR
 .sp
@@ -2203,8 +2019,6 @@ or
 .sp -1
 .IP \(bu 2.3
 .\}
-.\" mysql: status command
-.\" status command: mysql
 status,
 \es
 .sp
@@ -2225,8 +2039,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
@@ -2245,8 +2057,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
@@ -2276,8 +2086,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
@@ -2294,8 +2102,6 @@ as the default database\&.
 .sp -1
 .IP \(bu 2.3
 .\}
-.\" mysql: warnings command
-.\" warnings command: mysql
 warnings,
 \eW
 .sp
@@ -2460,7 +2266,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
@@ -2786,15 +2591,6 @@ mysql>
 .\}
 .RE
 .SH "MYSQL LOGGING"
-.\" MYSQL_HISTFILE environment variable
-.\" environment variable: MYSQL_HISTFILE
-.\" MYSQL_HISTIGNORE environment variable
-.\" environment variable: MYSQL_HISTIGNORE
-.\" HOME environment variable
-.\" environment variable: HOME
-.\" mysql history file
-.\" command-line history: mysql
-.\" .mysql_history file
 .PP
 On Unix, the
 \fBmysql\fR
@@ -3005,7 +2801,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
@@ -3024,7 +2820,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
@@ -3149,15 +2945,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
@@ -3445,7 +3232,6 @@ Monty
 .RE
 .\}
 .SS "Using the \-\-safe\-updates Option"
-.\" safe-updates option
 .PP
 For beginners, a useful startup option is
 \fB\-\-safe\-updates\fR
index a31ebd9d56bf7020daa5cdc8b72792d3e41259e6..ee23019f5829179818790b4b150faae9849a742b 100644 (file)
@@ -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 <http://docbook.sf.net/>
-.\"      Date: 03/02/2016
+.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
+.\"      Date: 08/25/2016
 .\"    Manual: MySQL Database System
 .\"    Source: MySQL 5.6
 .\"  Language: English
 .\"
-.TH "\FBMYSQL\&.SERVER\FR" "1" "03/02/2016" "MySQL 5\&.6" "MySQL Database System"
+.TH "\FBMYSQL\&.SERVER\FR" "1" "08/25/2016" "MySQL 5\&.6" "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,
index 1c6a0288d48437791a3bf56b6fb419adf081343f..25fa050ef181bd2ba8cf230327aed25195731f41 100644 (file)
@@ -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 <http://docbook.sf.net/>
-.\"      Date: 03/02/2016
+.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
+.\"      Date: 08/25/2016
 .\"    Manual: MySQL Database System
 .\"    Source: MySQL
 .\"  Language: English
 .\"
-.TH "\FBMYSQL_CLIENT_TEST" "1" "03/02/2016" "MySQL" "MySQL Database System"
+.TH "\FBMYSQL_CLIENT_TEST" "1" "08/25/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
index 21d9d77b002b37277fd6b301252690d85612b228..44fb517331e2c7c2434894db1ec388b8aa35d386 100644 (file)
@@ -1 +1 @@
-.so man/mysql_client_test.1
+.so mysql_client_test.1
index b9978958152eb6426fbe698466f98896ea6252ae..926f47c3b4ff0cb82b86b57331a3198d70547eec 100644 (file)
@@ -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 <http://docbook.sf.net/>
-.\"      Date: 03/02/2016
+.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
+.\"      Date: 08/25/2016
 .\"    Manual: MySQL Database System
 .\"    Source: MySQL 5.6
 .\"  Language: English
 .\"
-.TH "\FBMYSQL_CONFIG\FR" "1" "03/02/2016" "MySQL 5\&.6" "MySQL Database System"
+.TH "\FBMYSQL_CONFIG\FR" "1" "08/25/2016" "MySQL 5\&.6" "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
 C 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: cxxflags option
-.\" cxxflags option: mysql_config
 \fB\-\-cxxflags\fR
 .sp
 Like
@@ -84,8 +79,6 @@ Like
 .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\&.
@@ -99,10 +92,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
@@ -117,8 +106,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\&.
@@ -132,8 +119,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\&.6, all client libraries are thread\-safe, so this option need not be used\&. The
@@ -149,8 +134,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\&.
@@ -164,9 +147,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
-.\" TCP/IP
 \fB\-\-port\fR
 .sp
 The default TCP/IP port number, defined when configuring MySQL\&.
@@ -180,8 +160,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\&.
@@ -195,8 +173,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
@@ -218,8 +194,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\&.
index b3131eda107746905e76be9590b0800e2534b0cb..a225cced5f4bd8757e6e781a12476ac988052344 100644 (file)
@@ -1,13 +1,13 @@
 '\" t
 .\"     Title: \fBmysql_config_editor\fR
 .\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
-.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\"      Date: 03/02/2016
+.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
+.\"      Date: 08/25/2016
 .\"    Manual: MySQL Database System
 .\"    Source: MySQL 5.6
 .\"  Language: English
 .\"
-.TH "\FBMYSQL_CONFIG_EDIT" "1" "03/02/2016" "MySQL 5\&.6" "MySQL Database System"
+.TH "\FBMYSQL_CONFIG_EDIT" "1" "08/25/2016" "MySQL 5\&.6" "MySQL Database System"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -27,8 +27,6 @@
 .\" -----------------------------------------------------------------
 .\" * MAIN CONTENT STARTS HERE *
 .\" -----------------------------------------------------------------
-.\" mysql_config_editor
-.\" .mylogin.cnf file
 .SH "NAME"
 mysql_config_editor \- configure authentication information for connecting to MySQL server
 .SH "SYNOPSIS"
@@ -78,8 +76,6 @@ 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\ \&4.2.6, \(lqUsing Option Files\(rq\&.
-.\" MYSQL_TEST_LOGIN_FILE environment variable
-.\" environment variable: MYSQL_TEST_LOGIN_FILE
 .PP
 To specify an alternate login path file name, set the
 MYSQL_TEST_LOGIN_FILE
@@ -148,7 +144,7 @@ groups from other option files, so it reads them from the login path file as wel
 .\}
 With a
 \fB\-\-login\-path\fR
-option, client programs additionally read the named login path from the login path ile\&. The option groups read from other option files remain the same\&. Consider this command:
+option, client programs additionally read the named login path from the login path file\&. The option groups read from other option files remain the same\&. Consider this command:
 .sp
 .if n \{\
 .RS 4
@@ -501,8 +497,6 @@ mysql_config_editor Commands and Command-Specific Options\&.
 .sp -1
 .IP \(bu 2.3
 .\}
-.\" mysql_config_editor: help option
-.\" help option: mysql_config_editor
 \fB\-\-help\fR,
 \fB\-?\fR
 .sp
@@ -534,8 +528,6 @@ shell> \fBmysql_config_editor \fR\fB\fIcommand\fR\fR\fB \-\-help\fR
 .sp -1
 .IP \(bu 2.3
 .\}
-.\" mysql_config_editor: debug option
-.\" debug option: mysql_config_editor
 \fB\-\-debug[=\fR\fB\fIdebug_options\fR\fR\fB]\fR,
 \fB\-# \fR\fB\fIdebug_options\fR\fR
 .sp
@@ -554,8 +546,6 @@ d:t:o,/tmp/mysql_config_editor\&.trace\&.
 .sp -1
 .IP \(bu 2.3
 .\}
-.\" mysql_config_editor: verbose option
-.\" verbose option: mysql_config_editor
 \fB\-\-verbose\fR,
 \fB\-v\fR
 .sp
@@ -570,8 +560,6 @@ Verbose mode\&. Print more information about what the program does\&. This optio
 .sp -1
 .IP \(bu 2.3
 .\}
-.\" mysql_config_editor: version option
-.\" version option: mysql_config_editor
 \fB\-\-version\fR,
 \fB\-V\fR
 .sp
index b5f829f963c8bd4615b26ba78a23a97d0ffae228..faf26db596ef5eb76e7e5fca1a6fb5726728f2e3 100644 (file)
@@ -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 <http://docbook.sf.net/>
-.\"      Date: 03/02/2016
+.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
+.\"      Date: 08/25/2016
 .\"    Manual: MySQL Database System
 .\"    Source: MySQL 5.6
 .\"  Language: English
 .\"
-.TH "\FBMYSQL_CONVERT_TAB" "1" "03/02/2016" "MySQL 5\&.6" "MySQL Database System"
+.TH "\FBMYSQL_CONVERT_TAB" "1" "08/25/2016" "MySQL 5\&.6" "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"
@@ -91,8 +90,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\&.
@@ -106,8 +103,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\&.
@@ -121,8 +116,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\&.
@@ -136,8 +129,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\&.
@@ -154,8 +145,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\&.
@@ -169,8 +158,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
@@ -185,8 +172,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
@@ -202,8 +187,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\&.
@@ -217,8 +200,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\&.
@@ -232,8 +213,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\&.
index 36fa1071393fead52d0b00b212e935c599826af3..fa34538b92df16cef2f6b03663a7f52c3d177a4b 100644 (file)
@@ -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 <http://docbook.sf.net/>
-.\"      Date: 03/02/2016
+.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
+.\"      Date: 08/25/2016
 .\"    Manual: MySQL Database System
 .\"    Source: MySQL 5.6
 .\"  Language: English
 .\"
-.TH "\FBMYSQL_FIND_ROWS\F" "1" "03/02/2016" "MySQL 5\&.6" "MySQL Database System"
+.TH "\FBMYSQL_FIND_ROWS\F" "1" "08/25/2016" "MySQL 5\&.6" "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"
@@ -102,8 +101,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
@@ -118,8 +115,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\&.
@@ -133,8 +128,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
@@ -150,8 +143,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
@@ -167,8 +158,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\&.
index c28a9733cef8cb43cb4220d972d6c669b98d7dec..3fa5d65e76edef99f8cf02fadce280c4bad9f9f9 100644 (file)
@@ -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 <http://docbook.sf.net/>
-.\"      Date: 03/02/2016
+.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
+.\"      Date: 08/25/2016
 .\"    Manual: MySQL Database System
 .\"    Source: MySQL 5.6
 .\"  Language: English
 .\"
-.TH "\FBMYSQL_FIX_EXTENSI" "1" "03/02/2016" "MySQL 5\&.6" "MySQL Database System"
+.TH "\FBMYSQL_FIX_EXTENSI" "1" "08/25/2016" "MySQL 5\&.6" "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"
index ebb9cb851e9b594e46d4a292e14d5f08fb67e8af..8b2462658a7523c6f794b02344ddef91b94f9748 100644 (file)
@@ -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 <http://docbook.sf.net/>
-.\"      Date: 03/02/2016
+.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
+.\"      Date: 08/25/2016
 .\"    Manual: MySQL Database System
 .\"    Source: MySQL 5.6
 .\"  Language: English
 .\"
-.TH "\FBMYSQL_INSTALL_DB\" "1" "03/02/2016" "MySQL 5\&.6" "MySQL Database System"
+.TH "\FBMYSQL_INSTALL_DB\" "1" "08/25/2016" "MySQL 5\&.6" "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"
@@ -192,8 +191,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\&.
@@ -207,8 +204,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\&.
@@ -222,8 +217,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
@@ -239,8 +232,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\&.
@@ -254,8 +245,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\&. Beginning with MySQL 5\&.6\&.8,
@@ -271,7 +260,6 @@ is more strict about the option value\&. Only the last component of the path nam
 .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\&.
@@ -287,7 +275,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\&.
@@ -303,8 +290,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
@@ -320,8 +305,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: keep-my-cnf option
-.\" keep-my-cnf option: mysql_install_db
 \fB\-\-keep\-my\-cnf\fR
 .sp
 Tell
@@ -341,8 +324,6 @@ file\&. This option was added in MySQL 5\&.6\&.20\&.
 .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
@@ -357,7 +338,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,
@@ -373,8 +353,6 @@ can be used to prevent them from being read\&.
 .sp -1
 .IP \(bu 2.3
 .\}
-.\" mysql_install_db: random-passwords option
-.\" random-passwords option: mysql_install_db
 \fB\-\-random\-passwords\fR
 .sp
 On Unix platforms, this option provides for more secure MySQL installation\&. Invoking
@@ -406,7 +384,6 @@ flag for those accounts\&.
 .sp -1
 .IP \(bu 2.3
 .\}
-.\" .mysql_secret file
 The initial random
 root
 password is written to the
@@ -491,8 +468,6 @@ This option was added in MySQL 5\&.6\&.8\&.
 .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\&.
@@ -506,8 +481,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\&.
@@ -521,8 +494,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
@@ -538,8 +509,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
@@ -560,8 +529,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\&.
@@ -575,8 +542,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\&.
index c4550ae98b593049fb4ce7acf71f406b3b4a256b..a458b0aabb74c950a8ff042a8bb4a92eeda46ba3 100644 (file)
@@ -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 <http://docbook.sf.net/>
-.\"      Date: 03/02/2016
+.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
+.\"      Date: 08/25/2016
 .\"    Manual: MySQL Database System
 .\"    Source: MySQL 5.6
 .\"  Language: English
 .\"
-.TH "\FBMYSQL_PLUGIN\FR" "1" "03/02/2016" "MySQL 5\&.6" "MySQL Database System"
+.TH "\FBMYSQL_PLUGIN\FR" "1" "08/25/2016" "MySQL 5\&.6" "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"
@@ -58,11 +57,11 @@ 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
-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
index 676fe753863226c7bc21611fce3b366be2a25cae..bec33429c15301f867220346b52c5de36af38e7e 100644 (file)
@@ -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 <http://docbook.sf.net/>
-.\"      Date: 03/02/2016
+.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
+.\"      Date: 08/25/2016
 .\"    Manual: MySQL Database System
 .\"    Source: MySQL 5.6
 .\"  Language: English
 .\"
-.TH "\FBMYSQL_SECURE_INST" "1" "03/02/2016" "MySQL 5\&.6" "MySQL Database System"
+.TH "\FBMYSQL_SECURE_INST" "1" "08/25/2016" "MySQL 5\&.6" "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"
index 8551c7f8e985c2fe0b452c9cc3ef64b4f2d96b54..299e04061ec08f0f47f63b3622a78f320d14b4e0 100644 (file)
@@ -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 <http://docbook.sf.net/>
-.\"      Date: 03/02/2016
+.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
+.\"      Date: 08/25/2016
 .\"    Manual: MySQL Database System
 .\"    Source: MySQL 5.6
 .\"  Language: English
 .\"
-.TH "\FBMYSQL_SETPERMISSI" "1" "03/02/2016" "MySQL 5\&.6" "MySQL Database System"
+.TH "\FBMYSQL_SETPERMISSI" "1" "08/25/2016" "MySQL 5\&.6" "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"
@@ -100,8 +99,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\&.
@@ -115,8 +112,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\&.
@@ -130,8 +125,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\&.
@@ -148,8 +141,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\&.
@@ -163,8 +154,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
@@ -179,8 +168,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\&.
index d112436748d598e6cb0bfea2668faaa5c2cbb3ce..08199e2f86052a96eb72b8689fe8a14626678468 100644 (file)
@@ -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 <http://docbook.sf.net/>
-.\"      Date: 03/02/2016
+.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
+.\"      Date: 08/25/2016
 .\"    Manual: MySQL Database System
 .\"    Source: MySQL 5.6
 .\"  Language: English
 .\"
-.TH "\FBMYSQL_TZINFO_TO_S" "1" "03/02/2016" "MySQL 5\&.6" "MySQL Database System"
+.TH "\FBMYSQL_TZINFO_TO_S" "1" "08/25/2016" "MySQL 5\&.6" "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"
index afa7883276cd09cf6041b3d56bbeaa7aa1e2aa45..174c720236fa718434ff2218e363cde2d2cf33d9 100644 (file)
@@ -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 <http://docbook.sf.net/>
-.\"      Date: 03/02/2016
+.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
+.\"      Date: 08/25/2016
 .\"    Manual: MySQL Database System
 .\"    Source: MySQL 5.6
 .\"  Language: English
 .\"
-.TH "\FBMYSQL_UPGRADE\FR" "1" "03/02/2016" "MySQL 5\&.6" "MySQL Database System"
+.TH "\FBMYSQL_UPGRADE\FR" "1" "08/25/2016" "MySQL 5\&.6" "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"
@@ -234,9 +231,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
-.\" data directory: mysql_upgrade_info file
 .PP
 \fBmysql_upgrade\fR
 also saves the MySQL version number in a file named
@@ -247,7 +241,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
 By default,
 \fBmysql_upgrade\fR
@@ -295,8 +289,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\&.
@@ -310,8 +302,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\&.
@@ -325,8 +315,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
@@ -341,8 +329,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\&.
@@ -356,8 +342,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\&.
@@ -371,8 +355,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
@@ -391,8 +373,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\&.
@@ -406,8 +386,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
@@ -422,8 +400,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
@@ -440,8 +416,6 @@ This option was added in MySQL 5\&.6\&.2\&.
 .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
@@ -458,8 +432,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\&.
@@ -475,8 +447,6 @@ is interpreted relative to the current directory if given as a relative path nam
 .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\&.
@@ -492,8 +462,6 @@ is interpreted relative to the current directory if given as a relative path nam
 .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
@@ -522,8 +490,6 @@ groups\&.
 .sp -1
 .IP \(bu 2.3
 .\}
-.\" mysql_upgrade: force option
-.\" force option: mysql_upgrade
 \fB\-\-force\fR
 .sp
 Ignore the
@@ -541,8 +507,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
@@ -557,8 +521,6 @@ Connect to the MySQL server on the given host\&.
 .sp -1
 .IP \(bu 2.3
 .\}
-.\" mysql_upgrade: login-path option
-.\" login-path option: mysql_upgrade
 \fB\-\-login\-path=\fR\fB\fIname\fR\fR
 .sp
 Read options from the named login path in the
@@ -579,8 +541,6 @@ utility\&. See
 .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,
@@ -606,8 +566,6 @@ utility\&. See
 .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
@@ -635,8 +593,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
@@ -651,8 +607,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
@@ -673,8 +627,6 @@ This option was added in MySQL 5\&.6\&.2\&.
 .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
@@ -689,8 +641,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\&.
@@ -704,8 +654,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
@@ -720,8 +668,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
@@ -740,8 +686,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
@@ -757,14 +701,12 @@ 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
 \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, \(lqCommand Options for Secure Connections\(rq\&.
+Section\ \&6.4.5, \(lqCommand Options for Secure Connections\(rq\&.
 .RE
 .sp
 .RS 4
@@ -775,8 +717,6 @@ Section\ \&6.3.9.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
@@ -791,8 +731,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
@@ -807,8 +745,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
@@ -824,8 +760,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\&.
@@ -839,8 +773,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
@@ -862,8 +794,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
index c0d4fdd7679ad15b57ecbcce9281fe9149541a6e..43c115c4e1137efcb145eaa4206caf45e66dc6de 100644 (file)
@@ -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 <http://docbook.sf.net/>
-.\"      Date: 03/02/2016
+.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
+.\"      Date: 08/25/2016
 .\"    Manual: MySQL Database System
 .\"    Source: MySQL 5.6
 .\"  Language: English
 .\"
-.TH "\FBMYSQL_WAITPID\FR" "1" "03/02/2016" "MySQL 5\&.6" "MySQL Database System"
+.TH "\FBMYSQL_WAITPID\FR" "1" "08/25/2016" "MySQL 5\&.6" "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"
@@ -88,8 +87,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
@@ -105,8 +102,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
@@ -121,8 +116,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
index 9068c1e61a921a72dfe5f403def43adf44ac123a..f63098fc7409aae1568d27c4bd44937e4f4a1f75 100644 (file)
@@ -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 <http://docbook.sf.net/>
-.\"      Date: 03/02/2016
+.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
+.\"      Date: 08/25/2016
 .\"    Manual: MySQL Database System
 .\"    Source: MySQL 5.6
 .\"  Language: English
 .\"
-.TH "\FBMYSQL_ZAP\FR" "1" "03/02/2016" "MySQL 5\&.6" "MySQL Database System"
+.TH "\FBMYSQL_ZAP\FR" "1" "08/25/2016" "MySQL 5\&.6" "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"
index 5f8bd5ae83a2991cc618ca4a400972ab012500ef..8e62209209810d806402d8e96b4b1ff201975607 100644 (file)
@@ -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 <http://docbook.sf.net/>
-.\"      Date: 03/02/2016
+.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
+.\"      Date: 08/25/2016
 .\"    Manual: MySQL Database System
 .\"    Source: MySQL 5.6
 .\"  Language: English
 .\"
-.TH "\FBMYSQLACCESS\FR" "1" "03/02/2016" "MySQL 5\&.6" "MySQL Database System"
+.TH "\FBMYSQLACCESS\FR" "1" "08/25/2016" "MySQL 5\&.6" "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"
@@ -89,8 +88,6 @@ supports the following options\&.
 .sp -1
 .IP \(bu 2.3
 .\}
-.\" mysqlaccess: help option
-.\" help option: mysqlaccess
 \fB\-\-help\fR,
 \fB\-?\fR
 .sp
@@ -105,8 +102,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
@@ -121,8 +116,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
@@ -138,8 +131,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\&.
@@ -153,8 +144,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
@@ -169,8 +158,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\&.
@@ -186,8 +173,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
@@ -202,8 +187,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
@@ -218,8 +201,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
@@ -235,8 +216,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
@@ -262,8 +241,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\&.
@@ -277,8 +254,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\&.
@@ -292,8 +267,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\&.
@@ -307,8 +280,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
@@ -323,8 +294,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\&.
@@ -338,8 +307,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
@@ -365,8 +332,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
@@ -381,8 +346,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
@@ -397,8 +360,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
@@ -413,8 +374,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
index f8b908bc8ab64f504b5eed8ab8020b601bb5457b..1a1ff339ca90ac10558931cc398afd3742d97dce 100644 (file)
@@ -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 <http://docbook.sf.net/>
-.\"      Date: 03/02/2016
+.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
+.\"      Date: 08/25/2016
 .\"    Manual: MySQL Database System
 .\"    Source: MySQL 5.6
 .\"  Language: English
 .\"
-.TH "\FBMYSQLADMIN\FR" "1" "03/02/2016" "MySQL 5\&.6" "MySQL Database System"
+.TH "\FBMYSQLADMIN\FR" "1" "08/25/2016" "MySQL 5\&.6" "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\&.
@@ -567,10 +554,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
@@ -588,8 +571,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
@@ -604,8 +585,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\&.
@@ -621,8 +600,6 @@ This option is supported beginning with MySQL 5\&.6\&.1\&.
 .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
@@ -637,8 +614,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
@@ -653,8 +628,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
@@ -671,8 +644,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
@@ -691,8 +662,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\&.
@@ -706,8 +675,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\&.
@@ -721,8 +688,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
@@ -737,8 +702,6 @@ Section\ \&6.3.7, \(lqPluggable Authentication\(rq\&.
 .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
@@ -755,8 +718,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\&.
@@ -772,8 +733,6 @@ is interpreted relative to the current directory if given as a relative path nam
 .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\&.
@@ -789,8 +748,6 @@ is interpreted relative to the current directory if given as a relative path nam
 .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
@@ -819,14 +776,12 @@ 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
 mysql_clear_password
 cleartext authentication plugin\&. (See
-Section\ \&6.4.1.7, \(lqThe Cleartext Client-Side Authentication Plugin\(rq\&.) This option was added in MySQL 5\&.6\&.7\&.
+Section\ \&6.5.1.7, \(lqThe Cleartext Client-Side Authentication Plugin\(rq\&.) This option was added in MySQL 5\&.6\&.7\&.
 .RE
 .sp
 .RS 4
@@ -837,8 +792,6 @@ Section\ \&6.4.1.7, \(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
@@ -855,8 +808,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
@@ -871,8 +822,6 @@ Connect to the MySQL server on the given host\&.
 .sp -1
 .IP \(bu 2.3
 .\}
-.\" mysqladmin: login-path option
-.\" login-path option: mysqladmin
 \fB\-\-login\-path=\fR\fB\fIname\fR\fR
 .sp
 Read options from the named login path in the
@@ -893,8 +842,6 @@ utility\&. See
 .sp -1
 .IP \(bu 2.3
 .\}
-.\" mysqladmin: no-beep option
-.\" no-beep option: mysqladmin
 \fB\-\-no\-beep\fR,
 \fB\-b\fR
 .sp
@@ -909,8 +856,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,
@@ -936,8 +881,6 @@ utility\&. See
 .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
@@ -965,8 +908,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
@@ -981,8 +922,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
@@ -1001,8 +940,6 @@ Section\ \&6.3.7, \(lqPluggable Authentication\(rq\&.
 .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
@@ -1017,8 +954,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\&.
@@ -1032,8 +967,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
@@ -1048,8 +981,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
@@ -1068,8 +999,6 @@ command\&.
 .sp -1
 .IP \(bu 2.3
 .\}
-.\" mysqladmin: secure-auth option
-.\" secure-auth option: mysqladmin
 \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\&. This option is enabled by default; use
@@ -1088,7 +1017,22 @@ to disable it\&. This option was added in MySQL 5\&.6\&.17\&.
 .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 will be removed in a future MySQL release\&. For account upgrade instructions, see
-Section\ \&6.4.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
+.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 deprecated and will be removed in a future release\&. As of MySQL 5\&.7\&.5, it is always enabled and attempting to disable it produces an error\&.
 .sp .5v
 .RE
 .RE
@@ -1101,8 +1045,6 @@ Section\ \&6.4.1.3, \(lqMigrating Away from Pre-4.1 Password Hashing and the mys
 .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
@@ -1121,8 +1063,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
@@ -1137,8 +1077,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
@@ -1161,8 +1099,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
@@ -1178,14 +1114,12 @@ 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
 \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, \(lqCommand Options for Secure Connections\(rq\&.
+Section\ \&6.4.5, \(lqCommand Options for Secure Connections\(rq\&.
 .RE
 .sp
 .RS 4
@@ -1196,8 +1130,6 @@ Section\ \&6.3.9.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
@@ -1212,8 +1144,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
@@ -1228,8 +1158,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
@@ -1244,8 +1172,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
@@ -1261,8 +1187,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
@@ -1282,8 +1206,6 @@ You can also set the following variables by using
 .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)\&.
@@ -1297,8 +1219,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)\&.
index c638e55136062e1e2b897fc214e4b005d85e97d0..d941d5983071ad8e32e1a80f432bd78facbf1a1d 100644 (file)
@@ -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 <http://docbook.sf.net/>
-.\"      Date: 03/02/2016
+.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
+.\"      Date: 08/25/2016
 .\"    Manual: MySQL Database System
 .\"    Source: MySQL 5.6
 .\"  Language: English
 .\"
-.TH "\FBMYSQLBINLOG\FR" "1" "03/02/2016" "MySQL 5\&.6" "MySQL Database System"
+.TH "\FBMYSQLBINLOG\FR" "1" "08/25/2016" "MySQL 5\&.6" "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
 .sp
 This option determines when events should be displayed encoded as base\-64 strings using
@@ -285,8 +280,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\&.
@@ -302,8 +295,6 @@ This option is supported beginning with MySQL 5\&.6\&.1\&.
 .sp -1
 .IP \(bu 2.3
 .\}
-.\" mysqlbinlog: binlog-row-event-max-size option
-.\" binlog-row-event-max-size option: mysqlbinlog
 \fB\-\-binlog\-row\-event\-max\-size=\fR\fB\fIN\fR\fR
 .TS
 allbox tab(:);
@@ -352,8 +343,6 @@ Specify the maximum size of a row\-based binary log event, in bytes\&. Rows are
 .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
@@ -368,8 +357,6 @@ Section\ \&10.5, \(lqCharacter Set Configuration\(rq\&.
 .sp -1
 .IP \(bu 2.3
 .\}
-.\" mysqlbinlog: connection-server-id option
-.\" connection-server-id option: mysqlbinlog
 \fB\-\-connection\-server\-id=\fR\fB\fIserver_id\fR\fR
 .sp
 This option is used to test a MySQL server for support of the
@@ -393,8 +380,6 @@ This option was added in MySQL 5\&.6\&.20\&.
 .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
@@ -512,8 +497,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
@@ -546,8 +530,6 @@ option did not work correctly with a log written by a GTID\-enabled MySQL server
 .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
@@ -566,8 +548,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\&.
@@ -581,8 +561,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\&.
@@ -596,8 +574,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
@@ -614,8 +590,6 @@ This option was added in MySQL 5\&.6\&.2\&.
 .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\&.
@@ -631,8 +605,6 @@ is interpreted relative to the current directory if given as a relative path nam
 .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\&.
@@ -648,8 +620,6 @@ is interpreted relative to the current directory if given as a relative path nam
 .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
@@ -678,8 +648,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
@@ -708,8 +676,6 @@ privilege\&.
 .sp -1
 .IP \(bu 2.3
 .\}
-.\" mysqlbinlog: exclude-gtids option
-.\" exclude-gtids option: mysqlbinlog
 \fB\-\-exclude\-gtids=\fR\fB\fIgtid_set\fR\fR
 .sp
 Do not display any of the groups listed in the
@@ -724,8 +690,6 @@ Do not display any of the groups listed in the
 .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
@@ -740,8 +704,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
@@ -760,8 +722,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
@@ -777,8 +737,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
@@ -793,8 +751,6 @@ Get the binary log from the MySQL server on the given host\&.
 .sp -1
 .IP \(bu 2.3
 .\}
-.\" mysqlbinlog: include-gtids option
-.\" include-gtids option: mysqlbinlog
 \fB\-\-include\-gtids=\fR\fB\fIgtid_set\fR\fR
 .sp
 Display only the groups listed in the
@@ -809,8 +765,6 @@ Display only the groups listed in the
 .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
@@ -844,8 +798,6 @@ or any other MySQL program\&.
 .sp -1
 .IP \(bu 2.3
 .\}
-.\" mysqlbinlog: login-path option
-.\" login-path option: mysqlbinlog
 \fB\-\-login\-path=\fR\fB\fIname\fR\fR
 .sp
 Read options from the named login path in the
@@ -866,8 +818,6 @@ utility\&. See
 .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,
@@ -893,8 +843,6 @@ utility\&. See
 .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
@@ -911,8 +859,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
@@ -940,8 +886,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
@@ -962,10 +906,6 @@ This option was added in MySQL 5\&.6\&.2\&.
 .sp -1
 .IP \(bu 2.3
 .\}
-.\" mysqlbinlog: port option
-.\" port option: mysqlbinlog
-.\" TCP/IP
-.\" ports
 \fB\-\-port=\fR\fB\fIport_num\fR\fR,
 \fB\-P \fR\fB\fIport_num\fR\fR
 .sp
@@ -980,8 +920,6 @@ The TCP/IP port number to use for connecting to a remote server\&.
 .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\&.
@@ -995,8 +933,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
@@ -1011,8 +947,6 @@ Section\ \&4.2.2, \(lqConnecting to the MySQL Server\(rq\&.
 .sp -1
 .IP \(bu 2.3
 .\}
-.\" mysqlbinlog: raw option
-.\" raw option: mysqlbinlog
 \fB\-\-raw\fR
 .sp
 By default,
@@ -1049,8 +983,6 @@ This option was added in MySQL 5\&.6\&.0\&.
 .sp -1
 .IP \(bu 2.3
 .\}
-.\" mysqlbinlog: read-from-remote-master option
-.\" read-from-remote-master option: mysqlbinlog
 \fB\-\-read\-from\-remote\-master=\fR\fB\fItype\fR\fR
 .sp
 Read binary logs from a MySQL server with the
@@ -1079,8 +1011,6 @@ This option was added in MySQL 5\&.6\&.5\&.
 .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
@@ -1106,8 +1036,6 @@ As of MySQL 5\&.6\&.5, this option is like
 .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
@@ -1131,8 +1059,6 @@ option value is treated as a prefix that modifies output file names\&.
 .sp -1
 .IP \(bu 2.3
 .\}
-.\" mysqlbinlog: secure-auth option
-.\" secure-auth option: mysqlbinlog
 \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\&. This option is enabled by default; use
@@ -1151,7 +1077,22 @@ to disable it\&. This option was added in MySQL 5\&.6\&.17\&.
 .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 will be removed in a future MySQL release\&. For account upgrade instructions, see
-Section\ \&6.4.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
+.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 deprecated and will be removed in a future release\&. As of MySQL 5\&.7\&.5, it is always enabled and attempting to disable it produces an error\&.
 .sp .5v
 .RE
 .RE
@@ -1164,8 +1105,6 @@ Section\ \&6.4.1.3, \(lqMigrating Away from Pre-4.1 Password Hashing and the mys
 .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\&.
@@ -1179,8 +1118,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
@@ -1208,8 +1145,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
@@ -1225,8 +1160,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
@@ -1245,8 +1178,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
@@ -1261,8 +1192,6 @@ Display only the statements contained in the log, without any extra information
 .sp -1
 .IP \(bu 2.3
 .\}
-.\" mysqlbinlog: skip-gtids option
-.\" skip-gtids option: mysqlbinlog
 \fB\-\-skip\-gtids[=(true|false)]\fR
 .sp
 Do not display any GTIDs in the output\&. This is needed when writing to a dump file from one or more binary logs containing GTIDs, as shown in this example:
@@ -1292,8 +1221,6 @@ This option was added in MySQL 5\&.6\&.5\&.
 .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
@@ -1309,8 +1236,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
@@ -1346,8 +1271,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
@@ -1366,8 +1289,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
@@ -1390,8 +1311,6 @@ Section\ \&7.3, \(lqExample Backup and Recovery Strategy\(rq\&.
 .sp -1
 .IP \(bu 2.3
 .\}
-.\" mysqlbinlog: stop-never option
-.\" stop-never option: mysqlbinlog
 \fB\-\-stop\-never\fR
 .sp
 This option is used with
@@ -1422,8 +1341,6 @@ This option was added in MySQL 5\&.6\&.0\&.
 .sp -1
 .IP \(bu 2.3
 .\}
-.\" mysqlbinlog: stop-never-slave-server-id option
-.\" stop-never-slave-server-id option: mysqlbinlog
 \fB\-\-stop\-never\-slave\-server\-id=\fR\fB\fIid\fR\fR
 .sp
 With
@@ -1447,8 +1364,6 @@ This option was added in MySQL 5\&.6\&.0\&.
 .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
@@ -1466,8 +1381,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
@@ -1483,8 +1396,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
@@ -1499,8 +1410,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
@@ -1522,8 +1431,6 @@ the section called \(lqMYSQLBINLOG ROW EVENT DISPLAY\(rq\&.
 .sp -1
 .IP \(bu 2.3
 .\}
-.\" mysqlbinlog: verify-binlog-checksum option
-.\" verify-binlog-checksum option: mysqlbinlog
 \fB\-\-verify\-binlog\-checksum\fR,
 \fB\-c\fR
 .sp
@@ -1538,8 +1445,6 @@ Verify checksums in binary log files\&. This option was added in MySQL 5\&.6\&.1
 .sp -1
 .IP \(bu 2.3
 .\}
-.\" mysqlbinlog: version option
-.\" version option: mysqlbinlog
 \fB\-\-version\fR,
 \fB\-V\fR
 .sp
@@ -1562,7 +1467,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\&.
@@ -2172,7 +2076,6 @@ T}
 .sp 1
 .RE
 .SH "MYSQLBINLOG ROW EVENT DISPLAY"
-.\" BINLOG statement: mysqlbinlog output
 .PP
 The following examples illustrate how
 \fBmysqlbinlog\fR
index 644baec37c2a92e83bf8415a56fcc08d0562e5e7..583fb3f09314ffab664f0cee5392f49fb5948fad 100644 (file)
@@ -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 <http://docbook.sf.net/>
-.\"      Date: 03/02/2016
+.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
+.\"      Date: 08/25/2016
 .\"    Manual: MySQL Database System
 .\"    Source: MySQL 5.6
 .\"  Language: English
 .\"
-.TH "\FBMYSQLBUG\FR" "1" "03/02/2016" "MySQL 5\&.6" "MySQL Database System"
+.TH "\FBMYSQLBUG\FR" "1" "08/25/2016" "MySQL 5\&.6" "MySQL Database System"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -27,7 +27,6 @@
 .\" -----------------------------------------------------------------
 .\" * MAIN CONTENT STARTS HERE *
 .\" -----------------------------------------------------------------
-.\" mysqlbug
 .SH "NAME"
 mysqlbug \- generate bug report
 .SH "SYNOPSIS"
index 48b95db9c931100ea74b679487ac225bb44b2838..1af8de8dba1ce0eb90ae1524387f35a66842f159 100644 (file)
@@ -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 <http://docbook.sf.net/>
-.\"      Date: 03/02/2016
+.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
+.\"      Date: 08/25/2016
 .\"    Manual: MySQL Database System
 .\"    Source: MySQL 5.6
 .\"  Language: English
 .\"
-.TH "\FBMYSQLCHECK\FR" "1" "03/02/2016" "MySQL 5\&.6" "MySQL Database System"
+.TH "\FBMYSQLCHECK\FR" "1" "08/25/2016" "MySQL 5\&.6" "MySQL Database System"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
 .\" -----------------------------------------------------------------
 .\" * 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\&.
@@ -319,8 +302,6 @@ This option is supported beginning with MySQL 5\&.6\&.1\&.
 .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
@@ -335,8 +316,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
@@ -351,8 +330,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
@@ -367,8 +344,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
@@ -391,8 +366,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\&.
@@ -406,8 +379,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
@@ -434,8 +405,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
@@ -454,8 +423,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\&.
@@ -469,8 +436,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\&.
@@ -484,8 +449,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
@@ -502,8 +465,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\&.
@@ -519,8 +480,6 @@ is interpreted relative to the current directory if given as a relative path nam
 .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\&.
@@ -536,8 +495,6 @@ is interpreted relative to the current directory if given as a relative path nam
 .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
@@ -566,8 +523,6 @@ groups\&.
 .sp -1
 .IP \(bu 2.3
 .\}
-.\" mysqlcheck: extended option
-.\" extended option: mysqlcheck
 \fB\-\-extended\fR,
 \fB\-e\fR
 .sp
@@ -584,8 +539,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
@@ -602,14 +555,12 @@ This option was added in MySQL 5\&.6\&.2\&.
 .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.4.1.7, \(lqThe Cleartext Client-Side Authentication Plugin\(rq\&.)
+Section\ \&6.5.1.7, \(lqThe Cleartext Client-Side Authentication Plugin\(rq\&.)
 .sp
 This option was added in MySQL 5\&.6\&.28\&.
 .RE
@@ -622,8 +573,6 @@ This option was added in MySQL 5\&.6\&.28\&.
 .sp -1
 .IP \(bu 2.3
 .\}
-.\" mysqlcheck: fast option
-.\" fast option: mysqlcheck
 \fB\-\-fast\fR,
 \fB\-F\fR
 .sp
@@ -638,8 +587,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\&.
@@ -653,8 +600,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\&.
@@ -668,8 +613,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
@@ -684,8 +627,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
@@ -700,8 +641,6 @@ Connect to the MySQL server on the given host\&.
 .sp -1
 .IP \(bu 2.3
 .\}
-.\" mysqlcheck: login-path option
-.\" login-path option: mysqlcheck
 \fB\-\-login\-path=\fR\fB\fIname\fR\fR
 .sp
 Read options from the named login path in the
@@ -722,8 +661,6 @@ utility\&. See
 .sp -1
 .IP \(bu 2.3
 .\}
-.\" mysqlcheck: medium-check option
-.\" medium-check option: mysqlcheck
 \fB\-\-medium\-check\fR,
 \fB\-m\fR
 .sp
@@ -740,8 +677,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,
@@ -767,8 +702,6 @@ utility\&. See
 .sp -1
 .IP \(bu 2.3
 .\}
-.\" mysqlcheck: optimize option
-.\" optimize option: mysqlcheck
 \fB\-\-optimize\fR,
 \fB\-o\fR
 .sp
@@ -783,8 +716,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
@@ -812,8 +743,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
@@ -828,8 +757,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
@@ -850,8 +777,6 @@ This option was added in MySQL 5\&.6\&.2\&.
 .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
@@ -866,8 +791,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\&.
@@ -881,8 +804,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
@@ -897,8 +818,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
@@ -915,8 +834,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
@@ -931,8 +848,6 @@ Perform a repair that can fix almost anything except unique keys that are not un
 .sp -1
 .IP \(bu 2.3
 .\}
-.\" mysqlcheck: secure-auth option
-.\" secure-auth option: mysqlcheck
 \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\&. This option is enabled by default; use
@@ -951,7 +866,22 @@ to disable it\&. This option was added in MySQL 5\&.6\&.17\&.
 .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 will be removed in a future MySQL release\&. For account upgrade instructions, see
-Section\ \&6.4.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
+.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 deprecated and will be removed in a future release\&. As of MySQL 5\&.7\&.5, it is always enabled and attempting to disable it produces an error\&.
 .sp .5v
 .RE
 .RE
@@ -964,8 +894,6 @@ Section\ \&6.4.1.3, \(lqMigrating Away from Pre-4.1 Password Hashing and the mys
 .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
@@ -984,8 +912,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
@@ -1000,8 +926,6 @@ Silent mode\&. Print only error messages\&.
 .sp -1
 .IP \(bu 2.3
 .\}
-.\" mysqlcheck: skip-database option
-.\" skip-database option: mysqlcheck
 \fB\-\-skip\-database=\fR\fB\fIdb_name\fR\fR
 .sp
 Do not include the named database (case sensitive) in the operations performed by
@@ -1016,8 +940,6 @@ Do not include the named database (case sensitive) in the operations performed b
 .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
@@ -1033,14 +955,12 @@ 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
 \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, \(lqCommand Options for Secure Connections\(rq\&.
+Section\ \&6.4.5, \(lqCommand Options for Secure Connections\(rq\&.
 .RE
 .sp
 .RS 4
@@ -1051,8 +971,6 @@ Section\ \&6.3.9.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
@@ -1070,8 +988,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
@@ -1091,8 +1007,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
@@ -1107,8 +1021,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
@@ -1123,8 +1035,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
@@ -1139,8 +1049,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
index 39a26f7e6c9f44bb71d6f19766b4be2af2f74c7c..5d715687d6003d03c12813336ee9e998cbd99af3 100644 (file)
@@ -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 <http://docbook.sf.net/>
-.\"      Date: 03/02/2016
+.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
+.\"      Date: 08/25/2016
 .\"    Manual: MySQL Database System
 .\"    Source: MySQL 5.6
 .\"  Language: English
 .\"
-.TH "\FBMYSQLD\FR" "8" "03/02/2016" "MySQL 5\&.6" "MySQL Database System"
+.TH "\FBMYSQLD\FR" "8" "08/25/2016" "MySQL 5\&.6" "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"
index 94b79a8deee25530f4512782241c0c92811bd9e5..cc86616658ee07fa618a54d48c9b0f5f6b6590d9 100644 (file)
@@ -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 <http://docbook.sf.net/>
-.\"      Date: 03/02/2016
+.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
+.\"      Date: 08/25/2016
 .\"    Manual: MySQL Database System
 .\"    Source: MySQL 5.6
 .\"  Language: English
 .\"
-.TH "\FBMYSQLD_MULTI\FR" "1" "03/02/2016" "MySQL 5\&.6" "MySQL Database System"
+.TH "\FBMYSQLD_MULTI\FR" "1" "08/25/2016" "MySQL 5\&.6" "MySQL Database System"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
 .\" -----------------------------------------------------------------
 .\" * 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.6, \(lqRunning Multiple MySQL Instances on One Machine\(rq\&.
 .PP
 To invoke
 \fBmysqld_multi\fR, use the following syntax:
@@ -158,8 +154,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
@@ -172,8 +166,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
@@ -186,8 +178,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\&.)
@@ -233,8 +223,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\&.
@@ -248,8 +236,6 @@ Display a help message and exit\&.
 .sp -1
 .IP \(bu 2.3
 .\}
-.\" mysqld_multi: example option
-.\" example option: mysqld_multi
 \fB\-\-example\fR
 .sp
 Display a sample option file\&.
@@ -263,8 +249,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\&.
@@ -278,8 +262,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
@@ -295,8 +277,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
@@ -337,8 +317,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
@@ -354,8 +332,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
@@ -370,8 +346,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\&.
@@ -385,8 +359,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
@@ -404,8 +376,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
@@ -420,8 +390,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\&.
@@ -435,8 +403,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\&.
@@ -468,7 +434,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.6, \(lqRunning Multiple MySQL Instances on One Machine\(rq\&.
 .RE
 .sp
 .RS 4
index 93495090f206af2604aab1e09224615b0075a168..af424af2664ad53be2c9ff13ae80429f17cea61a 100644 (file)
@@ -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 <http://docbook.sf.net/>
-.\"      Date: 03/02/2016
+.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
+.\"      Date: 08/25/2016
 .\"    Manual: MySQL Database System
 .\"    Source: MySQL 5.6
 .\"  Language: English
 .\"
-.TH "\FBMYSQLD_SAFE\FR" "1" "03/02/2016" "MySQL 5\&.6" "MySQL Database System"
+.TH "\FBMYSQLD_SAFE\FR" "1" "08/25/2016" "MySQL 5\&.6" "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,33 @@ 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
+library\&. As of MySQL 5\&.6\&.33, 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\&.6\&.33, 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\&.6\&. 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\&.6\&.31, MySQL distributions no longer include a
+tcmalloc
+library\&.
+.sp .5v
+.RE
 The
 \fB\-\-malloc\-lib\fR
 option works by modifying the
@@ -379,8 +376,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
@@ -390,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\&.6\&.33, this option can be given only on the command line and not in an option file\&.
 .RE
 .sp
 .RS 4
@@ -400,8 +397,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
@@ -423,6 +418,8 @@ uses
 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\&.
 .RE
 .sp
 .RS 4
@@ -433,8 +430,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 +445,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 +458,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 +493,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 +506,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\&.
@@ -532,9 +519,6 @@ The path name of the plugin directory\&.
 .sp -1
 .IP \(bu 2.3
 .\}
-.\" mysqld_safe: port option
-.\" port option: mysqld_safe
-.\" TCP/IP
 \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
@@ -550,8 +534,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
@@ -567,8 +549,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\&.
@@ -582,10 +562,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
@@ -614,8 +590,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
@@ -641,8 +615,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
@@ -658,8 +630,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
index 84140c91b7d8d4feaff6a36ec06e8afe1868873d..6088a23c73ad34760bab0e97e57c581ca636e999 100644 (file)
@@ -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 <http://docbook.sf.net/>
-.\"      Date: 03/02/2016
+.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
+.\"      Date: 08/25/2016
 .\"    Manual: MySQL Database System
 .\"    Source: MySQL 5.6
 .\"  Language: English
 .\"
-.TH "\FBMYSQLDUMP\FR" "1" "03/02/2016" "MySQL 5\&.6" "MySQL Database System"
+.TH "\FBMYSQLDUMP\FR" "1" "08/25/2016" "MySQL 5\&.6" "MySQL Database System"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
 .\" -----------------------------------------------------------------
 .\" * 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"
@@ -282,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.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
@@ -419,8 +414,6 @@ command logs into a MySQL server to extract information\&. The following options
 .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\&.
@@ -436,8 +429,6 @@ This option is supported beginning with MySQL 5\&.6\&.1\&.
 .sp -1
 .IP \(bu 2.3
 .\}
-.\" mysqldump: compress option
-.\" compress option: mysqldump
 \fB\-\-compress\fR,
 \fB\-C\fR
 .sp
@@ -452,8 +443,6 @@ Compress all information sent between the client and the server if both support
 .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
@@ -468,14 +457,12 @@ Section\ \&6.3.7, \(lqPluggable Authentication\(rq\&.
 .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.4.1.7, \(lqThe Cleartext Client-Side Authentication Plugin\(rq\&.)
+Section\ \&6.5.1.7, \(lqThe Cleartext Client-Side Authentication Plugin\(rq\&.)
 .sp
 This option was added in MySQL 5\&.6\&.28\&.
 .RE
@@ -488,8 +475,6 @@ This option was added in MySQL 5\&.6\&.28\&.
 .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
@@ -505,8 +490,6 @@ localhost\&.
 .sp -1
 .IP \(bu 2.3
 .\}
-.\" mysqldump: login-path option
-.\" login-path option: mysqldump
 \fB\-\-login\-path=\fR\fB\fIname\fR\fR
 .sp
 Read options from the named login path in the
@@ -527,8 +510,6 @@ utility\&. See
 .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
@@ -556,8 +537,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
@@ -572,8 +551,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
@@ -592,8 +569,6 @@ Section\ \&6.3.7, \(lqPluggable Authentication\(rq\&.
 .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
@@ -608,8 +583,6 @@ The TCP/IP port number to use for the connection\&.
 .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
@@ -624,8 +597,6 @@ Section\ \&4.2.2, \(lqConnecting to the MySQL Server\(rq\&.
 .sp -1
 .IP \(bu 2.3
 .\}
-.\" mysqldump: secure-auth option
-.\" secure-auth option: mysqldump
 \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\&. This option is enabled by default; use
@@ -644,7 +615,22 @@ to disable it\&. This option was added in MySQL 5\&.6\&.17\&.
 .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 will be removed in a future MySQL release\&. For account upgrade instructions, see
-Section\ \&6.4.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
+.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 deprecated and will be removed in a future release\&. As of MySQL 5\&.7\&.5, it is always enabled and attempting to disable it produces an error\&.
 .sp .5v
 .RE
 .RE
@@ -657,8 +643,6 @@ Section\ \&6.4.1.3, \(lqMigrating Away from Pre-4.1 Password Hashing and the mys
 .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
@@ -674,14 +658,12 @@ 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
 \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, \(lqCommand Options for Secure Connections\(rq\&.
+Section\ \&6.4.5, \(lqCommand Options for Secure Connections\(rq\&.
 .RE
 .sp
 .RS 4
@@ -692,8 +674,6 @@ Section\ \&6.3.9.5, \(lqCommand Options for Secure Connections\(rq\&.
 .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
@@ -752,8 +732,6 @@ These options are used to control which option files to read\&.
 .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\&.
@@ -769,8 +747,6 @@ is interpreted relative to the current directory if given as a relative path nam
 .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\&.
@@ -786,8 +762,6 @@ is interpreted relative to the current directory if given as a relative path nam
 .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
@@ -816,8 +790,6 @@ groups\&.
 .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,
@@ -843,8 +815,6 @@ utility\&. See
 .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\&.
@@ -862,8 +832,6 @@ include setting up an entire new MySQL instance (including database tables), and
 .sp -1
 .IP \(bu 2.3
 .\}
-.\" mysqldump: add-drop-database option
-.\" add-drop-database option: mysqldump
 \fB\-\-add\-drop\-database\fR
 .sp
 Write a
@@ -887,8 +855,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
@@ -906,8 +872,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
@@ -925,8 +889,6 @@ statement\&.
 .sp -1
 .IP \(bu 2.3
 .\}
-.\" mysqldump: all-tablespaces option
-.\" all-tablespaces option: mysqldump
 \fB\-\-all\-tablespaces\fR,
 \fB\-Y\fR
 .sp
@@ -944,8 +906,6 @@ table\&. This information is not otherwise included in the output from
 .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
@@ -966,8 +926,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
@@ -1005,8 +963,6 @@ option for this purpose\&.
 .sp -1
 .IP \(bu 2.3
 .\}
-.\" mysqldump: no-tablespaces option
-.\" no-tablespaces option: mysqldump
 \fB\-\-no\-tablespaces\fR,
 \fB\-y\fR
 .sp
@@ -1026,8 +982,6 @@ statements in the output of
 .sp -1
 .IP \(bu 2.3
 .\}
-.\" mysqldump: replace option
-.\" replace option: mysqldump
 \fB\-\-replace\fR
 .sp
 Write
@@ -1047,8 +1001,6 @@ The following options print debugging information, encode debugging information
 .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\&.
@@ -1062,8 +1014,6 @@ Permit creation of column names that are keywords\&. This works by prefixing eac
 .sp -1
 .IP \(bu 2.3
 .\}
-.\" mysqldump: comments option
-.\" comments option: mysqldump
 \fB\-\-comments\fR,
 \fB\-i\fR
 .sp
@@ -1079,8 +1029,6 @@ Write additional information in the dump file such as program version, server ve
 .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
@@ -1099,8 +1047,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\&.
@@ -1114,8 +1060,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\&.
@@ -1129,8 +1073,6 @@ Print debugging information and memory and CPU usage statistics when the program
 .sp -1
 .IP \(bu 2.3
 .\}
-.\" mysqldump: dump-date option
-.\" dump-date option: mysqldump
 \fB\-\-dump\-date\fR
 .sp
 If the
@@ -1168,8 +1110,6 @@ suppresses date printing\&.
 .sp -1
 .IP \(bu 2.3
 .\}
-.\" mysqldump: force option
-.\" force option: mysqldump
 \fB\-\-force\fR,
 \fB\-f\fR
 .sp
@@ -1194,8 +1134,6 @@ prints the error message, but it also writes an SQL comment containing the view
 .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\&.
@@ -1209,8 +1147,6 @@ Log warnings and errors by appending them to the named file\&. The default is to
 .sp -1
 .IP \(bu 2.3
 .\}
-.\" mysqldump: skip-comments option
-.\" skip-comments option: mysqldump
 \fB\-\-skip\-comments\fR
 .sp
 See the description for the
@@ -1226,8 +1162,6 @@ option\&.
 .sp -1
 .IP \(bu 2.3
 .\}
-.\" mysqldump: verbose option
-.\" verbose option: mysqldump
 \fB\-\-verbose\fR,
 \fB\-v\fR
 .sp
@@ -1246,8 +1180,6 @@ command itself\&.
 .sp -1
 .IP \(bu 2.3
 .\}
-.\" mysqldump: help option
-.\" help option: mysqldump
 \fB\-\-help\fR,
 \fB\-?\fR
 .sp
@@ -1262,8 +1194,6 @@ Display a help message and exit\&.
 .sp -1
 .IP \(bu 2.3
 .\}
-.\" mysqldump: version option
-.\" version option: mysqldump
 \fB\-\-version\fR,
 \fB\-V\fR
 .sp
@@ -1282,8 +1212,6 @@ command represents character data with national language settings\&.
 .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
@@ -1298,8 +1226,6 @@ Section\ \&10.5, \(lqCharacter Set Configuration\(rq\&.
 .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
@@ -1319,8 +1245,6 @@ utf8\&.
 .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
@@ -1338,8 +1262,6 @@ setting, the same as specifying
 .sp -1
 .IP \(bu 2.3
 .\}
-.\" mysqldump: set-charset option
-.\" set-charset option: mysqldump
 \fB\-\-set\-charset\fR
 .sp
 Write
@@ -1362,8 +1284,6 @@ command is frequently used to create an empty instance, or an instance including
 .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
@@ -1385,8 +1305,6 @@ statement at the end of the output\&.
 .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
@@ -1403,8 +1321,6 @@ statement to the server after performing the dump operation\&. This option autom
 .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
@@ -1448,8 +1364,6 @@ options can also be used\&.
 .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
@@ -1471,8 +1385,6 @@ options for the host name and TCP/IP port number of the slave\*(Aqs master\&.
 .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
@@ -1514,8 +1426,6 @@ Section\ \&17.2.2, \(lqReplication Relay and Status Logs\(rq)\&.
 .sp -1
 .IP \(bu 2.3
 .\}
-.\" mysqldump: set-gtid-purged option
-.\" set-gtid-purged option: mysqldump
 \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
@@ -1614,8 +1524,6 @@ The following options specify how to represent the entire dump file or certain k
 .sp -1
 .IP \(bu 2.3
 .\}
-.\" mysqldump: compact option
-.\" compact option: mysqldump
 \fB\-\-compact\fR
 .sp
 Produce more compact output\&. This option enables the
@@ -1635,8 +1543,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
@@ -1670,8 +1576,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
@@ -1688,8 +1592,6 @@ statements that include column names\&.
 .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
@@ -1705,17 +1607,9 @@ statements\&.
 .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
@@ -1735,8 +1629,6 @@ Section\ \&13.2.6, \(lqLOAD DATA INFILE Syntax\(rq\&.
 .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,
@@ -1758,8 +1650,6 @@ BIT\&.
 .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
@@ -1779,8 +1669,6 @@ Section\ \&13.2.6, \(lqLOAD DATA INFILE Syntax\(rq\&.
 .sp -1
 .IP \(bu 2.3
 .\}
-.\" mysqldump: quote-names option
-.\" quote-names option: mysqldump
 \fB\-\-quote\-names\fR,
 \fB\-Q\fR
 .sp
@@ -1805,8 +1693,6 @@ that may enable
 .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
@@ -1827,8 +1713,6 @@ carriage return/newline sequences\&.
 .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
@@ -1889,8 +1773,6 @@ option\&.
 .sp -1
 .IP \(bu 2.3
 .\}
-.\" mysqldump: tz-utc option
-.\" tz-utc option: mysqldump
 \fB\-\-tz\-utc\fR
 .sp
 This option enables
@@ -1917,8 +1799,6 @@ is enabled by default\&. To disable it, use
 .sp -1
 .IP \(bu 2.3
 .\}
-.\" mysqldump: xml option
-.\" xml option: mysqldump
 \fB\-\-xml\fR,
 \fB\-X\fR
 .sp
@@ -2033,8 +1913,6 @@ clause\&.
 .sp -1
 .IP \(bu 2.3
 .\}
-.\" mysqldump: all-databases option
-.\" all-databases option: mysqldump
 \fB\-\-all\-databases\fR,
 \fB\-A\fR
 .sp
@@ -2058,8 +1936,6 @@ Section\ \&17.2.2, \(lqReplication Relay and Status Logs\(rq) were not included
 .sp -1
 .IP \(bu 2.3
 .\}
-.\" mysqldump: databases option
-.\" databases option: mysqldump
 \fB\-\-databases\fR,
 \fB\-B\fR
 .sp
@@ -2080,8 +1956,6 @@ statements are included in the output before each new database\&.
 .sp -1
 .IP \(bu 2.3
 .\}
-.\" mysqldump: events option
-.\" events option: mysqldump
 \fB\-\-events\fR,
 \fB\-E\fR
 .sp
@@ -2111,8 +1985,6 @@ database\&.
 .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\&.
@@ -2126,8 +1998,6 @@ Do not dump the given table, which must be specified using both the database and
 .sp -1
 .IP \(bu 2.3
 .\}
-.\" mysqldump: no-data option
-.\" no-data option: mysqldump
 \fB\-\-no\-data\fR,
 \fB\-d\fR
 .sp
@@ -2144,8 +2014,6 @@ statement for the table (for example, to create an empty copy of the table by lo
 .sp -1
 .IP \(bu 2.3
 .\}
-.\" mysqldump: routines option
-.\" routines option: mysqldump
 \fB\-\-routines\fR,
 \fB\-R\fR
 .sp
@@ -2183,8 +2051,6 @@ option\&. (Bug #11760384, Bug #52792)
 .sp -1
 .IP \(bu 2.3
 .\}
-.\" mysqldump: tables option
-.\" tables option: mysqldump
 \fB\-\-tables\fR
 .sp
 Override the
@@ -2204,12 +2070,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
@@ -2220,8 +2088,6 @@ Include triggers for each dumped table in the output\&. This option is enabled b
 .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
@@ -2265,8 +2131,6 @@ transactional options, primarily for the dump operation\&.
 .sp -1
 .IP \(bu 2.3
 .\}
-.\" mysqldump: delayed-insert option
-.\" delayed-insert option: mysqldump
 \fB\-\-delayed\-insert\fR
 .sp
 For those nontransactional tables that support the
@@ -2288,8 +2152,6 @@ inserts are deprecated, so this option will be removed in a future release\&.
 .sp -1
 .IP \(bu 2.3
 .\}
-.\" mysqldump: disable-keys option
-.\" disable-keys option: mysqldump
 \fB\-\-disable\-keys\fR,
 \fB\-K\fR
 .sp
@@ -2312,8 +2174,6 @@ tables\&.
 .sp -1
 .IP \(bu 2.3
 .\}
-.\" mysqldump: extended-insert option
-.\" extended-insert option: mysqldump
 \fB\-\-extended\-insert\fR,
 \fB\-e\fR
 .sp
@@ -2332,8 +2192,6 @@ lists\&. This results in a smaller dump file and speeds up inserts when the file
 .sp -1
 .IP \(bu 2.3
 .\}
-.\" mysqldump: insert-ignore option
-.\" insert-ignore option: mysqldump
 \fB\-\-insert\-ignore\fR
 .sp
 Write
@@ -2351,8 +2209,6 @@ statements\&.
 .sp -1
 .IP \(bu 2.3
 .\}
-.\" mysqldump: opt option
-.\" opt option: mysqldump
 \fB\-\-opt\fR
 .sp
 This option, enabled by default, is shorthand for the combination of
@@ -2383,8 +2239,6 @@ for information about selectively enabling or disabling a subset of the options
 .sp -1
 .IP \(bu 2.3
 .\}
-.\" mysqldump: quick option
-.\" quick option: mysqldump
 \fB\-\-quick\fR,
 \fB\-q\fR
 .sp
@@ -2401,8 +2255,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: skip-opt option
-.\" skip-opt option: mysqldump
 \fB\-\-skip\-opt\fR
 .sp
 See the description for the
@@ -2420,8 +2272,6 @@ The following options trade off the performance of the dump operation, against t
 .sp -1
 .IP \(bu 2.3
 .\}
-.\" mysqldump: add-locks option
-.\" add-locks option: mysqldump
 \fB\-\-add\-locks\fR
 .sp
 Surround each table dump with
@@ -2440,8 +2290,6 @@ Section\ \&8.2.2.1, \(lqSpeed of INSERT Statements\(rq\&.
 .sp -1
 .IP \(bu 2.3
 .\}
-.\" mysqldump: flush-logs option
-.\" flush-logs option: mysqldump
 \fB\-\-flush\-logs\fR,
 \fB\-F\fR
 .sp
@@ -2469,8 +2317,6 @@ together with
 .sp -1
 .IP \(bu 2.3
 .\}
-.\" mysqldump: flush-privileges option
-.\" flush-privileges option: mysqldump
 \fB\-\-flush\-privileges\fR
 .sp
 Add a
@@ -2492,8 +2338,6 @@ database for proper restoration\&.
 .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
@@ -2511,8 +2355,6 @@ and
 .sp -1
 .IP \(bu 2.3
 .\}
-.\" mysqldump: lock-tables option
-.\" lock-tables option: mysqldump
 \fB\-\-lock\-tables\fR,
 \fB\-l\fR
 .sp
@@ -2546,8 +2388,6 @@ at the end of the option list\&.
 .sp -1
 .IP \(bu 2.3
 .\}
-.\" mysqldump: no-autocommit option
-.\" no-autocommit option: mysqldump
 \fB\-\-no\-autocommit\fR
 .sp
 Enclose the
@@ -2567,8 +2407,6 @@ statements\&.
 .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
@@ -2586,8 +2424,6 @@ table, but makes the dump operation take considerably longer\&.
 .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
@@ -2606,8 +2442,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
@@ -2795,7 +2629,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
@@ -2870,10 +2704,7 @@ for all features except index disabling and table locking, use
 \fB\-\-disable\-keys\fR
 \fB\-\-lock\-tables\fR\&.
 .RE
-Restrictions.\" mysqldump: views
-.\" mysqldump: problems
-.\" mysqldump: workarounds
-.PP
+Restrictions.PP
 \fBmysqldump\fR
 does not dump the
 INFORMATION_SCHEMA
index 8a8451f4cc2ea0e103473159d24827ca73e0c327..6cdc05b8ce1038f985018fc26b2d5121002993dd 100644 (file)
@@ -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 <http://docbook.sf.net/>
-.\"      Date: 03/02/2016
+.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
+.\"      Date: 08/25/2016
 .\"    Manual: MySQL Database System
 .\"    Source: MySQL 5.6
 .\"  Language: English
 .\"
-.TH "\FBMYSQLDUMPSLOW\FR" "1" "03/02/2016" "MySQL 5\&.6" "MySQL Database System"
+.TH "\FBMYSQLDUMPSLOW\FR" "1" "08/25/2016" "MySQL 5\&.6" "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
index 8d7114c050162299e6279bba1acf6ec2c85f68aa..b9ebe60a01519bb2cd094830d47ca7bbe89fc3a4 100644 (file)
@@ -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 <http://docbook.sf.net/>
-.\"      Date: 03/02/2016
+.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
+.\"      Date: 08/25/2016
 .\"    Manual: MySQL Database System
 .\"    Source: MySQL 5.6
 .\"  Language: English
 .\"
-.TH "\FBMYSQLHOTCOPY\FR" "1" "03/02/2016" "MySQL 5\&.6" "MySQL Database System"
+.TH "\FBMYSQLHOTCOPY\FR" "1" "08/25/2016" "MySQL 5\&.6" "MySQL Database System"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
 .\" -----------------------------------------------------------------
 .\" * 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"
@@ -140,8 +135,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
@@ -156,8 +149,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\&.
@@ -171,8 +162,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
@@ -188,8 +177,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
@@ -206,8 +193,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
@@ -230,8 +215,6 @@ option given to
 .sp -1
 .IP \(bu 2.3
 .\}
-.\" mysqlhotcopy: debug option
-.\" debug option: mysqlhotcopy
 \fB\-\-debug\fR
 .sp
 Enable debug output\&.
@@ -245,8 +228,6 @@ Enable debug output\&.
 .sp -1
 .IP \(bu 2.3
 .\}
-.\" mysqlhotcopy: dryrun option
-.\" dryrun option: mysqlhotcopy
 \fB\-\-dryrun\fR,
 \fB\-n\fR
 .sp
@@ -261,8 +242,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\&.
@@ -276,8 +255,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
@@ -294,8 +271,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\&.
@@ -309,8 +284,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
@@ -327,8 +300,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
@@ -345,8 +316,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
@@ -364,8 +333,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
@@ -380,8 +347,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
 In MySQL 5\&.6,
@@ -401,8 +366,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
@@ -417,8 +380,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
@@ -435,8 +396,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\&.
@@ -450,8 +409,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\&.
@@ -465,8 +422,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 master info repository file or table after locking all the tables\&.
@@ -480,8 +435,6 @@ Reset the master info repository file or table 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
@@ -497,8 +450,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\&.
@@ -512,8 +463,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
@@ -528,8 +477,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
index 07bbb54c18aec8af8eb9d432c336173e5c2f0b4e..93ee02d6ecb7417908a2b4c5927e58ecde967dd4 100644 (file)
@@ -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 <http://docbook.sf.net/>
-.\"      Date: 03/02/2016
+.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
+.\"      Date: 08/25/2016
 .\"    Manual: MySQL Database System
 .\"    Source: MySQL 5.6
 .\"  Language: English
 .\"
-.TH "\FBMYSQLIMPORT\FR" "1" "03/02/2016" "MySQL 5\&.6" "MySQL Database System"
+.TH "\FBMYSQLIMPORT\FR" "1" "08/25/2016" "MySQL 5\&.6" "MySQL Database System"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
 .\" -----------------------------------------------------------------
 .\" * 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
@@ -105,8 +98,6 @@ Display a help message and exit\&.
 .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\&.
@@ -122,8 +113,6 @@ This option is supported beginning with MySQL 5\&.6\&.1\&.
 .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
@@ -138,8 +127,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
@@ -154,8 +141,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
@@ -170,8 +155,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
@@ -190,8 +173,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\&.
@@ -205,8 +186,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\&.
@@ -220,8 +199,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
@@ -238,8 +215,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
@@ -256,8 +231,6 @@ This option was added in MySQL 5\&.6\&.2\&.
 .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\&.
@@ -273,8 +246,6 @@ is interpreted relative to the current directory if given as a relative path nam
 .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\&.
@@ -290,8 +261,6 @@ is interpreted relative to the current directory if given as a relative path nam
 .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
@@ -320,8 +289,6 @@ groups\&.
 .sp -1
 .IP \(bu 2.3
 .\}
-.\" mysqlimport: delete option
-.\" delete option: mysqlimport
 \fB\-\-delete\fR,
 \fB\-D\fR
 .sp
@@ -336,14 +303,12 @@ 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.4.1.7, \(lqThe Cleartext Client-Side Authentication Plugin\(rq\&.)
+Section\ \&6.5.1.7, \(lqThe Cleartext Client-Side Authentication Plugin\(rq\&.)
 .sp
 This option was added in MySQL 5\&.6\&.28\&.
 .RE
@@ -356,17 +321,9 @@ This option was added in MySQL 5\&.6\&.28\&.
 .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
@@ -382,8 +339,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
@@ -401,8 +356,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
@@ -418,8 +371,6 @@ localhost\&.
 .sp -1
 .IP \(bu 2.3
 .\}
-.\" mysqlimport: ignore option
-.\" ignore option: mysqlimport
 \fB\-\-ignore\fR,
 \fB\-i\fR
 .sp
@@ -436,8 +387,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
@@ -453,8 +402,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
@@ -471,8 +418,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
@@ -487,8 +432,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
@@ -505,8 +448,6 @@ tables for writing before processing any text files\&. This ensures that all tab
 .sp -1
 .IP \(bu 2.3
 .\}
-.\" mysqlimport: login-path option
-.\" login-path option: mysqlimport
 \fB\-\-login\-path=\fR\fB\fIname\fR\fR
 .sp
 Read options from the named login path in the
@@ -527,8 +468,6 @@ utility\&. See
 .sp -1
 .IP \(bu 2.3
 .\}
-.\" mysqlimport: low-priority option
-.\" low-priority option: mysqlimport
 \fB\-\-low\-priority\fR
 .sp
 Use
@@ -547,8 +486,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,
@@ -574,8 +511,6 @@ utility\&. See
 .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
@@ -603,8 +538,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
@@ -619,8 +552,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
@@ -641,8 +572,6 @@ This option was added in MySQL 5\&.6\&.2\&.
 .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
@@ -657,8 +586,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\&.
@@ -672,8 +599,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
@@ -688,8 +613,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
@@ -710,8 +633,6 @@ options control handling of input rows that duplicate existing rows on unique ke
 .sp -1
 .IP \(bu 2.3
 .\}
-.\" mysqlimport: secure-auth option
-.\" secure-auth option: mysqlimport
 \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\&. This option is enabled by default; use
@@ -730,7 +651,22 @@ to disable it\&. This option was added in MySQL 5\&.6\&.17\&.
 .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 will be removed in a future MySQL release\&. For account upgrade instructions, see
-Section\ \&6.4.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
+.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 deprecated and will be removed in a future release\&. As of MySQL 5\&.7\&.5, it is always enabled and attempting to disable it produces an error\&.
 .sp .5v
 .RE
 .RE
@@ -743,8 +679,6 @@ Section\ \&6.4.1.3, \(lqMigrating Away from Pre-4.1 Password Hashing and the mys
 .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
@@ -763,8 +697,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
@@ -779,8 +711,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
@@ -796,14 +726,12 @@ 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
 \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, \(lqCommand Options for Secure Connections\(rq\&.
+Section\ \&6.4.5, \(lqCommand Options for Secure Connections\(rq\&.
 .RE
 .sp
 .RS 4
@@ -814,8 +742,6 @@ Section\ \&6.3.9.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
@@ -830,8 +756,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
@@ -847,8 +771,6 @@ threads\&.
 .sp -1
 .IP \(bu 2.3
 .\}
-.\" mysqlimport: verbose option
-.\" verbose option: mysqlimport
 \fB\-\-verbose\fR,
 \fB\-v\fR
 .sp
@@ -863,8 +785,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
index fad8568ea997851ce55d3a51af76b6906e7922e5..236dc2a39232e8766eace2257f6ccbb952a9c36b 100644 (file)
@@ -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 <http://docbook.sf.net/>
-.\"      Date: 03/02/2016
+.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
+.\"      Date: 08/25/2016
 .\"    Manual: MySQL Database System
 .\"    Source: MySQL 5.6
 .\"  Language: English
 .\"
-.TH "\FBMYSQLSHOW\FR" "1" "03/02/2016" "MySQL 5\&.6" "MySQL Database System"
+.TH "\FBMYSQLSHOW\FR" "1" "08/25/2016" "MySQL 5\&.6" "MySQL Database System"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
 .\" -----------------------------------------------------------------
 .\" * 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\&.
@@ -169,8 +159,6 @@ This option is supported beginning with MySQL 5\&.6\&.1\&.
 .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
@@ -185,8 +173,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
@@ -201,8 +187,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
@@ -217,8 +201,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
@@ -237,8 +219,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\&.
@@ -252,8 +232,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\&.
@@ -267,8 +245,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
@@ -285,8 +261,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
@@ -303,8 +277,6 @@ This option was added in MySQL 5\&.6\&.2\&.
 .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\&.
@@ -320,8 +292,6 @@ is interpreted relative to the current directory if given as a relative path nam
 .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\&.
@@ -337,8 +307,6 @@ is interpreted relative to the current directory if given as a relative path nam
 .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
@@ -367,14 +335,12 @@ 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.4.1.7, \(lqThe Cleartext Client-Side Authentication Plugin\(rq\&.)
+Section\ \&6.5.1.7, \(lqThe Cleartext Client-Side Authentication Plugin\(rq\&.)
 .sp
 This option was added in MySQL 5\&.6\&.28\&.
 .RE
@@ -387,8 +353,6 @@ This option was added in MySQL 5\&.6\&.28\&.
 .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
@@ -403,8 +367,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
@@ -419,8 +381,6 @@ Show table indexes\&.
 .sp -1
 .IP \(bu 2.3
 .\}
-.\" mysqlshow: login-path option
-.\" login-path option: mysqlshow
 \fB\-\-login\-path=\fR\fB\fIname\fR\fR
 .sp
 Read options from the named login path in the
@@ -441,8 +401,6 @@ utility\&. See
 .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,
@@ -468,8 +426,6 @@ utility\&. See
 .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
@@ -497,8 +453,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
@@ -513,8 +467,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
@@ -535,8 +487,6 @@ This option was added in MySQL 5\&.6\&.2\&.
 .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
@@ -551,8 +501,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\&.
@@ -566,8 +514,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
@@ -582,8 +528,6 @@ Section\ \&4.2.2, \(lqConnecting to the MySQL Server\(rq\&.
 .sp -1
 .IP \(bu 2.3
 .\}
-.\" mysqlshow: secure-auth option
-.\" secure-auth option: mysqlshow
 \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\&. This option is enabled by default; use
@@ -602,7 +546,22 @@ to disable it\&. This option was added in MySQL 5\&.6\&.17\&.
 .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 will be removed in a future MySQL release\&. For account upgrade instructions, see
-Section\ \&6.4.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
+.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 deprecated and will be removed in a future release\&. As of MySQL 5\&.7\&.5, it is always enabled and attempting to disable it produces an error\&.
 .sp .5v
 .RE
 .RE
@@ -615,8 +574,6 @@ Section\ \&6.4.1.3, \(lqMigrating Away from Pre-4.1 Password Hashing and the mys
 .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
@@ -635,8 +592,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
@@ -655,8 +610,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
@@ -672,14 +625,12 @@ 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
 \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, \(lqCommand Options for Secure Connections\(rq\&.
+Section\ \&6.4.5, \(lqCommand Options for Secure Connections\(rq\&.
 .RE
 .sp
 .RS 4
@@ -690,8 +641,6 @@ Section\ \&6.3.9.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
@@ -706,8 +655,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
@@ -722,8 +669,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
@@ -738,8 +683,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
index 1a12182f61941c420e0254988aae280b739858bd..c23fecfd0c65e5a258efcbbd2875291b38af18a4 100644 (file)
@@ -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 <http://docbook.sf.net/>
-.\"      Date: 03/02/2016
+.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
+.\"      Date: 08/25/2016
 .\"    Manual: MySQL Database System
 .\"    Source: MySQL 5.6
 .\"  Language: English
 .\"
-.TH "\FBMYSQLSLAP\FR" "1" "03/02/2016" "MySQL 5\&.6" "MySQL Database System"
+.TH "\FBMYSQLSLAP\FR" "1" "08/25/2016" "MySQL 5\&.6" "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\&.6\&.2\&.
 .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\&.
@@ -542,8 +496,6 @@ is interpreted relative to the current directory if given as a relative path nam
 .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\&.
@@ -559,8 +511,6 @@ is interpreted relative to the current directory if given as a relative path nam
 .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,14 +568,12 @@ 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
 mysql_clear_password
 cleartext authentication plugin\&. (See
-Section\ \&6.4.1.7, \(lqThe Cleartext Client-Side Authentication Plugin\(rq\&.) This option was added in MySQL 5\&.6\&.7\&.
+Section\ \&6.5.1.7, \(lqThe Cleartext Client-Side Authentication Plugin\(rq\&.) This option was added in MySQL 5\&.6\&.7\&.
 .RE
 .sp
 .RS 4
@@ -640,8 +584,6 @@ Section\ \&6.4.1.7, \(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: login-path option
-.\" login-path option: mysqlslap
 \fB\-\-login\-path=\fR\fB\fIname\fR\fR
 .sp
 Read options from the named login path in the
@@ -710,8 +646,6 @@ utility\&. See
 .sp -1
 .IP \(bu 2.3
 .\}
-.\" mysqlslap: no-drop option
-.\" no-drop option: mysqlslap
 \fB\-\-no\-drop\fR
 .sp
 Prevent
@@ -727,8 +661,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,
@@ -754,8 +686,6 @@ utility\&. See
 .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
@@ -774,8 +704,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
@@ -794,8 +722,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
@@ -824,8 +750,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\&.
@@ -841,8 +765,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
@@ -870,8 +792,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
@@ -886,8 +806,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
@@ -908,8 +826,6 @@ This option was added in MySQL 5\&.6\&.2\&.
 .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
@@ -924,8 +840,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\&.
@@ -939,8 +853,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
@@ -956,8 +868,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\&.
@@ -971,8 +881,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
@@ -988,8 +896,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\&.
@@ -1003,8 +909,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
@@ -1019,8 +923,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
@@ -1037,8 +939,6 @@ statement to use for retrieving data\&.
 .sp -1
 .IP \(bu 2.3
 .\}
-.\" mysqlslap: secure-auth option
-.\" secure-auth option: mysqlslap
 \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\&. This option is enabled by default; use
@@ -1057,7 +957,22 @@ to disable it\&. This option was added in MySQL 5\&.6\&.17\&.
 .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 will be removed in a future MySQL release\&. For account upgrade instructions, see
-Section\ \&6.4.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
+.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 deprecated and will be removed in a future release\&. As of MySQL 5\&.7\&.5, it is always enabled and attempting to disable it produces an error\&.
 .sp .5v
 .RE
 .RE
@@ -1070,8 +985,6 @@ Section\ \&6.4.1.3, \(lqMigrating Away from Pre-4.1 Password Hashing and the mys
 .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\&.
@@ -1085,8 +998,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
@@ -1101,8 +1012,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
@@ -1118,14 +1027,12 @@ 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
 \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, \(lqCommand Options for Secure Connections\(rq\&.
+Section\ \&6.4.5, \(lqCommand Options for Secure Connections\(rq\&.
 .RE
 .sp
 .RS 4
@@ -1136,8 +1043,6 @@ Section\ \&6.3.9.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
@@ -1152,8 +1057,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
@@ -1168,8 +1071,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
index b4eb96761646269a31f7e0f49c55e151a9897c82..41a447dab5342108d982847ac77da28232e05166 100644 (file)
@@ -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 <http://docbook.sf.net/>
-.\"      Date: 03/02/2016
+.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
+.\"      Date: 08/25/2016
 .\"    Manual: MySQL Database System
 .\"    Source: MySQL
 .\"  Language: English
 .\"
-.TH "\FBMYSQLTEST\FR" "1" "03/02/2016" "MySQL" "MySQL Database System"
+.TH "\FBMYSQLTEST\FR" "1" "08/25/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
index 1ac6945674cdd6ff869e7fef3146a12a8f76caeb..22c913168d6b27ce2e6071e9e3be81348e7800d7 100644 (file)
@@ -1 +1 @@
-.so man/mysqltest.1
+.so mysqltest.1
index f9f15180208e0b272a30057de07b07274a7baa36..08e4b64560c94cfd8871c814e6923447668f0759 100644 (file)
@@ -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 <http://docbook.sf.net/>
-.\"      Date: 03/02/2016
+.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
+.\"      Date: 08/25/2016
 .\"    Manual: MySQL Database System
 .\"    Source: MySQL 5.6
 .\"  Language: English
 .\"
-.TH "\FBPERROR\FR" "1" "03/02/2016" "MySQL 5\&.6" "MySQL Database System"
+.TH "\FBPERROR\FR" "1" "08/25/2016" "MySQL 5\&.6" "MySQL Database System"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
 .\" -----------------------------------------------------------------
 .\" * 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
index e4c2ef8f126c731deaefc6ef3d5478cfbface046..42e523b86734bbf841c2fbda736cbb7cea66e18a 100644 (file)
@@ -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 <http://docbook.sf.net/>
-.\"      Date: 03/02/2016
+.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
+.\"      Date: 08/25/2016
 .\"    Manual: MySQL Database System
 .\"    Source: MySQL 5.6
 .\"  Language: English
 .\"
-.TH "\FBREPLACE\FR" "1" "03/02/2016" "MySQL 5\&.6" "MySQL Database System"
+.TH "\FBREPLACE\FR" "1" "08/25/2016" "MySQL 5\&.6" "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"
index e3d1ab18f5787ab828082a49fa223b91c600e1c4..355c686138fedc0f3d7ec68c0b1c04fe45f2ea22 100644 (file)
@@ -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 <http://docbook.sf.net/>
-.\"      Date: 03/02/2016
+.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
+.\"      Date: 08/25/2016
 .\"    Manual: MySQL Database System
 .\"    Source: MySQL 5.6
 .\"  Language: English
 .\"
-.TH "\FBRESOLVE_STACK_DUM" "1" "03/02/2016" "MySQL 5\&.6" "MySQL Database System"
+.TH "\FBRESOLVE_STACK_DUM" "1" "08/25/2016" "MySQL 5\&.6" "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
index 97b76581bd20da538ae664c1910d0929dc4f38c9..6c9e032141c9b141de2e6f9c749e468a9ae58e94 100644 (file)
@@ -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 <http://docbook.sf.net/>
-.\"      Date: 03/02/2016
+.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
+.\"      Date: 08/25/2016
 .\"    Manual: MySQL Database System
 .\"    Source: MySQL 5.6
 .\"  Language: English
 .\"
-.TH "\FBRESOLVEIP\FR" "1" "03/02/2016" "MySQL 5\&.6" "MySQL Database System"
+.TH "\FBRESOLVEIP\FR" "1" "08/25/2016" "MySQL 5\&.6" "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
index f6886e8dfd01fa5f3c7f34805b86ba76ae5734e6..ceca8319d1321733c4a4ca8da3e9768f2fdc82d2 100644 (file)
@@ -346,7 +346,7 @@ if (`select @@binlog_format = 'STATEMENT' || @@binlog_format = 'MIXED'`)
   --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
   eval select
   (@a:=load_file("$MYSQLTEST_VARDIR/tmp/mix_innodb_myisam_binlog.output"))
-  is not null;
+  is not null AS Loaded;
   --replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
   eval select
   @a like "%#%error_code=0%ROLLBACK\\n/*!*/;%ROLLBACK /* added by mysqlbinlog */;%" OR
index 1cfe8b2a7296b6732f49f8b3136a7a150520705d..ef98cc9f3155024c686289df9c583a1c5e8b1874 100644 (file)
@@ -429,8 +429,16 @@ if (`SELECT UPPER(LEFT($engine_type, 3)) != 'NDB'`)
   # they are declared without DEFAULT clause.
 
   sync_slave_with_master;
+  --replace_column 4 CURRENT_TIMESTAMP
   select * from t9;
 
+  # Bug #22916743 RBR DOES NOT USE DEFAULT CURRENT_TIMESTAMP FOR EXTRA COLUMN
+  # ON SLAVE
+  --let $assert_text= The values of column 'd' should have non-zero timetsamp.
+  --let $assert_cond= [SELECT COUNT(*) AS Val FROM t9 WHERE d = "0000-00-00 00:00:00", Val, 1] = 0
+  --source include/assert.inc
+  # End of test for Bug #22916743
+
   # todo: fix Bug #43992 slave sql thread can't tune own sql_mode ...
   # and add/restore waiting for stop test
 
diff --git a/mysql-wsrep-5.6/mysql-test/extra/rpl_tests/rpl_generate_mts_gap.test b/mysql-wsrep-5.6/mysql-test/extra/rpl_tests/rpl_generate_mts_gap.test
new file mode 100644 (file)
index 0000000..8652f0b
--- /dev/null
@@ -0,0 +1,47 @@
+# Following test first creates two databases (d1 and d2) and setup slave to use
+# two parallel workers. The test case then insert on the slave a tuple that will
+# block writes on d2 and generate gaps.
+
+--let $slave_stop_wait=5
+
+--echo #### I. Initialize ####
+
+--source include/rpl_connection_slave.inc
+--source include/stop_slave.inc
+SET @save.innodb_lock_wait_timeout= @@global.innodb_lock_wait_timeout;
+--eval set @@global.innodb_lock_wait_timeout=$slave_stop_wait + 1000
+
+--source include/start_slave.inc
+
+--source include/rpl_connection_master.inc
+CREATE DATABASE d1;
+CREATE DATABASE d2;
+CREATE TABLE d1.t (a INT PRIMARY KEY, name text) ENGINE=INNODB;
+CREATE TABLE d2.t (a INT PRIMARY KEY, name text) ENGINE=INNODB;
+
+--echo #### II. Prepare test scenario ####
+
+--source include/sync_slave_sql_with_master.inc
+BEGIN;
+INSERT INTO d2.t VALUES (2, 'Slave local'); # Hold T3
+INSERT INTO d1.t VALUES (3, 'Slave local'); # Hold T6
+
+--source include/rpl_connection_master.inc
+INSERT INTO d1.t VALUES (1, 'T1');
+INSERT INTO d2.t VALUES (1, 'T2');
+INSERT INTO d2.t VALUES (2, 'T3'); # This will be a gap when executed on slave
+INSERT INTO d2.t VALUES (3, 'T4'); # This will be a gap when executed on slave
+INSERT INTO d1.t VALUES (2, 'T5');
+
+--source include/rpl_connection_slave1.inc
+--let $table=d1.t
+--let $count=2
+--source include/wait_until_rows_count.inc
+
+--echo # Now d1.t has two rows and d2.t has one row.
+
+# Wait for coordinator to populate worker's queues.
+--let $show_statement= SHOW PROCESSLIST
+--let $field= State
+--let $condition= = 'Slave has read all relay log; waiting for the slave I/O thread to update it'
+--source include/wait_show_condition.inc
diff --git a/mysql-wsrep-5.6/mysql-test/extra/rpl_tests/rpl_mts_relay_log_recovery.test b/mysql-wsrep-5.6/mysql-test/extra/rpl_tests/rpl_mts_relay_log_recovery.test
new file mode 100644 (file)
index 0000000..c990e6c
--- /dev/null
@@ -0,0 +1,95 @@
+###############################################################################
+# Bug#21507981: REPLICATION POSITION LOST AFTER CRASH ON MTS CONFIGURED SLAVE
+#
+# Problem:
+# ========
+# Enable MTS along with crash-safe replication tables. Make sure that the server
+# is busily inserting data with multiple threads in parallel. Shutdown mysqld
+# uncleanly (kill -9 or power off server without notice).
+#
+# Now users are restarting the server with --relay-log-recovery=1 to recover the
+# crashed slave.
+#
+# This results in following error:
+# ================================
+# 2015-06-24 13:49:03 3895 [ERROR] --relay-log-recovery cannot
+# be executed when the slave was stopped with an error or
+# killed in MTS mode; consider using RESET SLAVE or restart
+# the server with --relay-log-recovery = 0 followed by
+# START SLAVE UNTIL SQL_AFTER_MTS_GAPS.
+#
+# i.e relay-log-recovery will not work in MTS mode.
+###############################################################################
+# Following test demonstrates that when gaps are generated due to MTS crash
+# but not due to an error then recovery should be successful with
+# --relay-log-recovery=1 option.
+#
+# ==== Usage ====
+# --let $skip_slave_start_var= BOOL [ TRUE / FALSE ]
+# --source extra/rpl_tests/rpl_mts_relay_log_recovery.test
+#
+# Parameters:
+#
+#   $skip_slave_start_var
+#     Boolean that specifies if 'skip_slave_start' server parameter should be
+#     TRUE or FALSE.
+#
+# Testing Method:
+# ===============
+# It first creates two databases (d1 and d2) and setup slave to use two parallel
+# workers. The test case then insert on the slave a tuple that will block
+# writes on d2 and generate gaps. Crash the slave server at this point and
+# bring it back with --relay-log-recovery=1 and crash safe tables. Recovery
+# should be successful.
+
+--source extra/rpl_tests/rpl_generate_mts_gap.test
+
+--source include/rpl_connection_slave.inc
+CALL mtr.add_suppression("Recovery from master pos");
+# Kill the slave server
+--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.2.expect
+let PID_FILE= `SELECT @@pid_file`;
+perl;
+use strict;
+my $file= $ENV{'PID_FILE'} or die "Pid file not set";
+open(FILE, "$file") or die("Unable to open $file: $!\n");
+my $pid=0;
+while (<FILE>) {
+      $pid = $_;
+}
+close(FILE);
+kill 9, $pid;
+EOF
+
+# Restart the slave server
+--let $rpl_server_number= 2
+--let $rpl_server_parameters= --skip_slave_start=$skip_slave_start_var --relay_log_info_repository=TABLE --master_info_repository=TABLE --sync_master_info=1 --relay-log-recovery=1
+--source include/rpl_start_server.inc
+
+--exec echo "After restart gaps should be filled."
+
+--let $assert_text= Table d1.t should contain 2 rows.
+--let $assert_cond= [select count(*) from d1.t] = 2
+--source include/assert.inc
+
+--let $assert_text= Table d2.t should contain 3 rows.
+--let $assert_cond= [select count(*) from d2.t] = 3
+--source include/assert.inc
+
+--source include/start_slave.inc
+
+# Check consistency
+--source include/rpl_connection_master.inc
+--source include/sync_slave_sql_with_master.inc
+--let $diff_tables= master:d1.t, slave:d1.t
+--source include/diff_tables.inc
+
+--let $diff_tables= master:d2.t, slave:d2.t
+--source include/diff_tables.inc
+
+#
+# Cleanup
+#
+--source include/rpl_connection_master.inc
+DROP DATABASE d1;
+DROP DATABASE d2;
index 505798e432a5119c8e2f9725bf0d1555a178d51c..a697fc52e6ab221c3c95844504099001753467a5 100644 (file)
@@ -72,15 +72,11 @@ if ($innodb) {
   }
 }
 --eval EXPLAIN FORMAT=JSON $query;
-if ($validation) {
---disable_query_log
---replace_result $MASTER_MYSOCK MASTER_MYSOCK
+--disable_result_log
 --exec $MYSQL -S $MASTER_MYSOCK -u root -r test -e "EXPLAIN FORMAT=JSON $query;" > $MYSQLTEST_VARDIR/tmp/explain.json
---replace_regex  /[-]*// /FILE.[\/\\:_\.0-9A-Za-z]*/Validation:/
---exec python $MYSQL_TEST_DIR/suite/opt_trace/validate_json.py $MYSQLTEST_VARDIR/tmp/explain.json 
+--exec perl $MYSQL_TEST_DIR/suite/opt_trace/validate_json.pl $MYSQLTEST_VARDIR/tmp/explain.json
 --remove_file '$MYSQLTEST_VARDIR/tmp/explain.json'
---enable_query_log
-}
+--enable_result_log
 }
 
 if ($select) {
@@ -107,15 +103,11 @@ if ($innodb) {
   }
 }
 --eval EXPLAIN FORMAT=JSON $select;
-if ($validation) {
---disable_query_log
---replace_result $MASTER_MYSOCK MASTER_MYSOCK
+--disable_result_log
 --exec $MYSQL -S $MASTER_MYSOCK -u root -r test -e "EXPLAIN FORMAT=JSON $select;" > $MYSQLTEST_VARDIR/tmp/explain.json
---replace_regex  /[-]*// /FILE.[\/\\:_\.0-9A-Za-z]*/Validation:/
---exec python $MYSQL_TEST_DIR/suite/opt_trace/validate_json.py $MYSQLTEST_VARDIR/tmp/explain.json 
+--exec perl $MYSQL_TEST_DIR/suite/opt_trace/validate_json.pl $MYSQLTEST_VARDIR/tmp/explain.json
 --remove_file '$MYSQLTEST_VARDIR/tmp/explain.json'
---enable_query_log
-}
+--enable_result_log
 }
 }
 
index 565253854ac3d01650b6e3984c6191bff223c525..e20f01fad90dd5052420c91a6252a2a3c40b4d94 100644 (file)
@@ -1,3 +1,2 @@
-let $wait_timeout = 10;
 let $wait_condition = SELECT 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_ready' AND VARIABLE_VALUE = 'ON';
 --source include/wait_condition.inc
index 228ccce95f85b004d487df925dcd69e6aa52adb9..6c3563d1b39d4ddefe50169e588725f189c0d96a 100644 (file)
@@ -1,4 +1,4 @@
--- Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
+-- Copyright (c) 2008, 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
@@ -246,6 +246,11 @@ INSERT INTO global_suppressions VALUES
  ("Changed limits: table_open_cache: *"),
  ("Could not increase number of max_open_files to more than *"),
 
+ /*
+  Warnings related to --secure-file-priv
+ */
+ ("Insecure configuration for --secure-file-priv:*"),
+
  /*
    Galera suppressions 
  */
@@ -281,10 +286,17 @@ INSERT INTO global_suppressions VALUES
  ("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 -1 \\(Operation not permitted\\)"),
- ("WSREP: Action message in non-primary configuration from member 0"),
+ ("Action message in non-primary configuration from member"),
  ("InnoDB: Resizing redo log from"),
  ("InnoDB: Starting to delete and rewrite log files"),
  ("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"),
+-- "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"),
+ ("install timer expired"),
+ ("Last Applied Action message in non-primary configuration from member"),
 
  ("THE_LAST_SUPPRESSION")||
 
index 8b3b387f724ec2d9865455a1df7ae19804e98b66..74ba673d19012160b821d68df89c6a5a2d0bab63 100644 (file)
@@ -18,7 +18,7 @@ perl;
   # their paths may vary:
   @skipvars=qw/basedir open-files-limit general-log-file plugin-dir
                pid-file slow-query-log-file
-                          datadir slave-load-tmpdir tmpdir socket table-definition-cache table-open-cache wsrep-node-name/;
+               datadir slave-load-tmpdir tmpdir socket table-definition-cache table-open-cache secure-file-priv wsrep-node-name/;
 
   # Plugins which may or may not be there:
   @plugins=qw/innodb ndb ndbinfo archive blackhole federated partition ndbcluster debug temp-pool ssl des-key-file
index 2661ffadea0944839fce919fdfeaa447f5f42971..79bb82cae7e1747664a7cab864065f4057ae42bb 100644 (file)
@@ -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
index a1a378a9c7c460ff6e061672c933e41a094b0722..7dc8ba29473e415795845ae2f27b763a5c692ecc 100644 (file)
@@ -46,3 +46,5 @@ libmemcached       plugin/innodb_memcached/daemon_memcached DAEMON_MEMCACHED dae
 innodb_engine      plugin/innodb_memcached/innodb_memcache INNODB_ENGINE
 validate_password  plugin/password_validation VALIDATE_PASSWORD validate_password
 mysql_no_login     plugin/mysql_no_login      MYSQL_NO_LOGIN    mysql_no_login
+test_udf_services  plugin/udf_services TESTUDFSERVICES
+connection_control  plugin/connection_control   CONNECTION_CONTROL_PLUGIN    connection_control
index e8c01f0524404f267783508dd3fe513b3f2a8294..8e6e1fb33c7fa712ad10f082a4a173a20bc37e82 100644 (file)
@@ -1836,4 +1836,67 @@ CREATE TABLE t1 (
 
 SELECT 1 FROM t1 WHERE a <> 'a' OR a <> "";
 
-DROP TABLE t1;
\ No newline at end of file
+DROP TABLE t1;
+
+--echo #
+--echo # Bug #23259872: OPTIMIZER CHOOSES TO USE NON PRIMARY
+--echo #                INDEX, EVEN THOUGH COST IS HIGHER
+--echo #
+
+CREATE TABLE `giant_table` (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `one_id` int(11) NOT NULL,
+  `other_id` bigint(20) NOT NULL DEFAULT '0',
+  `some_other_id` int(11) DEFAULT 0 NOT NULL,
+  `something` double NOT NULL DEFAULT '0',
+  `comment` text COLLATE utf8_unicode_ci,
+  `flags` int(11) NOT NULL DEFAULT '0',
+  `time_created` int(11) NOT NULL DEFAULT '0',
+  PRIMARY KEY (`id`),
+  KEY `time_created` (`time_created`),
+  KEY `some_other_id` (`some_other_id`),
+  KEY `one_other_idx` (`one_id`,`other_id`),
+  KEY `other_id` (`other_id`,`time_created`)
+) ENGINE=InnoDB AUTO_INCREMENT=101651329
+DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ;
+
+CREATE TABLE t1 (c1 INT);
+INSERT INTO t1 VALUES (66136540), (68983250), (89627210), (77869520),
+                      (82543190), (67538270), (77282760), (77908170),
+                      (70923370), (68066360);
+DELIMITER $;
+CREATE PROCEDURE p()
+BEGIN
+SET @x = 1;
+REPEAT
+
+INSERT INTO giant_table(id,one_id)
+  SELECT c1 + @x, 0
+  FROM t1
+  WHERE c1 IN (66136540, 68985250, 89627210, 77869520 , 82543190, 67538270,
+               77282760, 77908170, 70923370, 68066360);
+SET @x =  @x + 1;
+
+UNTIL @x > 30 END REPEAT;
+END $
+DELIMITER ;$
+
+CALL p();
+SELECT count(*) FROM giant_table;
+
+INSERT INTO giant_table (id,one_id) VALUES (66136539, 0), (68983258,1),
+                                           (89628210,1), (77869520,2);
+INSERT INTO giant_table (id,one_id, some_other_id) VALUES(84673401, 0, 1),
+                                                         (61069031, 1, 1);
+
+EXPLAIN SELECT id, something, comment, time_created, one_id, other_id,
+               some_other_id, flags
+FROM giant_table
+WHERE id IN (66136539, 68983258, 89628210, 77869520, 82543198, 67538272,
+             84673401, 61069031, 68214385, 77282865, 76991297, 64569216,
+             89481638, 74534074, 70396537, 80076375, 63308530, 77908270,
+             70923271, 68066180)
+  AND (giant_table.flags & 0x01) = 0 AND giant_table.some_other_id = 0;
+
+DROP PROCEDURE p;
+DROP TABLE giant_table, t1;
index 8a95c37c2c353ab84cae139b438e5620c36d9a39..f777e9d82f5c83396ea460e165e80ad9a3092a2a 100644 (file)
@@ -6603,3 +6603,80 @@ set @@optimizer_switch=@old_opt_switch;
 # New tests go here.
 
 --echo # End of 5.6 tests
+
+--echo # Bug#21139722: Assertion failed: !(used_tables() & ((table_map) 1) ...
+
+CREATE TABLE t1(a INTEGER) engine=innodb;
+CREATE TABLE t2(b INTEGER) engine=innodb;
+
+let $query=
+SELECT 1
+FROM (SELECT 1 IN (SELECT 1
+                   FROM t1
+                   WHERE (SELECT 1 FROM t2 HAVING b) NOT IN (SELECT 1 FROM t2)
+                  )
+      FROM t2
+     ) AS z;
+
+eval explain $query;
+eval $query;
+
+DROP TABLE t1, t2;
+
+# A test case containing two outer references from different query blocks
+# Debugging is needed to inspect correct transformation, unfortunately.
+
+CREATE TABLE t1(a INTEGER) engine=innodb;
+
+let $query=
+SELECT (SELECT a
+        FROM t1 AS t2
+        WHERE a IN (SELECT t1.a+t2.a
+                    FROM t1 AS t3))
+FROM t1 AS t1;
+
+eval explain $query;
+eval $query;
+
+DROP TABLE t1;
+
+--echo # End of test for Bug#21139722
+
+--echo #
+--echo # Bug#21139402 ASSERTION FAILED: LENGTH > 0 && KEYPARTS != 0, CRASH IN JOIN::OPTIMIZE_KEYUSE
+--echo #
+
+CREATE TABLE t1 (a INT, b INT, PRIMARY KEY(a));
+CREATE TABLE t2 (c INT PRIMARY KEY);
+let $query=
+SELECT 1
+FROM t1
+WHERE 1 IN (SELECT (c IS NULL) IN (SELECT a
+                                   FROM t1
+                                   WHERE b)
+            FROM t2);
+eval EXPLAIN $query;
+eval $query;
+DROP TABLE t1,t2;
+
+--echo #
+--echo # Bug #22305361: QUERY WITH MATERIALIZED TABLE RETURNS INCORRECT
+--echo #                RESULTS IN 5.6
+--echo #
+
+CREATE TABLE t(a INT,b INT);
+INSERT INTO t VALUES (1,0),(1,0),(1,0),(1,0),(1,1);
+
+let query=
+SELECT *
+FROM t AS t1
+WHERE t1.a IN (SELECT t2.a
+               FROM t AS t2
+               WHERE CONCAT(t2.a,'') NOT IN (SELECT t3.a
+                                             FROM t AS t3
+                                             WHERE t3.b=1));
+
+eval EXPLAIN extended $query;
+eval $query;
+
+DROP TABLE t;
index de53fb598ddcf10076db9aa5b28c33324316ac6f..1dbc36d47c3b9269cc7b5c5a6c95ba46d7025af0 100644 (file)
@@ -39,7 +39,7 @@ let $wait_timeout= 0;
 let $wait_condition_reps= 0;
 while ($wait_counter)
 {
-    --error 0,ER_NO_SUCH_TABLE,ER_LOCK_WAIT_TIMEOUT,ER_UNKNOWN_COM_ERROR
+    --error 0,ER_NO_SUCH_TABLE,ER_LOCK_WAIT_TIMEOUT,ER_UNKNOWN_COM_ERROR,ER_LOCK_DEADLOCK
     let $success= `$wait_condition`;
     inc $wait_condition_reps;
     if ($success)
index 4cca116620e3002af2ca27050a0defc5cae56c63..51f7f326647dba6ff27426c77f735858fbfb6b20 100644 (file)
@@ -1,5 +1,5 @@
 # -*- cperl -*-
-# Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2008, 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
@@ -103,6 +103,40 @@ sub _kstat {
   return undef;
 }
 
+sub _sysctl {
+  my ($self)= @_;
+  my $ncpu= `sysctl hw.ncpu 2> /dev/null`;
+  if ($ncpu eq '') {
+  return undef;
+  }
+
+  my $cpuinfo= {};
+  $ncpu =~ s/\D//g;
+  my $list = `sysctl machdep.cpu | grep machdep\.cpu\.[^.]*: 2> /dev/null`;
+  my @lines= split('\n', $list);
+
+  foreach my $line (@lines) {
+    # Default value, the actual cpu values can be used to decrease this
+    # on slower cpus
+    $cpuinfo->{bogomips}= DEFAULT_BOGO_MIPS;
+
+    my ($statistic, $value)=
+    $line=~ /machdep\.cpu\.(.*):\s+(.*)/;
+    $cpuinfo->{$statistic}= $value;
+  }
+
+  for (1..$ncpu) {
+    my $temp_cpuinfo = $cpuinfo;
+    $temp_cpuinfo->{processor}= $_;
+    push(@{$self->{cpus}}, $temp_cpuinfo);
+  }
+
+  # At least one cpu should have been found
+  # if this method worked
+  if ( $self->{cpus} ) {
+    return $self;
+  }
+}
 
 sub _unamex {
   my ($self)= @_;
@@ -123,6 +157,7 @@ sub new {
     (
      \&_cpuinfo,
      \&_kstat,
+     \&_sysctl,
      \&_unamex,
    );
 
@@ -162,6 +197,9 @@ sub cpus {
 
 # Return the number of cpus found
 sub num_cpus {
+  if (IS_WINDOWS) {
+    return $ENV{NUMBER_OF_PROCESSORS} || 1;
+  }
   my ($self)= @_;
   return int(@{$self->{cpus}}) or
     confess "INTERNAL ERROR: No cpus in list";
index 879a9d85ef88f4133a687c03cd4db860247ba024..41fc1bf6642fb8a356d9101974342641b1687594 100755 (executable)
@@ -1,7 +1,7 @@
 #!/usr/bin/perl
 # -*- cperl -*-
 
-# Copyright (c) 2004, 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2004, 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
@@ -163,7 +163,7 @@ our $opt_vs_config = $ENV{'MTR_VS_CONFIG'};
 
 # If you add a new suite, please check TEST_DIRS in Makefile.am.
 #
-my $DEFAULT_SUITES= "main,sys_vars,binlog,federated,rpl,innodb,innodb_fts,innodb_zip,perfschema,funcs_1,opt_trace,parts,auth_sec";
+my $DEFAULT_SUITES= "main,sys_vars,binlog,federated,rpl,innodb,innodb_fts,innodb_zip,perfschema,funcs_1,opt_trace,parts,auth_sec,connection_control";
 my $opt_suites;
 
 our $opt_verbose= 0;  # Verbose output, enable with --verbose
@@ -401,14 +401,16 @@ sub main {
     for my $limit (2000, 1500, 1000, 500){
       $opt_parallel-- if ($sys_info->min_bogomips() < $limit);
     }
-    my $max_par= $ENV{MTR_MAX_PARALLEL} || 8;
-    $opt_parallel= $max_par if ($opt_parallel > $max_par);
-    $opt_parallel= $num_tests if ($opt_parallel > $num_tests);
-    $opt_parallel= 1 if (IS_WINDOWS and $sys_info->isvm());
+    if(defined $ENV{MTR_MAX_PARALLEL}) {
+      my $max_par= $ENV{MTR_MAX_PARALLEL};
+      $opt_parallel= $max_par if ($opt_parallel > $max_par);
+    }
     $opt_parallel= 1 if ($opt_parallel < 1);
-    mtr_report("Using parallel: $opt_parallel");
   }
+  # Limit parallel workers to number of tests to avoid idle workers
+  $opt_parallel= $num_tests if ($num_tests > 0 and $opt_parallel > $num_tests);
   $ENV{MTR_PARALLEL} = $opt_parallel;
+  mtr_report("Using parallel: $opt_parallel");
 
   if ($opt_parallel > 1 && ($opt_start_exit || $opt_stress)) {
     mtr_warning("Parallel cannot be used with --start-and-exit or --stress\n" .
@@ -1788,9 +1790,13 @@ sub set_build_thread_ports($) {
   if ( lc($opt_build_thread) eq 'auto' ) {
     my $found_free = 0;
     $build_thread = 300;       # Start attempts from here
+
+    my $build_thread_upper = $build_thread + ($opt_parallel > 39
+                             ? $opt_parallel + int($opt_parallel / 4)
+                             : 49);
     while (! $found_free)
     {
-      $build_thread= mtr_get_unique_id($build_thread, 349);
+      $build_thread= mtr_get_unique_id($build_thread, $build_thread_upper);
       if ( !defined $build_thread ) {
         mtr_error("Could not get a unique build thread id");
       }
@@ -1850,6 +1856,7 @@ sub collect_mysqld_features {
   mtr_init_args(\$args);
   mtr_add_arg($args, "--no-defaults");
   mtr_add_arg($args, "--datadir=%s", mixed_path($tmpdir));
+  mtr_add_arg($args, "--secure-file-priv=\"\"");
   mtr_add_arg($args, "--lc-messages-dir=%s", $path_language);
   mtr_add_arg($args, "--skip-grant-tables");
   mtr_add_arg($args, "--verbose");
@@ -3594,6 +3601,7 @@ sub mysql_install_db {
   mtr_add_arg($args, "--loose-skip-falcon");
   mtr_add_arg($args, "--loose-skip-ndbcluster");
   mtr_add_arg($args, "--tmpdir=%s", "$opt_vardir/tmp/");
+  mtr_add_arg($args, "--secure-file-priv=%s", "$opt_vardir");
   mtr_add_arg($args, "--innodb-log-file-size=5M");
   mtr_add_arg($args, "--core-file");
   # over writing innodb_autoextend_increment to 8 for reducing the ibdata1 file size 
@@ -5938,6 +5946,7 @@ sub start_mysqltest ($) {
     $exe=  "strace";
     mtr_add_arg($args, "-o");
     mtr_add_arg($args, "%s/log/mysqltest.strace", $opt_vardir);
+    mtr_add_arg($args, "-f");
     mtr_add_arg($args, "$exe_mysqltest");
   }
 
@@ -6336,6 +6345,7 @@ sub strace_server_arguments {
 
   mtr_add_arg($args, "-o");
   mtr_add_arg($args, "%s/log/%s.strace", $opt_vardir, $type);
+  mtr_add_arg($args, "-f");
   mtr_add_arg($args, $$exe);
   $$exe= "strace";
 }
index c16757684d186502a96c5b21cedc152d19707f1d..96cb248677ce74246dbc406c77ef4da575f8bce4 100644 (file)
@@ -2578,3 +2578,56 @@ t1       CREATE TABLE `t1` (
   PRIMARY KEY (`fld1`)
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8
 DROP TABLE t1;
+#
+# Bug#19635706
+# Verify that it is possible to add a unique key to a not-NULL POINT 
+# column and that this key is promoted to primary key
+# 
+CREATE TABLE t1(a INT NOT NULL, b POINT NOT NULL) ENGINE=INNODB;
+SHOW CREATE TABLE t1;
+Table  Create Table
+t1     CREATE TABLE `t1` (
+  `a` int(11) NOT NULL,
+  `b` point NOT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ALTER TABLE t1 ADD UNIQUE INDEX (b);
+# Note that SHOW CREATE TABLE does not list b as a primary key, 
+# even though it was promoted. This appears to be the case also 
+# for other column types.
+SHOW CREATE TABLE t1;
+Table  Create Table
+t1     CREATE TABLE `t1` (
+  `a` int(11) NOT NULL,
+  `b` point NOT NULL,
+  UNIQUE KEY `b` (`b`(25))
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ALTER TABLE t1 ADD UNIQUE INDEX (a);
+SHOW CREATE TABLE t1;
+Table  Create Table
+t1     CREATE TABLE `t1` (
+  `a` int(11) NOT NULL,
+  `b` point NOT NULL,
+  UNIQUE KEY `b` (`b`(25)),
+  UNIQUE KEY `a` (`a`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+# Verify that the expected indices have been created by Innodb
+SELECT T.NAME AS TABLE_NAME, I.NAME AS INDEX_NAME, 
+CASE I.TYPE 
+WHEN 0 THEN 'Secondary' 
+WHEN 1 THEN 'Clustered' 
+WHEN 2 THEN 'Unique' 
+WHEN 3 THEN 'Primary' 
+WHEN 32 THEN 'Full text' 
+WHEN 64 THEN 'Spatial' 
+ELSE 'Unknown' 
+END AS INDEX_TYPE, 
+F.NAME AS FIELD_NAME, F.POS AS FIELD_POS FROM 
+INFORMATION_SCHEMA.INNODB_SYS_TABLES AS T JOIN 
+INFORMATION_SCHEMA.INNODB_SYS_INDEXES AS I JOIN 
+INFORMATION_SCHEMA.INNODB_SYS_FIELDS AS F 
+ON I.INDEX_ID = F.INDEX_ID AND I.TABLE_ID = T.TABLE_ID 
+WHERE T.NAME = 'test/t1';
+TABLE_NAME     INDEX_NAME      INDEX_TYPE      FIELD_NAME      FIELD_POS
+test/t1        b       Primary b       0
+test/t1        a       Unique  a       0
+DROP TABLE t1;
index de19254071560b640cc45393878941d22f52ba5e..102cfee05df612f894d3c69c833cbeb8efd776dc 100644 (file)
@@ -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'
index 000e8eea67bf68ef724f7105d2ce290247c487d0..236ca2bafd5556f888fdd4554ca8fb062a823de4 100644 (file)
@@ -4514,5 +4514,15 @@ id       insert(0x3a, 1, 0, d)
 2      public data:
 DROP TABLE t1;
 #
+# Bug#22888420 CONCAT_WS: ASSERTION FAILED: !S.USES_BUFFER_OWNED_BY(THIS)
+#
+do concat('a',concat_ws('a', 0x2859, 'a' ,
+trim(period_add('a',1) from (1&''))
+)
+);
+Warnings:
+Warning        1292    Truncated incorrect INTEGER value: ''
+Warning        1292    Truncated incorrect INTEGER value: 'a'
+#
 # End of 5.6 tests
 #
index 0763b89c498bbda9b3f4ec2193bdf9cfd21229c0..59121a5b1559bc6131094c73e935b25e0fdee2bb 100644 (file)
@@ -750,3 +750,18 @@ ERROR 23000: Cannot add or update a child row: a foreign key constraint fails (`
 UPDATE t1, t2 SET t1.fld1= t1.fld1 + 3;
 ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`fld2`) REFERENCES `t1` (`fld1`))
 DROP TABLE t2, t1;
+#
+# BUG#22037930: INSERT IGNORE FAILS TO IGNORE FOREIGN
+#               KEY CONSTRAINT
+CREATE TABLE t1 (fld1 INT PRIMARY KEY) ENGINE= INNODB;
+CREATE TABLE t2 (fld1 VARCHAR(10), fld2 INT NOT NULL,
+CONSTRAINT fk FOREIGN KEY (fld2) REFERENCES t1(fld1)) ENGINE= INNODB;
+# Without patch, reports incorrect error.
+INSERT INTO t2 VALUES('abc', 2) ON DUPLICATE KEY UPDATE fld1= 'def';
+ERROR 23000: Cannot add or update a child row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `fk` FOREIGN KEY (`fld2`) REFERENCES `t1` (`fld1`))
+REPLACE INTO t2 VALUES('abc', 2);
+ERROR 23000: Cannot add or update a child row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `fk` FOREIGN KEY (`fld2`) REFERENCES `t1` (`fld1`))
+INSERT IGNORE INTO t2 VALUES('abc', 2) ON DUPLICATE KEY UPDATE fld1= 'def';
+Warnings:
+Warning        1452    `test`.`t2`, CONSTRAINT `fk` FOREIGN KEY (`fld2`) REFERENCES `t1` (`fld1`)
+DROP TABLE t2, t1;
diff --git a/mysql-wsrep-5.6/mysql-test/r/mysql_client_test_qcache.result b/mysql-wsrep-5.6/mysql-test/r/mysql_client_test_qcache.result
new file mode 100644 (file)
index 0000000..3ff2f07
--- /dev/null
@@ -0,0 +1,14 @@
+# Bug#22559575 "the statement (1) has no open cursor" pops sometimes with
+# prepared+query_cache
+#
+# Create relevent tables and call C API test cases
+# Setup
+select VARIABLE_VALUE into @qcache_hit_val1 from
+information_schema.GLOBAL_STATUS  where VARIABLE_NAME = 'Qcache_hits';
+
+#Run C_API test case
+select VARIABLE_VALUE into @qcache_hit_val2 from
+information_schema.GLOBAL_STATUS  where VARIABLE_NAME = 'Qcache_hits';
+SELECT @qcache_hit_val2 - @qcache_hit_val1;
+@qcache_hit_val2 - @qcache_hit_val1
+1
index f1acfc7370908120bc669c170a08f3d3050fcb27..9ddc45723b24bedbee73497cf3671dfb619197e8 100644 (file)
@@ -267,3 +267,9 @@ mysqld is alive
 # normally.
 mysqld is alive
 #### End of test ####
+#
+# Bug #24557925: MYSQL_CONFIG_EDITOR CAN MAKE SERVER UNBOOTABLE
+#
+# Restarting the server. Should work
+# Cleanup
+# End of 5.6 tests
index e971d8bca3c25462bbfbf12ceee4ad6e9dfa115c..a99ebd9fb34ab405881feda6508d175a99a80df1 100644 (file)
@@ -105,7 +105,7 @@ ERROR: Missing --plugin_dir option.
 # Show the help.
 #
 mysql_plugin  Ver V.V.VV Distrib XX.XX.XX
-Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
+Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
 
 Enable or disable plugins.
 
index c8630998b125b8c4dd2f182a7328dabaee3738d4..a84bbcc11c15d976c6967871a92e5f2c811d315b 100644 (file)
@@ -731,9 +731,8 @@ RESET MASTER;
 FLUSH LOGS;
 SELECT
 (@a:=LOAD_FILE("MYSQLTEST_VARDIR/tmp/mysqlbinlog_bug37313.binlog"))
-IS NOT NULL;
-(@a:=LOAD_FILE("MYSQLTEST_VARDIR/tmp/mysqlbinlog_bug37313.binlog"))
-IS NOT NULL
+IS NOT NULL AS Loaded;
+Loaded
 1
 *** Unsigned server_id 4294967295 is found: 1 ***
 SET @@global.server_id= 1;
index ab5251c6f97f49470becc7a3f855f22c4713aca9..09b4c5f934a1288336f46160dece66166db1f21d 100644 (file)
@@ -1359,7 +1359,6 @@ report-user (No default value)
 rpl-stop-slave-timeout 31536000
 safe-user-create FALSE
 secure-auth TRUE
-secure-file-priv (No default value)
 server-id 0
 server-id-bits 32
 show-old-temporals FALSE
@@ -1429,8 +1428,8 @@ 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-max-ws-rows 0
+wsrep-max-ws-size 2147483647
 wsrep-mysql-replication-bundle 0
 wsrep-node-address 
 wsrep-node-incoming-address AUTO
index f51feb5396af650114f0fc36c1032dbccd267f38..cc59074b4a23f74b7313d78cdbb4c63c12811db0 100644 (file)
@@ -1276,7 +1276,6 @@ report-user (No default value)
 rpl-stop-slave-timeout 31536000
 safe-user-create FALSE
 secure-auth TRUE
-secure-file-priv (No default value)
 server-id 0
 server-id-bits 32
 shared-memory FALSE
index 26a4524ceaff5f1d73d244ad7a08cc111caf511f..8ffb219f03f3b697648fcb4ea735771d9160612f 100644 (file)
@@ -43,6 +43,8 @@ DROP TABLE t1, t2;
 # test.t1 have partitions in mysqltest2-directory!
 # user root:
 CREATE USER mysqltest_1@localhost;
+# Need FILE permission to use external datadir or indexdir.
+GRANT FILE ON *.* TO mysqltest_1@localhost;
 CREATE DATABASE mysqltest2;
 USE mysqltest2;
 CREATE TABLE t1 (a INT) ENGINE = MyISAM;
index a4b2c4acd778afaa5f863beac444db5153f83b29..6d074eb21af576426e74979ba5eddd35a713916a 100644 (file)
@@ -2494,4 +2494,60 @@ KEY(a(1))
 SELECT 1 FROM t1 WHERE a <> 'a' OR a <> "";
 1
 DROP TABLE t1;
+#
+# Bug #23259872: OPTIMIZER CHOOSES TO USE NON PRIMARY
+#                INDEX, EVEN THOUGH COST IS HIGHER
+#
+CREATE TABLE `giant_table` (
+`id` int(11) NOT NULL AUTO_INCREMENT,
+`one_id` int(11) NOT NULL,
+`other_id` bigint(20) NOT NULL DEFAULT '0',
+`some_other_id` int(11) DEFAULT 0 NOT NULL,
+`something` double NOT NULL DEFAULT '0',
+`comment` text COLLATE utf8_unicode_ci,
+`flags` int(11) NOT NULL DEFAULT '0',
+`time_created` int(11) NOT NULL DEFAULT '0',
+PRIMARY KEY (`id`),
+KEY `time_created` (`time_created`),
+KEY `some_other_id` (`some_other_id`),
+KEY `one_other_idx` (`one_id`,`other_id`),
+KEY `other_id` (`other_id`,`time_created`)
+) ENGINE=InnoDB AUTO_INCREMENT=101651329
+DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ;
+CREATE TABLE t1 (c1 INT);
+INSERT INTO t1 VALUES (66136540), (68983250), (89627210), (77869520),
+(82543190), (67538270), (77282760), (77908170),
+(70923370), (68066360);
+CREATE PROCEDURE p()
+BEGIN
+SET @x = 1;
+REPEAT
+INSERT INTO giant_table(id,one_id)
+SELECT c1 + @x, 0
+FROM t1
+WHERE c1 IN (66136540, 68985250, 89627210, 77869520 , 82543190, 67538270,
+77282760, 77908170, 70923370, 68066360);
+SET @x =  @x + 1;
+UNTIL @x > 30 END REPEAT;
+END $
+CALL p();
+SELECT count(*) FROM giant_table;
+count(*)
+270
+INSERT INTO giant_table (id,one_id) VALUES (66136539, 0), (68983258,1),
+(89628210,1), (77869520,2);
+INSERT INTO giant_table (id,one_id, some_other_id) VALUES(84673401, 0, 1),
+(61069031, 1, 1);
+EXPLAIN SELECT id, something, comment, time_created, one_id, other_id,
+some_other_id, flags
+FROM giant_table
+WHERE id IN (66136539, 68983258, 89628210, 77869520, 82543198, 67538272,
+84673401, 61069031, 68214385, 77282865, 76991297, 64569216,
+89481638, 74534074, 70396537, 80076375, 63308530, 77908270,
+70923271, 68066180)
+AND (giant_table.flags & 0x01) = 0 AND giant_table.some_other_id = 0;
+id     select_type     table   type    possible_keys   key     key_len ref     rows    Extra
+1      SIMPLE  giant_table     range   PRIMARY,some_other_id   some_other_id   8       NULL    20      Using index condition; Using where; Using MRR
+DROP PROCEDURE p;
+DROP TABLE giant_table, t1;
 set optimizer_switch=default;
index 361fcb0d6f15be10c4bbed06f4d007a801f0eaa7..c8e857cbed3828f352b8a76bc0d4a07304684608 100644 (file)
@@ -2494,4 +2494,60 @@ KEY(a(1))
 SELECT 1 FROM t1 WHERE a <> 'a' OR a <> "";
 1
 DROP TABLE t1;
+#
+# Bug #23259872: OPTIMIZER CHOOSES TO USE NON PRIMARY
+#                INDEX, EVEN THOUGH COST IS HIGHER
+#
+CREATE TABLE `giant_table` (
+`id` int(11) NOT NULL AUTO_INCREMENT,
+`one_id` int(11) NOT NULL,
+`other_id` bigint(20) NOT NULL DEFAULT '0',
+`some_other_id` int(11) DEFAULT 0 NOT NULL,
+`something` double NOT NULL DEFAULT '0',
+`comment` text COLLATE utf8_unicode_ci,
+`flags` int(11) NOT NULL DEFAULT '0',
+`time_created` int(11) NOT NULL DEFAULT '0',
+PRIMARY KEY (`id`),
+KEY `time_created` (`time_created`),
+KEY `some_other_id` (`some_other_id`),
+KEY `one_other_idx` (`one_id`,`other_id`),
+KEY `other_id` (`other_id`,`time_created`)
+) ENGINE=InnoDB AUTO_INCREMENT=101651329
+DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ;
+CREATE TABLE t1 (c1 INT);
+INSERT INTO t1 VALUES (66136540), (68983250), (89627210), (77869520),
+(82543190), (67538270), (77282760), (77908170),
+(70923370), (68066360);
+CREATE PROCEDURE p()
+BEGIN
+SET @x = 1;
+REPEAT
+INSERT INTO giant_table(id,one_id)
+SELECT c1 + @x, 0
+FROM t1
+WHERE c1 IN (66136540, 68985250, 89627210, 77869520 , 82543190, 67538270,
+77282760, 77908170, 70923370, 68066360);
+SET @x =  @x + 1;
+UNTIL @x > 30 END REPEAT;
+END $
+CALL p();
+SELECT count(*) FROM giant_table;
+count(*)
+270
+INSERT INTO giant_table (id,one_id) VALUES (66136539, 0), (68983258,1),
+(89628210,1), (77869520,2);
+INSERT INTO giant_table (id,one_id, some_other_id) VALUES(84673401, 0, 1),
+(61069031, 1, 1);
+EXPLAIN SELECT id, something, comment, time_created, one_id, other_id,
+some_other_id, flags
+FROM giant_table
+WHERE id IN (66136539, 68983258, 89628210, 77869520, 82543198, 67538272,
+84673401, 61069031, 68214385, 77282865, 76991297, 64569216,
+89481638, 74534074, 70396537, 80076375, 63308530, 77908270,
+70923271, 68066180)
+AND (giant_table.flags & 0x01) = 0 AND giant_table.some_other_id = 0;
+id     select_type     table   type    possible_keys   key     key_len ref     rows    Extra
+1      SIMPLE  giant_table     range   PRIMARY,some_other_id   some_other_id   8       NULL    20      Using index condition; Using where
+DROP PROCEDURE p;
+DROP TABLE giant_table, t1;
 set optimizer_switch=default;
index 1550bcf0ac7d41008e9a1288d308e9603905fb9d..fd0d00c719f3aa9288c4e7020dd339bb129beb6c 100644 (file)
@@ -2494,4 +2494,60 @@ KEY(a(1))
 SELECT 1 FROM t1 WHERE a <> 'a' OR a <> "";
 1
 DROP TABLE t1;
+#
+# Bug #23259872: OPTIMIZER CHOOSES TO USE NON PRIMARY
+#                INDEX, EVEN THOUGH COST IS HIGHER
+#
+CREATE TABLE `giant_table` (
+`id` int(11) NOT NULL AUTO_INCREMENT,
+`one_id` int(11) NOT NULL,
+`other_id` bigint(20) NOT NULL DEFAULT '0',
+`some_other_id` int(11) DEFAULT 0 NOT NULL,
+`something` double NOT NULL DEFAULT '0',
+`comment` text COLLATE utf8_unicode_ci,
+`flags` int(11) NOT NULL DEFAULT '0',
+`time_created` int(11) NOT NULL DEFAULT '0',
+PRIMARY KEY (`id`),
+KEY `time_created` (`time_created`),
+KEY `some_other_id` (`some_other_id`),
+KEY `one_other_idx` (`one_id`,`other_id`),
+KEY `other_id` (`other_id`,`time_created`)
+) ENGINE=InnoDB AUTO_INCREMENT=101651329
+DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ;
+CREATE TABLE t1 (c1 INT);
+INSERT INTO t1 VALUES (66136540), (68983250), (89627210), (77869520),
+(82543190), (67538270), (77282760), (77908170),
+(70923370), (68066360);
+CREATE PROCEDURE p()
+BEGIN
+SET @x = 1;
+REPEAT
+INSERT INTO giant_table(id,one_id)
+SELECT c1 + @x, 0
+FROM t1
+WHERE c1 IN (66136540, 68985250, 89627210, 77869520 , 82543190, 67538270,
+77282760, 77908170, 70923370, 68066360);
+SET @x =  @x + 1;
+UNTIL @x > 30 END REPEAT;
+END $
+CALL p();
+SELECT count(*) FROM giant_table;
+count(*)
+270
+INSERT INTO giant_table (id,one_id) VALUES (66136539, 0), (68983258,1),
+(89628210,1), (77869520,2);
+INSERT INTO giant_table (id,one_id, some_other_id) VALUES(84673401, 0, 1),
+(61069031, 1, 1);
+EXPLAIN SELECT id, something, comment, time_created, one_id, other_id,
+some_other_id, flags
+FROM giant_table
+WHERE id IN (66136539, 68983258, 89628210, 77869520, 82543198, 67538272,
+84673401, 61069031, 68214385, 77282865, 76991297, 64569216,
+89481638, 74534074, 70396537, 80076375, 63308530, 77908270,
+70923271, 68066180)
+AND (giant_table.flags & 0x01) = 0 AND giant_table.some_other_id = 0;
+id     select_type     table   type    possible_keys   key     key_len ref     rows    Extra
+1      SIMPLE  giant_table     range   PRIMARY,some_other_id   some_other_id   8       NULL    20      Using index condition; Using where; Using MRR
+DROP PROCEDURE p;
+DROP TABLE giant_table, t1;
 set optimizer_switch=default;
index 6c612d0884c731e2e55f9121fff6560e00e1b293..1b97592744c5347b1c6c971c8ca155746c5da98c 100644 (file)
@@ -2494,4 +2494,60 @@ KEY(a(1))
 SELECT 1 FROM t1 WHERE a <> 'a' OR a <> "";
 1
 DROP TABLE t1;
+#
+# Bug #23259872: OPTIMIZER CHOOSES TO USE NON PRIMARY
+#                INDEX, EVEN THOUGH COST IS HIGHER
+#
+CREATE TABLE `giant_table` (
+`id` int(11) NOT NULL AUTO_INCREMENT,
+`one_id` int(11) NOT NULL,
+`other_id` bigint(20) NOT NULL DEFAULT '0',
+`some_other_id` int(11) DEFAULT 0 NOT NULL,
+`something` double NOT NULL DEFAULT '0',
+`comment` text COLLATE utf8_unicode_ci,
+`flags` int(11) NOT NULL DEFAULT '0',
+`time_created` int(11) NOT NULL DEFAULT '0',
+PRIMARY KEY (`id`),
+KEY `time_created` (`time_created`),
+KEY `some_other_id` (`some_other_id`),
+KEY `one_other_idx` (`one_id`,`other_id`),
+KEY `other_id` (`other_id`,`time_created`)
+) ENGINE=InnoDB AUTO_INCREMENT=101651329
+DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ;
+CREATE TABLE t1 (c1 INT);
+INSERT INTO t1 VALUES (66136540), (68983250), (89627210), (77869520),
+(82543190), (67538270), (77282760), (77908170),
+(70923370), (68066360);
+CREATE PROCEDURE p()
+BEGIN
+SET @x = 1;
+REPEAT
+INSERT INTO giant_table(id,one_id)
+SELECT c1 + @x, 0
+FROM t1
+WHERE c1 IN (66136540, 68985250, 89627210, 77869520 , 82543190, 67538270,
+77282760, 77908170, 70923370, 68066360);
+SET @x =  @x + 1;
+UNTIL @x > 30 END REPEAT;
+END $
+CALL p();
+SELECT count(*) FROM giant_table;
+count(*)
+270
+INSERT INTO giant_table (id,one_id) VALUES (66136539, 0), (68983258,1),
+(89628210,1), (77869520,2);
+INSERT INTO giant_table (id,one_id, some_other_id) VALUES(84673401, 0, 1),
+(61069031, 1, 1);
+EXPLAIN SELECT id, something, comment, time_created, one_id, other_id,
+some_other_id, flags
+FROM giant_table
+WHERE id IN (66136539, 68983258, 89628210, 77869520, 82543198, 67538272,
+84673401, 61069031, 68214385, 77282865, 76991297, 64569216,
+89481638, 74534074, 70396537, 80076375, 63308530, 77908270,
+70923271, 68066180)
+AND (giant_table.flags & 0x01) = 0 AND giant_table.some_other_id = 0;
+id     select_type     table   type    possible_keys   key     key_len ref     rows    Extra
+1      SIMPLE  giant_table     range   PRIMARY,some_other_id   some_other_id   8       NULL    20      Using where; Using MRR
+DROP PROCEDURE p;
+DROP TABLE giant_table, t1;
 set optimizer_switch=default;
index decf2550f9ac7a056dc5662495fc2e372a6fa56e..901968354a4a6eadf0506555d0222fb4143f8337 100644 (file)
@@ -2494,4 +2494,60 @@ KEY(a(1))
 SELECT 1 FROM t1 WHERE a <> 'a' OR a <> "";
 1
 DROP TABLE t1;
+#
+# Bug #23259872: OPTIMIZER CHOOSES TO USE NON PRIMARY
+#                INDEX, EVEN THOUGH COST IS HIGHER
+#
+CREATE TABLE `giant_table` (
+`id` int(11) NOT NULL AUTO_INCREMENT,
+`one_id` int(11) NOT NULL,
+`other_id` bigint(20) NOT NULL DEFAULT '0',
+`some_other_id` int(11) DEFAULT 0 NOT NULL,
+`something` double NOT NULL DEFAULT '0',
+`comment` text COLLATE utf8_unicode_ci,
+`flags` int(11) NOT NULL DEFAULT '0',
+`time_created` int(11) NOT NULL DEFAULT '0',
+PRIMARY KEY (`id`),
+KEY `time_created` (`time_created`),
+KEY `some_other_id` (`some_other_id`),
+KEY `one_other_idx` (`one_id`,`other_id`),
+KEY `other_id` (`other_id`,`time_created`)
+) ENGINE=InnoDB AUTO_INCREMENT=101651329
+DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ;
+CREATE TABLE t1 (c1 INT);
+INSERT INTO t1 VALUES (66136540), (68983250), (89627210), (77869520),
+(82543190), (67538270), (77282760), (77908170),
+(70923370), (68066360);
+CREATE PROCEDURE p()
+BEGIN
+SET @x = 1;
+REPEAT
+INSERT INTO giant_table(id,one_id)
+SELECT c1 + @x, 0
+FROM t1
+WHERE c1 IN (66136540, 68985250, 89627210, 77869520 , 82543190, 67538270,
+77282760, 77908170, 70923370, 68066360);
+SET @x =  @x + 1;
+UNTIL @x > 30 END REPEAT;
+END $
+CALL p();
+SELECT count(*) FROM giant_table;
+count(*)
+270
+INSERT INTO giant_table (id,one_id) VALUES (66136539, 0), (68983258,1),
+(89628210,1), (77869520,2);
+INSERT INTO giant_table (id,one_id, some_other_id) VALUES(84673401, 0, 1),
+(61069031, 1, 1);
+EXPLAIN SELECT id, something, comment, time_created, one_id, other_id,
+some_other_id, flags
+FROM giant_table
+WHERE id IN (66136539, 68983258, 89628210, 77869520, 82543198, 67538272,
+84673401, 61069031, 68214385, 77282865, 76991297, 64569216,
+89481638, 74534074, 70396537, 80076375, 63308530, 77908270,
+70923271, 68066180)
+AND (giant_table.flags & 0x01) = 0 AND giant_table.some_other_id = 0;
+id     select_type     table   type    possible_keys   key     key_len ref     rows    Extra
+1      SIMPLE  giant_table     range   PRIMARY,some_other_id   some_other_id   8       NULL    20      Using where
+DROP PROCEDURE p;
+DROP TABLE giant_table, t1;
 set optimizer_switch=default;
index ef718a40b2debd972e7b95f0e1ea6176d6b82684..7989cb29c23a06acc13293e4e1945debe793ca2e 100644 (file)
@@ -2493,4 +2493,60 @@ KEY(a(1))
 SELECT 1 FROM t1 WHERE a <> 'a' OR a <> "";
 1
 DROP TABLE t1;
+#
+# Bug #23259872: OPTIMIZER CHOOSES TO USE NON PRIMARY
+#                INDEX, EVEN THOUGH COST IS HIGHER
+#
+CREATE TABLE `giant_table` (
+`id` int(11) NOT NULL AUTO_INCREMENT,
+`one_id` int(11) NOT NULL,
+`other_id` bigint(20) NOT NULL DEFAULT '0',
+`some_other_id` int(11) DEFAULT 0 NOT NULL,
+`something` double NOT NULL DEFAULT '0',
+`comment` text COLLATE utf8_unicode_ci,
+`flags` int(11) NOT NULL DEFAULT '0',
+`time_created` int(11) NOT NULL DEFAULT '0',
+PRIMARY KEY (`id`),
+KEY `time_created` (`time_created`),
+KEY `some_other_id` (`some_other_id`),
+KEY `one_other_idx` (`one_id`,`other_id`),
+KEY `other_id` (`other_id`,`time_created`)
+) ENGINE=InnoDB AUTO_INCREMENT=101651329
+DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ;
+CREATE TABLE t1 (c1 INT);
+INSERT INTO t1 VALUES (66136540), (68983250), (89627210), (77869520),
+(82543190), (67538270), (77282760), (77908170),
+(70923370), (68066360);
+CREATE PROCEDURE p()
+BEGIN
+SET @x = 1;
+REPEAT
+INSERT INTO giant_table(id,one_id)
+SELECT c1 + @x, 0
+FROM t1
+WHERE c1 IN (66136540, 68985250, 89627210, 77869520 , 82543190, 67538270,
+77282760, 77908170, 70923370, 68066360);
+SET @x =  @x + 1;
+UNTIL @x > 30 END REPEAT;
+END $
+CALL p();
+SELECT count(*) FROM giant_table;
+count(*)
+270
+INSERT INTO giant_table (id,one_id) VALUES (66136539, 0), (68983258,1),
+(89628210,1), (77869520,2);
+INSERT INTO giant_table (id,one_id, some_other_id) VALUES(84673401, 0, 1),
+(61069031, 1, 1);
+EXPLAIN SELECT id, something, comment, time_created, one_id, other_id,
+some_other_id, flags
+FROM giant_table
+WHERE id IN (66136539, 68983258, 89628210, 77869520, 82543198, 67538272,
+84673401, 61069031, 68214385, 77282865, 76991297, 64569216,
+89481638, 74534074, 70396537, 80076375, 63308530, 77908270,
+70923271, 68066180)
+AND (giant_table.flags & 0x01) = 0 AND giant_table.some_other_id = 0;
+id     select_type     table   type    possible_keys   key     key_len ref     rows    Extra
+1      SIMPLE  giant_table     range   PRIMARY,some_other_id   some_other_id   8       NULL    20      Using where
+DROP PROCEDURE p;
+DROP TABLE giant_table, t1;
 set optimizer_switch=default;
index 9e82a96626849d8c5265e02e3dc9e71b1f45b787..c2d12c3b1bd83df8665e216d9226d4928a45c740 100644 (file)
@@ -320,3 +320,34 @@ c2
 DROP TRIGGER t1_ai;
 DROP TABLE t1, t2;
 End of 5.0 tests
+#
+# Bug#21142859: FUNCTION UPDATING A VIEW FAILS TO FIND TABLE THAT ACTUALLY EXISTS
+#
+CREATE TABLE t1 SELECT 1 AS fld1, 'A' AS fld2;
+CREATE TABLE t2 (fld3 INT, fld4 CHAR(1));
+CREATE VIEW v1 AS SELECT * FROM t1;
+CREATE TRIGGER t1_au AFTER UPDATE ON t1
+FOR EACH ROW INSERT INTO t2 VALUES (new.fld1, new.fld2);
+CREATE FUNCTION f1() RETURNS INT
+BEGIN
+UPDATE v1 SET fld2='B' WHERE fld1=1;
+RETURN row_count();
+END !
+# Without the patch, an error was getting reported.
+SELECT f1();
+f1()
+1
+DROP FUNCTION f1;
+DROP VIEW v1;
+DROP TABLE t1,t2;
+#
+# Bug #16672723 "CAN'T FIND TEMPORARY TABLE".
+#
+CREATE FUNCTION f1() RETURNS INT RETURN 1;
+CREATE TEMPORARY TABLE tmp1(a INT);
+PREPARE stmt1 FROM "CREATE TEMPORARY TABLE tmp2 AS SELECT b FROM (SELECT f1() AS b FROM tmp1) AS t";
+# The below statement failed before the fix.
+EXECUTE stmt1;
+DROP TEMPORARY TABLES tmp1, tmp2;
+DEALLOCATE PREPARE stmt1;
+DROP FUNCTION f1;
diff --git a/mysql-wsrep-5.6/mysql-test/r/ssl_ca.result b/mysql-wsrep-5.6/mysql-test/r/ssl_ca.result
new file mode 100644 (file)
index 0000000..ffc5671
--- /dev/null
@@ -0,0 +1,24 @@
+#
+# Bug#21920657: SSL-CA FAILS SILENTLY IF THE PATH CANNOT BE FOUND
+#
+# try to connect with wrong '--ssl-ca' path : should fail
+ERROR 2026 (HY000): SSL connection error: SSL_CTX_set_default_verify_paths failed
+# try to connect with correct '--ssl-ca' path : should connect
+Variable_name  Value
+Ssl_cipher     DHE-RSA-AES256-SHA
+#
+# Bug#21920678: SSL-CA DOES NOT ACCEPT ~USER TILDE HOME DIRECTORY
+#               PATH SUBSTITUTION
+#
+# try to connect with '--ssl-ca' option using tilde home directoy
+# path substitution : should connect
+Variable_name  Value
+Ssl_cipher     DHE-RSA-AES256-SHA
+# try to connect with '--ssl-key' option using tilde home directoy
+# path substitution : should connect
+Variable_name  Value
+Ssl_cipher     DHE-RSA-AES256-SHA
+# try to connect with '--ssl-cert' option using tilde home directoy
+# path substitution : should connect
+Variable_name  Value
+Ssl_cipher     DHE-RSA-AES256-SHA
index 570dd9cab0687d07b5de7fbdbde9ecff12362cb2..c9b479698f3e6174c47715402c436bd760d64d46 100644 (file)
@@ -21,3 +21,15 @@ ssl_crl      MYSQL_TEST_DIR/std_data/crl-client-revoked.crl
 ssl_crlpath    
 ssl_key        MYSQL_TEST_DIR/std_data/crl-server-key.pem
 # try logging in with a certificate in the server's --ssl-crl : should fail
+#
+# Bug#21920678: SSL-CA DOES NOT ACCEPT ~USER TILDE HOME DIRECTORY
+#               PATH SUBSTITUTION
+#
+# try to connect with '--ssl-crl' option using tilde home directoy
+# path substitution : should connect
+Variable_name  Value
+Ssl_cipher     DHE-RSA-AES256-SHA
+# try to connect with '--ssl-crlpath' option using tilde home directoy
+# path substitution : should connect
+Variable_name  Value
+Ssl_cipher     DHE-RSA-AES256-SHA
index b0408bf0f5c41fcf213ffbdc348e1b6f050fd510..15a1b675f3b13b373a65c66d47bb236a6ecc3e70 100644 (file)
@@ -10683,4 +10683,101 @@ DROP TABLE t1,t2;
 # End of test for Bug#21184091
 set @@optimizer_switch=@old_opt_switch;
 # End of 5.6 tests
+# Bug#21139722: Assertion failed: !(used_tables() & ((table_map) 1) ...
+CREATE TABLE t1(a INTEGER) engine=innodb;
+CREATE TABLE t2(b INTEGER) engine=innodb;
+explain SELECT 1
+FROM (SELECT 1 IN (SELECT 1
+FROM t1
+WHERE (SELECT 1 FROM t2 HAVING b) NOT IN (SELECT 1 FROM t2)
+)
+FROM t2
+) AS z;
+id     select_type     table   type    possible_keys   key     key_len ref     rows    Extra
+1      PRIMARY <derived2>      ALL     NULL    NULL    NULL    NULL    2       NULL
+2      DERIVED t2      ALL     NULL    NULL    NULL    NULL    1       NULL
+3      DEPENDENT SUBQUERY      t1      ALL     NULL    NULL    NULL    NULL    1       Using where
+5      DEPENDENT SUBQUERY      t2      ALL     NULL    NULL    NULL    NULL    1       Using where
+4      DEPENDENT SUBQUERY      t2      ALL     NULL    NULL    NULL    NULL    1       NULL
+SELECT 1
+FROM (SELECT 1 IN (SELECT 1
+FROM t1
+WHERE (SELECT 1 FROM t2 HAVING b) NOT IN (SELECT 1 FROM t2)
+)
+FROM t2
+) AS z;
+1
+DROP TABLE t1, t2;
+CREATE TABLE t1(a INTEGER) engine=innodb;
+explain SELECT (SELECT a
+FROM t1 AS t2
+WHERE a IN (SELECT t1.a+t2.a
+FROM t1 AS t3))
+FROM t1 AS t1;
+id     select_type     table   type    possible_keys   key     key_len ref     rows    Extra
+1      PRIMARY t1      ALL     NULL    NULL    NULL    NULL    1       NULL
+2      DEPENDENT SUBQUERY      t2      ALL     NULL    NULL    NULL    NULL    1       Using where
+2      DEPENDENT SUBQUERY      t3      ALL     NULL    NULL    NULL    NULL    1       FirstMatch(t2); Using join buffer (Block Nested Loop)
+SELECT (SELECT a
+FROM t1 AS t2
+WHERE a IN (SELECT t1.a+t2.a
+FROM t1 AS t3))
+FROM t1 AS t1;
+(SELECT a
+FROM t1 AS t2
+WHERE a IN (SELECT t1.a+t2.a
+FROM t1 AS t3))
+DROP TABLE t1;
+# End of test for Bug#21139722
+#
+# Bug#21139402 ASSERTION FAILED: LENGTH > 0 && KEYPARTS != 0, CRASH IN JOIN::OPTIMIZE_KEYUSE
+#
+CREATE TABLE t1 (a INT, b INT, PRIMARY KEY(a));
+CREATE TABLE t2 (c INT PRIMARY KEY);
+EXPLAIN SELECT 1
+FROM t1
+WHERE 1 IN (SELECT (c IS NULL) IN (SELECT a
+FROM t1
+WHERE b)
+FROM t2);
+id     select_type     table   type    possible_keys   key     key_len ref     rows    Extra
+1      PRIMARY NULL    NULL    NULL    NULL    NULL    NULL    NULL    Impossible WHERE noticed after reading const tables
+3      DEPENDENT SUBQUERY      NULL    NULL    NULL    NULL    NULL    NULL    NULL    Impossible WHERE noticed after reading const tables
+SELECT 1
+FROM t1
+WHERE 1 IN (SELECT (c IS NULL) IN (SELECT a
+FROM t1
+WHERE b)
+FROM t2);
+1
+DROP TABLE t1,t2;
+#
+# Bug #22305361: QUERY WITH MATERIALIZED TABLE RETURNS INCORRECT
+#                RESULTS IN 5.6
+#
+CREATE TABLE t(a INT,b INT);
+INSERT INTO t VALUES (1,0),(1,0),(1,0),(1,0),(1,1);
+EXPLAIN extended SELECT *
+FROM t AS t1
+WHERE t1.a IN (SELECT t2.a
+FROM t AS t2
+WHERE CONCAT(t2.a,'') NOT IN (SELECT t3.a
+FROM t AS t3
+WHERE t3.b=1));
+id     select_type     table   type    possible_keys   key     key_len ref     rows    filtered        Extra
+1      PRIMARY t1      ALL     NULL    NULL    NULL    NULL    5       100.00  Using where
+1      PRIMARY <subquery2>     eq_ref  <auto_key>      <auto_key>      5       test.t1.a       1       100.00  NULL
+2      MATERIALIZED    t2      ALL     NULL    NULL    NULL    NULL    5       100.00  Using where
+3      DEPENDENT SUBQUERY      t3      ALL     NULL    NULL    NULL    NULL    5       100.00  Using where
+Warnings:
+Note   1003    /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t` `t1` semi join (`test`.`t` `t2`) where ((`<subquery2>`.`a` = `test`.`t1`.`a`) and (not(<in_optimizer>(concat(`test`.`t2`.`a`,''),<exists>(/* select#3 */ select 1 from `test`.`t` `t3` where ((`test`.`t3`.`b` = 1) and <if>(outer_field_is_not_null, ((<cache>(concat(`test`.`t2`.`a`,'')) = `test`.`t3`.`a`) or isnull(`test`.`t3`.`a`)), true)) having <if>(outer_field_is_not_null, <is_not_null_test>(`test`.`t3`.`a`), true))))))
+SELECT *
+FROM t AS t1
+WHERE t1.a IN (SELECT t2.a
+FROM t AS t2
+WHERE CONCAT(t2.a,'') NOT IN (SELECT t3.a
+FROM t AS t3
+WHERE t3.b=1));
+a      b
+DROP TABLE t;
 set optimizer_switch=default;
index acf5190a4ee88e1c415fc189850eda3d505d9338..40a4e06a887f5a614bbcf91686ee59dfe04e2bc2 100644 (file)
@@ -10689,5 +10689,102 @@ DROP TABLE t1,t2;
 # End of test for Bug#21184091
 set @@optimizer_switch=@old_opt_switch;
 # End of 5.6 tests
+# Bug#21139722: Assertion failed: !(used_tables() & ((table_map) 1) ...
+CREATE TABLE t1(a INTEGER) engine=innodb;
+CREATE TABLE t2(b INTEGER) engine=innodb;
+explain SELECT 1
+FROM (SELECT 1 IN (SELECT 1
+FROM t1
+WHERE (SELECT 1 FROM t2 HAVING b) NOT IN (SELECT 1 FROM t2)
+)
+FROM t2
+) AS z;
+id     select_type     table   type    possible_keys   key     key_len ref     rows    Extra
+1      PRIMARY <derived2>      ALL     NULL    NULL    NULL    NULL    2       NULL
+2      DERIVED t2      ALL     NULL    NULL    NULL    NULL    1       NULL
+3      DEPENDENT SUBQUERY      t1      ALL     NULL    NULL    NULL    NULL    1       Using where
+5      DEPENDENT SUBQUERY      t2      ALL     NULL    NULL    NULL    NULL    1       Using where
+4      DEPENDENT SUBQUERY      t2      ALL     NULL    NULL    NULL    NULL    1       NULL
+SELECT 1
+FROM (SELECT 1 IN (SELECT 1
+FROM t1
+WHERE (SELECT 1 FROM t2 HAVING b) NOT IN (SELECT 1 FROM t2)
+)
+FROM t2
+) AS z;
+1
+DROP TABLE t1, t2;
+CREATE TABLE t1(a INTEGER) engine=innodb;
+explain SELECT (SELECT a
+FROM t1 AS t2
+WHERE a IN (SELECT t1.a+t2.a
+FROM t1 AS t3))
+FROM t1 AS t1;
+id     select_type     table   type    possible_keys   key     key_len ref     rows    Extra
+1      PRIMARY t1      ALL     NULL    NULL    NULL    NULL    1       NULL
+2      DEPENDENT SUBQUERY      t2      ALL     NULL    NULL    NULL    NULL    1       Using where
+2      DEPENDENT SUBQUERY      t3      ALL     NULL    NULL    NULL    NULL    1       FirstMatch(t2); Using join buffer (Block Nested Loop)
+SELECT (SELECT a
+FROM t1 AS t2
+WHERE a IN (SELECT t1.a+t2.a
+FROM t1 AS t3))
+FROM t1 AS t1;
+(SELECT a
+FROM t1 AS t2
+WHERE a IN (SELECT t1.a+t2.a
+FROM t1 AS t3))
+DROP TABLE t1;
+# End of test for Bug#21139722
+#
+# Bug#21139402 ASSERTION FAILED: LENGTH > 0 && KEYPARTS != 0, CRASH IN JOIN::OPTIMIZE_KEYUSE
+#
+CREATE TABLE t1 (a INT, b INT, PRIMARY KEY(a));
+CREATE TABLE t2 (c INT PRIMARY KEY);
+EXPLAIN SELECT 1
+FROM t1
+WHERE 1 IN (SELECT (c IS NULL) IN (SELECT a
+FROM t1
+WHERE b)
+FROM t2);
+id     select_type     table   type    possible_keys   key     key_len ref     rows    Extra
+1      PRIMARY NULL    NULL    NULL    NULL    NULL    NULL    NULL    Impossible WHERE noticed after reading const tables
+3      DEPENDENT SUBQUERY      NULL    NULL    NULL    NULL    NULL    NULL    NULL    Impossible WHERE noticed after reading const tables
+SELECT 1
+FROM t1
+WHERE 1 IN (SELECT (c IS NULL) IN (SELECT a
+FROM t1
+WHERE b)
+FROM t2);
+1
+DROP TABLE t1,t2;
+#
+# Bug #22305361: QUERY WITH MATERIALIZED TABLE RETURNS INCORRECT
+#                RESULTS IN 5.6
+#
+CREATE TABLE t(a INT,b INT);
+INSERT INTO t VALUES (1,0),(1,0),(1,0),(1,0),(1,1);
+EXPLAIN extended SELECT *
+FROM t AS t1
+WHERE t1.a IN (SELECT t2.a
+FROM t AS t2
+WHERE CONCAT(t2.a,'') NOT IN (SELECT t3.a
+FROM t AS t3
+WHERE t3.b=1));
+id     select_type     table   type    possible_keys   key     key_len ref     rows    filtered        Extra
+1      PRIMARY t1      ALL     NULL    NULL    NULL    NULL    5       100.00  Using where
+1      PRIMARY <subquery2>     eq_ref  <auto_key>      <auto_key>      5       test.t1.a       1       100.00  NULL
+2      MATERIALIZED    t2      ALL     NULL    NULL    NULL    NULL    5       100.00  Using where
+3      DEPENDENT SUBQUERY      t3      ALL     NULL    NULL    NULL    NULL    5       100.00  Using where
+Warnings:
+Note   1003    /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t` `t1` semi join (`test`.`t` `t2`) where ((`<subquery2>`.`a` = `test`.`t1`.`a`) and (not(<in_optimizer>(concat(`test`.`t2`.`a`,''),<exists>(/* select#3 */ select 1 from `test`.`t` `t3` where ((`test`.`t3`.`b` = 1) and <if>(outer_field_is_not_null, ((<cache>(concat(`test`.`t2`.`a`,'')) = `test`.`t3`.`a`) or isnull(`test`.`t3`.`a`)), true)) having <if>(outer_field_is_not_null, <is_not_null_test>(`test`.`t3`.`a`), true))))))
+SELECT *
+FROM t AS t1
+WHERE t1.a IN (SELECT t2.a
+FROM t AS t2
+WHERE CONCAT(t2.a,'') NOT IN (SELECT t3.a
+FROM t AS t3
+WHERE t3.b=1));
+a      b
+DROP TABLE t;
 set optimizer_switch=default;
 set optimizer_switch=default;
index 85d3b8e3e260ab7f3940eb1665614408d07d9a66..d2c62e5b707e1fbe6e92035bfb822282a5e942f0 100644 (file)
@@ -10698,5 +10698,102 @@ DROP TABLE t1,t2;
 # End of test for Bug#21184091
 set @@optimizer_switch=@old_opt_switch;
 # End of 5.6 tests
+# Bug#21139722: Assertion failed: !(used_tables() & ((table_map) 1) ...
+CREATE TABLE t1(a INTEGER) engine=innodb;
+CREATE TABLE t2(b INTEGER) engine=innodb;
+explain SELECT 1
+FROM (SELECT 1 IN (SELECT 1
+FROM t1
+WHERE (SELECT 1 FROM t2 HAVING b) NOT IN (SELECT 1 FROM t2)
+)
+FROM t2
+) AS z;
+id     select_type     table   type    possible_keys   key     key_len ref     rows    Extra
+1      PRIMARY <derived2>      ALL     NULL    NULL    NULL    NULL    2       NULL
+2      DERIVED t2      ALL     NULL    NULL    NULL    NULL    1       NULL
+3      DEPENDENT SUBQUERY      t1      ALL     NULL    NULL    NULL    NULL    1       Using where
+5      DEPENDENT SUBQUERY      t2      ALL     NULL    NULL    NULL    NULL    1       Using where
+4      DEPENDENT SUBQUERY      t2      ALL     NULL    NULL    NULL    NULL    1       NULL
+SELECT 1
+FROM (SELECT 1 IN (SELECT 1
+FROM t1
+WHERE (SELECT 1 FROM t2 HAVING b) NOT IN (SELECT 1 FROM t2)
+)
+FROM t2
+) AS z;
+1
+DROP TABLE t1, t2;
+CREATE TABLE t1(a INTEGER) engine=innodb;
+explain SELECT (SELECT a
+FROM t1 AS t2
+WHERE a IN (SELECT t1.a+t2.a
+FROM t1 AS t3))
+FROM t1 AS t1;
+id     select_type     table   type    possible_keys   key     key_len ref     rows    Extra
+1      PRIMARY t1      ALL     NULL    NULL    NULL    NULL    1       NULL
+2      DEPENDENT SUBQUERY      t2      ALL     NULL    NULL    NULL    NULL    1       Using where
+2      DEPENDENT SUBQUERY      t3      ALL     NULL    NULL    NULL    NULL    1       FirstMatch(t2)
+SELECT (SELECT a
+FROM t1 AS t2
+WHERE a IN (SELECT t1.a+t2.a
+FROM t1 AS t3))
+FROM t1 AS t1;
+(SELECT a
+FROM t1 AS t2
+WHERE a IN (SELECT t1.a+t2.a
+FROM t1 AS t3))
+DROP TABLE t1;
+# End of test for Bug#21139722
+#
+# Bug#21139402 ASSERTION FAILED: LENGTH > 0 && KEYPARTS != 0, CRASH IN JOIN::OPTIMIZE_KEYUSE
+#
+CREATE TABLE t1 (a INT, b INT, PRIMARY KEY(a));
+CREATE TABLE t2 (c INT PRIMARY KEY);
+EXPLAIN SELECT 1
+FROM t1
+WHERE 1 IN (SELECT (c IS NULL) IN (SELECT a
+FROM t1
+WHERE b)
+FROM t2);
+id     select_type     table   type    possible_keys   key     key_len ref     rows    Extra
+1      PRIMARY NULL    NULL    NULL    NULL    NULL    NULL    NULL    Impossible WHERE noticed after reading const tables
+3      DEPENDENT SUBQUERY      NULL    NULL    NULL    NULL    NULL    NULL    NULL    Impossible WHERE noticed after reading const tables
+SELECT 1
+FROM t1
+WHERE 1 IN (SELECT (c IS NULL) IN (SELECT a
+FROM t1
+WHERE b)
+FROM t2);
+1
+DROP TABLE t1,t2;
+#
+# Bug #22305361: QUERY WITH MATERIALIZED TABLE RETURNS INCORRECT
+#                RESULTS IN 5.6
+#
+CREATE TABLE t(a INT,b INT);
+INSERT INTO t VALUES (1,0),(1,0),(1,0),(1,0),(1,1);
+EXPLAIN extended SELECT *
+FROM t AS t1
+WHERE t1.a IN (SELECT t2.a
+FROM t AS t2
+WHERE CONCAT(t2.a,'') NOT IN (SELECT t3.a
+FROM t AS t3
+WHERE t3.b=1));
+id     select_type     table   type    possible_keys   key     key_len ref     rows    filtered        Extra
+1      PRIMARY t1      ALL     NULL    NULL    NULL    NULL    5       100.00  Using where
+1      PRIMARY <subquery2>     eq_ref  <auto_key>      <auto_key>      5       test.t1.a       1       100.00  NULL
+2      MATERIALIZED    t2      ALL     NULL    NULL    NULL    NULL    5       100.00  Using where
+3      DEPENDENT SUBQUERY      t3      ALL     NULL    NULL    NULL    NULL    5       100.00  Using where
+Warnings:
+Note   1003    /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t` `t1` semi join (`test`.`t` `t2`) where ((`<subquery2>`.`a` = `test`.`t1`.`a`) and (not(<in_optimizer>(concat(`test`.`t2`.`a`,''),<exists>(/* select#3 */ select 1 from `test`.`t` `t3` where ((`test`.`t3`.`b` = 1) and <if>(outer_field_is_not_null, ((<cache>(concat(`test`.`t2`.`a`,'')) = `test`.`t3`.`a`) or isnull(`test`.`t3`.`a`)), true)) having <if>(outer_field_is_not_null, <is_not_null_test>(`test`.`t3`.`a`), true))))))
+SELECT *
+FROM t AS t1
+WHERE t1.a IN (SELECT t2.a
+FROM t AS t2
+WHERE CONCAT(t2.a,'') NOT IN (SELECT t3.a
+FROM t AS t3
+WHERE t3.b=1));
+a      b
+DROP TABLE t;
 set optimizer_switch=default;
 set optimizer_switch=default;
index b3540ad107f5acd77094baf95f3de7cadd716b6b..456eaa0502565e961c00be7f8b039a8662cd1aa9 100644 (file)
@@ -10690,5 +10690,102 @@ DROP TABLE t1,t2;
 # End of test for Bug#21184091
 set @@optimizer_switch=@old_opt_switch;
 # End of 5.6 tests
+# Bug#21139722: Assertion failed: !(used_tables() & ((table_map) 1) ...
+CREATE TABLE t1(a INTEGER) engine=innodb;
+CREATE TABLE t2(b INTEGER) engine=innodb;
+explain SELECT 1
+FROM (SELECT 1 IN (SELECT 1
+FROM t1
+WHERE (SELECT 1 FROM t2 HAVING b) NOT IN (SELECT 1 FROM t2)
+)
+FROM t2
+) AS z;
+id     select_type     table   type    possible_keys   key     key_len ref     rows    Extra
+1      PRIMARY <derived2>      ALL     NULL    NULL    NULL    NULL    2       NULL
+2      DERIVED t2      ALL     NULL    NULL    NULL    NULL    1       NULL
+3      DEPENDENT SUBQUERY      t1      ALL     NULL    NULL    NULL    NULL    1       Using where
+5      DEPENDENT SUBQUERY      t2      ALL     NULL    NULL    NULL    NULL    1       Using where
+4      DEPENDENT SUBQUERY      t2      ALL     NULL    NULL    NULL    NULL    1       NULL
+SELECT 1
+FROM (SELECT 1 IN (SELECT 1
+FROM t1
+WHERE (SELECT 1 FROM t2 HAVING b) NOT IN (SELECT 1 FROM t2)
+)
+FROM t2
+) AS z;
+1
+DROP TABLE t1, t2;
+CREATE TABLE t1(a INTEGER) engine=innodb;
+explain SELECT (SELECT a
+FROM t1 AS t2
+WHERE a IN (SELECT t1.a+t2.a
+FROM t1 AS t3))
+FROM t1 AS t1;
+id     select_type     table   type    possible_keys   key     key_len ref     rows    Extra
+1      PRIMARY t1      ALL     NULL    NULL    NULL    NULL    1       NULL
+2      DEPENDENT SUBQUERY      t2      ALL     NULL    NULL    NULL    NULL    1       Using where
+2      DEPENDENT SUBQUERY      t3      ALL     NULL    NULL    NULL    NULL    1       FirstMatch(t2); Using join buffer (Block Nested Loop)
+SELECT (SELECT a
+FROM t1 AS t2
+WHERE a IN (SELECT t1.a+t2.a
+FROM t1 AS t3))
+FROM t1 AS t1;
+(SELECT a
+FROM t1 AS t2
+WHERE a IN (SELECT t1.a+t2.a
+FROM t1 AS t3))
+DROP TABLE t1;
+# End of test for Bug#21139722
+#
+# Bug#21139402 ASSERTION FAILED: LENGTH > 0 && KEYPARTS != 0, CRASH IN JOIN::OPTIMIZE_KEYUSE
+#
+CREATE TABLE t1 (a INT, b INT, PRIMARY KEY(a));
+CREATE TABLE t2 (c INT PRIMARY KEY);
+EXPLAIN SELECT 1
+FROM t1
+WHERE 1 IN (SELECT (c IS NULL) IN (SELECT a
+FROM t1
+WHERE b)
+FROM t2);
+id     select_type     table   type    possible_keys   key     key_len ref     rows    Extra
+1      PRIMARY NULL    NULL    NULL    NULL    NULL    NULL    NULL    Impossible WHERE noticed after reading const tables
+3      DEPENDENT SUBQUERY      NULL    NULL    NULL    NULL    NULL    NULL    NULL    Impossible WHERE noticed after reading const tables
+SELECT 1
+FROM t1
+WHERE 1 IN (SELECT (c IS NULL) IN (SELECT a
+FROM t1
+WHERE b)
+FROM t2);
+1
+DROP TABLE t1,t2;
+#
+# Bug #22305361: QUERY WITH MATERIALIZED TABLE RETURNS INCORRECT
+#                RESULTS IN 5.6
+#
+CREATE TABLE t(a INT,b INT);
+INSERT INTO t VALUES (1,0),(1,0),(1,0),(1,0),(1,1);
+EXPLAIN extended SELECT *
+FROM t AS t1
+WHERE t1.a IN (SELECT t2.a
+FROM t AS t2
+WHERE CONCAT(t2.a,'') NOT IN (SELECT t3.a
+FROM t AS t3
+WHERE t3.b=1));
+id     select_type     table   type    possible_keys   key     key_len ref     rows    filtered        Extra
+1      PRIMARY t1      ALL     NULL    NULL    NULL    NULL    5       100.00  Using where
+1      PRIMARY <subquery2>     eq_ref  <auto_key>      <auto_key>      5       test.t1.a       1       100.00  NULL
+2      MATERIALIZED    t2      ALL     NULL    NULL    NULL    NULL    5       100.00  Using where
+3      DEPENDENT SUBQUERY      t3      ALL     NULL    NULL    NULL    NULL    5       100.00  Using where
+Warnings:
+Note   1003    /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t` `t1` semi join (`test`.`t` `t2`) where ((`<subquery2>`.`a` = `test`.`t1`.`a`) and (not(<in_optimizer>(concat(`test`.`t2`.`a`,''),<exists>(/* select#3 */ select 1 from `test`.`t` `t3` where ((`test`.`t3`.`b` = 1) and <if>(outer_field_is_not_null, ((<cache>(concat(`test`.`t2`.`a`,'')) = `test`.`t3`.`a`) or isnull(`test`.`t3`.`a`)), true)) having <if>(outer_field_is_not_null, <is_not_null_test>(`test`.`t3`.`a`), true))))))
+SELECT *
+FROM t AS t1
+WHERE t1.a IN (SELECT t2.a
+FROM t AS t2
+WHERE CONCAT(t2.a,'') NOT IN (SELECT t3.a
+FROM t AS t3
+WHERE t3.b=1));
+a      b
+DROP TABLE t;
 set optimizer_switch=default;
 set optimizer_switch=default;
index e17ca8e373bff9e4dc0f602988dd61ad90da4a84..2f84832c0ea6ed05f318f400d5c49817939d81a9 100644 (file)
@@ -10555,4 +10555,100 @@ DROP TABLE t1,t2;
 # End of test for Bug#21184091
 set @@optimizer_switch=@old_opt_switch;
 # End of 5.6 tests
+# Bug#21139722: Assertion failed: !(used_tables() & ((table_map) 1) ...
+CREATE TABLE t1(a INTEGER) engine=innodb;
+CREATE TABLE t2(b INTEGER) engine=innodb;
+explain SELECT 1
+FROM (SELECT 1 IN (SELECT 1
+FROM t1
+WHERE (SELECT 1 FROM t2 HAVING b) NOT IN (SELECT 1 FROM t2)
+)
+FROM t2
+) AS z;
+id     select_type     table   type    possible_keys   key     key_len ref     rows    Extra
+1      PRIMARY <derived2>      ALL     NULL    NULL    NULL    NULL    2       NULL
+2      DERIVED t2      ALL     NULL    NULL    NULL    NULL    1       NULL
+3      DEPENDENT SUBQUERY      t1      ALL     NULL    NULL    NULL    NULL    1       Using where
+5      DEPENDENT SUBQUERY      t2      ALL     NULL    NULL    NULL    NULL    1       Using where
+4      DEPENDENT SUBQUERY      t2      ALL     NULL    NULL    NULL    NULL    1       NULL
+SELECT 1
+FROM (SELECT 1 IN (SELECT 1
+FROM t1
+WHERE (SELECT 1 FROM t2 HAVING b) NOT IN (SELECT 1 FROM t2)
+)
+FROM t2
+) AS z;
+1
+DROP TABLE t1, t2;
+CREATE TABLE t1(a INTEGER) engine=innodb;
+explain SELECT (SELECT a
+FROM t1 AS t2
+WHERE a IN (SELECT t1.a+t2.a
+FROM t1 AS t3))
+FROM t1 AS t1;
+id     select_type     table   type    possible_keys   key     key_len ref     rows    Extra
+1      PRIMARY t1      ALL     NULL    NULL    NULL    NULL    1       NULL
+2      DEPENDENT SUBQUERY      t2      ALL     NULL    NULL    NULL    NULL    1       Using where; Start temporary
+2      DEPENDENT SUBQUERY      t3      ALL     NULL    NULL    NULL    NULL    1       End temporary; Using join buffer (Block Nested Loop)
+SELECT (SELECT a
+FROM t1 AS t2
+WHERE a IN (SELECT t1.a+t2.a
+FROM t1 AS t3))
+FROM t1 AS t1;
+(SELECT a
+FROM t1 AS t2
+WHERE a IN (SELECT t1.a+t2.a
+FROM t1 AS t3))
+DROP TABLE t1;
+# End of test for Bug#21139722
+#
+# Bug#21139402 ASSERTION FAILED: LENGTH > 0 && KEYPARTS != 0, CRASH IN JOIN::OPTIMIZE_KEYUSE
+#
+CREATE TABLE t1 (a INT, b INT, PRIMARY KEY(a));
+CREATE TABLE t2 (c INT PRIMARY KEY);
+EXPLAIN SELECT 1
+FROM t1
+WHERE 1 IN (SELECT (c IS NULL) IN (SELECT a
+FROM t1
+WHERE b)
+FROM t2);
+id     select_type     table   type    possible_keys   key     key_len ref     rows    Extra
+1      PRIMARY NULL    NULL    NULL    NULL    NULL    NULL    NULL    Impossible WHERE noticed after reading const tables
+3      DEPENDENT SUBQUERY      NULL    NULL    NULL    NULL    NULL    NULL    NULL    Impossible WHERE noticed after reading const tables
+SELECT 1
+FROM t1
+WHERE 1 IN (SELECT (c IS NULL) IN (SELECT a
+FROM t1
+WHERE b)
+FROM t2);
+1
+DROP TABLE t1,t2;
+#
+# Bug #22305361: QUERY WITH MATERIALIZED TABLE RETURNS INCORRECT
+#                RESULTS IN 5.6
+#
+CREATE TABLE t(a INT,b INT);
+INSERT INTO t VALUES (1,0),(1,0),(1,0),(1,0),(1,1);
+EXPLAIN extended SELECT *
+FROM t AS t1
+WHERE t1.a IN (SELECT t2.a
+FROM t AS t2
+WHERE CONCAT(t2.a,'') NOT IN (SELECT t3.a
+FROM t AS t3
+WHERE t3.b=1));
+id     select_type     table   type    possible_keys   key     key_len ref     rows    filtered        Extra
+1      PRIMARY t1      ALL     NULL    NULL    NULL    NULL    5       100.00  Start temporary
+1      PRIMARY t2      ALL     NULL    NULL    NULL    NULL    5       100.00  Using where; End temporary; Using join buffer (Block Nested Loop)
+3      DEPENDENT SUBQUERY      t3      ALL     NULL    NULL    NULL    NULL    5       100.00  Using where
+Warnings:
+Note   1003    /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t` `t1` semi join (`test`.`t` `t2`) where ((`test`.`t2`.`a` = `test`.`t1`.`a`) and (not(<in_optimizer>(concat(`test`.`t1`.`a`,''),<exists>(/* select#3 */ select 1 from `test`.`t` `t3` where ((`test`.`t3`.`b` = 1) and <if>(outer_field_is_not_null, ((<cache>(concat(`test`.`t1`.`a`,'')) = `test`.`t3`.`a`) or isnull(`test`.`t3`.`a`)), true)) having <if>(outer_field_is_not_null, <is_not_null_test>(`test`.`t3`.`a`), true))))))
+SELECT *
+FROM t AS t1
+WHERE t1.a IN (SELECT t2.a
+FROM t AS t2
+WHERE CONCAT(t2.a,'') NOT IN (SELECT t3.a
+FROM t AS t3
+WHERE t3.b=1));
+a      b
+DROP TABLE t;
 set optimizer_switch=default;
index 3b5bd304ca65f2d5f427c169ab71c207a9c2db6f..a643d1108575aca496533d4302fe462966f5c450 100644 (file)
@@ -10560,5 +10560,101 @@ DROP TABLE t1,t2;
 # End of test for Bug#21184091
 set @@optimizer_switch=@old_opt_switch;
 # End of 5.6 tests
+# Bug#21139722: Assertion failed: !(used_tables() & ((table_map) 1) ...
+CREATE TABLE t1(a INTEGER) engine=innodb;
+CREATE TABLE t2(b INTEGER) engine=innodb;
+explain SELECT 1
+FROM (SELECT 1 IN (SELECT 1
+FROM t1
+WHERE (SELECT 1 FROM t2 HAVING b) NOT IN (SELECT 1 FROM t2)
+)
+FROM t2
+) AS z;
+id     select_type     table   type    possible_keys   key     key_len ref     rows    Extra
+1      PRIMARY <derived2>      ALL     NULL    NULL    NULL    NULL    2       NULL
+2      DERIVED t2      ALL     NULL    NULL    NULL    NULL    1       NULL
+3      DEPENDENT SUBQUERY      t1      ALL     NULL    NULL    NULL    NULL    1       Using where
+5      DEPENDENT SUBQUERY      t2      ALL     NULL    NULL    NULL    NULL    1       Using where
+4      DEPENDENT SUBQUERY      t2      ALL     NULL    NULL    NULL    NULL    1       NULL
+SELECT 1
+FROM (SELECT 1 IN (SELECT 1
+FROM t1
+WHERE (SELECT 1 FROM t2 HAVING b) NOT IN (SELECT 1 FROM t2)
+)
+FROM t2
+) AS z;
+1
+DROP TABLE t1, t2;
+CREATE TABLE t1(a INTEGER) engine=innodb;
+explain SELECT (SELECT a
+FROM t1 AS t2
+WHERE a IN (SELECT t1.a+t2.a
+FROM t1 AS t3))
+FROM t1 AS t1;
+id     select_type     table   type    possible_keys   key     key_len ref     rows    Extra
+1      PRIMARY t1      ALL     NULL    NULL    NULL    NULL    1       NULL
+2      DEPENDENT SUBQUERY      t2      ALL     NULL    NULL    NULL    NULL    1       Using where; Start temporary
+2      DEPENDENT SUBQUERY      t3      ALL     NULL    NULL    NULL    NULL    1       End temporary; Using join buffer (Block Nested Loop)
+SELECT (SELECT a
+FROM t1 AS t2
+WHERE a IN (SELECT t1.a+t2.a
+FROM t1 AS t3))
+FROM t1 AS t1;
+(SELECT a
+FROM t1 AS t2
+WHERE a IN (SELECT t1.a+t2.a
+FROM t1 AS t3))
+DROP TABLE t1;
+# End of test for Bug#21139722
+#
+# Bug#21139402 ASSERTION FAILED: LENGTH > 0 && KEYPARTS != 0, CRASH IN JOIN::OPTIMIZE_KEYUSE
+#
+CREATE TABLE t1 (a INT, b INT, PRIMARY KEY(a));
+CREATE TABLE t2 (c INT PRIMARY KEY);
+EXPLAIN SELECT 1
+FROM t1
+WHERE 1 IN (SELECT (c IS NULL) IN (SELECT a
+FROM t1
+WHERE b)
+FROM t2);
+id     select_type     table   type    possible_keys   key     key_len ref     rows    Extra
+1      PRIMARY NULL    NULL    NULL    NULL    NULL    NULL    NULL    Impossible WHERE noticed after reading const tables
+3      DEPENDENT SUBQUERY      NULL    NULL    NULL    NULL    NULL    NULL    NULL    Impossible WHERE noticed after reading const tables
+SELECT 1
+FROM t1
+WHERE 1 IN (SELECT (c IS NULL) IN (SELECT a
+FROM t1
+WHERE b)
+FROM t2);
+1
+DROP TABLE t1,t2;
+#
+# Bug #22305361: QUERY WITH MATERIALIZED TABLE RETURNS INCORRECT
+#                RESULTS IN 5.6
+#
+CREATE TABLE t(a INT,b INT);
+INSERT INTO t VALUES (1,0),(1,0),(1,0),(1,0),(1,1);
+EXPLAIN extended SELECT *
+FROM t AS t1
+WHERE t1.a IN (SELECT t2.a
+FROM t AS t2
+WHERE CONCAT(t2.a,'') NOT IN (SELECT t3.a
+FROM t AS t3
+WHERE t3.b=1));
+id     select_type     table   type    possible_keys   key     key_len ref     rows    filtered        Extra
+1      PRIMARY t1      ALL     NULL    NULL    NULL    NULL    5       100.00  Start temporary
+1      PRIMARY t2      ALL     NULL    NULL    NULL    NULL    5       100.00  Using where; End temporary; Using join buffer (Block Nested Loop)
+3      DEPENDENT SUBQUERY      t3      ALL     NULL    NULL    NULL    NULL    5       100.00  Using where
+Warnings:
+Note   1003    /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t` `t1` semi join (`test`.`t` `t2`) where ((`test`.`t2`.`a` = `test`.`t1`.`a`) and (not(<in_optimizer>(concat(`test`.`t1`.`a`,''),<exists>(/* select#3 */ select 1 from `test`.`t` `t3` where ((`test`.`t3`.`b` = 1) and <if>(outer_field_is_not_null, ((<cache>(concat(`test`.`t1`.`a`,'')) = `test`.`t3`.`a`) or isnull(`test`.`t3`.`a`)), true)) having <if>(outer_field_is_not_null, <is_not_null_test>(`test`.`t3`.`a`), true))))))
+SELECT *
+FROM t AS t1
+WHERE t1.a IN (SELECT t2.a
+FROM t AS t2
+WHERE CONCAT(t2.a,'') NOT IN (SELECT t3.a
+FROM t AS t3
+WHERE t3.b=1));
+a      b
+DROP TABLE t;
 set optimizer_switch=default;
 set optimizer_switch=default;
index 0128f4269db0c693875fea50e97083cf01043177..b616fc26e2f6e194022aad4543ccbc7f5ed28626 100644 (file)
@@ -10560,5 +10560,101 @@ DROP TABLE t1,t2;
 # End of test for Bug#21184091
 set @@optimizer_switch=@old_opt_switch;
 # End of 5.6 tests
+# Bug#21139722: Assertion failed: !(used_tables() & ((table_map) 1) ...
+CREATE TABLE t1(a INTEGER) engine=innodb;
+CREATE TABLE t2(b INTEGER) engine=innodb;
+explain SELECT 1
+FROM (SELECT 1 IN (SELECT 1
+FROM t1
+WHERE (SELECT 1 FROM t2 HAVING b) NOT IN (SELECT 1 FROM t2)
+)
+FROM t2
+) AS z;
+id     select_type     table   type    possible_keys   key     key_len ref     rows    Extra
+1      PRIMARY <derived2>      ALL     NULL    NULL    NULL    NULL    2       NULL
+2      DERIVED t2      ALL     NULL    NULL    NULL    NULL    1       NULL
+3      DEPENDENT SUBQUERY      t1      ALL     NULL    NULL    NULL    NULL    1       Using where
+5      DEPENDENT SUBQUERY      t2      ALL     NULL    NULL    NULL    NULL    1       Using where
+4      DEPENDENT SUBQUERY      t2      ALL     NULL    NULL    NULL    NULL    1       NULL
+SELECT 1
+FROM (SELECT 1 IN (SELECT 1
+FROM t1
+WHERE (SELECT 1 FROM t2 HAVING b) NOT IN (SELECT 1 FROM t2)
+)
+FROM t2
+) AS z;
+1
+DROP TABLE t1, t2;
+CREATE TABLE t1(a INTEGER) engine=innodb;
+explain SELECT (SELECT a
+FROM t1 AS t2
+WHERE a IN (SELECT t1.a+t2.a
+FROM t1 AS t3))
+FROM t1 AS t1;
+id     select_type     table   type    possible_keys   key     key_len ref     rows    Extra
+1      PRIMARY t1      ALL     NULL    NULL    NULL    NULL    1       NULL
+2      DEPENDENT SUBQUERY      t2      ALL     NULL    NULL    NULL    NULL    1       Using where
+2      DEPENDENT SUBQUERY      t3      ALL     NULL    NULL    NULL    NULL    1       Start temporary; End temporary
+SELECT (SELECT a
+FROM t1 AS t2
+WHERE a IN (SELECT t1.a+t2.a
+FROM t1 AS t3))
+FROM t1 AS t1;
+(SELECT a
+FROM t1 AS t2
+WHERE a IN (SELECT t1.a+t2.a
+FROM t1 AS t3))
+DROP TABLE t1;
+# End of test for Bug#21139722
+#
+# Bug#21139402 ASSERTION FAILED: LENGTH > 0 && KEYPARTS != 0, CRASH IN JOIN::OPTIMIZE_KEYUSE
+#
+CREATE TABLE t1 (a INT, b INT, PRIMARY KEY(a));
+CREATE TABLE t2 (c INT PRIMARY KEY);
+EXPLAIN SELECT 1
+FROM t1
+WHERE 1 IN (SELECT (c IS NULL) IN (SELECT a
+FROM t1
+WHERE b)
+FROM t2);
+id     select_type     table   type    possible_keys   key     key_len ref     rows    Extra
+1      PRIMARY NULL    NULL    NULL    NULL    NULL    NULL    NULL    Impossible WHERE noticed after reading const tables
+3      DEPENDENT SUBQUERY      NULL    NULL    NULL    NULL    NULL    NULL    NULL    Impossible WHERE noticed after reading const tables
+SELECT 1
+FROM t1
+WHERE 1 IN (SELECT (c IS NULL) IN (SELECT a
+FROM t1
+WHERE b)
+FROM t2);
+1
+DROP TABLE t1,t2;
+#
+# Bug #22305361: QUERY WITH MATERIALIZED TABLE RETURNS INCORRECT
+#                RESULTS IN 5.6
+#
+CREATE TABLE t(a INT,b INT);
+INSERT INTO t VALUES (1,0),(1,0),(1,0),(1,0),(1,1);
+EXPLAIN extended SELECT *
+FROM t AS t1
+WHERE t1.a IN (SELECT t2.a
+FROM t AS t2
+WHERE CONCAT(t2.a,'') NOT IN (SELECT t3.a
+FROM t AS t3
+WHERE t3.b=1));
+id     select_type     table   type    possible_keys   key     key_len ref     rows    filtered        Extra
+1      PRIMARY t1      ALL     NULL    NULL    NULL    NULL    5       100.00  NULL
+1      PRIMARY t2      ALL     NULL    NULL    NULL    NULL    5       100.00  Using where; Start temporary; End temporary
+3      DEPENDENT SUBQUERY      t3      ALL     NULL    NULL    NULL    NULL    5       100.00  Using where
+Warnings:
+Note   1003    /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t` `t1` semi join (`test`.`t` `t2`) where ((`test`.`t2`.`a` = `test`.`t1`.`a`) and (not(<in_optimizer>(concat(`test`.`t1`.`a`,''),<exists>(/* select#3 */ select 1 from `test`.`t` `t3` where ((`test`.`t3`.`b` = 1) and <if>(outer_field_is_not_null, ((<cache>(concat(`test`.`t1`.`a`,'')) = `test`.`t3`.`a`) or isnull(`test`.`t3`.`a`)), true)) having <if>(outer_field_is_not_null, <is_not_null_test>(`test`.`t3`.`a`), true))))))
+SELECT *
+FROM t AS t1
+WHERE t1.a IN (SELECT t2.a
+FROM t AS t2
+WHERE CONCAT(t2.a,'') NOT IN (SELECT t3.a
+FROM t AS t3
+WHERE t3.b=1));
+a      b
+DROP TABLE t;
 set optimizer_switch=default;
 set optimizer_switch=default;
index d68b572385e228c46a7381c17d95f194c16eba24..eff4d1279eb506083c117682464a63d158ecf9e9 100644 (file)
@@ -10561,5 +10561,101 @@ DROP TABLE t1,t2;
 # End of test for Bug#21184091
 set @@optimizer_switch=@old_opt_switch;
 # End of 5.6 tests
+# Bug#21139722: Assertion failed: !(used_tables() & ((table_map) 1) ...
+CREATE TABLE t1(a INTEGER) engine=innodb;
+CREATE TABLE t2(b INTEGER) engine=innodb;
+explain SELECT 1
+FROM (SELECT 1 IN (SELECT 1
+FROM t1
+WHERE (SELECT 1 FROM t2 HAVING b) NOT IN (SELECT 1 FROM t2)
+)
+FROM t2
+) AS z;
+id     select_type     table   type    possible_keys   key     key_len ref     rows    Extra
+1      PRIMARY <derived2>      ALL     NULL    NULL    NULL    NULL    2       NULL
+2      DERIVED t2      ALL     NULL    NULL    NULL    NULL    1       NULL
+3      DEPENDENT SUBQUERY      t1      ALL     NULL    NULL    NULL    NULL    1       Using where
+5      DEPENDENT SUBQUERY      t2      ALL     NULL    NULL    NULL    NULL    1       Using where
+4      DEPENDENT SUBQUERY      t2      ALL     NULL    NULL    NULL    NULL    1       NULL
+SELECT 1
+FROM (SELECT 1 IN (SELECT 1
+FROM t1
+WHERE (SELECT 1 FROM t2 HAVING b) NOT IN (SELECT 1 FROM t2)
+)
+FROM t2
+) AS z;
+1
+DROP TABLE t1, t2;
+CREATE TABLE t1(a INTEGER) engine=innodb;
+explain SELECT (SELECT a
+FROM t1 AS t2
+WHERE a IN (SELECT t1.a+t2.a
+FROM t1 AS t3))
+FROM t1 AS t1;
+id     select_type     table   type    possible_keys   key     key_len ref     rows    Extra
+1      PRIMARY t1      ALL     NULL    NULL    NULL    NULL    1       NULL
+2      DEPENDENT SUBQUERY      t2      ALL     NULL    NULL    NULL    NULL    1       Using where; Start temporary
+2      DEPENDENT SUBQUERY      t3      ALL     NULL    NULL    NULL    NULL    1       End temporary; Using join buffer (Block Nested Loop)
+SELECT (SELECT a
+FROM t1 AS t2
+WHERE a IN (SELECT t1.a+t2.a
+FROM t1 AS t3))
+FROM t1 AS t1;
+(SELECT a
+FROM t1 AS t2
+WHERE a IN (SELECT t1.a+t2.a
+FROM t1 AS t3))
+DROP TABLE t1;
+# End of test for Bug#21139722
+#
+# Bug#21139402 ASSERTION FAILED: LENGTH > 0 && KEYPARTS != 0, CRASH IN JOIN::OPTIMIZE_KEYUSE
+#
+CREATE TABLE t1 (a INT, b INT, PRIMARY KEY(a));
+CREATE TABLE t2 (c INT PRIMARY KEY);
+EXPLAIN SELECT 1
+FROM t1
+WHERE 1 IN (SELECT (c IS NULL) IN (SELECT a
+FROM t1
+WHERE b)
+FROM t2);
+id     select_type     table   type    possible_keys   key     key_len ref     rows    Extra
+1      PRIMARY NULL    NULL    NULL    NULL    NULL    NULL    NULL    Impossible WHERE noticed after reading const tables
+3      DEPENDENT SUBQUERY      NULL    NULL    NULL    NULL    NULL    NULL    NULL    Impossible WHERE noticed after reading const tables
+SELECT 1
+FROM t1
+WHERE 1 IN (SELECT (c IS NULL) IN (SELECT a
+FROM t1
+WHERE b)
+FROM t2);
+1
+DROP TABLE t1,t2;
+#
+# Bug #22305361: QUERY WITH MATERIALIZED TABLE RETURNS INCORRECT
+#                RESULTS IN 5.6
+#
+CREATE TABLE t(a INT,b INT);
+INSERT INTO t VALUES (1,0),(1,0),(1,0),(1,0),(1,1);
+EXPLAIN extended SELECT *
+FROM t AS t1
+WHERE t1.a IN (SELECT t2.a
+FROM t AS t2
+WHERE CONCAT(t2.a,'') NOT IN (SELECT t3.a
+FROM t AS t3
+WHERE t3.b=1));
+id     select_type     table   type    possible_keys   key     key_len ref     rows    filtered        Extra
+1      PRIMARY t1      ALL     NULL    NULL    NULL    NULL    5       100.00  Start temporary
+1      PRIMARY t2      ALL     NULL    NULL    NULL    NULL    5       100.00  Using where; End temporary; Using join buffer (Block Nested Loop)
+3      DEPENDENT SUBQUERY      t3      ALL     NULL    NULL    NULL    NULL    5       100.00  Using where
+Warnings:
+Note   1003    /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t` `t1` semi join (`test`.`t` `t2`) where ((`test`.`t2`.`a` = `test`.`t1`.`a`) and (not(<in_optimizer>(concat(`test`.`t1`.`a`,''),<exists>(/* select#3 */ select 1 from `test`.`t` `t3` where ((`test`.`t3`.`b` = 1) and <if>(outer_field_is_not_null, ((<cache>(concat(`test`.`t1`.`a`,'')) = `test`.`t3`.`a`) or isnull(`test`.`t3`.`a`)), true)) having <if>(outer_field_is_not_null, <is_not_null_test>(`test`.`t3`.`a`), true))))))
+SELECT *
+FROM t AS t1
+WHERE t1.a IN (SELECT t2.a
+FROM t AS t2
+WHERE CONCAT(t2.a,'') NOT IN (SELECT t3.a
+FROM t AS t3
+WHERE t3.b=1));
+a      b
+DROP TABLE t;
 set optimizer_switch=default;
 set optimizer_switch=default;
index 6f96debab33af5a49fc8aa7da9879849017cd9ab..6290c93a4da544488e6cc89f4f45caf1069dbdee 100644 (file)
@@ -10521,6 +10521,102 @@ DROP TABLE t1,t2;
 # End of test for Bug#21184091
 set @@optimizer_switch=@old_opt_switch;
 # End of 5.6 tests
+# Bug#21139722: Assertion failed: !(used_tables() & ((table_map) 1) ...
+CREATE TABLE t1(a INTEGER) engine=innodb;
+CREATE TABLE t2(b INTEGER) engine=innodb;
+explain SELECT 1
+FROM (SELECT 1 IN (SELECT 1
+FROM t1
+WHERE (SELECT 1 FROM t2 HAVING b) NOT IN (SELECT 1 FROM t2)
+)
+FROM t2
+) AS z;
+id     select_type     table   type    possible_keys   key     key_len ref     rows    Extra
+1      PRIMARY <derived2>      ALL     NULL    NULL    NULL    NULL    2       NULL
+2      DERIVED t2      ALL     NULL    NULL    NULL    NULL    1       NULL
+3      DEPENDENT SUBQUERY      t1      ALL     NULL    NULL    NULL    NULL    1       Using where
+5      DEPENDENT SUBQUERY      t2      ALL     NULL    NULL    NULL    NULL    1       Using where
+4      DEPENDENT SUBQUERY      t2      ALL     NULL    NULL    NULL    NULL    1       NULL
+SELECT 1
+FROM (SELECT 1 IN (SELECT 1
+FROM t1
+WHERE (SELECT 1 FROM t2 HAVING b) NOT IN (SELECT 1 FROM t2)
+)
+FROM t2
+) AS z;
+1
+DROP TABLE t1, t2;
+CREATE TABLE t1(a INTEGER) engine=innodb;
+explain SELECT (SELECT a
+FROM t1 AS t2
+WHERE a IN (SELECT t1.a+t2.a
+FROM t1 AS t3))
+FROM t1 AS t1;
+id     select_type     table   type    possible_keys   key     key_len ref     rows    Extra
+1      PRIMARY t1      ALL     NULL    NULL    NULL    NULL    1       NULL
+2      DEPENDENT SUBQUERY      t2      ALL     NULL    NULL    NULL    NULL    1       Using where
+2      DEPENDENT SUBQUERY      t3      ALL     NULL    NULL    NULL    NULL    1       FirstMatch(t2); Using join buffer (Block Nested Loop)
+SELECT (SELECT a
+FROM t1 AS t2
+WHERE a IN (SELECT t1.a+t2.a
+FROM t1 AS t3))
+FROM t1 AS t1;
+(SELECT a
+FROM t1 AS t2
+WHERE a IN (SELECT t1.a+t2.a
+FROM t1 AS t3))
+DROP TABLE t1;
+# End of test for Bug#21139722
+#
+# Bug#21139402 ASSERTION FAILED: LENGTH > 0 && KEYPARTS != 0, CRASH IN JOIN::OPTIMIZE_KEYUSE
+#
+CREATE TABLE t1 (a INT, b INT, PRIMARY KEY(a));
+CREATE TABLE t2 (c INT PRIMARY KEY);
+EXPLAIN SELECT 1
+FROM t1
+WHERE 1 IN (SELECT (c IS NULL) IN (SELECT a
+FROM t1
+WHERE b)
+FROM t2);
+id     select_type     table   type    possible_keys   key     key_len ref     rows    Extra
+1      PRIMARY NULL    NULL    NULL    NULL    NULL    NULL    NULL    Impossible WHERE noticed after reading const tables
+3      DEPENDENT SUBQUERY      NULL    NULL    NULL    NULL    NULL    NULL    NULL    Impossible WHERE noticed after reading const tables
+SELECT 1
+FROM t1
+WHERE 1 IN (SELECT (c IS NULL) IN (SELECT a
+FROM t1
+WHERE b)
+FROM t2);
+1
+DROP TABLE t1,t2;
+#
+# Bug #22305361: QUERY WITH MATERIALIZED TABLE RETURNS INCORRECT
+#                RESULTS IN 5.6
+#
+CREATE TABLE t(a INT,b INT);
+INSERT INTO t VALUES (1,0),(1,0),(1,0),(1,0),(1,1);
+EXPLAIN extended SELECT *
+FROM t AS t1
+WHERE t1.a IN (SELECT t2.a
+FROM t AS t2
+WHERE CONCAT(t2.a,'') NOT IN (SELECT t3.a
+FROM t AS t3
+WHERE t3.b=1));
+id     select_type     table   type    possible_keys   key     key_len ref     rows    filtered        Extra
+1      PRIMARY t1      ALL     NULL    NULL    NULL    NULL    5       100.00  NULL
+1      PRIMARY t2      ALL     NULL    NULL    NULL    NULL    5       100.00  Using where; FirstMatch(t1); Using join buffer (Block Nested Loop)
+3      DEPENDENT SUBQUERY      t3      ALL     NULL    NULL    NULL    NULL    5       100.00  Using where
+Warnings:
+Note   1003    /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t` `t1` semi join (`test`.`t` `t2`) where ((`test`.`t2`.`a` = `test`.`t1`.`a`) and (not(<in_optimizer>(concat(`test`.`t1`.`a`,''),<exists>(/* select#3 */ select 1 from `test`.`t` `t3` where ((`test`.`t3`.`b` = 1) and <if>(outer_field_is_not_null, ((<cache>(concat(`test`.`t1`.`a`,'')) = `test`.`t3`.`a`) or isnull(`test`.`t3`.`a`)), true)) having <if>(outer_field_is_not_null, <is_not_null_test>(`test`.`t3`.`a`), true))))))
+SELECT *
+FROM t AS t1
+WHERE t1.a IN (SELECT t2.a
+FROM t AS t2
+WHERE CONCAT(t2.a,'') NOT IN (SELECT t3.a
+FROM t AS t3
+WHERE t3.b=1));
+a      b
+DROP TABLE t;
 #
 # Bug#51457 Firstmatch semijoin strategy gives wrong results for
 #           certain query plans
index 40521dba6f5f99b7ab3a4884b9bd6fb4d613e9b8..f826aea892a4d05465844094e78c043f7351654b 100644 (file)
@@ -10522,6 +10522,102 @@ DROP TABLE t1,t2;
 # End of test for Bug#21184091
 set @@optimizer_switch=@old_opt_switch;
 # End of 5.6 tests
+# Bug#21139722: Assertion failed: !(used_tables() & ((table_map) 1) ...
+CREATE TABLE t1(a INTEGER) engine=innodb;
+CREATE TABLE t2(b INTEGER) engine=innodb;
+explain SELECT 1
+FROM (SELECT 1 IN (SELECT 1
+FROM t1
+WHERE (SELECT 1 FROM t2 HAVING b) NOT IN (SELECT 1 FROM t2)
+)
+FROM t2
+) AS z;
+id     select_type     table   type    possible_keys   key     key_len ref     rows    Extra
+1      PRIMARY <derived2>      ALL     NULL    NULL    NULL    NULL    2       NULL
+2      DERIVED t2      ALL     NULL    NULL    NULL    NULL    1       NULL
+3      DEPENDENT SUBQUERY      t1      ALL     NULL    NULL    NULL    NULL    1       Using where
+5      DEPENDENT SUBQUERY      t2      ALL     NULL    NULL    NULL    NULL    1       Using where
+4      DEPENDENT SUBQUERY      t2      ALL     NULL    NULL    NULL    NULL    1       NULL
+SELECT 1
+FROM (SELECT 1 IN (SELECT 1
+FROM t1
+WHERE (SELECT 1 FROM t2 HAVING b) NOT IN (SELECT 1 FROM t2)
+)
+FROM t2
+) AS z;
+1
+DROP TABLE t1, t2;
+CREATE TABLE t1(a INTEGER) engine=innodb;
+explain SELECT (SELECT a
+FROM t1 AS t2
+WHERE a IN (SELECT t1.a+t2.a
+FROM t1 AS t3))
+FROM t1 AS t1;
+id     select_type     table   type    possible_keys   key     key_len ref     rows    Extra
+1      PRIMARY t1      ALL     NULL    NULL    NULL    NULL    1       NULL
+2      DEPENDENT SUBQUERY      t2      ALL     NULL    NULL    NULL    NULL    1       Using where
+2      DEPENDENT SUBQUERY      t3      ALL     NULL    NULL    NULL    NULL    1       FirstMatch(t2); Using join buffer (Block Nested Loop)
+SELECT (SELECT a
+FROM t1 AS t2
+WHERE a IN (SELECT t1.a+t2.a
+FROM t1 AS t3))
+FROM t1 AS t1;
+(SELECT a
+FROM t1 AS t2
+WHERE a IN (SELECT t1.a+t2.a
+FROM t1 AS t3))
+DROP TABLE t1;
+# End of test for Bug#21139722
+#
+# Bug#21139402 ASSERTION FAILED: LENGTH > 0 && KEYPARTS != 0, CRASH IN JOIN::OPTIMIZE_KEYUSE
+#
+CREATE TABLE t1 (a INT, b INT, PRIMARY KEY(a));
+CREATE TABLE t2 (c INT PRIMARY KEY);
+EXPLAIN SELECT 1
+FROM t1
+WHERE 1 IN (SELECT (c IS NULL) IN (SELECT a
+FROM t1
+WHERE b)
+FROM t2);
+id     select_type     table   type    possible_keys   key     key_len ref     rows    Extra
+1      PRIMARY NULL    NULL    NULL    NULL    NULL    NULL    NULL    Impossible WHERE noticed after reading const tables
+3      DEPENDENT SUBQUERY      NULL    NULL    NULL    NULL    NULL    NULL    NULL    Impossible WHERE noticed after reading const tables
+SELECT 1
+FROM t1
+WHERE 1 IN (SELECT (c IS NULL) IN (SELECT a
+FROM t1
+WHERE b)
+FROM t2);
+1
+DROP TABLE t1,t2;
+#
+# Bug #22305361: QUERY WITH MATERIALIZED TABLE RETURNS INCORRECT
+#                RESULTS IN 5.6
+#
+CREATE TABLE t(a INT,b INT);
+INSERT INTO t VALUES (1,0),(1,0),(1,0),(1,0),(1,1);
+EXPLAIN extended SELECT *
+FROM t AS t1
+WHERE t1.a IN (SELECT t2.a
+FROM t AS t2
+WHERE CONCAT(t2.a,'') NOT IN (SELECT t3.a
+FROM t AS t3
+WHERE t3.b=1));
+id     select_type     table   type    possible_keys   key     key_len ref     rows    filtered        Extra
+1      PRIMARY t1      ALL     NULL    NULL    NULL    NULL    5       100.00  NULL
+1      PRIMARY t2      ALL     NULL    NULL    NULL    NULL    5       100.00  Using where; FirstMatch(t1); Using join buffer (Block Nested Loop)
+3      DEPENDENT SUBQUERY      t3      ALL     NULL    NULL    NULL    NULL    5       100.00  Using where
+Warnings:
+Note   1003    /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t` `t1` semi join (`test`.`t` `t2`) where ((`test`.`t2`.`a` = `test`.`t1`.`a`) and (not(<in_optimizer>(concat(`test`.`t1`.`a`,''),<exists>(/* select#3 */ select 1 from `test`.`t` `t3` where ((`test`.`t3`.`b` = 1) and <if>(outer_field_is_not_null, ((<cache>(concat(`test`.`t1`.`a`,'')) = `test`.`t3`.`a`) or isnull(`test`.`t3`.`a`)), true)) having <if>(outer_field_is_not_null, <is_not_null_test>(`test`.`t3`.`a`), true))))))
+SELECT *
+FROM t AS t1
+WHERE t1.a IN (SELECT t2.a
+FROM t AS t2
+WHERE CONCAT(t2.a,'') NOT IN (SELECT t3.a
+FROM t AS t3
+WHERE t3.b=1));
+a      b
+DROP TABLE t;
 #
 # Bug#51457 Firstmatch semijoin strategy gives wrong results for
 #           certain query plans
index 8d6f932232eebd127eb87268b051c5f043837e76..3053b23da90afb9607317f45a7111b05a2d85286 100644 (file)
@@ -10545,6 +10545,102 @@ DROP TABLE t1,t2;
 # End of test for Bug#21184091
 set @@optimizer_switch=@old_opt_switch;
 # End of 5.6 tests
+# Bug#21139722: Assertion failed: !(used_tables() & ((table_map) 1) ...
+CREATE TABLE t1(a INTEGER) engine=innodb;
+CREATE TABLE t2(b INTEGER) engine=innodb;
+explain SELECT 1
+FROM (SELECT 1 IN (SELECT 1
+FROM t1
+WHERE (SELECT 1 FROM t2 HAVING b) NOT IN (SELECT 1 FROM t2)
+)
+FROM t2
+) AS z;
+id     select_type     table   type    possible_keys   key     key_len ref     rows    Extra
+1      PRIMARY <derived2>      ALL     NULL    NULL    NULL    NULL    2       NULL
+2      DERIVED t2      ALL     NULL    NULL    NULL    NULL    1       NULL
+3      DEPENDENT SUBQUERY      t1      ALL     NULL    NULL    NULL    NULL    1       Using where
+5      DEPENDENT SUBQUERY      t2      ALL     NULL    NULL    NULL    NULL    1       Using where
+4      DEPENDENT SUBQUERY      t2      ALL     NULL    NULL    NULL    NULL    1       NULL
+SELECT 1
+FROM (SELECT 1 IN (SELECT 1
+FROM t1
+WHERE (SELECT 1 FROM t2 HAVING b) NOT IN (SELECT 1 FROM t2)
+)
+FROM t2
+) AS z;
+1
+DROP TABLE t1, t2;
+CREATE TABLE t1(a INTEGER) engine=innodb;
+explain SELECT (SELECT a
+FROM t1 AS t2
+WHERE a IN (SELECT t1.a+t2.a
+FROM t1 AS t3))
+FROM t1 AS t1;
+id     select_type     table   type    possible_keys   key     key_len ref     rows    Extra
+1      PRIMARY t1      ALL     NULL    NULL    NULL    NULL    1       NULL
+2      DEPENDENT SUBQUERY      t2      ALL     NULL    NULL    NULL    NULL    1       Using where
+2      DEPENDENT SUBQUERY      t3      ALL     NULL    NULL    NULL    NULL    1       FirstMatch(t2)
+SELECT (SELECT a
+FROM t1 AS t2
+WHERE a IN (SELECT t1.a+t2.a
+FROM t1 AS t3))
+FROM t1 AS t1;
+(SELECT a
+FROM t1 AS t2
+WHERE a IN (SELECT t1.a+t2.a
+FROM t1 AS t3))
+DROP TABLE t1;
+# End of test for Bug#21139722
+#
+# Bug#21139402 ASSERTION FAILED: LENGTH > 0 && KEYPARTS != 0, CRASH IN JOIN::OPTIMIZE_KEYUSE
+#
+CREATE TABLE t1 (a INT, b INT, PRIMARY KEY(a));
+CREATE TABLE t2 (c INT PRIMARY KEY);
+EXPLAIN SELECT 1
+FROM t1
+WHERE 1 IN (SELECT (c IS NULL) IN (SELECT a
+FROM t1
+WHERE b)
+FROM t2);
+id     select_type     table   type    possible_keys   key     key_len ref     rows    Extra
+1      PRIMARY NULL    NULL    NULL    NULL    NULL    NULL    NULL    Impossible WHERE noticed after reading const tables
+3      DEPENDENT SUBQUERY      NULL    NULL    NULL    NULL    NULL    NULL    NULL    Impossible WHERE noticed after reading const tables
+SELECT 1
+FROM t1
+WHERE 1 IN (SELECT (c IS NULL) IN (SELECT a
+FROM t1
+WHERE b)
+FROM t2);
+1
+DROP TABLE t1,t2;
+#
+# Bug #22305361: QUERY WITH MATERIALIZED TABLE RETURNS INCORRECT
+#                RESULTS IN 5.6
+#
+CREATE TABLE t(a INT,b INT);
+INSERT INTO t VALUES (1,0),(1,0),(1,0),(1,0),(1,1);
+EXPLAIN extended SELECT *
+FROM t AS t1
+WHERE t1.a IN (SELECT t2.a
+FROM t AS t2
+WHERE CONCAT(t2.a,'') NOT IN (SELECT t3.a
+FROM t AS t3
+WHERE t3.b=1));
+id     select_type     table   type    possible_keys   key     key_len ref     rows    filtered        Extra
+1      PRIMARY t1      ALL     NULL    NULL    NULL    NULL    5       100.00  NULL
+1      PRIMARY t2      ALL     NULL    NULL    NULL    NULL    5       100.00  Using where; FirstMatch(t1)
+3      DEPENDENT SUBQUERY      t3      ALL     NULL    NULL    NULL    NULL    5       100.00  Using where
+Warnings:
+Note   1003    /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t` `t1` semi join (`test`.`t` `t2`) where ((`test`.`t2`.`a` = `test`.`t1`.`a`) and (not(<in_optimizer>(concat(`test`.`t1`.`a`,''),<exists>(/* select#3 */ select 1 from `test`.`t` `t3` where ((`test`.`t3`.`b` = 1) and <if>(outer_field_is_not_null, ((<cache>(concat(`test`.`t1`.`a`,'')) = `test`.`t3`.`a`) or isnull(`test`.`t3`.`a`)), true)) having <if>(outer_field_is_not_null, <is_not_null_test>(`test`.`t3`.`a`), true))))))
+SELECT *
+FROM t AS t1
+WHERE t1.a IN (SELECT t2.a
+FROM t AS t2
+WHERE CONCAT(t2.a,'') NOT IN (SELECT t3.a
+FROM t AS t3
+WHERE t3.b=1));
+a      b
+DROP TABLE t;
 #
 # Bug#51457 Firstmatch semijoin strategy gives wrong results for
 #           certain query plans
index 28d2780a52e13f493421b0a8ae883a5f161c3478..942b3ea52882484a22a4fe42b967f0f8b3c0e8eb 100644 (file)
@@ -10523,6 +10523,102 @@ DROP TABLE t1,t2;
 # End of test for Bug#21184091
 set @@optimizer_switch=@old_opt_switch;
 # End of 5.6 tests
+# Bug#21139722: Assertion failed: !(used_tables() & ((table_map) 1) ...
+CREATE TABLE t1(a INTEGER) engine=innodb;
+CREATE TABLE t2(b INTEGER) engine=innodb;
+explain SELECT 1
+FROM (SELECT 1 IN (SELECT 1
+FROM t1
+WHERE (SELECT 1 FROM t2 HAVING b) NOT IN (SELECT 1 FROM t2)
+)
+FROM t2
+) AS z;
+id     select_type     table   type    possible_keys   key     key_len ref     rows    Extra
+1      PRIMARY <derived2>      ALL     NULL    NULL    NULL    NULL    2       NULL
+2      DERIVED t2      ALL     NULL    NULL    NULL    NULL    1       NULL
+3      DEPENDENT SUBQUERY      t1      ALL     NULL    NULL    NULL    NULL    1       Using where
+5      DEPENDENT SUBQUERY      t2      ALL     NULL    NULL    NULL    NULL    1       Using where
+4      DEPENDENT SUBQUERY      t2      ALL     NULL    NULL    NULL    NULL    1       NULL
+SELECT 1
+FROM (SELECT 1 IN (SELECT 1
+FROM t1
+WHERE (SELECT 1 FROM t2 HAVING b) NOT IN (SELECT 1 FROM t2)
+)
+FROM t2
+) AS z;
+1
+DROP TABLE t1, t2;
+CREATE TABLE t1(a INTEGER) engine=innodb;
+explain SELECT (SELECT a
+FROM t1 AS t2
+WHERE a IN (SELECT t1.a+t2.a
+FROM t1 AS t3))
+FROM t1 AS t1;
+id     select_type     table   type    possible_keys   key     key_len ref     rows    Extra
+1      PRIMARY t1      ALL     NULL    NULL    NULL    NULL    1       NULL
+2      DEPENDENT SUBQUERY      t2      ALL     NULL    NULL    NULL    NULL    1       Using where
+2      DEPENDENT SUBQUERY      t3      ALL     NULL    NULL    NULL    NULL    1       FirstMatch(t2); Using join buffer (Block Nested Loop)
+SELECT (SELECT a
+FROM t1 AS t2
+WHERE a IN (SELECT t1.a+t2.a
+FROM t1 AS t3))
+FROM t1 AS t1;
+(SELECT a
+FROM t1 AS t2
+WHERE a IN (SELECT t1.a+t2.a
+FROM t1 AS t3))
+DROP TABLE t1;
+# End of test for Bug#21139722
+#
+# Bug#21139402 ASSERTION FAILED: LENGTH > 0 && KEYPARTS != 0, CRASH IN JOIN::OPTIMIZE_KEYUSE
+#
+CREATE TABLE t1 (a INT, b INT, PRIMARY KEY(a));
+CREATE TABLE t2 (c INT PRIMARY KEY);
+EXPLAIN SELECT 1
+FROM t1
+WHERE 1 IN (SELECT (c IS NULL) IN (SELECT a
+FROM t1
+WHERE b)
+FROM t2);
+id     select_type     table   type    possible_keys   key     key_len ref     rows    Extra
+1      PRIMARY NULL    NULL    NULL    NULL    NULL    NULL    NULL    Impossible WHERE noticed after reading const tables
+3      DEPENDENT SUBQUERY      NULL    NULL    NULL    NULL    NULL    NULL    NULL    Impossible WHERE noticed after reading const tables
+SELECT 1
+FROM t1
+WHERE 1 IN (SELECT (c IS NULL) IN (SELECT a
+FROM t1
+WHERE b)
+FROM t2);
+1
+DROP TABLE t1,t2;
+#
+# Bug #22305361: QUERY WITH MATERIALIZED TABLE RETURNS INCORRECT
+#                RESULTS IN 5.6
+#
+CREATE TABLE t(a INT,b INT);
+INSERT INTO t VALUES (1,0),(1,0),(1,0),(1,0),(1,1);
+EXPLAIN extended SELECT *
+FROM t AS t1
+WHERE t1.a IN (SELECT t2.a
+FROM t AS t2
+WHERE CONCAT(t2.a,'') NOT IN (SELECT t3.a
+FROM t AS t3
+WHERE t3.b=1));
+id     select_type     table   type    possible_keys   key     key_len ref     rows    filtered        Extra
+1      PRIMARY t1      ALL     NULL    NULL    NULL    NULL    5       100.00  NULL
+1      PRIMARY t2      ALL     NULL    NULL    NULL    NULL    5       100.00  Using where; FirstMatch(t1); Using join buffer (Block Nested Loop)
+3      DEPENDENT SUBQUERY      t3      ALL     NULL    NULL    NULL    NULL    5       100.00  Using where
+Warnings:
+Note   1003    /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t` `t1` semi join (`test`.`t` `t2`) where ((`test`.`t2`.`a` = `test`.`t1`.`a`) and (not(<in_optimizer>(concat(`test`.`t1`.`a`,''),<exists>(/* select#3 */ select 1 from `test`.`t` `t3` where ((`test`.`t3`.`b` = 1) and <if>(outer_field_is_not_null, ((<cache>(concat(`test`.`t1`.`a`,'')) = `test`.`t3`.`a`) or isnull(`test`.`t3`.`a`)), true)) having <if>(outer_field_is_not_null, <is_not_null_test>(`test`.`t3`.`a`), true))))))
+SELECT *
+FROM t AS t1
+WHERE t1.a IN (SELECT t2.a
+FROM t AS t2
+WHERE CONCAT(t2.a,'') NOT IN (SELECT t3.a
+FROM t AS t3
+WHERE t3.b=1));
+a      b
+DROP TABLE t;
 #
 # Bug#51457 Firstmatch semijoin strategy gives wrong results for
 #           certain query plans
index 50177f0b6cc59de856a8ceac051959c48f609e31..a7125ef4679b7bb3ca2eebea078b491e97aa9297 100644 (file)
@@ -10556,4 +10556,100 @@ DROP TABLE t1,t2;
 # End of test for Bug#21184091
 set @@optimizer_switch=@old_opt_switch;
 # End of 5.6 tests
+# Bug#21139722: Assertion failed: !(used_tables() & ((table_map) 1) ...
+CREATE TABLE t1(a INTEGER) engine=innodb;
+CREATE TABLE t2(b INTEGER) engine=innodb;
+explain SELECT 1
+FROM (SELECT 1 IN (SELECT 1
+FROM t1
+WHERE (SELECT 1 FROM t2 HAVING b) NOT IN (SELECT 1 FROM t2)
+)
+FROM t2
+) AS z;
+id     select_type     table   type    possible_keys   key     key_len ref     rows    Extra
+1      PRIMARY <derived2>      ALL     NULL    NULL    NULL    NULL    2       NULL
+2      DERIVED t2      ALL     NULL    NULL    NULL    NULL    1       NULL
+3      DEPENDENT SUBQUERY      t1      ALL     NULL    NULL    NULL    NULL    1       Using where
+5      DEPENDENT SUBQUERY      t2      ALL     NULL    NULL    NULL    NULL    1       Using where
+4      DEPENDENT SUBQUERY      t2      ALL     NULL    NULL    NULL    NULL    1       NULL
+SELECT 1
+FROM (SELECT 1 IN (SELECT 1
+FROM t1
+WHERE (SELECT 1 FROM t2 HAVING b) NOT IN (SELECT 1 FROM t2)
+)
+FROM t2
+) AS z;
+1
+DROP TABLE t1, t2;
+CREATE TABLE t1(a INTEGER) engine=innodb;
+explain SELECT (SELECT a
+FROM t1 AS t2
+WHERE a IN (SELECT t1.a+t2.a
+FROM t1 AS t3))
+FROM t1 AS t1;
+id     select_type     table   type    possible_keys   key     key_len ref     rows    Extra
+1      PRIMARY t1      ALL     NULL    NULL    NULL    NULL    1       NULL
+2      DEPENDENT SUBQUERY      t2      ALL     NULL    NULL    NULL    NULL    1       Using where; Start temporary
+2      DEPENDENT SUBQUERY      t3      ALL     NULL    NULL    NULL    NULL    1       End temporary; Using join buffer (Block Nested Loop)
+SELECT (SELECT a
+FROM t1 AS t2
+WHERE a IN (SELECT t1.a+t2.a
+FROM t1 AS t3))
+FROM t1 AS t1;
+(SELECT a
+FROM t1 AS t2
+WHERE a IN (SELECT t1.a+t2.a
+FROM t1 AS t3))
+DROP TABLE t1;
+# End of test for Bug#21139722
+#
+# Bug#21139402 ASSERTION FAILED: LENGTH > 0 && KEYPARTS != 0, CRASH IN JOIN::OPTIMIZE_KEYUSE
+#
+CREATE TABLE t1 (a INT, b INT, PRIMARY KEY(a));
+CREATE TABLE t2 (c INT PRIMARY KEY);
+EXPLAIN SELECT 1
+FROM t1
+WHERE 1 IN (SELECT (c IS NULL) IN (SELECT a
+FROM t1
+WHERE b)
+FROM t2);
+id     select_type     table   type    possible_keys   key     key_len ref     rows    Extra
+1      PRIMARY NULL    NULL    NULL    NULL    NULL    NULL    NULL    Impossible WHERE noticed after reading const tables
+3      DEPENDENT SUBQUERY      NULL    NULL    NULL    NULL    NULL    NULL    NULL    Impossible WHERE noticed after reading const tables
+SELECT 1
+FROM t1
+WHERE 1 IN (SELECT (c IS NULL) IN (SELECT a
+FROM t1
+WHERE b)
+FROM t2);
+1
+DROP TABLE t1,t2;
+#
+# Bug #22305361: QUERY WITH MATERIALIZED TABLE RETURNS INCORRECT
+#                RESULTS IN 5.6
+#
+CREATE TABLE t(a INT,b INT);
+INSERT INTO t VALUES (1,0),(1,0),(1,0),(1,0),(1,1);
+EXPLAIN extended SELECT *
+FROM t AS t1
+WHERE t1.a IN (SELECT t2.a
+FROM t AS t2
+WHERE CONCAT(t2.a,'') NOT IN (SELECT t3.a
+FROM t AS t3
+WHERE t3.b=1));
+id     select_type     table   type    possible_keys   key     key_len ref     rows    filtered        Extra
+1      PRIMARY t1      ALL     NULL    NULL    NULL    NULL    5       100.00  Start temporary
+1      PRIMARY t2      ALL     NULL    NULL    NULL    NULL    5       100.00  Using where; End temporary; Using join buffer (Block Nested Loop)
+3      DEPENDENT SUBQUERY      t3      ALL     NULL    NULL    NULL    NULL    5       100.00  Using where
+Warnings:
+Note   1003    /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t` `t1` semi join (`test`.`t` `t2`) where ((`test`.`t2`.`a` = `test`.`t1`.`a`) and (not(<in_optimizer>(concat(`test`.`t1`.`a`,''),<exists>(/* select#3 */ select 1 from `test`.`t` `t3` where ((`test`.`t3`.`b` = 1) and <if>(outer_field_is_not_null, ((<cache>(concat(`test`.`t1`.`a`,'')) = `test`.`t3`.`a`) or isnull(`test`.`t3`.`a`)), true)) having <if>(outer_field_is_not_null, <is_not_null_test>(`test`.`t3`.`a`), true))))))
+SELECT *
+FROM t AS t1
+WHERE t1.a IN (SELECT t2.a
+FROM t AS t2
+WHERE CONCAT(t2.a,'') NOT IN (SELECT t3.a
+FROM t AS t3
+WHERE t3.b=1));
+a      b
+DROP TABLE t;
 set optimizer_switch=default;
index e79aa141cd062c33e5046be2288fc3ac6b27bddb..9b134592e084316658eef8c70dac87989750e84a 100644 (file)
@@ -10561,5 +10561,101 @@ DROP TABLE t1,t2;
 # End of test for Bug#21184091
 set @@optimizer_switch=@old_opt_switch;
 # End of 5.6 tests
+# Bug#21139722: Assertion failed: !(used_tables() & ((table_map) 1) ...
+CREATE TABLE t1(a INTEGER) engine=innodb;
+CREATE TABLE t2(b INTEGER) engine=innodb;
+explain SELECT 1
+FROM (SELECT 1 IN (SELECT 1
+FROM t1
+WHERE (SELECT 1 FROM t2 HAVING b) NOT IN (SELECT 1 FROM t2)
+)
+FROM t2
+) AS z;
+id     select_type     table   type    possible_keys   key     key_len ref     rows    Extra
+1      PRIMARY <derived2>      ALL     NULL    NULL    NULL    NULL    2       NULL
+2      DERIVED t2      ALL     NULL    NULL    NULL    NULL    1       NULL
+3      DEPENDENT SUBQUERY      t1      ALL     NULL    NULL    NULL    NULL    1       Using where
+5      DEPENDENT SUBQUERY      t2      ALL     NULL    NULL    NULL    NULL    1       Using where
+4      DEPENDENT SUBQUERY      t2      ALL     NULL    NULL    NULL    NULL    1       NULL
+SELECT 1
+FROM (SELECT 1 IN (SELECT 1
+FROM t1
+WHERE (SELECT 1 FROM t2 HAVING b) NOT IN (SELECT 1 FROM t2)
+)
+FROM t2
+) AS z;
+1
+DROP TABLE t1, t2;
+CREATE TABLE t1(a INTEGER) engine=innodb;
+explain SELECT (SELECT a
+FROM t1 AS t2
+WHERE a IN (SELECT t1.a+t2.a
+FROM t1 AS t3))
+FROM t1 AS t1;
+id     select_type     table   type    possible_keys   key     key_len ref     rows    Extra
+1      PRIMARY t1      ALL     NULL    NULL    NULL    NULL    1       NULL
+2      DEPENDENT SUBQUERY      t2      ALL     NULL    NULL    NULL    NULL    1       Using where; Start temporary
+2      DEPENDENT SUBQUERY      t3      ALL     NULL    NULL    NULL    NULL    1       End temporary; Using join buffer (Block Nested Loop)
+SELECT (SELECT a
+FROM t1 AS t2
+WHERE a IN (SELECT t1.a+t2.a
+FROM t1 AS t3))
+FROM t1 AS t1;
+(SELECT a
+FROM t1 AS t2
+WHERE a IN (SELECT t1.a+t2.a
+FROM t1 AS t3))
+DROP TABLE t1;
+# End of test for Bug#21139722
+#
+# Bug#21139402 ASSERTION FAILED: LENGTH > 0 && KEYPARTS != 0, CRASH IN JOIN::OPTIMIZE_KEYUSE
+#
+CREATE TABLE t1 (a INT, b INT, PRIMARY KEY(a));
+CREATE TABLE t2 (c INT PRIMARY KEY);
+EXPLAIN SELECT 1
+FROM t1
+WHERE 1 IN (SELECT (c IS NULL) IN (SELECT a
+FROM t1
+WHERE b)
+FROM t2);
+id     select_type     table   type    possible_keys   key     key_len ref     rows    Extra
+1      PRIMARY NULL    NULL    NULL    NULL    NULL    NULL    NULL    Impossible WHERE noticed after reading const tables
+3      DEPENDENT SUBQUERY      NULL    NULL    NULL    NULL    NULL    NULL    NULL    Impossible WHERE noticed after reading const tables
+SELECT 1
+FROM t1
+WHERE 1 IN (SELECT (c IS NULL) IN (SELECT a
+FROM t1
+WHERE b)
+FROM t2);
+1
+DROP TABLE t1,t2;
+#
+# Bug #22305361: QUERY WITH MATERIALIZED TABLE RETURNS INCORRECT
+#                RESULTS IN 5.6
+#
+CREATE TABLE t(a INT,b INT);
+INSERT INTO t VALUES (1,0),(1,0),(1,0),(1,0),(1,1);
+EXPLAIN extended SELECT *
+FROM t AS t1
+WHERE t1.a IN (SELECT t2.a
+FROM t AS t2
+WHERE CONCAT(t2.a,'') NOT IN (SELECT t3.a
+FROM t AS t3
+WHERE t3.b=1));
+id     select_type     table   type    possible_keys   key     key_len ref     rows    filtered        Extra
+1      PRIMARY t1      ALL     NULL    NULL    NULL    NULL    5       100.00  Start temporary
+1      PRIMARY t2      ALL     NULL    NULL    NULL    NULL    5       100.00  Using where; End temporary; Using join buffer (Block Nested Loop)
+3      DEPENDENT SUBQUERY      t3      ALL     NULL    NULL    NULL    NULL    5       100.00  Using where
+Warnings:
+Note   1003    /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t` `t1` semi join (`test`.`t` `t2`) where ((`test`.`t2`.`a` = `test`.`t1`.`a`) and (not(<in_optimizer>(concat(`test`.`t1`.`a`,''),<exists>(/* select#3 */ select 1 from `test`.`t` `t3` where ((`test`.`t3`.`b` = 1) and <if>(outer_field_is_not_null, ((<cache>(concat(`test`.`t1`.`a`,'')) = `test`.`t3`.`a`) or isnull(`test`.`t3`.`a`)), true)) having <if>(outer_field_is_not_null, <is_not_null_test>(`test`.`t3`.`a`), true))))))
+SELECT *
+FROM t AS t1
+WHERE t1.a IN (SELECT t2.a
+FROM t AS t2
+WHERE CONCAT(t2.a,'') NOT IN (SELECT t3.a
+FROM t AS t3
+WHERE t3.b=1));
+a      b
+DROP TABLE t;
 set optimizer_switch=default;
 set optimizer_switch=default;
index 37d314d5cde3def91b1fae45b5af7f9d578138a4..c5088894a690e9e1dae3d0e4c14915d2692416f0 100644 (file)
@@ -10561,5 +10561,101 @@ DROP TABLE t1,t2;
 # End of test for Bug#21184091
 set @@optimizer_switch=@old_opt_switch;
 # End of 5.6 tests
+# Bug#21139722: Assertion failed: !(used_tables() & ((table_map) 1) ...
+CREATE TABLE t1(a INTEGER) engine=innodb;
+CREATE TABLE t2(b INTEGER) engine=innodb;
+explain SELECT 1
+FROM (SELECT 1 IN (SELECT 1
+FROM t1
+WHERE (SELECT 1 FROM t2 HAVING b) NOT IN (SELECT 1 FROM t2)
+)
+FROM t2
+) AS z;
+id     select_type     table   type    possible_keys   key     key_len ref     rows    Extra
+1      PRIMARY <derived2>      ALL     NULL    NULL    NULL    NULL    2       NULL
+2      DERIVED t2      ALL     NULL    NULL    NULL    NULL    1       NULL
+3      DEPENDENT SUBQUERY      t1      ALL     NULL    NULL    NULL    NULL    1       Using where
+5      DEPENDENT SUBQUERY      t2      ALL     NULL    NULL    NULL    NULL    1       Using where
+4      DEPENDENT SUBQUERY      t2      ALL     NULL    NULL    NULL    NULL    1       NULL
+SELECT 1
+FROM (SELECT 1 IN (SELECT 1
+FROM t1
+WHERE (SELECT 1 FROM t2 HAVING b) NOT IN (SELECT 1 FROM t2)
+)
+FROM t2
+) AS z;
+1
+DROP TABLE t1, t2;
+CREATE TABLE t1(a INTEGER) engine=innodb;
+explain SELECT (SELECT a
+FROM t1 AS t2
+WHERE a IN (SELECT t1.a+t2.a
+FROM t1 AS t3))
+FROM t1 AS t1;
+id     select_type     table   type    possible_keys   key     key_len ref     rows    Extra
+1      PRIMARY t1      ALL     NULL    NULL    NULL    NULL    1       NULL
+2      DEPENDENT SUBQUERY      t2      ALL     NULL    NULL    NULL    NULL    1       Using where
+2      DEPENDENT SUBQUERY      t3      ALL     NULL    NULL    NULL    NULL    1       Start temporary; End temporary
+SELECT (SELECT a
+FROM t1 AS t2
+WHERE a IN (SELECT t1.a+t2.a
+FROM t1 AS t3))
+FROM t1 AS t1;
+(SELECT a
+FROM t1 AS t2
+WHERE a IN (SELECT t1.a+t2.a
+FROM t1 AS t3))
+DROP TABLE t1;
+# End of test for Bug#21139722
+#
+# Bug#21139402 ASSERTION FAILED: LENGTH > 0 && KEYPARTS != 0, CRASH IN JOIN::OPTIMIZE_KEYUSE
+#
+CREATE TABLE t1 (a INT, b INT, PRIMARY KEY(a));
+CREATE TABLE t2 (c INT PRIMARY KEY);
+EXPLAIN SELECT 1
+FROM t1
+WHERE 1 IN (SELECT (c IS NULL) IN (SELECT a
+FROM t1
+WHERE b)
+FROM t2);
+id     select_type     table   type    possible_keys   key     key_len ref     rows    Extra
+1      PRIMARY NULL    NULL    NULL    NULL    NULL    NULL    NULL    Impossible WHERE noticed after reading const tables
+3      DEPENDENT SUBQUERY      NULL    NULL    NULL    NULL    NULL    NULL    NULL    Impossible WHERE noticed after reading const tables
+SELECT 1
+FROM t1
+WHERE 1 IN (SELECT (c IS NULL) IN (SELECT a
+FROM t1
+WHERE b)
+FROM t2);
+1
+DROP TABLE t1,t2;
+#
+# Bug #22305361: QUERY WITH MATERIALIZED TABLE RETURNS INCORRECT
+#                RESULTS IN 5.6
+#
+CREATE TABLE t(a INT,b INT);
+INSERT INTO t VALUES (1,0),(1,0),(1,0),(1,0),(1,1);
+EXPLAIN extended SELECT *
+FROM t AS t1
+WHERE t1.a IN (SELECT t2.a
+FROM t AS t2
+WHERE CONCAT(t2.a,'') NOT IN (SELECT t3.a
+FROM t AS t3
+WHERE t3.b=1));
+id     select_type     table   type    possible_keys   key     key_len ref     rows    filtered        Extra
+1      PRIMARY t1      ALL     NULL    NULL    NULL    NULL    5       100.00  NULL
+1      PRIMARY t2      ALL     NULL    NULL    NULL    NULL    5       100.00  Using where; Start temporary; End temporary
+3      DEPENDENT SUBQUERY      t3      ALL     NULL    NULL    NULL    NULL    5       100.00  Using where
+Warnings:
+Note   1003    /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t` `t1` semi join (`test`.`t` `t2`) where ((`test`.`t2`.`a` = `test`.`t1`.`a`) and (not(<in_optimizer>(concat(`test`.`t1`.`a`,''),<exists>(/* select#3 */ select 1 from `test`.`t` `t3` where ((`test`.`t3`.`b` = 1) and <if>(outer_field_is_not_null, ((<cache>(concat(`test`.`t1`.`a`,'')) = `test`.`t3`.`a`) or isnull(`test`.`t3`.`a`)), true)) having <if>(outer_field_is_not_null, <is_not_null_test>(`test`.`t3`.`a`), true))))))
+SELECT *
+FROM t AS t1
+WHERE t1.a IN (SELECT t2.a
+FROM t AS t2
+WHERE CONCAT(t2.a,'') NOT IN (SELECT t3.a
+FROM t AS t3
+WHERE t3.b=1));
+a      b
+DROP TABLE t;
 set optimizer_switch=default;
 set optimizer_switch=default;
index 98a23d3a297e039541d775d43efec0b792382446..d889f03239c8387336c850e125ea871f0fbd6f2f 100644 (file)
@@ -10562,5 +10562,101 @@ DROP TABLE t1,t2;
 # End of test for Bug#21184091
 set @@optimizer_switch=@old_opt_switch;
 # End of 5.6 tests
+# Bug#21139722: Assertion failed: !(used_tables() & ((table_map) 1) ...
+CREATE TABLE t1(a INTEGER) engine=innodb;
+CREATE TABLE t2(b INTEGER) engine=innodb;
+explain SELECT 1
+FROM (SELECT 1 IN (SELECT 1
+FROM t1
+WHERE (SELECT 1 FROM t2 HAVING b) NOT IN (SELECT 1 FROM t2)
+)
+FROM t2
+) AS z;
+id     select_type     table   type    possible_keys   key     key_len ref     rows    Extra
+1      PRIMARY <derived2>      ALL     NULL    NULL    NULL    NULL    2       NULL
+2      DERIVED t2      ALL     NULL    NULL    NULL    NULL    1       NULL
+3      DEPENDENT SUBQUERY      t1      ALL     NULL    NULL    NULL    NULL    1       Using where
+5      DEPENDENT SUBQUERY      t2      ALL     NULL    NULL    NULL    NULL    1       Using where
+4      DEPENDENT SUBQUERY      t2      ALL     NULL    NULL    NULL    NULL    1       NULL
+SELECT 1
+FROM (SELECT 1 IN (SELECT 1
+FROM t1
+WHERE (SELECT 1 FROM t2 HAVING b) NOT IN (SELECT 1 FROM t2)
+)
+FROM t2
+) AS z;
+1
+DROP TABLE t1, t2;
+CREATE TABLE t1(a INTEGER) engine=innodb;
+explain SELECT (SELECT a
+FROM t1 AS t2
+WHERE a IN (SELECT t1.a+t2.a
+FROM t1 AS t3))
+FROM t1 AS t1;
+id     select_type     table   type    possible_keys   key     key_len ref     rows    Extra
+1      PRIMARY t1      ALL     NULL    NULL    NULL    NULL    1       NULL
+2      DEPENDENT SUBQUERY      t2      ALL     NULL    NULL    NULL    NULL    1       Using where; Start temporary
+2      DEPENDENT SUBQUERY      t3      ALL     NULL    NULL    NULL    NULL    1       End temporary; Using join buffer (Block Nested Loop)
+SELECT (SELECT a
+FROM t1 AS t2
+WHERE a IN (SELECT t1.a+t2.a
+FROM t1 AS t3))
+FROM t1 AS t1;
+(SELECT a
+FROM t1 AS t2
+WHERE a IN (SELECT t1.a+t2.a
+FROM t1 AS t3))
+DROP TABLE t1;
+# End of test for Bug#21139722
+#
+# Bug#21139402 ASSERTION FAILED: LENGTH > 0 && KEYPARTS != 0, CRASH IN JOIN::OPTIMIZE_KEYUSE
+#
+CREATE TABLE t1 (a INT, b INT, PRIMARY KEY(a));
+CREATE TABLE t2 (c INT PRIMARY KEY);
+EXPLAIN SELECT 1
+FROM t1
+WHERE 1 IN (SELECT (c IS NULL) IN (SELECT a
+FROM t1
+WHERE b)
+FROM t2);
+id     select_type     table   type    possible_keys   key     key_len ref     rows    Extra
+1      PRIMARY NULL    NULL    NULL    NULL    NULL    NULL    NULL    Impossible WHERE noticed after reading const tables
+3      DEPENDENT SUBQUERY      NULL    NULL    NULL    NULL    NULL    NULL    NULL    Impossible WHERE noticed after reading const tables
+SELECT 1
+FROM t1
+WHERE 1 IN (SELECT (c IS NULL) IN (SELECT a
+FROM t1
+WHERE b)
+FROM t2);
+1
+DROP TABLE t1,t2;
+#
+# Bug #22305361: QUERY WITH MATERIALIZED TABLE RETURNS INCORRECT
+#                RESULTS IN 5.6
+#
+CREATE TABLE t(a INT,b INT);
+INSERT INTO t VALUES (1,0),(1,0),(1,0),(1,0),(1,1);
+EXPLAIN extended SELECT *
+FROM t AS t1
+WHERE t1.a IN (SELECT t2.a
+FROM t AS t2
+WHERE CONCAT(t2.a,'') NOT IN (SELECT t3.a
+FROM t AS t3
+WHERE t3.b=1));
+id     select_type     table   type    possible_keys   key     key_len ref     rows    filtered        Extra
+1      PRIMARY t1      ALL     NULL    NULL    NULL    NULL    5       100.00  Start temporary
+1      PRIMARY t2      ALL     NULL    NULL    NULL    NULL    5       100.00  Using where; End temporary; Using join buffer (Block Nested Loop)
+3      DEPENDENT SUBQUERY      t3      ALL     NULL    NULL    NULL    NULL    5       100.00  Using where
+Warnings:
+Note   1003    /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t` `t1` semi join (`test`.`t` `t2`) where ((`test`.`t2`.`a` = `test`.`t1`.`a`) and (not(<in_optimizer>(concat(`test`.`t1`.`a`,''),<exists>(/* select#3 */ select 1 from `test`.`t` `t3` where ((`test`.`t3`.`b` = 1) and <if>(outer_field_is_not_null, ((<cache>(concat(`test`.`t1`.`a`,'')) = `test`.`t3`.`a`) or isnull(`test`.`t3`.`a`)), true)) having <if>(outer_field_is_not_null, <is_not_null_test>(`test`.`t3`.`a`), true))))))
+SELECT *
+FROM t AS t1
+WHERE t1.a IN (SELECT t2.a
+FROM t AS t2
+WHERE CONCAT(t2.a,'') NOT IN (SELECT t3.a
+FROM t AS t3
+WHERE t3.b=1));
+a      b
+DROP TABLE t;
 set optimizer_switch=default;
 set optimizer_switch=default;
index 4f0885a30cf6c219aaea512e10e61cd4dadf5bcc..28284ca31a797a9762a922e0894921b79868a47f 100644 (file)
@@ -10786,4 +10786,101 @@ DROP TABLE t1,t2;
 # End of test for Bug#21184091
 set @@optimizer_switch=@old_opt_switch;
 # End of 5.6 tests
+# Bug#21139722: Assertion failed: !(used_tables() & ((table_map) 1) ...
+CREATE TABLE t1(a INTEGER) engine=innodb;
+CREATE TABLE t2(b INTEGER) engine=innodb;
+explain SELECT 1
+FROM (SELECT 1 IN (SELECT 1
+FROM t1
+WHERE (SELECT 1 FROM t2 HAVING b) NOT IN (SELECT 1 FROM t2)
+)
+FROM t2
+) AS z;
+id     select_type     table   type    possible_keys   key     key_len ref     rows    Extra
+1      PRIMARY <derived2>      ALL     NULL    NULL    NULL    NULL    2       NULL
+2      DERIVED t2      ALL     NULL    NULL    NULL    NULL    1       NULL
+3      DEPENDENT SUBQUERY      t1      ALL     NULL    NULL    NULL    NULL    1       Using where
+5      DEPENDENT SUBQUERY      t2      ALL     NULL    NULL    NULL    NULL    1       Using where
+4      DEPENDENT SUBQUERY      t2      ALL     NULL    NULL    NULL    NULL    1       NULL
+SELECT 1
+FROM (SELECT 1 IN (SELECT 1
+FROM t1
+WHERE (SELECT 1 FROM t2 HAVING b) NOT IN (SELECT 1 FROM t2)
+)
+FROM t2
+) AS z;
+1
+DROP TABLE t1, t2;
+CREATE TABLE t1(a INTEGER) engine=innodb;
+explain SELECT (SELECT a
+FROM t1 AS t2
+WHERE a IN (SELECT t1.a+t2.a
+FROM t1 AS t3))
+FROM t1 AS t1;
+id     select_type     table   type    possible_keys   key     key_len ref     rows    Extra
+1      PRIMARY t1      ALL     NULL    NULL    NULL    NULL    1       NULL
+2      DEPENDENT SUBQUERY      t2      ALL     NULL    NULL    NULL    NULL    1       Using where; Start temporary
+2      DEPENDENT SUBQUERY      t3      ALL     NULL    NULL    NULL    NULL    1       End temporary; Using join buffer (Block Nested Loop)
+SELECT (SELECT a
+FROM t1 AS t2
+WHERE a IN (SELECT t1.a+t2.a
+FROM t1 AS t3))
+FROM t1 AS t1;
+(SELECT a
+FROM t1 AS t2
+WHERE a IN (SELECT t1.a+t2.a
+FROM t1 AS t3))
+DROP TABLE t1;
+# End of test for Bug#21139722
+#
+# Bug#21139402 ASSERTION FAILED: LENGTH > 0 && KEYPARTS != 0, CRASH IN JOIN::OPTIMIZE_KEYUSE
+#
+CREATE TABLE t1 (a INT, b INT, PRIMARY KEY(a));
+CREATE TABLE t2 (c INT PRIMARY KEY);
+EXPLAIN SELECT 1
+FROM t1
+WHERE 1 IN (SELECT (c IS NULL) IN (SELECT a
+FROM t1
+WHERE b)
+FROM t2);
+id     select_type     table   type    possible_keys   key     key_len ref     rows    Extra
+1      PRIMARY NULL    NULL    NULL    NULL    NULL    NULL    NULL    Impossible WHERE noticed after reading const tables
+3      DEPENDENT SUBQUERY      NULL    NULL    NULL    NULL    NULL    NULL    NULL    Impossible WHERE noticed after reading const tables
+SELECT 1
+FROM t1
+WHERE 1 IN (SELECT (c IS NULL) IN (SELECT a
+FROM t1
+WHERE b)
+FROM t2);
+1
+DROP TABLE t1,t2;
+#
+# Bug #22305361: QUERY WITH MATERIALIZED TABLE RETURNS INCORRECT
+#                RESULTS IN 5.6
+#
+CREATE TABLE t(a INT,b INT);
+INSERT INTO t VALUES (1,0),(1,0),(1,0),(1,0),(1,1);
+EXPLAIN extended SELECT *
+FROM t AS t1
+WHERE t1.a IN (SELECT t2.a
+FROM t AS t2
+WHERE CONCAT(t2.a,'') NOT IN (SELECT t3.a
+FROM t AS t3
+WHERE t3.b=1));
+id     select_type     table   type    possible_keys   key     key_len ref     rows    filtered        Extra
+1      PRIMARY t1      ALL     NULL    NULL    NULL    NULL    5       100.00  Using where
+1      PRIMARY <subquery2>     eq_ref  <auto_key>      <auto_key>      5       test.t1.a       1       100.00  NULL
+2      MATERIALIZED    t2      ALL     NULL    NULL    NULL    NULL    5       100.00  Using where
+3      DEPENDENT SUBQUERY      t3      ALL     NULL    NULL    NULL    NULL    5       100.00  Using where
+Warnings:
+Note   1003    /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t` `t1` semi join (`test`.`t` `t2`) where ((`<subquery2>`.`a` = `test`.`t1`.`a`) and (not(<in_optimizer>(concat(`test`.`t2`.`a`,''),<exists>(/* select#3 */ select 1 from `test`.`t` `t3` where ((`test`.`t3`.`b` = 1) and <if>(outer_field_is_not_null, ((<cache>(concat(`test`.`t2`.`a`,'')) = `test`.`t3`.`a`) or isnull(`test`.`t3`.`a`)), true)) having <if>(outer_field_is_not_null, <is_not_null_test>(`test`.`t3`.`a`), true))))))
+SELECT *
+FROM t AS t1
+WHERE t1.a IN (SELECT t2.a
+FROM t AS t2
+WHERE CONCAT(t2.a,'') NOT IN (SELECT t3.a
+FROM t AS t3
+WHERE t3.b=1));
+a      b
+DROP TABLE t;
 set optimizer_switch=default;
index 5aef86498523d993c1ac0bcc36e81564bb77b1f8..48cc887f9c7b59bae17013ef6790618eeb732cc0 100644 (file)
@@ -10787,5 +10787,102 @@ DROP TABLE t1,t2;
 # End of test for Bug#21184091
 set @@optimizer_switch=@old_opt_switch;
 # End of 5.6 tests
+# Bug#21139722: Assertion failed: !(used_tables() & ((table_map) 1) ...
+CREATE TABLE t1(a INTEGER) engine=innodb;
+CREATE TABLE t2(b INTEGER) engine=innodb;
+explain SELECT 1
+FROM (SELECT 1 IN (SELECT 1
+FROM t1
+WHERE (SELECT 1 FROM t2 HAVING b) NOT IN (SELECT 1 FROM t2)
+)
+FROM t2
+) AS z;
+id     select_type     table   type    possible_keys   key     key_len ref     rows    Extra
+1      PRIMARY <derived2>      ALL     NULL    NULL    NULL    NULL    2       NULL
+2      DERIVED t2      ALL     NULL    NULL    NULL    NULL    1       NULL
+3      DEPENDENT SUBQUERY      t1      ALL     NULL    NULL    NULL    NULL    1       Using where
+5      DEPENDENT SUBQUERY      t2      ALL     NULL    NULL    NULL    NULL    1       Using where
+4      DEPENDENT SUBQUERY      t2      ALL     NULL    NULL    NULL    NULL    1       NULL
+SELECT 1
+FROM (SELECT 1 IN (SELECT 1
+FROM t1
+WHERE (SELECT 1 FROM t2 HAVING b) NOT IN (SELECT 1 FROM t2)
+)
+FROM t2
+) AS z;
+1
+DROP TABLE t1, t2;
+CREATE TABLE t1(a INTEGER) engine=innodb;
+explain SELECT (SELECT a
+FROM t1 AS t2
+WHERE a IN (SELECT t1.a+t2.a
+FROM t1 AS t3))
+FROM t1 AS t1;
+id     select_type     table   type    possible_keys   key     key_len ref     rows    Extra
+1      PRIMARY t1      ALL     NULL    NULL    NULL    NULL    1       NULL
+2      DEPENDENT SUBQUERY      t2      ALL     NULL    NULL    NULL    NULL    1       Using where; Start temporary
+2      DEPENDENT SUBQUERY      t3      ALL     NULL    NULL    NULL    NULL    1       End temporary; Using join buffer (Block Nested Loop)
+SELECT (SELECT a
+FROM t1 AS t2
+WHERE a IN (SELECT t1.a+t2.a
+FROM t1 AS t3))
+FROM t1 AS t1;
+(SELECT a
+FROM t1 AS t2
+WHERE a IN (SELECT t1.a+t2.a
+FROM t1 AS t3))
+DROP TABLE t1;
+# End of test for Bug#21139722
+#
+# Bug#21139402 ASSERTION FAILED: LENGTH > 0 && KEYPARTS != 0, CRASH IN JOIN::OPTIMIZE_KEYUSE
+#
+CREATE TABLE t1 (a INT, b INT, PRIMARY KEY(a));
+CREATE TABLE t2 (c INT PRIMARY KEY);
+EXPLAIN SELECT 1
+FROM t1
+WHERE 1 IN (SELECT (c IS NULL) IN (SELECT a
+FROM t1
+WHERE b)
+FROM t2);
+id     select_type     table   type    possible_keys   key     key_len ref     rows    Extra
+1      PRIMARY NULL    NULL    NULL    NULL    NULL    NULL    NULL    Impossible WHERE noticed after reading const tables
+3      DEPENDENT SUBQUERY      NULL    NULL    NULL    NULL    NULL    NULL    NULL    Impossible WHERE noticed after reading const tables
+SELECT 1
+FROM t1
+WHERE 1 IN (SELECT (c IS NULL) IN (SELECT a
+FROM t1
+WHERE b)
+FROM t2);
+1
+DROP TABLE t1,t2;
+#
+# Bug #22305361: QUERY WITH MATERIALIZED TABLE RETURNS INCORRECT
+#                RESULTS IN 5.6
+#
+CREATE TABLE t(a INT,b INT);
+INSERT INTO t VALUES (1,0),(1,0),(1,0),(1,0),(1,1);
+EXPLAIN extended SELECT *
+FROM t AS t1
+WHERE t1.a IN (SELECT t2.a
+FROM t AS t2
+WHERE CONCAT(t2.a,'') NOT IN (SELECT t3.a
+FROM t AS t3
+WHERE t3.b=1));
+id     select_type     table   type    possible_keys   key     key_len ref     rows    filtered        Extra
+1      PRIMARY t1      ALL     NULL    NULL    NULL    NULL    5       100.00  Using where
+1      PRIMARY <subquery2>     eq_ref  <auto_key>      <auto_key>      5       test.t1.a       1       100.00  NULL
+2      MATERIALIZED    t2      ALL     NULL    NULL    NULL    NULL    5       100.00  Using where
+3      DEPENDENT SUBQUERY      t3      ALL     NULL    NULL    NULL    NULL    5       100.00  Using where
+Warnings:
+Note   1003    /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t` `t1` semi join (`test`.`t` `t2`) where ((`<subquery2>`.`a` = `test`.`t1`.`a`) and (not(<in_optimizer>(concat(`test`.`t2`.`a`,''),<exists>(/* select#3 */ select 1 from `test`.`t` `t3` where ((`test`.`t3`.`b` = 1) and <if>(outer_field_is_not_null, ((<cache>(concat(`test`.`t2`.`a`,'')) = `test`.`t3`.`a`) or isnull(`test`.`t3`.`a`)), true)) having <if>(outer_field_is_not_null, <is_not_null_test>(`test`.`t3`.`a`), true))))))
+SELECT *
+FROM t AS t1
+WHERE t1.a IN (SELECT t2.a
+FROM t AS t2
+WHERE CONCAT(t2.a,'') NOT IN (SELECT t3.a
+FROM t AS t3
+WHERE t3.b=1));
+a      b
+DROP TABLE t;
 set optimizer_switch=default;
 set optimizer_switch=default;
index 53ea4f1f7f1d9ed669547466996e27594a683c59..3a29ba6caf1df2f33d0babbda0515375aa6230d3 100644 (file)
@@ -10771,5 +10771,102 @@ DROP TABLE t1,t2;
 # End of test for Bug#21184091
 set @@optimizer_switch=@old_opt_switch;
 # End of 5.6 tests
+# Bug#21139722: Assertion failed: !(used_tables() & ((table_map) 1) ...
+CREATE TABLE t1(a INTEGER) engine=innodb;
+CREATE TABLE t2(b INTEGER) engine=innodb;
+explain SELECT 1
+FROM (SELECT 1 IN (SELECT 1
+FROM t1
+WHERE (SELECT 1 FROM t2 HAVING b) NOT IN (SELECT 1 FROM t2)
+)
+FROM t2
+) AS z;
+id     select_type     table   type    possible_keys   key     key_len ref     rows    Extra
+1      PRIMARY <derived2>      ALL     NULL    NULL    NULL    NULL    2       NULL
+2      DERIVED t2      ALL     NULL    NULL    NULL    NULL    1       NULL
+3      DEPENDENT SUBQUERY      t1      ALL     NULL    NULL    NULL    NULL    1       Using where
+5      DEPENDENT SUBQUERY      t2      ALL     NULL    NULL    NULL    NULL    1       Using where
+4      DEPENDENT SUBQUERY      t2      ALL     NULL    NULL    NULL    NULL    1       NULL
+SELECT 1
+FROM (SELECT 1 IN (SELECT 1
+FROM t1
+WHERE (SELECT 1 FROM t2 HAVING b) NOT IN (SELECT 1 FROM t2)
+)
+FROM t2
+) AS z;
+1
+DROP TABLE t1, t2;
+CREATE TABLE t1(a INTEGER) engine=innodb;
+explain SELECT (SELECT a
+FROM t1 AS t2
+WHERE a IN (SELECT t1.a+t2.a
+FROM t1 AS t3))
+FROM t1 AS t1;
+id     select_type     table   type    possible_keys   key     key_len ref     rows    Extra
+1      PRIMARY t1      ALL     NULL    NULL    NULL    NULL    1       NULL
+2      DEPENDENT SUBQUERY      t2      ALL     NULL    NULL    NULL    NULL    1       Using where
+2      DEPENDENT SUBQUERY      t3      ALL     NULL    NULL    NULL    NULL    1       Start temporary; End temporary
+SELECT (SELECT a
+FROM t1 AS t2
+WHERE a IN (SELECT t1.a+t2.a
+FROM t1 AS t3))
+FROM t1 AS t1;
+(SELECT a
+FROM t1 AS t2
+WHERE a IN (SELECT t1.a+t2.a
+FROM t1 AS t3))
+DROP TABLE t1;
+# End of test for Bug#21139722
+#
+# Bug#21139402 ASSERTION FAILED: LENGTH > 0 && KEYPARTS != 0, CRASH IN JOIN::OPTIMIZE_KEYUSE
+#
+CREATE TABLE t1 (a INT, b INT, PRIMARY KEY(a));
+CREATE TABLE t2 (c INT PRIMARY KEY);
+EXPLAIN SELECT 1
+FROM t1
+WHERE 1 IN (SELECT (c IS NULL) IN (SELECT a
+FROM t1
+WHERE b)
+FROM t2);
+id     select_type     table   type    possible_keys   key     key_len ref     rows    Extra
+1      PRIMARY NULL    NULL    NULL    NULL    NULL    NULL    NULL    Impossible WHERE noticed after reading const tables
+3      DEPENDENT SUBQUERY      NULL    NULL    NULL    NULL    NULL    NULL    NULL    Impossible WHERE noticed after reading const tables
+SELECT 1
+FROM t1
+WHERE 1 IN (SELECT (c IS NULL) IN (SELECT a
+FROM t1
+WHERE b)
+FROM t2);
+1
+DROP TABLE t1,t2;
+#
+# Bug #22305361: QUERY WITH MATERIALIZED TABLE RETURNS INCORRECT
+#                RESULTS IN 5.6
+#
+CREATE TABLE t(a INT,b INT);
+INSERT INTO t VALUES (1,0),(1,0),(1,0),(1,0),(1,1);
+EXPLAIN extended SELECT *
+FROM t AS t1
+WHERE t1.a IN (SELECT t2.a
+FROM t AS t2
+WHERE CONCAT(t2.a,'') NOT IN (SELECT t3.a
+FROM t AS t3
+WHERE t3.b=1));
+id     select_type     table   type    possible_keys   key     key_len ref     rows    filtered        Extra
+1      PRIMARY t1      ALL     NULL    NULL    NULL    NULL    5       100.00  Using where
+1      PRIMARY <subquery2>     eq_ref  <auto_key>      <auto_key>      5       test.t1.a       1       100.00  NULL
+2      MATERIALIZED    t2      ALL     NULL    NULL    NULL    NULL    5       100.00  Using where
+3      DEPENDENT SUBQUERY      t3      ALL     NULL    NULL    NULL    NULL    5       100.00  Using where
+Warnings:
+Note   1003    /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t` `t1` semi join (`test`.`t` `t2`) where ((`<subquery2>`.`a` = `test`.`t1`.`a`) and (not(<in_optimizer>(concat(`test`.`t2`.`a`,''),<exists>(/* select#3 */ select 1 from `test`.`t` `t3` where ((`test`.`t3`.`b` = 1) and <if>(outer_field_is_not_null, ((<cache>(concat(`test`.`t2`.`a`,'')) = `test`.`t3`.`a`) or isnull(`test`.`t3`.`a`)), true)) having <if>(outer_field_is_not_null, <is_not_null_test>(`test`.`t3`.`a`), true))))))
+SELECT *
+FROM t AS t1
+WHERE t1.a IN (SELECT t2.a
+FROM t AS t2
+WHERE CONCAT(t2.a,'') NOT IN (SELECT t3.a
+FROM t AS t3
+WHERE t3.b=1));
+a      b
+DROP TABLE t;
 set optimizer_switch=default;
 set optimizer_switch=default;
index d7d4d0f5c979d63e1476d7529d2c5dc8dce413c5..735cc0f1cae3aeab2bcb6618ff537cb504fd2863 100644 (file)
@@ -10788,5 +10788,102 @@ DROP TABLE t1,t2;
 # End of test for Bug#21184091
 set @@optimizer_switch=@old_opt_switch;
 # End of 5.6 tests
+# Bug#21139722: Assertion failed: !(used_tables() & ((table_map) 1) ...
+CREATE TABLE t1(a INTEGER) engine=innodb;
+CREATE TABLE t2(b INTEGER) engine=innodb;
+explain SELECT 1
+FROM (SELECT 1 IN (SELECT 1
+FROM t1
+WHERE (SELECT 1 FROM t2 HAVING b) NOT IN (SELECT 1 FROM t2)
+)
+FROM t2
+) AS z;
+id     select_type     table   type    possible_keys   key     key_len ref     rows    Extra
+1      PRIMARY <derived2>      ALL     NULL    NULL    NULL    NULL    2       NULL
+2      DERIVED t2      ALL     NULL    NULL    NULL    NULL    1       NULL
+3      DEPENDENT SUBQUERY      t1      ALL     NULL    NULL    NULL    NULL    1       Using where
+5      DEPENDENT SUBQUERY      t2      ALL     NULL    NULL    NULL    NULL    1       Using where
+4      DEPENDENT SUBQUERY      t2      ALL     NULL    NULL    NULL    NULL    1       NULL
+SELECT 1
+FROM (SELECT 1 IN (SELECT 1
+FROM t1
+WHERE (SELECT 1 FROM t2 HAVING b) NOT IN (SELECT 1 FROM t2)
+)
+FROM t2
+) AS z;
+1
+DROP TABLE t1, t2;
+CREATE TABLE t1(a INTEGER) engine=innodb;
+explain SELECT (SELECT a
+FROM t1 AS t2
+WHERE a IN (SELECT t1.a+t2.a
+FROM t1 AS t3))
+FROM t1 AS t1;
+id     select_type     table   type    possible_keys   key     key_len ref     rows    Extra
+1      PRIMARY t1      ALL     NULL    NULL    NULL    NULL    1       NULL
+2      DEPENDENT SUBQUERY      t2      ALL     NULL    NULL    NULL    NULL    1       Using where; Start temporary
+2      DEPENDENT SUBQUERY      t3      ALL     NULL    NULL    NULL    NULL    1       End temporary; Using join buffer (Block Nested Loop)
+SELECT (SELECT a
+FROM t1 AS t2
+WHERE a IN (SELECT t1.a+t2.a
+FROM t1 AS t3))
+FROM t1 AS t1;
+(SELECT a
+FROM t1 AS t2
+WHERE a IN (SELECT t1.a+t2.a
+FROM t1 AS t3))
+DROP TABLE t1;
+# End of test for Bug#21139722
+#
+# Bug#21139402 ASSERTION FAILED: LENGTH > 0 && KEYPARTS != 0, CRASH IN JOIN::OPTIMIZE_KEYUSE
+#
+CREATE TABLE t1 (a INT, b INT, PRIMARY KEY(a));
+CREATE TABLE t2 (c INT PRIMARY KEY);
+EXPLAIN SELECT 1
+FROM t1
+WHERE 1 IN (SELECT (c IS NULL) IN (SELECT a
+FROM t1
+WHERE b)
+FROM t2);
+id     select_type     table   type    possible_keys   key     key_len ref     rows    Extra
+1      PRIMARY NULL    NULL    NULL    NULL    NULL    NULL    NULL    Impossible WHERE noticed after reading const tables
+3      DEPENDENT SUBQUERY      NULL    NULL    NULL    NULL    NULL    NULL    NULL    Impossible WHERE noticed after reading const tables
+SELECT 1
+FROM t1
+WHERE 1 IN (SELECT (c IS NULL) IN (SELECT a
+FROM t1
+WHERE b)
+FROM t2);
+1
+DROP TABLE t1,t2;
+#
+# Bug #22305361: QUERY WITH MATERIALIZED TABLE RETURNS INCORRECT
+#                RESULTS IN 5.6
+#
+CREATE TABLE t(a INT,b INT);
+INSERT INTO t VALUES (1,0),(1,0),(1,0),(1,0),(1,1);
+EXPLAIN extended SELECT *
+FROM t AS t1
+WHERE t1.a IN (SELECT t2.a
+FROM t AS t2
+WHERE CONCAT(t2.a,'') NOT IN (SELECT t3.a
+FROM t AS t3
+WHERE t3.b=1));
+id     select_type     table   type    possible_keys   key     key_len ref     rows    filtered        Extra
+1      PRIMARY t1      ALL     NULL    NULL    NULL    NULL    5       100.00  Using where
+1      PRIMARY <subquery2>     eq_ref  <auto_key>      <auto_key>      5       test.t1.a       1       100.00  NULL
+2      MATERIALIZED    t2      ALL     NULL    NULL    NULL    NULL    5       100.00  Using where
+3      DEPENDENT SUBQUERY      t3      ALL     NULL    NULL    NULL    NULL    5       100.00  Using where
+Warnings:
+Note   1003    /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t` `t1` semi join (`test`.`t` `t2`) where ((`<subquery2>`.`a` = `test`.`t1`.`a`) and (not(<in_optimizer>(concat(`test`.`t2`.`a`,''),<exists>(/* select#3 */ select 1 from `test`.`t` `t3` where ((`test`.`t3`.`b` = 1) and <if>(outer_field_is_not_null, ((<cache>(concat(`test`.`t2`.`a`,'')) = `test`.`t3`.`a`) or isnull(`test`.`t3`.`a`)), true)) having <if>(outer_field_is_not_null, <is_not_null_test>(`test`.`t3`.`a`), true))))))
+SELECT *
+FROM t AS t1
+WHERE t1.a IN (SELECT t2.a
+FROM t AS t2
+WHERE CONCAT(t2.a,'') NOT IN (SELECT t3.a
+FROM t AS t3
+WHERE t3.b=1));
+a      b
+DROP TABLE t;
 set optimizer_switch=default;
 set optimizer_switch=default;
index 46aa563bfdeeb98e43f2255d5ecfd65a9d1dde0e..a52aa4ea3ccc6bbce864a5bbc3323f59ba40081a 100644 (file)
@@ -10542,4 +10542,101 @@ DROP TABLE t1,t2;
 # End of test for Bug#21184091
 set @@optimizer_switch=@old_opt_switch;
 # End of 5.6 tests
+# Bug#21139722: Assertion failed: !(used_tables() & ((table_map) 1) ...
+CREATE TABLE t1(a INTEGER) engine=innodb;
+CREATE TABLE t2(b INTEGER) engine=innodb;
+explain SELECT 1
+FROM (SELECT 1 IN (SELECT 1
+FROM t1
+WHERE (SELECT 1 FROM t2 HAVING b) NOT IN (SELECT 1 FROM t2)
+)
+FROM t2
+) AS z;
+id     select_type     table   type    possible_keys   key     key_len ref     rows    Extra
+1      PRIMARY <derived2>      ALL     NULL    NULL    NULL    NULL    2       NULL
+2      DERIVED t2      ALL     NULL    NULL    NULL    NULL    1       NULL
+3      DEPENDENT SUBQUERY      t1      ALL     NULL    NULL    NULL    NULL    1       Using where
+5      DEPENDENT SUBQUERY      t2      ALL     NULL    NULL    NULL    NULL    1       Using where
+4      DEPENDENT SUBQUERY      t2      ALL     NULL    NULL    NULL    NULL    1       NULL
+SELECT 1
+FROM (SELECT 1 IN (SELECT 1
+FROM t1
+WHERE (SELECT 1 FROM t2 HAVING b) NOT IN (SELECT 1 FROM t2)
+)
+FROM t2
+) AS z;
+1
+DROP TABLE t1, t2;
+CREATE TABLE t1(a INTEGER) engine=innodb;
+explain SELECT (SELECT a
+FROM t1 AS t2
+WHERE a IN (SELECT t1.a+t2.a
+FROM t1 AS t3))
+FROM t1 AS t1;
+id     select_type     table   type    possible_keys   key     key_len ref     rows    Extra
+1      PRIMARY t1      ALL     NULL    NULL    NULL    NULL    1       NULL
+2      DEPENDENT SUBQUERY      t2      ALL     NULL    NULL    NULL    NULL    1       Using where
+3      DEPENDENT SUBQUERY      t3      ALL     NULL    NULL    NULL    NULL    1       Using where
+SELECT (SELECT a
+FROM t1 AS t2
+WHERE a IN (SELECT t1.a+t2.a
+FROM t1 AS t3))
+FROM t1 AS t1;
+(SELECT a
+FROM t1 AS t2
+WHERE a IN (SELECT t1.a+t2.a
+FROM t1 AS t3))
+DROP TABLE t1;
+# End of test for Bug#21139722
+#
+# Bug#21139402 ASSERTION FAILED: LENGTH > 0 && KEYPARTS != 0, CRASH IN JOIN::OPTIMIZE_KEYUSE
+#
+CREATE TABLE t1 (a INT, b INT, PRIMARY KEY(a));
+CREATE TABLE t2 (c INT PRIMARY KEY);
+EXPLAIN SELECT 1
+FROM t1
+WHERE 1 IN (SELECT (c IS NULL) IN (SELECT a
+FROM t1
+WHERE b)
+FROM t2);
+id     select_type     table   type    possible_keys   key     key_len ref     rows    Extra
+1      PRIMARY NULL    NULL    NULL    NULL    NULL    NULL    NULL    Impossible WHERE noticed after reading const tables
+2      DEPENDENT SUBQUERY      NULL    NULL    NULL    NULL    NULL    NULL    NULL    Impossible WHERE noticed after reading const tables
+3      DEPENDENT SUBQUERY      NULL    NULL    NULL    NULL    NULL    NULL    NULL    Impossible WHERE noticed after reading const tables
+SELECT 1
+FROM t1
+WHERE 1 IN (SELECT (c IS NULL) IN (SELECT a
+FROM t1
+WHERE b)
+FROM t2);
+1
+DROP TABLE t1,t2;
+#
+# Bug #22305361: QUERY WITH MATERIALIZED TABLE RETURNS INCORRECT
+#                RESULTS IN 5.6
+#
+CREATE TABLE t(a INT,b INT);
+INSERT INTO t VALUES (1,0),(1,0),(1,0),(1,0),(1,1);
+EXPLAIN extended SELECT *
+FROM t AS t1
+WHERE t1.a IN (SELECT t2.a
+FROM t AS t2
+WHERE CONCAT(t2.a,'') NOT IN (SELECT t3.a
+FROM t AS t3
+WHERE t3.b=1));
+id     select_type     table   type    possible_keys   key     key_len ref     rows    filtered        Extra
+1      PRIMARY t1      ALL     NULL    NULL    NULL    NULL    5       100.00  Using where
+2      SUBQUERY        t2      ALL     NULL    NULL    NULL    NULL    5       100.00  Using where
+3      DEPENDENT SUBQUERY      t3      ALL     NULL    NULL    NULL    NULL    5       100.00  Using where
+Warnings:
+Note   1003    /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t` `t1` where <in_optimizer>(`test`.`t1`.`a`,`test`.`t1`.`a` in ( <materialize> (/* select#2 */ select `test`.`t2`.`a` from `test`.`t` `t2` where (not(<in_optimizer>(concat(`test`.`t2`.`a`,''),<exists>(/* select#3 */ select 1 from `test`.`t` `t3` where ((`test`.`t3`.`b` = 1) and <if>(outer_field_is_not_null, ((<cache>(concat(`test`.`t2`.`a`,'')) = `test`.`t3`.`a`) or isnull(`test`.`t3`.`a`)), true)) having <if>(outer_field_is_not_null, <is_not_null_test>(`test`.`t3`.`a`), true))))) ), <primary_index_lookup>(`test`.`t1`.`a` in <temporary table> on <auto_key> where ((`test`.`t1`.`a` = `materialized-subquery`.`a`)))))
+SELECT *
+FROM t AS t1
+WHERE t1.a IN (SELECT t2.a
+FROM t AS t2
+WHERE CONCAT(t2.a,'') NOT IN (SELECT t3.a
+FROM t AS t3
+WHERE t3.b=1));
+a      b
+DROP TABLE t;
 set optimizer_switch=default;
index 90d4a19c25e788cb490fdedec819fdad0acb06f7..68bb6f8e5633f1cb70c0bac2b1209808281108de 100644 (file)
@@ -10551,4 +10551,101 @@ DROP TABLE t1,t2;
 # End of test for Bug#21184091
 set @@optimizer_switch=@old_opt_switch;
 # End of 5.6 tests
+# Bug#21139722: Assertion failed: !(used_tables() & ((table_map) 1) ...
+CREATE TABLE t1(a INTEGER) engine=innodb;
+CREATE TABLE t2(b INTEGER) engine=innodb;
+explain SELECT 1
+FROM (SELECT 1 IN (SELECT 1
+FROM t1
+WHERE (SELECT 1 FROM t2 HAVING b) NOT IN (SELECT 1 FROM t2)
+)
+FROM t2
+) AS z;
+id     select_type     table   type    possible_keys   key     key_len ref     rows    Extra
+1      PRIMARY <derived2>      ALL     NULL    NULL    NULL    NULL    2       NULL
+2      DERIVED t2      ALL     NULL    NULL    NULL    NULL    1       NULL
+3      DEPENDENT SUBQUERY      t1      ALL     NULL    NULL    NULL    NULL    1       Using where
+5      DEPENDENT SUBQUERY      t2      ALL     NULL    NULL    NULL    NULL    1       Using where
+4      DEPENDENT SUBQUERY      t2      ALL     NULL    NULL    NULL    NULL    1       NULL
+SELECT 1
+FROM (SELECT 1 IN (SELECT 1
+FROM t1
+WHERE (SELECT 1 FROM t2 HAVING b) NOT IN (SELECT 1 FROM t2)
+)
+FROM t2
+) AS z;
+1
+DROP TABLE t1, t2;
+CREATE TABLE t1(a INTEGER) engine=innodb;
+explain SELECT (SELECT a
+FROM t1 AS t2
+WHERE a IN (SELECT t1.a+t2.a
+FROM t1 AS t3))
+FROM t1 AS t1;
+id     select_type     table   type    possible_keys   key     key_len ref     rows    Extra
+1      PRIMARY t1      ALL     NULL    NULL    NULL    NULL    1       NULL
+2      DEPENDENT SUBQUERY      t2      ALL     NULL    NULL    NULL    NULL    1       Using where
+3      DEPENDENT SUBQUERY      t3      ALL     NULL    NULL    NULL    NULL    1       Using where
+SELECT (SELECT a
+FROM t1 AS t2
+WHERE a IN (SELECT t1.a+t2.a
+FROM t1 AS t3))
+FROM t1 AS t1;
+(SELECT a
+FROM t1 AS t2
+WHERE a IN (SELECT t1.a+t2.a
+FROM t1 AS t3))
+DROP TABLE t1;
+# End of test for Bug#21139722
+#
+# Bug#21139402 ASSERTION FAILED: LENGTH > 0 && KEYPARTS != 0, CRASH IN JOIN::OPTIMIZE_KEYUSE
+#
+CREATE TABLE t1 (a INT, b INT, PRIMARY KEY(a));
+CREATE TABLE t2 (c INT PRIMARY KEY);
+EXPLAIN SELECT 1
+FROM t1
+WHERE 1 IN (SELECT (c IS NULL) IN (SELECT a
+FROM t1
+WHERE b)
+FROM t2);
+id     select_type     table   type    possible_keys   key     key_len ref     rows    Extra
+1      PRIMARY NULL    NULL    NULL    NULL    NULL    NULL    NULL    Impossible WHERE noticed after reading const tables
+2      DEPENDENT SUBQUERY      NULL    NULL    NULL    NULL    NULL    NULL    NULL    Impossible WHERE noticed after reading const tables
+3      DEPENDENT SUBQUERY      NULL    NULL    NULL    NULL    NULL    NULL    NULL    Impossible WHERE noticed after reading const tables
+SELECT 1
+FROM t1
+WHERE 1 IN (SELECT (c IS NULL) IN (SELECT a
+FROM t1
+WHERE b)
+FROM t2);
+1
+DROP TABLE t1,t2;
+#
+# Bug #22305361: QUERY WITH MATERIALIZED TABLE RETURNS INCORRECT
+#                RESULTS IN 5.6
+#
+CREATE TABLE t(a INT,b INT);
+INSERT INTO t VALUES (1,0),(1,0),(1,0),(1,0),(1,1);
+EXPLAIN extended SELECT *
+FROM t AS t1
+WHERE t1.a IN (SELECT t2.a
+FROM t AS t2
+WHERE CONCAT(t2.a,'') NOT IN (SELECT t3.a
+FROM t AS t3
+WHERE t3.b=1));
+id     select_type     table   type    possible_keys   key     key_len ref     rows    filtered        Extra
+1      PRIMARY t1      ALL     NULL    NULL    NULL    NULL    5       100.00  Using where
+2      DEPENDENT SUBQUERY      t2      ALL     NULL    NULL    NULL    NULL    5       100.00  Using where
+3      DEPENDENT SUBQUERY      t3      ALL     NULL    NULL    NULL    NULL    5       100.00  Using where
+Warnings:
+Note   1003    /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t` `t1` where <in_optimizer>(`test`.`t1`.`a`,<exists>(/* select#2 */ select 1 from `test`.`t` `t2` where ((not(<in_optimizer>(concat(`test`.`t2`.`a`,''),<exists>(/* select#3 */ select 1 from `test`.`t` `t3` where ((`test`.`t3`.`b` = 1) and <if>(outer_field_is_not_null, ((<cache>(concat(`test`.`t2`.`a`,'')) = `test`.`t3`.`a`) or isnull(`test`.`t3`.`a`)), true)) having <if>(outer_field_is_not_null, <is_not_null_test>(`test`.`t3`.`a`), true))))) and (<cache>(`test`.`t1`.`a`) = `test`.`t2`.`a`))))
+SELECT *
+FROM t AS t1
+WHERE t1.a IN (SELECT t2.a
+FROM t AS t2
+WHERE CONCAT(t2.a,'') NOT IN (SELECT t3.a
+FROM t AS t3
+WHERE t3.b=1));
+a      b
+DROP TABLE t;
 set optimizer_switch=default;
index 27eb308f1d5e8f6b53939e44294f66a184019a1a..89b46eb2d9276e1315f71de3424ea70815a03875 100644 (file)
@@ -10552,5 +10552,102 @@ DROP TABLE t1,t2;
 # End of test for Bug#21184091
 set @@optimizer_switch=@old_opt_switch;
 # End of 5.6 tests
+# Bug#21139722: Assertion failed: !(used_tables() & ((table_map) 1) ...
+CREATE TABLE t1(a INTEGER) engine=innodb;
+CREATE TABLE t2(b INTEGER) engine=innodb;
+explain SELECT 1
+FROM (SELECT 1 IN (SELECT 1
+FROM t1
+WHERE (SELECT 1 FROM t2 HAVING b) NOT IN (SELECT 1 FROM t2)
+)
+FROM t2
+) AS z;
+id     select_type     table   type    possible_keys   key     key_len ref     rows    Extra
+1      PRIMARY <derived2>      ALL     NULL    NULL    NULL    NULL    2       NULL
+2      DERIVED t2      ALL     NULL    NULL    NULL    NULL    1       NULL
+3      DEPENDENT SUBQUERY      t1      ALL     NULL    NULL    NULL    NULL    1       Using where
+5      DEPENDENT SUBQUERY      t2      ALL     NULL    NULL    NULL    NULL    1       Using where
+4      DEPENDENT SUBQUERY      t2      ALL     NULL    NULL    NULL    NULL    1       NULL
+SELECT 1
+FROM (SELECT 1 IN (SELECT 1
+FROM t1
+WHERE (SELECT 1 FROM t2 HAVING b) NOT IN (SELECT 1 FROM t2)
+)
+FROM t2
+) AS z;
+1
+DROP TABLE t1, t2;
+CREATE TABLE t1(a INTEGER) engine=innodb;
+explain SELECT (SELECT a
+FROM t1 AS t2
+WHERE a IN (SELECT t1.a+t2.a
+FROM t1 AS t3))
+FROM t1 AS t1;
+id     select_type     table   type    possible_keys   key     key_len ref     rows    Extra
+1      PRIMARY t1      ALL     NULL    NULL    NULL    NULL    1       NULL
+2      DEPENDENT SUBQUERY      t2      ALL     NULL    NULL    NULL    NULL    1       Using where
+3      DEPENDENT SUBQUERY      t3      ALL     NULL    NULL    NULL    NULL    1       Using where
+SELECT (SELECT a
+FROM t1 AS t2
+WHERE a IN (SELECT t1.a+t2.a
+FROM t1 AS t3))
+FROM t1 AS t1;
+(SELECT a
+FROM t1 AS t2
+WHERE a IN (SELECT t1.a+t2.a
+FROM t1 AS t3))
+DROP TABLE t1;
+# End of test for Bug#21139722
+#
+# Bug#21139402 ASSERTION FAILED: LENGTH > 0 && KEYPARTS != 0, CRASH IN JOIN::OPTIMIZE_KEYUSE
+#
+CREATE TABLE t1 (a INT, b INT, PRIMARY KEY(a));
+CREATE TABLE t2 (c INT PRIMARY KEY);
+EXPLAIN SELECT 1
+FROM t1
+WHERE 1 IN (SELECT (c IS NULL) IN (SELECT a
+FROM t1
+WHERE b)
+FROM t2);
+id     select_type     table   type    possible_keys   key     key_len ref     rows    Extra
+1      PRIMARY NULL    NULL    NULL    NULL    NULL    NULL    NULL    Impossible WHERE noticed after reading const tables
+2      DEPENDENT SUBQUERY      NULL    NULL    NULL    NULL    NULL    NULL    NULL    Impossible WHERE noticed after reading const tables
+3      DEPENDENT SUBQUERY      NULL    NULL    NULL    NULL    NULL    NULL    NULL    Impossible WHERE noticed after reading const tables
+SELECT 1
+FROM t1
+WHERE 1 IN (SELECT (c IS NULL) IN (SELECT a
+FROM t1
+WHERE b)
+FROM t2);
+1
+DROP TABLE t1,t2;
+#
+# Bug #22305361: QUERY WITH MATERIALIZED TABLE RETURNS INCORRECT
+#                RESULTS IN 5.6
+#
+CREATE TABLE t(a INT,b INT);
+INSERT INTO t VALUES (1,0),(1,0),(1,0),(1,0),(1,1);
+EXPLAIN extended SELECT *
+FROM t AS t1
+WHERE t1.a IN (SELECT t2.a
+FROM t AS t2
+WHERE CONCAT(t2.a,'') NOT IN (SELECT t3.a
+FROM t AS t3
+WHERE t3.b=1));
+id     select_type     table   type    possible_keys   key     key_len ref     rows    filtered        Extra
+1      PRIMARY t1      ALL     NULL    NULL    NULL    NULL    5       100.00  Using where
+2      DEPENDENT SUBQUERY      t2      ALL     NULL    NULL    NULL    NULL    5       100.00  Using where
+3      DEPENDENT SUBQUERY      t3      ALL     NULL    NULL    NULL    NULL    5       100.00  Using where
+Warnings:
+Note   1003    /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t` `t1` where <in_optimizer>(`test`.`t1`.`a`,<exists>(/* select#2 */ select 1 from `test`.`t` `t2` where ((not(<in_optimizer>(concat(`test`.`t2`.`a`,''),<exists>(/* select#3 */ select 1 from `test`.`t` `t3` where ((`test`.`t3`.`b` = 1) and <if>(outer_field_is_not_null, ((<cache>(concat(`test`.`t2`.`a`,'')) = `test`.`t3`.`a`) or isnull(`test`.`t3`.`a`)), true)) having <if>(outer_field_is_not_null, <is_not_null_test>(`test`.`t3`.`a`), true))))) and (<cache>(`test`.`t1`.`a`) = `test`.`t2`.`a`))))
+SELECT *
+FROM t AS t1
+WHERE t1.a IN (SELECT t2.a
+FROM t AS t2
+WHERE CONCAT(t2.a,'') NOT IN (SELECT t3.a
+FROM t AS t3
+WHERE t3.b=1));
+a      b
+DROP TABLE t;
 set optimizer_switch=default;
 set optimizer_switch=default;
index 217f7fb47f1fac8468aae99070b544aa00010625..96b56c8983423439d3ca226c5a728caf91468b6a 100644 (file)
@@ -10547,5 +10547,102 @@ DROP TABLE t1,t2;
 # End of test for Bug#21184091
 set @@optimizer_switch=@old_opt_switch;
 # End of 5.6 tests
+# Bug#21139722: Assertion failed: !(used_tables() & ((table_map) 1) ...
+CREATE TABLE t1(a INTEGER) engine=innodb;
+CREATE TABLE t2(b INTEGER) engine=innodb;
+explain SELECT 1
+FROM (SELECT 1 IN (SELECT 1
+FROM t1
+WHERE (SELECT 1 FROM t2 HAVING b) NOT IN (SELECT 1 FROM t2)
+)
+FROM t2
+) AS z;
+id     select_type     table   type    possible_keys   key     key_len ref     rows    Extra
+1      PRIMARY <derived2>      ALL     NULL    NULL    NULL    NULL    2       NULL
+2      DERIVED t2      ALL     NULL    NULL    NULL    NULL    1       NULL
+3      DEPENDENT SUBQUERY      t1      ALL     NULL    NULL    NULL    NULL    1       Using where
+5      DEPENDENT SUBQUERY      t2      ALL     NULL    NULL    NULL    NULL    1       Using where
+4      DEPENDENT SUBQUERY      t2      ALL     NULL    NULL    NULL    NULL    1       NULL
+SELECT 1
+FROM (SELECT 1 IN (SELECT 1
+FROM t1
+WHERE (SELECT 1 FROM t2 HAVING b) NOT IN (SELECT 1 FROM t2)
+)
+FROM t2
+) AS z;
+1
+DROP TABLE t1, t2;
+CREATE TABLE t1(a INTEGER) engine=innodb;
+explain SELECT (SELECT a
+FROM t1 AS t2
+WHERE a IN (SELECT t1.a+t2.a
+FROM t1 AS t3))
+FROM t1 AS t1;
+id     select_type     table   type    possible_keys   key     key_len ref     rows    Extra
+1      PRIMARY t1      ALL     NULL    NULL    NULL    NULL    1       NULL
+2      DEPENDENT SUBQUERY      t2      ALL     NULL    NULL    NULL    NULL    1       Using where
+3      DEPENDENT SUBQUERY      t3      ALL     NULL    NULL    NULL    NULL    1       Using where
+SELECT (SELECT a
+FROM t1 AS t2
+WHERE a IN (SELECT t1.a+t2.a
+FROM t1 AS t3))
+FROM t1 AS t1;
+(SELECT a
+FROM t1 AS t2
+WHERE a IN (SELECT t1.a+t2.a
+FROM t1 AS t3))
+DROP TABLE t1;
+# End of test for Bug#21139722
+#
+# Bug#21139402 ASSERTION FAILED: LENGTH > 0 && KEYPARTS != 0, CRASH IN JOIN::OPTIMIZE_KEYUSE
+#
+CREATE TABLE t1 (a INT, b INT, PRIMARY KEY(a));
+CREATE TABLE t2 (c INT PRIMARY KEY);
+EXPLAIN SELECT 1
+FROM t1
+WHERE 1 IN (SELECT (c IS NULL) IN (SELECT a
+FROM t1
+WHERE b)
+FROM t2);
+id     select_type     table   type    possible_keys   key     key_len ref     rows    Extra
+1      PRIMARY NULL    NULL    NULL    NULL    NULL    NULL    NULL    Impossible WHERE noticed after reading const tables
+2      DEPENDENT SUBQUERY      NULL    NULL    NULL    NULL    NULL    NULL    NULL    Impossible WHERE noticed after reading const tables
+3      DEPENDENT SUBQUERY      NULL    NULL    NULL    NULL    NULL    NULL    NULL    Impossible WHERE noticed after reading const tables
+SELECT 1
+FROM t1
+WHERE 1 IN (SELECT (c IS NULL) IN (SELECT a
+FROM t1
+WHERE b)
+FROM t2);
+1
+DROP TABLE t1,t2;
+#
+# Bug #22305361: QUERY WITH MATERIALIZED TABLE RETURNS INCORRECT
+#                RESULTS IN 5.6
+#
+CREATE TABLE t(a INT,b INT);
+INSERT INTO t VALUES (1,0),(1,0),(1,0),(1,0),(1,1);
+EXPLAIN extended SELECT *
+FROM t AS t1
+WHERE t1.a IN (SELECT t2.a
+FROM t AS t2
+WHERE CONCAT(t2.a,'') NOT IN (SELECT t3.a
+FROM t AS t3
+WHERE t3.b=1));
+id     select_type     table   type    possible_keys   key     key_len ref     rows    filtered        Extra
+1      PRIMARY t1      ALL     NULL    NULL    NULL    NULL    5       100.00  Using where
+2      DEPENDENT SUBQUERY      t2      ALL     NULL    NULL    NULL    NULL    5       100.00  Using where
+3      DEPENDENT SUBQUERY      t3      ALL     NULL    NULL    NULL    NULL    5       100.00  Using where
+Warnings:
+Note   1003    /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t` `t1` where <in_optimizer>(`test`.`t1`.`a`,<exists>(/* select#2 */ select 1 from `test`.`t` `t2` where ((not(<in_optimizer>(concat(`test`.`t2`.`a`,''),<exists>(/* select#3 */ select 1 from `test`.`t` `t3` where ((`test`.`t3`.`b` = 1) and <if>(outer_field_is_not_null, ((<cache>(concat(`test`.`t2`.`a`,'')) = `test`.`t3`.`a`) or isnull(`test`.`t3`.`a`)), true)) having <if>(outer_field_is_not_null, <is_not_null_test>(`test`.`t3`.`a`), true))))) and (<cache>(`test`.`t1`.`a`) = `test`.`t2`.`a`))))
+SELECT *
+FROM t AS t1
+WHERE t1.a IN (SELECT t2.a
+FROM t AS t2
+WHERE CONCAT(t2.a,'') NOT IN (SELECT t3.a
+FROM t AS t3
+WHERE t3.b=1));
+a      b
+DROP TABLE t;
 set optimizer_switch=default;
 set optimizer_switch=default;
index 6936ca24f43f1ce14ff03855668bbc67425921a3..8a2ba739f2039752cb792e5d9c08316e90ee1241 100644 (file)
@@ -10553,5 +10553,102 @@ DROP TABLE t1,t2;
 # End of test for Bug#21184091
 set @@optimizer_switch=@old_opt_switch;
 # End of 5.6 tests
+# Bug#21139722: Assertion failed: !(used_tables() & ((table_map) 1) ...
+CREATE TABLE t1(a INTEGER) engine=innodb;
+CREATE TABLE t2(b INTEGER) engine=innodb;
+explain SELECT 1
+FROM (SELECT 1 IN (SELECT 1
+FROM t1
+WHERE (SELECT 1 FROM t2 HAVING b) NOT IN (SELECT 1 FROM t2)
+)
+FROM t2
+) AS z;
+id     select_type     table   type    possible_keys   key     key_len ref     rows    Extra
+1      PRIMARY <derived2>      ALL     NULL    NULL    NULL    NULL    2       NULL
+2      DERIVED t2      ALL     NULL    NULL    NULL    NULL    1       NULL
+3      DEPENDENT SUBQUERY      t1      ALL     NULL    NULL    NULL    NULL    1       Using where
+5      DEPENDENT SUBQUERY      t2      ALL     NULL    NULL    NULL    NULL    1       Using where
+4      DEPENDENT SUBQUERY      t2      ALL     NULL    NULL    NULL    NULL    1       NULL
+SELECT 1
+FROM (SELECT 1 IN (SELECT 1
+FROM t1
+WHERE (SELECT 1 FROM t2 HAVING b) NOT IN (SELECT 1 FROM t2)
+)
+FROM t2
+) AS z;
+1
+DROP TABLE t1, t2;
+CREATE TABLE t1(a INTEGER) engine=innodb;
+explain SELECT (SELECT a
+FROM t1 AS t2
+WHERE a IN (SELECT t1.a+t2.a
+FROM t1 AS t3))
+FROM t1 AS t1;
+id     select_type     table   type    possible_keys   key     key_len ref     rows    Extra
+1      PRIMARY t1      ALL     NULL    NULL    NULL    NULL    1       NULL
+2      DEPENDENT SUBQUERY      t2      ALL     NULL    NULL    NULL    NULL    1       Using where
+3      DEPENDENT SUBQUERY      t3      ALL     NULL    NULL    NULL    NULL    1       Using where
+SELECT (SELECT a
+FROM t1 AS t2
+WHERE a IN (SELECT t1.a+t2.a
+FROM t1 AS t3))
+FROM t1 AS t1;
+(SELECT a
+FROM t1 AS t2
+WHERE a IN (SELECT t1.a+t2.a
+FROM t1 AS t3))
+DROP TABLE t1;
+# End of test for Bug#21139722
+#
+# Bug#21139402 ASSERTION FAILED: LENGTH > 0 && KEYPARTS != 0, CRASH IN JOIN::OPTIMIZE_KEYUSE
+#
+CREATE TABLE t1 (a INT, b INT, PRIMARY KEY(a));
+CREATE TABLE t2 (c INT PRIMARY KEY);
+EXPLAIN SELECT 1
+FROM t1
+WHERE 1 IN (SELECT (c IS NULL) IN (SELECT a
+FROM t1
+WHERE b)
+FROM t2);
+id     select_type     table   type    possible_keys   key     key_len ref     rows    Extra
+1      PRIMARY NULL    NULL    NULL    NULL    NULL    NULL    NULL    Impossible WHERE noticed after reading const tables
+2      DEPENDENT SUBQUERY      NULL    NULL    NULL    NULL    NULL    NULL    NULL    Impossible WHERE noticed after reading const tables
+3      DEPENDENT SUBQUERY      NULL    NULL    NULL    NULL    NULL    NULL    NULL    Impossible WHERE noticed after reading const tables
+SELECT 1
+FROM t1
+WHERE 1 IN (SELECT (c IS NULL) IN (SELECT a
+FROM t1
+WHERE b)
+FROM t2);
+1
+DROP TABLE t1,t2;
+#
+# Bug #22305361: QUERY WITH MATERIALIZED TABLE RETURNS INCORRECT
+#                RESULTS IN 5.6
+#
+CREATE TABLE t(a INT,b INT);
+INSERT INTO t VALUES (1,0),(1,0),(1,0),(1,0),(1,1);
+EXPLAIN extended SELECT *
+FROM t AS t1
+WHERE t1.a IN (SELECT t2.a
+FROM t AS t2
+WHERE CONCAT(t2.a,'') NOT IN (SELECT t3.a
+FROM t AS t3
+WHERE t3.b=1));
+id     select_type     table   type    possible_keys   key     key_len ref     rows    filtered        Extra
+1      PRIMARY t1      ALL     NULL    NULL    NULL    NULL    5       100.00  Using where
+2      DEPENDENT SUBQUERY      t2      ALL     NULL    NULL    NULL    NULL    5       100.00  Using where
+3      DEPENDENT SUBQUERY      t3      ALL     NULL    NULL    NULL    NULL    5       100.00  Using where
+Warnings:
+Note   1003    /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t` `t1` where <in_optimizer>(`test`.`t1`.`a`,<exists>(/* select#2 */ select 1 from `test`.`t` `t2` where ((not(<in_optimizer>(concat(`test`.`t2`.`a`,''),<exists>(/* select#3 */ select 1 from `test`.`t` `t3` where ((`test`.`t3`.`b` = 1) and <if>(outer_field_is_not_null, ((<cache>(concat(`test`.`t2`.`a`,'')) = `test`.`t3`.`a`) or isnull(`test`.`t3`.`a`)), true)) having <if>(outer_field_is_not_null, <is_not_null_test>(`test`.`t3`.`a`), true))))) and (<cache>(`test`.`t1`.`a`) = `test`.`t2`.`a`))))
+SELECT *
+FROM t AS t1
+WHERE t1.a IN (SELECT t2.a
+FROM t AS t2
+WHERE CONCAT(t2.a,'') NOT IN (SELECT t3.a
+FROM t AS t3
+WHERE t3.b=1));
+a      b
+DROP TABLE t;
 set optimizer_switch=default;
 set optimizer_switch=default;
diff --git a/mysql-wsrep-5.6/mysql-test/r/udf_services.result b/mysql-wsrep-5.6/mysql-test/r/udf_services.result
new file mode 100644 (file)
index 0000000..0ddbecd
--- /dev/null
@@ -0,0 +1,15 @@
+#
+# Bug #20085672: CRYPTIC ERROR WHEN FAILING TO UNLOAD A DYNAMIC LIBRARY
+#
+# Install the plugin
+INSTALL PLUGIN test_udf_services SONAME 'TESTUDFSERVICES';
+# Define the function
+CREATE FUNCTION test_udf_services_udf RETURNS INT
+SONAME "TESTUDFSERVICES";
+# Uninstall the plugin
+UNINSTALL PLUGIN test_udf_services;
+# Install the plugin again. Should not fail
+INSTALL PLUGIN test_udf_services SONAME 'TESTUDFSERVICES';
+# Cleanup
+DROP FUNCTION test_udf_services_udf;
+UNINSTALL PLUGIN test_udf_services;
index 532cecc7dba34ec68eb68cc972d0327f6d42903c..aa9581b68ac6b4dc8dfe9ff347aa89513ddc3bd2 100644 (file)
@@ -222,6 +222,18 @@ wait/synch/rwlock/validate/LOCK_dict_file
 # cleanup
 DROP USER 'user1'@'localhost', 'user2'@'localhost';
 SET @@global.validate_password_policy=DEFAULT;
+#
+# Bug#21616496: CREATE USER ACCEPTS PLUGIN AND PASSWORD HASH,
+#               BUT IGNORES THE PASSWORD HASH
+#
+CREATE USER 'user1'@'localhost' IDENTIFIED WITH 'mysql_native_password';
+ERROR HY000: Your password does not satisfy the current policy requirements
+CREATE USER 'user1'@'localhost' IDENTIFIED WITH 'mysql_old_password';
+ERROR HY000: Your password does not satisfy the current policy requirements
+CREATE USER 'user1'@'localhost' IDENTIFIED WITH 'mysql_native_password' AS '*0D3CED9BEC10A777AEC23CCC353A8C08A633045E';
+ERROR HY000: Your password does not satisfy the current policy requirements
+CREATE USER 'user1'@'localhost' IDENTIFIED WITH 'mysql_old_password' AS '*0D3CED9BEC10A777AEC23CCC353A8C08A633045E';
+ERROR HY000: Your password does not satisfy the current policy requirements
 # clean up after the test
 UNINSTALL PLUGIN validate_password;
 End of tests
diff --git a/mysql-wsrep-5.6/mysql-test/r/variables-win.result b/mysql-wsrep-5.6/mysql-test/r/variables-win.result
new file mode 100644 (file)
index 0000000..53f1354
--- /dev/null
@@ -0,0 +1,11 @@
+#
+# Bug #23747899: @@basedir sysvar value not normalized if set through
+#  the command line/ini file
+# There should be no slashes in @@basedir and just backslashes
+#   since it's normalized
+SELECT
+LOCATE('/', @@basedir) <> 0 AS have_slashes,
+LOCATE('\\', @@basedir) <> 0 AS have_backslashes;
+have_slashes   have_backslashes
+0      1
+End of the 5.6 tests
diff --git a/mysql-wsrep-5.6/mysql-test/suite/auth_sec/r/secure_file_priv_error.result b/mysql-wsrep-5.6/mysql-test/suite/auth_sec/r/secure_file_priv_error.result
new file mode 100644 (file)
index 0000000..680b5c3
--- /dev/null
@@ -0,0 +1,8 @@
+#-----------------------------------------------------------------------
+# Setup
+# Try to restart server with invalid value for --secure-file-priv
+# Search for : Failed to access directory for --secure-file-priv.
+# Search for : No such file or directory
+# Restart completed.
+# Restart
+#-----------------------------------------------------------------------
diff --git a/mysql-wsrep-5.6/mysql-test/suite/auth_sec/r/secure_file_priv_null.result b/mysql-wsrep-5.6/mysql-test/suite/auth_sec/r/secure_file_priv_null.result
new file mode 100644 (file)
index 0000000..e2a5102
--- /dev/null
@@ -0,0 +1,21 @@
+#-----------------------------------------------------------------------
+# Setup
+#-----------------------------------------------------------------------
+# Search for : --secure-file-priv is set to NULL. Operations
+#              related to importing and exporting data are
+#              disabled
+show variables like 'secure_file_priv';
+Variable_name  Value
+secure_file_priv       null
+use test;
+drop table if exists secure_file_priv_test_null;
+create table secure_file_priv_test_null(c1 int);
+insert into secure_file_priv_test_null values (1), (2), (3), (4);
+select * from secure_file_priv_test_null into outfile 'blah';
+ERROR HY000: The MySQL server is running with the --secure-file-priv option so it cannot execute this statement
+select * from secure_file_priv_test_null into outfile 'null/blah';
+ERROR HY000: The MySQL server is running with the --secure-file-priv option so it cannot execute this statement
+drop table secure_file_priv_test_null;
+#-----------------------------------------------------------------------
+# Clean-up
+#-----------------------------------------------------------------------
diff --git a/mysql-wsrep-5.6/mysql-test/suite/auth_sec/r/secure_file_priv_warnings.result b/mysql-wsrep-5.6/mysql-test/suite/auth_sec/r/secure_file_priv_warnings.result
new file mode 100644 (file)
index 0000000..3b80cbe
--- /dev/null
@@ -0,0 +1,17 @@
+#-----------------------------------------------------------------------
+# Setup
+#-----------------------------------------------------------------------
+# Search for : Insecure configuration for --secure-file-priv: Current
+#              value does not restrict location of generated files.
+#              Consider setting it to a valid, non-empty path.
+SHOW VARIABLES LIKE 'secure_file_priv';
+Variable_name  Value
+secure_file_priv       
+#-----------------------------------------------------------------------
+# Restart completed.
+# Search for : Insecure configuration for --secure-file-priv: Plugin
+#              directory is accessible through --secure-file-priv.
+#              Consider choosing a different directory.
+#-----------------------------------------------------------------------
+# Clean-up
+#-----------------------------------------------------------------------
diff --git a/mysql-wsrep-5.6/mysql-test/suite/auth_sec/r/secure_file_priv_warnings_not_win.result b/mysql-wsrep-5.6/mysql-test/suite/auth_sec/r/secure_file_priv_warnings_not_win.result
new file mode 100644 (file)
index 0000000..84e2f8a
--- /dev/null
@@ -0,0 +1,9 @@
+#-----------------------------------------------------------------------
+# Search for : Insecure configuration for --secure-file-priv: Data
+#              directory is accessible through --secure-file-priv.
+#              Consider choosing a different directory.
+#-----------------------------------------------------------------------
+# Search for : Insecure configuration for --secure-file-priv: Location
+#              is accessible to all OS users. Consider choosing a
+#              different directory.
+#-----------------------------------------------------------------------
diff --git a/mysql-wsrep-5.6/mysql-test/suite/auth_sec/r/secure_file_priv_warnings_win.result b/mysql-wsrep-5.6/mysql-test/suite/auth_sec/r/secure_file_priv_warnings_win.result
new file mode 100644 (file)
index 0000000..3beff6c
--- /dev/null
@@ -0,0 +1,8 @@
+#-----------------------------------------------------------------------
+# Test 2 : Restarting mysqld with :
+#          --secure-file-priv=MYSQLTEST_VARDIR/mysqld.1/Data
+# Restart completed.
+# Search for : Insecure configuration for --secure-file-priv: Data
+#              directory is accessible through --secure-file-priv.
+#              Consider choosing a different directory.
+#-----------------------------------------------------------------------
diff --git a/mysql-wsrep-5.6/mysql-test/suite/auth_sec/t/secure_file_priv_error.test b/mysql-wsrep-5.6/mysql-test/suite/auth_sec/t/secure_file_priv_error.test
new file mode 100644 (file)
index 0000000..8cea289
--- /dev/null
@@ -0,0 +1,43 @@
+--source include/no_valgrind_without_big.inc
+--source include/not_embedded.inc
+
+--echo #-----------------------------------------------------------------------
+--echo # Setup
+let restart_log= $MYSQLTEST_VARDIR/log/my_restart.err;
+let SEARCH_FILE= $restart_log;
+let $restart_file= $MYSQLTEST_VARDIR/tmp/mysqld.1.expect;
+
+--echo # Try to restart server with invalid value for --secure-file-priv
+--exec echo "wait" > $restart_file
+--shutdown_server
+--source include/wait_until_disconnected.inc
+
+--error 0,1
+--remove_file $restart_log
+# Following should fail
+--error 1
+--exec $MYSQLD_CMD --secure-file-priv=blahblahblah --loose-console > $restart_log 2>&1
+
+--echo # Search for : Failed to access directory for --secure-file-priv.
+let SEARCH_PATTERN= Failed to access directory for --secure-file-priv;
+--source include/search_pattern_in_file.inc
+
+--echo # Search for : No such file or directory
+let SEARCH_PATTERN= No such file or directory;
+--source include/search_pattern_in_file.inc
+
+--remove_file $restart_log
+
+--source include/wait_until_disconnected.inc
+# Dummy argument for restart
+--exec echo "restart: --ssl" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+--enable_reconnect
+--source include/wait_until_connected_again.inc
+--disable_reconnect
+--echo # Restart completed.
+
+--echo # Restart
+--disable_warnings
+--source include/force_restart.inc
+--enable_warnings
+--echo #-----------------------------------------------------------------------
diff --git a/mysql-wsrep-5.6/mysql-test/suite/auth_sec/t/secure_file_priv_null.test b/mysql-wsrep-5.6/mysql-test/suite/auth_sec/t/secure_file_priv_null.test
new file mode 100644 (file)
index 0000000..40cbd0f
--- /dev/null
@@ -0,0 +1,52 @@
+--source include/no_valgrind_without_big.inc
+--source include/not_embedded.inc
+
+--echo #-----------------------------------------------------------------------
+--echo # Setup
+let server_log= $MYSQLTEST_VARDIR/log/mysqld.1.err;
+let SEARCH_FILE= $server_log;
+let $restart_file= $MYSQLTEST_VARDIR/tmp/mysqld.1.expect;
+let $secure_file_priv_arg= \"null\";
+--echo #-----------------------------------------------------------------------
+
+--exec echo "wait" > $restart_file
+--shutdown_server
+--source include/wait_until_disconnected.inc
+--remove_file $server_log
+--exec echo "restart:--secure-file-priv=$secure_file_priv_arg" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+--enable_reconnect
+--source include/wait_until_connected_again.inc
+--disable_reconnect
+
+--echo # Search for : --secure-file-priv is set to NULL. Operations
+--echo #              related to importing and exporting data are
+--echo #              disabled
+let SEARCH_PATTERN= --secure-file-priv is set to NULL. Operations related to importing and exporting data are disabled;
+--source include/search_pattern_in_file.inc
+
+connect(test4_con,localhost,root,,,,,);
+show variables like 'secure_file_priv';
+
+use test;
+--disable_warnings
+drop table if exists secure_file_priv_test_null;
+--enable_warnings
+create table secure_file_priv_test_null(c1 int);
+insert into secure_file_priv_test_null values (1), (2), (3), (4);
+--error 1290
+select * from secure_file_priv_test_null into outfile 'blah';
+--error 1290
+select * from secure_file_priv_test_null into outfile 'null/blah';
+drop table secure_file_priv_test_null;
+
+connection default;
+disconnect test4_con;
+
+--echo #-----------------------------------------------------------------------
+
+--echo # Clean-up
+--disable_warnings
+--source include/force_restart.inc
+--enable_warnings
+
+--echo #-----------------------------------------------------------------------
diff --git a/mysql-wsrep-5.6/mysql-test/suite/auth_sec/t/secure_file_priv_warnings.test b/mysql-wsrep-5.6/mysql-test/suite/auth_sec/t/secure_file_priv_warnings.test
new file mode 100644 (file)
index 0000000..0e7513e
--- /dev/null
@@ -0,0 +1,57 @@
+--source include/no_valgrind_without_big.inc
+--source include/not_embedded.inc
+
+--echo #-----------------------------------------------------------------------
+--echo # Setup
+let server_log= $MYSQLTEST_VARDIR/log/mysqld.1.err;
+let SEARCH_FILE= $server_log;
+let $restart_file= $MYSQLTEST_VARDIR/tmp/mysqld.1.expect;
+let PLUGIN_DIR= $MYSQLTEST_VARDIR/tmp;
+let $secure_file_priv_arg=;
+--echo #-----------------------------------------------------------------------
+
+--exec echo "wait" > $restart_file
+--shutdown_server
+--source include/wait_until_disconnected.inc
+--remove_file $server_log
+--exec echo "restart:--secure-file-priv=$secure_file_priv_arg" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+--enable_reconnect
+--source include/wait_until_connected_again.inc
+--disable_reconnect
+
+--echo # Search for : Insecure configuration for --secure-file-priv: Current
+--echo #              value does not restrict location of generated files.
+--echo #              Consider setting it to a valid, non-empty path.
+let SEARCH_PATTERN= Insecure configuration for --secure-file-priv: Current value does not restrict location of generated files. Consider setting it to a valid, non-empty path.;
+--source include/search_pattern_in_file.inc
+
+# Must show empty string
+SHOW VARIABLES LIKE 'secure_file_priv';
+
+--echo #-----------------------------------------------------------------------
+
+let $restart_file= $MYSQLTEST_VARDIR/tmp/mysqld.1.expect;
+--exec echo "wait" > $restart_file
+--shutdown_server
+--source include/wait_until_disconnected.inc
+--remove_file $server_log
+--exec echo "restart:--plugin-dir=$PLUGIN_DIR --secure-file-priv=$PLUGIN_DIR" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+--enable_reconnect
+--source include/wait_until_connected_again.inc
+--disable_reconnect
+--echo # Restart completed.
+
+--echo # Search for : Insecure configuration for --secure-file-priv: Plugin
+--echo #              directory is accessible through --secure-file-priv.
+--echo #              Consider choosing a different directory.
+let SEARCH_PATTERN= Insecure configuration for --secure-file-priv: Plugin directory is accessible through --secure-file-priv. Consider choosing a different directory.;
+--source include/search_pattern_in_file.inc
+
+--echo #-----------------------------------------------------------------------
+
+--echo # Clean-up
+--disable_warnings
+--source include/force_restart.inc
+--enable_warnings
+
+--echo #-----------------------------------------------------------------------
diff --git a/mysql-wsrep-5.6/mysql-test/suite/auth_sec/t/secure_file_priv_warnings_not_win.test b/mysql-wsrep-5.6/mysql-test/suite/auth_sec/t/secure_file_priv_warnings_not_win.test
new file mode 100644 (file)
index 0000000..ec027d4
--- /dev/null
@@ -0,0 +1,24 @@
+--source include/no_valgrind_without_big.inc
+--source include/not_windows.inc
+--source include/not_embedded.inc
+
+let server_log= $MYSQLTEST_VARDIR/log/mysqld.1.err;
+let SEARCH_FILE= $server_log;
+
+--echo #-----------------------------------------------------------------------
+
+--echo # Search for : Insecure configuration for --secure-file-priv: Data
+--echo #              directory is accessible through --secure-file-priv.
+--echo #              Consider choosing a different directory.
+let SEARCH_PATTERN= Insecure configuration for --secure-file-priv: Data directory is accessible through --secure-file-priv. Consider choosing a different directory.;
+--source include/search_pattern_in_file.inc
+
+--echo #-----------------------------------------------------------------------
+
+--echo # Search for : Insecure configuration for --secure-file-priv: Location
+--echo #              is accessible to all OS users. Consider choosing a
+--echo #              different directory.
+let SEARCH_PATTERN= Insecure configuration for --secure-file-priv: Location is accessible to all OS users. Consider choosing a different directory.;
+--source include/search_pattern_in_file.inc
+
+--echo #-----------------------------------------------------------------------
diff --git a/mysql-wsrep-5.6/mysql-test/suite/auth_sec/t/secure_file_priv_warnings_win.test b/mysql-wsrep-5.6/mysql-test/suite/auth_sec/t/secure_file_priv_warnings_win.test
new file mode 100644 (file)
index 0000000..bb175fb
--- /dev/null
@@ -0,0 +1,35 @@
+--source include/no_valgrind_without_big.inc
+--source include/windows.inc
+--source include/not_embedded.inc
+
+let server_log= $MYSQLTEST_VARDIR/log/mysqld.1.err;
+let SEARCH_FILE= $server_log;
+
+--echo #-----------------------------------------------------------------------
+
+--echo # Test 2 : Restarting mysqld with :
+--echo #          --secure-file-priv=MYSQLTEST_VARDIR/mysqld.1/Data
+
+let $restart_file= $MYSQLTEST_VARDIR/tmp/mysqld.1.expect;
+--exec echo "wait" > $restart_file
+--shutdown_server
+--source include/wait_until_disconnected.inc
+--error 0,1
+--remove_file $server_log
+--exec echo "restart: --secure-file-priv=$MYSQLTEST_VARDIR/mysqld.1/Data" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+--enable_reconnect
+--source include/wait_until_connected_again.inc
+--disable_reconnect
+--echo # Restart completed.
+
+--echo # Search for : Insecure configuration for --secure-file-priv: Data
+--echo #              directory is accessible through --secure-file-priv.
+--echo #              Consider choosing a different directory.
+let SEARCH_PATTERN= Insecure configuration for --secure-file-priv: Data directory is accessible through --secure-file-priv. Consider choosing a different directory.;
+--source include/search_pattern_in_file.inc
+
+--disable_warnings
+--source include/force_restart.inc
+--enable_warnings
+
+--echo #-----------------------------------------------------------------------
diff --git a/mysql-wsrep-5.6/mysql-test/suite/binlog/r/binlog_dmls_on_tmp_tables_readonly.result b/mysql-wsrep-5.6/mysql-test/suite/binlog/r/binlog_dmls_on_tmp_tables_readonly.result
new file mode 100644 (file)
index 0000000..1dfac08
--- /dev/null
@@ -0,0 +1,58 @@
+DROP TABLE IF EXISTS t1 ;
+# READ_ONLY does nothing to SUPER users
+# so we use a non-SUPER one:
+GRANT CREATE, SELECT, DROP ON *.* TO test@localhost;
+connect  con1,localhost,test,,test;
+connection default;
+SET GLOBAL READ_ONLY=1;
+connection con1;
+CREATE TEMPORARY TABLE t1 (a INT) ENGINE=INNODB;
+# Test INSERTS with autocommit being off and on.
+BEGIN;
+INSERT INTO t1 VALUES (10);
+COMMIT;
+INSERT INTO t1 VALUES (20);
+# Test UPDATES with autocommit being off and on.
+BEGIN;
+UPDATE t1 SET a=30 WHERE a=10;
+COMMIT;
+UPDATE t1 SET a=40 WHERE a=20;
+connection default;
+SET GLOBAL READ_ONLY=0;
+# Test scenario where global read_only is enabled in the middle of transaction.
+# Test INSERT operations on temporary tables, INSERTs should be successful even
+# when global read_only is enabled.
+connection con1;
+BEGIN;
+INSERT INTO t1 VALUES(50);
+connection default;
+SET GLOBAL READ_ONLY=1;
+connection con1;
+SELECT @@GLOBAL.READ_ONLY;
+@@GLOBAL.READ_ONLY
+1
+COMMIT;
+connection default;
+SET GLOBAL READ_ONLY=0;
+# Test UPDATE operations on temporary tables, UPDATEs should be successful even
+# when global read_only is enabled.
+connection con1;
+BEGIN;
+UPDATE t1 SET a=60 WHERE a=50;
+connection default;
+SET GLOBAL READ_ONLY=1;
+connection con1;
+SELECT @@GLOBAL.READ_ONLY;
+@@GLOBAL.READ_ONLY
+1
+COMMIT;
+SELECT * FROM t1;
+a
+30
+40
+60
+# Clean up
+connection default;
+SET GLOBAL READ_ONLY=0;
+disconnect con1;
+DROP USER test@localhost;
index a1d357ed6cdc5f52c53c91b3d1728e0fc88f17b4..bc6313631b65898d73e875a9a02ae98911e3485c 100644 (file)
@@ -324,5 +324,65 @@ master-bin.000017  #
 master-bin.000018      #
 master-bin.000019      #
 master-bin.000020      #
+# Test case11: Bug #20381055SERVER CRASHES IF INDEX FILE IS OPENED BY
+SET SESSION debug="d,force_index_file_delete_failure";
+call mtr.add_suppression("Failed to delete the existing index file");
+call mtr.add_suppression("failed to move crash safe index file to index file");
+call mtr.add_suppression("failed to update the index file");
+PURGE BINARY LOGS TO 'master-bin.000014';;
+ERROR HY000: I/O error reading log index file
+# Test the index file is complete, although is not purged successfully.
+# Also this will indicate that binary logging is not disabled.
+show binary logs;
+Log_name       File_size
+master-bin.000012      #
+master-bin.000013      #
+master-bin.000014      #
+master-bin.000015      #
+master-bin.000016      #
+master-bin.000017      #
+master-bin.000018      #
+master-bin.000019      #
+master-bin.000020      #
+SET GLOBAL binlog_error_action='IGNORE_ERROR';
+FLUSH LOGS;
+ERROR HY000: Can't open file: 'master-bin.000021' (errno: 1 - Operation not permitted)
+SHOW BINARY LOGS;
+ERROR HY000: You are not using binary logging
+show binary logs;
+Log_name       File_size
+master-bin.000012      #
+master-bin.000013      #
+master-bin.000014      #
+master-bin.000015      #
+master-bin.000016      #
+master-bin.000017      #
+master-bin.000018      #
+master-bin.000019      #
+master-bin.000020      #
+master-bin.000021      #
+CREATE TABLE t1(i INT);
+SET GLOBAL binlog_error_action='IGNORE_ERROR';
+SET SESSION debug="+d,force_index_file_delete_failure";
+SET SESSION debug="+d,force_rotate";
+INSERT INTO t1 VALUES (12);
+ERROR HY000: Can't open file: 'master-bin.000022' (errno: 1 - Operation not permitted)
+SHOW BINARY LOGS;
+ERROR HY000: You are not using binary logging
+show binary logs;
+Log_name       File_size
+master-bin.000012      #
+master-bin.000013      #
+master-bin.000014      #
+master-bin.000015      #
+master-bin.000016      #
+master-bin.000017      #
+master-bin.000018      #
+master-bin.000019      #
+master-bin.000020      #
+master-bin.000021      #
+master-bin.000022      #
+DROP TABLE t1;
+# Test case11: Ends
 SET SESSION debug="";
 End of tests
index 5eedac8e63c4f7893e0220cea9f7768d35105508..1ab6f0960715a84da8de896a210348079f984827 100644 (file)
@@ -100,9 +100,8 @@ master-bin.000001   #       Query   #       #       COMMIT
 *** a proof the query is binlogged with an error ***
 select
 (@a:=load_file("MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog"))
-is not null;
-(@a:=load_file("MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog"))
-is not null
+is not null AS Loaded;
+Loaded
 1
 select 0 /* must return 0 to mean the killed update is in */;
 0
@@ -138,9 +137,8 @@ master-bin.000001   #       Query   #       #       use `test`; delete from t4 where b=bug27563(1) or
 master-bin.000001      #       Query   #       #       COMMIT
 select
 (@a:=load_file("MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog"))
-is not null;
-(@a:=load_file("MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog"))
-is not null
+is not null AS Loaded;
+Loaded
 1
 select 0 /* must return 0 to mean the killed delete is in */;
 0
index 9547fdb88e02b44cfe3ecd94980481c64c4e66b5..9798d41ca0a8fb667b2f6527eb39d82ecff776b9 100644 (file)
@@ -5,9 +5,8 @@ reset master;
 update t1 set a=2 /* will be "killed" after work has been done */;
 select
 (@a:=load_file("MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog"))
-is not null;
-(@a:=load_file("MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog"))
-is not null
+is not null AS Loaded;
+Loaded
 1
 select 1 /* must return 1 as query completed before got killed*/;
 1
@@ -24,9 +23,8 @@ master-bin.000001     #       Execute_load_query      #       #       use `test`; LOAD DATA INFILE '../../s
 master-bin.000001      #       Query   #       #       COMMIT
 select
 (@a:=load_file("MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog"))
-is not null;
-(@a:=load_file("MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog"))
-is not null
+is not null AS Loaded;
+Loaded
 1
 select 0 /* must return 0 to mean the killed query is in */;
 0
index 9360b3138f7133b16a957c4d9eecee7ea71953a0..dc34f3f9a839b08ed34a843a30229fcd518907a3 100644 (file)
@@ -24,9 +24,8 @@ END;|
 Check Result
 select
 (@a:=load_file("MYSQLTEST_VARDIR/tmp/mysqlbinlog_bug39526.binlog"))
-is not null;
-(@a:=load_file("MYSQLTEST_VARDIR/tmp/mysqlbinlog_bug39526.binlog"))
-is not null
+is not null AS Loaded;
+Loaded
 1
 *** String sql_mode=0 is found: 0 ***
 Clean Up
index 4d298e15b027d8aa6ca8637deaa36ed9ff3dd766..d523bbc4cebdbc0908175cac39627b346276e7d5 100644 (file)
@@ -442,9 +442,8 @@ get_lock("a",10)
 flush logs;
 select
 (@a:=load_file("MYSQLTEST_VARDIR/tmp/mix_innodb_myisam_binlog.output"))
-is not null;
-(@a:=load_file("MYSQLTEST_VARDIR/tmp/mix_innodb_myisam_binlog.output"))
-is not null
+is not null AS Loaded;
+Loaded
 1
 select
 @a like "%#%error_code=0%ROLLBACK\n/*!*/;%ROLLBACK /* added by mysqlbinlog */;%" OR
diff --git a/mysql-wsrep-5.6/mysql-test/suite/binlog/t/binlog_dmls_on_tmp_tables_readonly.test b/mysql-wsrep-5.6/mysql-test/suite/binlog/t/binlog_dmls_on_tmp_tables_readonly.test
new file mode 100644 (file)
index 0000000..30a6471
--- /dev/null
@@ -0,0 +1,90 @@
+# ==== Purpose ====
+#
+# Check that DMLs are allowed on temporary tables, when server is in read only
+# mode and binary log is enabled with binlog-format being stmt/mixed mode.
+#
+# ==== Implementation ====
+#
+# Start the server with binary log being enabled. Mark the server as read only.
+# Create a non-SUPER user and let the user to create a temporary table and
+# perform DML operations on that temporary table. DMLs should not be blocked
+# with a 'server read-only mode' error.
+#
+# ==== References ====
+#
+# Bug#12818255: READ-ONLY OPTION DOES NOT ALLOW INSERTS/UPDATES ON TEMPORARY
+# TABLES
+# Bug#14294223: CHANGES NOT ALLOWED TO TEMPORARY TABLES ON READ-ONLY SERVERS
+###############################################################################
+--source include/have_log_bin.inc
+--disable_warnings
+DROP TABLE IF EXISTS t1 ;
+--enable_warnings
+
+--enable_connect_log
+--echo # READ_ONLY does nothing to SUPER users
+--echo # so we use a non-SUPER one:
+GRANT CREATE, SELECT, DROP ON *.* TO test@localhost;
+
+connect (con1,localhost,test,,test);
+
+connection default;
+SET GLOBAL READ_ONLY=1;
+
+connection con1;
+CREATE TEMPORARY TABLE t1 (a INT) ENGINE=INNODB;
+
+--echo # Test INSERTS with autocommit being off and on.
+BEGIN;
+INSERT INTO t1 VALUES (10);
+COMMIT;
+INSERT INTO t1 VALUES (20);
+
+--echo # Test UPDATES with autocommit being off and on.
+BEGIN;
+UPDATE t1 SET a=30 WHERE a=10;
+COMMIT;
+UPDATE t1 SET a=40 WHERE a=20;
+
+connection default;
+SET GLOBAL READ_ONLY=0;
+
+--echo # Test scenario where global read_only is enabled in the middle of transaction.
+--echo # Test INSERT operations on temporary tables, INSERTs should be successful even
+--echo # when global read_only is enabled.
+connection con1;
+BEGIN;
+INSERT INTO t1 VALUES(50);
+
+connection default;
+SET GLOBAL READ_ONLY=1;
+
+connection con1;
+SELECT @@GLOBAL.READ_ONLY;
+COMMIT;
+
+connection default;
+SET GLOBAL READ_ONLY=0;
+
+--echo # Test UPDATE operations on temporary tables, UPDATEs should be successful even
+--echo # when global read_only is enabled.
+connection con1;
+BEGIN;
+UPDATE t1 SET a=60 WHERE a=50;
+
+connection default;
+SET GLOBAL READ_ONLY=1;
+
+connection con1;
+SELECT @@GLOBAL.READ_ONLY;
+COMMIT;
+
+SELECT * FROM t1;
+
+--echo # Clean up
+connection default;
+SET GLOBAL READ_ONLY=0;
+
+disconnect con1;
+DROP USER test@localhost;
+--disable_connect_log
index 41c4a852fb45d55c984b339ec9f34dc6ce699530..0274fcfde6370abcd01abda33e99542ebfacda20 100644 (file)
@@ -417,6 +417,61 @@ file_exists $MYSQLD_DATADIR/master-bin.000012;
 file_exists $MYSQLD_DATADIR/master-bin.000013;
 file_exists $MYSQLD_DATADIR/master-bin.000014;
 
-eval SET SESSION debug="$old";
+-- echo # Test case11: Bug #20381055SERVER CRASHES IF INDEX FILE IS OPENED BY
+        #              OTHER APPLICATION AND PURGE IS ISSUED.
+        # This test case test the server behaviour if index file cannot be
+        # deleted.
+SET SESSION debug="d,force_index_file_delete_failure";
+
+# Add supressions
+call mtr.add_suppression("Failed to delete the existing index file");
+call mtr.add_suppression("failed to move crash safe index file to index file");
+call mtr.add_suppression("failed to update the index file");
+
+# When index file cannot be recreated during purge binary logs command,
+# it should throw error but it should not disable binary logging.
+-- error ER_IO_ERR_LOG_INDEX_READ
+-- eval PURGE BINARY LOGS TO 'master-bin.000014';
+
+-- echo # Test the index file is complete, although is not purged successfully.
+-- echo # Also this will indicate that binary logging is not disabled.
+-- source include/show_binary_logs.inc
+file_exists $MYSQLD_DATADIR/master-bin.000012;
+file_exists $MYSQLD_DATADIR/master-bin.000013;
+file_exists $MYSQLD_DATADIR/master-bin.000014;
+
+# When index file cannot be recreated during FLUSH LOGS command,
+# it should throw error and binary logging should be disabled.
+SET GLOBAL binlog_error_action='IGNORE_ERROR';
+# normalize strerror message for solaris10-sparc-64bit as long as errno is OK
+--replace_regex /\.[\\\/]master/master/ /errno: 1 - .*\)/errno: 1 - Operation not permitted)/
+--error ER_CANT_OPEN_FILE
+FLUSH LOGS;
 
+--error ER_NO_BINARY_LOGGING
+SHOW BINARY LOGS;
+--source include/restart_mysqld.inc
+-- source include/show_binary_logs.inc
+CREATE TABLE t1(i INT);
+SET GLOBAL binlog_error_action='IGNORE_ERROR';
+SET SESSION debug="+d,force_index_file_delete_failure";
+SET SESSION debug="+d,force_rotate";
+
+# When index file cannot be recreated during DML command which
+# is trying to rotate the binary log, it should throw error and
+# binary logging should be disabled.
+# normalize strerror message for solaris10-sparc-64bit as long as errno is OK
+--replace_regex /\.[\\\/]master/master/ /errno: 1 - .*\)/errno: 1 - Operation not permitted)/
+--error ER_CANT_OPEN_FILE
+INSERT INTO t1 VALUES (12);
+
+--error ER_NO_BINARY_LOGGING
+SHOW BINARY LOGS;
+
+--source include/restart_mysqld.inc
+-- source include/show_binary_logs.inc
+DROP TABLE t1;
+-- echo # Test case11: Ends
+
+eval SET SESSION debug="$old";
 --echo End of tests
index ce6685528b5b74ae363692bb8e09ba7dd102f97e..f5401b47175a896f41280a9bfd8a84a0e3d3485c 100644 (file)
@@ -303,7 +303,7 @@ if (!`SELECT COUNT(*) = 0 OR VARIABLE_VALUE != 'ON' FROM INFORMATION_SCHEMA.GLOB
 --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
 eval select
 (@a:=load_file("$MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog"))
-is not null;
+is not null AS Loaded;
 --replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
 let $error_code= `select @a like "%#%error_code=0%" /* must return 0*/`;
 eval select $error_code /* must return 0 to mean the killed update is in */;
@@ -361,7 +361,7 @@ if (!`SELECT COUNT(*) = 0 OR VARIABLE_VALUE != 'ON' FROM INFORMATION_SCHEMA.GLOB
 --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
 eval select
 (@a:=load_file("$MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog"))
-is not null;
+is not null AS Loaded;
 --replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
 let $error_code= `select @a like "%#%error_code=0%" /* must return 0*/`;
 eval select $error_code /* must return 0 to mean the killed delete is in */;
index 79494e2d48d17dfccfd49decc7e2e8dbf4ed1e08..424d30dc2f63ca76f8091c2197076aba6bc571e9 100644 (file)
@@ -26,7 +26,7 @@ let $MYSQLD_DATADIR= `select @@datadir`;
 --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
 eval select
 (@a:=load_file("$MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog"))
-is not null;
+is not null AS Loaded;
 --replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
 let $error_code= `select @a like "%#%error_code=0%" /* must return 1 */`;
 eval select $error_code /* must return 1 as query completed before got killed*/;
@@ -57,7 +57,7 @@ source include/show_binlog_events.inc;
 --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
 eval select
 (@a:=load_file("$MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog"))
-is not null;
+is not null AS Loaded;
 --replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
 let $error_code= `select @a like "%#%error_code=0%" /* must return 0*/`;
 eval select $error_code /* must return 0 to mean the killed query is in */;
index 2b0601355ae164ac675d8ed0b303ed7fa2c2120a..66846e729f7a338a1c37d7b8398e2f4f35afe5d0 100644 (file)
@@ -56,7 +56,7 @@ let $MYSQLD_DATADIR= `select @@datadir`;
 --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
 eval select
 (@a:=load_file("$MYSQLTEST_VARDIR/tmp/mysqlbinlog_bug39526.binlog"))
-is not null;
+is not null AS Loaded;
 let $s_mode_unsigned= `select @a like "%@@session.sql_mode=0%" /* must return 0 */`;
 echo *** String sql_mode=0 is found: $s_mode_unsigned ***;
 
diff --git a/mysql-wsrep-5.6/mysql-test/suite/connection_control/inc/check_connection_delay.inc b/mysql-wsrep-5.6/mysql-test/suite/connection_control/inc/check_connection_delay.inc
new file mode 100644 (file)
index 0000000..20b69bd
--- /dev/null
@@ -0,0 +1,44 @@
+# Following variables should be set:
+# $USER                 Name of the user
+# $PASSWORD             Password to be supplied
+# $SUCCESS              Whether a successful connection is expected or not
+# $DELAY_STATS           Expected value of Connection_control_delay_generated
+# $USE_AUTH_PLUGIN      Whether an authentication plugin is to be used or not
+# $CLIENT_AUTH_PLUGIN   Authentication plugin
+
+connection default;
+disable_query_log;
+disable_result_log;
+
+if ($SUCCESS == 0)
+{
+  --echo # Connection attempt should fail.
+  if ($USE_AUTH_PLUGIN == 0)
+  {
+    --error 1
+    --exec $MYSQL -u$USER -p$PASSWORD -e "SELECT 1;" 2>&1
+  }
+  if ($USE_AUTH_PLUGIN == 1)
+  {
+    --error 1
+    --exec $MYSQL -u$USER $CLIENT_AUTH_PLUGIN -p$PASSWORD -e "SELECT 1;" 2>&1
+  }
+}
+
+if ($SUCCESS != 0)
+{
+  --echo # Connection attempt should succeed.
+    if ($USE_AUTH_PLUGIN == 0)
+  {
+    --exec $MYSQL -u$USER -p$PASSWORD -e "SELECT 1;" 2>&1
+  }
+  if ($USE_AUTH_PLUGIN == 1)
+  {
+    --exec $MYSQL -u$USER $CLIENT_AUTH_PLUGIN -p$PASSWORD -e "SELECT 1;" 2>&1
+  }
+}
+
+enable_result_log;
+--echo Connection_control_delay_generated should be $DELAY_STATS
+SHOW STATUS LIKE 'Connection_control_delay_generated';
+enable_query_log;
diff --git a/mysql-wsrep-5.6/mysql-test/suite/connection_control/inc/cleanup_proxy_accounts.inc b/mysql-wsrep-5.6/mysql-test/suite/connection_control/inc/cleanup_proxy_accounts.inc
new file mode 100644 (file)
index 0000000..5cf2c57
--- /dev/null
@@ -0,0 +1,24 @@
+disable_query_log;
+disable_result_log;
+# Revoke proxy grants
+REVOKE PROXY ON proxied@localhost FROM u1@localhost, u2@localhost, u3@localhost;
+
+# Drop proxy users
+DROP USER u1@localhost, u2@localhost, u3@localhost;
+
+# Drop proxied user
+DROP USER proxied@localhost;
+
+# Uninstall test_plugin_server
+UNINSTALL PLUGIN test_plugin_server;
+
+# Remove plugin library
+let $auth_plugin_path= `SELECT SUBSTR('$PLUGIN_AUTH_OPT/$PLUGIN_AUTH', 14)`;
+let $connection_control_plugin_path= `SELECT SUBSTR('$CONNECTION_CONTROL_PLUGIN_OPT/$PLUGIN_AUTH', 14)`;
+
+if ($auth_plugin_path != $connection_control_plugin_path)
+{
+  --remove_file $connection_control_plugin_path
+}
+enable_result_log;
+enable_query_log;
diff --git a/mysql-wsrep-5.6/mysql-test/suite/connection_control/inc/have_connection_control_plugin.inc b/mysql-wsrep-5.6/mysql-test/suite/connection_control/inc/have_connection_control_plugin.inc
new file mode 100644 (file)
index 0000000..e316487
--- /dev/null
@@ -0,0 +1,22 @@
+disable_query_log;
+#
+# Check if server has support for loading plugin
+#
+if (`SELECT @@have_dynamic_loading != 'YES'`) {
+  --skip The connection_control plugin requires dynamic loading
+}
+
+#
+# Check if the variable CONNECTION_CONTROL_PLUGIN is set
+#
+if (!$CONNECTION_CONTROL_PLUGIN) {
+  --skip The connection_control plugin requires the environment variable \$CONNECTION_CONTROL_PLUGIN to be set (normally done by mtr)
+}
+
+#
+# Check if --plugin-dir was setup for null_audit_db
+#
+if (`SELECT CONCAT('--plugin-dir=', REPLACE(@@plugin_dir, '\\\\', '/')) != '$CONNECTION_CONTROL_PLUGIN_OPT/'`) {
+  --skip The connection_control plugin requires that --plugin-dir is set to the connection_control plugin dir (either the .opt file does not contain \$CONNECTION_CONTROL_PLUGIN_OPT or another plugin is in use)
+}
+enable_query_log;
diff --git a/mysql-wsrep-5.6/mysql-test/suite/connection_control/inc/have_test_plugin.inc b/mysql-wsrep-5.6/mysql-test/suite/connection_control/inc/have_test_plugin.inc
new file mode 100644 (file)
index 0000000..a60d3a9
--- /dev/null
@@ -0,0 +1,16 @@
+disable_query_log;
+#
+# Check if server has support for loading plugin
+#
+if (`SELECT @@have_dynamic_loading != 'YES'`) {
+  --skip The connection_control plugin requires dynamic loading
+}
+
+#
+# Check if the variable PLUGIN_AUTH is set
+#
+if (!$PLUGIN_AUTH) {
+  --skip The connection_control plugin requires the environment variable \$PLUGIN_AUTH to be set (normally done by mtr)
+}
+
+enable_query_log;
diff --git a/mysql-wsrep-5.6/mysql-test/suite/connection_control/inc/install_connection_control_plugin.inc b/mysql-wsrep-5.6/mysql-test/suite/connection_control/inc/install_connection_control_plugin.inc
new file mode 100644 (file)
index 0000000..2249b35
--- /dev/null
@@ -0,0 +1,5 @@
+# Install connection_control plugin
+--replace_result $CONNECTION_CONTROL_PLUGIN CONNECTION_CONTROL_LIB
+eval INSTALL PLUGIN connection_control SONAME '$CONNECTION_CONTROL_PLUGIN';
+--replace_result $CONNECTION_CONTROL_PLUGIN CONNECTION_CONTROL_LIB
+eval INSTALL PLUGIN connection_control_failed_login_attempts SONAME '$CONNECTION_CONTROL_PLUGIN'; 
diff --git a/mysql-wsrep-5.6/mysql-test/suite/connection_control/inc/set_after_marker.inc b/mysql-wsrep-5.6/mysql-test/suite/connection_control/inc/set_after_marker.inc
new file mode 100644 (file)
index 0000000..be69c58
--- /dev/null
@@ -0,0 +1,10 @@
+# set after marker
+# $SERVER_RESPONSE_TIME [IN] Expected delay
+disable_query_log;
+disable_result_log;
+SET @after= TIMESTAMP(current_time());
+SET @server_response_time= TIMESTAMPDIFF(SECOND, @before, @after);
+enable_result_log;
+
+--eval SELECT @server_response_time >= $SERVER_RESPONSE_TIME
+enable_query_log;
diff --git a/mysql-wsrep-5.6/mysql-test/suite/connection_control/inc/set_before_marker.inc b/mysql-wsrep-5.6/mysql-test/suite/connection_control/inc/set_before_marker.inc
new file mode 100644 (file)
index 0000000..52d84a9
--- /dev/null
@@ -0,0 +1,6 @@
+# Set before marker
+disable_query_log;
+disable_result_log;
+SET @before= TIMESTAMP(current_time());
+enable_result_log;
+enable_query_log;
diff --git a/mysql-wsrep-5.6/mysql-test/suite/connection_control/inc/setup_proxy_accounts.inc b/mysql-wsrep-5.6/mysql-test/suite/connection_control/inc/setup_proxy_accounts.inc
new file mode 100644 (file)
index 0000000..2a0b884
--- /dev/null
@@ -0,0 +1,26 @@
+disable_query_log;
+disable_result_log;
+# Copy PLUGIN_AUTH library to CONNECTION_CONTROL_OPT location
+let $auth_plugin_path= `SELECT SUBSTR('$PLUGIN_AUTH_OPT/$PLUGIN_AUTH', 14)`;
+let $connection_control_plugin_path= `SELECT SUBSTR('$CONNECTION_CONTROL_PLUGIN_OPT/$PLUGIN_AUTH', 14)`;
+
+if ($auth_plugin_path != $connection_control_plugin_path)
+{
+  --error 0, 1
+  --remove_file $connection_control_plugin_path
+  --copy_file $auth_plugin_path $connection_control_plugin_path
+}
+# Install test_plugin_server
+eval INSTALL PLUGIN test_plugin_server SONAME '$PLUGIN_AUTH';
+
+# Create proxied@localhost
+CREATE USER proxied@localhost IDENTIFIED BY 'proxied_password';
+
+# Create u1@localhost, u2@localhost, u3@localhst
+CREATE USER u1@localhost IDENTIFIED WITH test_plugin_server AS 'proxied';
+CREATE USER u2@localhost IDENTIFIED WITH test_plugin_server AS 'proxied';
+CREATE USER u3@localhost IDENTIFIED WITH test_plugin_server AS 'proxied';
+
+GRANT PROXY ON proxied@localhost TO u1@localhost, u2@localhost, u3@localhost;
+enable_result_log;
+enable_query_log;
diff --git a/mysql-wsrep-5.6/mysql-test/suite/connection_control/inc/uninstall_connection_control_plugin.inc b/mysql-wsrep-5.6/mysql-test/suite/connection_control/inc/uninstall_connection_control_plugin.inc
new file mode 100644 (file)
index 0000000..540e124
--- /dev/null
@@ -0,0 +1,5 @@
+# Uninstall connection_control plugin
+--disable_warnings
+UNINSTALL PLUGIN connection_control;
+--enable_warnings
+UNINSTALL PLUGIN connection_control_failed_login_attempts;
diff --git a/mysql-wsrep-5.6/mysql-test/suite/connection_control/r/connection_delay_anonymous_user.result b/mysql-wsrep-5.6/mysql-test/suite/connection_control/r/connection_delay_anonymous_user.result
new file mode 100644 (file)
index 0000000..efdae6e
--- /dev/null
@@ -0,0 +1,60 @@
+# Connection delay tests for valid user accounts
+
+# ----------------------------------------------------------------------
+
+# Setup
+# Install connection_control plugin
+INSTALL PLUGIN connection_control SONAME 'CONNECTION_CONTROL_LIB';
+INSTALL PLUGIN connection_control_failed_login_attempts SONAME 'CONNECTION_CONTROL_LIB';
+# Create anonymous user
+CREATE USER ''@'localhost';
+# Save original values of connection_control variables
+SET @saved_connections_threshold = @@global.connection_control_failed_connections_threshold;
+SET @saved_max_delay = @@global.connection_control_max_connection_delay;
+# Set small values for connection_control variables
+SET @@global.connection_control_failed_connections_threshold = 3;
+SET @global.connection_control_max_connection_delay = 1000;
+
+# ----------------------------------------------------------------------
+
+# Following attempts will not experience any delay in server respose
+# Connection attempt should fail.
+Connection_control_delay_generated should be 0
+Variable_name  Value
+Connection_control_delay_generated     0
+# Connection attempt should fail.
+Connection_control_delay_generated should be 0
+Variable_name  Value
+Connection_control_delay_generated     0
+# Connection attempt should fail.
+Connection_control_delay_generated should be 0
+Variable_name  Value
+Connection_control_delay_generated     0
+
+# Following attempts will experience delay in server respose
+# Connection attempt should fail.
+Connection_control_delay_generated should be 1
+Variable_name  Value
+Connection_control_delay_generated     1
+# Connection attempt should fail.
+Connection_control_delay_generated should be 2
+Variable_name  Value
+Connection_control_delay_generated     2
+# Connection attempt should fail.
+Connection_control_delay_generated should be 3
+Variable_name  Value
+Connection_control_delay_generated     3
+
+# ----------------------------------------------------------------------
+
+# Cleanup
+# Restore original values of conenction_control variables
+SET @@global.connection_control_failed_connections_threshold = @saved_connections_threshold;
+SET @@global.connection_control_max_connection_delay = @saved_max_delay;
+# Drop anonymous user
+DROP USER ''@'localhost';
+# Uninstall connection_control plugin
+UNINSTALL PLUGIN connection_control;
+UNINSTALL PLUGIN connection_control_failed_login_attempts;
+
+# ----------------------------------------------------------------------
diff --git a/mysql-wsrep-5.6/mysql-test/suite/connection_control/r/connection_delay_info_schema_view.result b/mysql-wsrep-5.6/mysql-test/suite/connection_control/r/connection_delay_info_schema_view.result
new file mode 100644 (file)
index 0000000..d90034a
--- /dev/null
@@ -0,0 +1,140 @@
+# Connection delay tests for valid user accounts
+
+# ----------------------------------------------------------------------
+
+# Setup
+# Install connection_control plugin
+INSTALL PLUGIN connection_control SONAME 'CONNECTION_CONTROL_LIB';
+INSTALL PLUGIN connection_control_failed_login_attempts SONAME 'CONNECTION_CONTROL_LIB';
+# Create user accounts for testing
+CREATE USER u1@localhost IDENTIFIED BY 'abcd';
+CREATE USER u2@localhost IDENTIFIED BY 'abcd';
+CREATE USER u3@localhost IDENTIFIED BY 'abcd';
+# Save original values of connection_control variables
+SET @saved_connections_threshold = @@global.connection_control_failed_connections_threshold;
+# Avoid triggering delay
+SET @@global.connection_control_failed_connections_threshold = 100;
+
+# ----------------------------------------------------------------------
+
+connect(localhost,u1,,test,MASTER_PORT,MASTER_SOCKET);
+ERROR 28000: Access denied for user 'u1'@'localhost' (using password: NO)
+connect(localhost,u1,haha,test,MASTER_PORT,MASTER_SOCKET);
+ERROR 28000: Access denied for user 'u1'@'localhost' (using password: YES)
+connect(localhost,u2,efgh,test,MASTER_PORT,MASTER_SOCKET);
+ERROR 28000: Access denied for user 'u2'@'localhost' (using password: YES)
+# connection_control_failed_login_attempts should contain entries
+# for u1@localhost and u2@localhost
+SELECT * FROM INFORMATION_SCHEMA.connection_control_failed_login_attempts;
+USERHOST       FAILED_ATTEMPTS
+'u1'@'localhost'       2
+'u2'@'localhost'       1
+connect(localhost,u3,,test,MASTER_PORT,MASTER_SOCKET);
+ERROR 28000: Access denied for user 'u3'@'localhost' (using password: NO)
+connect(localhost,u2,haha,test,MASTER_PORT,MASTER_SOCKET);
+ERROR 28000: Access denied for user 'u2'@'localhost' (using password: YES)
+connect(localhost,u3,efgh,test,MASTER_PORT,MASTER_SOCKET);
+ERROR 28000: Access denied for user 'u3'@'localhost' (using password: YES)
+# connection_control_failed_login_attempts should contain entries
+# for u1@localhost, u2@localhost and u3@localhost
+SELECT * FROM INFORMATION_SCHEMA.connection_control_failed_login_attempts;
+USERHOST       FAILED_ATTEMPTS
+'u1'@'localhost'       2
+'u2'@'localhost'       2
+'u3'@'localhost'       2
+connect(localhost,u2,,test,MASTER_PORT,MASTER_SOCKET);
+ERROR 28000: Access denied for user 'u2'@'localhost' (using password: NO)
+connect(localhost,u1,haha,test,MASTER_PORT,MASTER_SOCKET);
+ERROR 28000: Access denied for user 'u1'@'localhost' (using password: YES)
+connect(localhost,u3,efgh,test,MASTER_PORT,MASTER_SOCKET);
+ERROR 28000: Access denied for user 'u3'@'localhost' (using password: YES)
+# failed connection counts should have increased for all users
+SELECT * FROM INFORMATION_SCHEMA.connection_control_failed_login_attempts;
+USERHOST       FAILED_ATTEMPTS
+'u1'@'localhost'       3
+'u2'@'localhost'       3
+'u3'@'localhost'       3
+connect(localhost,u2,,test,MASTER_PORT,MASTER_SOCKET);
+ERROR 28000: Access denied for user 'u2'@'localhost' (using password: NO)
+connect(localhost,u1,haha,test,MASTER_PORT,MASTER_SOCKET);
+ERROR 28000: Access denied for user 'u1'@'localhost' (using password: YES)
+connect(localhost,u3,efgh,test,MASTER_PORT,MASTER_SOCKET);
+ERROR 28000: Access denied for user 'u3'@'localhost' (using password: YES)
+connect(localhost,u1,haha,test,MASTER_PORT,MASTER_SOCKET);
+ERROR 28000: Access denied for user 'u1'@'localhost' (using password: YES)
+connect(localhost,u3,efgh,test,MASTER_PORT,MASTER_SOCKET);
+ERROR 28000: Access denied for user 'u3'@'localhost' (using password: YES)
+connect(localhost,u1,haha,test,MASTER_PORT,MASTER_SOCKET);
+ERROR 28000: Access denied for user 'u1'@'localhost' (using password: YES)
+# Try various queries
+SELECT * FROM INFORMATION_SCHEMA.connection_control_failed_login_attempts
+WHERE USERHOST = '\'u1\'@\'localhost\'';
+USERHOST       FAILED_ATTEMPTS
+'u1'@'localhost'       6
+SELECT * FROM INFORMATION_SCHEMA.connection_control_failed_login_attempts
+WHERE USERHOST LIKE '%u2%';
+USERHOST       FAILED_ATTEMPTS
+'u2'@'localhost'       4
+SELECT * FROM INFORMATION_SCHEMA.connection_control_failed_login_attempts
+WHERE FAILED_ATTEMPTS > 4;
+USERHOST       FAILED_ATTEMPTS
+'u1'@'localhost'       6
+'u3'@'localhost'       5
+SELECT * FROM INFORMATION_SCHEMA.connection_control_failed_login_attempts
+WHERE FAILED_ATTEMPTS > 5;
+USERHOST       FAILED_ATTEMPTS
+'u1'@'localhost'       6
+SELECT * FROM INFORMATION_SCHEMA.connection_control_failed_login_attempts
+WHERE FAILED_ATTEMPTS < 5;
+USERHOST       FAILED_ATTEMPTS
+'u2'@'localhost'       4
+# After successful login, corresponding entry should disappear
+# from the view
+SELECT * FROM INFORMATION_SCHEMA.connection_control_failed_login_attempts;
+USERHOST       FAILED_ATTEMPTS
+'u3'@'localhost'       5
+# A user without privileges should not be able to any information
+SELECT * FROM INFORMATION_SCHEMA.connection_control_failed_login_attempts;
+USERHOST       FAILED_ATTEMPTS
+connect(localhost,u1,,test,MASTER_PORT,MASTER_SOCKET);
+ERROR 28000: Access denied for user 'u1'@'localhost' (using password: NO)
+connect(localhost,u3,haha,test,MASTER_PORT,MASTER_SOCKET);
+ERROR 28000: Access denied for user 'u3'@'localhost' (using password: YES)
+connect(localhost,u2,efgh,test,MASTER_PORT,MASTER_SOCKET);
+ERROR 28000: Access denied for user 'u2'@'localhost' (using password: YES)
+# Subsequent failed attempts should put entries back in the view
+SELECT * FROM INFORMATION_SCHEMA.connection_control_failed_login_attempts;
+USERHOST       FAILED_ATTEMPTS
+'u1'@'localhost'       1
+'u2'@'localhost'       1
+'u3'@'localhost'       1
+connect(localhost,u4,,test,MASTER_PORT,MASTER_SOCKET);
+ERROR 28000: Access denied for user 'u4'@'localhost' (using password: NO)
+connect(localhost,u5,haha,test,MASTER_PORT,MASTER_SOCKET);
+ERROR 28000: Access denied for user 'u5'@'localhost' (using password: YES)
+connect(localhost,u6,efgh,test,MASTER_PORT,MASTER_SOCKET);
+ERROR 28000: Access denied for user 'u6'@'localhost' (using password: YES)
+# Attempts by invalid accounts should be shown in the view
+SELECT * FROM INFORMATION_SCHEMA.connection_control_failed_login_attempts;
+USERHOST       FAILED_ATTEMPTS
+'u1'@'localhost'       1
+'u2'@'localhost'       1
+'u3'@'localhost'       1
+'u4'@'localhost'       1
+'u5'@'localhost'       1
+'u6'@'localhost'       1
+
+# ----------------------------------------------------------------------
+
+# Cleanup
+# Restore original values of conenction_control variables
+SET @@global.connection_control_failed_connections_threshold = @saved_connections_threshold;
+# Remove user accounts created for the test
+DROP USER u1@localhost;
+DROP USER u2@localhost;
+DROP USER u3@localhost;
+# Uninstall connection_control plugin
+UNINSTALL PLUGIN connection_control;
+UNINSTALL PLUGIN connection_control_failed_login_attempts;
+
+# ----------------------------------------------------------------------
diff --git a/mysql-wsrep-5.6/mysql-test/suite/connection_control/r/connection_delay_invalid_users.result b/mysql-wsrep-5.6/mysql-test/suite/connection_control/r/connection_delay_invalid_users.result
new file mode 100644 (file)
index 0000000..ba4e346
--- /dev/null
@@ -0,0 +1,102 @@
+# Connection delay tests for valid user accounts
+
+# ----------------------------------------------------------------------
+
+# Setup
+# Install connection_control plugin
+INSTALL PLUGIN connection_control SONAME 'CONNECTION_CONTROL_LIB';
+INSTALL PLUGIN connection_control_failed_login_attempts SONAME 'CONNECTION_CONTROL_LIB';
+# Save original values of connection_control variables
+SET @saved_connections_threshold = @@global.connection_control_failed_connections_threshold;
+SET @saved_max_delay = @@global.connection_control_max_connection_delay;
+# Set small values for connection_control variables
+SET @@global.connection_control_failed_connections_threshold = 3;
+SET @@global.connection_control_max_connection_delay = 1000;
+
+# ----------------------------------------------------------------------
+
+# Following attempts will not experience any delay in server respose
+# Connection attempt should fail.
+Connection_control_delay_generated should be 0
+Variable_name  Value
+Connection_control_delay_generated     0
+# Connection attempt should fail.
+Connection_control_delay_generated should be 0
+Variable_name  Value
+Connection_control_delay_generated     0
+# Connection attempt should fail.
+Connection_control_delay_generated should be 0
+Variable_name  Value
+Connection_control_delay_generated     0
+# Connection attempt should fail.
+Connection_control_delay_generated should be 0
+Variable_name  Value
+Connection_control_delay_generated     0
+# Connection attempt should fail.
+Connection_control_delay_generated should be 0
+Variable_name  Value
+Connection_control_delay_generated     0
+# Connection attempt should fail.
+Connection_control_delay_generated should be 0
+Variable_name  Value
+Connection_control_delay_generated     0
+# Connection attempt should fail.
+Connection_control_delay_generated should be 0
+Variable_name  Value
+Connection_control_delay_generated     0
+# Connection attempt should fail.
+Connection_control_delay_generated should be 0
+Variable_name  Value
+Connection_control_delay_generated     0
+# Connection attempt should fail.
+Connection_control_delay_generated should be 0
+Variable_name  Value
+Connection_control_delay_generated     0
+
+# Following attempts will experience delay in server respose
+# Connection attempt should fail.
+Connection_control_delay_generated should be 1
+Variable_name  Value
+Connection_control_delay_generated     1
+# Connection attempt should fail.
+Connection_control_delay_generated should be 2
+Variable_name  Value
+Connection_control_delay_generated     2
+# Connection attempt should fail.
+Connection_control_delay_generated should be 3
+Variable_name  Value
+Connection_control_delay_generated     3
+SELECT * FROM INFORMATION_SCHEMA.connection_control_failed_login_attempts;
+USERHOST       FAILED_ATTEMPTS
+'u1'@'localhost'       4
+'u2'@'localhost'       4
+'u3'@'localhost'       4
+# Connection attempt should fail.
+Connection_control_delay_generated should be 4
+Variable_name  Value
+Connection_control_delay_generated     4
+# Connection attempt should fail.
+Connection_control_delay_generated should be 5
+Variable_name  Value
+Connection_control_delay_generated     5
+# Connection attempt should fail.
+Connection_control_delay_generated should be 6
+Variable_name  Value
+Connection_control_delay_generated     6
+SELECT * FROM INFORMATION_SCHEMA.connection_control_failed_login_attempts;
+USERHOST       FAILED_ATTEMPTS
+'u1'@'localhost'       5
+'u2'@'localhost'       5
+'u3'@'localhost'       5
+
+# ----------------------------------------------------------------------
+
+# Cleanup
+# Restore original values of conenction_control variables
+SET @@global.connection_control_failed_connections_threshold = @saved_connections_threshold;
+SET @@global.connection_control_max_connection_delay = @saved_max_delay;
+# Uninstall connection_control plugin
+UNINSTALL PLUGIN connection_control;
+UNINSTALL PLUGIN connection_control_failed_login_attempts;
+
+# ----------------------------------------------------------------------
diff --git a/mysql-wsrep-5.6/mysql-test/suite/connection_control/r/connection_delay_min_max.result b/mysql-wsrep-5.6/mysql-test/suite/connection_control/r/connection_delay_min_max.result
new file mode 100644 (file)
index 0000000..54783da
--- /dev/null
@@ -0,0 +1,82 @@
+# Connection delay tests for valid user accounts
+
+# ----------------------------------------------------------------------
+
+# Setup
+# Install connection_control plugin
+INSTALL PLUGIN connection_control SONAME 'CONNECTION_CONTROL_LIB';
+INSTALL PLUGIN connection_control_failed_login_attempts SONAME 'CONNECTION_CONTROL_LIB';
+# Create user account for testing
+CREATE USER u1 IDENTIFIED BY 'abcd';
+# Save original values of connection_control variables
+SET @saved_connections_threshold = @@global.connection_control_failed_connections_threshold;
+SET @saved_max_delay = @@global.connection_control_max_connection_delay;
+SET @saved_min_delay = @@global.connection_control_min_connection_delay;
+# Set small values for connection_control variables
+SET @@global.connection_control_failed_connections_threshold = 3;
+SET @@global.connection_control_max_connection_delay = 4000;
+SET @@global.connection_control_min_connection_delay = 2000;
+
+# ----------------------------------------------------------------------
+
+# Make enough failed attempts to trigger delays
+connect(localhost,u1,,test,MASTER_PORT,MASTER_SOCKET);
+connect(localhost,u1,haha,test,MASTER_PORT,MASTER_SOCKET);
+connect(localhost,u1,haha,test,MASTER_PORT,MASTER_SOCKET);
+
+# Following attempts will experience delay in server respose
+# Connection attempt should fail.
+Connection_control_delay_generated should be 1
+Variable_name  Value
+Connection_control_delay_generated     1
+@server_response_time >= 2
+1
+# Connection attempt should fail.
+Connection_control_delay_generated should be 2
+Variable_name  Value
+Connection_control_delay_generated     2
+@server_response_time >= 2
+1
+# Connection attempt should fail.
+Connection_control_delay_generated should be 3
+Variable_name  Value
+Connection_control_delay_generated     3
+@server_response_time >= 3
+1
+# Connection attempt should fail.
+Connection_control_delay_generated should be 4
+Variable_name  Value
+Connection_control_delay_generated     4
+@server_response_time >= 4
+1
+# Connection attempt should succeed.
+Connection_control_delay_generated should be 5
+Variable_name  Value
+Connection_control_delay_generated     5
+@server_response_time >= 4
+1
+
+# Following attempts will not experience any delay in server respose
+# Connection attempt should fail.
+Connection_control_delay_generated should be 5
+Variable_name  Value
+Connection_control_delay_generated     5
+# Connection attempt should succeed.
+Connection_control_delay_generated should be 5
+Variable_name  Value
+Connection_control_delay_generated     5
+
+# ----------------------------------------------------------------------
+
+# Cleanup
+# Restore original values of conenction_control variables
+SET @@global.connection_control_failed_connections_threshold = @saved_connections_threshold;
+SET @@global.connection_control_max_connection_delay = @saved_max_delay;
+SET @@global.connection_control_min_connection_delay = @saved_min_delay;
+# Remove user account created for the test
+DROP USER u1;
+# Uninstall connection_control plugin
+UNINSTALL PLUGIN connection_control;
+UNINSTALL PLUGIN connection_control_failed_login_attempts;
+
+# ----------------------------------------------------------------------
diff --git a/mysql-wsrep-5.6/mysql-test/suite/connection_control/r/connection_delay_proxy_users.result b/mysql-wsrep-5.6/mysql-test/suite/connection_control/r/connection_delay_proxy_users.result
new file mode 100644 (file)
index 0000000..4ac930f
--- /dev/null
@@ -0,0 +1,97 @@
+#-----------------------------------------------------------------------
+# Setup
+# Install connection_control plugin
+INSTALL PLUGIN connection_control SONAME 'CONNECTION_CONTROL_LIB';
+INSTALL PLUGIN connection_control_failed_login_attempts SONAME 'CONNECTION_CONTROL_LIB';
+# Do proxy setup
+CALL mtr.add_suppression("Plugin test_plugin_server reported: 'Wrong password supplied for proxied'");
+SET @saved_connections_threshold = @@global.connection_control_failed_connections_threshold;
+SET @saved_max_delay = @@global.connection_control_max_connection_delay;
+SET @saved_min_delay= @@global.connection_control_min_connection_delay;
+SET @@global.connection_control_failed_connections_threshold = 3;
+SET @@global.connection_control_max_connection_delay = 4000;
+SET @@global.connection_control_min_connection_delay = 2000;
+#-----------------------------------------------------------------------
+# Case 1 : Testss for valid user accounts
+# Make enough failed attempts to trigger delays
+connect(localhost,u1,,test,MASTER_PORT,MASTER_SOCKET);
+connect(localhost,u1,haha,test,MASTER_PORT,MASTER_SOCKET);
+connect(localhost,u2,efgh,test,MASTER_PORT,MASTER_SOCKET);
+connect(localhost,u3,,test,MASTER_PORT,MASTER_SOCKET);
+connect(localhost,u2,haha,test,MASTER_PORT,MASTER_SOCKET);
+connect(localhost,u3,efgh,test,MASTER_PORT,MASTER_SOCKET);
+connect(localhost,u2,,test,MASTER_PORT,MASTER_SOCKET);
+connect(localhost,u1,haha,test,MASTER_PORT,MASTER_SOCKET);
+connect(localhost,u3,efgh,test,MASTER_PORT,MASTER_SOCKET);
+# Following attempts will experience delay in server respose
+# Connection attempt should fail.
+Connection_control_delay_generated should be 1
+Variable_name  Value
+Connection_control_delay_generated     1
+@server_response_time >= 2
+1
+# Connection attempt should fail.
+Connection_control_delay_generated should be 2
+Variable_name  Value
+Connection_control_delay_generated     2
+@server_response_time >= 2
+1
+# Connection attempt should fail.
+Connection_control_delay_generated should be 3
+Variable_name  Value
+Connection_control_delay_generated     3
+@server_response_time >= 2
+1
+# Connection attempt should succeed.
+Connection_control_delay_generated should be 4
+Variable_name  Value
+Connection_control_delay_generated     4
+@server_response_time >= 2
+1
+# Connection attempt should succeed.
+Connection_control_delay_generated should be 5
+Variable_name  Value
+Connection_control_delay_generated     5
+@server_response_time >= 2
+1
+# Connection attempt should succeed.
+Connection_control_delay_generated should be 6
+Variable_name  Value
+Connection_control_delay_generated     6
+@server_response_time >= 2
+1
+# Following attempts will not experience any delay in server respose
+# Connection attempt should fail.
+Connection_control_delay_generated should be 6
+Variable_name  Value
+Connection_control_delay_generated     6
+# Connection attempt should fail.
+Connection_control_delay_generated should be 6
+Variable_name  Value
+Connection_control_delay_generated     6
+# Connection attempt should fail.
+Connection_control_delay_generated should be 6
+Variable_name  Value
+Connection_control_delay_generated     6
+# Connection attempt should succeed.
+Connection_control_delay_generated should be 6
+Variable_name  Value
+Connection_control_delay_generated     6
+# Connection attempt should succeed.
+Connection_control_delay_generated should be 6
+Variable_name  Value
+Connection_control_delay_generated     6
+# Connection attempt should succeed.
+Connection_control_delay_generated should be 6
+Variable_name  Value
+Connection_control_delay_generated     6
+#-----------------------------------------------------------------------
+# Cleanup
+SET @@global.connection_control_failed_connections_threshold = @saved_connections_threshold;
+SET @@global.connection_control_max_connection_delay = @saved_max_delay;
+SET @@global.connection_control_min_connection_delay = @saved_min_delay;
+# Remove user accounts
+# Uninstall connection_control plugin
+UNINSTALL PLUGIN connection_control;
+UNINSTALL PLUGIN connection_control_failed_login_attempts;
+#-----------------------------------------------------------------------
diff --git a/mysql-wsrep-5.6/mysql-test/suite/connection_control/r/connection_delay_valid_users.result b/mysql-wsrep-5.6/mysql-test/suite/connection_control/r/connection_delay_valid_users.result
new file mode 100644 (file)
index 0000000..1ab98a5
--- /dev/null
@@ -0,0 +1,114 @@
+# Connection delay tests for valid user accounts
+
+# ----------------------------------------------------------------------
+
+# Setup
+# Install connection_control plugin
+INSTALL PLUGIN connection_control SONAME 'CONNECTION_CONTROL_LIB';
+INSTALL PLUGIN connection_control_failed_login_attempts SONAME 'CONNECTION_CONTROL_LIB';
+# Create user accounts for testing
+CREATE USER u1 IDENTIFIED BY 'abcd';
+CREATE USER u2 IDENTIFIED BY 'abcd';
+CREATE USER u3 IDENTIFIED BY 'abcd';
+# Save original values of connection_control variables
+SET @saved_connections_threshold = @@global.connection_control_failed_connections_threshold;
+SET @saved_max_delay = @@global.connection_control_max_connection_delay;
+SET @saved_min_delay= @@global.connection_control_min_connection_delay;
+# Set small values for connection_control variables
+SET @@global.connection_control_failed_connections_threshold = 3;
+SET @@global.connection_control_max_connection_delay = 4000;
+SET @@global.connection_control_min_connection_delay = 2000;
+
+# ----------------------------------------------------------------------
+
+# Make enough failed attempts to trigger delays
+connect(localhost,u1,,test,MASTER_PORT,MASTER_SOCKET);
+connect(localhost,u1,haha,test,MASTER_PORT,MASTER_SOCKET);
+connect(localhost,u2,efgh,test,MASTER_PORT,MASTER_SOCKET);
+connect(localhost,u3,,test,MASTER_PORT,MASTER_SOCKET);
+connect(localhost,u2,haha,test,MASTER_PORT,MASTER_SOCKET);
+connect(localhost,u3,efgh,test,MASTER_PORT,MASTER_SOCKET);
+connect(localhost,u2,,test,MASTER_PORT,MASTER_SOCKET);
+connect(localhost,u1,haha,test,MASTER_PORT,MASTER_SOCKET);
+connect(localhost,u3,efgh,test,MASTER_PORT,MASTER_SOCKET);
+
+# Following attempts will experience delay in server respose
+# Connection attempt should fail.
+Connection_control_delay_generated should be 1
+Variable_name  Value
+Connection_control_delay_generated     1
+@server_response_time >= 2
+1
+# Connection attempt should fail.
+Connection_control_delay_generated should be 2
+Variable_name  Value
+Connection_control_delay_generated     2
+@server_response_time >= 2
+1
+# Connection attempt should fail.
+Connection_control_delay_generated should be 3
+Variable_name  Value
+Connection_control_delay_generated     3
+@server_response_time >= 2
+1
+# Connection attempt should succeed.
+Connection_control_delay_generated should be 4
+Variable_name  Value
+Connection_control_delay_generated     4
+@server_response_time >= 2
+1
+# Connection attempt should succeed.
+Connection_control_delay_generated should be 5
+Variable_name  Value
+Connection_control_delay_generated     5
+@server_response_time >= 2
+1
+# Connection attempt should succeed.
+Connection_control_delay_generated should be 6
+Variable_name  Value
+Connection_control_delay_generated     6
+@server_response_time >= 2
+1
+
+# Following attempts will not experience any delay in server respose
+# Connection attempt should fail.
+Connection_control_delay_generated should be 6
+Variable_name  Value
+Connection_control_delay_generated     6
+# Connection attempt should fail.
+Connection_control_delay_generated should be 6
+Variable_name  Value
+Connection_control_delay_generated     6
+# Connection attempt should fail.
+Connection_control_delay_generated should be 6
+Variable_name  Value
+Connection_control_delay_generated     6
+# Connection attempt should succeed.
+Connection_control_delay_generated should be 6
+Variable_name  Value
+Connection_control_delay_generated     6
+# Connection attempt should succeed.
+Connection_control_delay_generated should be 6
+Variable_name  Value
+Connection_control_delay_generated     6
+# Connection attempt should succeed.
+Connection_control_delay_generated should be 6
+Variable_name  Value
+Connection_control_delay_generated     6
+
+# ----------------------------------------------------------------------
+
+# Cleanup
+# Restore original values of conenction_control variables
+SET @@global.connection_control_failed_connections_threshold = @saved_connections_threshold;
+SET @@global.connection_control_max_connection_delay = @saved_max_delay;
+SET @@global.connection_control_min_connection_delay = @saved_min_delay;
+# Remove user accounts created for the test
+DROP USER u1;
+DROP USER u2;
+DROP USER u3;
+# Uninstall connection_control plugin
+UNINSTALL PLUGIN connection_control;
+UNINSTALL PLUGIN connection_control_failed_login_attempts;
+
+# ----------------------------------------------------------------------
diff --git a/mysql-wsrep-5.6/mysql-test/suite/connection_control/r/status_variables.result b/mysql-wsrep-5.6/mysql-test/suite/connection_control/r/status_variables.result
new file mode 100644 (file)
index 0000000..dd5cc67
--- /dev/null
@@ -0,0 +1,97 @@
+# Connection delay tests for valid user accounts
+
+# ----------------------------------------------------------------------
+
+# Setup
+# Install connection_control plugin
+INSTALL PLUGIN connection_control SONAME 'CONNECTION_CONTROL_LIB';
+INSTALL PLUGIN connection_control_failed_login_attempts SONAME 'CONNECTION_CONTROL_LIB';
+# Create user accounts for testing
+CREATE USER u1@localhost IDENTIFIED BY 'abcd';
+CREATE USER u2@localhost IDENTIFIED BY 'abcd';
+CREATE USER u3@localhost IDENTIFIED BY 'abcd';
+# Save original values of connection_control variables
+SET @saved_connections_threshold = @@global.connection_control_failed_connections_threshold;
+SET @saved_max_delay= @@global.connection_control_max_connection_delay;
+# Set small threshold
+SET @@global.connection_control_failed_connections_threshold = 1;
+# Set small max delay
+SET @@global.connection_control_max_connection_delay = 1000;
+
+# ----------------------------------------------------------------------
+
+connect(localhost,u1,,test,MASTER_PORT,MASTER_SOCKET);
+ERROR 28000: Access denied for user 'u1'@'localhost' (using password: NO)
+connect(localhost,u3,haha,test,MASTER_PORT,MASTER_SOCKET);
+ERROR 28000: Access denied for user 'u3'@'localhost' (using password: YES)
+connect(localhost,u2,efgh,test,MASTER_PORT,MASTER_SOCKET);
+ERROR 28000: Access denied for user 'u2'@'localhost' (using password: YES)
+# Check  Connection_control_delay_generated - Should be 0
+SHOW STATUS LIKE 'Connection_control_delay_generated';
+Variable_name  Value
+Connection_control_delay_generated     0
+connect(localhost,u1,,test,MASTER_PORT,MASTER_SOCKET);
+ERROR 28000: Access denied for user 'u1'@'localhost' (using password: NO)
+connect(localhost,u2,haha,test,MASTER_PORT,MASTER_SOCKET);
+ERROR 28000: Access denied for user 'u2'@'localhost' (using password: YES)
+connect(localhost,u3,efgh,test,MASTER_PORT,MASTER_SOCKET);
+ERROR 28000: Access denied for user 'u3'@'localhost' (using password: YES)
+connect(localhost,u2,,test,MASTER_PORT,MASTER_SOCKET);
+ERROR 28000: Access denied for user 'u2'@'localhost' (using password: NO)
+connect(localhost,u1,haha,test,MASTER_PORT,MASTER_SOCKET);
+ERROR 28000: Access denied for user 'u1'@'localhost' (using password: YES)
+connect(localhost,u3,efgh,test,MASTER_PORT,MASTER_SOCKET);
+ERROR 28000: Access denied for user 'u3'@'localhost' (using password: YES)
+# Check Connection_control_delay_generated - Should be 6
+SHOW STATUS LIKE 'Connection_control_delay_generated';
+Variable_name  Value
+Connection_control_delay_generated     6
+connect(localhost,u2,,test,MASTER_PORT,MASTER_SOCKET);
+ERROR 28000: Access denied for user 'u2'@'localhost' (using password: NO)
+connect(localhost,u1,haha,test,MASTER_PORT,MASTER_SOCKET);
+ERROR 28000: Access denied for user 'u1'@'localhost' (using password: YES)
+connect(localhost,u3,efgh,test,MASTER_PORT,MASTER_SOCKET);
+ERROR 28000: Access denied for user 'u3'@'localhost' (using password: YES)
+# Check Connection_control_delay_generated - Should be 9
+SHOW STATUS LIKE 'Connection_control_delay_generated';
+Variable_name  Value
+Connection_control_delay_generated     9
+# Successful connection but delays would still be generated
+# Should be 12
+SHOW STATUS LIKE 'Connection_control_delay_generated';
+Variable_name  Value
+Connection_control_delay_generated     12
+# Setting failed connection threshold should reset delay statistics
+SET @@global.connection_control_failed_connections_threshold = 1;
+connect(localhost,u1,,test,MASTER_PORT,MASTER_SOCKET);
+ERROR 28000: Access denied for user 'u1'@'localhost' (using password: NO)
+connect(localhost,u3,haha,test,MASTER_PORT,MASTER_SOCKET);
+ERROR 28000: Access denied for user 'u3'@'localhost' (using password: YES)
+connect(localhost,u2,efgh,test,MASTER_PORT,MASTER_SOCKET);
+ERROR 28000: Access denied for user 'u2'@'localhost' (using password: YES)
+connect(localhost,u1,,test,MASTER_PORT,MASTER_SOCKET);
+ERROR 28000: Access denied for user 'u1'@'localhost' (using password: NO)
+connect(localhost,u3,haha,test,MASTER_PORT,MASTER_SOCKET);
+ERROR 28000: Access denied for user 'u3'@'localhost' (using password: YES)
+connect(localhost,u2,efgh,test,MASTER_PORT,MASTER_SOCKET);
+ERROR 28000: Access denied for user 'u2'@'localhost' (using password: YES)
+# Check Connection_control_delay_generated - Should be 3
+SHOW STATUS LIKE 'Connection_control_delay_generated';
+Variable_name  Value
+Connection_control_delay_generated     3
+
+# ----------------------------------------------------------------------
+
+# Cleanup
+# Restore original values of conenction_control variables
+SET @@global.connection_control_max_connection_delay= @saved_max_delay;
+SET @@global.connection_control_failed_connections_threshold = @saved_connections_threshold;
+# Remove user accounts created for the test
+DROP USER u1@localhost;
+DROP USER u2@localhost;
+DROP USER u3@localhost;
+# Uninstall connection_control plugin
+UNINSTALL PLUGIN connection_control;
+UNINSTALL PLUGIN connection_control_failed_login_attempts;
+
+# ----------------------------------------------------------------------
diff --git a/mysql-wsrep-5.6/mysql-test/suite/connection_control/r/system_variables.result b/mysql-wsrep-5.6/mysql-test/suite/connection_control/r/system_variables.result
new file mode 100644 (file)
index 0000000..8c91262
--- /dev/null
@@ -0,0 +1,290 @@
+#-----------------------------------------------------------------------
+# Setup
+# Install connection_control plugin
+INSTALL PLUGIN connection_control SONAME 'CONNECTION_CONTROL_LIB';
+INSTALL PLUGIN connection_control_failed_login_attempts SONAME 'CONNECTION_CONTROL_LIB';
+CREATE USER no_privs@localhost IDENTIFIED BY 'abcd';
+#-----------------------------------------------------------------------
+# Case 1 : connection_control_failed_connections_threshold
+SHOW GRANTS;
+Grants for root@localhost
+GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION
+GRANT PROXY ON ''@'' TO 'root'@'localhost' WITH GRANT OPTION
+SET @saved_value = @@global.connection_control_failed_connections_threshold;
+SELECT @saved_value;
+@saved_value
+3
+SET @@global.connection_control_failed_connections_threshold = @saved_value;
+# 1.1 : Setting connection_control_failed_connections_threshold to valid
+#       value
+SET @@global.connection_control_failed_connections_threshold = 20;
+SELECT @@global.connection_control_failed_connections_threshold;
+@@global.connection_control_failed_connections_threshold
+20
+SET @@global.connection_control_failed_connections_threshold = 2000;
+SELECT @@global.connection_control_failed_connections_threshold;
+@@global.connection_control_failed_connections_threshold
+2000
+SET @@global.connection_control_failed_connections_threshold = 2147483647;
+SELECT @@global.connection_control_failed_connections_threshold;
+@@global.connection_control_failed_connections_threshold
+2147483647
+SET @@global.connection_control_failed_connections_threshold = DEFAULT;
+SELECT @@global.connection_control_failed_connections_threshold;
+@@global.connection_control_failed_connections_threshold
+3
+# 1.2 : Setting connection_control_failed_connections_threshold to
+#       invalid value
+SET @@global.connection_control_failed_connections_threshold = NULL;
+ERROR 42000: Incorrect argument type to variable 'connection_control_failed_connections_threshold'
+SELECT @@global.connection_control_failed_connections_threshold;
+@@global.connection_control_failed_connections_threshold
+3
+SET @@global.connection_control_failed_connections_threshold = `SELECT * FROM mysql.user`;
+ERROR 42000: Incorrect argument type to variable 'connection_control_failed_connections_threshold'
+SELECT @@global.connection_control_failed_connections_threshold;
+@@global.connection_control_failed_connections_threshold
+3
+SET @@global.connection_control_failed_connections_threshold = -20;
+ERROR 42000: Variable 'connection_control_failed_connections_threshold' can't be set to the value of '-20'
+SELECT @@global.connection_control_failed_connections_threshold;
+@@global.connection_control_failed_connections_threshold
+3
+SET @@global.connection_control_failed_connections_threshold = 9223372036854775808;
+ERROR 42000: Variable 'connection_control_failed_connections_threshold' can't be set to the value of '9223372036854775808'
+SELECT @@global.connection_control_failed_connections_threshold;
+@@global.connection_control_failed_connections_threshold
+3
+SET @@global.connection_control_failed_connections_threshold = -9223372036854775808;
+ERROR 42000: Variable 'connection_control_failed_connections_threshold' can't be set to the value of '-9223372036854775808'
+SELECT @@global.connection_control_failed_connections_threshold;
+@@global.connection_control_failed_connections_threshold
+3
+# Switch to conn_no_privs
+# 1.3 : Use no_privs@localhost to set
+#       connection_control_failed_connections_threshold to valid value
+SET @@global.connection_control_failed_connections_threshold = 2147483647;
+ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) for this operation
+SELECT @@global.connection_control_failed_connections_threshold;
+@@global.connection_control_failed_connections_threshold
+3
+SET @@global.connection_control_failed_connections_threshold = DEFAULT;
+ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) for this operation
+SELECT @@global.connection_control_failed_connections_threshold;
+@@global.connection_control_failed_connections_threshold
+3
+# 1.4 : Use no_privs@localhost to set
+#       connection_control_failed_connections_threshold to invalid value
+SET @@global.connection_control_failed_connections_threshold = NULL;
+ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) for this operation
+SELECT @@global.connection_control_failed_connections_threshold;
+@@global.connection_control_failed_connections_threshold
+3
+SET @@global.connection_control_failed_connections_threshold = 9223372036854775808;
+ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) for this operation
+SELECT @@global.connection_control_failed_connections_threshold;
+@@global.connection_control_failed_connections_threshold
+3
+SET @@global.connection_control_failed_connections_threshold = @saved_value;
+SELECT @@global.connection_control_failed_connections_threshold;
+@@global.connection_control_failed_connections_threshold
+3
+#-----------------------------------------------------------------------
+# Case 2 : connection_control_min_connection_delay
+SET @saved_value= @@global.connection_control_min_connection_delay;
+SELECT @saved_value;
+@saved_value
+1000
+# 2.1 : Setting connection_control_min_connection_delay to valid
+#       value
+SET @@global.connection_control_min_connection_delay = 20000;
+SELECT @@global.connection_control_min_connection_delay;
+@@global.connection_control_min_connection_delay
+20000
+SET @@global.connection_control_min_connection_delay = 2000;
+SELECT @@global.connection_control_min_connection_delay;
+@@global.connection_control_min_connection_delay
+2000
+SET @@global.connection_control_min_connection_delay = 2147483647;
+SELECT @@global.connection_control_min_connection_delay;
+@@global.connection_control_min_connection_delay
+2147483647
+SET @@global.connection_control_min_connection_delay = DEFAULT;
+SELECT @@global.connection_control_min_connection_delay;
+@@global.connection_control_min_connection_delay
+1000
+# 2.2 : Setting connection_control_min_connection_delay to
+#       invalid value
+SET @@global.connection_control_min_connection_delay = NULL;
+ERROR 42000: Incorrect argument type to variable 'connection_control_min_connection_delay'
+SELECT @@global.connection_control_min_connection_delay;
+@@global.connection_control_min_connection_delay
+1000
+SET @@global.connection_control_min_connection_delay = `SELECT * FROM mysql.user`;
+ERROR 42000: Incorrect argument type to variable 'connection_control_min_connection_delay'
+SELECT @@global.connection_control_min_connection_delay;
+@@global.connection_control_min_connection_delay
+1000
+SET @@global.connection_control_min_connection_delay = -20;
+ERROR 42000: Variable 'connection_control_min_connection_delay' can't be set to the value of '-20'
+SELECT @@global.connection_control_min_connection_delay;
+@@global.connection_control_min_connection_delay
+1000
+SET @@global.connection_control_min_connection_delay = 9223372036854775808;
+ERROR 42000: Variable 'connection_control_min_connection_delay' can't be set to the value of '9223372036854775808'
+SELECT @@global.connection_control_min_connection_delay;
+@@global.connection_control_min_connection_delay
+1000
+SET @@global.connection_control_min_connection_delay = -9223372036854775808;
+ERROR 42000: Variable 'connection_control_min_connection_delay' can't be set to the value of '-9223372036854775808'
+SELECT @@global.connection_control_min_connection_delay;
+@@global.connection_control_min_connection_delay
+1000
+SET@@global.connection_control_min_connection_delay = 20;
+ERROR 42000: Variable 'connection_control_min_connection_delay' can't be set to the value of '20'
+SELECT @@global.connection_control_min_connection_delay;
+@@global.connection_control_min_connection_delay
+1000
+# Switch to conn_no_privs
+# 2.3 : Use no_privs@localhost to set
+#       connection_control_min_connection_delay to valid value
+SET @@global.connection_control_min_connection_delay = 2147483647;
+ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) for this operation
+SELECT @@global.connection_control_min_connection_delay;
+@@global.connection_control_min_connection_delay
+1000
+SET @@global.connection_control_min_connection_delay = DEFAULT;
+ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) for this operation
+SELECT @@global.connection_control_min_connection_delay;
+@@global.connection_control_min_connection_delay
+1000
+# 2.4 : Use no_privs@localhost to set
+#       connection_control_min_connection_delay to invalid value
+SET @@global.connection_control_min_connection_delay = NULL;
+ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) for this operation
+SELECT @@global.connection_control_min_connection_delay;
+@@global.connection_control_min_connection_delay
+1000
+SET @@global.connection_control_min_connection_delay = 9223372036854775808;
+ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) for this operation
+SELECT @@global.connection_control_min_connection_delay;
+@@global.connection_control_min_connection_delay
+1000
+# Switch to default connection
+# 2.5 : Setting connection_control_min_connection_delay to a value
+#       greater than connection_control_max_connection_delay
+SET @saved_max_delay= @@global.connection_control_max_connection_delay;
+SET @@global.connection_control_max_connection_delay= 10000;
+SET @@global.connection_control_min_connection_delay= 11000;
+ERROR 42000: Variable 'connection_control_min_connection_delay' can't be set to the value of '11000'
+SELECT @@global.connection_control_min_connection_delay;
+@@global.connection_control_min_connection_delay
+1000
+SET @@global.connection_control_max_connection_delay= @saved_max_delay;
+SET @@global.connection_control_min_connection_delay = @saved_value;
+SELECT @@global.connection_control_min_connection_delay;
+@@global.connection_control_min_connection_delay
+1000
+#-----------------------------------------------------------------------
+# Case 3 : connection_control_max_connection_delay
+SET @saved_value= @@global.connection_control_max_connection_delay;
+SELECT @saved_value;
+@saved_value
+2147483647
+# 3.1 : Setting connection_control_max_connection_delay to valid
+#       value
+SET @@global.connection_control_max_connection_delay = 20000;
+SELECT @@global.connection_control_max_connection_delay;
+@@global.connection_control_max_connection_delay
+20000
+SET @@global.connection_control_max_connection_delay = 2000;
+SELECT @@global.connection_control_max_connection_delay;
+@@global.connection_control_max_connection_delay
+2000
+SET @@global.connection_control_max_connection_delay = 2147483647;
+SELECT @@global.connection_control_max_connection_delay;
+@@global.connection_control_max_connection_delay
+2147483647
+SET @@global.connection_control_max_connection_delay = DEFAULT;
+SELECT @@global.connection_control_max_connection_delay;
+@@global.connection_control_max_connection_delay
+2147483647
+# 3.2 : Setting connection_control_max_connection_delay to
+#       invalid value
+SET @@global.connection_control_max_connection_delay = NULL;
+ERROR 42000: Incorrect argument type to variable 'connection_control_max_connection_delay'
+SELECT @@global.connection_control_max_connection_delay;
+@@global.connection_control_max_connection_delay
+2147483647
+SET @@global.connection_control_max_connection_delay = `SELECT * FROM mysql.user`;
+ERROR 42000: Incorrect argument type to variable 'connection_control_max_connection_delay'
+SELECT @@global.connection_control_max_connection_delay;
+@@global.connection_control_max_connection_delay
+2147483647
+SET @@global.connection_control_max_connection_delay = -20;
+ERROR 42000: Variable 'connection_control_max_connection_delay' can't be set to the value of '-20'
+SELECT @@global.connection_control_max_connection_delay;
+@@global.connection_control_max_connection_delay
+2147483647
+SET @@global.connection_control_max_connection_delay = 9223372036854775808;
+ERROR 42000: Variable 'connection_control_max_connection_delay' can't be set to the value of '9223372036854775808'
+SELECT @@global.connection_control_max_connection_delay;
+@@global.connection_control_max_connection_delay
+2147483647
+SET @@global.connection_control_max_connection_delay = -9223372036854775808;
+ERROR 42000: Variable 'connection_control_max_connection_delay' can't be set to the value of '-9223372036854775808'
+SELECT @@global.connection_control_max_connection_delay;
+@@global.connection_control_max_connection_delay
+2147483647
+SET @@global.connection_control_max_connection_delay = 20;
+ERROR 42000: Variable 'connection_control_max_connection_delay' can't be set to the value of '20'
+SELECT @@global.connection_control_max_connection_delay;
+@@global.connection_control_max_connection_delay
+2147483647
+# Switch to conn_no_privs
+# 3.3 : Use no_privs@localhost to set
+#       connection_control_max_connection_delay to valid value
+SET @@global.connection_control_max_connection_delay = 2147483647;
+ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) for this operation
+SELECT @@global.connection_control_max_connection_delay;
+@@global.connection_control_max_connection_delay
+2147483647
+SET @@global.connection_control_max_connection_delay = DEFAULT;
+ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) for this operation
+SELECT @@global.connection_control_max_connection_delay;
+@@global.connection_control_max_connection_delay
+2147483647
+# 3.4 : Use no_privs@localhost to set
+#       connection_control_max_connection_delay to invalid value
+SET @@global.connection_control_max_connection_delay = NULL;
+ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) for this operation
+SELECT @@global.connection_control_max_connection_delay;
+@@global.connection_control_max_connection_delay
+2147483647
+SET @@global.connection_control_max_connection_delay = 9223372036854775808;
+ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) for this operation
+SELECT @@global.connection_control_max_connection_delay;
+@@global.connection_control_max_connection_delay
+2147483647
+# Switch to default connection
+# 3.5 : Setting connection_control_min_connection_delay to a value
+#       greater than connection_control_max_connection_delay
+SET @saved_min_delay= @@global.connection_control_min_connection_delay;
+SET @@global.connection_control_min_connection_delay= 11000;
+SET @@global.connection_control_max_connection_delay= 10000;
+ERROR 42000: Variable 'connection_control_max_connection_delay' can't be set to the value of '10000'
+SELECT @@global.connection_control_max_connection_delay;
+@@global.connection_control_max_connection_delay
+2147483647
+SET @@global.connection_control_min_connection_delay= @saved_min_delay;
+SET @@global.connection_control_max_connection_delay = @saved_value;
+SELECT @@global.connection_control_max_connection_delay;
+@@global.connection_control_max_connection_delay
+2147483647
+#-----------------------------------------------------------------------
+# Cleanup
+DROP USER no_privs@localhost;
+# Uninstall connection_control plugin
+UNINSTALL PLUGIN connection_control;
+UNINSTALL PLUGIN connection_control_failed_login_attempts;
+#-----------------------------------------------------------------------
diff --git a/mysql-wsrep-5.6/mysql-test/suite/connection_control/t/connection_delay_anonymous_user-master.opt b/mysql-wsrep-5.6/mysql-test/suite/connection_control/t/connection_delay_anonymous_user-master.opt
new file mode 100644 (file)
index 0000000..f12184b
--- /dev/null
@@ -0,0 +1 @@
+$CONNECTION_CONTROL_PLUGIN_OPT
diff --git a/mysql-wsrep-5.6/mysql-test/suite/connection_control/t/connection_delay_anonymous_user.test b/mysql-wsrep-5.6/mysql-test/suite/connection_control/t/connection_delay_anonymous_user.test
new file mode 100644 (file)
index 0000000..0d84d00
--- /dev/null
@@ -0,0 +1,101 @@
+# Skip the test in embedded mode
+--source include/not_embedded.inc
+
+# Make sure that connection_control plugin can be loaded
+--source ../inc/have_connection_control_plugin.inc
+
+# Save the initial number of concurrent sessions
+--source include/count_sessions.inc
+
+--echo # Connection delay tests for valid user accounts
+
+--echo
+--echo # ----------------------------------------------------------------------
+--echo
+
+--echo # Setup
+--echo # Install connection_control plugin
+--source ../inc/install_connection_control_plugin.inc
+
+--echo # Create anonymous user
+CREATE USER ''@'localhost';
+
+--echo # Save original values of connection_control variables
+SET @saved_connections_threshold = @@global.connection_control_failed_connections_threshold;
+SET @saved_max_delay = @@global.connection_control_max_connection_delay;
+
+-- echo # Set small values for connection_control variables
+SET @@global.connection_control_failed_connections_threshold = 3;
+SET @global.connection_control_max_connection_delay = 1000;
+
+# We don't need to use client side authentication plugin for this test.
+let $USE_AUTH_PLUGIN= 0;
+
+--echo
+--echo # ----------------------------------------------------------------------
+--echo
+
+--echo # Following attempts will not experience any delay in server respose
+
+let $USER=u1;
+let $PASSWORD=hoho;
+let $SUCCESS=0;
+let $DELAY_STATS=0;
+--source ../inc/check_connection_delay.inc
+
+let $USER=u2;
+let $PASSWORD=hoho;
+let $SUCCESS=0;
+let $DELAY_STATS=0;
+--source ../inc/check_connection_delay.inc
+
+let $USER=u3;
+let $PASSWORD=hoho;
+let $SUCCESS=0;
+let $DELAY_STATS=0;
+--source ../inc/check_connection_delay.inc
+
+--echo
+--echo # Following attempts will experience delay in server respose
+
+let $USER=u1;
+let $PASSWORD=hoho;
+let $SUCCESS=0;
+let $DELAY_STATS=1;
+--source ../inc/check_connection_delay.inc
+
+let $USER=u2;
+let $PASSWORD=hoho;
+let $SUCCESS=0;
+let $DELAY_STATS=2;
+--source ../inc/check_connection_delay.inc
+
+let $USER=u3;
+let $PASSWORD=hoho;
+let $SUCCESS=0;
+let $DELAY_STATS=3;
+--source ../inc/check_connection_delay.inc
+
+--echo
+--echo # ----------------------------------------------------------------------
+--echo
+
+--echo # Cleanup
+
+connection default;
+
+--echo # Restore original values of conenction_control variables
+SET @@global.connection_control_failed_connections_threshold = @saved_connections_threshold;
+SET @@global.connection_control_max_connection_delay = @saved_max_delay;
+
+--echo # Drop anonymous user
+DROP USER ''@'localhost';
+
+--echo # Uninstall connection_control plugin
+--source ../inc/uninstall_connection_control_plugin.inc
+
+# Wait till all disconnects are completed.
+--source include/wait_until_count_sessions.inc
+
+--echo
+--echo # ----------------------------------------------------------------------
diff --git a/mysql-wsrep-5.6/mysql-test/suite/connection_control/t/connection_delay_info_schema_view-master.opt b/mysql-wsrep-5.6/mysql-test/suite/connection_control/t/connection_delay_info_schema_view-master.opt
new file mode 100644 (file)
index 0000000..f12184b
--- /dev/null
@@ -0,0 +1 @@
+$CONNECTION_CONTROL_PLUGIN_OPT
diff --git a/mysql-wsrep-5.6/mysql-test/suite/connection_control/t/connection_delay_info_schema_view.test b/mysql-wsrep-5.6/mysql-test/suite/connection_control/t/connection_delay_info_schema_view.test
new file mode 100644 (file)
index 0000000..0f8c3f9
--- /dev/null
@@ -0,0 +1,198 @@
+# Skip the test in embedded mode
+--source include/not_embedded.inc
+
+# Make sure that connection_control plugin can be loaded
+--source ../inc/have_connection_control_plugin.inc
+
+# Save the initial number of concurrent sessions
+--source include/count_sessions.inc
+
+--echo # Connection delay tests for valid user accounts
+
+--echo
+--echo # ----------------------------------------------------------------------
+--echo
+
+--echo # Setup
+--echo # Install connection_control plugin
+--source ../inc/install_connection_control_plugin.inc
+
+--echo # Create user accounts for testing
+CREATE USER u1@localhost IDENTIFIED BY 'abcd';
+CREATE USER u2@localhost IDENTIFIED BY 'abcd';
+CREATE USER u3@localhost IDENTIFIED BY 'abcd';
+
+--echo # Save original values of connection_control variables
+SET @saved_connections_threshold = @@global.connection_control_failed_connections_threshold;
+
+-- echo # Avoid triggering delay
+SET @@global.connection_control_failed_connections_threshold = 100;
+
+# We don't need to use client side authentication plugin for this test.
+let $USE_AUTH_PLUGIN= 0;
+
+--echo
+--echo # ----------------------------------------------------------------------
+--echo
+
+--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
+--error ER_ACCESS_DENIED_ERROR
+connect(fail_con_u1, localhost, u1,,,,,);
+--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
+--error ER_ACCESS_DENIED_ERROR
+connect(fail_con_u1, localhost, u1,haha,,,,);
+--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
+--error ER_ACCESS_DENIED_ERROR
+connect(fail_con_u2, localhost, u2,efgh,,,,);
+
+-- echo # connection_control_failed_login_attempts should contain entries
+-- echo # for u1@localhost and u2@localhost
+
+--sorted_result
+SELECT * FROM INFORMATION_SCHEMA.connection_control_failed_login_attempts;
+
+--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
+--error ER_ACCESS_DENIED_ERROR
+connect(fail_con_u3, localhost, u3,,,,,);
+--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
+--error ER_ACCESS_DENIED_ERROR
+connect(fail_con_u2, localhost, u2,haha,,,,);
+--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
+--error ER_ACCESS_DENIED_ERROR
+connect(fail_con_u3, localhost, u3,efgh,,,,);
+
+-- echo # connection_control_failed_login_attempts should contain entries
+-- echo # for u1@localhost, u2@localhost and u3@localhost
+
+--sorted_result
+SELECT * FROM INFORMATION_SCHEMA.connection_control_failed_login_attempts;
+
+--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
+--error ER_ACCESS_DENIED_ERROR
+connect(fail_con_u2, localhost, u2,,,,,);
+--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
+--error ER_ACCESS_DENIED_ERROR
+connect(fail_con_u1, localhost, u1,haha,,,,);
+--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
+--error ER_ACCESS_DENIED_ERROR
+connect(fail_con_u3, localhost, u3,efgh,,,,);
+
+-- echo # failed connection counts should have increased for all users
+
+--sorted_result
+SELECT * FROM INFORMATION_SCHEMA.connection_control_failed_login_attempts;
+
+--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
+--error ER_ACCESS_DENIED_ERROR
+connect(fail_con_u2, localhost, u2,,,,,);
+--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
+--error ER_ACCESS_DENIED_ERROR
+connect(fail_con_u1, localhost, u1,haha,,,,);
+--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
+--error ER_ACCESS_DENIED_ERROR
+connect(fail_con_u3, localhost, u3,efgh,,,,);
+
+--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
+--error ER_ACCESS_DENIED_ERROR
+connect(fail_con_u1, localhost, u1,haha,,,,);
+--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
+--error ER_ACCESS_DENIED_ERROR
+connect(fail_con_u3, localhost, u3,efgh,,,,);
+
+--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
+--error ER_ACCESS_DENIED_ERROR
+connect(fail_con_u1, localhost, u1,haha,,,,);
+
+-- echo # Try various queries
+
+--sorted_result
+SELECT * FROM INFORMATION_SCHEMA.connection_control_failed_login_attempts
+  WHERE USERHOST = '\'u1\'@\'localhost\'';
+  
+--sorted_result
+SELECT * FROM INFORMATION_SCHEMA.connection_control_failed_login_attempts
+  WHERE USERHOST LIKE '%u2%';
+
+--sorted_result
+SELECT * FROM INFORMATION_SCHEMA.connection_control_failed_login_attempts
+  WHERE FAILED_ATTEMPTS > 4;
+
+--sorted_result
+SELECT * FROM INFORMATION_SCHEMA.connection_control_failed_login_attempts
+  WHERE FAILED_ATTEMPTS > 5;
+
+--sorted_result
+SELECT * FROM INFORMATION_SCHEMA.connection_control_failed_login_attempts
+  WHERE FAILED_ATTEMPTS < 5;
+  
+connect(con_u1, localhost, u1,abcd,,,,);
+connect(con_u2, localhost, u2,abcd,,,,);
+connection default;
+--disconnect con_u1
+--disconnect con_u2
+
+--echo # After successful login, corresponding entry should disappear
+--echo # from the view
+--sorted_result
+SELECT * FROM INFORMATION_SCHEMA.connection_control_failed_login_attempts;
+
+connect(con_u3, localhost, u3,abcd,,,,);
+--echo # A user without privileges should not be able to any information
+--sorted_result
+SELECT * FROM INFORMATION_SCHEMA.connection_control_failed_login_attempts;
+
+connection default;
+--disconnect con_u3
+
+--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
+--error ER_ACCESS_DENIED_ERROR
+connect(fail_con_u1, localhost, u1,,,,,);
+--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
+--error ER_ACCESS_DENIED_ERROR
+connect(fail_con_u3, localhost, u3,haha,,,,);
+--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
+--error ER_ACCESS_DENIED_ERROR
+connect(fail_con_u2, localhost, u2,efgh,,,,);
+
+-- echo # Subsequent failed attempts should put entries back in the view
+--sorted_result
+SELECT * FROM INFORMATION_SCHEMA.connection_control_failed_login_attempts;
+
+--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
+--error ER_ACCESS_DENIED_ERROR
+connect(fail_con_u4, localhost, u4,,,,,);
+--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
+--error ER_ACCESS_DENIED_ERROR
+connect(fail_con_u5, localhost, u5,haha,,,,);
+--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
+--error ER_ACCESS_DENIED_ERROR
+connect(fail_con_u6, localhost, u6,efgh,,,,);
+
+-- echo # Attempts by invalid accounts should be shown in the view
+--sorted_result
+SELECT * FROM INFORMATION_SCHEMA.connection_control_failed_login_attempts;
+
+--echo
+--echo # ----------------------------------------------------------------------
+--echo
+
+--echo # Cleanup
+
+connection default;
+
+--echo # Restore original values of conenction_control variables
+SET @@global.connection_control_failed_connections_threshold = @saved_connections_threshold;
+
+--echo # Remove user accounts created for the test
+DROP USER u1@localhost;
+DROP USER u2@localhost;
+DROP USER u3@localhost;
+
+--echo # Uninstall connection_control plugin
+--source ../inc/uninstall_connection_control_plugin.inc
+
+# Wait till all disconnects are completed.
+--source include/wait_until_count_sessions.inc
+
+--echo
+--echo # ----------------------------------------------------------------------
diff --git a/mysql-wsrep-5.6/mysql-test/suite/connection_control/t/connection_delay_invalid_users-master.opt b/mysql-wsrep-5.6/mysql-test/suite/connection_control/t/connection_delay_invalid_users-master.opt
new file mode 100644 (file)
index 0000000..f12184b
--- /dev/null
@@ -0,0 +1 @@
+$CONNECTION_CONTROL_PLUGIN_OPT
diff --git a/mysql-wsrep-5.6/mysql-test/suite/connection_control/t/connection_delay_invalid_users.test b/mysql-wsrep-5.6/mysql-test/suite/connection_control/t/connection_delay_invalid_users.test
new file mode 100644 (file)
index 0000000..f0933c0
--- /dev/null
@@ -0,0 +1,156 @@
+# Skip the test in embedded mode
+--source include/not_embedded.inc
+
+# Make sure that connection_control plugin can be loaded
+--source ../inc/have_connection_control_plugin.inc
+
+# Save the initial number of concurrent sessions
+--source include/count_sessions.inc
+
+--echo # Connection delay tests for valid user accounts
+
+--echo
+--echo # ----------------------------------------------------------------------
+--echo
+
+--echo # Setup
+--echo # Install connection_control plugin
+--source ../inc/install_connection_control_plugin.inc
+
+--echo # Save original values of connection_control variables
+SET @saved_connections_threshold = @@global.connection_control_failed_connections_threshold;
+SET @saved_max_delay = @@global.connection_control_max_connection_delay;
+
+-- echo # Set small values for connection_control variables
+SET @@global.connection_control_failed_connections_threshold = 3;
+SET @@global.connection_control_max_connection_delay = 1000;
+
+# We don't need to use client side authentication plugin for this test.
+let $USE_AUTH_PLUGIN= 0;
+
+--echo
+--echo # ----------------------------------------------------------------------
+--echo
+
+--echo # Following attempts will not experience any delay in server respose
+
+let $USER=u1;
+let $PASSWORD=hoho;
+let $SUCCESS=0;
+let $DELAY_STATS=0;
+--source ../inc/check_connection_delay.inc
+
+let $USER=u2;
+let $PASSWORD=hoho;
+let $SUCCESS=0;
+let $DELAY_STATS=0;
+--source ../inc/check_connection_delay.inc
+
+let $USER=u3;
+let $PASSWORD=hoho;
+let $SUCCESS=0;
+let $DELAY_STATS=0;
+--source ../inc/check_connection_delay.inc
+
+let $USER=u1;
+let $PASSWORD=hoho;
+let $SUCCESS=0;
+let $DELAY_STATS=0;
+--source ../inc/check_connection_delay.inc
+
+let $USER=u2;
+let $PASSWORD=hoho;
+let $SUCCESS=0;
+let $DELAY_STATS=0;
+--source ../inc/check_connection_delay.inc
+
+let $USER=u3;
+let $PASSWORD=hoho;
+let $SUCCESS=0;
+let $DELAY_STATS=0;
+--source ../inc/check_connection_delay.inc
+
+let $USER=u1;
+let $PASSWORD=hoho;
+let $SUCCESS=0;
+let $DELAY_STATS=0;
+--source ../inc/check_connection_delay.inc
+
+let $USER=u2;
+let $PASSWORD=hoho;
+let $SUCCESS=0;
+let $DELAY_STATS=0;
+--source ../inc/check_connection_delay.inc
+
+let $USER=u3;
+let $PASSWORD=hoho;
+let $SUCCESS=0;
+let $DELAY_STATS=0;
+--source ../inc/check_connection_delay.inc
+
+--echo
+--echo # Following attempts will experience delay in server respose
+
+let $USER=u1;
+let $PASSWORD=hoho;
+let $SUCCESS=0;
+let $DELAY_STATS=1;
+--source ../inc/check_connection_delay.inc
+
+let $USER=u2;
+let $PASSWORD=hoho;
+let $SUCCESS=0;
+let $DELAY_STATS=2;
+--source ../inc/check_connection_delay.inc
+
+let $USER=u3;
+let $PASSWORD=hoho;
+let $SUCCESS=0;
+let $DELAY_STATS=3;
+--source ../inc/check_connection_delay.inc
+
+--sorted_result
+SELECT * FROM INFORMATION_SCHEMA.connection_control_failed_login_attempts;
+
+let $USER=u3;
+let $PASSWORD=abcd;
+let $SUCCESS=0;
+let $DELAY_STATS=4;
+--source ../inc/check_connection_delay.inc
+
+let $USER=u2;
+let $PASSWORD=abcd;
+let $SUCCESS=0;
+let $DELAY_STATS=5;
+--source ../inc/check_connection_delay.inc
+
+let $USER=u1;
+let $PASSWORD=abcd;
+let $SUCCESS=0;
+let $DELAY_STATS=6;
+--source ../inc/check_connection_delay.inc
+
+--sorted_result
+SELECT * FROM INFORMATION_SCHEMA.connection_control_failed_login_attempts;
+
+--echo
+--echo # ----------------------------------------------------------------------
+--echo
+
+--echo # Cleanup
+
+connection default;
+
+--echo # Restore original values of conenction_control variables
+SET @@global.connection_control_failed_connections_threshold = @saved_connections_threshold;
+SET @@global.connection_control_max_connection_delay = @saved_max_delay;
+
+
+--echo # Uninstall connection_control plugin
+--source ../inc/uninstall_connection_control_plugin.inc
+
+# Wait till all disconnects are completed.
+--source include/wait_until_count_sessions.inc
+
+--echo
+--echo # ----------------------------------------------------------------------
diff --git a/mysql-wsrep-5.6/mysql-test/suite/connection_control/t/connection_delay_min_max-master.opt b/mysql-wsrep-5.6/mysql-test/suite/connection_control/t/connection_delay_min_max-master.opt
new file mode 100644 (file)
index 0000000..f12184b
--- /dev/null
@@ -0,0 +1 @@
+$CONNECTION_CONTROL_PLUGIN_OPT
diff --git a/mysql-wsrep-5.6/mysql-test/suite/connection_control/t/connection_delay_min_max.test b/mysql-wsrep-5.6/mysql-test/suite/connection_control/t/connection_delay_min_max.test
new file mode 100644 (file)
index 0000000..40bb0f3
--- /dev/null
@@ -0,0 +1,152 @@
+# Skip the test in embedded mode
+--source include/not_embedded.inc
+
+# Make sure that connection_control plugin can be loaded
+--source ../inc/have_connection_control_plugin.inc
+
+# Save the initial number of concurrent sessions
+--source include/count_sessions.inc
+
+--echo # Connection delay tests for valid user accounts
+
+--echo
+--echo # ----------------------------------------------------------------------
+--echo
+
+--echo # Setup
+--echo # Install connection_control plugin
+--source ../inc/install_connection_control_plugin.inc
+
+--echo # Create user account for testing
+CREATE USER u1 IDENTIFIED BY 'abcd';
+
+--echo # Save original values of connection_control variables
+SET @saved_connections_threshold = @@global.connection_control_failed_connections_threshold;
+SET @saved_max_delay = @@global.connection_control_max_connection_delay;
+SET @saved_min_delay = @@global.connection_control_min_connection_delay;
+
+-- echo # Set small values for connection_control variables
+SET @@global.connection_control_failed_connections_threshold = 3;
+SET @@global.connection_control_max_connection_delay = 4000;
+SET @@global.connection_control_min_connection_delay = 2000;
+
+# We don't need to use client side authentication plugin for this test.
+let $USE_AUTH_PLUGIN= 0;
+
+--echo
+--echo # ----------------------------------------------------------------------
+--echo
+
+--echo # Make enough failed attempts to trigger delays
+
+disable_result_log;
+
+--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
+--error ER_ACCESS_DENIED_ERROR
+connect(fail_con_u1, localhost, u1,,,,,);
+--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
+--error ER_ACCESS_DENIED_ERROR
+connect(fail_con_u1, localhost, u1,haha,,,,);
+--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
+--error ER_ACCESS_DENIED_ERROR
+connect(fail_con_u1, localhost, u1,haha,,,,);
+
+enable_result_log;
+
+--echo
+--echo # Following attempts will experience delay in server respose
+
+# Trying with invalid passwords
+
+--source ../inc/set_before_marker.inc
+
+let $USER=u1;
+let $PASSWORD=hoho;
+let $SUCCESS=0;
+let $DELAY_STATS=1;
+--source ../inc/check_connection_delay.inc
+
+let $SERVER_RESPONSE_TIME= 2;
+--source ../inc/set_after_marker.inc
+
+--source ../inc/set_before_marker.inc
+let $USER=u1;
+let $PASSWORD=hoho;
+let $SUCCESS=0;
+let $DELAY_STATS=2;
+--source ../inc/check_connection_delay.inc
+
+let $SERVER_RESPONSE_TIME= 2;
+--source ../inc/set_after_marker.inc
+
+--source ../inc/set_before_marker.inc
+let $USER=u1;
+let $PASSWORD=hoho;
+let $SUCCESS=0;
+let $DELAY_STATS=3;
+--source ../inc/check_connection_delay.inc
+
+let $SERVER_RESPONSE_TIME= 3;
+--source ../inc/set_after_marker.inc
+
+--source ../inc/set_before_marker.inc
+let $USER=u1;
+let $PASSWORD=hoho;
+let $SUCCESS=0;
+let $DELAY_STATS=4;
+--source ../inc/check_connection_delay.inc
+
+let $SERVER_RESPONSE_TIME= 4;
+--source ../inc/set_after_marker.inc
+
+# Trying with valid passwords
+
+--source ../inc/set_before_marker.inc
+let $USER=u1;
+let $PASSWORD=abcd;
+let $SUCCESS=1;
+let $DELAY_STATS=5;
+--source ../inc/check_connection_delay.inc
+
+let $SERVER_RESPONSE_TIME= 4;
+--source ../inc/set_after_marker.inc
+
+--echo
+--echo # Following attempts will not experience any delay in server respose
+
+let $USER=u1;
+let $PASSWORD=hoho;
+let $SUCCESS=0;
+let $DELAY_STATS=5;
+--source ../inc/check_connection_delay.inc
+
+let $USER=u1;
+let $PASSWORD=abcd;
+let $SUCCESS=1;
+let $DELAY_STATS=5;
+--source ../inc/check_connection_delay.inc
+
+--echo
+--echo # ----------------------------------------------------------------------
+--echo
+
+--echo # Cleanup
+
+connection default;
+
+--echo # Restore original values of conenction_control variables
+SET @@global.connection_control_failed_connections_threshold = @saved_connections_threshold;
+SET @@global.connection_control_max_connection_delay = @saved_max_delay;
+SET @@global.connection_control_min_connection_delay = @saved_min_delay;
+
+--echo # Remove user account created for the test
+DROP USER u1;
+
+--echo # Uninstall connection_control plugin
+--source ../inc/uninstall_connection_control_plugin.inc
+
+# Wait till all disconnects are completed.
+--source include/wait_until_count_sessions.inc
+
+--echo
+--echo # ----------------------------------------------------------------------
diff --git a/mysql-wsrep-5.6/mysql-test/suite/connection_control/t/connection_delay_proxy_users-master.opt b/mysql-wsrep-5.6/mysql-test/suite/connection_control/t/connection_delay_proxy_users-master.opt
new file mode 100644 (file)
index 0000000..f12184b
--- /dev/null
@@ -0,0 +1 @@
+$CONNECTION_CONTROL_PLUGIN_OPT
diff --git a/mysql-wsrep-5.6/mysql-test/suite/connection_control/t/connection_delay_proxy_users.test b/mysql-wsrep-5.6/mysql-test/suite/connection_control/t/connection_delay_proxy_users.test
new file mode 100644 (file)
index 0000000..77b6e1e
--- /dev/null
@@ -0,0 +1,203 @@
+# Skip the test in embedded mode
+--source include/not_embedded.inc
+
+# Make sure that connection_control plugin can be loaded
+--source ../inc/have_connection_control_plugin.inc
+--source ../inc/have_test_plugin.inc
+
+# Save the initial number of concurrent sessions
+--source include/count_sessions.inc
+
+--echo #-----------------------------------------------------------------------
+--echo # Setup
+--echo # Install connection_control plugin
+--source ../inc/install_connection_control_plugin.inc
+--echo # Do proxy setup
+--source ../inc/setup_proxy_accounts.inc
+
+# Suppress error messages from test_plugin_server
+CALL mtr.add_suppression("Plugin test_plugin_server reported: 'Wrong password supplied for proxied'");
+
+# Save original values of connection_control variables
+SET @saved_connections_threshold = @@global.connection_control_failed_connections_threshold;
+SET @saved_max_delay = @@global.connection_control_max_connection_delay;
+SET @saved_min_delay= @@global.connection_control_min_connection_delay;
+
+# Set a small values for connection_control variables
+SET @@global.connection_control_failed_connections_threshold = 3;
+SET @@global.connection_control_max_connection_delay = 4000;
+SET @@global.connection_control_min_connection_delay = 2000;
+
+# We will use client side authentication plugin for this test.
+let $USE_AUTH_PLUGIN= 1;
+let $CLIENT_AUTH_PLUGIN= $PLUGIN_AUTH_OPT;
+
+--echo #-----------------------------------------------------------------------
+
+--echo # Case 1 : Testss for valid user accounts
+
+--echo # Make enough failed attempts to trigger delays
+
+disable_result_log;
+
+--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
+--error ER_ACCESS_DENIED_ERROR
+connect(fail_con_u1, localhost, u1,,,,,);
+--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
+--error ER_ACCESS_DENIED_ERROR
+connect(fail_con_u1, localhost, u1,haha,,,,);
+--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
+--error ER_ACCESS_DENIED_ERROR
+connect(fail_con_u1, localhost, u2,efgh,,,,);
+
+--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
+--error ER_ACCESS_DENIED_ERROR
+connect(fail_con_u1, localhost, u3,,,,,);
+--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
+--error ER_ACCESS_DENIED_ERROR
+connect(fail_con_u1, localhost, u2,haha,,,,);
+--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
+--error ER_ACCESS_DENIED_ERROR
+connect(fail_con_u1, localhost, u3,efgh,,,,);
+
+--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
+--error ER_ACCESS_DENIED_ERROR
+connect(fail_con_u1, localhost, u2,,,,,);
+--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
+--error ER_ACCESS_DENIED_ERROR
+connect(fail_con_u1, localhost, u1,haha,,,,);
+--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
+--error ER_ACCESS_DENIED_ERROR
+connect(fail_con_u1, localhost, u3,efgh,,,,);
+
+enable_result_log;
+
+--echo # Following attempts will experience delay in server respose
+
+# Trying with invalid passwords
+
+--source ../inc/set_before_marker.inc
+let $USER=u1;
+let $PASSWORD=hoho;
+let $SUCCESS=0;
+let $DELAY_STATS=1;
+--source ../inc/check_connection_delay.inc
+
+let $SERVER_RESPONSE_TIME= 2;
+--source ../inc/set_after_marker.inc
+
+--source ../inc/set_before_marker.inc
+let $USER=u2;
+let $PASSWORD=hoho;
+let $SUCCESS=0;
+let $DELAY_STATS=2;
+--source ../inc/check_connection_delay.inc
+
+let $SERVER_RESPONSE_TIME= 2;
+--source ../inc/set_after_marker.inc
+
+--source ../inc/set_before_marker.inc
+let $USER=u3;
+let $PASSWORD=hoho;
+let $SUCCESS=0;
+let $DELAY_STATS=3;
+--source ../inc/check_connection_delay.inc
+
+let $SERVER_RESPONSE_TIME= 2;
+--source ../inc/set_after_marker.inc
+
+# Trying with valid passwords
+# Even though u1@localhost, u2@localhost and u3@localhost are
+# proxying same user - proxied@localhost, we will not use
+# proxied@localohst for recording failed attempts information.
+# Rather, we will rely on proxying users' data.
+# So each of the following should get delay of 2 seconds
+# or more.
+
+--source ../inc/set_before_marker.inc
+let $USER=u3;
+let $PASSWORD=proxied;
+let $SUCCESS=1;
+let $DELAY_STATS=4;
+--source ../inc/check_connection_delay.inc
+
+let $SERVER_RESPONSE_TIME= 2;
+--source ../inc/set_after_marker.inc
+
+--source ../inc/set_before_marker.inc
+let $USER=u2;
+let $PASSWORD=proxied;
+let $SUCCESS=1;
+let $DELAY_STATS=5;
+--source ../inc/check_connection_delay.inc
+
+let $SERVER_RESPONSE_TIME= 2;
+--source ../inc/set_after_marker.inc
+
+--source ../inc/set_before_marker.inc
+let $USER=u1;
+let $PASSWORD=proxied;
+let $SUCCESS=1;
+let $DELAY_STATS=6;
+--source ../inc/check_connection_delay.inc
+
+let $SERVER_RESPONSE_TIME= 2;
+--source ../inc/set_after_marker.inc
+
+
+--echo # Following attempts will not experience any delay in server respose
+
+let $USER=u1;
+let $PASSWORD=hoho;
+let $SUCCESS=0;
+let $DELAY_STATS=6;
+--source ../inc/check_connection_delay.inc
+
+let $USER=u2;
+let $PASSWORD=hoho;
+let $SUCCESS=0;
+let $DELAY_STATS=6;
+--source ../inc/check_connection_delay.inc
+
+let $USER=u3;
+let $PASSWORD=hoho;
+let $SUCCESS=0;
+let $DELAY_STATS=6;
+--source ../inc/check_connection_delay.inc
+
+let $USER=u1;
+let $PASSWORD=proxied;
+let $SUCCESS=1;
+let $DELAY_STATS=6;
+--source ../inc/check_connection_delay.inc
+
+let $USER=u2;
+let $PASSWORD=proxied;
+let $SUCCESS=1;
+let $DELAY_STATS=6;
+--source ../inc/check_connection_delay.inc
+
+let $USER=u3;
+let $PASSWORD=proxied;
+let $SUCCESS=1;
+let $DELAY_STATS=6;
+--source ../inc/check_connection_delay.inc
+
+--echo #-----------------------------------------------------------------------
+--echo # Cleanup
+
+connection default;
+
+# Restore original values of conenction_control variables
+SET @@global.connection_control_failed_connections_threshold = @saved_connections_threshold;
+SET @@global.connection_control_max_connection_delay = @saved_max_delay;
+SET @@global.connection_control_min_connection_delay = @saved_min_delay;
+
+--echo # Remove user accounts
+--source ../inc/cleanup_proxy_accounts.inc
+--echo # Uninstall connection_control plugin
+--source ../inc/uninstall_connection_control_plugin.inc
+
+# Wait till all disconnects are completed.
+--source include/wait_until_count_sessions.inc
+--echo #-----------------------------------------------------------------------
diff --git a/mysql-wsrep-5.6/mysql-test/suite/connection_control/t/connection_delay_valid_users-master.opt b/mysql-wsrep-5.6/mysql-test/suite/connection_control/t/connection_delay_valid_users-master.opt
new file mode 100644 (file)
index 0000000..f12184b
--- /dev/null
@@ -0,0 +1 @@
+$CONNECTION_CONTROL_PLUGIN_OPT
diff --git a/mysql-wsrep-5.6/mysql-test/suite/connection_control/t/connection_delay_valid_users.test b/mysql-wsrep-5.6/mysql-test/suite/connection_control/t/connection_delay_valid_users.test
new file mode 100644 (file)
index 0000000..ded7c18
--- /dev/null
@@ -0,0 +1,209 @@
+# Skip the test in embedded mode
+--source include/not_embedded.inc
+
+# Make sure that connection_control plugin can be loaded
+--source ../inc/have_connection_control_plugin.inc
+
+# Save the initial number of concurrent sessions
+--source include/count_sessions.inc
+
+--echo # Connection delay tests for valid user accounts
+
+--echo
+--echo # ----------------------------------------------------------------------
+--echo
+
+--echo # Setup
+--echo # Install connection_control plugin
+--source ../inc/install_connection_control_plugin.inc
+
+--echo # Create user accounts for testing
+CREATE USER u1 IDENTIFIED BY 'abcd';
+CREATE USER u2 IDENTIFIED BY 'abcd';
+CREATE USER u3 IDENTIFIED BY 'abcd';
+
+--echo # Save original values of connection_control variables
+SET @saved_connections_threshold = @@global.connection_control_failed_connections_threshold;
+SET @saved_max_delay = @@global.connection_control_max_connection_delay;
+SET @saved_min_delay= @@global.connection_control_min_connection_delay;
+
+-- echo # Set small values for connection_control variables
+SET @@global.connection_control_failed_connections_threshold = 3;
+SET @@global.connection_control_max_connection_delay = 4000;
+SET @@global.connection_control_min_connection_delay = 2000;
+
+# We don't need to use client side authentication plugin for this test.
+let $USE_AUTH_PLUGIN= 0;
+
+--echo
+--echo # ----------------------------------------------------------------------
+--echo
+
+--echo # Make enough failed attempts to trigger delays
+
+disable_result_log;
+
+--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
+--error ER_ACCESS_DENIED_ERROR
+connect(fail_con_u1, localhost, u1,,,,,);
+--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
+--error ER_ACCESS_DENIED_ERROR
+connect(fail_con_u1, localhost, u1,haha,,,,);
+--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
+--error ER_ACCESS_DENIED_ERROR
+connect(fail_con_u2, localhost, u2,efgh,,,,);
+
+--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
+--error ER_ACCESS_DENIED_ERROR
+connect(fail_con_u3, localhost, u3,,,,,);
+--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
+--error ER_ACCESS_DENIED_ERROR
+connect(fail_con_u2, localhost, u2,haha,,,,);
+--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
+--error ER_ACCESS_DENIED_ERROR
+connect(fail_con_u3, localhost, u3,efgh,,,,);
+
+--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
+--error ER_ACCESS_DENIED_ERROR
+connect(fail_con_u2, localhost, u2,,,,,);
+--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
+--error ER_ACCESS_DENIED_ERROR
+connect(fail_con_u1, localhost, u1,haha,,,,);
+--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
+--error ER_ACCESS_DENIED_ERROR
+connect(fail_con_u3, localhost, u3,efgh,,,,);
+
+enable_result_log;
+
+--echo
+--echo # Following attempts will experience delay in server respose
+
+# Trying with invalid passwords
+
+--source ../inc/set_before_marker.inc
+let $USER=u1;
+let $PASSWORD=hoho;
+let $SUCCESS=0;
+let $DELAY_STATS=1;
+--source ../inc/check_connection_delay.inc
+
+let $SERVER_RESPONSE_TIME= 2;
+--source ../inc/set_after_marker.inc
+
+--source ../inc/set_before_marker.inc
+let $USER=u2;
+let $PASSWORD=hoho;
+let $SUCCESS=0;
+let $DELAY_STATS=2;
+--source ../inc/check_connection_delay.inc
+
+let $SERVER_RESPONSE_TIME= 2;
+--source ../inc/set_after_marker.inc
+
+--source ../inc/set_before_marker.inc
+let $USER=u3;
+let $PASSWORD=hoho;
+let $SUCCESS=0;
+let $DELAY_STATS=3;
+--source ../inc/check_connection_delay.inc
+
+let $SERVER_RESPONSE_TIME= 2;
+--source ../inc/set_after_marker.inc
+
+# Trying with valid passwords
+
+--source ../inc/set_before_marker.inc
+let $USER=u3;
+let $PASSWORD=abcd;
+let $SUCCESS=1;
+let $DELAY_STATS=4;
+--source ../inc/check_connection_delay.inc
+
+let $SERVER_RESPONSE_TIME= 2;
+--source ../inc/set_after_marker.inc
+
+--source ../inc/set_before_marker.inc
+let $USER=u2;
+let $PASSWORD=abcd;
+let $SUCCESS=1;
+let $DELAY_STATS=5;
+--source ../inc/check_connection_delay.inc
+
+let $SERVER_RESPONSE_TIME= 2;
+--source ../inc/set_after_marker.inc
+
+--source ../inc/set_before_marker.inc
+let $USER=u1;
+let $PASSWORD=abcd;
+let $SUCCESS=1;
+let $DELAY_STATS=6;
+--source ../inc/check_connection_delay.inc
+
+let $SERVER_RESPONSE_TIME= 2;
+--source ../inc/set_after_marker.inc
+
+--echo
+--echo # Following attempts will not experience any delay in server respose
+
+let $USER=u1;
+let $PASSWORD=hoho;
+let $SUCCESS=0;
+let $DELAY_STATS=6;
+--source ../inc/check_connection_delay.inc
+
+let $USER=u2;
+let $PASSWORD=hoho;
+let $SUCCESS=0;
+let $DELAY_STATS=6;
+--source ../inc/check_connection_delay.inc
+
+let $USER=u3;
+let $PASSWORD=hoho;
+let $SUCCESS=0;
+let $DELAY_STATS=6;
+--source ../inc/check_connection_delay.inc
+
+let $USER=u1;
+let $PASSWORD=abcd;
+let $SUCCESS=1;
+let $DELAY_STATS=6;
+--source ../inc/check_connection_delay.inc
+
+let $USER=u2;
+let $PASSWORD=abcd;
+let $SUCCESS=1;
+let $DELAY_STATS=6;
+--source ../inc/check_connection_delay.inc
+
+let $USER=u3;
+let $PASSWORD=abcd;
+let $SUCCESS=1;
+let $DELAY_STATS=6;
+--source ../inc/check_connection_delay.inc
+
+--echo
+--echo # ----------------------------------------------------------------------
+--echo
+
+--echo # Cleanup
+
+connection default;
+
+--echo # Restore original values of conenction_control variables
+SET @@global.connection_control_failed_connections_threshold = @saved_connections_threshold;
+SET @@global.connection_control_max_connection_delay = @saved_max_delay;
+SET @@global.connection_control_min_connection_delay = @saved_min_delay;
+
+--echo # Remove user accounts created for the test
+DROP USER u1;
+DROP USER u2;
+DROP USER u3;
+
+--echo # Uninstall connection_control plugin
+--source ../inc/uninstall_connection_control_plugin.inc
+
+# Wait till all disconnects are completed.
+--source include/wait_until_count_sessions.inc
+
+--echo
+--echo # ----------------------------------------------------------------------
diff --git a/mysql-wsrep-5.6/mysql-test/suite/connection_control/t/status_variables-master.opt b/mysql-wsrep-5.6/mysql-test/suite/connection_control/t/status_variables-master.opt
new file mode 100644 (file)
index 0000000..f12184b
--- /dev/null
@@ -0,0 +1 @@
+$CONNECTION_CONTROL_PLUGIN_OPT
diff --git a/mysql-wsrep-5.6/mysql-test/suite/connection_control/t/status_variables.test b/mysql-wsrep-5.6/mysql-test/suite/connection_control/t/status_variables.test
new file mode 100644 (file)
index 0000000..f3f3ad0
--- /dev/null
@@ -0,0 +1,152 @@
+# Skip the test in embedded mode
+--source include/not_embedded.inc
+
+# Make sure that connection_control plugin can be loaded
+--source ../inc/have_connection_control_plugin.inc
+
+# Save the initial number of concurrent sessions
+--source include/count_sessions.inc
+
+--echo # Connection delay tests for valid user accounts
+
+--echo
+--echo # ----------------------------------------------------------------------
+--echo
+
+--echo # Setup
+--echo # Install connection_control plugin
+--source ../inc/install_connection_control_plugin.inc
+
+--echo # Create user accounts for testing
+CREATE USER u1@localhost IDENTIFIED BY 'abcd';
+CREATE USER u2@localhost IDENTIFIED BY 'abcd';
+CREATE USER u3@localhost IDENTIFIED BY 'abcd';
+
+--echo # Save original values of connection_control variables
+SET @saved_connections_threshold = @@global.connection_control_failed_connections_threshold;
+SET @saved_max_delay= @@global.connection_control_max_connection_delay;
+
+-- echo # Set small threshold
+SET @@global.connection_control_failed_connections_threshold = 1;
+-- echo # Set small max delay
+SET @@global.connection_control_max_connection_delay = 1000;
+
+# We don't need to use client side authentication plugin for this test.
+let $USE_AUTH_PLUGIN= 0;
+
+--echo
+--echo # ----------------------------------------------------------------------
+--echo
+
+--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
+--error ER_ACCESS_DENIED_ERROR
+connect(fail_con_u1, localhost, u1,,,,,);
+--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
+--error ER_ACCESS_DENIED_ERROR
+connect(fail_con_u3, localhost, u3,haha,,,,);
+--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
+--error ER_ACCESS_DENIED_ERROR
+connect(fail_con_u2, localhost, u2,efgh,,,,);
+
+--echo # Check  Connection_control_delay_generated - Should be 0
+SHOW STATUS LIKE 'Connection_control_delay_generated';
+
+--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
+--error ER_ACCESS_DENIED_ERROR
+connect(fail_con_u1, localhost, u1,,,,,);
+--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
+--error ER_ACCESS_DENIED_ERROR
+connect(fail_con_u2, localhost, u2,haha,,,,);
+--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
+--error ER_ACCESS_DENIED_ERROR
+connect(fail_con_u3, localhost, u3,efgh,,,,);
+
+--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
+--error ER_ACCESS_DENIED_ERROR
+connect(fail_con_u2, localhost, u2,,,,,);
+--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
+--error ER_ACCESS_DENIED_ERROR
+connect(fail_con_u1, localhost, u1,haha,,,,);
+--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
+--error ER_ACCESS_DENIED_ERROR
+connect(fail_con_u3, localhost, u3,efgh,,,,);
+
+--echo # Check Connection_control_delay_generated - Should be 6
+SHOW STATUS LIKE 'Connection_control_delay_generated';
+
+--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
+--error ER_ACCESS_DENIED_ERROR
+connect(fail_con_u2, localhost, u2,,,,,);
+--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
+--error ER_ACCESS_DENIED_ERROR
+connect(fail_con_u1, localhost, u1,haha,,,,);
+--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
+--error ER_ACCESS_DENIED_ERROR
+connect(fail_con_u3, localhost, u3,efgh,,,,);
+
+--echo # Check Connection_control_delay_generated - Should be 9
+SHOW STATUS LIKE 'Connection_control_delay_generated';
+
+connect(con_u1, localhost, u1,abcd,,,,);
+connect(con_u2, localhost, u2,abcd,,,,);
+connect(con_u3, localhost, u3,abcd,,,,);
+connection default;
+--disconnect con_u1
+--disconnect con_u2
+--disconnect con_u3
+
+--echo # Successful connection but delays would still be generated
+--echo # Should be 12
+SHOW STATUS LIKE 'Connection_control_delay_generated';
+
+--echo # Setting failed connection threshold should reset delay statistics
+SET @@global.connection_control_failed_connections_threshold = 1;
+
+--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
+--error ER_ACCESS_DENIED_ERROR
+connect(fail_con_u1, localhost, u1,,,,,);
+--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
+--error ER_ACCESS_DENIED_ERROR
+connect(fail_con_u3, localhost, u3,haha,,,,);
+--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
+--error ER_ACCESS_DENIED_ERROR
+connect(fail_con_u2, localhost, u2,efgh,,,,);
+
+--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
+--error ER_ACCESS_DENIED_ERROR
+connect(fail_con_u1, localhost, u1,,,,,);
+--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
+--error ER_ACCESS_DENIED_ERROR
+connect(fail_con_u3, localhost, u3,haha,,,,);
+--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
+--error ER_ACCESS_DENIED_ERROR
+connect(fail_con_u2, localhost, u2,efgh,,,,);
+
+--echo # Check Connection_control_delay_generated - Should be 3
+SHOW STATUS LIKE 'Connection_control_delay_generated';
+
+--echo
+--echo # ----------------------------------------------------------------------
+--echo
+
+--echo # Cleanup
+
+connection default;
+
+--echo # Restore original values of conenction_control variables
+SET @@global.connection_control_max_connection_delay= @saved_max_delay;
+SET @@global.connection_control_failed_connections_threshold = @saved_connections_threshold;
+
+--echo # Remove user accounts created for the test
+DROP USER u1@localhost;
+DROP USER u2@localhost;
+DROP USER u3@localhost;
+
+--echo # Uninstall connection_control plugin
+--source ../inc/uninstall_connection_control_plugin.inc
+
+# Wait till all disconnects are completed.
+--source include/wait_until_count_sessions.inc
+
+--echo
+--echo # ----------------------------------------------------------------------
diff --git a/mysql-wsrep-5.6/mysql-test/suite/connection_control/t/system_variables-master.opt b/mysql-wsrep-5.6/mysql-test/suite/connection_control/t/system_variables-master.opt
new file mode 100644 (file)
index 0000000..f12184b
--- /dev/null
@@ -0,0 +1 @@
+$CONNECTION_CONTROL_PLUGIN_OPT
diff --git a/mysql-wsrep-5.6/mysql-test/suite/connection_control/t/system_variables.test b/mysql-wsrep-5.6/mysql-test/suite/connection_control/t/system_variables.test
new file mode 100644 (file)
index 0000000..b83e4d7
--- /dev/null
@@ -0,0 +1,281 @@
+# Skip the test in embedded mode
+--source include/not_embedded.inc
+
+# Make sure that connection_control plugin can be loaded
+--source ../inc/have_connection_control_plugin.inc
+
+# Save the initial number of concurrent sessions
+--source include/count_sessions.inc
+
+--echo #-----------------------------------------------------------------------
+--echo # Setup
+--echo # Install connection_control plugin
+--source ../inc/install_connection_control_plugin.inc
+CREATE USER no_privs@localhost IDENTIFIED BY 'abcd';
+connect(conn_no_privs, localhost, no_privs, abcd,,,,);
+connection default;
+--echo #-----------------------------------------------------------------------
+
+--echo # Case 1 : connection_control_failed_connections_threshold
+SHOW GRANTS;
+SET @saved_value = @@global.connection_control_failed_connections_threshold;
+SELECT @saved_value;
+SET @@global.connection_control_failed_connections_threshold = @saved_value;
+
+--echo # 1.1 : Setting connection_control_failed_connections_threshold to valid
+--echo #       value
+
+SET @@global.connection_control_failed_connections_threshold = 20;
+SELECT @@global.connection_control_failed_connections_threshold;
+
+SET @@global.connection_control_failed_connections_threshold = 2000;
+SELECT @@global.connection_control_failed_connections_threshold;
+
+SET @@global.connection_control_failed_connections_threshold = 2147483647;
+SELECT @@global.connection_control_failed_connections_threshold;
+
+SET @@global.connection_control_failed_connections_threshold = DEFAULT;
+SELECT @@global.connection_control_failed_connections_threshold;
+
+--echo # 1.2 : Setting connection_control_failed_connections_threshold to
+--echo #       invalid value
+
+--error ER_WRONG_TYPE_FOR_VAR
+SET @@global.connection_control_failed_connections_threshold = NULL;
+SELECT @@global.connection_control_failed_connections_threshold;
+
+--error ER_WRONG_TYPE_FOR_VAR
+SET @@global.connection_control_failed_connections_threshold = `SELECT * FROM mysql.user`;
+SELECT @@global.connection_control_failed_connections_threshold;
+
+--error ER_WRONG_VALUE_FOR_VAR
+SET @@global.connection_control_failed_connections_threshold = -20;
+SELECT @@global.connection_control_failed_connections_threshold;
+
+--error ER_WRONG_VALUE_FOR_VAR
+SET @@global.connection_control_failed_connections_threshold = 9223372036854775808;
+SELECT @@global.connection_control_failed_connections_threshold;
+
+--error ER_WRONG_VALUE_FOR_VAR
+SET @@global.connection_control_failed_connections_threshold = -9223372036854775808;
+SELECT @@global.connection_control_failed_connections_threshold;
+
+--echo # Switch to conn_no_privs
+connection conn_no_privs;
+--echo # 1.3 : Use no_privs@localhost to set
+--echo #       connection_control_failed_connections_threshold to valid value
+
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
+SET @@global.connection_control_failed_connections_threshold = 2147483647;
+SELECT @@global.connection_control_failed_connections_threshold;
+
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
+SET @@global.connection_control_failed_connections_threshold = DEFAULT;
+SELECT @@global.connection_control_failed_connections_threshold;
+
+--echo # 1.4 : Use no_privs@localhost to set
+--echo #       connection_control_failed_connections_threshold to invalid value
+
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
+SET @@global.connection_control_failed_connections_threshold = NULL;
+SELECT @@global.connection_control_failed_connections_threshold;
+
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
+SET @@global.connection_control_failed_connections_threshold = 9223372036854775808;
+SELECT @@global.connection_control_failed_connections_threshold;
+
+connection default;
+
+SET @@global.connection_control_failed_connections_threshold = @saved_value;
+SELECT @@global.connection_control_failed_connections_threshold;
+
+--echo #-----------------------------------------------------------------------
+
+--echo # Case 2 : connection_control_min_connection_delay
+
+SET @saved_value= @@global.connection_control_min_connection_delay;
+SELECT @saved_value;
+
+--echo # 2.1 : Setting connection_control_min_connection_delay to valid
+--echo #       value
+
+SET @@global.connection_control_min_connection_delay = 20000;
+SELECT @@global.connection_control_min_connection_delay;
+
+SET @@global.connection_control_min_connection_delay = 2000;
+SELECT @@global.connection_control_min_connection_delay;
+
+SET @@global.connection_control_min_connection_delay = 2147483647;
+SELECT @@global.connection_control_min_connection_delay;
+
+SET @@global.connection_control_min_connection_delay = DEFAULT;
+SELECT @@global.connection_control_min_connection_delay;
+
+--echo # 2.2 : Setting connection_control_min_connection_delay to
+--echo #       invalid value
+
+--error ER_WRONG_TYPE_FOR_VAR
+SET @@global.connection_control_min_connection_delay = NULL;
+SELECT @@global.connection_control_min_connection_delay;
+
+--error ER_WRONG_TYPE_FOR_VAR
+SET @@global.connection_control_min_connection_delay = `SELECT * FROM mysql.user`;
+SELECT @@global.connection_control_min_connection_delay;
+
+--error ER_WRONG_VALUE_FOR_VAR
+SET @@global.connection_control_min_connection_delay = -20;
+SELECT @@global.connection_control_min_connection_delay;
+
+--error ER_WRONG_VALUE_FOR_VAR
+SET @@global.connection_control_min_connection_delay = 9223372036854775808;
+SELECT @@global.connection_control_min_connection_delay;
+
+--error ER_WRONG_VALUE_FOR_VAR
+SET @@global.connection_control_min_connection_delay = -9223372036854775808;
+SELECT @@global.connection_control_min_connection_delay;
+
+--error ER_WRONG_VALUE_FOR_VAR
+SET@@global.connection_control_min_connection_delay = 20;
+SELECT @@global.connection_control_min_connection_delay;
+
+--echo # Switch to conn_no_privs
+connection conn_no_privs;
+--echo # 2.3 : Use no_privs@localhost to set
+--echo #       connection_control_min_connection_delay to valid value
+
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
+SET @@global.connection_control_min_connection_delay = 2147483647;
+SELECT @@global.connection_control_min_connection_delay;
+
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
+SET @@global.connection_control_min_connection_delay = DEFAULT;
+SELECT @@global.connection_control_min_connection_delay;
+
+--echo # 2.4 : Use no_privs@localhost to set
+--echo #       connection_control_min_connection_delay to invalid value
+
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
+SET @@global.connection_control_min_connection_delay = NULL;
+SELECT @@global.connection_control_min_connection_delay;
+
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
+SET @@global.connection_control_min_connection_delay = 9223372036854775808;
+SELECT @@global.connection_control_min_connection_delay;
+
+--echo # Switch to default connection
+connection default;
+--echo # 2.5 : Setting connection_control_min_connection_delay to a value
+--echo #       greater than connection_control_max_connection_delay
+
+SET @saved_max_delay= @@global.connection_control_max_connection_delay;
+SET @@global.connection_control_max_connection_delay= 10000;
+
+--error ER_WRONG_VALUE_FOR_VAR
+SET @@global.connection_control_min_connection_delay= 11000;
+SELECT @@global.connection_control_min_connection_delay;
+
+SET @@global.connection_control_max_connection_delay= @saved_max_delay;
+
+SET @@global.connection_control_min_connection_delay = @saved_value;
+SELECT @@global.connection_control_min_connection_delay;
+
+--echo #-----------------------------------------------------------------------
+
+--echo # Case 3 : connection_control_max_connection_delay
+
+SET @saved_value= @@global.connection_control_max_connection_delay;
+SELECT @saved_value;
+
+--echo # 3.1 : Setting connection_control_max_connection_delay to valid
+--echo #       value
+
+SET @@global.connection_control_max_connection_delay = 20000;
+SELECT @@global.connection_control_max_connection_delay;
+
+SET @@global.connection_control_max_connection_delay = 2000;
+SELECT @@global.connection_control_max_connection_delay;
+
+SET @@global.connection_control_max_connection_delay = 2147483647;
+SELECT @@global.connection_control_max_connection_delay;
+
+SET @@global.connection_control_max_connection_delay = DEFAULT;
+SELECT @@global.connection_control_max_connection_delay;
+
+--echo # 3.2 : Setting connection_control_max_connection_delay to
+--echo #       invalid value
+
+--error ER_WRONG_TYPE_FOR_VAR
+SET @@global.connection_control_max_connection_delay = NULL;
+SELECT @@global.connection_control_max_connection_delay;
+
+--error ER_WRONG_TYPE_FOR_VAR
+SET @@global.connection_control_max_connection_delay = `SELECT * FROM mysql.user`;
+SELECT @@global.connection_control_max_connection_delay;
+
+--error ER_WRONG_VALUE_FOR_VAR
+SET @@global.connection_control_max_connection_delay = -20;
+SELECT @@global.connection_control_max_connection_delay;
+
+--error ER_WRONG_VALUE_FOR_VAR
+SET @@global.connection_control_max_connection_delay = 9223372036854775808;
+SELECT @@global.connection_control_max_connection_delay;
+
+--error ER_WRONG_VALUE_FOR_VAR
+SET @@global.connection_control_max_connection_delay = -9223372036854775808;
+SELECT @@global.connection_control_max_connection_delay;
+
+--error ER_WRONG_VALUE_FOR_VAR
+SET @@global.connection_control_max_connection_delay = 20;
+SELECT @@global.connection_control_max_connection_delay;
+
+--echo # Switch to conn_no_privs
+connection conn_no_privs;
+--echo # 3.3 : Use no_privs@localhost to set
+--echo #       connection_control_max_connection_delay to valid value
+
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
+SET @@global.connection_control_max_connection_delay = 2147483647;
+SELECT @@global.connection_control_max_connection_delay;
+
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
+SET @@global.connection_control_max_connection_delay = DEFAULT;
+SELECT @@global.connection_control_max_connection_delay;
+
+--echo # 3.4 : Use no_privs@localhost to set
+--echo #       connection_control_max_connection_delay to invalid value
+
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
+SET @@global.connection_control_max_connection_delay = NULL;
+SELECT @@global.connection_control_max_connection_delay;
+
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
+SET @@global.connection_control_max_connection_delay = 9223372036854775808;
+SELECT @@global.connection_control_max_connection_delay;
+
+--echo # Switch to default connection
+connection default;
+--echo # 3.5 : Setting connection_control_min_connection_delay to a value
+--echo #       greater than connection_control_max_connection_delay
+
+SET @saved_min_delay= @@global.connection_control_min_connection_delay;
+SET @@global.connection_control_min_connection_delay= 11000;
+
+--error ER_WRONG_VALUE_FOR_VAR
+SET @@global.connection_control_max_connection_delay= 10000;
+SELECT @@global.connection_control_max_connection_delay;
+
+SET @@global.connection_control_min_connection_delay= @saved_min_delay;
+
+SET @@global.connection_control_max_connection_delay = @saved_value;
+SELECT @@global.connection_control_max_connection_delay;
+
+--echo #-----------------------------------------------------------------------
+--echo # Cleanup
+disconnect conn_no_privs;
+DROP USER no_privs@localhost;
+--echo # Uninstall connection_control plugin
+--source ../inc/uninstall_connection_control_plugin.inc
+
+# Wait till all disconnects are completed.
+--source include/wait_until_count_sessions.inc
+--echo #-----------------------------------------------------------------------
index 6dda00e27565cefc38f33742a76eecb108c1bb58..143e89c9a0420f3c91fb80010899269ebbc68323 100644 (file)
@@ -9,7 +9,7 @@ binlog-format=row
 
 wsrep_provider=@ENV.WSREP_PROVIDER
 wsrep_cluster_address='gcomm://'
-wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.1.#galera_port'
+wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.1.#galera_port;evs.suspect_timeout=PT10S;evs.inactive_timeout=PT30S;evs.install_timeout=PT15S'
 
 # enforce read-committed characteristics across the cluster
 wsrep_causal_reads=ON
@@ -29,7 +29,7 @@ binlog-format=row
 
 wsrep_provider=@ENV.WSREP_PROVIDER
 wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.1.#galera_port'
-wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.2.#galera_port'
+wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.2.#galera_port;evs.suspect_timeout=PT10S;evs.inactive_timeout=PT30S;evs.install_timeout=PT15S'
 
 # enforce read-committed characteristics across the cluster
 wsrep_causal_reads=ON
diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/galera_2nodes_as_master_slave.cnf b/mysql-wsrep-5.6/mysql-test/suite/galera/galera_2nodes_as_master_slave.cnf
new file mode 100644 (file)
index 0000000..716a790
--- /dev/null
@@ -0,0 +1,83 @@
+
+#
+# Let's understand the topology.
+# * Independent Master with server-id = 1
+# * Galera cluster with 2 nodes: node#1 and node#2 with server-id = 2, 3
+#   node#1 act as slave to Independent Master with server-id = 1
+# * Independent Slave with server-id = 4 replicating from galera node#2
+#
+
+# Use default setting for mysqld processes
+!include include/default_mysqld.cnf
+
+[mysqld]
+log-slave-updates
+log-bin=mysqld-bin
+binlog-format=row
+gtid-mode=on
+enforce-gtid-consistency=true
+
+[mysqld.1]
+server-id=1
+
+[mysqld.2]
+server-id=2
+
+wsrep_provider=@ENV.WSREP_PROVIDER
+wsrep_cluster_address='gcomm://'
+wsrep_provider_options='base_port=@mysqld.2.#galera_port;evs.install_timeout = PT15S; evs.max_install_timeouts=1;'
+
+# enforce read-committed characteristics across the cluster
+wsrep_causal_reads=ON
+wsrep_sync_wait = 7
+
+wsrep_node_address=127.0.0.1
+wsrep_sst_receive_address=127.0.0.2:@mysqld.2.#sst_port
+wsrep_node_incoming_address=127.0.0.1:@mysqld.2.port
+
+# Required for Galera
+innodb_autoinc_lock_mode=2
+
+innodb_flush_log_at_trx_commit=2
+
+[mysqld.3]
+server-id=3
+
+wsrep_provider=@ENV.WSREP_PROVIDER
+wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.2.#galera_port'
+wsrep_provider_options='base_port=@mysqld.3.#galera_port;evs.install_timeout = PT15S; evs.max_install_timeouts = 1;'
+
+# enforce read-committed characteristics across the cluster
+wsrep_causal_reads=ON
+wsrep_sync_wait = 7
+
+wsrep_node_address=127.0.0.1
+wsrep_sst_receive_address=127.0.0.2:@mysqld.3.#sst_port
+wsrep_node_incoming_address=127.0.0.1:@mysqld.3.port
+
+# Required for Galera
+innodb_autoinc_lock_mode=2
+
+innodb_flush_log_at_trx_commit=2
+
+[mysqld.4]
+server-id=4
+
+[ENV]
+NODE_MYPORT_1= @mysqld.1.port
+NODE_MYSOCK_1= @mysqld.1.socket
+
+NODE_MYPORT_2= @mysqld.2.port
+NODE_MYSOCK_2= @mysqld.2.socket
+
+NODE_MYPORT_3= @mysqld.3.port
+NODE_MYSOCK_3= @mysqld.3.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
+
+NODE_SSTPORT_2= @mysqld.2.#sst_port
+NODE_SSTPORT_3= @mysqld.3.#sst_port
diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/galera_2nodes_as_master_with_repl_filter.cnf b/mysql-wsrep-5.6/mysql-test/suite/galera/galera_2nodes_as_master_with_repl_filter.cnf
new file mode 100644 (file)
index 0000000..5f0af2e
--- /dev/null
@@ -0,0 +1,87 @@
+#
+# This .cnf file creates a setup with a 2-node Galera cluster and one stand-alone MySQL server, to be used as a slave
+#
+
+# Use default setting for mysqld processes
+!include include/default_mysqld.cnf
+
+[mysqld]
+default-storage-engine=InnoDB
+
+[mysqld.1]
+server-id=1
+binlog-format=row
+log-bin=mysqld-bin
+log_slave_updates
+gtid-mode=on
+enforce-gtid-consistency=true
+event-scheduler=1
+
+wsrep_provider=@ENV.WSREP_PROVIDER
+wsrep_cluster_address='gcomm://'
+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_node_address=127.0.0.1
+wsrep_sst_receive_address=127.0.0.2:@mysqld.1.#sst_port
+wsrep_node_incoming_address=127.0.0.1:@mysqld.1.port
+
+# Required for Galera
+innodb_autoinc_lock_mode=2
+
+innodb_flush_log_at_trx_commit=2
+
+[mysqld.2]
+server-id=2
+binlog-format=row
+log-bin=mysqld-bin
+log_slave_updates
+gtid-mode=on
+enforce-gtid-consistency=true
+event-scheduler=1
+
+wsrep_provider=@ENV.WSREP_PROVIDER
+wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.1.#galera_port'
+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_node_address=127.0.0.1
+wsrep_sst_receive_address=127.0.0.2:@mysqld.2.#sst_port
+wsrep_node_incoming_address=127.0.0.1:@mysqld.2.port
+
+# Required for Galera
+innodb_autoinc_lock_mode=2
+
+innodb_flush_log_at_trx_commit=2
+
+[mysqld.3]
+server-id=3
+replicate-ignore-db=test
+replicate-wild-ignore-table=test.%
+log-bin=mysqld-bin
+log_slave_updates
+gtid-mode=on
+enforce-gtid-consistency=true
+event-scheduler=1
+
+[ENV]
+NODE_MYPORT_1= @mysqld.1.port
+NODE_MYSOCK_1= @mysqld.1.socket
+
+NODE_MYPORT_2= @mysqld.2.port
+NODE_MYSOCK_2= @mysqld.2.socket
+
+NODE_MYPORT_3= @mysqld.3.port
+NODE_MYSOCK_3= @mysqld.3.socket
+
+NODE_GALERAPORT_1= @mysqld.1.#galera_port
+NODE_GALERAPORT_2= @mysqld.2.#galera_port
+
+NODE_SSTPORT_1= @mysqld.1.#sst_port
+NODE_SSTPORT_2= @mysqld.2.#sst_port
diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/r/GAL-401.result b/mysql-wsrep-5.6/mysql-test/suite/galera/r/GAL-401.result
new file mode 100644 (file)
index 0000000..bcf83e7
--- /dev/null
@@ -0,0 +1,21 @@
+SET GLOBAL wsrep_provider_options = 'pc.ignore_sb=true';
+SET @@global.wsrep_desync = 1;
+SET SESSION wsrep_sync_wait=0;
+SET GLOBAL wsrep_provider_options = 'gmcast.isolate=1';
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(1));
+SET GLOBAL wsrep_provider_options = 'gmcast.isolate=0';
+SHOW STATUS LIKE 'wsrep_desync_count';
+Variable_name  Value
+wsrep_desync_count     0
+SET @@global.wsrep_desync = 0;
+SET SESSION wsrep_sync_wait=7;
+SHOW CREATE TABLE t1;
+Table  Create Table
+t1     CREATE TABLE `t1` (
+  `f1` int(11) NOT NULL,
+  `f2` char(1) DEFAULT NULL,
+  PRIMARY KEY (`f1`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+DROP TABLE t1;
+CALL mtr.add_suppression("WSREP: Protocol violation. JOIN message sender (.*) is not in state transfer \\(SYNCED\\). Message ignored.");
+SET GLOBAL wsrep_provider_options = 'pc.ignore_sb=false';
diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/r/GAL-419.result b/mysql-wsrep-5.6/mysql-test/suite/galera/r/GAL-419.result
new file mode 100644 (file)
index 0000000..410c91b
--- /dev/null
@@ -0,0 +1,4 @@
+SET SESSION wsrep_sync_wait = 0;
+Killing server ...
+SET SESSION wsrep_sync_wait = 0;
+Killing server ...
diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/r/GAL-480.result b/mysql-wsrep-5.6/mysql-test/suite/galera/r/GAL-480.result
new file mode 100644 (file)
index 0000000..b762e07
--- /dev/null
@@ -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-wsrep-5.6/mysql-test/suite/galera/r/MW-284.result b/mysql-wsrep-5.6/mysql-test/suite/galera/r/MW-284.result
new file mode 100644 (file)
index 0000000..8cc39c8
--- /dev/null
@@ -0,0 +1,15 @@
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+SET GLOBAL wsrep_provider_options='gmcast.isolate=1';
+SET SESSION wsrep_on = OFF;
+SET SESSION wsrep_on = ON;
+START SLAVE USER='root';
+Warnings:
+Note   1759    Sending passwords in plain text without SSL/TLS is extremely insecure.
+include/wait_for_slave_param.inc [Slave_IO_Running]
+SET GLOBAL wsrep_provider_options='gmcast.isolate=0';
+include/wait_for_slave_to_start.inc
+INSERT INTO t1 VALUES (1);
+DROP TABLE t1;
+STOP SLAVE;
+RESET SLAVE ALL;
+CALL mtr.add_suppression('failed registering on master');
diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/r/MW-285.result b/mysql-wsrep-5.6/mysql-test/suite/galera/r/MW-285.result
new file mode 100644 (file)
index 0000000..8c5a21f
--- /dev/null
@@ -0,0 +1,19 @@
+CREATE TABLE parent1 ( id INT PRIMARY KEY, KEY (id) ) ENGINE=InnoDB;
+CREATE TABLE parent2 ( id INT PRIMARY KEY, KEY (id) ) ENGINE=InnoDB;
+CREATE TABLE child (
+id INT PRIMARY KEY,
+parent1_id INT,
+parent2_id INT,
+FOREIGN KEY (parent1_id) REFERENCES parent1(id),
+FOREIGN KEY (parent1_id) REFERENCES parent2(id)
+) ENGINE=InnoDB;
+INSERT INTO parent1 VALUES (1);
+INSERT INTO parent2 VALUES (1);
+INSERT INTO child VALUES (1,1,1);
+INSERT INTO child VALUES (2,1,1);
+SET foreign_key_checks=OFF;
+DROP TABLE parent1;
+UPDATE child SET parent1_id=2 WHERE id=1;
+DROP TABLE child;
+DROP TABLE parent2;
+SET foreign_key_checks=ON;
diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/r/MW-286.result b/mysql-wsrep-5.6/mysql-test/suite/galera/r/MW-286.result
new file mode 100644 (file)
index 0000000..adc996c
--- /dev/null
@@ -0,0 +1,13 @@
+CREATE TABLE ten (f1 INTEGER);
+INSERT INTO ten VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+CREATE TABLE t1 (f1 INTEGER) Engine=InnoDB;
+INSERT INTO t1 (f1) SELECT 000000 + (10000 * a1.f1) + (1000 * a2.f1) + (100 * a3.f1) + (10 * a4.f1) + a5.f1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5;
+INSERT INTO t1 (f1) SELECT 100000 + (10000 * a1.f1) + (1000 * a2.f1) + (100 * a3.f1) + (10 * a4.f1) + a5.f1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5;;
+SET GLOBAL wsrep_desync = TRUE;
+SET wsrep_on = FALSE;
+ALTER TABLE t1 ADD PRIMARY KEY (f1);
+ERROR 70100: Query execution was interrupted
+SET wsrep_on = TRUE;
+SET GLOBAL wsrep_desync = FALSE;
+DROP TABLE t1;
+DROP TABLE ten;
diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/r/MW-292.result b/mysql-wsrep-5.6/mysql-test/suite/galera/r/MW-292.result
new file mode 100644 (file)
index 0000000..f038f88
--- /dev/null
@@ -0,0 +1,30 @@
+CREATE TABLE rand_table (f1 FLOAT);
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(1));
+INSERT INTO t1 VALUES (1, 'a');
+INSERT INTO t1 VALUES (2, 'a');
+SET AUTOCOMMIT=ON;
+START TRANSACTION;
+UPDATE t1 SET f2 = 'b' WHERE f1 = 1;
+SELECT * FROM t1 WHERE f1 = 2 FOR UPDATE;
+f1     f2
+2      a
+SET GLOBAL wsrep_provider_options = 'dbug=d,commit_monitor_enter_sync';
+COMMIT;;
+SET SESSION wsrep_sync_wait = 0;
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+UPDATE t1 SET f2 = 'c' WHERE f1 = 2;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'signal=commit_monitor_enter_sync';
+SELECT TIMEDIFF(SYSDATE(), NOW()) < 2;
+TIMEDIFF(SYSDATE(), NOW()) < 2
+1
+INSERT INTO rand_table VALUES (RAND()),(RAND()),(RAND()),(RAND()),(RAND());
+INSERT INTO rand_table VALUES (RAND()),(RAND()),(RAND()),(RAND()),(RAND());
+SELECT COUNT(DISTINCT f1) = 10 FROM rand_table;
+COUNT(DISTINCT f1) = 10
+1
+wsrep_local_replays
+1
+DROP TABLE t1;
+DROP TABLE rand_table;
diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/r/MW-309.result b/mysql-wsrep-5.6/mysql-test/suite/galera/r/MW-309.result
new file mode 100644 (file)
index 0000000..3dd49a0
--- /dev/null
@@ -0,0 +1,22 @@
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 SELECT * FROM t1;
+INSERT INTO t1 SELECT * FROM t1;
+INSERT INTO t1 SELECT * FROM t1;
+INSERT INTO t1 SELECT * FROM t1;
+INSERT INTO t1 SELECT * FROM t1;
+SET GLOBAL wsrep_max_ws_rows = 2;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+SELECT * FROM t1 GROUP BY f1;
+f1
+1
+SELECT * FROM t1 GROUP BY f1;
+f1
+1
+SELECT * FROM t1 GROUP BY f1;
+f1
+1
+SHOW STATUS LIKE '%wsrep%';
+SET GLOBAL wsrep_max_ws_rows = 0;
+DROP TABLE t1;
diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/r/MW-313.result b/mysql-wsrep-5.6/mysql-test/suite/galera/r/MW-313.result
new file mode 100644 (file)
index 0000000..dc605ff
--- /dev/null
@@ -0,0 +1,32 @@
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 SELECT * FROM t1;
+INSERT INTO t1 SELECT * FROM t1;
+INSERT INTO t1 SELECT * FROM t1;
+INSERT INTO t1 SELECT * FROM t1;
+INSERT INTO t1 SELECT * FROM t1;
+SET GLOBAL wsrep_max_ws_rows = 2;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+SELECT * FROM t1 GROUP BY f1;
+f1
+1
+SELECT * FROM t1 GROUP BY f1;
+f1
+1
+SELECT * FROM t1 GROUP BY f1;
+f1
+1
+SHOW STATUS LIKE '%wsrep%';
+INSERT INTO t1 SELECT * FROM t1;
+ERROR HY000: wsrep_max_ws_rows exceeded
+START TRANSACTION;
+INSERT INTO t1 (f1) VALUES (1);
+INSERT INTO t1 (f1) VALUES (2),(3),(4);
+ERROR HY000: wsrep_max_ws_rows exceeded
+ROLLBACK;
+START TRANSACTION;
+DELETE FROM t1;
+ERROR HY000: wsrep_max_ws_rows exceeded
+DROP TABLE t1;
+SET GLOBAL wsrep_max_ws_rows = 0;
diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/r/MW-328A.result b/mysql-wsrep-5.6/mysql-test/suite/galera/r/MW-328A.result
new file mode 100644 (file)
index 0000000..daed246
--- /dev/null
@@ -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-wsrep-5.6/mysql-test/suite/galera/r/MW-328B.result b/mysql-wsrep-5.6/mysql-test/suite/galera/r/MW-328B.result
new file mode 100644 (file)
index 0000000..7809889
--- /dev/null
@@ -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-wsrep-5.6/mysql-test/suite/galera/r/MW-328C.result b/mysql-wsrep-5.6/mysql-test/suite/galera/r/MW-328C.result
new file mode 100644 (file)
index 0000000..5cd74f0
--- /dev/null
@@ -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-wsrep-5.6/mysql-test/suite/galera/r/MW-328D.result b/mysql-wsrep-5.6/mysql-test/suite/galera/r/MW-328D.result
new file mode 100644 (file)
index 0000000..f6d055d
--- /dev/null
@@ -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-wsrep-5.6/mysql-test/suite/galera/r/MW-328E.result b/mysql-wsrep-5.6/mysql-test/suite/galera/r/MW-328E.result
new file mode 100644 (file)
index 0000000..5829559
--- /dev/null
@@ -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-wsrep-5.6/mysql-test/suite/galera/r/MW-329.result b/mysql-wsrep-5.6/mysql-test/suite/galera/r/MW-329.result
new file mode 100644 (file)
index 0000000..655d8e9
--- /dev/null
@@ -0,0 +1,20 @@
+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 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-wsrep-5.6/mysql-test/suite/galera/r/ev51914.result b/mysql-wsrep-5.6/mysql-test/suite/galera/r/ev51914.result
new file mode 100644 (file)
index 0000000..4b9f7ac
--- /dev/null
@@ -0,0 +1,162 @@
+SAVEPOINT in a stored function should be forbidden
+CREATE FUNCTION f1 () RETURNS INT BEGIN
+SAVEPOINT s;
+RETURN 1;
+END|
+SELECT f1();
+f1()
+1
+DROP FUNCTION f1;
+ROLLBACK TO SAVEPOINT in a stored function should be forbidden
+CREATE FUNCTION f2 () RETURNS INT BEGIN
+ROLLBACK TO SAVEPOINT s;
+RETURN 1;
+END|
+BEGIN;
+SAVEPOINT s;
+SELECT f2();
+ERROR 42000: SAVEPOINT s does not exist
+COMMIT;
+DROP FUNCTION f2;
+BEGIN;
+SAVEPOINT S;
+ROLLBACK TO SAVEPOINT S;
+COMMIT;
+CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB;
+CREATE TABLE t2 (a INT PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB;
+INSERT INTO t1 values (110), (111), (112), (113), (114);
+Direct SAVEPOINT in a trigger should be forbidden
+CREATE TRIGGER i1_t1 BEFORE INSERT ON t1 FOR EACH ROW SAVEPOINT s;
+INSERT INTO t1 VALUES (1);
+DROP TRIGGER i1_t1;
+CREATE TRIGGER i2_t1 AFTER INSERT ON t1 FOR EACH ROW SAVEPOINT s;
+INSERT INTO t1 VALUES (2);
+DROP TRIGGER i2_t1;
+INSERT INTO t1 VALUES (3);
+CREATE TRIGGER u1_t1 BEFORE UPDATE ON t1 FOR EACH ROW SAVEPOINT s;
+UPDATE t1 SET a=4 WHERE a=3;
+DROP TRIGGER u1_t1;
+CREATE TRIGGER u2_t1 AFTER UPDATE ON t1 FOR EACH ROW SAVEPOINT s;
+UPDATE t1 SET a=4 WHERE a=3;
+DROP TRIGGER u2_t1;
+CREATE TRIGGER d1_t1 BEFORE DELETE ON t1 FOR EACH ROW SAVEPOINT s;
+DELETE FROM t1;
+DROP TRIGGER d1_t1;
+CREATE TRIGGER d1_t1 AFTER DELETE ON t1 FOR EACH ROW SAVEPOINT s;
+DELETE FROM t1;
+DROP TRIGGER d1_t1;
+SAVEPOINT in a compound statement in a trigger should be forbidden
+CREATE TRIGGER i3_t1 BEFORE INSERT ON t1 FOR EACH ROW BEGIN
+SAVEPOINT s;
+END|
+INSERT INTO t1 VALUES (5);
+DROP TRIGGER i3_t1;
+SAVEPOINT in a PS call in a trigger should be forbidden
+CREATE TRIGGER i4_t1 BEFORE INSERT ON t1 FOR EACH ROW BEGIN
+PREPARE set_savepoint FROM "SAVEPOINT s";
+EXECUTE set_savepoint;
+DEALLOCATE PREPARE set_savepoint;
+END|
+ERROR 0A000: Dynamic SQL is not allowed in stored function or trigger
+SAVEPOINT in SP called from a trigger should be forbidden
+CREATE PROCEDURE p1() BEGIN
+SAVEPOINT s;
+END|
+CREATE TRIGGER i5_t1 BEFORE INSERT ON t1 FOR EACH ROW CALL p1;
+INSERT INTO t1 VALUES (6);
+DROP TRIGGER i5_t1;
+SAVEPOINT in a SP called from a PS called from a trigger be forbidden
+PREPARE call_p1 FROM "CALL p1";
+CREATE TRIGGER i6_t1 BEFORE INSERT ON t1 FOR EACH ROW EXECUTE call_p1;
+ERROR 0A000: Dynamic SQL is not allowed in stored function or trigger
+SAVEPOINT in a function called from a trigger should be forbidden
+CREATE FUNCTION f1 () RETURNS INT BEGIN
+SAVEPOINT s;
+RETURN 1;
+END|
+CREATE TRIGGER i7_t1 BEFORE INSERT ON t1 FOR EACH ROW SET @foo = f1();
+INSERT INTO t1 VALUES (7);
+DROP TRIGGER i7_t1;
+SAVEPOINT in a SP called from a SP called from a trigger should be forbidden
+CREATE PROCEDURE p2() BEGIN
+CALL p1();
+END|
+CREATE TRIGGER i8_t1 BEFORE INSERT ON t1 FOR EACH ROW CALL p2;
+INSERT INTO t1 VALUES (8);
+DROP TRIGGER i8_t1;
+SAVEPOINT in a SP called from a trigger called from a SP should be forbidden
+CREATE TRIGGER i9_t1 BEFORE INSERT ON t1 FOR EACH ROW CALL p1;
+CREATE PROCEDURE p3() BEGIN
+INSERT INTO t1 VALUES (9);
+END|
+CALL p3();
+DROP TRIGGER i9_t1;
+ROLLBACK TO SAVEPOINT in trigger as a trivial statement should be forbidden
+CREATE TRIGGER i4_t1 BEFORE INSERT ON t1 FOR EACH ROW ROLLBACK TO SAVEPOINT s;
+BEGIN;
+SAVEPOINT s;
+INSERT INTO t1 VALUES (5);
+ERROR 42000: SAVEPOINT s does not exist
+COMMIT;
+DROP TRIGGER i4_t1;
+ROLLBACK TO SAVEPOINT in a trigger in a SP call should be forbidden
+CREATE PROCEDURE p4() BEGIN
+ROLLBACK TO SAVEPOINT s;
+END|
+CREATE TRIGGER i5_t1 BEFORE INSERT ON t1 FOR EACH ROW CALL p4;
+BEGIN;
+SAVEPOINT s;
+INSERT INTO t1 VALUES (6);
+ERROR 42000: SAVEPOINT s does not exist
+COMMIT;
+DROP TRIGGER i5_t1;
+SAVEPOINT in a SP next to a trigger should work
+CREATE TRIGGER i6_t1 BEFORE INSERT ON t1 FOR EACH ROW SET NEW.a = NEW.a + 1;
+CREATE PROCEDURE p5() BEGIN
+SAVEPOINT s;
+INSERT INTO t1 VALUES (10);
+ROLLBACK TO SAVEPOINT s;
+END|
+BEGIN;
+CALL p5();
+COMMIT;
+DROP TRIGGER i6_t1;
+create trigger t1 before insert on t1 for each row
+begin
+insert into t2 values (NULL);
+end|
+INSERT INTO t1 VALUES (201), (202), (203);
+SELECT * FROM t1;
+a
+5
+6
+7
+8
+9
+201
+202
+203
+SELECT COUNT(*) FROM t2;
+COUNT(*)
+3
+SELECT * FROM t1;
+a
+5
+6
+7
+8
+9
+201
+202
+203
+SELECT COUNT(*) FROM t2;
+COUNT(*)
+3
+DEALLOCATE PREPARE call_p1;
+DROP TABLE t1, t2;
+DROP PROCEDURE p1;
+DROP PROCEDURE p2;
+DROP PROCEDURE p3;
+DROP PROCEDURE p4;
+DROP PROCEDURE p5;
+DROP FUNCTION f1;
diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/r/galera#414.result b/mysql-wsrep-5.6/mysql-test/suite/galera/r/galera#414.result
new file mode 100644 (file)
index 0000000..029961f
--- /dev/null
@@ -0,0 +1,5 @@
+SET SESSION wsrep_sync_wait = 0;
+SET SESSION wsrep_on = OFF;
+SET SESSION wsrep_on = ON;
+CALL mtr.add_suppression("Failed to set packet size");
+CALL mtr.add_suppression("Failed to set packet size");
index 9b3ae9ba46eb593cc63e0b5fa0d07b8c34b50ea8..4fa33a6306494555f461eb8c826fef3d7220cac0 100644 (file)
@@ -2,6 +2,13 @@ CREATE USER user1, user2 IDENTIFIED BY 'password';
 SELECT COUNT(*) = 2 FROM mysql.user WHERE user IN ('user1', 'user2');
 COUNT(*) = 2
 1
+ALTER USER user1 PASSWORD EXPIRE;
+SELECT password_expired = 'Y' FROM mysql.user WHERE user = 'user1';
+password_expired = 'Y'
+1
+SELECT password_expired = 'Y' FROM mysql.user WHERE user = 'user1';
+password_expired = 'Y'
+1
 RENAME USER user2 TO user3;
 SELECT COUNT(*) = 0 FROM mysql.user WHERE user = 'user2';
 COUNT(*) = 0
diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_admin.result b/mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_admin.result
new file mode 100644 (file)
index 0000000..e58b0a5
--- /dev/null
@@ -0,0 +1,43 @@
+DROP TABLE IF EXISTS t1, t2;
+DROP TABLE IF EXISTS x1, x2;
+CREATE TABLE t1 (f1 INTEGER);
+CREATE TABLE t2 (f1 INT PRIMARY KEY AUTO_INCREMENT, f2 INTEGER);
+SET GLOBAL wsrep_replicate_myisam = TRUE;
+CREATE TABLE x1 (f1 INTEGER) ENGINE=MyISAM;
+CREATE TABLE x2 (f1 INT PRIMARY KEY AUTO_INCREMENT, f2 INTEGER) ENGINE=MyISAM;
+INSERT INTO t1 VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
+INSERT INTO x1 VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
+INSERT INTO t2 (f2) SELECT 1 FROM t1 AS a1, t1 AS a2, t1 AS a3, t1 AS a4;
+INSERT INTO x2 (f2) VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
+# ANALYZE test
+ANALYZE TABLE t1, t2;
+Table  Op      Msg_type        Msg_text
+test.t1        analyze status  OK
+test.t2        analyze status  OK
+# OPTIMIZE test
+OPTIMIZE TABLE t1, t2;
+Table  Op      Msg_type        Msg_text
+test.t1        optimize        note    Table does not support optimize, doing recreate + analyze instead
+test.t1        optimize        status  OK
+test.t2        optimize        note    Table does not support optimize, doing recreate + analyze instead
+test.t2        optimize        status  OK
+# REPAIR test
+REPAIR TABLE x1, x2;
+Table  Op      Msg_type        Msg_text
+test.x1        repair  status  OK
+test.x2        repair  status  OK
+SELECT COUNT(*) = 10 FROM t1;
+COUNT(*) = 10
+1
+SELECT COUNT(*) = 10 FROM x1;
+COUNT(*) = 10
+1
+SELECT COUNT(*) = 10000 FROM t2;
+COUNT(*) = 10000
+1
+SELECT COUNT(*) = 10 FROM x2;
+COUNT(*) = 10
+1
+DROP TABLE t1, t2;
+DROP TABLE x1, x2;
+SET GLOBAL wsrep_replicate_myisam = FALSE;
diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_as_slave_gtid_replicate_do_db.result b/mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_as_slave_gtid_replicate_do_db.result
new file mode 100644 (file)
index 0000000..27bebf2
--- /dev/null
@@ -0,0 +1,182 @@
+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' 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= '<effective_uuid>:1'
+mysqld-bin.000001      199     Query   1       294     CREATE SCHEMA test1
+mysqld-bin.000001      294     Gtid    1       342     SET @@SESSION.GTID_NEXT= '<effective_uuid>: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= '<effective_uuid>: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= '<effective_uuid>: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= '<effective_uuid>: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= '<effective_uuid>: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= '<effective_uuid>: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= '<effective_uuid>: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= '<effective_uuid>: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= '<effective_uuid>: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= '<effective_uuid>: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= '<effective_uuid>: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= '<effective_uuid>: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= '<effective_uuid>: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= '<effective_uuid>: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= '<effective_uuid>: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' FROM 120;
+Log_name       Pos     Event_type      Server_id       End_log_pos     Info
+mysqld-bin.000001      120     Previous_gtids  3       151     
+mysqld-bin.000001      151     Gtid    1       199     SET @@SESSION.GTID_NEXT= '<effective_uuid>:1'
+mysqld-bin.000001      199     Query   1       294     CREATE SCHEMA test1
+mysqld-bin.000001      294     Gtid    1       342     SET @@SESSION.GTID_NEXT= '<effective_uuid>: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= '<effective_uuid>: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= '<effective_uuid>: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= '<effective_uuid>: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= '<effective_uuid>: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= '<effective_uuid>: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= '<effective_uuid>: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= '<effective_uuid>: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= '<effective_uuid>: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= '<effective_uuid>: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= '<effective_uuid>: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= '<effective_uuid>: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= '<effective_uuid>: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= '<effective_uuid>: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= '<effective_uuid>: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-wsrep-5.6/mysql-test/suite/galera/r/galera_as_slave_gtid_replicate_do_db_cc.result b/mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_as_slave_gtid_replicate_do_db_cc.result
new file mode 100644 (file)
index 0000000..c968312
--- /dev/null
@@ -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= '<effective_uuid>:1'
+mysqld-bin.000001      199     Query   1       294     CREATE SCHEMA test1
+mysqld-bin.000001      294     Gtid    1       342     SET @@SESSION.GTID_NEXT= '<effective_uuid>: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= '<effective_uuid>: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= '<effective_uuid>: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= '<effective_uuid>: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= '<effective_uuid>: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= '<effective_uuid>: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= '<effective_uuid>: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= '<effective_uuid>: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= '<effective_uuid>: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= '<effective_uuid>: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= '<effective_uuid>: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= '<effective_uuid>: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= '<effective_uuid>: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= '<effective_uuid>: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= '<effective_uuid>: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= '<effective_uuid>: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= '<effective_uuid>: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= '<effective_uuid>: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= '<effective_uuid>: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= '<effective_uuid>: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= '<effective_uuid>: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= '<effective_uuid>: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= '<effective_uuid>: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= '<effective_uuid>: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= '<effective_uuid>: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= '<effective_uuid>: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= '<effective_uuid>: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= '<effective_uuid>: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= '<effective_uuid>: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= '<effective_uuid>:1'
+mysqld-bin.000001      199     Query   1       294     CREATE SCHEMA test1
+mysqld-bin.000001      294     Gtid    1       342     SET @@SESSION.GTID_NEXT= '<effective_uuid>: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= '<effective_uuid>: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= '<effective_uuid>: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= '<effective_uuid>: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= '<effective_uuid>: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= '<effective_uuid>: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= '<effective_uuid>: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= '<effective_uuid>: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= '<effective_uuid>: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= '<effective_uuid>: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= '<effective_uuid>: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= '<effective_uuid>: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= '<effective_uuid>: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= '<effective_uuid>: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= '<effective_uuid>: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= '<effective_uuid>: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= '<effective_uuid>: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= '<effective_uuid>: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= '<effective_uuid>: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= '<effective_uuid>: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= '<effective_uuid>: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= '<effective_uuid>: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= '<effective_uuid>: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= '<effective_uuid>: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= '<effective_uuid>: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= '<effective_uuid>: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= '<effective_uuid>: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= '<effective_uuid>: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= '<effective_uuid>: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");
index c55f1a4dfcbb128b9aab3d3e1ba64f5a2ab89da5..cc750f050506ae139243f1434ffb7b0415ee5cc9 100644 (file)
@@ -1,9 +1,9 @@
-CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(6)) ENGINE=InnoDB;
 SET AUTOCOMMIT=OFF;
 START TRANSACTION;
-INSERT INTO t1 VALUES (1);
-INSERT INTO t1 VALUES (1);
-INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (1,'node_2');
+INSERT INTO t1 VALUES (1,'node_1');
+INSERT INTO t1 VALUES (2, 'node_2');
 ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
 wsrep_local_aborts_increment
 1
index d6ff0c20008cb21c6a4142bd512152edcafee7ec..96ed226c3ab93922672260e50b88a5aa0beeb3fb 100644 (file)
@@ -6,6 +6,7 @@ SET SESSION wsrep_sync_wait = 0;
 UNLOCK TABLES;
 COMMIT;
 SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait = 7;
 SELECT COUNT(*) = 1 FROM t1;
 COUNT(*) = 1
 1
index aaad574be5b528743a1f937f27d7b7c16b09049b..4fd231ed109d0b53830bd12b0620743a87912473 100644 (file)
@@ -27,8 +27,8 @@ WSREP_DRUPAL_282555_WORKAROUND        OFF
 WSREP_FORCED_BINLOG_FORMAT     NONE
 WSREP_LOAD_DATA_SPLITTING      ON
 WSREP_LOG_CONFLICTS    OFF
-WSREP_MAX_WS_ROWS      131072
-WSREP_MAX_WS_SIZE      1073741824
+WSREP_MAX_WS_ROWS      0
+WSREP_MAX_WS_SIZE      2147483647
 WSREP_MYSQL_REPLICATION_BUNDLE 0
 WSREP_NOTIFY_CMD       
 WSREP_ON       ON
@@ -47,7 +47,7 @@ WSREP_SST_DONOR
 WSREP_SST_DONOR_REJECTS_QUERIES        OFF
 WSREP_SST_METHOD       rsync
 WSREP_SYNC_WAIT        7
-<BASE_DIR>; <BASE_HOST>; <BASE_PORT>; 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 = PT15S; evs.info_log_mask = 0; evs.install_timeout = PT7.5S; 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 = PT5S; evs.use_aggregate = true; evs.user_send_window = 2; evs.version = 0; evs.view_forget_timeout = P1D; <GCACHE_DIR>; gcache.keep_pages_size = 0; gcache.mem_size = 0; <GCACHE_NAME>; gcache.page_size = 128M; 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; <RECV_Q_HARD_LIMIT>;gcs.recv_q_soft_limit = 0.25; gcs.sync_donor = no; <GMCAST_LISTEN_ADDR>; gmcast.mcast_addr = ; gmcast.mcast_ttl = 1; gmcast.peer_timeout = PT3S; gmcast.segment = 0; gmcast.time_wait = PT5S; gmcast.version = 0; <IST_RECV_ADDR>; 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 = P30S; 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; 
+<BASE_DIR>; <BASE_HOST>; <BASE_PORT>; 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_DIR>; gcache.keep_pages_size = 0; gcache.mem_size = 0; <GCACHE_NAME>; 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; <RECV_Q_HARD_LIMIT>;gcs.recv_q_soft_limit = 0.25; gcs.sync_donor = no; <GMCAST_LISTEN_ADDR>; gmcast.mcast_addr = ; gmcast.mcast_ttl = 1; gmcast.peer_timeout = PT3S; gmcast.segment = 0; gmcast.time_wait = PT5S; gmcast.version = 0; <IST_RECV_ADDR>; 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_%'
 AND VARIABLE_NAME != 'wsrep_debug_sync_waiters';
diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_desync_overlapped.result b/mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_desync_overlapped.result
new file mode 100644 (file)
index 0000000..a1e7d59
--- /dev/null
@@ -0,0 +1,45 @@
+CREATE TABLE ten (f1 INTEGER);
+INSERT INTO ten VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+CREATE TABLE t1 (f1 INTEGER, PRIMARY KEY (f1)) Engine=InnoDB;
+CREATE TABLE t2 (f1 INTEGER, PRIMARY KEY (f1)) Engine=InnoDB;
+SET GLOBAL wsrep_desync = 1;
+show status like 'wsrep_desync_count';
+Variable_name  Value
+wsrep_desync_count     1
+SET DEBUG_SYNC='before_execute_sql_command SIGNAL alter1 WAIT_FOR alter2';
+INSERT INTO t1 (f1) SELECT 0000 + (100 * a1.f1) + (10 * a2.f1) + a3.f1 FROM ten AS a1, ten AS a2, ten AS a3;
+SET GLOBAL wsrep_desync = 1;
+Warnings:
+Warning        1231    'wsrep_desync' is already ON.
+show status like 'wsrep_desync_count';
+Variable_name  Value
+wsrep_desync_count     1
+SET DEBUG_SYNC='now WAIT_FOR alter1';
+SET DEBUG_SYNC='before_execute_sql_command SIGNAL alter2';
+INSERT INTO t2 (f1) SELECT 0000 + (100 * a1.f1) + (10 * a2.f1) + a3.f1 FROM ten AS a1, ten AS a2, ten AS a3;
+SET DEBUG_SYNC='RESET';
+SET GLOBAL wsrep_desync = 0;
+show status like 'wsrep_desync_count';
+Variable_name  Value
+wsrep_desync_count     0
+SET GLOBAL wsrep_desync = 0;
+Warnings:
+Warning        1231    'wsrep_desync' is already OFF.
+show status like 'wsrep_desync_count';
+Variable_name  Value
+wsrep_desync_count     0
+show status like 'wsrep_desync_count';
+Variable_name  Value
+wsrep_desync_count     0
+SET GLOBAL wsrep_desync = 0;
+Warnings:
+Warning        1231    'wsrep_desync' is already OFF.
+SELECT COUNT(*) FROM t1;
+COUNT(*)
+1000
+SELECT COUNT(*) FROM t2;
+COUNT(*)
+1000
+DROP TABLE t1;
+DROP TABLE t2;
+DROP TABLE ten;
diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_gcache_recover.result b/mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_gcache_recover.result
new file mode 100644 (file)
index 0000000..127bcba
--- /dev/null
@@ -0,0 +1,18 @@
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1);
+SET SESSION wsrep_sync_wait = 0;
+SET SESSION wsrep_sync_wait = 0;
+Killing server ...
+INSERT INTO t1 VALUES (2);
+Killing server ...
+Performing --wsrep-recover ...
+Using --wsrep-start-position when starting mysqld ...
+INSERT INTO t1 VALUES (3);
+Performing --wsrep-recover ...
+Using --wsrep-start-position when starting mysqld ...
+include/diff_servers.inc [servers=1 2]
+CALL mtr.add_suppression("Skipped GCache ring buffer recovery");
+include/assert_grep.inc [async IST sender starting to serve]
+CALL mtr.add_suppression("Skipped GCache ring buffer recovery");
+include/assert_grep.inc [Recovering GCache ring buffer: found gapless sequence]
+DROP TABLE t1;
diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_gcache_recover_full_gcache.result b/mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_gcache_recover_full_gcache.result
new file mode 100644 (file)
index 0000000..30ee577
--- /dev/null
@@ -0,0 +1,19 @@
+SET SESSION wsrep_sync_wait = 0;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT, f2 LONGBLOB) ENGINE=InnoDB;
+SET SESSION wsrep_sync_wait = 0;
+Killing server ...
+INSERT INTO t1 (f2) VALUES (REPEAT('x', 1024 * 1024 * 10));
+INSERT INTO t1 (f2) VALUES (REPEAT('x', 1024 * 1024 * 10));
+INSERT INTO t1 (f2) VALUES (REPEAT('x', 1024 * 1024 * 10));
+INSERT INTO t1 (f2) VALUES (REPEAT('x', 1024 * 1024 * 10));
+INSERT INTO t1 (f2) VALUES (REPEAT('x', 1024 * 1024 * 10));
+Killing server ...
+Performing --wsrep-recover ...
+Using --wsrep-start-position when starting mysqld ...
+Performing --wsrep-recover ...
+Using --wsrep-start-position when starting mysqld ...
+include/diff_servers.inc [servers=1 2]
+DROP TABLE t1;
+CALL mtr.add_suppression("Skipped GCache ring buffer recovery");
+include/assert_grep.inc [IST first seqno 2 not found from cache, falling back to SST]
+CALL mtr.add_suppression("Skipped GCache ring buffer recovery");
diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_gcache_recover_manytrx.result b/mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_gcache_recover_manytrx.result
new file mode 100644 (file)
index 0000000..868b39b
--- /dev/null
@@ -0,0 +1,107 @@
+SET SESSION wsrep_sync_wait = 0;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT, f2 LONGBLOB) ENGINE=InnoDB;
+CREATE TABLE ten (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
+CREATE PROCEDURE insert_simple ()
+BEGIN
+DECLARE CONTINUE HANDLER FOR SQLEXCEPTION BEGIN END;
+SET SESSION wsrep_sync_wait = 0;
+WHILE 1 DO
+INSERT INTO t1 (f1, f2) VALUES (DEFAULT,'abcdef');
+END WHILE;
+END|
+CREATE PROCEDURE insert_multi ()
+BEGIN
+DECLARE CONTINUE HANDLER FOR SQLEXCEPTION BEGIN END;
+SET SESSION wsrep_sync_wait = 0;
+WHILE 1 DO
+INSERT INTO t1 (f1) VALUES (DEFAULT),(DEFAULT),(DEFAULT),(DEFAULT),(DEFAULT),(DEFAULT),(DEFAULT),(DEFAULT),(DEFAULT),(DEFAULT);
+END WHILE;
+END|
+CREATE PROCEDURE insert_transaction ()
+BEGIN
+DECLARE CONTINUE HANDLER FOR SQLEXCEPTION BEGIN END;
+SET SESSION wsrep_sync_wait = 0;
+SET AUTOCOMMIT = OFF;
+WHILE 1 DO
+START TRANSACTION;
+INSERT INTO t1 (f1) VALUES (DEFAULT);
+INSERT INTO t1 (f1) VALUES (DEFAULT);
+INSERT INTO t1 (f1) VALUES (DEFAULT);
+INSERT INTO t1 (f1) VALUES (DEFAULT);
+INSERT INTO t1 (f1) VALUES (DEFAULT);
+INSERT INTO t1 (f1) VALUES (DEFAULT);
+INSERT INTO t1 (f1) VALUES (DEFAULT);
+INSERT INTO t1 (f1) VALUES (DEFAULT);
+INSERT INTO t1 (f1) VALUES (DEFAULT);
+INSERT INTO t1 (f1) VALUES (DEFAULT);
+COMMIT;
+END WHILE;
+END|
+CREATE PROCEDURE update_simple ()
+BEGIN
+DECLARE CONTINUE HANDLER FOR SQLEXCEPTION BEGIN END;
+SET SESSION wsrep_sync_wait = 0;
+WHILE 1 DO
+UPDATE t1 SET f2 = CONCAT(f2,f2);
+END WHILE;
+END|
+CREATE PROCEDURE insert_1k ()
+BEGIN
+DECLARE CONTINUE HANDLER FOR SQLEXCEPTION BEGIN END;
+SET SESSION wsrep_sync_wait = 0;
+WHILE 1 DO
+INSERT INTO t1 (f2) VALUES (REPEAT('x', 1024));
+END WHILE;
+END|
+CREATE PROCEDURE insert_1m ()
+BEGIN
+DECLARE CONTINUE HANDLER FOR SQLEXCEPTION BEGIN END;
+SET SESSION wsrep_sync_wait = 0;
+WHILE 1 DO
+INSERT INTO t1 (f2) VALUES (REPEAT('x', 1024 * 1024));
+END WHILE;
+END|
+CREATE PROCEDURE insert_10m ()
+BEGIN
+DECLARE CONTINUE HANDLER FOR SQLEXCEPTION BEGIN END;
+SET SESSION wsrep_sync_wait = 0;
+WHILE 1 DO
+INSERT INTO t1 (f2) VALUES (REPEAT('x', 1024 * 1024 * 10));
+END WHILE;
+END|
+CALL insert_simple();;
+CALL insert_multi();;
+CALL insert_transaction ();;
+CALL update_simple ();;
+CALL insert_1k ();;
+CALL insert_1m ();;
+CALL insert_10m ();;
+SET SESSION wsrep_sync_wait = 0;
+Killing server ...
+Killing server ...
+ERROR HY000: Lost connection to MySQL server during query
+ERROR HY000: Lost connection to MySQL server during query
+ERROR HY000: Lost connection to MySQL server during query
+ERROR HY000: Lost connection to MySQL server during query
+ERROR HY000: Lost connection to MySQL server during query
+ERROR HY000: Lost connection to MySQL server during query
+ERROR HY000: Lost connection to MySQL server during query
+Performing --wsrep-recover ...
+Using --wsrep-start-position when starting mysqld ...
+Performing --wsrep-recover ...
+Using --wsrep-start-position when starting mysqld ...
+include/diff_servers.inc [servers=1 2]
+DROP TABLE t1;
+DROP TABLE ten;
+DROP PROCEDURE insert_simple;
+DROP PROCEDURE insert_multi;
+DROP PROCEDURE insert_transaction;
+DROP PROCEDURE update_simple;
+DROP PROCEDURE insert_1k;
+DROP PROCEDURE insert_1m;
+CALL mtr.add_suppression("conflict state 7 after post commit");
+CALL mtr.add_suppression("Skipped GCache ring buffer recovery");
+include/assert_grep.inc [async IST sender starting to serve]
+CALL mtr.add_suppression("Skipped GCache ring buffer recovery");
+include/assert_grep.inc [Recovering GCache ring buffer: found gapless sequence]
index 8dd36497dfb88c33d2c64e45f76515bc13d2cad3..b83226bbd425b1f6070ff29232fa08a0858db6ef 100644 (file)
@@ -5,7 +5,4 @@ ALTER TABLE t1 ADD COLUMN f2 INTEGER;
 SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME='t1';
 COUNT(*) = 2
 1
-SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
-VARIABLE_VALUE = 2
-1
 DROP TABLE t1;
index 6b6899d979d995e64044e9ce538bcffb49598efb..37474797d7413a1df12cb1387433415c2fe08aa1 100644 (file)
@@ -1,20 +1,21 @@
-SELECT COUNT(*) = 1000 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = 'test' AND TABLE_NAME LIKE 't%';
-COUNT(*) = 1000
+SELECT COUNT(*) = 100 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = 'test' AND TABLE_NAME LIKE 't%';
+COUNT(*) = 100
 1
 SET AUTOCOMMIT=OFF;
 START TRANSACTION;
 COMMIT;
 CREATE TABLE sum_table (f1 INTEGER);
-SELECT SUM(f1) = 1000 FROM sum_table;
-SUM(f1) = 1000
+SELECT SUM(f1) = 100 FROM sum_table;
+SUM(f1) = 100
 1
 SET AUTOCOMMIT=OFF;
 START TRANSACTION;
 SET AUTOCOMMIT=OFF;
 START TRANSACTION;
-UPDATE t1000 SET f1 = 3;
+UPDATE t100 SET f1 = 3;
 COMMIT;
 COMMIT;
 ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+include/diff_servers.inc [servers=1 2]
 DROP SCHEMA test;
 CREATE SCHEMA test;
index 294a94baed3141f6c1571f804c69b4432d12b3f2..6d023c38a572be39a59f37a6b867c6d256402675 100644 (file)
@@ -1,6 +1,7 @@
 CREATE TABLE t1 (id INT) ENGINE=InnoDB;
 CREATE TABLE t2 (id INT) ENGINE=InnoDB;
 SET GLOBAL wsrep_slave_threads = 2;
+LOCK TABLE t1 WRITE;
 INSERT INTO t1 VALUES (1);
 INSERT INTO t2 VALUES (1);
 INSERT INTO t1 VALUES (1);
@@ -13,15 +14,15 @@ INSERT INTO t1 VALUES (1);
 INSERT INTO t2 VALUES (1);
 INSERT INTO t1 VALUES (1);
 INSERT INTO t2 VALUES (1);
+SET SESSION wsrep_sync_wait = 0;
+UNLOCK TABLES;
+SET SESSION wsrep_sync_wait = 7;
 SELECT COUNT(*) = 10 FROM t1;
 COUNT(*) = 10
 0
 SELECT COUNT(*) = 10 FROM t2;
 COUNT(*) = 10
 0
-SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE 'committed%';
-COUNT(*) = 2
-1
 SET GLOBAL wsrep_slave_threads = 1;;
 DROP TABLE t1;
 DROP TABLE t2;
index 6e1054cb77260b483a052a656c0fed82f760cf2d..b31150d40806acb8705181dbe4f04de5dde92cb8 100644 (file)
@@ -6,5 +6,7 @@ SELECT COUNT(*) = 0 FROM t1;
 COUNT(*) = 0
 1
 DROP TABLE t1;
-CALL mtr.add_suppression("WSREP: Maximum writeset size exceeded by");
-CALL mtr.add_suppression("WSREP: transaction size exceeded");
+CALL mtr.add_suppression("Maximum writeset size exceeded by");
+CALL mtr.add_suppression("transaction size limit");
+CALL mtr.add_suppression("transaction size exceeded");
+CALL mtr.add_suppression("rbr write fail");
diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_restart_on_unknown_option.result b/mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_restart_on_unknown_option.result
new file mode 100644 (file)
index 0000000..a21b1ed
--- /dev/null
@@ -0,0 +1,40 @@
+CALL mtr.add_suppression("Aborting");
+CALL mtr.add_suppression("unknown option '--galera-unknown-option'");
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(1));
+INSERT INTO t1 VALUES (1, 'a'), (2, 'a'), (3, 'a');
+SELECT * FROM t1;
+f1     f2
+1      a
+2      a
+3      a
+Shutting down server ...
+UPDATE t1 SET f2 = 'b' WHERE f1 > 1;
+UPDATE t1 SET f2 = 'c' WHERE f1 > 2;
+SELECT * FROM t1;
+f1     f2
+1      a
+2      b
+3      c
+Starting server ...
+Starting server ...
+SELECT * FROM t1;
+f1     f2
+1      a
+2      b
+3      c
+Shutting down server ...
+UPDATE t1 SET f2 = 'd' WHERE f1 > 1;
+UPDATE t1 SET f2 = 'd' WHERE f1 > 2;
+SELECT * FROM t1;
+f1     f2
+1      a
+2      d
+3      d
+Starting server ...
+Starting server ...
+SELECT * FROM t1;
+f1     f2
+1      a
+2      d
+3      d
+DROP TABLE t1;
index 615615040feb7ffc88e90fadb4c5a9d405a7639a..6473f95735b94e3b47d47896de63064617d3b692 100644 (file)
@@ -2,4 +2,3 @@ call mtr.add_suppression("WSREP: TO isolation failed for: ");
 Killing server ...
 CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
 ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
-SET GLOBAL wsrep_cluster_address = '';
index c0f2e84dc6f75ce51c2ee24e636da7c384f6c7a1..b24671d120df1c0f0ffa496a32725c0b02a5c342 100644 (file)
@@ -4,21 +4,12 @@ VARIABLE_VALUE = 'Synced'
 SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
 VARIABLE_VALUE = 2
 1
-SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment';
-VARIABLE_VALUE = 'Synced'
-1
 SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
 VARIABLE_VALUE = 2
 1
-SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment';
-VARIABLE_VALUE = 'Synced'
-1
 SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
 VARIABLE_VALUE = 2
 1
-SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment';
-VARIABLE_VALUE = 'Synced'
-1
 SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
 VARIABLE_VALUE = 2
 1
diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_toi_ddl_fk_update.result b/mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_toi_ddl_fk_update.result
new file mode 100644 (file)
index 0000000..8366cfd
--- /dev/null
@@ -0,0 +1,23 @@
+CREATE TABLE ten (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
+CREATE TABLE parent (
+id INT PRIMARY KEY,
+KEY (id)
+) ENGINE=InnoDB;
+CREATE TABLE child (
+id INT PRIMARY KEY AUTO_INCREMENT,
+parent_id INT
+) ENGINE=InnoDB;
+INSERT INTO parent VALUES (1);
+INSERT INTO child (parent_id) SELECT 1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4;
+ALTER TABLE child ADD FOREIGN KEY (parent_id) REFERENCES parent(id) ON UPDATE CASCADE;;
+UPDATE parent SET id = 2 WHERE id = 1;;
+SELECT COUNT(*) = 10000 FROM child WHERE parent_id = 2;
+COUNT(*) = 10000
+1
+SELECT COUNT(*) = 10000 FROM child WHERE parent_id = 2;
+COUNT(*) = 10000
+1
+DROP TABLE child;
+DROP TABLE parent;
+DROP TABLE ten;
diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_toi_drop_database.result b/mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_toi_drop_database.result
new file mode 100644 (file)
index 0000000..8f40984
--- /dev/null
@@ -0,0 +1,24 @@
+CREATE DATABASE database1;
+USE database1;
+CREATE TABLE ten (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+CREATE TABLE t2 (f1 INTEGER) ENGINE=InnoDB;
+SET SESSION wsrep_retry_autocommit = 0;
+INSERT INTO t1 (f1) SELECT 1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5;;
+USE database1;
+SET SESSION wsrep_retry_autocommit = 0;
+INSERT INTO t2 (f1) SELECT 1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5;;
+DROP DATABASE database1;;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME = 'database1';
+COUNT(*) = 0
+1
+USE database1;
+ERROR 42000: Unknown database 'database1'
+SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME = 'database1';
+COUNT(*) = 0
+1
+USE database1;
+ERROR 42000: Unknown database 'database1'
diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_toi_truncate.result b/mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_toi_truncate.result
new file mode 100644 (file)
index 0000000..f52316f
--- /dev/null
@@ -0,0 +1,15 @@
+CREATE TABLE ten (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+SET SESSION wsrep_retry_autocommit = 0;
+INSERT INTO t1 (f1) SELECT 1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5, ten AS a6;;
+TRUNCATE TABLE t1;;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+SELECT COUNT(*) = 0 FROM t1;
+COUNT(*) = 0
+1
+SELECT COUNT(*) = 0 FROM t1;
+COUNT(*) = 0
+1
+DROP TABLE t1;
+DROP TABLE ten;
index 1f067ee2e606e7ffd147ed9008b9fcb4590bdb03..8100962793600b7e8aa7811d6188b2ab036f6b4f 100644 (file)
@@ -23,30 +23,6 @@ VARIABLE_VALUE = 1
 SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
 VARIABLE_VALUE = 'Primary'
 1
-SET GLOBAL wsrep_cluster_address = @@wsrep_cluster_address;
-SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
-VARIABLE_VALUE = 'Primary'
-1
-SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
-VARIABLE_VALUE = 2
-1
-SET GLOBAL wsrep_cluster_address = 'gcomm://192.0.2.1';
-SELECT COUNT(*) > 0 FROM INFORMATION_SCHEMA.GLOBAL_STATUS;
-COUNT(*) > 0
-1
-SHOW STATUS LIKE 'wsrep_ready';
-Variable_name  Value
-wsrep_ready    OFF
-SHOW STATUS LIKE 'wsrep_cluster_status';
-Variable_name  Value
-wsrep_cluster_status   non-Primary
-SHOW STATUS LIKE 'wsrep_local_state';
-Variable_name  Value
-wsrep_local_state      0
-SHOW STATUS LIKE 'wsrep_local_state_comment';
-Variable_name  Value
-wsrep_local_state_comment      Initialized
-SET GLOBAL wsrep_cluster_address = @@wsrep_cluster_address;
 SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
 VARIABLE_VALUE = 'Primary'
 1
@@ -61,7 +37,5 @@ CALL mtr.add_suppression("wsrep::connect\\(\\) failed: 7");
 CALL mtr.add_suppression("gcs_caused\\(\\) returned -103 \\(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("Failed to open channel 'my_wsrep_cluster' at 'gcomm://192\\.0\\.2\\.1': -110 \\(Connection timed out\\)");
 CALL mtr.add_suppression("gcs connect failed: Connection timed out");
 CALL mtr.add_suppression("WSREP: wsrep::connect\\(foo://\\) failed: 7");
-CALL mtr.add_suppression("WSREP: wsrep::connect\\(gcomm://192.0.2.1\\) failed: 7");
diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_var_max_ws_rows.result b/mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_var_max_ws_rows.result
new file mode 100644 (file)
index 0000000..6e239c7
--- /dev/null
@@ -0,0 +1,115 @@
+CREATE TABLE ten (f1 INTEGER) ENGINE=InnoDB;
+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;
+SET GLOBAL wsrep_max_ws_rows = 4;
+START TRANSACTION;
+INSERT INTO t1 (f2) VALUES (1);
+INSERT INTO t1 (f2) VALUES (2);
+INSERT INTO t1 (f2) VALUES (3);
+INSERT INTO t1 (f2) VALUES (4);
+INSERT INTO t1 (f2) VALUES (5);
+ERROR HY000: wsrep_max_ws_rows exceeded
+COMMIT;
+SELECT COUNT(*) = 0 FROM t1;
+COUNT(*) = 0
+1
+START TRANSACTION;
+INSERT INTO t1 (f2) VALUES (1);
+INSERT INTO t1 (f2) VALUES (2);
+INSERT INTO t1 (f2) VALUES (3);
+INSERT INTO t1 (f2) VALUES (4);
+UPDATE t1 SET f2 = 10 WHERE f2 = 4;
+ERROR HY000: wsrep_max_ws_rows exceeded
+COMMIT;
+SELECT COUNT(*) = 0 FROM t1;
+COUNT(*) = 0
+1
+START TRANSACTION;
+INSERT INTO t1 (f2) VALUES (1);
+INSERT INTO t1 (f2) VALUES (2);
+INSERT INTO t1 (f2) VALUES (3);
+INSERT INTO t1 (f2) VALUES (4);
+DELETE FROM t1 WHERE f2 = 1;
+ERROR HY000: wsrep_max_ws_rows exceeded
+COMMIT;
+SELECT COUNT(*) = 0 FROM t1;
+COUNT(*) = 0
+1
+SET GLOBAL wsrep_max_ws_rows = 5;
+INSERT INTO t1 (f2) VALUES (1),(2),(3),(4),(5);
+SET GLOBAL wsrep_max_ws_rows = 4;
+UPDATE t1 SET f2 = f2 + 10;
+ERROR HY000: wsrep_max_ws_rows exceeded
+SELECT COUNT(*) = 5 FROM t1;
+COUNT(*) = 5
+1
+DELETE FROM t1 WHERE f2 < 10;
+ERROR HY000: wsrep_max_ws_rows exceeded
+SELECT COUNT(*) = 5 FROM t1;
+COUNT(*) = 5
+1
+INSERT INTO t1 (f2) SELECT * FROM ten;
+ERROR HY000: wsrep_max_ws_rows exceeded
+SELECT COUNT(*) = 5 FROM t1;
+COUNT(*) = 5
+1
+INSERT INTO t1 (f2) VALUES (10),(20),(30),(40),(50);
+ERROR HY000: wsrep_max_ws_rows exceeded
+SELECT COUNT(*) = 5 FROM t1;
+COUNT(*) = 5
+1
+SET GLOBAL wsrep_max_ws_rows = 10;
+DELETE FROM t1 WHERE f2 < 10;
+SELECT COUNT(*) = 0 FROM t1;
+COUNT(*) = 0
+1
+SET GLOBAL wsrep_max_ws_rows = 100;
+SELECT COUNT(*) = 100 FROM t1;
+COUNT(*) = 100
+1
+DELETE FROM t1 WHERE f2 < 101;
+SELECT COUNT(*) = 0 FROM t1;
+COUNT(*) = 0
+1
+SET GLOBAL wsrep_max_ws_rows = 9999;
+INSERT INTO t1 (f2) SELECT 1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4;
+ERROR HY000: wsrep_max_ws_rows exceeded
+SET GLOBAL wsrep_max_ws_rows = 10000;
+INSERT INTO t1 (f2) SELECT 1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4;
+SET GLOBAL wsrep_max_ws_rows = 9999;
+UPDATE t1 SET f2 = 2 WHERE f2 = 1;
+ERROR HY000: wsrep_max_ws_rows exceeded
+SET GLOBAL wsrep_max_ws_rows = 10000;
+UPDATE t1 SET f2 = 2 WHERE f2 = 1;
+SET GLOBAL wsrep_max_ws_rows = 9999;
+DELETE FROM t1 WHERE f2 = 2;
+ERROR HY000: wsrep_max_ws_rows exceeded
+SET GLOBAL wsrep_max_ws_rows = 10000;
+DELETE FROM t1 WHERE f2 = 2;
+SELECT COUNT(*) = 0 FROM t1;
+COUNT(*) = 0
+1
+SET AUTOCOMMIT = ON;
+SET GLOBAL wsrep_max_ws_rows = 1;
+START TRANSACTION;
+INSERT INTO t1 (f2) VALUES (1);
+INSERT INTO t1 (f2) VALUES (2);
+ERROR HY000: wsrep_max_ws_rows exceeded
+INSERT INTO t1 (f2) VALUES (1);
+INSERT INTO t1 (f2) VALUES (2);
+SET AUTOCOMMIT = OFF;
+START TRANSACTION;
+INSERT INTO t1 (f2) VALUES (1);
+INSERT INTO t1 (f2) VALUES (2);
+ERROR HY000: wsrep_max_ws_rows exceeded
+INSERT INTO t1 (f2) VALUES (1);
+INSERT INTO t1 (f2) VALUES (2);
+ERROR HY000: wsrep_max_ws_rows exceeded
+START TRANSACTION;
+INSERT INTO t1 (f2) VALUES (1);
+START TRANSACTION;
+INSERT INTO t1 (f2) VALUES (1);
+INSERT INTO t1 (f2) VALUES (2);
+ERROR HY000: wsrep_max_ws_rows exceeded
+DROP TABLE t1;
+DROP TABLE ten;
index 6db5c24662cd41cc08517115eb9bf9d9e2ea2a1d..03c60f2fbac45bed9493d23c71b8a04342c1a31c 100644 (file)
@@ -9,4 +9,13 @@ ERROR HY000: Got error 5 during COMMIT
 SELECT COUNT(*) = 0 FROM t1;
 COUNT(*) = 0
 1
+SET GLOBAL wsrep_provider_options = 'repl.max_ws_size=10000';
+SELECT @@wsrep_max_ws_size = 10000;
+@@wsrep_max_ws_size = 10000
+1
+SET GLOBAL wsrep_provider_options = 'repl.max_ws_size=20000';
+SET GLOBAL wsrep_provider_options = 'repl.max_ws_size=10000';
+SET GLOBAL wsrep_max_ws_size = 20000;
+provider_options_match
+1
 DROP TABLE t1;
diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_var_retry_autocommit.result b/mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_var_retry_autocommit.result
new file mode 100644 (file)
index 0000000..f4d17ad
--- /dev/null
@@ -0,0 +1,32 @@
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=InnoDB;
+CREATE TRIGGER tr1 BEFORE INSERT ON t1 FOR EACH ROW SET NEW.f2 = SLEEP(5);
+SET SESSION wsrep_retry_autocommit = 0;
+INSERT INTO t1 (f1) VALUES (1),(2);;
+TRUNCATE TABLE t1;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+SET SESSION wsrep_retry_autocommit = 1;
+INSERT INTO t1 (f1) VALUES (3),(4);;
+TRUNCATE TABLE t1;
+SELECT * FROM test.t1;
+f1     f2
+3      0
+4      0
+CREATE PROCEDURE repeated_truncate ()
+BEGIN
+DECLARE i INT;
+DECLARE CONTINUE HANDLER FOR SQLEXCEPTION BEGIN END;
+SET i = 0;
+WHILE i <= 1000 DO
+TRUNCATE TABLE t1;
+SET i = i + 1;
+END WHILE;
+END|
+CALL repeated_truncate();
+SET SESSION wsrep_retry_autocommit = 1;
+INSERT INTO t1 (f1) VALUES (5),(6);
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+SET SESSION wsrep_retry_autocommit = 1024;
+INSERT INTO t1 (f1) VALUES (7),(8);;
+include/diff_servers.inc [servers=1 2]
+DROP TABLE t1;
+DROP PROCEDURE repeated_truncate;
diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_wsrep_log_conficts.result b/mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_wsrep_log_conficts.result
new file mode 100644 (file)
index 0000000..b535c64
--- /dev/null
@@ -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-wsrep-5.6/mysql-test/suite/galera/r/galera_wsrep_provider_options_syntax.result b/mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_wsrep_provider_options_syntax.result
new file mode 100644 (file)
index 0000000..f19dc40
--- /dev/null
@@ -0,0 +1,5 @@
+call mtr.add_suppression("WSREP\: Unknown parameter 'gmcasts\.segment'");
+call mtr.add_suppression("WSREP\: Set options returned 7");
+SET GLOBAL wsrep_provider_options="gmcasts.segment=1";
+ERROR HY000: Incorrect arguments to SET
+Unhandled exceptions: 0
diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/r/lp1376747-2.result b/mysql-wsrep-5.6/mysql-test/suite/galera/r/lp1376747-2.result
new file mode 100644 (file)
index 0000000..3b8aee6
--- /dev/null
@@ -0,0 +1,19 @@
+CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1);
+FLUSH TABLES t1 FOR EXPORT;
+ALTER TABLE t1 ADD COLUMN f2 INTEGER;
+INSERT INTO t1 VALUES (2,3);
+UNLOCK TABLES;
+### t1 should have column f2
+SHOW CREATE TABLE t1;
+Table  Create Table
+t1     CREATE TABLE `t1` (
+  `id` int(11) NOT NULL,
+  `f2` int(11) DEFAULT NULL,
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+SELECT * from t1;
+id     f2
+1      NULL
+2      3
+DROP TABLE t1;
diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/r/lp1376747-3.result b/mysql-wsrep-5.6/mysql-test/suite/galera/r/lp1376747-3.result
new file mode 100644 (file)
index 0000000..fc982c9
--- /dev/null
@@ -0,0 +1,21 @@
+CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1);
+FLUSH TABLE WITH READ LOCK;
+### This shouldn't block.
+FLUSH TABLES t1 FOR EXPORT;
+ALTER TABLE t1 ADD COLUMN f2 INTEGER;
+UNLOCK TABLES;
+### t1 should have column f2
+SHOW CREATE TABLE t1;
+Table  Create Table
+t1     CREATE TABLE `t1` (
+  `id` int(11) NOT NULL,
+  `f2` int(11) DEFAULT NULL,
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+INSERT INTO t1 VALUES (2,3);
+SELECT * from t1;
+id     f2
+1      NULL
+2      3
+DROP TABLE t1;
diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/r/lp1376747-4.result b/mysql-wsrep-5.6/mysql-test/suite/galera/r/lp1376747-4.result
new file mode 100644 (file)
index 0000000..b0ae2b7
--- /dev/null
@@ -0,0 +1,36 @@
+CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1);
+SET session wsrep_sync_wait=0;
+SET session wsrep_causal_reads=OFF;
+FLUSH TABLE WITH READ LOCK;
+ALTER TABLE t1 ADD COLUMN f2 INTEGER;
+INSERT INTO t1 VALUES (2,3);
+SET session wsrep_sync_wait=0;
+SET session wsrep_causal_reads=OFF;
+SHOW CREATE TABLE t1;
+Table  Create Table
+t1     CREATE TABLE `t1` (
+  `id` int(11) NOT NULL,
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+FLUSH TABLES t1 WITH READ LOCK;;
+UNLOCK TABLES;
+SHOW CREATE TABLE t1;
+Table  Create Table
+t1     CREATE TABLE `t1` (
+  `id` int(11) NOT NULL,
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+UNLOCK TABLES;
+SHOW CREATE TABLE t1;
+Table  Create Table
+t1     CREATE TABLE `t1` (
+  `id` int(11) NOT NULL,
+  `f2` int(11) DEFAULT NULL,
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+SELECT * from t1;
+id     f2
+1      NULL
+2      3
+DROP TABLE t1;
diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/r/lp1376747.result b/mysql-wsrep-5.6/mysql-test/suite/galera/r/lp1376747.result
new file mode 100644 (file)
index 0000000..4617d59
--- /dev/null
@@ -0,0 +1,19 @@
+CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1);
+FLUSH TABLES t1 WITH READ LOCK;
+ALTER TABLE t1 ADD COLUMN f2 INTEGER;
+INSERT INTO t1 VALUES (2,3);
+UNLOCK TABLES;
+### t1 should have column f2
+SHOW CREATE TABLE t1;
+Table  Create Table
+t1     CREATE TABLE `t1` (
+  `id` int(11) NOT NULL,
+  `f2` int(11) DEFAULT NULL,
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+SELECT * from t1;
+id     f2
+1      NULL
+2      3
+DROP TABLE t1;
diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/r/pxc-421.result b/mysql-wsrep-5.6/mysql-test/suite/galera/r/pxc-421.result
new file mode 100644 (file)
index 0000000..1822201
--- /dev/null
@@ -0,0 +1,35 @@
+set GLOBAL wsrep_slave_threads=26;
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 (f1) SELECT * from t1 as x1;
+set GLOBAL wsrep_slave_threads=16;
+SET GLOBAL wsrep_provider='none';
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+set GLOBAL wsrep_slave_threads=5;
+SELECT COUNT(*) = 5 FROM t1;
+COUNT(*) = 5
+1
+set GLOBAL wsrep_slave_threads=12;
+SELECT COUNT(*) = 4 FROM t1;
+COUNT(*) = 4
+1
+INSERT INTO t1 VALUES (100), (101), (102);
+set GLOBAL wsrep_slave_threads=5;
+INSERT INTO t1 (f1) SELECT * from t1 as x1;
+show global variables like 'wsrep_slave_threads';
+Variable_name  Value
+wsrep_slave_threads    5
+SET GLOBAL wsrep_slave_threads = 1;
+SELECT COUNT(*) FROM t1;
+COUNT(*)
+16
+SELECT COUNT(*) FROM t1;
+COUNT(*)
+15
+show global variables like 'wsrep_slave_threads';
+Variable_name  Value
+wsrep_slave_threads    12
+SET GLOBAL wsrep_slave_threads = 1;
+DROP TABLE t1;
diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/t/GAL-401.test b/mysql-wsrep-5.6/mysql-test/suite/galera/t/GAL-401.test
new file mode 100644 (file)
index 0000000..4b7ec95
--- /dev/null
@@ -0,0 +1,52 @@
+# This tests proper desync counter cleanup when DONOR/DESYNC state is cleared.
+
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+# Make node 1 tolerate split-brain
+SET GLOBAL wsrep_provider_options = 'pc.ignore_sb=true';
+
+# Desync and disconnect node 2 from the PC:
+--connection node_2
+SET @@global.wsrep_desync = 1;
+SET SESSION wsrep_sync_wait=0;
+SET GLOBAL wsrep_provider_options = 'gmcast.isolate=1';
+--let $wait_condition = SELECT VARIABLE_VALUE = 'non-Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
+--source include/wait_condition.inc
+
+# Wait until node 2 disappears from the PC:
+--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
+--let $wait_condition = SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
+--source include/wait_condition.inc
+
+# Modify app state to force node 2 into PRIMARY upon reconnection.
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(1));
+
+# Reconnect node 2 to the PC:
+--connection node_2
+SET GLOBAL wsrep_provider_options = 'gmcast.isolate=0';
+--let $wait_condition = SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
+--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
+
+# Must return 0:
+SHOW STATUS LIKE 'wsrep_desync_count';
+
+# Resync node_2, should pass:
+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;
+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.");
+
+--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
+SET GLOBAL wsrep_provider_options = 'pc.ignore_sb=false';
diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/t/GAL-419.test b/mysql-wsrep-5.6/mysql-test/suite/galera/t/GAL-419.test
new file mode 100644 (file)
index 0000000..e50b948
--- /dev/null
@@ -0,0 +1,35 @@
+#
+# GAL-419 safe_to_bootstrap: boostrap using wsrep_cluster_address=gcomm:// not prevented
+#
+
+--source include/galera_cluster.inc
+--source include/big_test.inc
+
+--connection node_2
+SET SESSION wsrep_sync_wait = 0;
+--source include/kill_galera.inc
+
+--connection node_1
+SET SESSION wsrep_sync_wait = 0;
+--source include/kill_galera.inc
+
+--sleep 2
+
+# Node #1 has wsrep_cluster_address=gcomm:// in my.cnf, so should fail to bootstrap
+
+--error 1
+--exec $MYSQLD --defaults-group-suffix=.1 --defaults-file=$MYSQLTEST_VARDIR/my.cnf | grep 'This node is not safe to bootstrap the cluster'
+
+# Unless we remove grastate.dat
+
+--remove_file $MYSQLTEST_VARDIR/mysqld.1/data/grastate.dat
+--remove_file $MYSQLTEST_VARDIR/mysqld.2/data/grastate.dat
+
+--connection node_1
+--let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+--source include/start_mysqld.inc
+--source include/wait_until_connected_again.inc
+
+--connection node_2
+--let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.2.expect
+--source include/start_mysqld.inc
diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/t/GAL-480.test b/mysql-wsrep-5.6/mysql-test/suite/galera/t/GAL-480.test
new file mode 100644 (file)
index 0000000..c2b34f2
--- /dev/null
@@ -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;
diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/t/MW-284.cnf b/mysql-wsrep-5.6/mysql-test/suite/galera/t/MW-284.cnf
new file mode 100644 (file)
index 0000000..52fd309
--- /dev/null
@@ -0,0 +1 @@
+!include ../galera_2nodes_as_master.cnf
diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/t/MW-284.test b/mysql-wsrep-5.6/mysql-test/suite/galera/t/MW-284.test
new file mode 100644 (file)
index 0000000..ad02227
--- /dev/null
@@ -0,0 +1,57 @@
+#
+# MW-284 Slave I/O retry on ER_COM_UNKNOWN_ERROR
+#
+
+--source include/have_log_bin.inc
+--source include/galera_cluster.inc
+
+--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
+--disable_query_log
+--eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$NODE_MYPORT_1, MASTER_CONNECT_RETRY=1;
+--enable_query_log
+
+--connection node_1
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+SET GLOBAL wsrep_provider_options='gmcast.isolate=1';
+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;
+
+--connection node_3
+START SLAVE USER='root';
+--sleep 1
+--let $slave_param= Slave_IO_Running
+--let $slave_param_value= Connecting
+--source include/wait_for_slave_param.inc
+
+--connection node_1
+SET GLOBAL wsrep_provider_options='gmcast.isolate=0';
+
+# We expect the slave to reconnect and resume replication
+
+--connection node_3
+--source include/wait_for_slave_to_start.inc
+
+--connection node_1
+INSERT INTO t1 VALUES (1);
+
+--connection node_3
+--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1'
+--source include/wait_condition.inc
+--let $wait_condition = SELECT COUNT(*) > 0 FROM t1
+--source include/wait_condition.inc
+
+# Cleanup
+
+--connection node_1
+DROP TABLE t1;
+
+--connection node_3
+--let $wait_condition = SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1'
+--source include/wait_condition.inc
+
+STOP SLAVE;
+RESET SLAVE ALL;
+
+CALL mtr.add_suppression('failed registering on master');
diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/t/MW-285.test b/mysql-wsrep-5.6/mysql-test/suite/galera/t/MW-285.test
new file mode 100644 (file)
index 0000000..1c567f7
--- /dev/null
@@ -0,0 +1,31 @@
+#
+# Broken FK constraints cause assertions
+#
+
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+CREATE TABLE parent1 ( id INT PRIMARY KEY, KEY (id) ) ENGINE=InnoDB;
+CREATE TABLE parent2 ( id INT PRIMARY KEY, KEY (id) ) ENGINE=InnoDB;
+
+CREATE TABLE child (
+       id INT PRIMARY KEY,
+       parent1_id INT,
+       parent2_id INT,
+       FOREIGN KEY (parent1_id) REFERENCES parent1(id),
+       FOREIGN KEY (parent1_id) REFERENCES parent2(id)
+) ENGINE=InnoDB;
+
+INSERT INTO parent1 VALUES (1);
+INSERT INTO parent2 VALUES (1);
+INSERT INTO child VALUES (1,1,1);
+INSERT INTO child VALUES (2,1,1);
+
+SET foreign_key_checks=OFF;
+DROP TABLE parent1;
+
+UPDATE child SET parent1_id=2 WHERE id=1;
+
+DROP TABLE child;
+DROP TABLE parent2;
+SET foreign_key_checks=ON;
diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/t/MW-286.test b/mysql-wsrep-5.6/mysql-test/suite/galera/t/MW-286.test
new file mode 100644 (file)
index 0000000..1b2e322
--- /dev/null
@@ -0,0 +1,32 @@
+#
+# MW-286 Spurious deadlock error after error with wsrep_desync and wsrep_on
+#
+
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+--source include/big_test.inc
+
+--connection node_1
+CREATE TABLE ten (f1 INTEGER);
+INSERT INTO ten VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+
+CREATE TABLE t1 (f1 INTEGER) Engine=InnoDB;
+
+# Insert some values before the ALTER
+INSERT INTO t1 (f1) SELECT 000000 + (10000 * a1.f1) + (1000 * a2.f1) + (100 * a3.f1) + (10 * a4.f1) + a5.f1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5;
+
+# Insert more values while the ALTER is running
+--send INSERT INTO t1 (f1) SELECT 100000 + (10000 * a1.f1) + (1000 * a2.f1) + (100 * a3.f1) + (10 * a4.f1) + a5.f1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5;
+
+--connection node_2
+SET GLOBAL wsrep_desync = TRUE;
+SET wsrep_on = FALSE;
+
+--error ER_QUERY_INTERRUPTED
+ALTER TABLE t1 ADD PRIMARY KEY (f1);
+
+SET wsrep_on = TRUE;
+SET GLOBAL wsrep_desync = FALSE;
+
+DROP TABLE t1;
+DROP TABLE ten;
diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/t/MW-292.test b/mysql-wsrep-5.6/mysql-test/suite/galera/t/MW-292.test
new file mode 100644 (file)
index 0000000..945d9f4
--- /dev/null
@@ -0,0 +1,79 @@
+#
+# MW-292 Reset timestamp after transaction replay
+#
+# We force transaction replay to happen and then we check that NOW() is not stuck in time.
+# As a bonus we also check that RAND() continues to return random values after replay
+#
+#
+
+--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 rand_table (f1 FLOAT);
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(1));
+INSERT INTO t1 VALUES (1, 'a');
+INSERT INTO t1 VALUES (2, 'a');
+
+--connection node_1
+SET AUTOCOMMIT=ON;
+START TRANSACTION;
+
+UPDATE t1 SET f2 = 'b' WHERE f1 = 1;
+SELECT * FROM t1 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
+
+--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
+
+# Issue a conflicting update on node #2
+--connection node_2
+UPDATE t1 SET f2 = 'c' 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 via replay
+--connection node_1
+--reap
+
+# Confirm that NOW() is not stuck in time relative to SYSDATE();
+--sleep 3
+SELECT TIMEDIFF(SYSDATE(), NOW()) < 2;
+
+INSERT INTO rand_table VALUES (RAND()),(RAND()),(RAND()),(RAND()),(RAND());
+INSERT INTO rand_table VALUES (RAND()),(RAND()),(RAND()),(RAND()),(RAND());
+
+SELECT COUNT(DISTINCT f1) = 10 FROM rand_table;
+
+# 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
+DROP TABLE t1;
+DROP TABLE rand_table;
diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/t/MW-309.test b/mysql-wsrep-5.6/mysql-test/suite/galera/t/MW-309.test
new file mode 100644 (file)
index 0000000..d4939f2
--- /dev/null
@@ -0,0 +1,31 @@
+#
+# MW-309 Regression: wsrep_max_ws_rows limit also applies to certain SELECT queries
+#
+
+--source include/galera_cluster.inc
+
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 SELECT * FROM t1;
+INSERT INTO t1 SELECT * FROM t1;
+INSERT INTO t1 SELECT * FROM t1;
+INSERT INTO t1 SELECT * FROM t1;
+INSERT INTO t1 SELECT * FROM t1;
+
+SET GLOBAL wsrep_max_ws_rows = 2;
+
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+SELECT * FROM t1 GROUP BY f1;
+SELECT * FROM t1 GROUP BY f1;
+
+--error 0
+SELECT * FROM t1 GROUP BY f1;
+
+--disable_result_log
+--error 0
+SHOW STATUS LIKE '%wsrep%';
+--enable_result_log
+
+SET GLOBAL wsrep_max_ws_rows = 0;
+DROP TABLE t1;
diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/t/MW-313-master.opt b/mysql-wsrep-5.6/mysql-test/suite/galera/t/MW-313-master.opt
new file mode 100644 (file)
index 0000000..8a755e9
--- /dev/null
@@ -0,0 +1 @@
+--log-bin --log-slave-updates
diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/t/MW-313.test b/mysql-wsrep-5.6/mysql-test/suite/galera/t/MW-313.test
new file mode 100644 (file)
index 0000000..d697cb2
--- /dev/null
@@ -0,0 +1,50 @@
+#
+# MW-313 Enforce wsrep_max_ws_rows also when binlog is enabled
+#
+
+--source include/galera_cluster.inc
+--source include/have_binlog_format_row.inc
+
+# No error expected for SELECT and SHOW
+
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 SELECT * FROM t1;
+INSERT INTO t1 SELECT * FROM t1;
+INSERT INTO t1 SELECT * FROM t1;
+INSERT INTO t1 SELECT * FROM t1;
+INSERT INTO t1 SELECT * FROM t1;
+
+SET GLOBAL wsrep_max_ws_rows = 2;
+
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+SELECT * FROM t1 GROUP BY f1;
+SELECT * FROM t1 GROUP BY f1;
+
+--error 0
+SELECT * FROM t1 GROUP BY f1;
+
+--disable_result_log
+--error 0
+SHOW STATUS LIKE '%wsrep%';
+--enable_result_log
+
+# Error expected for DML
+
+--error ER_ERROR_DURING_COMMIT
+INSERT INTO t1 SELECT * FROM t1;
+
+START TRANSACTION;
+INSERT INTO t1 (f1) VALUES (1);
+
+--error ER_ERROR_DURING_COMMIT
+INSERT INTO t1 (f1) VALUES (2),(3),(4);
+
+ROLLBACK;
+START TRANSACTION;
+--error ER_ERROR_DURING_COMMIT
+DELETE FROM t1;
+
+DROP TABLE t1;
+SET GLOBAL wsrep_max_ws_rows = 0;
diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/t/MW-328-footer.inc b/mysql-wsrep-5.6/mysql-test/suite/galera/t/MW-328-footer.inc
new file mode 100644 (file)
index 0000000..5b736df
--- /dev/null
@@ -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-wsrep-5.6/mysql-test/suite/galera/t/MW-328-header.inc b/mysql-wsrep-5.6/mysql-test/suite/galera/t/MW-328-header.inc
new file mode 100644 (file)
index 0000000..f0a6cca
--- /dev/null
@@ -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-wsrep-5.6/mysql-test/suite/galera/t/MW-328A.test b/mysql-wsrep-5.6/mysql-test/suite/galera/t/MW-328A.test
new file mode 100644 (file)
index 0000000..836dd08
--- /dev/null
@@ -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-wsrep-5.6/mysql-test/suite/galera/t/MW-328B.test b/mysql-wsrep-5.6/mysql-test/suite/galera/t/MW-328B.test
new file mode 100644 (file)
index 0000000..11969dd
--- /dev/null
@@ -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-wsrep-5.6/mysql-test/suite/galera/t/MW-328C.test b/mysql-wsrep-5.6/mysql-test/suite/galera/t/MW-328C.test
new file mode 100644 (file)
index 0000000..7241dfb
--- /dev/null
@@ -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-wsrep-5.6/mysql-test/suite/galera/t/MW-328D.test b/mysql-wsrep-5.6/mysql-test/suite/galera/t/MW-328D.test
new file mode 100644 (file)
index 0000000..e8a22f2
--- /dev/null
@@ -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-wsrep-5.6/mysql-test/suite/galera/t/MW-328E.test b/mysql-wsrep-5.6/mysql-test/suite/galera/t/MW-328E.test
new file mode 100644 (file)
index 0000000..34b17be
--- /dev/null
@@ -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;
diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/t/MW-329-master.opt b/mysql-wsrep-5.6/mysql-test/suite/galera/t/MW-329-master.opt
new file mode 100644 (file)
index 0000000..6565a6a
--- /dev/null
@@ -0,0 +1 @@
+--wsrep-retry-autocommit=0
diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/t/MW-329.test b/mysql-wsrep-5.6/mysql-test/suite/galera/t/MW-329.test
new file mode 100644 (file)
index 0000000..445f879
--- /dev/null
@@ -0,0 +1,81 @@
+#
+# #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
+--let $connection_id = `SELECT CONNECTION_ID()`
+--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
+       --error 0,ER_LOCK_DEADLOCK
+       --eval UPDATE t1 SET f2 = '$signature'
+       --enable_query_log
+       --let $row_count = `SELECT ROW_COUNT()`
+       if (`SELECT @@error_count = 0`) {
+               if (`SELECT $row_count = 0`) {
+                       --die ROW_COUNT() = 0
+               }
+       }
+       --dec $count
+}
+
+#
+# Confirm that some transaction replays occurred
+#
+
+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;
diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/t/ev51914.test b/mysql-wsrep-5.6/mysql-test/suite/galera/t/ev51914.test
new file mode 100644 (file)
index 0000000..e5edaca
--- /dev/null
@@ -0,0 +1,214 @@
+# Disable SAVEPOINT and ROLLBACK TO SAVEPOINT in SP, SF, TR.
+
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+
+--connection node_1
+--echo SAVEPOINT in a stored function should be forbidden
+--delimiter |
+CREATE FUNCTION f1 () RETURNS INT BEGIN
+       SAVEPOINT s;
+       RETURN 1;
+END|
+--delimiter ;
+
+SELECT f1();
+
+DROP FUNCTION f1;
+
+--echo ROLLBACK TO SAVEPOINT in a stored function should be forbidden
+--delimiter |
+CREATE FUNCTION f2 () RETURNS INT BEGIN
+       ROLLBACK TO SAVEPOINT s;
+       RETURN 1;
+END|
+--delimiter ;
+
+BEGIN;
+SAVEPOINT s;
+--error ER_SP_DOES_NOT_EXIST
+SELECT f2();
+COMMIT;
+
+DROP FUNCTION f2;
+
+BEGIN;
+SAVEPOINT S;
+ROLLBACK TO SAVEPOINT S;
+COMMIT;
+
+
+CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB;
+CREATE TABLE t2 (a INT PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB;
+INSERT INTO t1 values (110), (111), (112), (113), (114);
+
+--echo Direct SAVEPOINT in a trigger should be forbidden
+--connection node_2
+CREATE TRIGGER i1_t1 BEFORE INSERT ON t1 FOR EACH ROW SAVEPOINT s;
+
+--connection node_1
+INSERT INTO t1 VALUES (1);
+DROP TRIGGER i1_t1;
+
+CREATE TRIGGER i2_t1 AFTER INSERT ON t1 FOR EACH ROW SAVEPOINT s;
+INSERT INTO t1 VALUES (2);
+DROP TRIGGER i2_t1;
+
+INSERT INTO t1 VALUES (3);
+CREATE TRIGGER u1_t1 BEFORE UPDATE ON t1 FOR EACH ROW SAVEPOINT s;
+UPDATE t1 SET a=4 WHERE a=3;
+DROP TRIGGER u1_t1;
+
+CREATE TRIGGER u2_t1 AFTER UPDATE ON t1 FOR EACH ROW SAVEPOINT s;
+UPDATE t1 SET a=4 WHERE a=3;
+DROP TRIGGER u2_t1;
+
+CREATE TRIGGER d1_t1 BEFORE DELETE ON t1 FOR EACH ROW SAVEPOINT s;
+DELETE FROM t1;
+DROP TRIGGER d1_t1;
+
+CREATE TRIGGER d1_t1 AFTER DELETE ON t1 FOR EACH ROW SAVEPOINT s;
+DELETE FROM t1;
+DROP TRIGGER d1_t1;
+
+--echo SAVEPOINT in a compound statement in a trigger should be forbidden
+--delimiter |
+CREATE TRIGGER i3_t1 BEFORE INSERT ON t1 FOR EACH ROW BEGIN
+       SAVEPOINT s;
+END|
+--delimiter ;
+INSERT INTO t1 VALUES (5);
+DROP TRIGGER i3_t1;
+
+--echo SAVEPOINT in a PS call in a trigger should be forbidden
+# echo handled by SAVEPOINT forbidden in PS
+--delimiter |
+--error ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG
+CREATE TRIGGER i4_t1 BEFORE INSERT ON t1 FOR EACH ROW BEGIN
+       PREPARE set_savepoint FROM "SAVEPOINT s";
+       EXECUTE set_savepoint;
+       DEALLOCATE PREPARE set_savepoint;
+END|
+--delimiter ;
+
+--connection node_2
+--echo SAVEPOINT in SP called from a trigger should be forbidden
+--delimiter |
+CREATE PROCEDURE p1() BEGIN
+       SAVEPOINT s;
+END|
+--delimiter ;
+--connection node_1
+CREATE TRIGGER i5_t1 BEFORE INSERT ON t1 FOR EACH ROW CALL p1;
+INSERT INTO t1 VALUES (6);
+DROP TRIGGER i5_t1;
+
+--echo SAVEPOINT in a SP called from a PS called from a trigger be forbidden
+# echo handled by SAVEPOINT forbidden in PS
+PREPARE call_p1 FROM "CALL p1";
+--error ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG
+CREATE TRIGGER i6_t1 BEFORE INSERT ON t1 FOR EACH ROW EXECUTE call_p1;
+
+--echo SAVEPOINT in a function called from a trigger should be forbidden
+--delimiter |
+CREATE FUNCTION f1 () RETURNS INT BEGIN
+       SAVEPOINT s;
+       RETURN 1;
+END|
+--delimiter ;
+CREATE TRIGGER i7_t1 BEFORE INSERT ON t1 FOR EACH ROW SET @foo = f1();
+INSERT INTO t1 VALUES (7);
+DROP TRIGGER i7_t1;
+
+--echo SAVEPOINT in a SP called from a SP called from a trigger should be forbidden
+--delimiter |
+CREATE PROCEDURE p2() BEGIN
+       CALL p1();
+END|
+--delimiter ;
+CREATE TRIGGER i8_t1 BEFORE INSERT ON t1 FOR EACH ROW CALL p2;
+INSERT INTO t1 VALUES (8);
+DROP TRIGGER i8_t1;
+
+--echo SAVEPOINT in a SP called from a trigger called from a SP should be forbidden
+CREATE TRIGGER i9_t1 BEFORE INSERT ON t1 FOR EACH ROW CALL p1;
+--delimiter |
+CREATE PROCEDURE p3() BEGIN
+       INSERT INTO t1 VALUES (9);
+END|
+--delimiter ;
+CALL p3();
+DROP TRIGGER i9_t1;
+
+--echo ROLLBACK TO SAVEPOINT in trigger as a trivial statement should be forbidden
+# Trigger activation creates a new savepoint level, making the earlier levels
+# inaccessible. Thus forbidding SAVEPOINT should be enough as then there is
+# no valid savepoint to pass to ROLLBACK TO SAVEPOINT, but we forbid it once
+# more just in case.
+CREATE TRIGGER i4_t1 BEFORE INSERT ON t1 FOR EACH ROW ROLLBACK TO SAVEPOINT s;
+BEGIN;
+SAVEPOINT s;
+--error ER_SP_DOES_NOT_EXIST
+INSERT INTO t1 VALUES (5);
+COMMIT;
+DROP TRIGGER i4_t1;
+
+--echo ROLLBACK TO SAVEPOINT in a trigger in a SP call should be forbidden
+--delimiter |
+CREATE PROCEDURE p4() BEGIN
+       ROLLBACK TO SAVEPOINT s;
+END|
+--delimiter ;
+CREATE TRIGGER i5_t1 BEFORE INSERT ON t1 FOR EACH ROW CALL p4;
+BEGIN;
+SAVEPOINT s;
+--error ER_SP_DOES_NOT_EXIST
+INSERT INTO t1 VALUES (6);
+COMMIT;
+DROP TRIGGER i5_t1;
+
+--echo SAVEPOINT in a SP next to a trigger should work
+CREATE TRIGGER i6_t1 BEFORE INSERT ON t1 FOR EACH ROW SET NEW.a = NEW.a + 1;
+--delimiter |
+CREATE PROCEDURE p5() BEGIN
+       SAVEPOINT s;
+       INSERT INTO t1 VALUES (10);
+       ROLLBACK TO SAVEPOINT s;
+END|
+--delimiter ;
+BEGIN;
+CALL p5();
+COMMIT;
+DROP TRIGGER i6_t1;
+
+--connection node_2
+delimiter |;
+create trigger t1 before insert on t1 for each row
+begin
+    insert into t2 values (NULL);
+end|
+delimiter ;|
+
+--connection node_1 
+INSERT INTO t1 VALUES (201), (202), (203);
+
+--connection node_1 
+SELECT * FROM t1;
+SELECT COUNT(*) FROM t2;
+
+--connection node_2
+SELECT * FROM t1;
+SELECT COUNT(*) FROM t2;
+
+--connection node_1
+DEALLOCATE PREPARE call_p1;
+
+--connection node_2
+DROP TABLE t1, t2;
+DROP PROCEDURE p1;
+DROP PROCEDURE p2;
+DROP PROCEDURE p3;
+DROP PROCEDURE p4;
+DROP PROCEDURE p5;
+DROP FUNCTION f1;
diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/t/galera#414.cnf b/mysql-wsrep-5.6/mysql-test/suite/galera/t/galera#414.cnf
new file mode 100644 (file)
index 0000000..fbd1c58
--- /dev/null
@@ -0,0 +1,8 @@
+!include ../galera_2nodes.cnf
+
+[mysqld.1]
+wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcs.max_packet_size=2'
+
+[mysqld.2]
+wsrep_provider_options='base_port=@mysqld.2.#galera_port;gcs.max_packet_size=2'
+
diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/t/galera#414.test b/mysql-wsrep-5.6/mysql-test/suite/galera/t/galera#414.test
new file mode 100644 (file)
index 0000000..f1ca69c
--- /dev/null
@@ -0,0 +1,36 @@
+#
+# codership/galera#414 Shutdown crashes node if the node started with `gcs.max_packet_size=2`
+#
+
+--source include/big_test.inc
+--source include/galera_cluster.inc
+
+# We perform the shutdown/restart sequence in here. If there was a crash during shutdown, MTR will detect it
+
+--connection node_2
+--source include/shutdown_mysqld.inc
+
+--connection node_1
+SET SESSION wsrep_sync_wait = 0;
+SET SESSION wsrep_on = OFF;
+--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
+--source include/start_mysqld.inc
+
+--connection node_1
+SET SESSION wsrep_on = ON;
+--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
+
+--connection node_1
+CALL mtr.add_suppression("Failed to set packet size");
+
+--connection node_2
+--let $wait_condition = SELECT VARIABLE_VALUE = 'ON' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_ready';
+--source include/wait_condition.inc
+CALL mtr.add_suppression("Failed to set packet size");
+
index 357319ad1067d2754e8695e8341189d144aa4c13..6dea0fcfa9e25a6957303e6ba636c9dd7571848e 100644 (file)
@@ -18,14 +18,12 @@ SELECT COUNT(*) = 2 FROM mysql.user WHERE user IN ('user1', 'user2');
 # ALTER USER
 #
 
-# LP bug 1376269
-#
-#--connection node_1
-#ALTER USER user1 PASSWORD EXPIRE;
-#SELECT password_expired = 'Y' FROM mysql.user WHERE user = 'user1';
-#
-#--connection node_2
-#SELECT password_expired = 'Y' FROM mysql.user WHERE user = 'user1';
+--connection node_1
+ALTER USER user1 PASSWORD EXPIRE;
+SELECT password_expired = 'Y' FROM mysql.user WHERE user = 'user1';
+
+--connection node_2
+SELECT password_expired = 'Y' FROM mysql.user WHERE user = 'user1';
 
 #
 # RENAME USER
diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_admin.test b/mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_admin.test
new file mode 100644 (file)
index 0000000..d62c454
--- /dev/null
@@ -0,0 +1,86 @@
+#
+# Test that various admin commands from sql_admin.cc
+# Currently, REPAIR, OPTIMIZE and ANALYZE are tested.
+# Jira: PXC-390
+#
+
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+--disable_warnings
+DROP TABLE IF EXISTS t1, t2;
+DROP TABLE IF EXISTS x1, x2;
+--enable_warnings
+
+--connection node_1
+CREATE TABLE t1 (f1 INTEGER);
+CREATE TABLE t2 (f1 INT PRIMARY KEY AUTO_INCREMENT, f2 INTEGER);
+SET GLOBAL wsrep_replicate_myisam = TRUE;
+CREATE TABLE x1 (f1 INTEGER) ENGINE=MyISAM;
+CREATE TABLE x2 (f1 INT PRIMARY KEY AUTO_INCREMENT, f2 INTEGER) ENGINE=MyISAM;
+INSERT INTO t1 VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
+INSERT INTO x1 VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
+INSERT INTO t2 (f2) SELECT 1 FROM t1 AS a1, t1 AS a2, t1 AS a3, t1 AS a4;
+INSERT INTO x2 (f2) VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
+
+# Wait until all the data from t2 has been replicated
+--connection node_2
+--let $wait_condition = SELECT COUNT(*) = 10 FROM x1;
+--source include/wait_condition.inc
+--let $wait_condition = SELECT COUNT(*) = 10 FROM x2;
+--source include/wait_condition.inc
+--let $wait_condition = SELECT COUNT(*) = 10 FROM t1;
+--source include/wait_condition.inc
+--let $wait_condition = SELECT COUNT(*) = 10000 FROM t2;
+--source include/wait_condition.inc
+
+
+--echo # ANALYZE test
+--connection node_2
+--let $wsrep_last_committed_before = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'`
+
+--connection node_1
+ANALYZE TABLE t1, t2;
+
+--connection node_2
+--let $wait_condition = SELECT VARIABLE_VALUE = $wsrep_last_committed_before + 1 FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'
+--source include/wait_condition.inc
+
+
+
+--echo # OPTIMIZE test
+--connection node_2
+--let $wsrep_last_committed_before = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'`
+
+--connection node_1
+OPTIMIZE TABLE t1, t2;
+
+--connection node_2
+--let $wait_condition = SELECT VARIABLE_VALUE = $wsrep_last_committed_before + 1 FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'
+--source include/wait_condition.inc
+
+
+
+--echo # REPAIR test
+--connection node_2
+--let $wsrep_last_committed_before = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'`
+
+--connection node_1
+REPAIR TABLE x1, x2;
+
+--connection node_2
+--let $wait_condition = SELECT VARIABLE_VALUE = $wsrep_last_committed_before + 1 FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'
+--source include/wait_condition.inc
+
+
+
+--connection node_2
+SELECT COUNT(*) = 10 FROM t1;
+SELECT COUNT(*) = 10 FROM x1;
+SELECT COUNT(*) = 10000 FROM t2;
+SELECT COUNT(*) = 10 FROM x2;
+
+--connection node_1
+DROP TABLE t1, t2;
+DROP TABLE x1, x2;
+SET GLOBAL wsrep_replicate_myisam = FALSE;
diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_as_slave_gtid_replicate_do_db.cnf b/mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_as_slave_gtid_replicate_do_db.cnf
new file mode 100644 (file)
index 0000000..56102fb
--- /dev/null
@@ -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-wsrep-5.6/mysql-test/suite/galera/t/galera_as_slave_gtid_replicate_do_db.test b/mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_as_slave_gtid_replicate_do_db.test
new file mode 100644 (file)
index 0000000..5f3fbd5
--- /dev/null
@@ -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 <effective_uuid>
+--replace_regex /xid=[0-9]+/xid=###/ /table_id: [0-9]+/table_id: ###/
+SHOW BINLOG EVENTS IN 'mysqld-bin.000001' FROM 120;
+
+--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 <effective_uuid>
+--replace_regex /xid=[0-9]+/xid=###/ /table_id: [0-9]+/table_id: ###/
+SHOW BINLOG EVENTS IN 'mysqld-bin.000001' FROM 120;
+
+#
+# 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-wsrep-5.6/mysql-test/suite/galera/t/galera_as_slave_gtid_replicate_do_db_cc.cnf b/mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_as_slave_gtid_replicate_do_db_cc.cnf
new file mode 100644 (file)
index 0000000..2669da8
--- /dev/null
@@ -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-wsrep-5.6/mysql-test/suite/galera/t/galera_as_slave_gtid_replicate_do_db_cc.test b/mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_as_slave_gtid_replicate_do_db_cc.test
new file mode 100644 (file)
index 0000000..0324c8d
--- /dev/null
@@ -0,0 +1,168 @@
+#
+# 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
+#
+
+--sleep 2
+--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 <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 <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");
index 7d684cef67d562c7d9793ab3cda13646d48afcc8..b4bf5f0217137b0b65cf17d601aca46abd1579ed 100644 (file)
@@ -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'
index 251450f70992e3a54a89a6b891127a2f21fae0cd..30ce9bc4ceb45e6087fdcc55984021bc202315da 100644 (file)
@@ -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
index 69825ea4919dd17dc3906211661a4b593c782c09..f3476fba490e4d74a9c5b2ef5124b847f0a17102 100644 (file)
@@ -5,20 +5,25 @@
 # Test a local transaction being aborted by a slave one
 #
 
-CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(6)) ENGINE=InnoDB;
+--connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2
 
 --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,'node_2');
 
 --connection node_1
-INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (1,'node_1');
+
+--connection node_2a
+--let $wait_condition = SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'node_1'
+--source include/wait_condition.inc
 
 --connection node_2
 --error ER_LOCK_DEADLOCK
-INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (2, 'node_2');
 
 --let $wsrep_local_bf_aborts_after = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_bf_aborts'`
 
index e98a76850fabe0534b0adfdf6ee59c2c06d8b4c6..86de404d7b120791fcbb8143ddce138dbd30be93 100644 (file)
@@ -27,6 +27,7 @@ UNLOCK TABLES;
 
 COMMIT;
 SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait = 7;
 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-wsrep-5.6/mysql-test/suite/galera/t/galera_desync_overlapped.test b/mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_desync_overlapped.test
new file mode 100644 (file)
index 0000000..8b78e8c
--- /dev/null
@@ -0,0 +1,59 @@
+#
+# Test for overlapped transactions under manual desync.
+#
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+--source include/have_debug_sync.inc
+
+--let $galera_connection_name = node_1a
+--let $galera_server_number = 1
+--source include/galera_connect.inc
+
+--connection node_1
+
+CREATE TABLE ten (f1 INTEGER);
+INSERT INTO ten VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+
+CREATE TABLE t1 (f1 INTEGER, PRIMARY KEY (f1)) Engine=InnoDB;
+CREATE TABLE t2 (f1 INTEGER, PRIMARY KEY (f1)) Engine=InnoDB;
+
+SET GLOBAL wsrep_desync = 1;
+show status like 'wsrep_desync_count';
+SET DEBUG_SYNC='before_execute_sql_command SIGNAL alter1 WAIT_FOR alter2';
+send INSERT INTO t1 (f1) SELECT 0000 + (100 * a1.f1) + (10 * a2.f1) + a3.f1 FROM ten AS a1, ten AS a2, ten AS a3;
+
+--connection node_1a
+
+SET GLOBAL wsrep_desync = 1;
+show status like 'wsrep_desync_count';
+SET DEBUG_SYNC='now WAIT_FOR alter1';
+SET DEBUG_SYNC='before_execute_sql_command SIGNAL alter2';
+send INSERT INTO t2 (f1) SELECT 0000 + (100 * a1.f1) + (10 * a2.f1) + a3.f1 FROM ten AS a1, ten AS a2, ten AS a3;
+
+--connection node_1
+reap;
+
+--connection node_1a
+reap;
+
+--connection node_1
+
+SET DEBUG_SYNC='RESET';
+
+SET GLOBAL wsrep_desync = 0;
+show status like 'wsrep_desync_count';
+SET GLOBAL wsrep_desync = 0;
+show status like 'wsrep_desync_count';
+
+--disable_query_log
+call mtr.add_suppression("Trying to make wsrep_desync = OFF on the node that is already synchronized.");
+--enable_query_log
+show status like 'wsrep_desync_count';
+SET GLOBAL wsrep_desync = 0;
+
+SELECT COUNT(*) FROM t1;
+SELECT COUNT(*) FROM t2;
+
+DROP TABLE t1;
+DROP TABLE t2;
+DROP TABLE ten;
index 698bbefe41fce144dff65acd93b88b786eb2e442..5a1fb6748d95584b4a9aedb0a24a1493dad83373 100644 (file)
@@ -1 +1 @@
---query_cache_type=1 --query_cache_size=1000000 --innodb_track_changed_pages=1 --userstat=1 --thread_statistics=1
+--query_cache_type=1 --query_cache_size=1000000
diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_gcache_recover.cnf b/mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_gcache_recover.cnf
new file mode 100644 (file)
index 0000000..c7b59b6
--- /dev/null
@@ -0,0 +1,7 @@
+!include ../galera_2nodes.cnf
+
+[mysqld.1]
+wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcache.recover=yes;pc.ignore_sb=true'
+
+[mysqld.2]
+wsrep_provider_options='base_port=@mysqld.2.#galera_port;gcache.recover=yes;pc.ignore_sb=true'
diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_gcache_recover.test b/mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_gcache_recover.test
new file mode 100644 (file)
index 0000000..e1bfe51
--- /dev/null
@@ -0,0 +1,77 @@
+#
+# Kill entire cluster while gcache.recover=yes. Expect that node #2 will rejoin using IST
+#
+
+--source include/galera_cluster.inc
+--source include/big_test.inc
+
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1);
+SET SESSION wsrep_sync_wait = 0;
+
+--connection node_2
+--let $wait_condition = SELECT COUNT(*) > 0 FROM t1;
+--source include/wait_condition.inc
+
+SET SESSION wsrep_sync_wait = 0;
+--source include/kill_galera.inc
+
+--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
+
+INSERT INTO t1 VALUES (2);
+
+--source include/kill_galera.inc
+
+--sleep 1
+
+--connection node_1
+--let $galera_wsrep_recover_server_id=1
+--source suite/galera/include/galera_wsrep_recover.inc
+
+--let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+--source include/start_mysqld.inc
+
+INSERT INTO t1 VALUES (3);
+
+--connection node_2
+--let $galera_wsrep_recover_server_id=2
+--source suite/galera/include/galera_wsrep_recover.inc
+
+--let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.2.expect
+--source include/start_mysqld.inc
+
+--connection node_1
+--source include/wait_until_connected_again.inc
+--source include/galera_wait_ready.inc
+--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
+
+--let $diff_servers = 1 2
+--source include/diff_servers.inc
+
+--connection node_1
+# Warning happens when the cluster is started for the first time
+CALL mtr.add_suppression("Skipped GCache ring buffer recovery");
+
+# Confirm that IST took place
+--let $assert_text = async IST sender starting to serve
+--let $assert_select = async IST sender starting to serve
+--let $assert_count = 1
+--let $assert_file = $MYSQLTEST_VARDIR/log/mysqld.1.err
+--let $assert_only_after = starting as process
+--source include/assert_grep.inc
+
+--connection node_2
+CALL mtr.add_suppression("Skipped GCache ring buffer recovery");
+
+# Confirm that gcache recovery took place
+
+--let $assert_text = Recovering GCache ring buffer: found gapless sequence
+--let $assert_select = Recovering GCache ring buffer: found gapless sequence
+--let $assert_count = 1
+--let $assert_file = $MYSQLTEST_VARDIR/log/mysqld.2.err
+--let $assert_only_after = starting as process
+--source include/assert_grep.inc
+
+DROP TABLE t1;
diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_gcache_recover_full_gcache.cnf b/mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_gcache_recover_full_gcache.cnf
new file mode 100644 (file)
index 0000000..da74ea9
--- /dev/null
@@ -0,0 +1,9 @@
+!include ../galera_2nodes.cnf
+
+[mysqld.1]
+max_allowed_packet=10M
+innodb_log_file_size=110M
+wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcache.recover=yes;pc.ignore_sb=true;gcache.size=10M'
+
+[mysqld.2]
+wsrep_provider_options='base_port=@mysqld.2.#galera_port;gcache.recover=yes;pc.ignore_sb=true;gcache.size=10M'
diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_gcache_recover_full_gcache.test b/mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_gcache_recover_full_gcache.test
new file mode 100644 (file)
index 0000000..b7fd9cf
--- /dev/null
@@ -0,0 +1,59 @@
+#
+# Attempt gcache recovery on a full gcache. Node will not be able to join via IST due to gcache rollover
+#
+
+--source include/galera_cluster.inc
+--source include/big_test.inc
+
+SET SESSION wsrep_sync_wait = 0;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT, f2 LONGBLOB) ENGINE=InnoDB;
+
+--connection node_2
+SET SESSION wsrep_sync_wait = 0;
+--source include/kill_galera.inc
+
+--connection node_1
+INSERT INTO t1 (f2) VALUES (REPEAT('x', 1024 * 1024 * 10));
+INSERT INTO t1 (f2) VALUES (REPEAT('x', 1024 * 1024 * 10));
+INSERT INTO t1 (f2) VALUES (REPEAT('x', 1024 * 1024 * 10));
+INSERT INTO t1 (f2) VALUES (REPEAT('x', 1024 * 1024 * 10));
+INSERT INTO t1 (f2) VALUES (REPEAT('x', 1024 * 1024 * 10));
+--source include/kill_galera.inc
+
+--connection node_1
+--let $galera_wsrep_recover_server_id=1
+--source suite/galera/include/galera_wsrep_recover.inc
+
+--let $_expect_file_name = $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+--source include/start_mysqld.inc
+--connection node_2
+--let $galera_wsrep_recover_server_id=2
+--source suite/galera/include/galera_wsrep_recover.inc
+
+--let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.2.expect
+--source include/start_mysqld.inc
+
+--connection node_1
+--source include/wait_until_connected_again.inc
+--source include/galera_wait_ready.inc
+--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
+
+--let $diff_servers = 1 2
+--source include/diff_servers.inc
+
+--connection node_1
+DROP TABLE t1;
+
+# Warning always happens when the cluster is started for the first time
+CALL mtr.add_suppression("Skipped GCache ring buffer recovery");
+
+# Confirm that IST did not take place
+--let $assert_text = IST first seqno 2 not found from cache, falling back to SST
+--let $assert_select = IST first seqno 2 not found from cache, falling back to SST
+--let $assert_count = 1
+--let $assert_file = $MYSQLTEST_VARDIR/log/mysqld.1.err
+--let $assert_only_after = starting as process
+--source include/assert_grep.inc
+
+--connection node_2
+CALL mtr.add_suppression("Skipped GCache ring buffer recovery");
diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_gcache_recover_manytrx.cnf b/mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_gcache_recover_manytrx.cnf
new file mode 100644 (file)
index 0000000..c08551e
--- /dev/null
@@ -0,0 +1,9 @@
+!include ../galera_2nodes.cnf
+
+[mysqld.1]
+innodb_log_file_size=110M
+wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcache.recover=yes;pc.ignore_sb=true;'
+
+[mysqld.2]
+innodb_log_file_size=110M
+wsrep_provider_options='base_port=@mysqld.2.#galera_port;gcache.recover=yes;pc.ignore_sb=true;'
diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_gcache_recover_manytrx.test b/mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_gcache_recover_manytrx.test
new file mode 100644 (file)
index 0000000..3bfcdc9
--- /dev/null
@@ -0,0 +1,216 @@
+#
+# Kill entire cluster while various transactions are in progress
+# restore the cluster and expect that node #2 will rejoin using IST
+#
+
+--source include/galera_cluster.inc
+--source include/big_test.inc
+
+SET SESSION wsrep_sync_wait = 0;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT, f2 LONGBLOB) ENGINE=InnoDB;
+CREATE TABLE ten (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
+
+DELIMITER |;
+CREATE PROCEDURE insert_simple ()
+BEGIN
+        DECLARE CONTINUE HANDLER FOR SQLEXCEPTION BEGIN END;
+       SET SESSION wsrep_sync_wait = 0;
+        WHILE 1 DO
+                INSERT INTO t1 (f1, f2) VALUES (DEFAULT,'abcdef');
+        END WHILE;
+END|
+
+CREATE PROCEDURE insert_multi ()
+BEGIN
+        DECLARE CONTINUE HANDLER FOR SQLEXCEPTION BEGIN END;
+       SET SESSION wsrep_sync_wait = 0;
+        WHILE 1 DO
+                INSERT INTO t1 (f1) VALUES (DEFAULT),(DEFAULT),(DEFAULT),(DEFAULT),(DEFAULT),(DEFAULT),(DEFAULT),(DEFAULT),(DEFAULT),(DEFAULT);
+        END WHILE;
+END|
+
+CREATE PROCEDURE insert_transaction ()
+BEGIN
+        DECLARE CONTINUE HANDLER FOR SQLEXCEPTION BEGIN END;
+       SET SESSION wsrep_sync_wait = 0;
+       SET AUTOCOMMIT = OFF;
+        WHILE 1 DO
+               START TRANSACTION;
+               INSERT INTO t1 (f1) VALUES (DEFAULT);
+               INSERT INTO t1 (f1) VALUES (DEFAULT);
+               INSERT INTO t1 (f1) VALUES (DEFAULT);
+               INSERT INTO t1 (f1) VALUES (DEFAULT);
+               INSERT INTO t1 (f1) VALUES (DEFAULT);
+
+               INSERT INTO t1 (f1) VALUES (DEFAULT);
+               INSERT INTO t1 (f1) VALUES (DEFAULT);
+               INSERT INTO t1 (f1) VALUES (DEFAULT);
+               INSERT INTO t1 (f1) VALUES (DEFAULT);
+               INSERT INTO t1 (f1) VALUES (DEFAULT);
+               COMMIT;
+        END WHILE;
+END|
+
+DELIMITER ;|
+DELIMITER |;
+
+CREATE PROCEDURE update_simple ()
+BEGIN
+        DECLARE CONTINUE HANDLER FOR SQLEXCEPTION BEGIN END;
+       SET SESSION wsrep_sync_wait = 0;
+        WHILE 1 DO
+               UPDATE t1 SET f2 = CONCAT(f2,f2);
+        END WHILE;
+END|
+
+CREATE PROCEDURE insert_1k ()
+BEGIN
+        DECLARE CONTINUE HANDLER FOR SQLEXCEPTION BEGIN END;
+       SET SESSION wsrep_sync_wait = 0;
+        WHILE 1 DO
+               INSERT INTO t1 (f2) VALUES (REPEAT('x', 1024));
+        END WHILE;
+END|
+
+CREATE PROCEDURE insert_1m ()
+BEGIN
+        DECLARE CONTINUE HANDLER FOR SQLEXCEPTION BEGIN END;
+       SET SESSION wsrep_sync_wait = 0;
+        WHILE 1 DO
+               INSERT INTO t1 (f2) VALUES (REPEAT('x', 1024 * 1024));
+        END WHILE;
+END|
+
+CREATE PROCEDURE insert_10m ()
+BEGIN
+        DECLARE CONTINUE HANDLER FOR SQLEXCEPTION BEGIN END;
+       SET SESSION wsrep_sync_wait = 0;
+        WHILE 1 DO
+               INSERT INTO t1 (f2) VALUES (REPEAT('x', 1024 * 1024 * 10));
+        END WHILE;
+END|
+
+DELIMITER ;|
+
+--connect node_1_insert_simple, 127.0.0.1, root, , test, $NODE_MYPORT_1
+--connect node_1_insert_multi, 127.0.0.1, root, , test, $NODE_MYPORT_1
+--connect node_1_insert_transaction, 127.0.0.1, root, , test, $NODE_MYPORT_1
+--connect node_1_update_simple, 127.0.0.1, root, , test, $NODE_MYPORT_1
+--connect node_1_insert_1k, 127.0.0.1, root, , test, $NODE_MYPORT_1
+--connect node_1_insert_1m, 127.0.0.1, root, , test, $NODE_MYPORT_1
+--connect node_1_insert_10m, 127.0.0.1, root, , test, $NODE_MYPORT_1
+
+--connection node_1_insert_simple
+--send CALL insert_simple();
+
+--connection node_1_insert_multi
+--send CALL insert_multi();
+
+--connection node_1_insert_transaction
+--send CALL insert_transaction ();
+
+--connection node_1_update_simple
+--send CALL update_simple ();
+
+--connection node_1_insert_1k
+--send CALL insert_1k ();
+
+--connection node_1_insert_1m
+--send CALL insert_1m ();
+
+--connection node_1_insert_10m
+--send CALL insert_10m ();
+
+--connection node_2
+SET SESSION wsrep_sync_wait = 0;
+--source include/kill_galera.inc
+
+--sleep 10
+--connection node_1
+--source include/kill_galera.inc
+
+--connection node_1_insert_simple
+--error 2013
+--reap
+
+--connection node_1_insert_multi
+--error 2013
+--reap
+
+--connection node_1_insert_transaction
+--error 2013
+--reap
+
+--connection node_1_update_simple
+--error 2013
+--reap
+
+--connection node_1_insert_1k
+--error 2013
+--reap
+
+--connection node_1_insert_1m
+--error 2013
+--reap
+
+--connection node_1_insert_10m
+--error 2013
+--reap
+
+--connection node_1
+--let $galera_wsrep_recover_server_id=1
+--source suite/galera/include/galera_wsrep_recover.inc
+
+--let $_expect_file_name = $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+--source include/start_mysqld.inc
+--connection node_2
+--let $galera_wsrep_recover_server_id=2
+--source suite/galera/include/galera_wsrep_recover.inc
+
+--let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.2.expect
+--source include/start_mysqld.inc
+
+--connection node_1
+--source include/wait_until_connected_again.inc
+--source include/galera_wait_ready.inc
+--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
+
+--let $diff_servers = 1 2
+--source include/diff_servers.inc
+
+--connection node_1
+DROP TABLE t1;
+DROP TABLE ten;
+DROP PROCEDURE insert_simple;
+DROP PROCEDURE insert_multi;
+DROP PROCEDURE insert_transaction;
+DROP PROCEDURE update_simple;
+DROP PROCEDURE insert_1k;
+DROP PROCEDURE insert_1m;
+
+--connection node_1
+CALL mtr.add_suppression("conflict state 7 after post commit");
+
+# Warning happens when the cluster is started for the first time
+CALL mtr.add_suppression("Skipped GCache ring buffer recovery");
+
+# Confirm that IST took place
+--let $assert_text = async IST sender starting to serve
+--let $assert_select = async IST sender starting to serve
+--let $assert_count = 1
+--let $assert_file = $MYSQLTEST_VARDIR/log/mysqld.1.err
+--let $assert_only_after = starting as process
+--source include/assert_grep.inc
+
+--connection node_2
+CALL mtr.add_suppression("Skipped GCache ring buffer recovery");
+
+# Confirm that gcache recovery took place
+
+--let $assert_text = Recovering GCache ring buffer: found gapless sequence
+--let $assert_select = Recovering GCache ring buffer: found gapless sequence
+--let $assert_count = 1
+--let $assert_file = $MYSQLTEST_VARDIR/log/mysqld.2.err
+--let $assert_only_after = starting as process
+--source include/assert_grep.inc
index 3c2bce5b9c9ed0d04012e419fbbfc609fed6e723..90f3f30cc7678962d1359cbfb2bafbd6b2bf0adc 100644 (file)
@@ -28,8 +28,13 @@ ALTER TABLE t1 ADD COLUMN f2 INTEGER;
 --source include/galera_connect.inc
 --connection node_2a
 
+--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 = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
+--source include/wait_condition.inc
+
 SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME='t1';
-SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
 
 --connection node_1
 --disable_query_log
index 886cb7c1a009076bf309917e4bb16a4f37cbf0a8..72c7e08bcc3b2389d876e94c30829f683e89d847 100644 (file)
@@ -3,16 +3,16 @@
 --source include/have_innodb.inc
 
 #
-# This test forces 1K tables with a PK to participate in a single transaction
+# This test forces 100 tables with a PK to participate in a single transaction
 #
 
 #
-# First, create 1K tables and make sure the DDLs are all propagated
+# First, create 100 tables and make sure the DDLs are all propagated
 #
 
 --connection node_1
 
---let $count = 1000
+--let $count = 100
 while ($count)
 {
   --disable_query_log
@@ -23,7 +23,7 @@ while ($count)
 }
 
 --connection node_2
-SELECT COUNT(*) = 1000 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = 'test' AND TABLE_NAME LIKE 't%';
+SELECT COUNT(*) = 100 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = 'test' AND TABLE_NAME LIKE 't%';
 
 #
 # Second, create a transaction that uses all those tables
@@ -33,7 +33,7 @@ SELECT COUNT(*) = 1000 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = 'test
 SET AUTOCOMMIT=OFF;
 START TRANSACTION;
 
---let $count = 1000
+--let $count = 100
 while ($count)
 {
   --disable_query_log
@@ -52,7 +52,7 @@ COMMIT;
 --connection node_2
 CREATE TABLE sum_table (f1 INTEGER);
 
---let $count = 1000
+--let $count = 100
 while ($count)
 {
   --disable_query_log
@@ -62,7 +62,7 @@ while ($count)
   --dec $count
 }
 
-SELECT SUM(f1) = 1000 FROM sum_table;
+SELECT SUM(f1) = 100 FROM sum_table;
 
 #
 # Fourth, create a deadlock
@@ -72,7 +72,7 @@ SELECT SUM(f1) = 1000 FROM sum_table;
 SET AUTOCOMMIT=OFF;
 START TRANSACTION;
 
---let $count = 1000
+--let $count = 100
 while ($count)
 {
   --disable_query_log
@@ -85,7 +85,7 @@ while ($count)
 --connection node_2
 SET AUTOCOMMIT=OFF;
 START TRANSACTION;
-UPDATE t1000 SET f1 = 3;
+UPDATE t100 SET f1 = 3;
 
 --connection node_1
 COMMIT;
@@ -94,5 +94,8 @@ COMMIT;
 --error ER_LOCK_DEADLOCK
 COMMIT;
 
+--let $diff_servers = 1 2
+--source include/diff_servers.inc
+
 DROP SCHEMA test;
 CREATE SCHEMA test;
index b1dc14deb5bb945a1cb4ab4ebc437da631e97593..e078a342c167a545ebf21410cf2d30707b382d47 100644 (file)
@@ -13,6 +13,7 @@ CREATE TABLE t2 (id INT) ENGINE=InnoDB;
 
 --connection node_2
 SET GLOBAL wsrep_slave_threads = 2;
+LOCK TABLE t1 WRITE;
 
 --connection node_1
 INSERT INTO t1 VALUES (1);
@@ -34,10 +35,20 @@ INSERT INTO t1 VALUES (1);
 INSERT INTO t2 VALUES (1);
 
 --connection node_2
+SET SESSION wsrep_sync_wait = 0;
+
+--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE 'Waiting for table metadata lock%';
+--source include/wait_condition.inc
+
+--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE 'applied write set%';
+--source include/wait_condition.inc
+
+UNLOCK TABLES;
+
+SET SESSION wsrep_sync_wait = 7;
 
 SELECT COUNT(*) = 10 FROM t1;
 SELECT COUNT(*) = 10 FROM t2;
-SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE 'committed%';
 
 --eval SET GLOBAL wsrep_slave_threads = $wsrep_slave_threads_orig;
 
index 255e292f409808558d97b1227f4f40fd7d6ee1a3..60b866ae0189356c5c6ebd51f5ae9bc3597510af 100644 (file)
@@ -23,5 +23,7 @@ SELECT COUNT(*) = 0 FROM t1;
 
 DROP TABLE t1;
 
-CALL mtr.add_suppression("WSREP: Maximum writeset size exceeded by");
-CALL mtr.add_suppression("WSREP: transaction size exceeded");
+CALL mtr.add_suppression("Maximum writeset size exceeded by");
+CALL mtr.add_suppression("transaction size limit");
+CALL mtr.add_suppression("transaction size exceeded");
+CALL mtr.add_suppression("rbr write fail");
index 3772c23da4932cdbfc955d687832a5e88fd23cd3..08b30884abb3f1673b4c2c9b00b2eadfd43a4779 100644 (file)
@@ -12,6 +12,10 @@ INSERT INTO t1 VALUES (1);
 --connection node_2
 --source include/restart_mysqld.inc
 
+--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
+
 --let $galera_connection_name = node_2a
 --let $galera_server_number = 2
 --source include/galera_connect.inc
diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_restart_on_unknown_option.test b/mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_restart_on_unknown_option.test
new file mode 100644 (file)
index 0000000..2f27678
--- /dev/null
@@ -0,0 +1,150 @@
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+# Suppress expected warnings:
+
+CALL mtr.add_suppression("Aborting");
+CALL mtr.add_suppression("unknown option '--galera-unknown-option'");
+
+#
+# We should count the number of "Assertion failed" warnings
+# in the log file before and after testing. To do this we need
+# to save original log file before testing:
+#
+--let TEST_LOG=$MYSQLTEST_VARDIR/log/mysqld.2.err
+--perl
+   use strict;
+   my $test_log=$ENV{'TEST_LOG'} or die "TEST_LOG not set";
+   my $test_log_copy=$test_log . '.copy';
+   if (-e $test_log_copy) {
+      unlink $test_log_copy;
+   }
+EOF
+--copy_file $TEST_LOG $TEST_LOG.copy
+
+--connection node_2
+
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(1));
+INSERT INTO t1 VALUES (1, 'a'), (2, 'a'), (3, 'a');
+
+SELECT * FROM t1;
+
+# Initiate normal shutdown on the node 2 and
+# waiting until shutdown has been completed:
+
+--echo Shutting down server ...
+--source include/shutdown_mysqld.inc
+
+--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
+
+# Some updates on node 1:
+
+UPDATE t1 SET f2 = 'b' WHERE f1 > 1;
+UPDATE t1 SET f2 = 'c' WHERE f1 > 2;
+
+SELECT * FROM t1;
+
+# Remove the "grastate.dat" file (to initiate new SST)
+# and restart node 2 with unknown option:
+
+--connection node_2
+
+--remove_file $MYSQLTEST_VARDIR/mysqld.2/data/grastate.dat
+
+--let $start_mysqld_params=--galera-unknown-option
+
+--echo Starting server ...
+--exec echo "try:$start_mysqld_params" > $_expect_file_name
+
+# Sleep to ensure that server exited...
+
+--sleep 30
+
+# Restart node 2 without unknown option:
+
+--let $start_mysqld_params=
+
+--echo Starting server ...
+--source include/start_mysqld.inc
+
+--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
+--source include/wait_condition.inc
+
+# Sanity check (node 2 is running now and can perform SQL operators):
+
+SELECT * FROM t1;
+
+# Initiate normal shutdown on the node 2 and
+# waiting until shutdown has been completed:
+
+--echo Shutting down server ...
+--source include/shutdown_mysqld.inc
+
+--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
+
+# Some updates on node 1 - to initiate IST next time:
+
+UPDATE t1 SET f2 = 'd' WHERE f1 > 1;
+UPDATE t1 SET f2 = 'd' WHERE f1 > 2;
+
+SELECT * FROM t1;
+
+# Restart node 2 with unknown option:
+
+--connection node_2
+
+--let $start_mysqld_params=--galera-unknown-option
+
+--echo Starting server ...
+--exec echo "try:$start_mysqld_params" > $_expect_file_name
+
+# Sleep to ensure that server exited...
+
+--sleep 30
+
+# Restart node 2 without unknown option:
+
+--let $start_mysqld_params=
+
+--echo Starting server ...
+--source include/start_mysqld.inc
+
+--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
+--source include/wait_condition.inc
+
+# Sanity check (node 2 is running now and can perform SQL operators):
+
+SELECT * FROM t1;
+
+--connection node_1
+
+DROP TABLE t1;
+
+#
+# We should count the number of "Assertion failed" warnings
+# in the log file during test phase - to print the error message
+# if quantity of such warnings in log file increased at the end
+# of the test:
+#
+--perl
+   use strict;
+   my $test_log=$ENV{'TEST_LOG'} or die "TEST_LOG not set";
+   my $test_log_copy=$test_log . '.copy';
+   open(FILE, $test_log_copy) or die("Unable to open $test_log_copy: $!\n");
+   my $initial=grep(/Assertion * failed/gi,<FILE>);
+   close(FILE);
+   open(FILE, $test_log) or die("Unable to open $test_log: $!\n");
+   my $count_warnings=grep(/Assertion * failed/gi,<FILE>);
+   close(FILE);
+   if ($count_warnings != $initial) {
+      my $diff=$count_warnings-$initial;
+      print "Assertion failed $diff times.\n";
+   }
+EOF
+--remove_file $TEST_LOG.copy
index 27e75829e82a2556607a516f2f40bcec3f547d23..fe76e7d2cc8026b7b2d88c98f46312e8aa6e822d 100644 (file)
@@ -20,11 +20,8 @@ CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
 
 # Reset the master and restart the slave so that post-test checks can run
 
-SET GLOBAL wsrep_cluster_address = '';
---disable_query_log
---eval SET GLOBAL wsrep_cluster_address = '$wsrep_cluster_address_orig';
---enable_query_log
 
+--connection node_2
 --source include/start_mysqld.inc
 --sleep 5
 --source include/wait_until_connected_again.inc
index 07aac0fbe92d081a7cbb7697e2f065b07975f2fd..a424942da30ab5fb26f06cefce8370cae3f7ed40 100644 (file)
@@ -18,7 +18,8 @@ SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_N
 --source include/start_mysqld.inc
 --source include/wait_until_connected_again.inc
 
-SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment';
+--let $wait_condition = SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment';
+--source include/wait_condition.inc
 SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
 
 # 3. Restart node #2 with the new socket.ssl_ca , socket.ssl_cert and socket.ssl_key 
@@ -29,7 +30,8 @@ SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_N
 --source include/start_mysqld.inc
 --source include/wait_until_connected_again.inc
 
-SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment';
+--let $wait_condition = SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment';
+--source include/wait_condition.inc
 SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
 
 # 4. Restart node #1 with the new socket.ssl_ca , socket.ssl_cert and socket.ssl_key 
@@ -40,7 +42,8 @@ SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_N
 --source include/start_mysqld.inc
 --source include/wait_until_connected_again.inc
 
-SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment';
+--let $wait_condition = SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment';
+--source include/wait_condition.inc
 SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
 
 # Upgrade complete. Both nodes now use the new key and certificate
diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_toi_ddl_fk_update.test b/mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_toi_ddl_fk_update.test
new file mode 100644 (file)
index 0000000..f42fae4
--- /dev/null
@@ -0,0 +1,49 @@
+--source include/big_test.inc
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+#
+# This test creates a new FK constraint while an UPDATE is running
+#
+
+CREATE TABLE ten (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
+
+CREATE TABLE parent (
+    id INT PRIMARY KEY,
+    KEY (id)
+) ENGINE=InnoDB;
+
+CREATE TABLE child (
+    id INT PRIMARY KEY AUTO_INCREMENT,
+    parent_id INT
+) ENGINE=InnoDB;
+
+INSERT INTO parent VALUES (1);
+
+INSERT INTO child (parent_id) SELECT 1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4;
+
+--connection node_1
+--sleep 1
+--send ALTER TABLE child ADD FOREIGN KEY (parent_id) REFERENCES parent(id) ON UPDATE CASCADE;
+
+--connection node_2
+--sleep 1
+--send UPDATE parent SET id = 2 WHERE id = 1;
+
+--connection node_1
+--reap
+
+--connection node_2
+--reap
+
+--connection node_2
+SELECT COUNT(*) = 10000 FROM child WHERE parent_id = 2;
+
+--connection node_1
+SELECT COUNT(*) = 10000 FROM child WHERE parent_id = 2;
+
+DROP TABLE child;
+DROP TABLE parent;
+
+DROP TABLE ten;
diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_toi_drop_database.test b/mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_toi_drop_database.test
new file mode 100644 (file)
index 0000000..0a37a40
--- /dev/null
@@ -0,0 +1,56 @@
+#
+# Test the operation of DDLs that affect multiple database objects
+#
+
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+--let $galera_connection_name = node_1a
+--let $galera_server_number = 1
+--source include/galera_connect.inc
+
+--connection node_1
+CREATE DATABASE database1;
+USE database1;
+
+CREATE TABLE ten (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
+
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+CREATE TABLE t2 (f1 INTEGER) ENGINE=InnoDB;
+
+# Make sure autocommit retrying does not kick in as this will mask the error we expect to get
+SET SESSION wsrep_retry_autocommit = 0;
+# Attemp to insert 1M rows
+--send INSERT INTO t1 (f1) SELECT 1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5;
+
+--connection node_1a
+USE database1;
+SET SESSION wsrep_retry_autocommit = 0;
+--send INSERT INTO t2 (f1) SELECT 1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5;
+
+--connection node_2
+--sleep 1
+--send DROP DATABASE database1;
+
+--connection node_1
+--sleep 1
+--error ER_LOCK_DEADLOCK
+--reap
+
+--connection node_1a
+--error ER_LOCK_DEADLOCK
+--reap
+
+--connection node_2
+--reap
+
+--connection node_1
+SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME = 'database1';
+--error ER_BAD_DB_ERROR
+USE database1;
+
+--connection node_2
+SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME = 'database1';
+--error ER_BAD_DB_ERROR
+USE database1;
diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_toi_truncate.test b/mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_toi_truncate.test
new file mode 100644 (file)
index 0000000..59ef5c2
--- /dev/null
@@ -0,0 +1,43 @@
+#
+# Test the operation of TRUNCATE with concurrent DML.
+# The DML should be BF-aborted if the DDL arrives from another node
+#
+
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+#
+# INSERT and TRUNCATE on different nodes
+#
+
+--connection node_1
+CREATE TABLE ten (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
+
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+
+# Insert 100K rows
+--connection node_2
+# Prevent autocommit retring from masking the deadlock error we expect to get
+SET SESSION wsrep_retry_autocommit = 0;
+--send INSERT INTO t1 (f1) SELECT 1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5, ten AS a6;
+
+--connection node_1
+--sleep 1
+--send TRUNCATE TABLE t1;
+
+--connection node_1
+--reap
+
+--connection node_2
+--error ER_LOCK_DEADLOCK
+--reap
+
+--connection node_2
+SELECT COUNT(*) = 0 FROM t1;
+
+--connection node_1
+SELECT COUNT(*) = 0 FROM t1;
+
+DROP TABLE t1;
+DROP TABLE ten;
index cc031e0008ff0d3953a722dfe4c9f455fd1035bd..b24ec5bbeb4dee3dacd64fee35739f56fef43181 100644 (file)
@@ -9,8 +9,8 @@
 # Set to invalid value
 # 
 
---connection node_1
---let $wsrep_cluster_address_node1 = `SELECT @@wsrep_cluster_address`
+--connection node_2
+--let $wsrep_cluster_address_node2 = `SELECT @@wsrep_cluster_address`
 SET GLOBAL wsrep_cluster_address = 'foo://';
 
 # With wsrep_sync_wait, this returns an error
@@ -32,9 +32,9 @@ SHOW STATUS LIKE 'wsrep_cluster_status';
 SHOW STATUS LIKE 'wsrep_local_state';
 SHOW STATUS LIKE 'wsrep_local_state_comment';
 
---connection node_2
+--connection node_1
 --sleep 1
-# Node #2 thinks that it is now part of a single-node primary cluster 
+# Node #1 thinks that it is now part of a single-node primary cluster 
 SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
 SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
 
@@ -42,57 +42,18 @@ SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VA
 # Reset everything as it was
 #
 
---connection node_1
+--connection node_2
 --disable_query_log
---eval SET GLOBAL wsrep_cluster_address = '$wsrep_cluster_address_node1';
+--eval SET GLOBAL wsrep_cluster_address = '$wsrep_cluster_address_node2';
 --enable_query_log
 
---connection node_2
-SET GLOBAL wsrep_cluster_address = @@wsrep_cluster_address;
-
 --source include/wait_until_connected_again.inc
 
 --connection node_1
 SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
 SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
 
-#
-# Set to invalid host
-#
-
---connection node_1
-SET GLOBAL wsrep_cluster_address = 'gcomm://192.0.2.1';
-
---error 0
-SELECT COUNT(*) > 0 FROM INFORMATION_SCHEMA.GLOBAL_STATUS;
-
-# Must return 'OFF'
-SHOW STATUS LIKE 'wsrep_ready';
-
-# Must return 'Non-primary'
-SHOW STATUS LIKE 'wsrep_cluster_status';
-
-# Must return 0 = 'Initialized'
-SHOW STATUS LIKE 'wsrep_local_state';
-SHOW STATUS LIKE 'wsrep_local_state_comment';
-
-#
-# Reset everything as it was
-#
-
---connection node_1
---disable_query_log
---eval SET GLOBAL wsrep_cluster_address = '$wsrep_cluster_address_node1';
---enable_query_log
-
 --connection node_2
-SET GLOBAL wsrep_cluster_address = @@wsrep_cluster_address;
---sleep 1
-
---connection node_1
-SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
-SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
-
 CALL mtr.add_suppression("Backend not supported: foo");
 CALL mtr.add_suppression("Failed to initialize backend using 'foo");
 CALL mtr.add_suppression("Failed to open channel 'my_wsrep_cluster' at 'foo");
@@ -101,8 +62,5 @@ CALL mtr.add_suppression("wsrep::connect\\(\\) failed: 7");
 CALL mtr.add_suppression("gcs_caused\\(\\) returned -103 \\(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("Failed to open channel 'my_wsrep_cluster' at 'gcomm://192\\.0\\.2\\.1': -110 \\(Connection timed out\\)");
 CALL mtr.add_suppression("gcs connect failed: Connection timed out");
 CALL mtr.add_suppression("WSREP: wsrep::connect\\(foo://\\) failed: 7");
-CALL mtr.add_suppression("WSREP: wsrep::connect\\(gcomm://192.0.2.1\\) failed: 7");
-
diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_var_max_ws_rows.test b/mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_var_max_ws_rows.test
new file mode 100644 (file)
index 0000000..71f04df
--- /dev/null
@@ -0,0 +1,154 @@
+--source include/galera_cluster.inc
+
+CREATE TABLE ten (f1 INTEGER) ENGINE=InnoDB;
+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;
+
+--let $wsrep_max_ws_rows_orig = `SELECT @@wsrep_max_ws_rows`
+SET GLOBAL wsrep_max_ws_rows = 4;
+
+# Test that wsrep_max_ws_rows is enforced with multi statement transactions
+
+START TRANSACTION;
+INSERT INTO t1 (f2) VALUES (1);
+INSERT INTO t1 (f2) VALUES (2);
+INSERT INTO t1 (f2) VALUES (3);
+INSERT INTO t1 (f2) VALUES (4);
+--error ER_ERROR_DURING_COMMIT
+INSERT INTO t1 (f2) VALUES (5);
+COMMIT;
+SELECT COUNT(*) = 0 FROM t1;
+
+START TRANSACTION;
+INSERT INTO t1 (f2) VALUES (1);
+INSERT INTO t1 (f2) VALUES (2);
+INSERT INTO t1 (f2) VALUES (3);
+INSERT INTO t1 (f2) VALUES (4);
+--error ER_ERROR_DURING_COMMIT
+UPDATE t1 SET f2 = 10 WHERE f2 = 4;
+COMMIT;
+SELECT COUNT(*) = 0 FROM t1;
+
+START TRANSACTION;
+INSERT INTO t1 (f2) VALUES (1);
+INSERT INTO t1 (f2) VALUES (2);
+INSERT INTO t1 (f2) VALUES (3);
+INSERT INTO t1 (f2) VALUES (4);
+--error ER_ERROR_DURING_COMMIT
+DELETE FROM t1 WHERE f2 = 1;
+COMMIT;
+SELECT COUNT(*) = 0 FROM t1;
+
+
+# Test that wsrep_max_ws_rows is enforced on sigle statements
+
+SET GLOBAL wsrep_max_ws_rows = 5;
+INSERT INTO t1 (f2) VALUES (1),(2),(3),(4),(5);
+SET GLOBAL wsrep_max_ws_rows = 4;
+
+--error ER_ERROR_DURING_COMMIT
+UPDATE t1 SET f2 = f2 + 10;
+SELECT COUNT(*) = 5 FROM t1;
+
+--error ER_ERROR_DURING_COMMIT
+DELETE FROM t1 WHERE f2 < 10;
+SELECT COUNT(*) = 5 FROM t1;
+
+--error ER_ERROR_DURING_COMMIT
+INSERT INTO t1 (f2) SELECT * FROM ten;
+SELECT COUNT(*) = 5 FROM t1;
+
+--error ER_ERROR_DURING_COMMIT
+INSERT INTO t1 (f2) VALUES (10),(20),(30),(40),(50);
+SELECT COUNT(*) = 5 FROM t1;
+
+# Fewer than wsrep_max_ws_rows is OK
+
+SET GLOBAL wsrep_max_ws_rows = 10;
+DELETE FROM t1 WHERE f2 < 10;
+SELECT COUNT(*) = 0 FROM t1;
+
+# Test a series of transactions
+
+--disable_query_log
+SET GLOBAL wsrep_max_ws_rows = 5;
+let $i= 100;
+while ($i)
+{
+        START TRANSACTION;
+        --eval INSERT INTO t1 (f2) VALUES ($i);
+        COMMIT;
+        dec $i;
+}
+--enable_query_log
+SET GLOBAL wsrep_max_ws_rows = 100;
+SELECT COUNT(*) = 100 FROM t1;
+DELETE FROM t1 WHERE f2 < 101;
+SELECT COUNT(*) = 0 FROM t1;
+
+# Test large statements
+
+SET GLOBAL wsrep_max_ws_rows = 9999;
+--error ER_ERROR_DURING_COMMIT
+INSERT INTO t1 (f2) SELECT 1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4;
+SET GLOBAL wsrep_max_ws_rows = 10000;
+INSERT INTO t1 (f2) SELECT 1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4;
+
+SET GLOBAL wsrep_max_ws_rows = 9999;
+--error ER_ERROR_DURING_COMMIT
+UPDATE t1 SET f2 = 2 WHERE f2 = 1;
+SET GLOBAL wsrep_max_ws_rows = 10000;
+UPDATE t1 SET f2 = 2 WHERE f2 = 1;
+
+SET GLOBAL wsrep_max_ws_rows = 9999;
+--error ER_ERROR_DURING_COMMIT
+DELETE FROM t1 WHERE f2 = 2;
+SET GLOBAL wsrep_max_ws_rows = 10000;
+DELETE FROM t1 WHERE f2 = 2;
+
+SELECT COUNT(*) = 0 FROM t1;
+
+
+# Test that wsrep_max_ws_rows is reset when switching autocommit mode
+
+SET AUTOCOMMIT = ON;
+SET GLOBAL wsrep_max_ws_rows = 1;
+
+START TRANSACTION;
+INSERT INTO t1 (f2) VALUES (1);
+--error ER_ERROR_DURING_COMMIT
+INSERT INTO t1 (f2) VALUES (2);
+
+INSERT INTO t1 (f2) VALUES (1);
+INSERT INTO t1 (f2) VALUES (2);
+
+
+SET AUTOCOMMIT = OFF;
+START TRANSACTION;
+INSERT INTO t1 (f2) VALUES (1);
+--error ER_ERROR_DURING_COMMIT
+INSERT INTO t1 (f2) VALUES (2);
+
+INSERT INTO t1 (f2) VALUES (1);
+--error ER_ERROR_DURING_COMMIT
+INSERT INTO t1 (f2) VALUES (2);
+
+
+# Test that wsrep_max_ws_rows is reset on implicit commits
+
+START TRANSACTION;
+INSERT INTO t1 (f2) VALUES (1);
+
+START TRANSACTION;
+INSERT INTO t1 (f2) VALUES (1);
+--error ER_ERROR_DURING_COMMIT
+INSERT INTO t1 (f2) VALUES (2);
+
+
+--disable_query_log
+--eval SET GLOBAL wsrep_max_ws_rows = $wsrep_max_ws_rows_orig
+--enable_query_log
+
+DROP TABLE t1;
+DROP TABLE ten;
index bd98babf0d4dc88c78eead5bf611bf2fc0a97591..16a5479f2c939d95ce9a1dabf77f3fe2e0877e43 100644 (file)
@@ -19,6 +19,29 @@ SET GLOBAL wsrep_max_ws_size = 1024;
 INSERT INTO t1 VALUES (DEFAULT, REPEAT('X', 1024));
 SELECT COUNT(*) = 0 FROM t1;
 
+#
+# Changing repl.max_ws_size also changes wsrep_max_ws_size
+#
+
+SET GLOBAL wsrep_provider_options = 'repl.max_ws_size=10000';
+SELECT @@wsrep_max_ws_size = 10000;
+
+
+#
+# Changing wsrep_max_ws_size is equivalent to changing repl.max_ws_size
+#
+
+SET GLOBAL wsrep_provider_options = 'repl.max_ws_size=20000';
+--let $provider_options = `SELECT @@wsrep_provider_options`
+SET GLOBAL wsrep_provider_options = 'repl.max_ws_size=10000';
+
+SET GLOBAL wsrep_max_ws_size = 20000;
+--let $provider_options_updated = `SELECT @@wsrep_provider_options`
+
+--disable_query_log
+--eval SELECT STRCMP('$provider_options', '$provider_options_updated') = 0 AS provider_options_match
+--enable_query_log
+
 --disable_query_log
 --eval SET GLOBAL wsrep_max_ws_size = $wsrep_max_ws_size_orig
 --enable_query_log
diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_var_retry_autocommit.test b/mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_var_retry_autocommit.test
new file mode 100644 (file)
index 0000000..6ef647b
--- /dev/null
@@ -0,0 +1,97 @@
+#
+# Test that the wsrep_retry_autocommit variable is respected. We use an INSERT that
+# proceeds very slowly due to extra SLEEP() in a trigger
+#
+
+--source include/galera_cluster.inc
+
+--connection node_1
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=InnoDB;
+CREATE TRIGGER tr1 BEFORE INSERT ON t1 FOR EACH ROW SET NEW.f2 = SLEEP(5);
+
+#
+# With wsrep_retry_autocommit = 0, error is certain
+#
+
+--connection node_1
+SET SESSION wsrep_retry_autocommit = 0;
+--send INSERT INTO t1 (f1) VALUES (1),(2);
+
+--connection node_2
+--sleep 1
+TRUNCATE TABLE t1;
+
+--connection node_1
+--error ER_LOCK_DEADLOCK
+--reap
+
+#
+# With wsrep_retry_autocommit = 1, success against one TRUNCATE
+#
+
+--connection node_1
+SET SESSION wsrep_retry_autocommit = 1;
+--send INSERT INTO t1 (f1) VALUES (3),(4);
+
+--connection node_2
+--sleep 1
+TRUNCATE TABLE t1;
+
+--connection node_1
+--error 0
+--reap
+SELECT * FROM test.t1;
+
+#
+# With wsrep_retry_autocommit = 1, failure against multiple TRUNCATEs
+#
+
+--connection node_2
+DELIMITER |;
+CREATE PROCEDURE repeated_truncate ()
+BEGIN
+       DECLARE i INT;
+       DECLARE CONTINUE HANDLER FOR SQLEXCEPTION BEGIN END;
+
+       SET i = 0;
+        WHILE i <= 1000 DO
+               TRUNCATE TABLE t1;
+               SET i = i + 1;
+        END WHILE;
+END|
+DELIMITER ;|
+
+# Begin streaming TRUNCATEs
+--let $truncate_connection_id = `SELECT CONNECTION_ID()`
+--send CALL repeated_truncate()
+
+--connection node_1
+SET SESSION wsrep_retry_autocommit = 1;
+--sleep 1
+--error ER_LOCK_DEADLOCK
+INSERT INTO t1 (f1) VALUES (5),(6);
+
+#
+# With wsrep_retry_autocommit = 1024, success against multiple TRUNCATEs
+#
+
+--connection node_1
+SET SESSION wsrep_retry_autocommit = 1024;
+--send INSERT INTO t1 (f1) VALUES (7),(8);
+
+--sleep 6
+
+# Once he stream of TRUNCATEs is complete
+--connection node_2
+--reap
+
+# the INSERT will eventually be sucessfull
+--connection node_1
+--error 0
+--reap
+
+--let $diff_servers = 1 2
+--source include/diff_servers.inc
+
+DROP TABLE t1;
+DROP PROCEDURE repeated_truncate;
diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_wsrep_log_conficts-master.opt b/mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_wsrep_log_conficts-master.opt
new file mode 100644 (file)
index 0000000..930c483
--- /dev/null
@@ -0,0 +1 @@
+--wsrep_log_conflicts=ON
diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_wsrep_log_conficts.test b/mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_wsrep_log_conficts.test
new file mode 100644 (file)
index 0000000..3af08cb
--- /dev/null
@@ -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;
diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_wsrep_provider_options_syntax.test b/mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_wsrep_provider_options_syntax.test
new file mode 100644 (file)
index 0000000..fe1abcf
--- /dev/null
@@ -0,0 +1,20 @@
+#
+# PXC-318: Typo in wsrep_provider_options causes an unhandled exception
+#
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+--let LOGF=$MYSQLTEST_VARDIR/log/mysqld.1.err
+--disable_info
+call mtr.add_suppression("WSREP\: Unknown parameter 'gmcasts\.segment'");
+call mtr.add_suppression("WSREP\: Set options returned 7");
+--error ER_WRONG_ARGUMENTS  
+SET GLOBAL wsrep_provider_options="gmcasts.segment=1";
+# Search for unhandled exception message.
+perl;
+  use strict;
+  my $logf= $ENV{'LOGF'} or die "LOGF not set";
+  open(FILE, "$logf") or die("Unable to open $logf: $!\n");
+  my $count_warnings=grep(/terminate called after throwing an instance of /gi,<FILE>);
+  print "Unhandled exceptions: $count_warnings\n";
+  close(FILE);
+EOF
diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/t/lp1376747-2.test b/mysql-wsrep-5.6/mysql-test/suite/galera/t/lp1376747-2.test
new file mode 100644 (file)
index 0000000..360681d
--- /dev/null
@@ -0,0 +1,22 @@
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1);
+
+--connection node_2
+FLUSH TABLES t1 FOR EXPORT;
+
+--connection node_1
+ALTER TABLE t1 ADD COLUMN f2 INTEGER;
+INSERT INTO t1 VALUES (2,3);
+
+--connection node_2
+UNLOCK TABLES;
+
+--echo ### t1 should have column f2
+SHOW CREATE TABLE t1;
+SELECT * from t1;
+
+--connection node_1
+DROP TABLE t1;
diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/t/lp1376747-3.test b/mysql-wsrep-5.6/mysql-test/suite/galera/t/lp1376747-3.test
new file mode 100644 (file)
index 0000000..75fe7d2
--- /dev/null
@@ -0,0 +1,28 @@
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1);
+
+--connection node_2
+FLUSH TABLE WITH READ LOCK;
+--echo ### This shouldn't block.
+FLUSH TABLES t1 FOR EXPORT;
+
+--connection node_1
+ALTER TABLE t1 ADD COLUMN f2 INTEGER;
+
+--connection node_2
+UNLOCK TABLES;
+
+--echo ### t1 should have column f2
+SHOW CREATE TABLE t1;
+
+--connection node_1
+INSERT INTO t1 VALUES (2,3);
+
+--connection node_2
+SELECT * from t1;
+
+--connection node_1
+DROP TABLE t1;
diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/t/lp1376747-4.test b/mysql-wsrep-5.6/mysql-test/suite/galera/t/lp1376747-4.test
new file mode 100644 (file)
index 0000000..be56ee5
--- /dev/null
@@ -0,0 +1,53 @@
+#
+# Test Flush tables with read lock along with
+# flush tables <table> with read lock for compatibility.
+# Also, making sure all DDL and DMLs are propagated
+# after provider is unpaused
+#
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+--let $galera_connection_name = node_2a
+--let $galera_server_number = 2
+--source include/galera_connect.inc
+
+--connection node_1
+CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1);
+
+--connection node_2
+SET session wsrep_sync_wait=0;
+SET session wsrep_causal_reads=OFF;
+FLUSH TABLE WITH READ LOCK;
+
+--connection node_1
+ALTER TABLE t1 ADD COLUMN f2 INTEGER;
+INSERT INTO t1 VALUES (2,3);
+
+--connection node_2a
+SET session wsrep_sync_wait=0;
+SET session wsrep_causal_reads=OFF;
+SHOW CREATE TABLE t1;
+--sleep 1
+--send FLUSH TABLES t1 WITH READ LOCK;
+
+--connection node_2
+# let the flush table wait in pause state before we unlock
+# table otherwise there is window where-in flush table is
+# yet to wait in pause and unlock allows alter table to proceed.
+# this is because send in asynchronous.
+--sleep 3
+# this will release existing lock but will not resume
+# the cluster as there is new FTRL that is still pausing it.
+UNLOCK TABLES;
+SHOW CREATE TABLE t1;
+
+--connection node_2a
+--reap
+UNLOCK TABLES;
+--sleep 1
+SHOW CREATE TABLE t1;
+SELECT * from t1;
+
+--connection node_1
+DROP TABLE t1;
diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/t/lp1376747.test b/mysql-wsrep-5.6/mysql-test/suite/galera/t/lp1376747.test
new file mode 100644 (file)
index 0000000..769bb66
--- /dev/null
@@ -0,0 +1,24 @@
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1);
+
+--connection node_2
+FLUSH TABLES t1 WITH READ LOCK;
+
+--connection node_1
+ALTER TABLE t1 ADD COLUMN f2 INTEGER;
+INSERT INTO t1 VALUES (2,3);
+
+--sleep 2
+
+--connection node_2
+UNLOCK TABLES;
+
+--echo ### t1 should have column f2
+SHOW CREATE TABLE t1;
+SELECT * from t1;
+
+--connection node_1
+DROP TABLE t1;
diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/t/pxc-421.test b/mysql-wsrep-5.6/mysql-test/suite/galera/t/pxc-421.test
new file mode 100644 (file)
index 0000000..8a360b1
--- /dev/null
@@ -0,0 +1,60 @@
+#
+# PXC-421: Test deadlock involving updates of 
+# wsrep_provider, wsrep_cluster_address and wsrep_slave_threads.
+#
+
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+--connection node_1
+--let $wsrep_slave_1 = `SELECT @@wsrep_slave_threads`
+set GLOBAL wsrep_slave_threads=26;
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 (f1) SELECT * from t1 as x1;
+
+--connection node_2
+--let $wsrep_slave_2 = `SELECT @@wsrep_slave_threads`
+set GLOBAL wsrep_slave_threads=16;
+--let $wsrep_provider_orig = `SELECT @@wsrep_provider`
+--let $wsrep_cluster_address_orig = `SELECT @@wsrep_cluster_address`
+
+SET GLOBAL wsrep_provider='none';
+INSERT INTO t1 VALUES (2);
+
+--connection node_1
+INSERT INTO t1 VALUES (3);
+
+--connection node_2
+--disable_query_log
+--eval SET GLOBAL wsrep_provider = '$wsrep_provider_orig';
+--eval SET GLOBAL wsrep_cluster_address = '$wsrep_cluster_address_orig';
+--enable_query_log
+
+--source include/wait_until_connected_again.inc
+--source include/galera_wait_ready.inc
+
+INSERT INTO t1 VALUES (4);
+set GLOBAL wsrep_slave_threads=5;
+
+# Node #2 has all the inserts
+SELECT COUNT(*) = 5 FROM t1;
+
+--connection node_1
+set GLOBAL wsrep_slave_threads=12;
+# Node #1 is missing the insert made while Node #2 was not replicated
+SELECT COUNT(*) = 4 FROM t1;
+INSERT INTO t1 VALUES (100), (101), (102);
+
+--connection node_2
+set GLOBAL wsrep_slave_threads=5;
+INSERT INTO t1 (f1) SELECT * from t1 as x1;
+show global variables like 'wsrep_slave_threads';
+--eval SET GLOBAL wsrep_slave_threads = $wsrep_slave_2
+SELECT COUNT(*) FROM t1;
+
+--connection node_1
+SELECT COUNT(*) FROM t1;
+show global variables like 'wsrep_slave_threads';
+--eval SET GLOBAL wsrep_slave_threads = $wsrep_slave_1
+DROP TABLE t1;
index c04c8617ff2fe121a295879c2820e4303c404f15..56ac72ef7eecd170232eba137a7284f7dbff3b6d 100644 (file)
@@ -18,21 +18,21 @@ wsrep_node_address=127.0.0.1
 
 [mysqld.1]
 wsrep_cluster_address='gcomm://'
-wsrep_provider_options='base_port=@mysqld.1.#galera_port'
+wsrep_provider_options='base_port=@mysqld.1.#galera_port;evs.suspect_timeout=PT10S;evs.inactive_timeout=PT30S;evs.install_timeout=PT15S'
 
 wsrep_sst_receive_address=127.0.0.2:@mysqld.1.#sst_port
 wsrep_node_incoming_address=127.0.0.1:@mysqld.1.port
 
 [mysqld.2]
 wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.1.#galera_port'
-wsrep_provider_options='base_port=@mysqld.2.#galera_port'
+wsrep_provider_options='base_port=@mysqld.2.#galera_port;evs.suspect_timeout=PT10S;evs.inactive_timeout=PT30S;evs.install_timeout=PT15S'
 
 wsrep_sst_receive_address=127.0.0.2:@mysqld.2.#sst_port
 wsrep_node_incoming_address=127.0.0.1:@mysqld.2.port
 
 [mysqld.3]
 wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.1.#galera_port'
-wsrep_provider_options='base_port=@mysqld.3.#galera_port'
+wsrep_provider_options='base_port=@mysqld.3.#galera_port;evs.suspect_timeout=PT10S;evs.inactive_timeout=PT30S;evs.install_timeout=PT15S'
 
 wsrep_sst_receive_address=127.0.0.2:@mysqld.3.#sst_port
 wsrep_node_incoming_address=127.0.0.1:@mysqld.3.port
index f5a4cad4a23d20a7b5871c1c14ae446b95d223b7..69995acb982af27039380adda3d352c947a4be5d 100644 (file)
@@ -3,9 +3,6 @@ SET GLOBAL wsrep_provider_options = 'gmcast.isolate=1';
 SET GLOBAL wsrep_provider_options = 'gmcast.isolate=1';
 SET GLOBAL wsrep_provider_options = 'gmcast.isolate=1';
 SET SESSION wsrep_sync_wait = 0;
-SHOW STATUS LIKE 'wsrep_cluster_status';
-Variable_name  Value
-wsrep_cluster_status   non-Primary
 SET GLOBAL wsrep_provider_options = 'pc.bootstrap=1';
 SHOW STATUS LIKE 'wsrep_cluster_size';
 Variable_name  Value
index 85f923ad55e2641bdae64a5e69041efc2bd1884f..6fb931638ef49af354323d9632e9642a9617beb8 100644 (file)
@@ -1,6 +1,8 @@
 SET GLOBAL wsrep_provider_options = 'pc.weight=3';
 Suspending node ...
 SET SESSION wsrep_sync_wait=0;
+SET SESSION wsrep_on=OFF;
+SET SESSION wsrep_on=ON;
 SHOW STATUS LIKE 'wsrep_cluster_size';
 Variable_name  Value
 wsrep_cluster_size     2
diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera_3nodes/r/galera_safe_to_bootstrap.result b/mysql-wsrep-5.6/mysql-test/suite/galera_3nodes/r/galera_safe_to_bootstrap.result
new file mode 100644 (file)
index 0000000..21f747d
--- /dev/null
@@ -0,0 +1,26 @@
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+include/assert_grep.inc [grastate.dat does not have 'safe_to_bootstrap: 0']
+include/assert_grep.inc [grastate.dat does not have 'safe_to_bootstrap: 0']
+include/assert_grep.inc [grastate.dat does not have 'safe_to_bootstrap: 0']
+include/assert_grep.inc [grastate.dat does not have 'safe_to_bootstrap: 0']
+include/assert_grep.inc [grastate.dat does not have 'safe_to_bootstrap: 0']
+include/assert_grep.inc [grastate.dat does not have 'safe_to_bootstrap: 0']
+include/assert_grep.inc [grastate.dat does not have 'safe_to_bootstrap: 0']
+include/assert_grep.inc [grastate.dat does not have 'safe_to_bootstrap: 0']
+include/assert_grep.inc [grastate.dat does not have 'safe_to_bootstrap: 1']
+include/assert_grep.inc [grastate.dat does not have 'safe_to_bootstrap: 0']
+include/assert_grep.inc [grastate.dat does not have 'safe_to_bootstrap: 0']
+include/assert_grep.inc [grastate.dat does not have 'safe_to_bootstrap: 0']
+SET SESSION wsrep_on = OFF;
+Killing server ...
+safe_to_bootstrap: 1
+safe_to_bootstrap: 0
+safe_to_bootstrap: 0
+CALL mtr.add_suppression("Failed to prepare for incremental state transfer");
+CALL mtr.add_suppression("Failed to prepare for incremental state transfer");
+SHOW CREATE TABLE t1;
+Table  Create Table
+t1     CREATE TABLE `t1` (
+  `f1` int(11) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+DROP TABLE t1;
diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera_3nodes/t/galera_pc_bootstrap.cnf b/mysql-wsrep-5.6/mysql-test/suite/galera_3nodes/t/galera_pc_bootstrap.cnf
new file mode 100644 (file)
index 0000000..d560b67
--- /dev/null
@@ -0,0 +1,5 @@
+# We need a dedicated .cnf file, even if empty, in order to force this test to run
+# alone on a freshly started cluster. Otherwise there are adverse interactions with
+# prior tests such as galera_3nodes.galera_innobackupex_backup
+
+!include ../galera_3nodes.cnf
index 6172ffcc743022c645fa937bffb26cde8a6581d3..f8381a3324bea2564b426cfeef858fc467e8987f 100644 (file)
@@ -23,7 +23,8 @@ SET GLOBAL wsrep_provider_options = 'gmcast.isolate=1';
 
 # Node #2 should be non-primary
 SET SESSION wsrep_sync_wait = 0;
-SHOW STATUS LIKE 'wsrep_cluster_status';
+--let $wait_condition = SELECT variable_value = 'non-Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE variable_name = 'wsrep_cluster_status';
+--source include/wait_condition.inc
 
 # Signal node #2 to bootstrap
 --connection node_2
diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera_3nodes/t/galera_pc_weight.cnf b/mysql-wsrep-5.6/mysql-test/suite/galera_3nodes/t/galera_pc_weight.cnf
new file mode 100644 (file)
index 0000000..57026ce
--- /dev/null
@@ -0,0 +1,5 @@
+# We need a dedicated .cnf file, even if empty, in order to force this test to run
+# alone on a freshly started cluster. Otherwise there are adverse interactions with
+# following tests such as galera_3nodes.galera_var_dirty_reads2
+
+!include ../galera_3nodes.cnf
index 6585f1934a40db15ced4302afacf7185b4e4b71a..c118b7481bca2a3714afc6bf4dc29bd4ae3a9d83 100644 (file)
@@ -19,6 +19,11 @@ SET GLOBAL wsrep_provider_options = 'pc.weight=3';
 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
+SET SESSION wsrep_on=ON;
+
 # We can not use SELECT queries here, as only SHOW is allowed to run.
 # For nodes #2 and #3, we expect a non-primary component of size 2
 
@@ -45,7 +50,7 @@ SHOW STATUS LIKE 'wsrep_local_state_comment';
 
 --connection node_1
 --source include/galera_resume.inc
---sleep 5
+--sleep 10
 --source include/wait_until_connected_again.inc
 
 # For Node #1, we expect a primary component of size 1
diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera_3nodes/t/galera_safe_to_bootstrap.test b/mysql-wsrep-5.6/mysql-test/suite/galera_3nodes/t/galera_safe_to_bootstrap.test
new file mode 100644 (file)
index 0000000..7c9991e
--- /dev/null
@@ -0,0 +1,163 @@
+#
+# Test the safe_to_bootstrap in grastate.dat 
+#
+
+--source include/galera_cluster.inc
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+
+#
+# At start, all grastate.dat files have safe_to_boostrap: 0
+#
+
+--let $assert_text= grastate.dat does not have 'safe_to_bootstrap: 0'
+--let $assert_select= safe_to_bootstrap: 0
+--let $assert_count= 1
+
+--let $assert_file= $MYSQLTEST_VARDIR/mysqld.1/data/grastate.dat
+--source include/assert_grep.inc
+
+--let $assert_file= $MYSQLTEST_VARDIR/mysqld.2/data/grastate.dat
+--source include/assert_grep.inc
+
+--let $assert_file= $MYSQLTEST_VARDIR/mysqld.3/data/grastate.dat
+--source include/assert_grep.inc
+
+#
+# Shut down one node
+#
+
+--connection node_2
+--source include/shutdown_mysqld.inc
+
+--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
+
+# Still, all grastate.dat files should have safe_to_boostrap: 0
+
+--let $assert_file= $MYSQLTEST_VARDIR/mysqld.1/data/grastate.dat
+--source include/assert_grep.inc
+
+--let $assert_file= $MYSQLTEST_VARDIR/mysqld.2/data/grastate.dat
+--source include/assert_grep.inc
+
+--let $assert_file= $MYSQLTEST_VARDIR/mysqld.3/data/grastate.dat
+--source include/assert_grep.inc
+
+#
+# Shut down one more node
+#
+
+--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
+--connection node_3
+--source include/shutdown_mysqld.inc
+
+--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
+
+# Now, nodes 2,3 should have safe_to_boostrap: 0
+
+--let $assert_file= $MYSQLTEST_VARDIR/mysqld.2/data/grastate.dat
+--source include/assert_grep.inc
+
+--let $assert_file= $MYSQLTEST_VARDIR/mysqld.3/data/grastate.dat
+--source include/assert_grep.inc
+
+# But node #1 should have safe_to_boostrap: 1
+
+--let $assert_text= grastate.dat does not have 'safe_to_bootstrap: 1'
+--let $assert_select= safe_to_bootstrap: 1
+
+--let $assert_file= $MYSQLTEST_VARDIR/mysqld.1/data/grastate.dat
+--source include/assert_grep.inc
+
+# Restart one node
+
+--connection node_2
+--let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.2.expect
+--source include/start_mysqld.inc
+
+--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
+
+# All nodes should be back to 'safe_to_bootstrap: 0'
+
+--let $assert_text= grastate.dat does not have 'safe_to_bootstrap: 0'
+--let $assert_select= safe_to_bootstrap: 0
+
+--let $assert_file= $MYSQLTEST_VARDIR/mysqld.1/data/grastate.dat
+--source include/assert_grep.inc
+
+--let $assert_file= $MYSQLTEST_VARDIR/mysqld.2/data/grastate.dat
+--source include/assert_grep.inc
+
+--let $assert_file= $MYSQLTEST_VARDIR/mysqld.3/data/grastate.dat
+--source include/assert_grep.inc
+
+#
+# Kill the cluster
+#
+
+--connection node_2
+--source include/shutdown_mysqld.inc
+
+--connection node_1
+SET SESSION wsrep_on = OFF;
+--let $wait_condition = SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
+--source include/wait_condition.inc
+
+--source include/kill_galera.inc
+
+#
+# Only node #1 should have safe_to_bootstrap: 1
+# include/assert_grep.inc requires a running server, so we revert to simple grep
+#
+
+--error 0
+--exec grep 'safe_to_bootstrap: 1' $MYSQLTEST_VARDIR/mysqld.1/data/grastate.dat
+
+--error 0
+--exec grep 'safe_to_bootstrap: 0' $MYSQLTEST_VARDIR/mysqld.2/data/grastate.dat
+
+--error 0
+--exec grep 'safe_to_bootstrap: 0' $MYSQLTEST_VARDIR/mysqld.3/data/grastate.dat
+
+#
+# Attempt to bootstrap nodes #2, #3, should fail 
+#
+
+--error 1
+--exec $MYSQLD --defaults-group-suffix=.2 --defaults-file=$MYSQLTEST_VARDIR/my.cnf --wsrep-new-cluster | grep 'This node is not safe to bootstrap the cluster'
+--error 1
+--exec $MYSQLD --defaults-group-suffix=.3 --defaults-file=$MYSQLTEST_VARDIR/my.cnf --wsrep-new-cluster | grep 'This node is not safe to bootstrap the cluster'
+
+#
+# Attempt to bootstrap starting from node #1, should succeed
+#
+
+--connection node_1
+--let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+--source include/start_mysqld.inc
+--source include/wait_until_connected_again.inc
+
+--connection node_2
+--let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.2.expect
+--source include/start_mysqld.inc
+
+--connection node_3
+--let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.3.expect
+--source include/start_mysqld.inc
+
+--let $wait_condition = SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
+--source include/wait_condition.inc
+
+--connection node_2
+CALL mtr.add_suppression("Failed to prepare for incremental state transfer");
+
+--connection node_3
+CALL mtr.add_suppression("Failed to prepare for incremental state transfer");
+SHOW CREATE TABLE t1;
+
+DROP TABLE t1;
index 56971f1e7d62baaba8e97714e6b2f32ca370e373..e9729280f2cdebc8d59d5c1f024196facf7a5379 100644 (file)
@@ -105,4 +105,8 @@ 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
 
+--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
+
 DROP TABLE t1;
diff --git a/mysql-wsrep-5.6/mysql-test/suite/innodb/r/autoinc_debug.result b/mysql-wsrep-5.6/mysql-test/suite/innodb/r/autoinc_debug.result
new file mode 100644 (file)
index 0000000..b607109
--- /dev/null
@@ -0,0 +1,94 @@
+CREATE TABLE t1 (id INT AUTO_INCREMENT PRIMARY KEY)ENGINE=INNODB;
+# SETTING auto_increment_increment IN CONNECTION DEFAULT
+SET AUTO_INCREMENT_INCREMENT = 1;
+INSERT INTO t1 VALUES(NULL);
+SELECT * FROM t1;
+id
+1
+SHOW CREATE TABLE t1;
+Table  Create Table
+t1     CREATE TABLE `t1` (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1
+# SETTING auto_increment_increment IN CONNECTION1
+SET AUTO_INCREMENT_INCREMENT = 2;
+SET DEBUG_SYNC= 'ib_after_row_insert SIGNAL opened WAIT_FOR flushed1';
+INSERT INTO t1 VALUES(NULL);
+SET AUTO_INCREMENT_INCREMENT = 2;
+SET DEBUG_SYNC= 'now WAIT_FOR opened';
+SET DEBUG_SYNC= 'ib_after_row_insert_step SIGNAL flushed1 WAIT_FOR opened1';
+insert into t1 values(NULL);
+# CONNECTION default
+SELECT * FROM t1;
+id
+1
+3
+SHOW CREATE TABLE t1;
+Table  Create Table
+t1     CREATE TABLE `t1` (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=latin1
+SET DEBUG_SYNC= 'now SIGNAL opened1';
+# CONNECTION con1
+SELECT * FROM t1;
+id
+1
+3
+5
+SHOW CREATE TABLE t1;
+Table  Create Table
+t1     CREATE TABLE `t1` (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=latin1
+DROP TABLE t1;
+CREATE TABLE t1(id INT AUTO_INCREMENT PRIMARY KEY)ENGINE=INNODB;
+# SETTING auto_increment_increment IN CONNECTION DEFAULT
+SET AUTO_INCREMENT_INCREMENT = 1;
+INSERT INTO t1 VALUES(NULL);
+SELECT * FROM t1;
+id
+1
+SHOW CREATE TABLE t1;
+Table  Create Table
+t1     CREATE TABLE `t1` (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1
+SET DEBUG_SYNC = 'now SIGNAL flushed';
+# SETTING auto_increment_increment in connection1
+SET AUTO_INCREMENT_INCREMENT = 2;
+SET DEBUG_SYNC= 'now WAIT_FOR flushed';
+SET DEBUG_SYNC= 'ib_after_row_insert SIGNAL opened WAIT_FOR flushed1';
+INSERT INTO t1 values(NULL);
+# CONNECTION DEFAULT
+SET DEBUG_SYNC= 'now WAIT_FOR opened';
+SET DEBUG_SYNC= 'ib_after_row_insert_step SIGNAL flushed1 WAIT_FOR opened1';
+INSERT INTO t1 VALUES(NULL);
+# CONNECTION con1
+SELECT * FROM t1;
+id
+1
+3
+SHOW CREATE TABLE t1;
+Table  Create Table
+t1     CREATE TABLE `t1` (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=latin1
+SET DEBUG_SYNC= 'now SIGNAL opened1';
+# CONNECTION default
+SELECT * FROM t1;
+id
+1
+3
+5
+SHOW CREATE TABLE t1;
+Table  Create Table
+t1     CREATE TABLE `t1` (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=latin1
+DROP TABLE t1;
diff --git a/mysql-wsrep-5.6/mysql-test/suite/innodb/r/flush-hang.result b/mysql-wsrep-5.6/mysql-test/suite/innodb/r/flush-hang.result
new file mode 100644 (file)
index 0000000..6f92f6c
--- /dev/null
@@ -0,0 +1,36 @@
+#
+#Bug #21133329   HANGING "SYSTEM LOCK" WHEN EXECUTING "FLUSH TABLE ... FOR EXPORT"
+#
+CREATE TABLE t1 (
+c1 BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY,
+c2 BIGINT,
+c3 VARCHAR(2048),
+c4 VARCHAR(2048),
+INDEX idx1(c2),
+INDEX idx2(c3(512)),
+INDEX idx3(c4(512))) Engine=InnoDB;
+CREATE TABLE t2 ( f1 int PRIMARY KEY) engine=innodb;
+SET GLOBAL INNODB_PURGE_STOP_NOW=ON;
+SET GLOBAL innodb_disable_background_merge=ON;
+SET GLOBAL innodb_stats_persistent=OFF;
+show variables like '%innodb_stats_persistent%';
+Variable_name  Value
+innodb_stats_persistent        OFF
+innodb_stats_persistent_sample_pages   20
+INSERT INTO t1(c2, c3, c4) VALUES
+(1, REPEAT('a', 2048), REPEAT('a', 2048)),
+(2, REPEAT('b', 2048), REPEAT('b', 2048)),
+(3, REPEAT('c', 2048), REPEAT('c', 2048)),
+(4, REPEAT('d', 2048), REPEAT('d', 2048));
+INSERT INTO t1(c2, c3, c4) SELECT c2, c3, c4 FROM t1;
+INSERT INTO t1(c2, c3, c4) SELECT c2, c3, c4 FROM t1;
+INSERT INTO t1(c2, c3, c4) SELECT c2, c3, c4 FROM t1;
+INSERT INTO t1(c2, c3, c4) SELECT c2, c3, c4 FROM t1;
+INSERT INTO t1(c2, c3, c4) SELECT c2, c3, c4 FROM t1;
+INSERT INTO t1(c2, c3, c4) SELECT c2, c3, c4 FROM t1;
+FLUSH TABLES t2 FOR EXPORT;
+UNLOCK TABLES;
+SET GLOBAL innodb_disable_background_merge=OFF;
+SET GLOBAL INNODB_PURGE_RUN_NOW=ON;
+SET GLOBAL innodb_stats_persistent=ON;
+DROP TABLE t1,t2;
diff --git a/mysql-wsrep-5.6/mysql-test/suite/innodb/r/import_update_stats.result b/mysql-wsrep-5.6/mysql-test/suite/innodb/r/import_update_stats.result
new file mode 100644 (file)
index 0000000..a221721
--- /dev/null
@@ -0,0 +1,69 @@
+SET @old_innodb_file_per_table = @@innodb_file_per_table;
+SET GLOBAL innodb_file_per_table = 1;
+SELECT @@innodb_file_per_table;
+@@innodb_file_per_table
+1
+CREATE TABLE t1 (
+col_1 CHAR (255),
+col_2 VARCHAR (255)
+) ENGINE = InnoDB;
+CREATE INDEX idx1 ON t1(col_1);
+CREATE INDEX idx2 ON t1(col_2);
+SHOW INDEXES FROM t1;
+Table  Non_unique      Key_name        Seq_in_index    Column_name     Collation       Cardinality     Sub_part        Packed  Null    Index_type      Comment Index_comment
+t1     1       idx1    1       col_1   A       0       NULL    NULL    YES     BTREE           
+t1     1       idx2    1       col_2   A       0       NULL    NULL    YES     BTREE           
+INSERT INTO t1  VALUES ("col1_00001", "col2_00001"), ("col1_00002", "col2_00002");
+SHOW INDEXES FROM t1;
+Table  Non_unique      Key_name        Seq_in_index    Column_name     Collation       Cardinality     Sub_part        Packed  Null    Index_type      Comment Index_comment
+t1     1       idx1    1       col_1   A       2       NULL    NULL    YES     BTREE           
+t1     1       idx2    1       col_2   A       2       NULL    NULL    YES     BTREE           
+ANALYZE TABLE t1;
+Table  Op      Msg_type        Msg_text
+test.t1        analyze status  OK
+SHOW INDEXES FROM t1;
+Table  Non_unique      Key_name        Seq_in_index    Column_name     Collation       Cardinality     Sub_part        Packed  Null    Index_type      Comment Index_comment
+t1     1       idx1    1       col_1   A       2       NULL    NULL    YES     BTREE           
+t1     1       idx2    1       col_2   A       2       NULL    NULL    YES     BTREE           
+FLUSH TABLES t1 FOR EXPORT;
+backup: t1
+UNLOCK TABLES;
+DROP TABLE t1;
+CREATE TABLE t1 (
+col_1 CHAR (255),
+col_2 VARCHAR (255)
+) ENGINE = InnoDB;
+CREATE INDEX idx1 ON t1(col_1);
+CREATE INDEX idx2 ON t1(col_2);
+SHOW INDEXES FROM t1;
+Table  Non_unique      Key_name        Seq_in_index    Column_name     Collation       Cardinality     Sub_part        Packed  Null    Index_type      Comment Index_comment
+t1     1       idx1    1       col_1   A       0       NULL    NULL    YES     BTREE           
+t1     1       idx2    1       col_2   A       0       NULL    NULL    YES     BTREE           
+INSERT INTO t1  VALUES ("col1_00001", "col2_00001");
+SHOW INDEXES FROM t1;
+Table  Non_unique      Key_name        Seq_in_index    Column_name     Collation       Cardinality     Sub_part        Packed  Null    Index_type      Comment Index_comment
+t1     1       idx1    1       col_1   A       1       NULL    NULL    YES     BTREE           
+t1     1       idx2    1       col_2   A       1       NULL    NULL    YES     BTREE           
+ANALYZE TABLE t1;
+Table  Op      Msg_type        Msg_text
+test.t1        analyze status  OK
+SHOW INDEXES FROM t1;
+Table  Non_unique      Key_name        Seq_in_index    Column_name     Collation       Cardinality     Sub_part        Packed  Null    Index_type      Comment Index_comment
+t1     1       idx1    1       col_1   A       1       NULL    NULL    YES     BTREE           
+t1     1       idx2    1       col_2   A       1       NULL    NULL    YES     BTREE           
+ALTER TABLE t1 DISCARD TABLESPACE;
+restore: t1 .ibd and .cfg files
+ALTER TABLE t1 IMPORT TABLESPACE;
+SHOW INDEXES FROM t1;
+Table  Non_unique      Key_name        Seq_in_index    Column_name     Collation       Cardinality     Sub_part        Packed  Null    Index_type      Comment Index_comment
+t1     1       idx1    1       col_1   A       2       NULL    NULL    YES     BTREE           
+t1     1       idx2    1       col_2   A       2       NULL    NULL    YES     BTREE           
+ANALYZE TABLE t1;
+Table  Op      Msg_type        Msg_text
+test.t1        analyze status  OK
+SHOW INDEXES FROM t1;
+Table  Non_unique      Key_name        Seq_in_index    Column_name     Collation       Cardinality     Sub_part        Packed  Null    Index_type      Comment Index_comment
+t1     1       idx1    1       col_1   A       2       NULL    NULL    YES     BTREE           
+t1     1       idx2    1       col_2   A       2       NULL    NULL    YES     BTREE           
+DROP TABLE t1;
+SET GLOBAL innodb_file_per_table = @old_innodb_file_per_table;
diff --git a/mysql-wsrep-5.6/mysql-test/suite/innodb/r/innodb-index-online-norebuild.result b/mysql-wsrep-5.6/mysql-test/suite/innodb/r/innodb-index-online-norebuild.result
new file mode 100644 (file)
index 0000000..611c726
--- /dev/null
@@ -0,0 +1,26 @@
+# INPLACE ALTER WITH INPLACE_IGNORE FLAG AND CHANGE CREATE OPTION
+# CHANGE THE COLUMN DEFAULT (INPLACE_IGNORE)
+# AND TABLE CHARSET(CHANGE CREATE)
+CREATE TABLE t1(
+id INT PRIMARY KEY,
+f1 INT NOT NULL DEFAULT 0)ENGINE=INNODB;
+INSERT INTO t1 VALUES(1, 2);
+ALTER TABLE t1 MODIFY COLUMN f1 INT NOT NULL DEFAULT 0,
+DEFAULT CHARSET=latin1, ALGORITHM=INPLACE;
+DROP TABLE t1;
+# CHANGE THE STORAGE TYPE OF COLUMN(INPLACE IGNORE)
+# AND TABLE CHARSET(CHANGE CREATE)
+CREATE TABLE t1(
+id INT STORAGE DISK)ENGINE=INNODB;
+INSERT INTO t1 values(1);
+ALTER TABLE t1 MODIFY COLUMN id INT STORAGE MEMORY,
+DEFAULT CHARSET=latin1, ALGORITHM=INPLACE;
+DROP TABLE t1;
+# RENAME THE TABLE(INPLACE IGNORE)
+# AND CHANGE TABLE CHARSET(CHANGE CREATE)
+CREATE TABLE t1(
+f1 INT NOT NULL,
+f2 INT NOT NULL)ENGINE=INNODB;
+INSERT INTO t1 VALUES(1, 2);
+ALTER TABLE t1 RENAME t2, DEFAULT CHARSET=latin1, ALGORITHM=INPLACE;
+DROP TABLE t2;
index caa28131649d4f4cf2ae1c35d76fefd9cd85bb91..0957eedd5f9ffcff3aeaf20de316a9450420bbef 100644 (file)
@@ -153,6 +153,7 @@ id  LEFT(bfield,20)
 21     aaaaaaaaaaaaaaaaaaaa
 22     bbbbbbbbbbbbbbbbbbbb
 23     cccccccccccccccccccc
+SET GLOBAL innodb_fast_shutdown=0;
 "test misc 1"
 "test misc 2"
 "test misc 3"
index 4935febcbfbd26421ecd6a104d3f0de637d096da..29b0127f20b9221e028c5850e13619de4d87153c 100644 (file)
@@ -6,7 +6,8 @@ table_54044     CREATE TEMPORARY TABLE `table_54044` (
   `IF(NULL  IS NOT NULL, NULL, NULL)` binary(0) DEFAULT NULL
 ) ENGINE=InnoDB DEFAULT CHARSET=latin1
 DROP TABLE table_54044;
-CREATE TABLE tmp ENGINE = INNODB AS SELECT COALESCE(NULL, NULL, NULL), GREATEST(NULL, NULL), NULL;
+CREATE TABLE tmp ENGINE = INNODB
+AS SELECT COALESCE(NULL, NULL, NULL), GREATEST(NULL, NULL), NULL;
 SHOW CREATE TABLE tmp;
 Table  Create Table
 tmp    CREATE TABLE `tmp` (
diff --git a/mysql-wsrep-5.6/mysql-test/suite/innodb/r/innodb_deadlock_with_autoinc.result b/mysql-wsrep-5.6/mysql-test/suite/innodb/r/innodb_deadlock_with_autoinc.result
new file mode 100644 (file)
index 0000000..6706085
--- /dev/null
@@ -0,0 +1,12 @@
+#
+# Bug #21983865  UNEXPECTED DEADLOCK WITH INNODB_AUTOINC_LOCK_MODE=0
+#
+create table t1(f1 int not null auto_increment primary key) engine=innodb;
+# Hold autoinc_lock on table t1 from connection con1
+set debug_sync='ib_after_row_insert SIGNAL others WAIT_FOR continue_others';
+insert into t1 values(NULL);
+# Create 40 connections and make it to wait for autoinc_lock on table t1.
+# Release the auto_inc lock on table t1 for connection con1
+set debug_sync='now SIGNAL continue_others';
+# Now all 40 connections can finish the insert operation on t1.
+drop table t1;
index 0f5edd5e65f949d9a6645356d597c21652eb312b..4662d2dbd67bbc7457e4df0462c528b50af0392f 100644 (file)
@@ -2568,7 +2568,7 @@ EXPLAIN SELECT * FROM t1 WHERE f1 IN
 3784744,4180925,4559596,3963734,3856391,4494153)
 AND f5 = 'abcdefghijklmnopwrst' AND f2 = 1221457 AND f4 = 0 ;
 id     select_type     table   type    possible_keys   key     key_len ref     rows    Extra
-1      SIMPLE  t1      ref     PRIMARY,idx1,idx2       idx1    60      const,const,const       18      Using index condition
+1      SIMPLE  t1      range   PRIMARY,idx1,idx2       idx1    64      NULL    18      Using index condition
 DROP TABLE t1;
 #
 # Bug#51431 Wrong sort order after import of dump file
diff --git a/mysql-wsrep-5.6/mysql-test/suite/innodb/r/innodb_stats_del_mark.result b/mysql-wsrep-5.6/mysql-test/suite/innodb/r/innodb_stats_del_mark.result
new file mode 100644 (file)
index 0000000..0362ef8
--- /dev/null
@@ -0,0 +1,93 @@
+#
+# Bug 23333990 PERSISTENT INDEX STATISTICS UPDATE BEFORE
+#              TRANSACTION IS COMMITTED
+#
+"Test 1:- Uncommited delete test"
+CREATE TABLE t1 (id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
+val INT UNSIGNED NOT NULL,
+INDEX (val)) ENGINE=INNODB
+STATS_PERSISTENT=1,STATS_AUTO_RECALC=1;
+INSERT INTO t1 (val) VALUES (4);
+INSERT INTO t1 (val) SELECT VAL from t1;
+INSERT INTO t1 (val) SELECT VAL from t1;
+INSERT INTO t1 (val) SELECT VAL from t1;
+INSERT INTO t1 (val) SELECT VAL from t1;
+INSERT INTO t1 (val) SELECT VAL from t1;
+INSERT INTO t1 (val) SELECT VAL from t1;
+INSERT INTO t1 (val) SELECT VAL from t1;
+INSERT INTO t1 (val) SELECT VAL from t1;
+INSERT INTO t1 (val) SELECT VAL from t1;
+INSERT INTO t1 (val) SELECT VAL from t1;
+INSERT INTO t1 (val) SELECT VAL from t1;
+INSERT INTO t1 (val) SELECT VAL from t1;
+INSERT INTO t1 (val) SELECT VAL from t1;
+INSERT INTO t1 (val) SELECT VAL from t1;
+INSERT INTO t1 (val) SELECT VAL from t1;
+INSERT INTO t1 (val) SELECT VAL from t1;
+INSERT INTO t1 (val) SELECT VAL from t1;
+INSERT INTO t1 (val) SELECT VAL from t1;
+SELECT COUNT(*) FROM t1;
+COUNT(*)
+262144
+Connection 1
+START TRANSACTION;
+DELETE FROM t1;
+SELECT COUNT(*) FROM t1;
+Connection Default
+analyze table t1;
+Table  Op      Msg_type        Msg_text
+test.t1        analyze status  OK
+Test correctly estimates the number of rows as > 20000
+even when in other uncommmited transaction
+all rows have been deleted.
+Connection 1
+COUNT(*)
+0
+commit;
+Connection deafult
+Test 2:- Insert and rollback test
+CREATE TABLE t2 (id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
+val INT UNSIGNED NOT NULL,
+INDEX (val)) ENGINE=INNODB
+STATS_PERSISTENT=1,STATS_AUTO_RECALC=1;
+Connection 1
+START TRANSACTION;
+INSERT INTO t2 (val) VALUES (4);
+INSERT INTO t2 (val) SELECT VAL from t2;
+INSERT INTO t2 (val) SELECT VAL from t2;
+INSERT INTO t2 (val) SELECT VAL from t2;
+INSERT INTO t2 (val) SELECT VAL from t2;
+INSERT INTO t2 (val) SELECT VAL from t2;
+INSERT INTO t2 (val) SELECT VAL from t2;
+INSERT INTO t2 (val) SELECT VAL from t2;
+INSERT INTO t2 (val) SELECT VAL from t2;
+INSERT INTO t2 (val) SELECT VAL from t2;
+INSERT INTO t2 (val) SELECT VAL from t2;
+INSERT INTO t2 (val) SELECT VAL from t2;
+INSERT INTO t2 (val) SELECT VAL from t2;
+INSERT INTO t2 (val) SELECT VAL from t2;
+INSERT INTO t2 (val) SELECT VAL from t2;
+INSERT INTO t2 (val) SELECT VAL from t2;
+INSERT INTO t2 (val) SELECT VAL from t2;
+INSERT INTO t2 (val) SELECT VAL from t2;
+INSERT INTO t2 (val) SELECT VAL from t2;
+SELECT COUNT(*) FROM t2;
+Connection default
+select count(*) from t2;
+count(*)
+0
+analyze table t2;
+Table  Op      Msg_type        Msg_text
+test.t2        analyze status  OK
+Test correctly estimates the number of rows as > 20000
+even when in other uncommited transaction
+many rows are inserted.
+Connection 1
+COUNT(*)
+262144
+Rollback the insert
+rollback;
+Connection default
+Test correctly estimates the number of rows as 1
+after rollback.
+DROP TABLE t1,t2;
index 68ab1bf176423596ad9667e6b4664d3ef081ff0d..7553df6aabbc057003307c6b4b31b8c8ab953b4d 100644 (file)
@@ -547,3 +547,52 @@ set global innodb_monitor_enable = default;
 set global innodb_monitor_disable = default;
 set global innodb_monitor_reset = default;
 set global innodb_monitor_reset_all = default;
+#
+# Bug#22576241 SETTING INNODB_MONITOR_ENABLE TO ALL DOES NOT ENABLE ALL
+# MONITORS
+#
+CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB;
+SELECT NAME, COUNT FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
+LIKE 'buffer_page_written_index_leaf';
+NAME   COUNT
+buffer_page_written_index_leaf 0
+SET GLOBAL innodb_monitor_enable='module_buffer_page';
+INSERT INTO t1 VALUES (1), (2), (3), (4);
+FLUSH TABLES t1 FOR EXPORT;
+UNLOCK TABLES;
+SELECT NAME, COUNT FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
+LIKE 'buffer_page_written_index_leaf';
+NAME   COUNT
+buffer_page_written_index_leaf NNNN
+SET GLOBAL innodb_monitor_disable='module_buffer_page';
+SET GLOBAL innodb_monitor_reset_all='module_buffer_page';
+SELECT NAME, COUNT FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
+LIKE 'buffer_page_written_index_leaf';
+NAME   COUNT
+buffer_page_written_index_leaf 0
+SET GLOBAL innodb_monitor_enable='%';
+INSERT INTO t1 VALUES (5), (6), (7), (8);
+FLUSH TABLES t1 FOR EXPORT;
+UNLOCK TABLES;
+SELECT NAME, COUNT FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
+LIKE 'buffer_page_written_index_leaf';
+NAME   COUNT
+buffer_page_written_index_leaf NNNN
+SET GLOBAL innodb_monitor_disable='%';
+SET GLOBAL innodb_monitor_reset_all='%';
+SELECT NAME, COUNT FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
+LIKE 'buffer_page_written_index_leaf';
+NAME   COUNT
+buffer_page_written_index_leaf 0
+SET GLOBAL innodb_monitor_enable='ALL';
+INSERT INTO t1 VALUES (9), (10), (11), (12);
+FLUSH TABLES t1 FOR EXPORT;
+UNLOCK TABLES;
+SELECT NAME, COUNT FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
+LIKE 'buffer_page_written_index_leaf';
+NAME   COUNT
+buffer_page_written_index_leaf NNNN
+SET GLOBAL innodb_monitor_enable=default;
+SET GLOBAL innodb_monitor_disable=default;
+SET GLOBAL innodb_monitor_reset_all=default;
+DROP TABLE t1;
diff --git a/mysql-wsrep-5.6/mysql-test/suite/innodb/t/autoinc_debug.test b/mysql-wsrep-5.6/mysql-test/suite/innodb/t/autoinc_debug.test
new file mode 100644 (file)
index 0000000..96568d3
--- /dev/null
@@ -0,0 +1,89 @@
+--source include/have_innodb.inc
+--source include/not_embedded.inc
+--source include/have_debug.inc
+
+# Two parallel connection with autoinc column after restart.
+
+CREATE TABLE t1 (id INT AUTO_INCREMENT PRIMARY KEY)ENGINE=INNODB;
+
+--echo # SETTING auto_increment_increment IN CONNECTION DEFAULT
+SET AUTO_INCREMENT_INCREMENT = 1;
+INSERT INTO t1 VALUES(NULL);
+SELECT * FROM t1;
+SHOW CREATE TABLE t1;
+
+--source include/restart_mysqld.inc
+
+--echo # SETTING auto_increment_increment IN CONNECTION1
+SET AUTO_INCREMENT_INCREMENT = 2;
+
+SET DEBUG_SYNC= 'ib_after_row_insert SIGNAL opened WAIT_FOR flushed1';
+
+SEND INSERT INTO t1 VALUES(NULL);
+
+connect(con1, localhost, root,,);
+SET AUTO_INCREMENT_INCREMENT = 2;
+SET DEBUG_SYNC= 'now WAIT_FOR opened';
+SET DEBUG_SYNC= 'ib_after_row_insert_step SIGNAL flushed1 WAIT_FOR opened1';
+send insert into t1 values(NULL);
+
+--echo # CONNECTION default
+connection default;
+reap;
+SELECT * FROM t1;
+SHOW CREATE TABLE t1;
+SET DEBUG_SYNC= 'now SIGNAL opened1';
+
+--echo # CONNECTION con1
+connection con1;
+reap;
+SELECT * FROM t1;
+SHOW CREATE TABLE t1;
+connection default;
+disconnect con1;
+
+DROP TABLE t1;
+
+# Two parallel connection with autoinc column without restart.
+
+CREATE TABLE t1(id INT AUTO_INCREMENT PRIMARY KEY)ENGINE=INNODB;
+
+--echo # SETTING auto_increment_increment IN CONNECTION DEFAULT
+SET AUTO_INCREMENT_INCREMENT = 1;
+INSERT INTO t1 VALUES(NULL);
+SELECT * FROM t1;
+SHOW CREATE TABLE t1;
+SET DEBUG_SYNC = 'now SIGNAL flushed';
+
+connect(con1, localhost, root,,);
+
+--echo # SETTING auto_increment_increment in connection1
+SET AUTO_INCREMENT_INCREMENT = 2;
+
+SET DEBUG_SYNC= 'now WAIT_FOR flushed';
+SET DEBUG_SYNC= 'ib_after_row_insert SIGNAL opened WAIT_FOR flushed1';
+
+send INSERT INTO t1 values(NULL);
+
+--echo # CONNECTION DEFAULT
+connection default;
+
+SET DEBUG_SYNC= 'now WAIT_FOR opened';
+SET DEBUG_SYNC= 'ib_after_row_insert_step SIGNAL flushed1 WAIT_FOR opened1';
+
+send INSERT INTO t1 VALUES(NULL);
+
+--echo # CONNECTION con1
+connection con1;
+reap;
+SELECT * FROM t1;
+SHOW CREATE TABLE t1;
+SET DEBUG_SYNC= 'now SIGNAL opened1';
+
+--echo # CONNECTION default
+connection default;
+reap;
+SELECT * FROM t1;
+SHOW CREATE TABLE t1;
+disconnect con1;
+DROP TABLE t1;
diff --git a/mysql-wsrep-5.6/mysql-test/suite/innodb/t/flush-hang.test b/mysql-wsrep-5.6/mysql-test/suite/innodb/t/flush-hang.test
new file mode 100644 (file)
index 0000000..7de9abd
--- /dev/null
@@ -0,0 +1,50 @@
+
+--echo #
+--echo #Bug #21133329   HANGING "SYSTEM LOCK" WHEN EXECUTING "FLUSH TABLE ... FOR EXPORT"
+--echo #
+
+--source include/not_embedded.inc
+--source include/have_debug.inc
+--source include/have_innodb.inc
+
+CREATE TABLE t1 (
+       c1 BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY,
+       c2 BIGINT,
+       c3 VARCHAR(2048),
+       c4 VARCHAR(2048),
+       INDEX idx1(c2),
+       INDEX idx2(c3(512)),
+       INDEX idx3(c4(512))) Engine=InnoDB;
+
+CREATE TABLE t2 ( f1 int PRIMARY KEY) engine=innodb;
+
+# Stop purge so that it doesn't remove the delete marked entries.
+SET GLOBAL INNODB_PURGE_STOP_NOW=ON;
+
+# Disable change buffer merge from the master thread, additionally
+# enable aggressive flushing so that more changes are buffered.
+SET GLOBAL innodb_disable_background_merge=ON;
+SET GLOBAL innodb_stats_persistent=OFF;
+show variables like '%innodb_stats_persistent%';
+
+INSERT INTO t1(c2, c3, c4) VALUES
+       (1, REPEAT('a', 2048), REPEAT('a', 2048)),
+       (2, REPEAT('b', 2048), REPEAT('b', 2048)),
+       (3, REPEAT('c', 2048), REPEAT('c', 2048)),
+       (4, REPEAT('d', 2048), REPEAT('d', 2048));
+
+INSERT INTO t1(c2, c3, c4) SELECT c2, c3, c4 FROM t1;
+INSERT INTO t1(c2, c3, c4) SELECT c2, c3, c4 FROM t1;
+INSERT INTO t1(c2, c3, c4) SELECT c2, c3, c4 FROM t1;
+INSERT INTO t1(c2, c3, c4) SELECT c2, c3, c4 FROM t1;
+INSERT INTO t1(c2, c3, c4) SELECT c2, c3, c4 FROM t1;
+INSERT INTO t1(c2, c3, c4) SELECT c2, c3, c4 FROM t1;
+
+FLUSH TABLES t2 FOR EXPORT;
+UNLOCK TABLES;
+
+SET GLOBAL innodb_disable_background_merge=OFF;
+SET GLOBAL INNODB_PURGE_RUN_NOW=ON;
+SET GLOBAL innodb_stats_persistent=ON;
+
+DROP TABLE t1,t2;
index d7bfe0c7c4f6960ee41af4de92fb1cd6fb82f674..45eebdb54e436001c89e4ada8ac067716abd1722 100644 (file)
@@ -43,3 +43,6 @@ innodb-wl5522-debug : Unsafe statement written to the binary log using statement
 innodb_stats_table_flag_auto_recalc : Performs multiple restarts in a row which causes '1047: Unknown command' errors
 innodb-lock-inherit-read_commited :  Cannot execute statement: impossible to write to binary log since BINLOG_FORMAT = STATEMENT
 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.
diff --git a/mysql-wsrep-5.6/mysql-test/suite/innodb/t/import_update_stats.test b/mysql-wsrep-5.6/mysql-test/suite/innodb/t/import_update_stats.test
new file mode 100644 (file)
index 0000000..e12e295
--- /dev/null
@@ -0,0 +1,78 @@
+#
+# BUG#20125349 - PERSISTANT STATS IS NOT UPDATED WHEN TTS IS IMPORTED.
+#
+
+--source include/not_embedded.inc
+--source include/have_innodb.inc
+
+let MYSQLD_DATADIR =`SELECT @@datadir`;
+SET @old_innodb_file_per_table = @@innodb_file_per_table;
+
+SET GLOBAL innodb_file_per_table = 1;
+SELECT @@innodb_file_per_table;
+
+CREATE TABLE t1 (
+       col_1 CHAR (255),
+       col_2 VARCHAR (255)
+) ENGINE = InnoDB;
+
+CREATE INDEX idx1 ON t1(col_1);
+CREATE INDEX idx2 ON t1(col_2);
+
+SHOW INDEXES FROM t1;
+
+INSERT INTO t1  VALUES ("col1_00001", "col2_00001"), ("col1_00002", "col2_00002");
+
+SHOW INDEXES FROM t1;
+
+ANALYZE TABLE t1;
+SHOW INDEXES FROM t1;
+
+FLUSH TABLES t1 FOR EXPORT;
+perl;
+do 'include/innodb-util.inc';
+ib_backup_tablespaces("test", "t1");
+EOF
+
+UNLOCK TABLES;
+
+DROP TABLE t1;
+
+CREATE TABLE t1 (
+       col_1 CHAR (255),
+       col_2 VARCHAR (255)
+) ENGINE = InnoDB;
+
+CREATE INDEX idx1 ON t1(col_1);
+CREATE INDEX idx2 ON t1(col_2);
+
+SHOW INDEXES FROM t1;
+
+INSERT INTO t1  VALUES ("col1_00001", "col2_00001");
+
+SHOW INDEXES FROM t1;
+
+ANALYZE TABLE t1;
+SHOW INDEXES FROM t1;
+
+ALTER TABLE t1 DISCARD TABLESPACE;
+
+perl;
+do 'include/innodb-util.inc';
+ib_discard_tablespaces("test", "t1");
+ib_restore_tablespaces("test", "t1");
+EOF
+
+ALTER TABLE t1 IMPORT TABLESPACE;
+
+SHOW INDEXES FROM t1;
+
+ANALYZE TABLE t1;
+SHOW INDEXES FROM t1;
+
+DROP TABLE t1;
+
+SET GLOBAL innodb_file_per_table = @old_innodb_file_per_table;
+
+--remove_files_wildcard $MYSQLTEST_VARDIR/tmp t1*.ibd
+--remove_files_wildcard $MYSQLTEST_VARDIR/tmp t1*.cfg
diff --git a/mysql-wsrep-5.6/mysql-test/suite/innodb/t/innodb-index-online-norebuild.test b/mysql-wsrep-5.6/mysql-test/suite/innodb/t/innodb-index-online-norebuild.test
new file mode 100644 (file)
index 0000000..6bd5988
--- /dev/null
@@ -0,0 +1,68 @@
+--echo # INPLACE ALTER WITH INPLACE_IGNORE FLAG AND CHANGE CREATE OPTION
+
+--echo # CHANGE THE COLUMN DEFAULT (INPLACE_IGNORE)
+--echo # AND TABLE CHARSET(CHANGE CREATE)
+
+CREATE TABLE t1(
+       id INT PRIMARY KEY,
+       f1 INT NOT NULL DEFAULT 0)ENGINE=INNODB;
+
+INSERT INTO t1 VALUES(1, 2);
+
+let id_before_alter =`SELECT table_id FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES WHERE name="test/t1"`;
+
+ALTER TABLE t1 MODIFY COLUMN f1 INT NOT NULL DEFAULT 0,
+              DEFAULT CHARSET=latin1, ALGORITHM=INPLACE;
+
+let id_after_alter =`SELECT table_id FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES WHERE name="test/t1"`;
+
+if ($id_before_alter != $id_after_alter)
+{
+  --echo "Table rebuild happened";
+}
+
+DROP TABLE t1;
+
+--echo # CHANGE THE STORAGE TYPE OF COLUMN(INPLACE IGNORE)
+--echo # AND TABLE CHARSET(CHANGE CREATE)
+
+CREATE TABLE t1(
+       id INT STORAGE DISK)ENGINE=INNODB;
+
+INSERT INTO t1 values(1);
+
+let id_before_alter =`SELECT table_id FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES WHERE name="test/t1"`;
+
+ALTER TABLE t1 MODIFY COLUMN id INT STORAGE MEMORY,
+              DEFAULT CHARSET=latin1, ALGORITHM=INPLACE;
+
+let id_after_alter =`SELECT table_id FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES WHERE name="test/t1"`;
+
+if ($id_before_alter != $id_after_alter)
+{
+  --echo "Table rebuild happened";
+}
+
+DROP TABLE t1;
+
+--echo # RENAME THE TABLE(INPLACE IGNORE)
+--echo # AND CHANGE TABLE CHARSET(CHANGE CREATE)
+
+CREATE TABLE t1(
+       f1 INT NOT NULL,
+       f2 INT NOT NULL)ENGINE=INNODB;
+
+INSERT INTO t1 VALUES(1, 2);
+
+let id_before_alter =`SELECT table_id FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES WHERE name="test/t1"`;
+
+ALTER TABLE t1 RENAME t2, DEFAULT CHARSET=latin1, ALGORITHM=INPLACE;
+
+let id_after_alter =`SELECT table_id FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES WHERE name="test/t2"`;
+
+if ($id_before_alter != $id_after_alter)
+{
+  --echo "Table rebuild happened";
+}
+
+DROP TABLE t2;
index 252f86493a84334f56c66c5fbd94896b0928c01c..91c2a141300de70b5d04f6557f42f0883981afb7 100644 (file)
@@ -198,6 +198,7 @@ let SEARCH_FILE= $MYSQLTEST_VARDIR/log/my_restart.err;
 let $args=--loose-console > $SEARCH_FILE 2>&1;
 
 # Stop the server
+SET GLOBAL innodb_fast_shutdown=0;
 let $restart_file= $MYSQLTEST_VARDIR/tmp/mysqld.1.expect;
 --exec echo "wait" > $restart_file
 --shutdown_server
index 13c37d9c8414663372fd73bbc6b2ac44f70a3663..cfc6f3c3f0a9bd8259c947a575222e920328253e 100644 (file)
@@ -10,10 +10,9 @@ CREATE TEMPORARY TABLE table_54044 ENGINE = INNODB
 SHOW CREATE TABLE table_54044;
 DROP TABLE table_54044;
 
-# These 'create table' operations should fail because of
-# using NULL datatype
+# This 'create table' should pass since it uses a Field_string of size 0.
 
-CREATE TABLE tmp ENGINE = INNODB AS SELECT COALESCE(NULL, NULL, NULL), GREATEST(NULL, NULL), NULL;
+CREATE TABLE tmp ENGINE = INNODB
+ AS SELECT COALESCE(NULL, NULL, NULL), GREATEST(NULL, NULL), NULL;
 SHOW CREATE TABLE tmp;
 DROP TABLE tmp;
-
diff --git a/mysql-wsrep-5.6/mysql-test/suite/innodb/t/innodb_deadlock_with_autoinc-master.opt b/mysql-wsrep-5.6/mysql-test/suite/innodb/t/innodb_deadlock_with_autoinc-master.opt
new file mode 100644 (file)
index 0000000..fad0da2
--- /dev/null
@@ -0,0 +1 @@
+--innodb-autoinc-lock-mode=0
diff --git a/mysql-wsrep-5.6/mysql-test/suite/innodb/t/innodb_deadlock_with_autoinc.test b/mysql-wsrep-5.6/mysql-test/suite/innodb/t/innodb_deadlock_with_autoinc.test
new file mode 100644 (file)
index 0000000..a854c02
--- /dev/null
@@ -0,0 +1,47 @@
+--source include/have_debug.inc
+--source include/have_innodb.inc
+--source include/have_debug_sync.inc
+--source include/count_sessions.inc
+
+--echo #
+--echo # Bug #21983865  UNEXPECTED DEADLOCK WITH INNODB_AUTOINC_LOCK_MODE=0
+--echo #
+
+create table t1(f1 int not null auto_increment primary key) engine=innodb;
+
+--echo # Hold autoinc_lock on table t1 from connection con1
+connect (con1, localhost, root);
+set debug_sync='ib_after_row_insert SIGNAL others WAIT_FOR continue_others';
+--send insert into t1 values(NULL)
+
+connection default;
+--echo # Create 40 connections and make it to wait for autoinc_lock on table t1.
+--disable_query_log
+set debug_sync='now WAIT_FOR others';
+let $1=2;
+while ($1 < 40) {
+ connect (con$1,localhost,root);
+ --send insert into t1 values(NULL)
+ inc $1;
+ connection default;
+}
+
+connect (con40,localhost,root);
+--enable_query_log
+--echo # Release the auto_inc lock on table t1 for connection con1
+set debug_sync='now SIGNAL continue_others';
+
+--echo # Now all 40 connections can finish the insert operation on t1.
+let $1=1;
+connection default;
+disconnect con40;
+while ($1 < 40) {
+ connection con$1;
+ --reap
+ connection default;
+ disconnect con$1;
+ inc $1;
+}
+
+drop table t1;
+--source include/wait_until_count_sessions.inc
diff --git a/mysql-wsrep-5.6/mysql-test/suite/innodb/t/innodb_stats_del_mark-master.opt b/mysql-wsrep-5.6/mysql-test/suite/innodb/t/innodb_stats_del_mark-master.opt
new file mode 100644 (file)
index 0000000..145ee2b
--- /dev/null
@@ -0,0 +1 @@
+--innodb_stats_include_delete_marked=on
diff --git a/mysql-wsrep-5.6/mysql-test/suite/innodb/t/innodb_stats_del_mark.test b/mysql-wsrep-5.6/mysql-test/suite/innodb/t/innodb_stats_del_mark.test
new file mode 100644 (file)
index 0000000..9f0a5c1
--- /dev/null
@@ -0,0 +1,130 @@
+--echo #
+--echo # Bug 23333990  PERSISTENT INDEX STATISTICS UPDATE BEFORE
+--echo #               TRANSACTION IS COMMITTED
+--echo #
+
+--source include/big_test.inc
+--source include/not_valgrind.inc
+
+--echo "Test 1:- Uncommited delete test"
+CREATE TABLE t1 (id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
+                val INT UNSIGNED NOT NULL,
+                INDEX (val)) ENGINE=INNODB
+                STATS_PERSISTENT=1,STATS_AUTO_RECALC=1;
+
+
+INSERT INTO t1 (val) VALUES (4);
+INSERT INTO t1 (val) SELECT VAL from t1;
+INSERT INTO t1 (val) SELECT VAL from t1;
+INSERT INTO t1 (val) SELECT VAL from t1;
+INSERT INTO t1 (val) SELECT VAL from t1;
+INSERT INTO t1 (val) SELECT VAL from t1;
+INSERT INTO t1 (val) SELECT VAL from t1;
+INSERT INTO t1 (val) SELECT VAL from t1;
+INSERT INTO t1 (val) SELECT VAL from t1;
+INSERT INTO t1 (val) SELECT VAL from t1;
+INSERT INTO t1 (val) SELECT VAL from t1;
+INSERT INTO t1 (val) SELECT VAL from t1;
+INSERT INTO t1 (val) SELECT VAL from t1;
+INSERT INTO t1 (val) SELECT VAL from t1;
+INSERT INTO t1 (val) SELECT VAL from t1;
+INSERT INTO t1 (val) SELECT VAL from t1;
+INSERT INTO t1 (val) SELECT VAL from t1;
+INSERT INTO t1 (val) SELECT VAL from t1;
+INSERT INTO t1 (val) SELECT VAL from t1;
+SELECT COUNT(*) FROM t1;
+
+connect(con1, localhost, root,,);
+
+--echo Connection 1
+connection con1;
+START TRANSACTION;
+DELETE FROM t1;
+send SELECT COUNT(*) FROM t1;
+
+--echo Connection Default
+connection default;
+# To make test determinstic in case stats calculation is not
+# triggered we will call analyze table
+analyze table t1;
+let $row_count= query_get_value(EXPLAIN SELECT * FROM t1 WHERE val=4, rows,1);
+if ($row_count > 20000)
+{
+--echo Test correctly estimates the number of rows as > 20000
+--echo even when in other uncommmited transaction
+--echo all rows have been deleted.
+}
+
+if ($row_count < 20000)
+{
+--echo FAIL row count is $row_count
+}
+--echo Connection 1
+connection con1;
+reap;
+commit;
+
+--echo Connection deafult
+connection default;
+
+--echo Test 2:- Insert and rollback test
+CREATE TABLE t2 (id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
+                val INT UNSIGNED NOT NULL,
+                INDEX (val)) ENGINE=INNODB
+                STATS_PERSISTENT=1,STATS_AUTO_RECALC=1;
+
+--echo Connection 1
+connection con1;
+
+START TRANSACTION;
+
+INSERT INTO t2 (val) VALUES (4);
+INSERT INTO t2 (val) SELECT VAL from t2;
+INSERT INTO t2 (val) SELECT VAL from t2;
+INSERT INTO t2 (val) SELECT VAL from t2;
+INSERT INTO t2 (val) SELECT VAL from t2;
+INSERT INTO t2 (val) SELECT VAL from t2;
+INSERT INTO t2 (val) SELECT VAL from t2;
+INSERT INTO t2 (val) SELECT VAL from t2;
+INSERT INTO t2 (val) SELECT VAL from t2;
+INSERT INTO t2 (val) SELECT VAL from t2;
+INSERT INTO t2 (val) SELECT VAL from t2;
+INSERT INTO t2 (val) SELECT VAL from t2;
+INSERT INTO t2 (val) SELECT VAL from t2;
+INSERT INTO t2 (val) SELECT VAL from t2;
+INSERT INTO t2 (val) SELECT VAL from t2;
+INSERT INTO t2 (val) SELECT VAL from t2;
+INSERT INTO t2 (val) SELECT VAL from t2;
+INSERT INTO t2 (val) SELECT VAL from t2;
+INSERT INTO t2 (val) SELECT VAL from t2;
+send SELECT COUNT(*) FROM t2;
+
+--echo Connection default
+connection default;
+select count(*) from t2;
+analyze table t2;
+let $row_count= query_get_value(EXPLAIN SELECT * FROM t2 WHERE val=4, rows,1);
+if ($row_count > 20000)
+{
+--echo Test correctly estimates the number of rows as > 20000
+--echo even when in other uncommited transaction
+--echo many rows are inserted.
+}
+
+--echo Connection 1
+connection con1;
+reap;
+--echo Rollback the insert
+rollback;
+
+--echo Connection default
+connection default;
+let $row_count= query_get_value(EXPLAIN SELECT * FROM t2 WHERE val=4, rows,1);
+if ($row_count <= 1)
+{
+--echo Test correctly estimates the number of rows as $row_count
+--echo after rollback.
+}
+
+disconnect con1;
+DROP TABLE t1,t2;
index 864e0cae862b4f592ec0b64bf963616d7c8d80a0..f54337eec5e56131e0f1fb109ce1f6214a50ee6c 100644 (file)
@@ -385,3 +385,56 @@ set global innodb_monitor_disable = default;
 set global innodb_monitor_reset = default;
 set global innodb_monitor_reset_all = default;
 -- enable_warnings
+
+--echo #
+--echo # Bug#22576241 SETTING INNODB_MONITOR_ENABLE TO ALL DOES NOT ENABLE ALL
+--echo # MONITORS
+--echo #
+CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB;
+
+let $innodb_monitor_enable = `SELECT @@innodb_monitor_enable`;
+
+--replace_regex /[1-9]/NNNN/
+SELECT NAME, COUNT FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
+LIKE 'buffer_page_written_index_leaf';
+
+SET GLOBAL innodb_monitor_enable='module_buffer_page';
+INSERT INTO t1 VALUES (1), (2), (3), (4); FLUSH TABLES t1 FOR EXPORT;
+UNLOCK TABLES;
+--replace_regex /[1-9]/NNNN/
+SELECT NAME, COUNT FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
+LIKE 'buffer_page_written_index_leaf';
+
+SET GLOBAL innodb_monitor_disable='module_buffer_page';
+SET GLOBAL innodb_monitor_reset_all='module_buffer_page';
+--replace_regex /[1-9]/NNNN/
+SELECT NAME, COUNT FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
+LIKE 'buffer_page_written_index_leaf';
+
+SET GLOBAL innodb_monitor_enable='%';
+INSERT INTO t1 VALUES (5), (6), (7), (8); FLUSH TABLES t1 FOR EXPORT;
+UNLOCK TABLES;
+--replace_regex /[1-9]/NNNN/
+SELECT NAME, COUNT FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
+LIKE 'buffer_page_written_index_leaf';
+
+SET GLOBAL innodb_monitor_disable='%';
+SET GLOBAL innodb_monitor_reset_all='%';
+--replace_regex /[1-9]/NNNN/
+SELECT NAME, COUNT FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
+LIKE 'buffer_page_written_index_leaf';
+
+SET GLOBAL innodb_monitor_enable='ALL';
+INSERT INTO t1 VALUES (9), (10), (11), (12); FLUSH TABLES t1 FOR EXPORT;
+UNLOCK TABLES;
+--replace_regex /[1-9]/NNNN/
+SELECT NAME, COUNT FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
+LIKE 'buffer_page_written_index_leaf';
+
+--disable_warnings
+SET GLOBAL innodb_monitor_enable=default;
+SET GLOBAL innodb_monitor_disable=default;
+SET GLOBAL innodb_monitor_reset_all=default;
+--enable_warnings
+
+DROP TABLE t1;
index fe767476fe6b4956834a304d075947cb25ce3ad2..435ef2c8e6ab0c98e8ff8a62445306abd20d8217 100644 (file)
@@ -257,3 +257,31 @@ WHERE MATCH (title,body)
 AGAINST ('"more test proximity"' IN BOOLEAN MODE);
 id     title   body
 drop table articles;
+#
+# Bug #22679185        INVALID INNODB FTS DOC ID DURING INSERT
+#
+create table t1 (f1 int not null primary key, f2 varchar(100),
+FTS_DOC_ID bigint(20) unsigned not null,
+unique key `FTS_DOC_ID_INDEX` (`FTS_DOC_ID`),
+fulltext key (f2))engine=innodb;
+insert into t1 values(1, "This is the first record", 20000);
+insert into t1 values(2, "This is the second record", 40000);
+select FTS_DOC_ID from t1;
+FTS_DOC_ID
+20000
+40000
+drop table t1;
+create table t1 (f1 int not null primary key, f2 varchar(100),
+FTS_DOC_ID bigint(20) unsigned not null auto_increment,
+unique key `FTS_DOC_ID_INDEX` (`FTS_DOC_ID`),
+fulltext key (f2))engine=innodb, auto_increment=100000;
+set auto_increment_increment = 65535;
+insert into t1(f1, f2) values(1, "This is the first record");
+insert into t1(f1, f2) values(2, "This is the second record");
+insert into t1(f1, f2) values(3, "This is the third record");
+select FTS_DOC_ID from t1;
+FTS_DOC_ID
+131071
+196606
+262141
+drop table t1;
index e350d123d8917c2d427ddee3214e52fcbc6b2692..627d3aa50c00b2f89f02db315fb548409406a8af 100644 (file)
@@ -100,3 +100,33 @@ FTS_DOC_ID title
 1      database
 2      mysql
 DROP TABLE t1;
+# Case 4: Test sync commit & rollback in background
+CREATE TABLE t1(
+id INT AUTO_INCREMENT,
+title VARCHAR(100),
+FULLTEXT(title),
+PRIMARY KEY(id)) ENGINE=InnoDB;
+SET SESSION debug="+d,fts_instrument_sync";
+INSERT INTO t1(title) VALUES('mysql');
+SET SESSION debug="-d,fts_instrument_sync";
+SET GLOBAL debug="+d,fts_instrument_sync,fts_instrument_sync_interrupted";
+INSERT INTO t1(title) VALUES('database');
+SET GLOBAL debug="-d,fts_instrument_sync,fts_instrument_sync_interrupted";
+SET SESSION debug="+d,fts_instrument_sync_debug";
+INSERT INTO t1(title) VALUES('good');
+SET SESSION debug="-d,fts_instrument_sync_debug";
+SET GLOBAL innodb_ft_aux_table="test/t1";
+SELECT * FROM INFORMATION_SCHEMA.INNODB_FT_INDEX_TABLE;
+WORD   FIRST_DOC_ID    LAST_DOC_ID     DOC_COUNT       DOC_ID  POSITION
+database       2       2       1       2       0
+good   3       3       1       3       0
+mysql  1       1       1       1       0
+SELECT * FROM INFORMATION_SCHEMA.INNODB_FT_INDEX_CACHE;
+WORD   FIRST_DOC_ID    LAST_DOC_ID     DOC_COUNT       DOC_ID  POSITION
+SET GLOBAL innodb_ft_aux_table=default;
+SELECT * FROM t1 WHERE MATCH(title) AGAINST ('mysql database good');
+id     title
+1      mysql
+2      database
+3      good
+DROP TABLE t1;
index b421b0ab70cd894979a9bcffbb9aacc6d6327e65..af1e089098d867f9f151fe6785b070c370f13548 100644 (file)
@@ -221,3 +221,30 @@ SELECT * FROM articles
        AGAINST ('"more test proximity"' IN BOOLEAN MODE);
 
 drop table articles;
+
+--echo #
+--echo # Bug #22679185 INVALID INNODB FTS DOC ID DURING INSERT
+--echo #
+
+create table t1 (f1 int not null primary key, f2 varchar(100),
+                FTS_DOC_ID bigint(20) unsigned not null,
+                unique key `FTS_DOC_ID_INDEX` (`FTS_DOC_ID`),
+                fulltext key (f2))engine=innodb;
+
+insert into t1 values(1, "This is the first record", 20000);
+insert into t1 values(2, "This is the second record", 40000);
+select FTS_DOC_ID from t1;
+drop table t1;
+
+
+create table t1 (f1 int not null primary key, f2 varchar(100),
+                FTS_DOC_ID bigint(20) unsigned not null auto_increment,
+                unique key `FTS_DOC_ID_INDEX` (`FTS_DOC_ID`),
+                fulltext key (f2))engine=innodb, auto_increment=100000;
+
+set auto_increment_increment = 65535;
+insert into t1(f1, f2) values(1, "This is the first record");
+insert into t1(f1, f2) values(2, "This is the second record");
+insert into t1(f1, f2) values(3, "This is the third record");
+select FTS_DOC_ID from t1;
+drop table t1;
index 5b8d05a7a6f572026f144753926ade4a6c86fd87..9389fd72765c883c0bb8903f3ca4047e8251b4f5 100644 (file)
@@ -107,8 +107,6 @@ DROP TABLE t1;
 --echo # Case 3: Test insert crash recovery
 --let $_expect_file_name=$MYSQLTEST_VARDIR/tmp/mysqld.$_server_id.expect
 
-connect (con1,localhost,root,,);
-
 CREATE TABLE t1 (
         FTS_DOC_ID BIGINT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY,
         title VARCHAR(200),
@@ -139,4 +137,34 @@ SELECT * FROM t1 WHERE MATCH(title) AGAINST ('mysql database');
 
 DROP TABLE t1;
 
+--echo # Case 4: Test sync commit & rollback in background
+CREATE TABLE t1(
+        id INT AUTO_INCREMENT,
+        title VARCHAR(100),
+        FULLTEXT(title),
+        PRIMARY KEY(id)) ENGINE=InnoDB;
+
+SET SESSION debug="+d,fts_instrument_sync";
+INSERT INTO t1(title) VALUES('mysql');
+SET SESSION debug="-d,fts_instrument_sync";
+
+--source include/restart_mysqld.inc
+
+SET GLOBAL debug="+d,fts_instrument_sync,fts_instrument_sync_interrupted";
+INSERT INTO t1(title) VALUES('database');
+SET GLOBAL debug="-d,fts_instrument_sync,fts_instrument_sync_interrupted";
+
+SET SESSION debug="+d,fts_instrument_sync_debug";
+INSERT INTO t1(title) VALUES('good');
+SET SESSION debug="-d,fts_instrument_sync_debug";
+
+SET GLOBAL innodb_ft_aux_table="test/t1";
+SELECT * FROM INFORMATION_SCHEMA.INNODB_FT_INDEX_TABLE;
+SELECT * FROM INFORMATION_SCHEMA.INNODB_FT_INDEX_CACHE;
+SET GLOBAL innodb_ft_aux_table=default;
+
+SELECT * FROM t1 WHERE MATCH(title) AGAINST ('mysql database good');
+
+DROP TABLE t1;
+
 --source include/wait_until_count_sessions.inc
index 9fe571cdee527d6460844ba1b6bb9497993a62fb..dc8e4db5163f9076f35228845bafa2300c272763 100644 (file)
@@ -335,3 +335,34 @@ WHERE
 HAVING  alias1.col_int_nokey  IN ( SELECT 2 FROM DUAL ) ;
 
 DROP TABLE t1,t2,t3,t4;
+
+--echo #
+--echo # Bug #23259872: OPTIMIZER CHOOSES TO USE NON PRIMARY
+--echo #                INDEX, EVEN THOUGH COST IS HIGHER
+--echo #
+
+CREATE TABLE t1 (
+  a TINYTEXT NOT NULL,
+  b TINYINT(3) UNSIGNED NOT NULL,
+  PRIMARY KEY (a(32),b),
+  KEY b_idx(b)
+) ENGINE=INNODB;
+INSERT INTO t1 VALUES ('a',1),('a',2),('a',3),('b',1),('b',4),('c',1),('d',1),
+                      ('c',4),('d',3),('e',2),('f',2);
+
+SET @optimizer_switch_saved=@@session.optimizer_switch;
+SET @@session.optimizer_switch=default;
+SET optimizer_trace="enabled=on";
+
+# Uses "access_type_changed" to use range over ref despite b_idx not being the
+# cheapest in range.
+EXPLAIN SELECT * FROM t1 WHERE a IN ('a', 'b') AND b = 2;
+
+# Output of table_scan in test_quick_select is not always reliable.
+--replace_regex /"rows": 12/"rows": 11/ /"cost": 5.5/"cost": 5.3/
+SELECT * FROM INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+
+SET optimizer_trace="enabled=off";
+SET @@session.optimizer_switch=@optimizer_switch_saved;
+
+DROP TABLE t1;
index f2f9af7ddce901e70185a819c7a487b6d0c2a062..08da7b99a674781734cc7bb79a3f5e47709371d0 100644 (file)
@@ -2435,3 +2435,311 @@ AND alias1.col_int_key = alias2.pk
 HAVING  alias1.col_int_nokey  IN ( SELECT 2 FROM DUAL ) ;
 field1 field2  field3  field4
 DROP TABLE t1,t2,t3,t4;
+#
+# Bug #23259872: OPTIMIZER CHOOSES TO USE NON PRIMARY
+#                INDEX, EVEN THOUGH COST IS HIGHER
+#
+CREATE TABLE t1 (
+a TINYTEXT NOT NULL,
+b TINYINT(3) UNSIGNED NOT NULL,
+PRIMARY KEY (a(32),b),
+KEY b_idx(b)
+) ENGINE=INNODB;
+INSERT INTO t1 VALUES ('a',1),('a',2),('a',3),('b',1),('b',4),('c',1),('d',1),
+('c',4),('d',3),('e',2),('f',2);
+SET @optimizer_switch_saved=@@session.optimizer_switch;
+SET @@session.optimizer_switch=default;
+SET optimizer_trace="enabled=on";
+EXPLAIN SELECT * FROM t1 WHERE a IN ('a', 'b') AND b = 2;
+id     select_type     table   type    possible_keys   key     key_len ref     rows    Extra
+1      SIMPLE  t1      range   PRIMARY,b_idx   b_idx   35      NULL    2       Using index condition; Using where
+SELECT * FROM INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+QUERY  TRACE   MISSING_BYTES_BEYOND_MAX_MEM_SIZE       INSUFFICIENT_PRIVILEGES
+EXPLAIN SELECT * FROM t1 WHERE a IN ('a', 'b') AND b = 2       {
+  "steps": [
+    {
+      "join_preparation": {
+        "select#": 1,
+        "steps": [
+          {
+            "expanded_query": "/* select#1 */ select `t1`.`a` AS `a`,`t1`.`b` AS `b` from `t1` where ((`t1`.`a` in ('a','b')) and (`t1`.`b` = 2))"
+          }
+        ] /* steps */
+      } /* join_preparation */
+    },
+    {
+      "join_optimization": {
+        "select#": 1,
+        "steps": [
+          {
+            "condition_processing": {
+              "condition": "WHERE",
+              "original_condition": "((`t1`.`a` in ('a','b')) and (`t1`.`b` = 2))",
+              "steps": [
+                {
+                  "transformation": "equality_propagation",
+                  "resulting_condition": "((`t1`.`a` in ('a','b')) and multiple equal(2, `t1`.`b`))"
+                },
+                {
+                  "transformation": "constant_propagation",
+                  "resulting_condition": "((`t1`.`a` in ('a','b')) and multiple equal(2, `t1`.`b`))"
+                },
+                {
+                  "transformation": "trivial_condition_removal",
+                  "resulting_condition": "((`t1`.`a` in ('a','b')) and multiple equal(2, `t1`.`b`))"
+                }
+              ] /* steps */
+            } /* condition_processing */
+          },
+          {
+            "table_dependencies": [
+              {
+                "table": "`t1`",
+                "row_may_be_null": false,
+                "map_bit": 0,
+                "depends_on_map_bits": [
+                ] /* depends_on_map_bits */
+              }
+            ] /* table_dependencies */
+          },
+          {
+            "ref_optimizer_key_uses": [
+              {
+                "table": "`t1`",
+                "field": "b",
+                "equals": "2",
+                "null_rejecting": false
+              }
+            ] /* ref_optimizer_key_uses */
+          },
+          {
+            "rows_estimation": [
+              {
+                "table": "`t1`",
+                "range_analysis": {
+                  "table_scan": {
+                    "rows": 11,
+                    "cost": 5.3
+                  } /* table_scan */,
+                  "potential_range_indices": [
+                    {
+                      "index": "PRIMARY",
+                      "usable": true,
+                      "key_parts": [
+                        "a",
+                        "b"
+                      ] /* key_parts */
+                    },
+                    {
+                      "index": "b_idx",
+                      "usable": true,
+                      "key_parts": [
+                        "b",
+                        "a"
+                      ] /* key_parts */
+                    }
+                  ] /* potential_range_indices */,
+                  "setup_range_conditions": [
+                  ] /* setup_range_conditions */,
+                  "group_index_range": {
+                    "chosen": false,
+                    "cause": "not_group_by_or_distinct"
+                  } /* group_index_range */,
+                  "analyzing_range_alternatives": {
+                    "range_scan_alternatives": [
+                      {
+                        "index": "PRIMARY",
+                        "ranges": [
+                          "unprintable_blob_value <= a <= unprintable_blob_value AND 2 <= b <= 2",
+                          "unprintable_blob_value <= a <= unprintable_blob_value AND 2 <= b <= 2"
+                        ] /* ranges */,
+                        "index_dives_for_eq_ranges": true,
+                        "rowid_ordered": true,
+                        "using_mrr": false,
+                        "index_only": false,
+                        "rows": 2,
+                        "cost": 2.41,
+                        "chosen": true
+                      },
+                      {
+                        "index": "b_idx",
+                        "ranges": [
+                          "2 <= b <= 2 AND unprintable_blob_value <= a <= unprintable_blob_value",
+                          "2 <= b <= 2 AND unprintable_blob_value <= a <= unprintable_blob_value"
+                        ] /* ranges */,
+                        "index_dives_for_eq_ranges": true,
+                        "rowid_ordered": false,
+                        "using_mrr": false,
+                        "index_only": false,
+                        "rows": 2,
+                        "cost": 4.41,
+                        "chosen": false,
+                        "cause": "cost"
+                      }
+                    ] /* range_scan_alternatives */,
+                    "analyzing_roworder_intersect": {
+                      "usable": false,
+                      "cause": "too_few_roworder_scans"
+                    } /* analyzing_roworder_intersect */
+                  } /* analyzing_range_alternatives */,
+                  "chosen_range_access_summary": {
+                    "range_access_plan": {
+                      "type": "range_scan",
+                      "index": "PRIMARY",
+                      "rows": 2,
+                      "ranges": [
+                        "unprintable_blob_value <= a <= unprintable_blob_value AND 2 <= b <= 2",
+                        "unprintable_blob_value <= a <= unprintable_blob_value AND 2 <= b <= 2"
+                      ] /* ranges */
+                    } /* range_access_plan */,
+                    "rows_for_plan": 2,
+                    "cost_for_plan": 2.41,
+                    "chosen": true
+                  } /* chosen_range_access_summary */
+                } /* range_analysis */
+              }
+            ] /* rows_estimation */
+          },
+          {
+            "considered_execution_plans": [
+              {
+                "plan_prefix": [
+                ] /* plan_prefix */,
+                "table": "`t1`",
+                "best_access_path": {
+                  "considered_access_paths": [
+                    {
+                      "access_type": "ref",
+                      "index": "b_idx",
+                      "rows": 2,
+                      "cost": 2.4,
+                      "chosen": true
+                    },
+                    {
+                      "access_type": "range",
+                      "rows": 2,
+                      "cost": 2.81,
+                      "chosen": false
+                    }
+                  ] /* considered_access_paths */
+                } /* best_access_path */,
+                "cost_for_plan": 2.4,
+                "rows_for_plan": 2,
+                "chosen": true
+              }
+            ] /* considered_execution_plans */
+          },
+          {
+            "attaching_conditions_to_tables": {
+              "original_condition": "((`t1`.`b` = 2) and (`t1`.`a` in ('a','b')))",
+              "attached_conditions_computation": [
+                {
+                  "rerunning_range_optimizer_for_single_index": [
+                    {
+                      "table_scan": {
+                        "rows": 11,
+                        "cost": 5.3
+                      } /* table_scan */,
+                      "potential_range_indices": [
+                        {
+                          "index": "PRIMARY",
+                          "usable": false,
+                          "cause": "not_applicable"
+                        },
+                        {
+                          "index": "b_idx",
+                          "usable": true,
+                          "key_parts": [
+                            "b",
+                            "a"
+                          ] /* key_parts */
+                        }
+                      ] /* potential_range_indices */,
+                      "setup_range_conditions": [
+                      ] /* setup_range_conditions */,
+                      "group_index_range": {
+                        "chosen": false,
+                        "cause": "not_group_by_or_distinct"
+                      } /* group_index_range */,
+                      "analyzing_range_alternatives": {
+                        "range_scan_alternatives": [
+                          {
+                            "index": "b_idx",
+                            "ranges": [
+                              "2 <= b <= 2 AND unprintable_blob_value <= a <= unprintable_blob_value",
+                              "2 <= b <= 2 AND unprintable_blob_value <= a <= unprintable_blob_value"
+                            ] /* ranges */,
+                            "index_dives_for_eq_ranges": true,
+                            "rowid_ordered": false,
+                            "using_mrr": false,
+                            "index_only": false,
+                            "rows": 2,
+                            "cost": 4.41,
+                            "chosen": true
+                          }
+                        ] /* range_scan_alternatives */,
+                        "analyzing_roworder_intersect": {
+                          "usable": false,
+                          "cause": "too_few_roworder_scans"
+                        } /* analyzing_roworder_intersect */
+                      } /* analyzing_range_alternatives */,
+                      "chosen_range_access_summary": {
+                        "range_access_plan": {
+                          "type": "range_scan",
+                          "index": "b_idx",
+                          "rows": 2,
+                          "ranges": [
+                            "2 <= b <= 2 AND unprintable_blob_value <= a <= unprintable_blob_value",
+                            "2 <= b <= 2 AND unprintable_blob_value <= a <= unprintable_blob_value"
+                          ] /* ranges */
+                        } /* range_access_plan */,
+                        "rows_for_plan": 2,
+                        "cost_for_plan": 4.41,
+                        "chosen": true
+                      } /* chosen_range_access_summary */
+                    } /* range_analysis */
+                  ] /* rerunning_range_optimizer_for_single_index */
+                },
+                {
+                  "access_type_changed": {
+                    "table": "`t1`",
+                    "index": "b_idx",
+                    "old_type": "ref",
+                    "new_type": "range",
+                    "cause": "uses_more_keyparts"
+                  } /* access_type_changed */
+                }
+              ] /* attached_conditions_computation */,
+              "attached_conditions_summary": [
+                {
+                  "table": "`t1`",
+                  "attached": "((`t1`.`b` = 2) and (`t1`.`a` in ('a','b')))"
+                }
+              ] /* attached_conditions_summary */
+            } /* attaching_conditions_to_tables */
+          },
+          {
+            "refine_plan": [
+              {
+                "table": "`t1`",
+                "pushed_index_condition": "(`t1`.`b` = 2)",
+                "table_condition_attached": "(`t1`.`a` in ('a','b'))",
+                "access_type": "range"
+              }
+            ] /* refine_plan */
+          }
+        ] /* steps */
+      } /* join_optimization */
+    },
+    {
+      "join_explain": {
+        "select#": 1,
+        "steps": [
+        ] /* steps */
+      } /* join_explain */
+    }
+  ] /* steps */
+}      0       0
+SET optimizer_trace="enabled=off";
+SET @@session.optimizer_switch=@optimizer_switch_saved;
+DROP TABLE t1;
index 19f93e641db6b4cf78f71bc0eafa34bafab22051..1143d39622f9f69be246f29358b7d16ec1818d2c 100644 (file)
@@ -1895,3 +1895,311 @@ AND alias1.col_int_key = alias2.pk
 HAVING  alias1.col_int_nokey  IN ( SELECT 2 FROM DUAL ) ;
 field1 field2  field3  field4
 DROP TABLE t1,t2,t3,t4;
+#
+# Bug #23259872: OPTIMIZER CHOOSES TO USE NON PRIMARY
+#                INDEX, EVEN THOUGH COST IS HIGHER
+#
+CREATE TABLE t1 (
+a TINYTEXT NOT NULL,
+b TINYINT(3) UNSIGNED NOT NULL,
+PRIMARY KEY (a(32),b),
+KEY b_idx(b)
+) ENGINE=INNODB;
+INSERT INTO t1 VALUES ('a',1),('a',2),('a',3),('b',1),('b',4),('c',1),('d',1),
+('c',4),('d',3),('e',2),('f',2);
+SET @optimizer_switch_saved=@@session.optimizer_switch;
+SET @@session.optimizer_switch=default;
+SET optimizer_trace="enabled=on";
+EXPLAIN SELECT * FROM t1 WHERE a IN ('a', 'b') AND b = 2;
+id     select_type     table   type    possible_keys   key     key_len ref     rows    Extra
+1      SIMPLE  t1      range   PRIMARY,b_idx   b_idx   35      NULL    2       Using index condition; Using where
+SELECT * FROM INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+QUERY  TRACE   MISSING_BYTES_BEYOND_MAX_MEM_SIZE       INSUFFICIENT_PRIVILEGES
+EXPLAIN SELECT * FROM t1 WHERE a IN ('a', 'b') AND b = 2       {
+  "steps": [
+    {
+      "join_preparation": {
+        "select#": 1,
+        "steps": [
+          {
+            "expanded_query": "/* select#1 */ select `t1`.`a` AS `a`,`t1`.`b` AS `b` from `t1` where ((`t1`.`a` in ('a','b')) and (`t1`.`b` = 2))"
+          }
+        ] /* steps */
+      } /* join_preparation */
+    },
+    {
+      "join_optimization": {
+        "select#": 1,
+        "steps": [
+          {
+            "condition_processing": {
+              "condition": "WHERE",
+              "original_condition": "((`t1`.`a` in ('a','b')) and (`t1`.`b` = 2))",
+              "steps": [
+                {
+                  "transformation": "equality_propagation",
+                  "resulting_condition": "((`t1`.`a` in ('a','b')) and multiple equal(2, `t1`.`b`))"
+                },
+                {
+                  "transformation": "constant_propagation",
+                  "resulting_condition": "((`t1`.`a` in ('a','b')) and multiple equal(2, `t1`.`b`))"
+                },
+                {
+                  "transformation": "trivial_condition_removal",
+                  "resulting_condition": "((`t1`.`a` in ('a','b')) and multiple equal(2, `t1`.`b`))"
+                }
+              ] /* steps */
+            } /* condition_processing */
+          },
+          {
+            "table_dependencies": [
+              {
+                "table": "`t1`",
+                "row_may_be_null": false,
+                "map_bit": 0,
+                "depends_on_map_bits": [
+                ] /* depends_on_map_bits */
+              }
+            ] /* table_dependencies */
+          },
+          {
+            "ref_optimizer_key_uses": [
+              {
+                "table": "`t1`",
+                "field": "b",
+                "equals": "2",
+                "null_rejecting": false
+              }
+            ] /* ref_optimizer_key_uses */
+          },
+          {
+            "rows_estimation": [
+              {
+                "table": "`t1`",
+                "range_analysis": {
+                  "table_scan": {
+                    "rows": 11,
+                    "cost": 5.3
+                  } /* table_scan */,
+                  "potential_range_indices": [
+                    {
+                      "index": "PRIMARY",
+                      "usable": true,
+                      "key_parts": [
+                        "a",
+                        "b"
+                      ] /* key_parts */
+                    },
+                    {
+                      "index": "b_idx",
+                      "usable": true,
+                      "key_parts": [
+                        "b",
+                        "a"
+                      ] /* key_parts */
+                    }
+                  ] /* potential_range_indices */,
+                  "setup_range_conditions": [
+                  ] /* setup_range_conditions */,
+                  "group_index_range": {
+                    "chosen": false,
+                    "cause": "not_group_by_or_distinct"
+                  } /* group_index_range */,
+                  "analyzing_range_alternatives": {
+                    "range_scan_alternatives": [
+                      {
+                        "index": "PRIMARY",
+                        "ranges": [
+                          "unprintable_blob_value <= a <= unprintable_blob_value AND 2 <= b <= 2",
+                          "unprintable_blob_value <= a <= unprintable_blob_value AND 2 <= b <= 2"
+                        ] /* ranges */,
+                        "index_dives_for_eq_ranges": true,
+                        "rowid_ordered": true,
+                        "using_mrr": false,
+                        "index_only": false,
+                        "rows": 2,
+                        "cost": 2.41,
+                        "chosen": true
+                      },
+                      {
+                        "index": "b_idx",
+                        "ranges": [
+                          "2 <= b <= 2 AND unprintable_blob_value <= a <= unprintable_blob_value",
+                          "2 <= b <= 2 AND unprintable_blob_value <= a <= unprintable_blob_value"
+                        ] /* ranges */,
+                        "index_dives_for_eq_ranges": true,
+                        "rowid_ordered": false,
+                        "using_mrr": false,
+                        "index_only": false,
+                        "rows": 2,
+                        "cost": 4.41,
+                        "chosen": false,
+                        "cause": "cost"
+                      }
+                    ] /* range_scan_alternatives */,
+                    "analyzing_roworder_intersect": {
+                      "usable": false,
+                      "cause": "too_few_roworder_scans"
+                    } /* analyzing_roworder_intersect */
+                  } /* analyzing_range_alternatives */,
+                  "chosen_range_access_summary": {
+                    "range_access_plan": {
+                      "type": "range_scan",
+                      "index": "PRIMARY",
+                      "rows": 2,
+                      "ranges": [
+                        "unprintable_blob_value <= a <= unprintable_blob_value AND 2 <= b <= 2",
+                        "unprintable_blob_value <= a <= unprintable_blob_value AND 2 <= b <= 2"
+                      ] /* ranges */
+                    } /* range_access_plan */,
+                    "rows_for_plan": 2,
+                    "cost_for_plan": 2.41,
+                    "chosen": true
+                  } /* chosen_range_access_summary */
+                } /* range_analysis */
+              }
+            ] /* rows_estimation */
+          },
+          {
+            "considered_execution_plans": [
+              {
+                "plan_prefix": [
+                ] /* plan_prefix */,
+                "table": "`t1`",
+                "best_access_path": {
+                  "considered_access_paths": [
+                    {
+                      "access_type": "ref",
+                      "index": "b_idx",
+                      "rows": 2,
+                      "cost": 2.4,
+                      "chosen": true
+                    },
+                    {
+                      "access_type": "range",
+                      "rows": 2,
+                      "cost": 2.81,
+                      "chosen": false
+                    }
+                  ] /* considered_access_paths */
+                } /* best_access_path */,
+                "cost_for_plan": 2.4,
+                "rows_for_plan": 2,
+                "chosen": true
+              }
+            ] /* considered_execution_plans */
+          },
+          {
+            "attaching_conditions_to_tables": {
+              "original_condition": "((`t1`.`b` = 2) and (`t1`.`a` in ('a','b')))",
+              "attached_conditions_computation": [
+                {
+                  "rerunning_range_optimizer_for_single_index": [
+                    {
+                      "table_scan": {
+                        "rows": 11,
+                        "cost": 5.3
+                      } /* table_scan */,
+                      "potential_range_indices": [
+                        {
+                          "index": "PRIMARY",
+                          "usable": false,
+                          "cause": "not_applicable"
+                        },
+                        {
+                          "index": "b_idx",
+                          "usable": true,
+                          "key_parts": [
+                            "b",
+                            "a"
+                          ] /* key_parts */
+                        }
+                      ] /* potential_range_indices */,
+                      "setup_range_conditions": [
+                      ] /* setup_range_conditions */,
+                      "group_index_range": {
+                        "chosen": false,
+                        "cause": "not_group_by_or_distinct"
+                      } /* group_index_range */,
+                      "analyzing_range_alternatives": {
+                        "range_scan_alternatives": [
+                          {
+                            "index": "b_idx",
+                            "ranges": [
+                              "2 <= b <= 2 AND unprintable_blob_value <= a <= unprintable_blob_value",
+                              "2 <= b <= 2 AND unprintable_blob_value <= a <= unprintable_blob_value"
+                            ] /* ranges */,
+                            "index_dives_for_eq_ranges": true,
+                            "rowid_ordered": false,
+                            "using_mrr": false,
+                            "index_only": false,
+                            "rows": 2,
+                            "cost": 4.41,
+                            "chosen": true
+                          }
+                        ] /* range_scan_alternatives */,
+                        "analyzing_roworder_intersect": {
+                          "usable": false,
+                          "cause": "too_few_roworder_scans"
+                        } /* analyzing_roworder_intersect */
+                      } /* analyzing_range_alternatives */,
+                      "chosen_range_access_summary": {
+                        "range_access_plan": {
+                          "type": "range_scan",
+                          "index": "b_idx",
+                          "rows": 2,
+                          "ranges": [
+                            "2 <= b <= 2 AND unprintable_blob_value <= a <= unprintable_blob_value",
+                            "2 <= b <= 2 AND unprintable_blob_value <= a <= unprintable_blob_value"
+                          ] /* ranges */
+                        } /* range_access_plan */,
+                        "rows_for_plan": 2,
+                        "cost_for_plan": 4.41,
+                        "chosen": true
+                      } /* chosen_range_access_summary */
+                    } /* range_analysis */
+                  ] /* rerunning_range_optimizer_for_single_index */
+                },
+                {
+                  "access_type_changed": {
+                    "table": "`t1`",
+                    "index": "b_idx",
+                    "old_type": "ref",
+                    "new_type": "range",
+                    "cause": "uses_more_keyparts"
+                  } /* access_type_changed */
+                }
+              ] /* attached_conditions_computation */,
+              "attached_conditions_summary": [
+                {
+                  "table": "`t1`",
+                  "attached": "((`t1`.`b` = 2) and (`t1`.`a` in ('a','b')))"
+                }
+              ] /* attached_conditions_summary */
+            } /* attaching_conditions_to_tables */
+          },
+          {
+            "refine_plan": [
+              {
+                "table": "`t1`",
+                "pushed_index_condition": "(`t1`.`b` = 2)",
+                "table_condition_attached": "(`t1`.`a` in ('a','b'))",
+                "access_type": "range"
+              }
+            ] /* refine_plan */
+          }
+        ] /* steps */
+      } /* join_optimization */
+    },
+    {
+      "join_explain": {
+        "select#": 1,
+        "steps": [
+        ] /* steps */
+      } /* join_explain */
+    }
+  ] /* steps */
+}      0       0
+SET optimizer_trace="enabled=off";
+SET @@session.optimizer_switch=@optimizer_switch_saved;
+DROP TABLE t1;
index f2f9af7ddce901e70185a819c7a487b6d0c2a062..08da7b99a674781734cc7bb79a3f5e47709371d0 100644 (file)
@@ -2435,3 +2435,311 @@ AND alias1.col_int_key = alias2.pk
 HAVING  alias1.col_int_nokey  IN ( SELECT 2 FROM DUAL ) ;
 field1 field2  field3  field4
 DROP TABLE t1,t2,t3,t4;
+#
+# Bug #23259872: OPTIMIZER CHOOSES TO USE NON PRIMARY
+#                INDEX, EVEN THOUGH COST IS HIGHER
+#
+CREATE TABLE t1 (
+a TINYTEXT NOT NULL,
+b TINYINT(3) UNSIGNED NOT NULL,
+PRIMARY KEY (a(32),b),
+KEY b_idx(b)
+) ENGINE=INNODB;
+INSERT INTO t1 VALUES ('a',1),('a',2),('a',3),('b',1),('b',4),('c',1),('d',1),
+('c',4),('d',3),('e',2),('f',2);
+SET @optimizer_switch_saved=@@session.optimizer_switch;
+SET @@session.optimizer_switch=default;
+SET optimizer_trace="enabled=on";
+EXPLAIN SELECT * FROM t1 WHERE a IN ('a', 'b') AND b = 2;
+id     select_type     table   type    possible_keys   key     key_len ref     rows    Extra
+1      SIMPLE  t1      range   PRIMARY,b_idx   b_idx   35      NULL    2       Using index condition; Using where
+SELECT * FROM INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+QUERY  TRACE   MISSING_BYTES_BEYOND_MAX_MEM_SIZE       INSUFFICIENT_PRIVILEGES
+EXPLAIN SELECT * FROM t1 WHERE a IN ('a', 'b') AND b = 2       {
+  "steps": [
+    {
+      "join_preparation": {
+        "select#": 1,
+        "steps": [
+          {
+            "expanded_query": "/* select#1 */ select `t1`.`a` AS `a`,`t1`.`b` AS `b` from `t1` where ((`t1`.`a` in ('a','b')) and (`t1`.`b` = 2))"
+          }
+        ] /* steps */
+      } /* join_preparation */
+    },
+    {
+      "join_optimization": {
+        "select#": 1,
+        "steps": [
+          {
+            "condition_processing": {
+              "condition": "WHERE",
+              "original_condition": "((`t1`.`a` in ('a','b')) and (`t1`.`b` = 2))",
+              "steps": [
+                {
+                  "transformation": "equality_propagation",
+                  "resulting_condition": "((`t1`.`a` in ('a','b')) and multiple equal(2, `t1`.`b`))"
+                },
+                {
+                  "transformation": "constant_propagation",
+                  "resulting_condition": "((`t1`.`a` in ('a','b')) and multiple equal(2, `t1`.`b`))"
+                },
+                {
+                  "transformation": "trivial_condition_removal",
+                  "resulting_condition": "((`t1`.`a` in ('a','b')) and multiple equal(2, `t1`.`b`))"
+                }
+              ] /* steps */
+            } /* condition_processing */
+          },
+          {
+            "table_dependencies": [
+              {
+                "table": "`t1`",
+                "row_may_be_null": false,
+                "map_bit": 0,
+                "depends_on_map_bits": [
+                ] /* depends_on_map_bits */
+              }
+            ] /* table_dependencies */
+          },
+          {
+            "ref_optimizer_key_uses": [
+              {
+                "table": "`t1`",
+                "field": "b",
+                "equals": "2",
+                "null_rejecting": false
+              }
+            ] /* ref_optimizer_key_uses */
+          },
+          {
+            "rows_estimation": [
+              {
+                "table": "`t1`",
+                "range_analysis": {
+                  "table_scan": {
+                    "rows": 11,
+                    "cost": 5.3
+                  } /* table_scan */,
+                  "potential_range_indices": [
+                    {
+                      "index": "PRIMARY",
+                      "usable": true,
+                      "key_parts": [
+                        "a",
+                        "b"
+                      ] /* key_parts */
+                    },
+                    {
+                      "index": "b_idx",
+                      "usable": true,
+                      "key_parts": [
+                        "b",
+                        "a"
+                      ] /* key_parts */
+                    }
+                  ] /* potential_range_indices */,
+                  "setup_range_conditions": [
+                  ] /* setup_range_conditions */,
+                  "group_index_range": {
+                    "chosen": false,
+                    "cause": "not_group_by_or_distinct"
+                  } /* group_index_range */,
+                  "analyzing_range_alternatives": {
+                    "range_scan_alternatives": [
+                      {
+                        "index": "PRIMARY",
+                        "ranges": [
+                          "unprintable_blob_value <= a <= unprintable_blob_value AND 2 <= b <= 2",
+                          "unprintable_blob_value <= a <= unprintable_blob_value AND 2 <= b <= 2"
+                        ] /* ranges */,
+                        "index_dives_for_eq_ranges": true,
+                        "rowid_ordered": true,
+                        "using_mrr": false,
+                        "index_only": false,
+                        "rows": 2,
+                        "cost": 2.41,
+                        "chosen": true
+                      },
+                      {
+                        "index": "b_idx",
+                        "ranges": [
+                          "2 <= b <= 2 AND unprintable_blob_value <= a <= unprintable_blob_value",
+                          "2 <= b <= 2 AND unprintable_blob_value <= a <= unprintable_blob_value"
+                        ] /* ranges */,
+                        "index_dives_for_eq_ranges": true,
+                        "rowid_ordered": false,
+                        "using_mrr": false,
+                        "index_only": false,
+                        "rows": 2,
+                        "cost": 4.41,
+                        "chosen": false,
+                        "cause": "cost"
+                      }
+                    ] /* range_scan_alternatives */,
+                    "analyzing_roworder_intersect": {
+                      "usable": false,
+                      "cause": "too_few_roworder_scans"
+                    } /* analyzing_roworder_intersect */
+                  } /* analyzing_range_alternatives */,
+                  "chosen_range_access_summary": {
+                    "range_access_plan": {
+                      "type": "range_scan",
+                      "index": "PRIMARY",
+                      "rows": 2,
+                      "ranges": [
+                        "unprintable_blob_value <= a <= unprintable_blob_value AND 2 <= b <= 2",
+                        "unprintable_blob_value <= a <= unprintable_blob_value AND 2 <= b <= 2"
+                      ] /* ranges */
+                    } /* range_access_plan */,
+                    "rows_for_plan": 2,
+                    "cost_for_plan": 2.41,
+                    "chosen": true
+                  } /* chosen_range_access_summary */
+                } /* range_analysis */
+              }
+            ] /* rows_estimation */
+          },
+          {
+            "considered_execution_plans": [
+              {
+                "plan_prefix": [
+                ] /* plan_prefix */,
+                "table": "`t1`",
+                "best_access_path": {
+                  "considered_access_paths": [
+                    {
+                      "access_type": "ref",
+                      "index": "b_idx",
+                      "rows": 2,
+                      "cost": 2.4,
+                      "chosen": true
+                    },
+                    {
+                      "access_type": "range",
+                      "rows": 2,
+                      "cost": 2.81,
+                      "chosen": false
+                    }
+                  ] /* considered_access_paths */
+                } /* best_access_path */,
+                "cost_for_plan": 2.4,
+                "rows_for_plan": 2,
+                "chosen": true
+              }
+            ] /* considered_execution_plans */
+          },
+          {
+            "attaching_conditions_to_tables": {
+              "original_condition": "((`t1`.`b` = 2) and (`t1`.`a` in ('a','b')))",
+              "attached_conditions_computation": [
+                {
+                  "rerunning_range_optimizer_for_single_index": [
+                    {
+                      "table_scan": {
+                        "rows": 11,
+                        "cost": 5.3
+                      } /* table_scan */,
+                      "potential_range_indices": [
+                        {
+                          "index": "PRIMARY",
+                          "usable": false,
+                          "cause": "not_applicable"
+                        },
+                        {
+                          "index": "b_idx",
+                          "usable": true,
+                          "key_parts": [
+                            "b",
+                            "a"
+                          ] /* key_parts */
+                        }
+                      ] /* potential_range_indices */,
+                      "setup_range_conditions": [
+                      ] /* setup_range_conditions */,
+                      "group_index_range": {
+                        "chosen": false,
+                        "cause": "not_group_by_or_distinct"
+                      } /* group_index_range */,
+                      "analyzing_range_alternatives": {
+                        "range_scan_alternatives": [
+                          {
+                            "index": "b_idx",
+                            "ranges": [
+                              "2 <= b <= 2 AND unprintable_blob_value <= a <= unprintable_blob_value",
+                              "2 <= b <= 2 AND unprintable_blob_value <= a <= unprintable_blob_value"
+                            ] /* ranges */,
+                            "index_dives_for_eq_ranges": true,
+                            "rowid_ordered": false,
+                            "using_mrr": false,
+                            "index_only": false,
+                            "rows": 2,
+                            "cost": 4.41,
+                            "chosen": true
+                          }
+                        ] /* range_scan_alternatives */,
+                        "analyzing_roworder_intersect": {
+                          "usable": false,
+                          "cause": "too_few_roworder_scans"
+                        } /* analyzing_roworder_intersect */
+                      } /* analyzing_range_alternatives */,
+                      "chosen_range_access_summary": {
+                        "range_access_plan": {
+                          "type": "range_scan",
+                          "index": "b_idx",
+                          "rows": 2,
+                          "ranges": [
+                            "2 <= b <= 2 AND unprintable_blob_value <= a <= unprintable_blob_value",
+                            "2 <= b <= 2 AND unprintable_blob_value <= a <= unprintable_blob_value"
+                          ] /* ranges */
+                        } /* range_access_plan */,
+                        "rows_for_plan": 2,
+                        "cost_for_plan": 4.41,
+                        "chosen": true
+                      } /* chosen_range_access_summary */
+                    } /* range_analysis */
+                  ] /* rerunning_range_optimizer_for_single_index */
+                },
+                {
+                  "access_type_changed": {
+                    "table": "`t1`",
+                    "index": "b_idx",
+                    "old_type": "ref",
+                    "new_type": "range",
+                    "cause": "uses_more_keyparts"
+                  } /* access_type_changed */
+                }
+              ] /* attached_conditions_computation */,
+              "attached_conditions_summary": [
+                {
+                  "table": "`t1`",
+                  "attached": "((`t1`.`b` = 2) and (`t1`.`a` in ('a','b')))"
+                }
+              ] /* attached_conditions_summary */
+            } /* attaching_conditions_to_tables */
+          },
+          {
+            "refine_plan": [
+              {
+                "table": "`t1`",
+                "pushed_index_condition": "(`t1`.`b` = 2)",
+                "table_condition_attached": "(`t1`.`a` in ('a','b'))",
+                "access_type": "range"
+              }
+            ] /* refine_plan */
+          }
+        ] /* steps */
+      } /* join_optimization */
+    },
+    {
+      "join_explain": {
+        "select#": 1,
+        "steps": [
+        ] /* steps */
+      } /* join_explain */
+    }
+  ] /* steps */
+}      0       0
+SET optimizer_trace="enabled=off";
+SET @@session.optimizer_switch=@optimizer_switch_saved;
+DROP TABLE t1;
index ef8b165d0b5bb3248766396ef9e9b7422896eb90..e0f1e562ae3cdc66ea596c3a965f60eb26146672 100644 (file)
@@ -1859,3 +1859,311 @@ AND alias1.col_int_key = alias2.pk
 HAVING  alias1.col_int_nokey  IN ( SELECT 2 FROM DUAL ) ;
 field1 field2  field3  field4
 DROP TABLE t1,t2,t3,t4;
+#
+# Bug #23259872: OPTIMIZER CHOOSES TO USE NON PRIMARY
+#                INDEX, EVEN THOUGH COST IS HIGHER
+#
+CREATE TABLE t1 (
+a TINYTEXT NOT NULL,
+b TINYINT(3) UNSIGNED NOT NULL,
+PRIMARY KEY (a(32),b),
+KEY b_idx(b)
+) ENGINE=INNODB;
+INSERT INTO t1 VALUES ('a',1),('a',2),('a',3),('b',1),('b',4),('c',1),('d',1),
+('c',4),('d',3),('e',2),('f',2);
+SET @optimizer_switch_saved=@@session.optimizer_switch;
+SET @@session.optimizer_switch=default;
+SET optimizer_trace="enabled=on";
+EXPLAIN SELECT * FROM t1 WHERE a IN ('a', 'b') AND b = 2;
+id     select_type     table   type    possible_keys   key     key_len ref     rows    Extra
+1      SIMPLE  t1      range   PRIMARY,b_idx   b_idx   35      NULL    2       Using index condition; Using where
+SELECT * FROM INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+QUERY  TRACE   MISSING_BYTES_BEYOND_MAX_MEM_SIZE       INSUFFICIENT_PRIVILEGES
+EXPLAIN SELECT * FROM t1 WHERE a IN ('a', 'b') AND b = 2       {
+  "steps": [
+    {
+      "join_preparation": {
+        "select#": 1,
+        "steps": [
+          {
+            "expanded_query": "/* select#1 */ select `t1`.`a` AS `a`,`t1`.`b` AS `b` from `t1` where ((`t1`.`a` in ('a','b')) and (`t1`.`b` = 2))"
+          }
+        ] /* steps */
+      } /* join_preparation */
+    },
+    {
+      "join_optimization": {
+        "select#": 1,
+        "steps": [
+          {
+            "condition_processing": {
+              "condition": "WHERE",
+              "original_condition": "((`t1`.`a` in ('a','b')) and (`t1`.`b` = 2))",
+              "steps": [
+                {
+                  "transformation": "equality_propagation",
+                  "resulting_condition": "((`t1`.`a` in ('a','b')) and multiple equal(2, `t1`.`b`))"
+                },
+                {
+                  "transformation": "constant_propagation",
+                  "resulting_condition": "((`t1`.`a` in ('a','b')) and multiple equal(2, `t1`.`b`))"
+                },
+                {
+                  "transformation": "trivial_condition_removal",
+                  "resulting_condition": "((`t1`.`a` in ('a','b')) and multiple equal(2, `t1`.`b`))"
+                }
+              ] /* steps */
+            } /* condition_processing */
+          },
+          {
+            "table_dependencies": [
+              {
+                "table": "`t1`",
+                "row_may_be_null": false,
+                "map_bit": 0,
+                "depends_on_map_bits": [
+                ] /* depends_on_map_bits */
+              }
+            ] /* table_dependencies */
+          },
+          {
+            "ref_optimizer_key_uses": [
+              {
+                "table": "`t1`",
+                "field": "b",
+                "equals": "2",
+                "null_rejecting": false
+              }
+            ] /* ref_optimizer_key_uses */
+          },
+          {
+            "rows_estimation": [
+              {
+                "table": "`t1`",
+                "range_analysis": {
+                  "table_scan": {
+                    "rows": 11,
+                    "cost": 5.3
+                  } /* table_scan */,
+                  "potential_range_indices": [
+                    {
+                      "index": "PRIMARY",
+                      "usable": true,
+                      "key_parts": [
+                        "a",
+                        "b"
+                      ] /* key_parts */
+                    },
+                    {
+                      "index": "b_idx",
+                      "usable": true,
+                      "key_parts": [
+                        "b",
+                        "a"
+                      ] /* key_parts */
+                    }
+                  ] /* potential_range_indices */,
+                  "setup_range_conditions": [
+                  ] /* setup_range_conditions */,
+                  "group_index_range": {
+                    "chosen": false,
+                    "cause": "not_group_by_or_distinct"
+                  } /* group_index_range */,
+                  "analyzing_range_alternatives": {
+                    "range_scan_alternatives": [
+                      {
+                        "index": "PRIMARY",
+                        "ranges": [
+                          "unprintable_blob_value <= a <= unprintable_blob_value AND 2 <= b <= 2",
+                          "unprintable_blob_value <= a <= unprintable_blob_value AND 2 <= b <= 2"
+                        ] /* ranges */,
+                        "index_dives_for_eq_ranges": true,
+                        "rowid_ordered": true,
+                        "using_mrr": false,
+                        "index_only": false,
+                        "rows": 2,
+                        "cost": 2.41,
+                        "chosen": true
+                      },
+                      {
+                        "index": "b_idx",
+                        "ranges": [
+                          "2 <= b <= 2 AND unprintable_blob_value <= a <= unprintable_blob_value",
+                          "2 <= b <= 2 AND unprintable_blob_value <= a <= unprintable_blob_value"
+                        ] /* ranges */,
+                        "index_dives_for_eq_ranges": true,
+                        "rowid_ordered": false,
+                        "using_mrr": false,
+                        "index_only": false,
+                        "rows": 2,
+                        "cost": 4.41,
+                        "chosen": false,
+                        "cause": "cost"
+                      }
+                    ] /* range_scan_alternatives */,
+                    "analyzing_roworder_intersect": {
+                      "usable": false,
+                      "cause": "too_few_roworder_scans"
+                    } /* analyzing_roworder_intersect */
+                  } /* analyzing_range_alternatives */,
+                  "chosen_range_access_summary": {
+                    "range_access_plan": {
+                      "type": "range_scan",
+                      "index": "PRIMARY",
+                      "rows": 2,
+                      "ranges": [
+                        "unprintable_blob_value <= a <= unprintable_blob_value AND 2 <= b <= 2",
+                        "unprintable_blob_value <= a <= unprintable_blob_value AND 2 <= b <= 2"
+                      ] /* ranges */
+                    } /* range_access_plan */,
+                    "rows_for_plan": 2,
+                    "cost_for_plan": 2.41,
+                    "chosen": true
+                  } /* chosen_range_access_summary */
+                } /* range_analysis */
+              }
+            ] /* rows_estimation */
+          },
+          {
+            "considered_execution_plans": [
+              {
+                "plan_prefix": [
+                ] /* plan_prefix */,
+                "table": "`t1`",
+                "best_access_path": {
+                  "considered_access_paths": [
+                    {
+                      "access_type": "ref",
+                      "index": "b_idx",
+                      "rows": 2,
+                      "cost": 2.4,
+                      "chosen": true
+                    },
+                    {
+                      "access_type": "range",
+                      "rows": 2,
+                      "cost": 2.81,
+                      "chosen": false
+                    }
+                  ] /* considered_access_paths */
+                } /* best_access_path */,
+                "cost_for_plan": 2.4,
+                "rows_for_plan": 2,
+                "chosen": true
+              }
+            ] /* considered_execution_plans */
+          },
+          {
+            "attaching_conditions_to_tables": {
+              "original_condition": "((`t1`.`b` = 2) and (`t1`.`a` in ('a','b')))",
+              "attached_conditions_computation": [
+                {
+                  "rerunning_range_optimizer_for_single_index": [
+                    {
+                      "table_scan": {
+                        "rows": 11,
+                        "cost": 5.3
+                      } /* table_scan */,
+                      "potential_range_indices": [
+                        {
+                          "index": "PRIMARY",
+                          "usable": false,
+                          "cause": "not_applicable"
+                        },
+                        {
+                          "index": "b_idx",
+                          "usable": true,
+                          "key_parts": [
+                            "b",
+                            "a"
+                          ] /* key_parts */
+                        }
+                      ] /* potential_range_indices */,
+                      "setup_range_conditions": [
+                      ] /* setup_range_conditions */,
+                      "group_index_range": {
+                        "chosen": false,
+                        "cause": "not_group_by_or_distinct"
+                      } /* group_index_range */,
+                      "analyzing_range_alternatives": {
+                        "range_scan_alternatives": [
+                          {
+                            "index": "b_idx",
+                            "ranges": [
+                              "2 <= b <= 2 AND unprintable_blob_value <= a <= unprintable_blob_value",
+                              "2 <= b <= 2 AND unprintable_blob_value <= a <= unprintable_blob_value"
+                            ] /* ranges */,
+                            "index_dives_for_eq_ranges": true,
+                            "rowid_ordered": false,
+                            "using_mrr": false,
+                            "index_only": false,
+                            "rows": 2,
+                            "cost": 4.41,
+                            "chosen": true
+                          }
+                        ] /* range_scan_alternatives */,
+                        "analyzing_roworder_intersect": {
+                          "usable": false,
+                          "cause": "too_few_roworder_scans"
+                        } /* analyzing_roworder_intersect */
+                      } /* analyzing_range_alternatives */,
+                      "chosen_range_access_summary": {
+                        "range_access_plan": {
+                          "type": "range_scan",
+                          "index": "b_idx",
+                          "rows": 2,
+                          "ranges": [
+                            "2 <= b <= 2 AND unprintable_blob_value <= a <= unprintable_blob_value",
+                            "2 <= b <= 2 AND unprintable_blob_value <= a <= unprintable_blob_value"
+                          ] /* ranges */
+                        } /* range_access_plan */,
+                        "rows_for_plan": 2,
+                        "cost_for_plan": 4.41,
+                        "chosen": true
+                      } /* chosen_range_access_summary */
+                    } /* range_analysis */
+                  ] /* rerunning_range_optimizer_for_single_index */
+                },
+                {
+                  "access_type_changed": {
+                    "table": "`t1`",
+                    "index": "b_idx",
+                    "old_type": "ref",
+                    "new_type": "range",
+                    "cause": "uses_more_keyparts"
+                  } /* access_type_changed */
+                }
+              ] /* attached_conditions_computation */,
+              "attached_conditions_summary": [
+                {
+                  "table": "`t1`",
+                  "attached": "((`t1`.`b` = 2) and (`t1`.`a` in ('a','b')))"
+                }
+              ] /* attached_conditions_summary */
+            } /* attaching_conditions_to_tables */
+          },
+          {
+            "refine_plan": [
+              {
+                "table": "`t1`",
+                "pushed_index_condition": "(`t1`.`b` = 2)",
+                "table_condition_attached": "(`t1`.`a` in ('a','b'))",
+                "access_type": "range"
+              }
+            ] /* refine_plan */
+          }
+        ] /* steps */
+      } /* join_optimization */
+    },
+    {
+      "join_explain": {
+        "select#": 1,
+        "steps": [
+        ] /* steps */
+      } /* join_explain */
+    }
+  ] /* steps */
+}      0       0
+SET optimizer_trace="enabled=off";
+SET @@session.optimizer_switch=@optimizer_switch_saved;
+DROP TABLE t1;
diff --git a/mysql-wsrep-5.6/mysql-test/suite/opt_trace/validate_json.pl b/mysql-wsrep-5.6/mysql-test/suite/opt_trace/validate_json.pl
new file mode 100755 (executable)
index 0000000..2fcd640
--- /dev/null
@@ -0,0 +1,159 @@
+#!/usr/bin/perl
+use strict;
+use JSON;
+use File::Spec::Functions qw/ canonpath /;
+my $usage = "This is from WL#5257 \"first API for optimizer trace\".
+
+Usage:
+  %s [-q] <a_file> <another_file> <etc>
+
+    -q      quiet mode: only display errors and warnings.
+
+It will verify that all optimizer traces of files (usually a_file
+is a .result or .reject file which contains
+SELECT * FROM OPTIMIZER_TRACE; ) are JSON-compliant, and that
+they contain no duplicates keys.
+Exit code is 0 if all ok.";
+my $retcode = 0;
+my @ignored;
+my @input = @ARGV;
+
+# Filter out "-q" options
+@input = grep {!/-q/} @input;
+
+if (!@input)
+{
+  print "$usage\n";
+  exit 1;
+}
+
+# If command line contains at least one "-q" option, it is quiet mode
+my $quiet= scalar(@input) <= scalar(@ARGV) -1;
+# On Windows, command line arguments specified using wildcards need to be evaluated.
+# On Unix too if the arguments are passed with single quotes.
+my $need_parse = grep(/\*/,@input);
+if ($need_parse)
+{
+  my $platform_independent_dir;
+  $platform_independent_dir= canonpath "@input";
+  @input= glob "$platform_independent_dir";
+}
+
+foreach my $input_file (@input)
+{
+  handle_one_file($input_file);
+  print "\n";
+}
+
+if ( @ignored )
+{
+  print STDERR "These files have been ignored:\n";
+  foreach my $ig ( @ignored )
+  {
+    print "$ig\n";
+  }
+  print "\n";
+}
+if ( $retcode )
+{
+  print STDERR "There are errors\n";
+}
+
+else
+{
+  print "\n";
+  print "ALL OK\n";
+}
+
+exit $retcode;
+
+sub handle_one_file {
+
+  my ( $input_file ) = @_;
+  if ( $input_file =~ /^.*(ctype_.*|mysqldump)\.result/ )
+  {
+    push @ignored ,$input_file;
+    return;
+  }
+  print "FILE $input_file\n";
+  print "\n";
+  open(DATA,"<$input_file") or die "Can't open file";
+  my @lines = <DATA>;
+  close(DATA);
+  my $first_trace_line = 0;
+  my $trace_line = 0;
+  my @trace = undef;
+  label_to: foreach my $i ( @lines )
+  {
+    $trace_line = $trace_line + 1;
+    if (( grep(/^.*(\t)?{\n/,$i) ) and ( $first_trace_line == 0 ))
+    {
+      @trace = undef;
+      $first_trace_line = $trace_line;
+      push @trace, "{\n";
+      next label_to;
+    }
+    if (( $i =~ /^}/ ) and ( $first_trace_line != 0))
+    {
+      push @trace, "}";
+      check($first_trace_line,@trace);
+      $first_trace_line = 0;
+    }
+    if ( $first_trace_line != 0 )
+    {
+      # Eliminate /* */ from end_marker=on (not valid JSON)
+      $i =~ s/\/\*.*\*\// /g;
+      push @trace, $i;
+    }
+
+  }
+}
+
+
+sub check {
+
+  my ( $first_trace_line, @trace ) = @_;
+  my $string = join("", @trace);
+  my $parsed;
+  eval { $parsed = decode_json($string); };
+  unless ( $parsed )
+  {
+    print "Parse error at line: $first_trace_line\n";
+    my $error = $@;
+    print "Error: $@\n";
+    # If there is a character position specified, put a mark ('&') in front of this character
+    if ($error =~ /invalid character.*at character offset (\d+)/)
+    {
+      substr($string,$1,0) = "&";
+      print "$string\n";
+    }
+    else
+    {
+      print "$string\n";
+    }
+    $retcode = 1;
+    print "\n";
+    return;
+  }
+  # Detect non-unique keys in one object, by counting
+  # number of quote symbols ("): the json module outputs only
+  # one of the non-unique keys, making the number of "
+  # smaller compared to the input string.
+
+  my $before = $string =~ tr/'"'//;
+  my $re_json;
+  $re_json= to_json($parsed);
+  my $after = $re_json =~ tr/'"'//;
+  if ( $before != $after )
+  {
+    print "Non-unique keys at line $first_trace_line ( $before vs $after )\n";
+    print "$string\n";
+    $retcode = 1;
+    print "\n";
+    return;
+  }
+  if ( !$quiet )
+  {
+    print "OK at line $first_trace_line\n";
+  }
+}
index db3ab6b7f82306dfb1aca6a8e8ddc97113bdcb77..0f52fa474f234afb7a600ceba936463aea069543 100644 (file)
@@ -27,6 +27,9 @@ let $TABLENAME= t1;
 GRANT ALL PRIVILEGES ON test.* TO test_user_1 IDENTIFIED BY 'testpw';
 GRANT ALL PRIVILEGES ON test.* TO test_user_2 IDENTIFIED BY 'testpw';
 
+--echo # FILE is needed to use the DATA DIRECTORY or INDEX DIRECTORY option
+GRANT FILE ON *.* TO test_user_2 IDENTIFIED BY 'testpw';
+
 connect (session1, localhost, test_user_1,'testpw',test);
 --sorted_result
 SELECT * FROM t1 PARTITION (`p0-29`);
index ca29757c519fe0c5364df9b401168a8cf33d70c8..1574017c58ca45279d5db959f1912e1df369759e 100644 (file)
@@ -33,6 +33,8 @@ INSERT INTO t1 PARTITION (`p3000-299999`, subp14) VALUES (299998, '(p3000-299999
 INSERT INTO t1 PARTITION (`p3000-299999`, subp14) VALUES (299999, '(p3000-299999-)subp14');
 GRANT ALL PRIVILEGES ON test.* TO test_user_1 IDENTIFIED BY 'testpw';
 GRANT ALL PRIVILEGES ON test.* TO test_user_2 IDENTIFIED BY 'testpw';
+# FILE is needed to use the DATA DIRECTORY or INDEX DIRECTORY option
+GRANT FILE ON *.* TO test_user_2 IDENTIFIED BY 'testpw';
 connect  session1, localhost, test_user_1,'testpw',test;
 SELECT * FROM t1 PARTITION (`p0-29`);
 a      b
index ca29757c519fe0c5364df9b401168a8cf33d70c8..1574017c58ca45279d5db959f1912e1df369759e 100644 (file)
@@ -33,6 +33,8 @@ INSERT INTO t1 PARTITION (`p3000-299999`, subp14) VALUES (299998, '(p3000-299999
 INSERT INTO t1 PARTITION (`p3000-299999`, subp14) VALUES (299999, '(p3000-299999-)subp14');
 GRANT ALL PRIVILEGES ON test.* TO test_user_1 IDENTIFIED BY 'testpw';
 GRANT ALL PRIVILEGES ON test.* TO test_user_2 IDENTIFIED BY 'testpw';
+# FILE is needed to use the DATA DIRECTORY or INDEX DIRECTORY option
+GRANT FILE ON *.* TO test_user_2 IDENTIFIED BY 'testpw';
 connect  session1, localhost, test_user_1,'testpw',test;
 SELECT * FROM t1 PARTITION (`p0-29`);
 a      b
diff --git a/mysql-wsrep-5.6/mysql-test/suite/rpl/r/rpl_autoinc_lock_style.result b/mysql-wsrep-5.6/mysql-test/suite/rpl/r/rpl_autoinc_lock_style.result
new file mode 100644 (file)
index 0000000..16fb7e9
--- /dev/null
@@ -0,0 +1,15 @@
+include/master-slave.inc
+Warnings:
+Note   ####    Sending passwords in plain text without SSL/TLS is extremely insecure.
+Note   ####    Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information.
+[connection master]
+CREATE TABLE t (i INT AUTO_INCREMENT PRIMARY KEY) ENGINE=InnoDB;
+include/sync_slave_sql_with_master.inc
+SET @save_debug=@@debug;
+SET GLOBAL DEBUG='+d,die_if_autoinc_old_lock_style_used';
+[connection master]
+INSERT INTO t VALUES (1);
+DROP TABLE t;
+include/sync_slave_sql_with_master.inc
+SET GLOBAL DEBUG=@save_debug;
+include/rpl_end.inc
index de8db96e9576acfd362f9f27557b4ba6dbd2fa80..cd40054abaee6f1549ff0cec395b87446964cdb7 100644 (file)
@@ -208,9 +208,10 @@ set @b1 = concat(@b1,@b1);
 INSERT INTO t9 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA');
 select * from t9;
 a      b       c       d       e       f       g       h       i
-1      b1b1b1b1b1b1b1b1        Kyle    0000-00-00 00:00:00     0               NULL            NULL
-2      b1b1b1b1b1b1b1b1        JOE     0000-00-00 00:00:00     0               NULL            NULL
-3      b1b1b1b1b1b1b1b1        QA      0000-00-00 00:00:00     0               NULL            NULL
+1      b1b1b1b1b1b1b1b1        Kyle    CURRENT_TIMESTAMP       0               NULL            NULL
+2      b1b1b1b1b1b1b1b1        JOE     CURRENT_TIMESTAMP       0               NULL            NULL
+3      b1b1b1b1b1b1b1b1        QA      CURRENT_TIMESTAMP       0               NULL            NULL
+include/assert.inc [The values of column 'd' should have non-zero timetsamp.]
 DROP TABLE t9;
 *** Create t10 on slave  ***
 STOP SLAVE;
index b7ac0f9c0f6fd7e7beede8471c60f8ca06e2f918..2fb257e2916aec746cb6f7f9e04b3291e0035a1d 100644 (file)
@@ -208,9 +208,10 @@ set @b1 = concat(@b1,@b1);
 INSERT INTO t9 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA');
 select * from t9;
 a      b       c       d       e       f       g       h       i
-1      b1b1b1b1b1b1b1b1        Kyle    0000-00-00 00:00:00     0               NULL            NULL
-2      b1b1b1b1b1b1b1b1        JOE     0000-00-00 00:00:00     0               NULL            NULL
-3      b1b1b1b1b1b1b1b1        QA      0000-00-00 00:00:00     0               NULL            NULL
+1      b1b1b1b1b1b1b1b1        Kyle    CURRENT_TIMESTAMP       0               NULL            NULL
+2      b1b1b1b1b1b1b1b1        JOE     CURRENT_TIMESTAMP       0               NULL            NULL
+3      b1b1b1b1b1b1b1b1        QA      CURRENT_TIMESTAMP       0               NULL            NULL
+include/assert.inc [The values of column 'd' should have non-zero timetsamp.]
 DROP TABLE t9;
 *** Create t10 on slave  ***
 STOP SLAVE;
diff --git a/mysql-wsrep-5.6/mysql-test/suite/rpl/r/rpl_mts_relay_log_post_crash_recovery.result b/mysql-wsrep-5.6/mysql-test/suite/rpl/r/rpl_mts_relay_log_post_crash_recovery.result
new file mode 100644 (file)
index 0000000..f476ebf
--- /dev/null
@@ -0,0 +1,82 @@
+include/master-slave.inc
+Warnings:
+Note   ####    Sending passwords in plain text without SSL/TLS is extremely insecure.
+Note   ####    Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information.
+[connection master]
+#### I. Initialize ####
+[connection slave]
+include/stop_slave.inc
+SET @save.innodb_lock_wait_timeout= @@global.innodb_lock_wait_timeout;
+set @@global.innodb_lock_wait_timeout=5 + 1000;
+include/start_slave.inc
+[connection master]
+CREATE DATABASE d1;
+CREATE DATABASE d2;
+CREATE TABLE d1.t (a INT PRIMARY KEY, name text) ENGINE=INNODB;
+CREATE TABLE d2.t (a INT PRIMARY KEY, name text) ENGINE=INNODB;
+#### II. Prepare test scenario ####
+include/sync_slave_sql_with_master.inc
+BEGIN;
+INSERT INTO d2.t VALUES (2, 'Slave local');
+INSERT INTO d1.t VALUES (3, 'Slave local');
+[connection master]
+INSERT INTO d1.t VALUES (1, 'T1');
+INSERT INTO d2.t VALUES (1, 'T2');
+INSERT INTO d2.t VALUES (2, 'T3');
+INSERT INTO d2.t VALUES (3, 'T4');
+INSERT INTO d1.t VALUES (2, 'T5');
+[connection slave1]
+# Now d1.t has two rows and d2.t has one row.
+[connection slave]
+CALL mtr.add_suppression("Recovery from master pos");
+include/rpl_start_server.inc [server_number=2 parameters: --skip_slave_start=FALSE --relay_log_info_repository=TABLE --master_info_repository=TABLE --sync_master_info=1 --relay-log-recovery=1]
+After restart gaps should be filled.
+include/assert.inc [Table d1.t should contain 2 rows.]
+include/assert.inc [Table d2.t should contain 3 rows.]
+include/start_slave.inc
+[connection master]
+include/sync_slave_sql_with_master.inc
+include/diff_tables.inc [master:d1.t, slave:d1.t]
+include/diff_tables.inc [master:d2.t, slave:d2.t]
+[connection master]
+DROP DATABASE d1;
+DROP DATABASE d2;
+#### I. Initialize ####
+[connection slave]
+include/stop_slave.inc
+SET @save.innodb_lock_wait_timeout= @@global.innodb_lock_wait_timeout;
+set @@global.innodb_lock_wait_timeout=5 + 1000;
+include/start_slave.inc
+[connection master]
+CREATE DATABASE d1;
+CREATE DATABASE d2;
+CREATE TABLE d1.t (a INT PRIMARY KEY, name text) ENGINE=INNODB;
+CREATE TABLE d2.t (a INT PRIMARY KEY, name text) ENGINE=INNODB;
+#### II. Prepare test scenario ####
+include/sync_slave_sql_with_master.inc
+BEGIN;
+INSERT INTO d2.t VALUES (2, 'Slave local');
+INSERT INTO d1.t VALUES (3, 'Slave local');
+[connection master]
+INSERT INTO d1.t VALUES (1, 'T1');
+INSERT INTO d2.t VALUES (1, 'T2');
+INSERT INTO d2.t VALUES (2, 'T3');
+INSERT INTO d2.t VALUES (3, 'T4');
+INSERT INTO d1.t VALUES (2, 'T5');
+[connection slave1]
+# Now d1.t has two rows and d2.t has one row.
+[connection slave]
+CALL mtr.add_suppression("Recovery from master pos");
+include/rpl_start_server.inc [server_number=2 parameters: --skip_slave_start=TRUE --relay_log_info_repository=TABLE --master_info_repository=TABLE --sync_master_info=1 --relay-log-recovery=1]
+After restart gaps should be filled.
+include/assert.inc [Table d1.t should contain 2 rows.]
+include/assert.inc [Table d2.t should contain 3 rows.]
+include/start_slave.inc
+[connection master]
+include/sync_slave_sql_with_master.inc
+include/diff_tables.inc [master:d1.t, slave:d1.t]
+include/diff_tables.inc [master:d2.t, slave:d2.t]
+[connection master]
+DROP DATABASE d1;
+DROP DATABASE d2;
+include/rpl_end.inc
diff --git a/mysql-wsrep-5.6/mysql-test/suite/rpl/r/rpl_mts_relay_log_recovery_on_error.result b/mysql-wsrep-5.6/mysql-test/suite/rpl/r/rpl_mts_relay_log_recovery_on_error.result
new file mode 100644 (file)
index 0000000..efd785a
--- /dev/null
@@ -0,0 +1,60 @@
+include/master-slave.inc
+Warnings:
+Note   ####    Sending passwords in plain text without SSL/TLS is extremely insecure.
+Note   ####    Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information.
+[connection master]
+[connection slave]
+call mtr.add_suppression("Duplicate entry*");
+call mtr.add_suppression("The slave coordinator and worker threads are stopped, possibly leaving data in inconsistent state");
+call mtr.add_suppression("Failed to initialize the master info structure");
+call mtr.add_suppression("Slave failed to initialize relay log info*");
+call mtr.add_suppression("MTS recovery: automatic recovery failed.*");
+call mtr.add_suppression("Recovery from master pos");
+#### I. Initialize ####
+[connection slave]
+include/stop_slave.inc
+SET @save.innodb_lock_wait_timeout= @@global.innodb_lock_wait_timeout;
+set @@global.innodb_lock_wait_timeout=5 + 1000;
+include/start_slave.inc
+[connection master]
+CREATE DATABASE d1;
+CREATE DATABASE d2;
+CREATE TABLE d1.t (a INT PRIMARY KEY, name text) ENGINE=INNODB;
+CREATE TABLE d2.t (a INT PRIMARY KEY, name text) ENGINE=INNODB;
+#### II. Prepare test scenario ####
+include/sync_slave_sql_with_master.inc
+BEGIN;
+INSERT INTO d2.t VALUES (2, 'Slave local');
+INSERT INTO d1.t VALUES (3, 'Slave local');
+[connection master]
+INSERT INTO d1.t VALUES (1, 'T1');
+INSERT INTO d2.t VALUES (1, 'T2');
+INSERT INTO d2.t VALUES (2, 'T3');
+INSERT INTO d2.t VALUES (3, 'T4');
+INSERT INTO d1.t VALUES (2, 'T5');
+[connection slave1]
+# Now d1.t has two rows and d2.t has one row.
+[connection slave]
+COMMIT;
+include/wait_for_slave_sql_error.inc [errno=1062]
+include/rpl_restart_server.inc [server_number=2 parameters: --skip_slave_start=TRUE --relay_log_info_repository=TABLE --master_info_repository=TABLE --sync_master_info=1 --relay-log-recovery=1]
+[connection slave]
+Relay log recovery should fail as MTS stopped due to an error
+START SLAVE;
+ERROR HY000: Slave failed to initialize relay log info structure from the repository
+Eliminate the cause of MTS error
+DELETE FROM d2.t WHERE a=2;
+DELETE FROM d1.t WHERE a=3;
+include/rpl_restart_server.inc [server_number=2 parameters: --skip_slave_start=TRUE --relay_log_info_repository=TABLE --master_info_repository=TABLE --sync_master_info=1 --relay-log-recovery=1]
+MTS recovery should be successful. Check that gaps are filled.
+include/assert.inc [Table d1.t should contain 2 rows.]
+include/assert.inc [Table d2.t should contain 3 rows.]
+include/start_slave.inc
+[connection master]
+include/sync_slave_sql_with_master.inc
+include/diff_tables.inc [master:d1.t, slave:d1.t]
+include/diff_tables.inc [master:d2.t, slave:d2.t]
+[connection master]
+DROP DATABASE d1;
+DROP DATABASE d2;
+include/rpl_end.inc
index 5728a57786977548e300bd6786d7e7dda550c0b1..e0e70c584e8291e1a439f8361413c15db62040f6 100644 (file)
@@ -46,7 +46,7 @@ include/rpl_restart_server.inc [server_number=2 parameters: --relay-log-recovery
 SELECT @@global.relay_log_recovery as 'must be ON';
 must be ON
 1
-call mtr.add_suppression("--relay-log-recovery cannot be executed when the slave was stopped with an error or killed in MTS mode; consider using RESET SLAVE or restart the server with --relay-log-recovery = 0");
+call mtr.add_suppression("MTS recovery: automatic recovery failed.*");
 call mtr.add_suppression("Failed to initialize the master info structure");
 call mtr.add_suppression("It is not possible to change the type of the relay log repository because there are workers repositories with possible execution gaps. The value of --relay_log_info_repository is altered to one of the found Worker repositories");
 include/rpl_restart_server.inc [server_number=2 parameters: --skip-slave-start]
index 00ee2d009d8bfae1c1aee16b7adf87cb76d33cd1..e2f4c1cad1c1018836e1fb88521cbdfea456d6b6 100644 (file)
@@ -639,6 +639,73 @@ DROP TABLE t;
 include/wait_for_slave_sql_error.inc [errno=1032]
 DROP TABLE t;
 include/rpl_reset.inc
+CON: 'master', IMG: 'FULL', RESTART SLAVE: 'N'
+SET SESSION binlog_row_image= 'FULL';
+SET GLOBAL binlog_row_image= 'FULL';
+FLUSH TABLES;
+SHOW VARIABLES LIKE 'binlog_row_image';
+Variable_name  Value
+binlog_row_image       FULL
+CON: 'slave', IMG: 'FULL', RESTART SLAVE: 'Y'
+SET SESSION binlog_row_image= 'FULL';
+SET GLOBAL binlog_row_image= 'FULL';
+include/stop_slave.inc
+include/start_slave.inc
+FLUSH TABLES;
+SHOW VARIABLES LIKE 'binlog_row_image';
+Variable_name  Value
+binlog_row_image       FULL
+CREATE TABLE t1(id INT PRIMARY KEY, a INT) ENGINE = INNODB;
+include/sync_slave_sql_with_master.inc
+INSERT INTO t1 (id, a) VALUES (1, 1);
+"Case: FULL - EXPLAIN output should not display Using temporary"
+EXPLAIN UPDATE t1 SET a=a+1 WHERE id < 2;
+id     select_type     table   type    possible_keys   key     key_len ref     rows    Extra
+1      SIMPLE  t1      range   PRIMARY PRIMARY 4       const   1       Using where
+UPDATE t1 SET a=a+1 WHERE id < 2;
+CON: 'master', IMG: 'NOBLOB', RESTART SLAVE: 'N'
+SET SESSION binlog_row_image= 'NOBLOB';
+SET GLOBAL binlog_row_image= 'NOBLOB';
+FLUSH TABLES;
+SHOW VARIABLES LIKE 'binlog_row_image';
+Variable_name  Value
+binlog_row_image       NOBLOB
+CON: 'slave', IMG: 'NOBLOB', RESTART SLAVE: 'Y'
+SET SESSION binlog_row_image= 'NOBLOB';
+SET GLOBAL binlog_row_image= 'NOBLOB';
+include/stop_slave.inc
+include/start_slave.inc
+FLUSH TABLES;
+SHOW VARIABLES LIKE 'binlog_row_image';
+Variable_name  Value
+binlog_row_image       NOBLOB
+"Case: NOBLOB - EXPLAIN output should not display Using temporary"
+EXPLAIN UPDATE t1 SET a=a+1 WHERE id < 2;
+id     select_type     table   type    possible_keys   key     key_len ref     rows    Extra
+1      SIMPLE  t1      range   PRIMARY PRIMARY 4       const   1       Using where
+UPDATE t1 SET a=a+1 WHERE id < 2;
+CON: 'master', IMG: 'MINIMAL', RESTART SLAVE: 'N'
+SET SESSION binlog_row_image= 'MINIMAL';
+SET GLOBAL binlog_row_image= 'MINIMAL';
+FLUSH TABLES;
+SHOW VARIABLES LIKE 'binlog_row_image';
+Variable_name  Value
+binlog_row_image       MINIMAL
+CON: 'slave', IMG: 'MINIMAL', RESTART SLAVE: 'Y'
+SET SESSION binlog_row_image= 'MINIMAL';
+SET GLOBAL binlog_row_image= 'MINIMAL';
+include/stop_slave.inc
+include/start_slave.inc
+FLUSH TABLES;
+SHOW VARIABLES LIKE 'binlog_row_image';
+Variable_name  Value
+binlog_row_image       MINIMAL
+EXPLAIN UPDATE t1 SET a=a+1 WHERE id < 2;
+id     select_type     table   type    possible_keys   key     key_len ref     rows    Extra
+1      SIMPLE  t1      range   PRIMARY PRIMARY 4       const   1       Using where
+UPDATE t1 SET a=a+1 WHERE id < 2;
+DROP TABLE t1;
+include/sync_slave_sql_with_master.inc
 SET GLOBAL binlog_row_image= @old_binlog_row_image;
 SET SESSION binlog_row_image= @old_binlog_row_image;
 SET GLOBAL binlog_row_image= @old_binlog_row_image;
diff --git a/mysql-wsrep-5.6/mysql-test/suite/rpl/r/rpl_row_slave_skip_error_all.result b/mysql-wsrep-5.6/mysql-test/suite/rpl/r/rpl_row_slave_skip_error_all.result
new file mode 100644 (file)
index 0000000..7b23dd4
--- /dev/null
@@ -0,0 +1,46 @@
+include/master-slave.inc
+Warnings:
+Note   ####    Sending passwords in plain text without SSL/TLS is extremely insecure.
+Note   ####    Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information.
+[connection master]
+CREATE TABLE t (name VARCHAR(25) DEFAULT NULL) ENGINE=InnoDB;
+include/sync_slave_sql_with_master.inc
+call mtr.add_suppression("Slave SQL.*Error executing row event: .Table .test.t. doesn.t exist., Error_code: 1146");
+call mtr.add_suppression("Slave SQL.*Column 0 of table .test.t. cannot be converted from type.* Error_code: 1677");
+call mtr.add_suppression("The slave coordinator and worker threads are stopped, possibly leaving data in inconsistent state");
+call mtr.add_suppression("Got error 1 during COMMIT");
+ALTER TABLE t CHANGE name name VARCHAR(255);
+[connection master]
+INSERT INTO t VALUE ('Amy');
+# Sync should be successful. Slave should not stop with an error
+# ER_SLAVE_CONVERSION_FAILED. It should be up and running in spite
+# of errors as we have set slave_skip_error=all.
+include/sync_slave_sql_with_master.inc
+DROP TABLE t;
+[connection master]
+UPDATE t SET name='New';
+# Sync should be successful. Slave should not stop with an error
+# ER_NO_SUCH_TABLE. It should be up and running in spite of errors
+# as we have set slave_skip_error=all.
+include/sync_slave_sql_with_master.inc
+# Enable a debug point to simulate failure during rows event cleanup.
+SET @@GLOBAL.DEBUG= 'd,simulate_rows_event_cleanup_failure';
+[connection master]
+UPDATE t SET name='Old';
+[connection slave]
+# Since this is not an ignored error slave should stop. We only ignore the
+# errors that are generated during the execution of an event. The other errors
+# that are generated during commit/rollback failure, which takes place during cleanup
+# cannot be ignored.
+include/wait_for_slave_sql_error.inc [errno=1180]
+==== Clean up ====
+SET @@GLOBAL.DEBUG= '$debug_saved';
+include/stop_slave_io.inc
+RESET MASTER;
+RESET SLAVE;
+include/start_slave.inc
+[connection master]
+include/sync_slave_sql_with_master.inc
+[connection master]
+DROP TABLE t;
+include/rpl_end.inc
index 0a771d28f8690b9d1bb2e14f0c0c709a7c3e147c..1447e482f734dc8613e62d5ed3613849a0fb0c0a 100644 (file)
@@ -9,7 +9,7 @@ CALL mtr.add_suppression(".*master and slave have equal MySQL server UUIDs.*");
 CALL mtr.add_suppression("Master's UUID has changed, although this should not happen unless you have changed it manually");
 CALL mtr.add_suppression("Slave I/O: SET @master_heartbeat_period to master failed with error: Lost connection to MySQL server during query");
 CALL mtr.add_suppression("Notifying master by SET @master_binlog_checksum= @@global.binlog_checksum failed with error");
-CALL mtr.add_suppression("A slave with the same server_uuid as this slave has connected to the master");
+CALL mtr.add_suppression("A slave with the same server_uuid/server_id as this slave has connected to the master");
 include/sync_slave_sql_with_master.inc
 
 # Case 1:
diff --git a/mysql-wsrep-5.6/mysql-test/suite/rpl/r/rpl_sql_thread_error.result b/mysql-wsrep-5.6/mysql-test/suite/rpl/r/rpl_sql_thread_error.result
new file mode 100644 (file)
index 0000000..9745cd7
--- /dev/null
@@ -0,0 +1,17 @@
+include/master-slave.inc
+Warnings:
+Note   ####    Sending passwords in plain text without SSL/TLS is extremely insecure.
+Note   ####    Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information.
+[connection master]
+[connection slave]
+CALL mtr.add_suppression("Relay log read failure");
+SET @save_debug=@@GLOBAL.debug;
+SET GLOBAL debug="d,force_sql_thread_error";
+START SLAVE SQL_THREAD;
+include/wait_for_slave_sql_to_stop.inc
+SET GLOBAL debug=@save_debug;
+include/start_slave.inc
+[connection master]
+CREATE TABLE t1(i INT);
+DROP TABLE t1;
+include/rpl_end.inc
diff --git a/mysql-wsrep-5.6/mysql-test/suite/rpl/r/rpl_zombie_dump_threads.result b/mysql-wsrep-5.6/mysql-test/suite/rpl/r/rpl_zombie_dump_threads.result
new file mode 100644 (file)
index 0000000..48d0428
--- /dev/null
@@ -0,0 +1,16 @@
+include/master-slave.inc
+Warnings:
+Note   ####    Sending passwords in plain text without SSL/TLS is extremely insecure.
+Note   ####    Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information.
+[connection master]
+include/stop_dump_threads.inc
+[connection slave]
+SET @save_debug = @@GLOBAL.debug;
+SET GLOBAL debug="d,fake_5_5_version_slave";
+include/start_slave_io.inc
+include/stop_slave_io.inc
+include/start_slave_io.inc
+[connection master]
+[connection slave]
+SET GLOBAL debug=@save_debug;
+include/rpl_end.inc
index 738843a2a401c6d539fa423ed47ac51e92c6c8ba..e0920dd2c26fe1212a3d136d07486a88a49830e1 100644 (file)
@@ -15,4 +15,3 @@ rpl_delayed_slave         : Bug#11764654 2010-11-09 andrei rpl_delayed_slave fai
 rpl_row_binlog_max_cache_size : BUG#14126780 May 29 2012 Vasil Dimov timeout if est number of rows is 3 instead of 4
 rpl_test_framework        : Too many servers started, so fails under Galera-enabled MTR
 rpl_rotate_logs : codership/mysql-wsrep##71 Regression: Duplicate "file was not purged because it is the active log file" warning 
-rpl.rpl_gtid_stress_failover  : BUG#20630589 2015-10-06 parveez Test needs to be stabilized
diff --git a/mysql-wsrep-5.6/mysql-test/suite/rpl/t/rpl_autoinc_lock_style.test b/mysql-wsrep-5.6/mysql-test/suite/rpl/t/rpl_autoinc_lock_style.test
new file mode 100644 (file)
index 0000000..1f3e2a0
--- /dev/null
@@ -0,0 +1,46 @@
+###############################################################################
+# Bug#22247668 SLAVE IS ~10X SLOWER TO EXECUTE SET OF STATEMENTS COMPARED TO
+#               MASTER RBR
+# Problem: A new style of locking is implemented in Innodb. Starting from 5.6,
+#          Innodb uses this new style of locking for all the cases except for the case
+#          where for a simple (single/multi) row INSERTs, it fall back to old style
+#          locking if another transaction has already acquired the AUTOINC lock on behalf of
+#          a LOAD FILE or INSERT...SELECT etc. type of statement. But on
+#          Slave, in RBR format, it is always using old style auto inc
+#          algorithm.
+#
+# Steps to reproduce:
+#  1)  Setup DEBUG simulation point on Slave to bring the server down
+#      if the INSERT enters old style autoinc locking method.
+#
+#  2)  Execute AUTOINC related work on Master.
+#
+#  3)  Make sure that sync on slave happens without any issues.
+#
+###############################################################################
+--source include/have_debug.inc
+--source include/have_binlog_format_row.inc
+--source include/master-slave.inc
+
+# Initial setup
+CREATE TABLE t (i INT AUTO_INCREMENT PRIMARY KEY) ENGINE=InnoDB;
+--source include/sync_slave_sql_with_master.inc
+
+# Step-1 : Setup DEBUG simulation point on Slave to bring the server down
+# if the INSERT enters old style autoinc locking method.
+SET @save_debug=@@debug;
+SET GLOBAL DEBUG='+d,die_if_autoinc_old_lock_style_used';
+
+# Step-2 :Execute AUTOINC related work on Master.
+--source include/rpl_connection_master.inc
+INSERT INTO t VALUES (1);
+DROP TABLE t;
+
+# Step-3: Due to above DEBUG simulation point, server will go down if it enters
+# old autoinc lock style. After fix, sync on Slave happens without any issues.
+--source include/sync_slave_sql_with_master.inc
+
+# Cleanup
+# Reset the simulation point on Slave.
+SET GLOBAL DEBUG=@save_debug;
+--source include/rpl_end.inc
diff --git a/mysql-wsrep-5.6/mysql-test/suite/rpl/t/rpl_mts_relay_log_post_crash_recovery-slave.opt b/mysql-wsrep-5.6/mysql-test/suite/rpl/t/rpl_mts_relay_log_post_crash_recovery-slave.opt
new file mode 100644 (file)
index 0000000..14e093f
--- /dev/null
@@ -0,0 +1 @@
+--slave-transaction-retries=0 --relay_log_info_repository=TABLE --master_info_repository=TABLE --sync_master_info=1
diff --git a/mysql-wsrep-5.6/mysql-test/suite/rpl/t/rpl_mts_relay_log_post_crash_recovery.test b/mysql-wsrep-5.6/mysql-test/suite/rpl/t/rpl_mts_relay_log_post_crash_recovery.test
new file mode 100644 (file)
index 0000000..a6ee999
--- /dev/null
@@ -0,0 +1,40 @@
+###############################################################################
+# Bug#21507981: REPLICATION POSITION LOST AFTER CRASH ON MTS CONFIGURED SLAVE
+#
+# Problem:
+# ========
+# Enable MTS along with crash-safe replication tables. Make sure that the
+# server
+# is busily inserting data with multiple threads in parallel. Shutdown mysqld
+# uncleanly (kill -9 or power off server without notice).
+#
+# Now users are restarting the server with --relay-log-recovery=1 to recover
+# the
+# crashed slave.
+#
+# This results in following error:
+# ================================
+# 2015-06-24 13:49:03 3895 [ERROR] --relay-log-recovery cannot
+# be executed when the slave was stopped with an error or
+# killed in MTS mode; consider using RESET SLAVE or restart
+# the server with --relay-log-recovery = 0 followed by
+# START SLAVE UNTIL SQL_AFTER_MTS_GAPS.
+#
+# i.e relay-log-recovery will not work in MTS mode.
+###############################################################################
+# Following test demonstrates that when gaps are generated due to MTS crash
+# but not due to an error then recovery should be successful with
+# --relay-log-recovery=1 option.
+
+--source include/force_restart.inc
+--source include/have_binlog_format_statement.inc
+--source include/only_mts_slave_parallel_workers.inc
+--source include/master-slave.inc
+
+--let $skip_slave_start_var= FALSE
+--source extra/rpl_tests/rpl_mts_relay_log_recovery.test
+
+--let $skip_slave_start_var= TRUE
+--source extra/rpl_tests/rpl_mts_relay_log_recovery.test
+
+--source include/rpl_end.inc
diff --git a/mysql-wsrep-5.6/mysql-test/suite/rpl/t/rpl_mts_relay_log_recovery_on_error-slave.opt b/mysql-wsrep-5.6/mysql-test/suite/rpl/t/rpl_mts_relay_log_recovery_on_error-slave.opt
new file mode 100644 (file)
index 0000000..14e093f
--- /dev/null
@@ -0,0 +1 @@
+--slave-transaction-retries=0 --relay_log_info_repository=TABLE --master_info_repository=TABLE --sync_master_info=1
diff --git a/mysql-wsrep-5.6/mysql-test/suite/rpl/t/rpl_mts_relay_log_recovery_on_error.test b/mysql-wsrep-5.6/mysql-test/suite/rpl/t/rpl_mts_relay_log_recovery_on_error.test
new file mode 100644 (file)
index 0000000..e065d93
--- /dev/null
@@ -0,0 +1,115 @@
+###############################################################################
+# Bug#21507981: REPLICATION POSITION LOST AFTER CRASH ON MTS CONFIGURED SLAVE
+#
+# Problem:
+# ========
+# Enable MTS along with crash-safe replication tables. Make sure that the server
+# is busily inserting data with multiple threads in parallel. Shutdown mysqld
+# uncleanly (kill -9 or power off server without notice).
+#
+# Now users are restarting the server with --relay-log-recovery=1 to recover the
+# crashed slave.
+#
+# This results in following error:
+# ================================
+# 2015-06-24 13:49:03 3895 [ERROR] --relay-log-recovery cannot be executed when
+# the slave was stopped with an error or killed in MTS mode; consider using
+# RESET SLAVE or restart the server with --relay-log-recovery = 0 followed by
+# START SLAVE UNTIL SQL_AFTER_MTS_GAPS.
+#
+# i.e relay-log-recovery will not work in MTS mode.
+###############################################################################
+# Following test demonstrates that when a gap is generated because MTS has
+# stopped due to an error then attempting 'relay-log-recovery' will not be
+# successful. Once the route cause of the error is eliminated restarting the
+# recovery with relay-log-recovery=1 should fix the issue.
+#
+# Testing Method:
+# ===============
+# It first creates two databases (d1 and d2) and setup slave to use two parallel
+# workers. The test case then insert on the slave a tuple that will block
+# writes on d2 and generate gaps. Now COMMIT the blocking tuple on slave so
+# that workers will proceed and apply the pending transactions. This will
+# result in duplicate key error and slave will stop. Now crash the slave
+# server and initiate relay-log-recovery. It should fail as slave has stopped
+# due to an error. Eliminate the cause of duplicate key error by removing the
+# local changes on slave. Restart the recovery process it should be
+# successful.
+--source include/force_restart.inc
+--source include/have_binlog_format_statement.inc
+--source include/only_mts_slave_parallel_workers.inc
+--source include/master-slave.inc
+
+--source include/rpl_connection_slave.inc
+call mtr.add_suppression("Duplicate entry*");
+call mtr.add_suppression("The slave coordinator and worker threads are stopped, possibly leaving data in inconsistent state");
+call mtr.add_suppression("Failed to initialize the master info structure");
+call mtr.add_suppression("Slave failed to initialize relay log info*");
+call mtr.add_suppression("MTS recovery: automatic recovery failed.*");
+call mtr.add_suppression("Recovery from master pos");
+
+--source extra/rpl_tests/rpl_generate_mts_gap.test
+
+--source include/rpl_connection_slave.inc
+COMMIT;
+--let $slave_sql_errno= convert_error(ER_DUP_ENTRY)
+source include/wait_for_slave_sql_error.inc;
+
+# Restart the slave server - Recovery will fail as MTS has stopped due to an
+# error.
+--let $rpl_server_number= 2
+--let $rpl_server_parameters= --skip_slave_start=TRUE --relay_log_info_repository=TABLE --master_info_repository=TABLE --sync_master_info=1 --relay-log-recovery=1
+--source include/rpl_restart_server.inc
+
+--source include/rpl_connection_slave.inc
+--exec echo "Relay log recovery should fail as MTS stopped due to an error"
+
+--error ER_SLAVE_RLI_INIT_REPOSITORY
+START SLAVE;
+
+# Remove the affending rows from slave.
+--exec echo "Eliminate the cause of MTS error"
+DELETE FROM d2.t WHERE a=2;
+DELETE FROM d1.t WHERE a=3;
+
+--let $table=d2.t
+--let $count=1
+--source include/wait_until_rows_count.inc
+
+--let $table=d1.t
+--let $count=2
+--source include/wait_until_rows_count.inc
+
+# Restart the slave server this should fix the gaps.
+--let $rpl_server_number= 2
+--let $rpl_server_parameters= --skip_slave_start=TRUE --relay_log_info_repository=TABLE --master_info_repository=TABLE --sync_master_info=1 --relay-log-recovery=1
+--source include/rpl_restart_server.inc
+
+--exec echo "MTS recovery should be successful. Check that gaps are filled."
+
+--let $assert_text= Table d1.t should contain 2 rows.
+--let $assert_cond= [select count(*) from d1.t] = 2
+--source include/assert.inc
+
+--let $assert_text= Table d2.t should contain 3 rows.
+--let $assert_cond= [select count(*) from d2.t] = 3
+--source include/assert.inc
+
+--source include/start_slave.inc
+
+# Check consistency
+--source include/rpl_connection_master.inc
+--source include/sync_slave_sql_with_master.inc
+--let $diff_tables= master:d1.t, slave:d1.t
+--source include/diff_tables.inc
+
+--let $diff_tables= master:d2.t, slave:d2.t
+--source include/diff_tables.inc
+
+#
+# Cleanup
+#
+--source include/rpl_connection_master.inc
+DROP DATABASE d1;
+DROP DATABASE d2;
+--source include/rpl_end.inc
index dec525af845aa8d73dc16f118a87c09a1b1983f0..f4357b101d6475fdda246e7d2af3d9ca880e00ba 100644 (file)
@@ -106,7 +106,7 @@ SET @@global.slave_parallel_workers= @save.slave_parallel_workers; # cleanup
 
 --connection slave
 SELECT @@global.relay_log_recovery as 'must be ON';
-call mtr.add_suppression("--relay-log-recovery cannot be executed when the slave was stopped with an error or killed in MTS mode; consider using RESET SLAVE or restart the server with --relay-log-recovery = 0");
+call mtr.add_suppression("MTS recovery: automatic recovery failed.*");
 call mtr.add_suppression("Failed to initialize the master info structure");
 #
 # the following suppression applies to either restart.
index af60b0fae15448425e7eea475499d56fec9d988a..25dfde18eb2dad66e7b3d5d4557f7105ea9cee09 100644 (file)
@@ -806,10 +806,73 @@ let $slave_sql_errno= 1032;
 source include/wait_for_slave_sql_error.inc;
 DROP TABLE t;
 --let $rpl_only_running_threads= 1
+
+# ==== Purpose ====
+#
+# Check that when binlog_row_image= FULL 'UPDATE' query should not using
+# temporary if the PRIMARY KEY not being modified as part of the query.
+#
+# ==== Implementation ====
+#
+# Set binlog_row_image= FULL. Create a table which has both a primary key and
+# a regular int field which is not a key. Execute an UPDATE statement in such
+# a way that it doesn't update the primary key field. See the 'EXPLAIN' output
+# it should not use a temporary table. Repeat the same test in case of
+# binlog_row_image= NOBLOB as well. No temporary table should be used in this
+# case as well.
+#
+# ==== References ====
+#
+# Bug#22510353: UNNECESSARY USING TEMPORARY FOR UPDATE
+#
+###############################################################################
 -- source include/rpl_reset.inc
+-- connection master
+-- let $row_img_set=master:FULL:N,slave:FULL:Y
+-- source include/rpl_row_img_set.inc
+CREATE TABLE t1(id INT PRIMARY KEY, a INT) ENGINE = INNODB;
 
-## CLEAN UP
+--source include/sync_slave_sql_with_master.inc
+
+-- connection master
+-- let $row_img_query= INSERT INTO t1 (id, a) VALUES (1, 1)
+-- let $row_img_expected_master= | 1:1 2:1
+-- let $row_img_expected_slave = | 1:1 2:1
+-- source include/rpl_row_img_parts_master_slave.inc
+
+-- echo "Case: FULL - EXPLAIN output should not display Using temporary"
+EXPLAIN UPDATE t1 SET a=a+1 WHERE id < 2;
+
+-- let $row_img_query= UPDATE t1 SET a=a+1 WHERE id < 2
+-- let $row_img_expected_master=  1:1 2:1 | 1:1 2:2
+-- let $row_img_expected_slave = 1:1 2:1 | 1:1 2:2
+-- source include/rpl_row_img_parts_master_slave.inc
 
+-- let $row_img_set=master:NOBLOB:N,slave:NOBLOB:Y
+-- source include/rpl_row_img_set.inc
+
+-- echo "Case: NOBLOB - EXPLAIN output should not display Using temporary"
+EXPLAIN UPDATE t1 SET a=a+1 WHERE id < 2;
+
+-- let $row_img_query= UPDATE t1 SET a=a+1 WHERE id < 2
+-- let $row_img_expected_master=  1:1 2:2 | 1:1 2:3
+-- let $row_img_expected_slave = 1:1 2:2 | 1:1 2:3
+-- source include/rpl_row_img_parts_master_slave.inc
+
+-- let $row_img_set=master:MINIMAL:N,slave:MINIMAL:Y
+-- source include/rpl_row_img_set.inc
+
+EXPLAIN UPDATE t1 SET a=a+1 WHERE id < 2;
+
+-- let $row_img_query= UPDATE t1 SET a=a+1 WHERE id < 2
+-- let $row_img_expected_master= 1:1 | 2:4
+-- let $row_img_expected_slave = 1:1 | 2:4
+-- source include/rpl_row_img_parts_master_slave.inc
+
+DROP TABLE t1;
+--source include/sync_slave_sql_with_master.inc
+
+## CLEAN UP
 -- connection master
 SET GLOBAL binlog_row_image= @old_binlog_row_image;
 SET SESSION binlog_row_image= @old_binlog_row_image;
diff --git a/mysql-wsrep-5.6/mysql-test/suite/rpl/t/rpl_row_slave_skip_error_all-slave.opt b/mysql-wsrep-5.6/mysql-test/suite/rpl/t/rpl_row_slave_skip_error_all-slave.opt
new file mode 100644 (file)
index 0000000..ea52372
--- /dev/null
@@ -0,0 +1 @@
+--slave-skip-errors=all --log_warnings=2
diff --git a/mysql-wsrep-5.6/mysql-test/suite/rpl/t/rpl_row_slave_skip_error_all.test b/mysql-wsrep-5.6/mysql-test/suite/rpl/t/rpl_row_slave_skip_error_all.test
new file mode 100644 (file)
index 0000000..b70444d
--- /dev/null
@@ -0,0 +1,80 @@
+# ==== Purpose ====
+#
+# Check that slave-skip-errors skips following errors like
+# ER_SLAVE_CONVERSION_FAILED and ER_NO_SUCH_TABLE.
+#
+# ==== Implementation ====
+# On slave, set slave_skip_errors=all, so that slave skips all the errors that
+# are reported during application of row based events.
+#
+# On master, create a table t with a varchar filed of length 25. On slave
+# increase the varchar field width to 255, so that updates that are received
+# from master will fail on slave with error ER_SLAVE_CONVERSION_FAILED.
+#
+# Secondly drop the table t on slave and try to the update the table from
+# master. The updates will fail on slave with an error ER_NO_SUCH_TABLE.
+#
+# Verify that slave doesn't break inspite of these errors.
+# ==== References ====
+#
+# Bug#17653275:--SLAVE-SKIP-ERRORS WON'T SKIP MISSING DATABASE/TABLE
+################################################################################
+--source include/have_debug.inc
+--source include/have_binlog_format_row.inc
+--source include/master-slave.inc
+
+# On master create table t which contains a field named 'name' with length
+# varchar(25).
+CREATE TABLE t (name VARCHAR(25) DEFAULT NULL) ENGINE=InnoDB;
+--source include/sync_slave_sql_with_master.inc
+
+# On slave alter the name field length to varchar(255).
+call mtr.add_suppression("Slave SQL.*Error executing row event: .Table .test.t. doesn.t exist., Error_code: 1146");
+call mtr.add_suppression("Slave SQL.*Column 0 of table .test.t. cannot be converted from type.* Error_code: 1677");
+call mtr.add_suppression("The slave coordinator and worker threads are stopped, possibly leaving data in inconsistent state");
+call mtr.add_suppression("Got error 1 during COMMIT");
+ALTER TABLE t CHANGE name name VARCHAR(255);
+
+--source include/rpl_connection_master.inc
+INSERT INTO t VALUE ('Amy');
+--echo # Sync should be successful. Slave should not stop with an error
+--echo # ER_SLAVE_CONVERSION_FAILED. It should be up and running in spite
+--echo # of errors as we have set slave_skip_error=all.
+--source include/sync_slave_sql_with_master.inc
+
+# Drop the table t on slave.
+DROP TABLE t;
+
+--source include/rpl_connection_master.inc
+UPDATE t SET name='New';
+--echo # Sync should be successful. Slave should not stop with an error
+--echo # ER_NO_SUCH_TABLE. It should be up and running in spite of errors
+--echo # as we have set slave_skip_error=all.
+--source include/sync_slave_sql_with_master.inc
+
+--echo # Enable a debug point to simulate failure during rows event cleanup.
+--let $debug_saved= `SELECT @@GLOBAL.DEBUG`
+SET @@GLOBAL.DEBUG= 'd,simulate_rows_event_cleanup_failure';
+
+--source include/rpl_connection_master.inc
+UPDATE t SET name='Old';
+--source include/rpl_connection_slave.inc
+--echo # Since this is not an ignored error slave should stop. We only ignore the
+--echo # errors that are generated during the execution of an event. The other errors
+--echo # that are generated during commit/rollback failure, which takes place during cleanup
+--echo # cannot be ignored.
+--let $slave_sql_errno= convert_error(ER_ERROR_DURING_COMMIT);
+--source include/wait_for_slave_sql_error.inc
+--echo ==== Clean up ====
+SET @@GLOBAL.DEBUG= '$debug_saved';
+--source include/stop_slave_io.inc
+RESET MASTER;
+RESET SLAVE;
+--source include/start_slave.inc
+
+--source include/rpl_connection_master.inc
+--source include/sync_slave_sql_with_master.inc
+
+--source include/rpl_connection_master.inc
+DROP TABLE t;
+--source include/rpl_end.inc
index ec74b83a8499768be11cac0e6da2a21bd2654b75..a393716cee6bc502c708aa2d2df88617ea41fc99 100644 (file)
@@ -22,7 +22,7 @@ CALL mtr.add_suppression(".*master and slave have equal MySQL server UUIDs.*");
 CALL mtr.add_suppression("Master's UUID has changed, although this should not happen unless you have changed it manually");
 CALL mtr.add_suppression("Slave I/O: SET @master_heartbeat_period to master failed with error: Lost connection to MySQL server during query");
 CALL mtr.add_suppression("Notifying master by SET @master_binlog_checksum= @@global.binlog_checksum failed with error");
-CALL mtr.add_suppression("A slave with the same server_uuid as this slave has connected to the master");
+CALL mtr.add_suppression("A slave with the same server_uuid/server_id as this slave has connected to the master");
 
 --let $uuid_file= auto.cnf
 
@@ -299,7 +299,7 @@ eval CHANGE MASTER TO
 --let $assert_file=$MYSQLTEST_VARDIR/log/mysqld.2.err
 # Assert only the occurrences after the last CHANGE MASTER
 --let $assert_only_after=CHANGE MASTER .* executed
---let $assert_select= Slave .* Got fatal error .* from master .* slave with the same server_uuid as this slave
+--let $assert_select= Slave .* Got fatal error .* from master .* slave with the same server_uuid/server_id as this slave
 --let $assert_text= Found the expected line in server 2 error log
 --source include/assert_grep.inc
 
diff --git a/mysql-wsrep-5.6/mysql-test/suite/rpl/t/rpl_sql_thread_error.test b/mysql-wsrep-5.6/mysql-test/suite/rpl/t/rpl_sql_thread_error.test
new file mode 100644 (file)
index 0000000..7f0845d
--- /dev/null
@@ -0,0 +1,53 @@
+###############################################################################
+#
+# Bug#21697821 RELAYLOG.LOG_LOCK IS NOT RELEASED IN
+#  AN ERROR CASE (IN NEXT_EVENT())
+#
+# Problem: In an error case, relaylog.log_lock acquired by SQL thread is not
+#          released which is causing all threads, which are looking to acquire
+#          the lock,  to hang forever.
+#
+# Steps to reproduce:
+#
+#  1) Inject sql thread error using a simulation point and start SQL thread.
+#
+#  2) Wait till SQL thread goes down (before fix, it wont release the log_lock).
+#
+#  3) start SQL thread (before fix, it will wait for log_lock)
+#
+#  4) After the fix, make sure the replication is working fine.
+#
+###############################################################################
+
+--source include/have_debug.inc
+--source include/have_binlog_format_statement.inc
+--let rpl_skip_start_slave=1
+--source include/master-slave.inc
+
+# Step 1) Set a simulation on Slave SQL thread so that it enters
+# into faulty code (before fix) path.
+--source include/rpl_connection_slave.inc
+CALL mtr.add_suppression("Relay log read failure");
+SET @save_debug=@@GLOBAL.debug;
+SET GLOBAL debug="d,force_sql_thread_error";
+
+# Start SQL thread
+START SLAVE SQL_THREAD;
+
+# Step 2) Wait for SQL thread to go down with the injected error.
+# Before fix, SQL thread would not have released
+# relay_log.log_lock.
+--source include/wait_for_slave_sql_to_stop.inc
+
+# Step 3) Before fix, when SQL thread is trying to acquire
+# relay_log.log_lock which was not released will hang
+# forever.
+SET GLOBAL debug=@save_debug;
+--source include/start_slave.inc
+
+# Step 4) Execute dummy statements on master and see that it
+#         replication is working fine.
+--source include/rpl_connection_master.inc
+CREATE TABLE t1(i INT);
+DROP TABLE t1;
+--source include/rpl_end.inc
diff --git a/mysql-wsrep-5.6/mysql-test/suite/rpl/t/rpl_zombie_dump_threads.test b/mysql-wsrep-5.6/mysql-test/suite/rpl/t/rpl_zombie_dump_threads.test
new file mode 100644 (file)
index 0000000..d6bd56a
--- /dev/null
@@ -0,0 +1,59 @@
+###############################################################################
+# Bug#21179199 ZOMBIE DUMP THREADS ARE NOT DISCONNECTED,
+#              CAN ALSO LEAD TO A CRASH
+#
+#  Problem: Zombie dump threads on Master (>= MySQL-5.6 version)
+#           that are created to server slaves which are on lower
+#           versions than MySQL-5.6 version are not getting killed.
+#  Steps to reproduce:
+#
+#  1) A simulation point on slave to fake that server MySQL version is lower
+#     than MySQL-5.6 (i.e., no slave_uuid set in initial replication protocol)
+#
+#  2) Start IO thread on Slave which will start a dump thread on Master.
+#
+#  3) Restart the IO thread (Master should kill existing dump thread before
+#     starting a new dump thread)
+#
+#  4) Now count the number of dump threads on Master, it should be only '1'.
+#
+###############################################################################
+--source include/have_debug.inc
+--source include/have_binlog_format_statement.inc
+--let rpl_skip_start_slave= 1
+--source include/master-slave.inc
+
+# When this test script is running in combination with other tests,
+# it is possible that dump threads from those tests are not killed.
+# (rpl_end.inc does not kill dump threads).
+# Hence doing the cleanup here as this test depends on counting the
+# active dump threads.
+--source include/stop_dump_threads.inc
+
+# Step-1) A simulation point on slave to fake that server MySQL version
+#         is lower than MySQL-5.6 (i.e., no slave_uuid set in initial replication
+#         protocol).
+--source include/rpl_connection_slave.inc
+SET @save_debug = @@GLOBAL.debug;
+SET GLOBAL debug="d,fake_5_5_version_slave";
+
+# Step-2) Start IO thread on Slave which will start a dump thread on Master.
+--source include/start_slave_io.inc
+
+# Step-3) Restart the IO thread (Master should kill existing dump thread before
+#         starting a new dump thread)
+--source include/stop_slave_io.inc
+--source include/start_slave_io.inc
+
+# Step-4) Count the number of dump threads on Master, it should be eventually
+# become '1'.
+--source include/rpl_connection_master.inc
+--let $wait_condition= SELECT COUNT(*) = 1 FROM information_schema.processlist WHERE COMMAND LIKE 'Binlog Dump%'
+--source include/wait_condition.inc
+
+# Cleanup
+--source include/rpl_connection_slave.inc
+SET GLOBAL debug=@save_debug;
+# We do not care about SQL thread for this test scenario
+--let $rpl_only_running_threads= 1
+--source include/rpl_end.inc
diff --git a/mysql-wsrep-5.6/mysql-test/suite/sys_vars/r/innodb_stats_include_delete_marked_basic.result b/mysql-wsrep-5.6/mysql-test/suite/sys_vars/r/innodb_stats_include_delete_marked_basic.result
new file mode 100644 (file)
index 0000000..ffd208e
--- /dev/null
@@ -0,0 +1,25 @@
+SELECT @@innodb_stats_include_delete_marked;
+@@innodb_stats_include_delete_marked
+0
+SET GLOBAL innodb_stats_include_delete_marked=1;
+SELECT @@innodb_stats_include_delete_marked;
+@@innodb_stats_include_delete_marked
+1
+SET SESSION innodb_stats_include_delete_marked=1;
+ERROR HY000: Variable 'innodb_stats_include_delete_marked' is a GLOBAL variable and should be set with SET GLOBAL
+SET GLOBAL innodb_stats_include_delete_marked=100;
+ERROR 42000: Variable 'innodb_stats_include_delete_marked' can't be set to the value of '100'
+SET GLOBAL innodb_stats_include_delete_marked=foo;
+ERROR 42000: Variable 'innodb_stats_include_delete_marked' can't be set to the value of 'foo'
+SET GLOBAL innodb_stats_include_delete_marked=OFF ;
+SELECT @@innodb_stats_include_delete_marked;
+@@innodb_stats_include_delete_marked
+0
+SET GLOBAL innodb_stats_include_delete_marked=ON ;
+SELECT @@innodb_stats_include_delete_marked;
+@@innodb_stats_include_delete_marked
+1
+SET GLOBAL innodb_stats_include_delete_marked=Default ;
+SELECT @@innodb_stats_include_delete_marked;
+@@innodb_stats_include_delete_marked
+0
diff --git a/mysql-wsrep-5.6/mysql-test/suite/sys_vars/t/innodb_stats_include_delete_marked_basic.test b/mysql-wsrep-5.6/mysql-test/suite/sys_vars/t/innodb_stats_include_delete_marked_basic.test
new file mode 100644 (file)
index 0000000..919c426
--- /dev/null
@@ -0,0 +1,53 @@
+ ###############################################################################
+#                                                                             #
+# Variable Name: innodb_stats_include_delete_marked                           #
+# Scope: Global                                                               #
+# Access Type: Dynamic                                                        #
+# Data Type: numeric                                                          #
+#                                                                             #
+#                                                                             #
+# Creation Date: 2016-08-29                                                   #
+# Author : Aditya                                                             #
+#                                                                             #
+#                                                                             #
+# Description:                                                                #
+#              * Value check                                                  #
+#              * Scope check                                                  #
+#                                                                             #
+###############################################################################
+
+--source include/have_innodb.inc
+
+####################################################################
+#   Display default value                                          #
+####################################################################
+SELECT @@innodb_stats_include_delete_marked;
+
+SET GLOBAL innodb_stats_include_delete_marked=1;
+
+SELECT @@innodb_stats_include_delete_marked;
+
+# check error
+--error ER_GLOBAL_VARIABLE
+SET SESSION innodb_stats_include_delete_marked=1;
+
+# check error
+--error ER_WRONG_VALUE_FOR_VAR
+SET GLOBAL innodb_stats_include_delete_marked=100;
+
+# check error
+--error ER_WRONG_VALUE_FOR_VAR
+SET GLOBAL innodb_stats_include_delete_marked=foo;
+
+SET GLOBAL innodb_stats_include_delete_marked=OFF ;
+
+SELECT @@innodb_stats_include_delete_marked;
+
+SET GLOBAL innodb_stats_include_delete_marked=ON ;
+
+SELECT @@innodb_stats_include_delete_marked;
+
+# Check with default setting
+SET GLOBAL innodb_stats_include_delete_marked=Default ;
+
+SELECT @@innodb_stats_include_delete_marked;
index 2ebf990a58a9de2f07bcad0e60a203cab937783f..4b4a11e490f82accc3edfde93db8750ce746d055 100644 (file)
@@ -2118,4 +2118,43 @@ let $test_dir =
 
 --list_files $test_dir `#sql-*.frm`
 
+DROP TABLE t1; 
+
+
+--echo #
+--echo # Bug#19635706
+--echo # Verify that it is possible to add a unique key to a not-NULL POINT 
+--echo # column and that this key is promoted to primary key
+--echo # 
+
+CREATE TABLE t1(a INT NOT NULL, b POINT NOT NULL) ENGINE=INNODB;
+SHOW CREATE TABLE t1;
+ALTER TABLE t1 ADD UNIQUE INDEX (b);
+
+--echo # Note that SHOW CREATE TABLE does not list b as a primary key, 
+--echo # even though it was promoted. This appears to be the case also 
+--echo # for other column types.
+SHOW CREATE TABLE t1;
+
+ALTER TABLE t1 ADD UNIQUE INDEX (a);
+SHOW CREATE TABLE t1;
+
+--echo # Verify that the expected indices have been created by Innodb
+SELECT T.NAME AS TABLE_NAME, I.NAME AS INDEX_NAME, 
+       CASE I.TYPE 
+            WHEN 0 THEN 'Secondary' 
+            WHEN 1 THEN 'Clustered' 
+            WHEN 2 THEN 'Unique' 
+            WHEN 3 THEN 'Primary' 
+            WHEN 32 THEN 'Full text' 
+            WHEN 64 THEN 'Spatial' 
+            ELSE 'Unknown' 
+       END AS INDEX_TYPE, 
+       F.NAME AS FIELD_NAME, F.POS AS FIELD_POS FROM 
+              INFORMATION_SCHEMA.INNODB_SYS_TABLES AS T JOIN 
+              INFORMATION_SCHEMA.INNODB_SYS_INDEXES AS I JOIN 
+              INFORMATION_SCHEMA.INNODB_SYS_FIELDS AS F 
+              ON I.INDEX_ID = F.INDEX_ID AND I.TABLE_ID = T.TABLE_ID 
+       WHERE T.NAME = 'test/t1';
+
 DROP TABLE t1;
index e12201dd870c8385750db310867077cfc61ea23d..4e64670258926e18df45bd1eb04c0697c471e32c 100644 (file)
@@ -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
index 03e2444e16a3993fa3e287137fd56c0f880c8a1a..cebf670cb60d03a9b1403dcaf4e9f985c0f9f0f2 100644 (file)
@@ -1733,6 +1733,15 @@ SELECT id, insert(':', 1, 0, d) FROM t1;
 SELECT id, insert(0x3a, 1, 0, d) FROM t1;
 DROP TABLE t1;
 
+--echo #
+--echo # Bug#22888420 CONCAT_WS: ASSERTION FAILED: !S.USES_BUFFER_OWNED_BY(THIS)
+--echo #
+
+do concat('a',concat_ws('a', 0x2859, 'a' ,
+                        trim(period_add('a',1) from (1&''))
+                        )
+          );
+
 --echo #
 --echo # End of 5.6 tests
 --echo #
index addfd3835adf83361e91d6fd3764c8bd6306c1a2..812414147c5b523172a9ad4a0acc0ac1a4180f68 100644 (file)
@@ -22,12 +22,10 @@ set @save_storage_engine= @@session.default_storage_engine;
 set session default_storage_engine = InnoDB;
 --let $innodb = 1
 
-# Next 2 variables control the JSON format output and validation in explain_utils.
+# Next variable controls the JSON format output in explain_utils.
 # 1 = enable, 0 = disable
 --let $json   = 1
-# Validation disabled due to not having Python with JSON on all PB machines.
---let $validation = 0
---file_exists $MYSQL_TEST_DIR/suite/opt_trace/validate_json.py
+--file_exists $MYSQL_TEST_DIR/suite/opt_trace/validate_json.pl
 
 --source include/explain_non_select.inc
 set default_storage_engine= @save_storage_engine;
index 63ff4d251292b6a53f9e9d6f01b6e4b3afe39ae3..b89bbf7c4d5f0c5ffd37c9f2374266256d2e90ab 100644 (file)
@@ -30,11 +30,9 @@ if (`select locate('mrr', @@optimizer_switch) > 0`)
 set @save_storage_engine= @@session.default_storage_engine;
 set session default_storage_engine = InnoDB;
 --let $innodb = 1
-# Next 2 variables control the JSON format output and validation in explain_utils.
+# Next variable controls the JSON format output in explain_utils.
 # 1 = enable, 0 = disable
 --let $json   = 1
-# Validation disabled due to not having Python with JSON on all PB machines.
---let $validation = 0
 --source include/explain_non_select.inc
 set default_storage_engine= @save_storage_engine;
 
index a8e7bbfa09662c6e3b37042617e1a6d3f8fb8272..0a5df0b65af90a55fa44592aa94f39a300b93684 100644 (file)
@@ -20,9 +20,8 @@ set @save_storage_engine= @@session.default_storage_engine;
 set session default_storage_engine = InnoDB;
 --let $innodb = 1
 
-# json validation in explain_util.inc can be switched off by setting to zero.
+# json format in explain_util.inc can be switched off by setting to zero.
 --let $json = 0
---let $validation = 0
 
 --source include/explain_non_select.inc
 set default_storage_engine= @save_storage_engine;
index e2030bd82727336af0bbe726ac854d3d4c542378..0a039d1ebd285ef79857ac649caa93754cb92826 100644 (file)
@@ -29,7 +29,6 @@ set @save_storage_engine= @@session.default_storage_engine;
 set session default_storage_engine = InnoDB;
 --let $innodb = 1
 --let $json = 0
---let $validation = 0
 --source include/explain_non_select.inc
 set default_storage_engine= @save_storage_engine;
 
index 35c82321395ca3ae990202e2f64606e1fa92a301..fff8d49e2151b301ceec24ac8a5640f590588814 100644 (file)
@@ -591,3 +591,25 @@ UPDATE t1, t2 SET t2.fld2= t2.fld2 + 3;
 UPDATE t1, t2 SET t1.fld1= t1.fld1 + 3;
 
 DROP TABLE t2, t1;
+
+
+--echo #
+--echo # BUG#22037930: INSERT IGNORE FAILS TO IGNORE FOREIGN
+--echo #               KEY CONSTRAINT
+
+CREATE TABLE t1 (fld1 INT PRIMARY KEY) ENGINE= INNODB;
+
+CREATE TABLE t2 (fld1 VARCHAR(10), fld2 INT NOT NULL,
+CONSTRAINT fk FOREIGN KEY (fld2) REFERENCES t1(fld1)) ENGINE= INNODB;
+
+--echo # Without patch, reports incorrect error.
+--error ER_NO_REFERENCED_ROW_2
+INSERT INTO t2 VALUES('abc', 2) ON DUPLICATE KEY UPDATE fld1= 'def';
+--error ER_NO_REFERENCED_ROW_2
+REPLACE INTO t2 VALUES('abc', 2);
+
+--enable_warnings
+INSERT IGNORE INTO t2 VALUES('abc', 2) ON DUPLICATE KEY UPDATE fld1= 'def';
+--disable_warnings
+
+DROP TABLE t2, t1;
index 040e9880828f7924eed63d0b245c86eb6f29e299..822c96fcd753d08201fac7a897f7f67d9b005066 100644 (file)
@@ -15,11 +15,9 @@ set optimizer_switch='semijoin=on,materialization=on,firstmatch=on,loosescan=on,
 
 set @save_storage_engine= @@session.default_storage_engine;
 set session default_storage_engine = MyISAM;
-# Next 2 variables control the JSON format output and validation in explain_utils.
+# Next variable controls the JSON format output in explain_utils.
 # 1 = enable, 0 = disable
 --let $json   = 1
-# Validation disabled due to not having Python with JSON on all PB machines.
---let $validation = 0
 --source include/explain_non_select.inc
 set default_storage_engine= @save_storage_engine;
 
index a99407e1da59b6d6c48a17cbf9dc74a6765819e1..d5ac303d3b00a211e6b21f542f56b20a104dc550 100644 (file)
@@ -25,11 +25,9 @@ if (`select locate('mrr', @@optimizer_switch) > 0`)
 
 set @save_storage_engine= @@session.default_storage_engine;
 set session default_storage_engine = MyISAM;
-# Next 2 variables control the JSON format output and validation in explain_utils.
+# Next variable controls the JSON format output in explain_utils.
 # 1 = enable, 0 = disable
 --let $json   = 1
-# Validation disabled due to not having Python with JSON on all PB machines.
---let $validation = 0
 --source include/explain_non_select.inc
 set default_storage_engine= @save_storage_engine;
 
index 0b77e643b9ef06118b223d05196acc8a8fd23eec..d6d715d299ec3a2ea5f1abafdcf9ce01a20b5307 100644 (file)
@@ -14,7 +14,6 @@ set optimizer_switch='semijoin=on,materialization=on,firstmatch=on,loosescan=on,
 set @save_storage_engine= @@session.default_storage_engine;
 set session default_storage_engine = MyISAM;
 --let $json = 0
---let $validation = 0
 --source include/explain_non_select.inc
 set default_storage_engine= @save_storage_engine;
 
index b585dfa3e7947bacbdd20aaccaeb900895bfcb92..ca0b25062e24fcb5157abd3b12b7e757bc0bea7d 100644 (file)
@@ -24,7 +24,6 @@ if (`select locate('mrr', @@optimizer_switch) > 0`)
 set @save_storage_engine= @@session.default_storage_engine;
 set session default_storage_engine = MyISAM;
 --let $json = 0
---let $validation = 0
 --source include/explain_non_select.inc
 set default_storage_engine= @save_storage_engine;
 
diff --git a/mysql-wsrep-5.6/mysql-test/t/mysql_client_test_qcache-master.opt b/mysql-wsrep-5.6/mysql-test/t/mysql_client_test_qcache-master.opt
new file mode 100644 (file)
index 0000000..a00258b
--- /dev/null
@@ -0,0 +1 @@
+--query_cache_type=1
diff --git a/mysql-wsrep-5.6/mysql-test/t/mysql_client_test_qcache.test b/mysql-wsrep-5.6/mysql-test/t/mysql_client_test_qcache.test
new file mode 100644 (file)
index 0000000..8b3a6eb
--- /dev/null
@@ -0,0 +1,21 @@
+# This test should work in embedded server after we fix mysqltest
+-- source include/not_embedded.inc
+
+--echo # Bug#22559575 "the statement (1) has no open cursor" pops sometimes with
+--echo # prepared+query_cache
+--echo #
+--echo # Create relevent tables and call C API test cases
+--echo # Setup
+
+select VARIABLE_VALUE into @qcache_hit_val1 from
+  information_schema.GLOBAL_STATUS  where VARIABLE_NAME = 'Qcache_hits';
+
+--echo
+--echo #Run C_API test case
+--exec echo "$MYSQL_CLIENT_TEST --silent test_bug22559575" > $MYSQLTEST_VARDIR/log/mysql_client_test_qcache.out.log 2>&1
+--exec $MYSQL_CLIENT_TEST --silent test_bug22559575 >> $MYSQLTEST_VARDIR/log/mysql_client_test_qcache.out.log 2>&1
+
+select VARIABLE_VALUE into @qcache_hit_val2 from
+  information_schema.GLOBAL_STATUS  where VARIABLE_NAME = 'Qcache_hits';
+SELECT @qcache_hit_val2 - @qcache_hit_val1;
+
index e11ddfbb7a2288ddbb3d274b9029407ca583ce4e..4fe1458fc17921a50c0a068382ebdacbc3567464 100644 (file)
@@ -203,3 +203,19 @@ DROP USER test_user1, test_user2;
 
 --echo #### End of test ####
 
+
+--echo #
+--echo # Bug #24557925: MYSQL_CONFIG_EDITOR CAN MAKE SERVER UNBOOTABLE
+--echo #
+
+
+--exec $MYSQL_CONFIG_EDITOR set --login-path=mysqld --host=test_user5
+
+--echo # Restarting the server. Should work
+--source include/restart_mysqld.inc
+
+--echo # Cleanup
+--exec $MYSQL_CONFIG_EDITOR remove --login-path=mysqld
+--remove_file $MYSQL_TEST_LOGIN_FILE
+
+--echo # End of 5.6 tests
index 726df628bf13da17d6eb3b6683be90e6e36b137a..adfa14457e9e4d63ab81b8854e8359961dd58c5b 100644 (file)
@@ -374,7 +374,7 @@ FLUSH LOGS;
 --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
 eval SELECT
 (@a:=LOAD_FILE("$binlog_file"))
-IS NOT NULL;
+IS NOT NULL AS Loaded;
 let $s_id_unsigned= `SELECT @a LIKE "%server id $s_id_max%" /* must return 1 */`;
 echo *** Unsigned server_id $s_id_max is found: $s_id_unsigned ***;
 
index 0c836a7b06aac9505e3d395d57541e15204bcf65..d5c55dacd61b3665acaa460a3a9a128f81c563eb 100644 (file)
@@ -74,6 +74,8 @@ DROP TABLE t1, t2;
 -- echo # test.t1 have partitions in mysqltest2-directory!
 -- echo # user root:
   CREATE USER mysqltest_1@localhost;
+-- echo # Need FILE permission to use external datadir or indexdir.
+  GRANT FILE ON *.* TO mysqltest_1@localhost;
   CREATE DATABASE mysqltest2;
   USE mysqltest2;
   CREATE TABLE t1 (a INT) ENGINE = MyISAM;
index 966c59a578925282bc2cdebdfd0a3d69bb04877e..f835b3fa2df8d5baab3f496c73156d199bf7d910 100644 (file)
@@ -388,3 +388,41 @@ DROP TABLE t1, t2;
 
 --echo End of 5.0 tests
 
+--echo #
+--echo # Bug#21142859: FUNCTION UPDATING A VIEW FAILS TO FIND TABLE THAT ACTUALLY EXISTS
+--echo #
+
+CREATE TABLE t1 SELECT 1 AS fld1, 'A' AS fld2;
+CREATE TABLE t2 (fld3 INT, fld4 CHAR(1));
+
+CREATE VIEW v1 AS SELECT * FROM t1;
+
+CREATE TRIGGER t1_au AFTER UPDATE ON t1
+FOR EACH ROW INSERT INTO t2 VALUES (new.fld1, new.fld2);
+
+DELIMITER !;
+CREATE FUNCTION f1() RETURNS INT
+BEGIN
+ UPDATE v1 SET fld2='B' WHERE fld1=1;
+ RETURN row_count();
+END !
+DELIMITER ;!
+
+--echo # Without the patch, an error was getting reported.
+SELECT f1();
+
+DROP FUNCTION f1;
+DROP VIEW v1;
+DROP TABLE t1,t2;
+
+--echo #
+--echo # Bug #16672723 "CAN'T FIND TEMPORARY TABLE".
+--echo #
+CREATE FUNCTION f1() RETURNS INT RETURN 1;
+CREATE TEMPORARY TABLE tmp1(a INT);
+PREPARE stmt1 FROM "CREATE TEMPORARY TABLE tmp2 AS SELECT b FROM (SELECT f1() AS b FROM tmp1) AS t";
+--echo # The below statement failed before the fix.
+EXECUTE stmt1;
+DROP TEMPORARY TABLES tmp1, tmp2;
+DEALLOCATE PREPARE stmt1;
+DROP FUNCTION f1;
diff --git a/mysql-wsrep-5.6/mysql-test/t/ssl_ca-master.opt b/mysql-wsrep-5.6/mysql-test/t/ssl_ca-master.opt
new file mode 100644 (file)
index 0000000..9bd4757
--- /dev/null
@@ -0,0 +1,3 @@
+--ssl-ca=$MYSQL_TEST_DIR/std_data/crl-ca-cert.pem
+--ssl-key=$MYSQL_TEST_DIR/std_data/crl-server-key.pem
+--ssl-cert=$MYSQL_TEST_DIR/std_data/crl-server-cert.pem
diff --git a/mysql-wsrep-5.6/mysql-test/t/ssl_ca.test b/mysql-wsrep-5.6/mysql-test/t/ssl_ca.test
new file mode 100644 (file)
index 0000000..bc6ef55
--- /dev/null
@@ -0,0 +1,32 @@
+--source include/have_ssl.inc
+--source include/not_embedded.inc
+
+--echo #
+--echo # Bug#21920657: SSL-CA FAILS SILENTLY IF THE PATH CANNOT BE FOUND
+--echo #
+
+--echo # try to connect with wrong '--ssl-ca' path : should fail
+--error 1
+--exec $MYSQL --ssl-ca=$MYSQL_TEST_DIR/std_data/wrong-crl-ca-cert.pem --ssl-key=$MYSQL_TEST_DIR/std_data/crl-client-key.pem --ssl-cert=$MYSQL_TEST_DIR/std_data/crl-client-cert.pem test -e "SHOW STATUS LIKE 'Ssl_cipher'" 2>&1
+
+--echo # try to connect with correct '--ssl-ca' path : should connect
+--exec $MYSQL --ssl-ca=$MYSQL_TEST_DIR/std_data/crl-ca-cert.pem --ssl-key=$MYSQL_TEST_DIR/std_data/crl-client-key.pem --ssl-cert=$MYSQL_TEST_DIR/std_data/crl-client-cert.pem test -e "SHOW STATUS LIKE 'Ssl_cipher'"
+
+--echo #
+--echo # Bug#21920678: SSL-CA DOES NOT ACCEPT ~USER TILDE HOME DIRECTORY
+--echo #               PATH SUBSTITUTION
+--echo #
+
+--let $mysql_test_dir_path= `SELECT REPLACE('$MYSQL_TEST_DIR', '$HOME', '~')`
+
+--echo # try to connect with '--ssl-ca' option using tilde home directoy
+--echo # path substitution : should connect
+--exec $MYSQL --ssl-ca=$mysql_test_dir_path/std_data/crl-ca-cert.pem --ssl-key=$MYSQL_TEST_DIR/std_data/crl-client-key.pem --ssl-cert=$MYSQL_TEST_DIR/std_data/crl-client-cert.pem test -e "SHOW STATUS LIKE 'Ssl_cipher'"
+
+--echo # try to connect with '--ssl-key' option using tilde home directoy
+--echo # path substitution : should connect
+--exec $MYSQL --ssl-ca=$MYSQL_TEST_DIR/std_data/crl-ca-cert.pem --ssl-key=$mysql_test_dir_path/std_data/crl-client-key.pem --ssl-cert=$MYSQL_TEST_DIR/std_data/crl-client-cert.pem test -e "SHOW STATUS LIKE 'Ssl_cipher'"
+
+--echo # try to connect with '--ssl-cert' option using tilde home directoy
+--echo # path substitution : should connect
+--exec $MYSQL --ssl-ca=$MYSQL_TEST_DIR/std_data/crl-ca-cert.pem --ssl-key=$MYSQL_TEST_DIR/std_data/crl-client-key.pem --ssl-cert=$mysql_test_dir_path/std_data/crl-client-cert.pem test -e "SHOW STATUS LIKE 'Ssl_cipher'"
index ce54e42dcd320516f1989de78ee0fe7a7b63de69..81da28a0b3ea8fab5e0b33a537d0b2c191f1d04c 100644 (file)
@@ -21,3 +21,20 @@ if (!$crllen)
 --replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
 --error 1
 --exec $MYSQL --ssl-ca=$MYSQL_TEST_DIR/std_data/crl-ca-cert.pem --ssl-key=$MYSQL_TEST_DIR/std_data/crl-client-revoked-key.pem --ssl-cert=$MYSQL_TEST_DIR/std_data/crl-client-revoked-cert.pem test -e "SHOW VARIABLES like '%ssl%';"
+
+--echo #
+--echo # Bug#21920678: SSL-CA DOES NOT ACCEPT ~USER TILDE HOME DIRECTORY
+--echo #               PATH SUBSTITUTION
+--echo #
+
+--let $mysql_test_dir_path= `SELECT REPLACE('$MYSQL_TEST_DIR', '$HOME', '~')`
+
+--echo # try to connect with '--ssl-crl' option using tilde home directoy
+--echo # path substitution : should connect
+--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
+--exec $MYSQL --ssl-ca=$MYSQL_TEST_DIR/std_data/crl-ca-cert.pem --ssl-key=$MYSQL_TEST_DIR/std_data/crl-client-key.pem --ssl-cert=$MYSQL_TEST_DIR/std_data/crl-client-cert.pem test --ssl-crl=$mysql_test_dir_path/std_data/crl-client-revoked.crl -e "SHOW STATUS LIKE 'Ssl_cipher'"
+
+--echo # try to connect with '--ssl-crlpath' option using tilde home directoy
+--echo # path substitution : should connect
+--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
+--exec $MYSQL --ssl-ca=$MYSQL_TEST_DIR/std_data/crl-ca-cert.pem --ssl-key=$MYSQL_TEST_DIR/std_data/crl-client-key.pem --ssl-cert=$MYSQL_TEST_DIR/std_data/crl-client-cert.pem --ssl-crlpath=$mysql_test_dir_path/std_data/crldir test -e "SHOW STATUS LIKE 'Ssl_cipher'"
diff --git a/mysql-wsrep-5.6/mysql-test/t/udf_services-master.opt b/mysql-wsrep-5.6/mysql-test/t/udf_services-master.opt
new file mode 100644 (file)
index 0000000..fad7015
--- /dev/null
@@ -0,0 +1 @@
+$TESTUDFSERVICES_OPT
diff --git a/mysql-wsrep-5.6/mysql-test/t/udf_services.test b/mysql-wsrep-5.6/mysql-test/t/udf_services.test
new file mode 100644 (file)
index 0000000..91e43e7
--- /dev/null
@@ -0,0 +1,25 @@
+--source include/not_embedded.inc
+
+--echo #
+--echo # Bug #20085672: CRYPTIC ERROR WHEN FAILING TO UNLOAD A DYNAMIC LIBRARY
+--echo #
+
+--echo # Install the plugin
+--replace_result $TESTUDFSERVICES TESTUDFSERVICES
+eval INSTALL PLUGIN test_udf_services SONAME '$TESTUDFSERVICES';
+
+--echo # Define the function
+--replace_result $TESTUDFSERVICES TESTUDFSERVICES
+eval CREATE FUNCTION test_udf_services_udf RETURNS INT
+  SONAME "$TESTUDFSERVICES";
+
+--echo # Uninstall the plugin
+UNINSTALL PLUGIN test_udf_services;
+
+--echo # Install the plugin again. Should not fail
+--replace_result $TESTUDFSERVICES TESTUDFSERVICES
+eval INSTALL PLUGIN test_udf_services SONAME '$TESTUDFSERVICES';
+
+--echo # Cleanup
+DROP FUNCTION test_udf_services_udf;
+UNINSTALL PLUGIN test_udf_services;
index 94a738314fcc7b4758721f253abb9f5bddae33c4..c1795e2f14a0d0fa60456bc4ffcd4af0b3bfd19e 100644 (file)
@@ -264,6 +264,23 @@ SET @@global.validate_password_policy=DEFAULT;
 remove_file $MYSQLTEST_VARDIR/tmp/dictionary.txt;
 remove_file $MYSQLTEST_VARDIR/tmp/dictionary2.txt;
 
+--echo #
+--echo # Bug#21616496: CREATE USER ACCEPTS PLUGIN AND PASSWORD HASH,
+--echo #               BUT IGNORES THE PASSWORD HASH
+--echo #
+
+--error ER_NOT_VALID_PASSWORD
+CREATE USER 'user1'@'localhost' IDENTIFIED WITH 'mysql_native_password';
+
+--error ER_NOT_VALID_PASSWORD
+CREATE USER 'user1'@'localhost' IDENTIFIED WITH 'mysql_old_password';
+
+--error ER_NOT_VALID_PASSWORD
+CREATE USER 'user1'@'localhost' IDENTIFIED WITH 'mysql_native_password' AS '*0D3CED9BEC10A777AEC23CCC353A8C08A633045E';
+
+--error ER_NOT_VALID_PASSWORD
+CREATE USER 'user1'@'localhost' IDENTIFIED WITH 'mysql_old_password' AS '*0D3CED9BEC10A777AEC23CCC353A8C08A633045E';
+
 --echo # clean up after the test
 UNINSTALL PLUGIN validate_password;
 
diff --git a/mysql-wsrep-5.6/mysql-test/t/variables-win.test b/mysql-wsrep-5.6/mysql-test/t/variables-win.test
new file mode 100644 (file)
index 0000000..ddb92c6
--- /dev/null
@@ -0,0 +1,15 @@
+--source include/windows.inc
+
+
+--echo #
+--echo # Bug #23747899: @@basedir sysvar value not normalized if set through
+--echo #  the command line/ini file
+
+--echo # There should be no slashes in @@basedir and just backslashes
+--echo #   since it's normalized
+SELECT
+  LOCATE('/', @@basedir) <> 0 AS have_slashes,
+  LOCATE('\\', @@basedir) <> 0 AS have_backslashes;
+
+
+--echo End of the 5.6 tests
index 3ef9c2bc9aa4db239f4af72ba1f58bf4d142544c..86d5e4bc2c3c06f71777fb352aeafdc674d45933 100644 (file)
@@ -80,6 +80,9 @@ perl;
   my $count_warnings= $count_warnings;
   print "Deprecation warning count : $count_warnings\n";
   close(FILE);
+  # Truncate the log file so that repititions of the test don't pick up deprecation warnings from previous runs
+  open(FILE,">$logf") or die("Unable to open $logf for truncation $!\n");
+  close(FILE);
 EOF
 
 -- source include/mysql_upgrade_preparation.inc
index 2bff5ebe8405107c75028709e36643cdc0a81b5b..a03643a9bb5ac1f7b0f5b9a0fdada24a83a5e9a0 100644 (file)
    fun:my_b_flush_io_cache
    fun:_my_b_write
    fun:_Z*10write_keysP10Sort_paramP13Filesort_infojP11st_io_cacheS4_
-   fun:_Z*13find_all_keysP10Sort_paramP10SQL_SELECTP13Filesort_infoP11st_io_cacheS6_P13Bounded_queueIhhEPy
+   ...
    fun:_Z8filesortP3THDP5TABLEP8FilesortbPyS5_
 }
 
    fun:malloc_info
 }
 
-{
-   GitHub codership/mysql-wsrep#176
-   Memcheck:Leak
-   fun:_Z16wsrep_get_paramsRKN6galera10ReplicatorE
-   fun:galera_parameters_get
-   fun:_ZL24refresh_provider_optionsv
-   fun:_Z29wsrep_provider_options_updateP7sys_varP3THD13enum_var_type
-   fun:_ZN7sys_var6updateEP3THDP7set_var
-   fun:_ZN7set_var6updateEP3THD
-   fun:_Z17sql_set_variablesP3THDP4ListI12set_var_baseE
-   fun:_Z21mysql_execute_commandP3THD
-   fun:_Z11mysql_parseP3THDPcjP12Parser_state
-   fun:_ZL17wsrep_mysql_parseP3THDPcjP12Parser_state
-   fun:_Z16dispatch_command19enum_server_commandP3THDPcj
-   fun:_Z10do_commandP3THD
-   fun:_Z24do_handle_one_connectionP3THD
-   fun:handle_one_connection
-}
-
 {
    GitHub codership/galera#330
    Memcheck:Leak
@@ -1046,31 +1027,6 @@ g   codership/mysql-wsrep/issues#176
    fun:_Z16wsrep_set_paramsRN6galera10ReplicatorEPKc
 }
 
-{
-   codership/mysql-wsrep/issues#176
-   Memcheck:Leak
-   fun:_Z16wsrep_get_paramsRKN6galera10ReplicatorE
-}
-
-{
-   codership/mysql-wsrep/issues#176
-   Memcheck:Leak
-   fun:_Z16wsrep_get_paramsRKN6galera10ReplicatorE
-   fun:galera_parameters_get
-   fun:_ZL24refresh_provider_optionsv
-   fun:_Z21wsrep_provider_updateP7sys_varP3THD13enum_var_type
-   fun:_ZN7sys_var6updateEP3THDP7set_var
-   fun:_ZN7set_var6updateEP3THD
-   fun:_Z17sql_set_variablesP3THDP4ListI12set_var_baseE
-   fun:_Z21mysql_execute_commandP3THD
-   fun:_Z11mysql_parseP3THDPcjP12Parser_state
-   fun:_ZL17wsrep_mysql_parseP3THDPcjP12Parser_state
-   fun:_Z16dispatch_command19enum_server_commandP3THDPcj
-   fun:_Z10do_commandP3THD
-   fun:_Z24do_handle_one_connectionP3THD
-   fun:handle_one_connection
-}
-
 {
    codership/mysql-wsrep/issues#176
    Memcheck:Leak
@@ -1181,72 +1137,6 @@ g   codership/mysql-wsrep/issues#176
    fun:_Z24do_handle_one_connectionP3THD
 }
 
-{
-   codership/mysql-wsrep/issues#176
-   Memcheck:Leak
-   match-leak-kinds: possible
-   fun:malloc
-   fun:strdup
-   fun:_Z16wsrep_get_paramsRKN6galera10ReplicatorE
-   fun:galera_parameters_get
-   fun:_ZL24refresh_provider_optionsv
-   fun:_Z29wsrep_provider_options_updateP7sys_varP3THD13enum_var_type
-   fun:_ZN7sys_var6updateEP3THDP7set_var
-   fun:_ZN7set_var6updateEP3THD
-   fun:_Z17sql_set_variablesP3THDP4ListI12set_var_baseE
-   fun:_Z21mysql_execute_commandP3THD
-   fun:_Z11mysql_parseP3THDPcjP12Parser_state
-   fun:_ZL17wsrep_mysql_parseP3THDPcjP12Parser_state
-   fun:_Z16dispatch_command19enum_server_commandP3THDPcj
-   fun:_Z10do_commandP3THD
-   fun:_Z24do_handle_one_connectionP3THD
-   fun:handle_one_connection
-}
-
-{
-   codership/mysql-wsrep/issues#176
-   Memcheck:Leak
-   match-leak-kinds: definite
-   fun:malloc
-   fun:strdup
-   fun:_Z16wsrep_get_paramsRKN6galera10ReplicatorE
-   fun:galera_parameters_get
-   fun:_ZL24refresh_provider_optionsv
-   fun:_Z29wsrep_provider_options_updateP7sys_varP3THD13enum_var_type
-   fun:_ZN7sys_var6updateEP3THDP7set_var
-   fun:_ZN7set_var6updateEP3THD
-   fun:_Z17sql_set_variablesP3THDP4ListI12set_var_baseE
-   fun:_Z21mysql_execute_commandP3THD
-   fun:_Z11mysql_parseP3THDPcjP12Parser_state
-   fun:_ZL17wsrep_mysql_parseP3THDPcjP12Parser_state
-   fun:_Z16dispatch_command19enum_server_commandP3THDPcj
-   fun:_Z10do_commandP3THD
-   fun:_Z24do_handle_one_connectionP3THD
-   fun:handle_one_connection
-}
-
-{
-   codership/mysql-wsrep/issues#176
-   Memcheck:Leak
-   match-leak-kinds: definite
-   fun:malloc
-   fun:strdup
-   fun:_Z16wsrep_get_paramsRKN6galera10ReplicatorE
-   fun:galera_parameters_get
-   fun:_ZL24refresh_provider_optionsv
-   fun:_Z21wsrep_provider_updateP7sys_varP3THD13enum_var_type
-   fun:_ZN7sys_var6updateEP3THDP7set_var
-   fun:_ZN7set_var6updateEP3THD
-   fun:_Z17sql_set_variablesP3THDP4ListI12set_var_baseE
-   fun:_Z21mysql_execute_commandP3THD
-   fun:_Z11mysql_parseP3THDPcjP12Parser_state
-   fun:_ZL17wsrep_mysql_parseP3THDPcjP12Parser_state
-   fun:_Z16dispatch_command19enum_server_commandP3THDPcj
-   fun:_Z10do_commandP3THD
-   fun:_Z24do_handle_one_connectionP3THD
-   fun:handle_one_connection
-}
-
 {
    codership/galera#331
    Memcheck:Leak
index b880111d737e5243a328123e042f83218f932fc2..0969842e741013e02c657f936eb071a7aa02db5b 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2006, 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
@@ -60,7 +60,7 @@ ENDIF()
 
 ADD_CONVENIENCE_LIBRARY(mysys ${MYSYS_SOURCES})
 TARGET_LINK_LIBRARIES(mysys dbug strings ${ZLIB_LIBRARY} 
- ${LIBNSL} ${LIBM} ${LIBRT})
+ ${LIBNSL} ${LIBM} ${LIBRT} ${LIBEXECINFO})
 DTRACE_INSTRUMENT(mysys)
 
 # Need explicit pthread for gcc -fsanitize=address
index ab8991ff41c19871f12a5357beca8321fd64b93b..0c95d840aea71aee4d409b0aa4527fc4f34b7906 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 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
@@ -161,7 +161,7 @@ extern CHARSET_INFO my_charset_utf8mb4_vietnamese_ci;
 
 #endif /* HAVE_UCA_COLLATIONS */
 
-my_bool init_compiled_charsets(myf flags __attribute__((unused)))
+my_bool init_compiled_charsets(myf flags MY_ATTRIBUTE((unused)))
 {
   CHARSET_INFO *cs;
 
index d98dc774d8b01acb370073025acad116cf846f78..9d9a4ce6eb496fc9f5932e19c4e5e0f832265b47 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 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
@@ -357,8 +357,8 @@ static int add_collation(CHARSET_INFO *cs)
   Be silent by default: no warnings on the client side.
 */
 static void
-default_reporter(enum loglevel level  __attribute__ ((unused)),
-                 const char *format  __attribute__ ((unused)),
+default_reporter(enum loglevel level  MY_ATTRIBUTE ((unused)),
+                 const char *format  MY_ATTRIBUTE ((unused)),
                  ...)
 {
 }
@@ -1040,3 +1040,22 @@ size_t escape_quotes_for_mysql(CHARSET_INFO *charset_info,
   *to= 0;
   return overflow ? (ulong)~0 : (ulong) (to - to_start);
 }
+
+#if defined(EXPORT_SYMVER16)
+#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
+#endif  /* EXPORT_SYMVER16 */
index 963ccb3ff789c1a179a35ff27d9525484c260c08..2209a8a3c25511cd98b7238632e35859bab258ff 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 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
index 65db784c4ef6e5704dd06368382140490dd08253..0bf2f36c97a29651a08b2a2a261f6473f35a7e63 100644 (file)
@@ -1,5 +1,5 @@
 /* QQ: TODO multi-pinbox */
-/* Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2006, 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
   as necessary, old are pushed in the stack for reuse. ABA is solved by
   versioning a pointer - because we use an array, a pointer to pins is 16 bit,
   upper 16 bits are used for a version.
-
-  It is assumed that pins belong to a THD and are not transferable
-  between THD's (LF_PINS::stack_ends_here being a primary reason
-  for this limitation).
 */
-#include <my_global.h>
-#include <my_sys.h>
-#include <lf.h>
+
+#include "lf.h"
+#include "mysys_priv.h" /* key_memory_lf_node */
 
 #define LF_PINBOX_MAX_PINS 65536
 
@@ -139,14 +135,9 @@ void lf_pinbox_destroy(LF_PINBOX *pinbox)
   DESCRIPTION
     get a new LF_PINS structure from a stack of unused pins,
     or allocate a new one out of dynarray.
-
-  NOTE
-    It is assumed that pins belong to a thread and are not transferable
-    between threads.
 */
 LF_PINS *_lf_pinbox_get_pins(LF_PINBOX *pinbox)
 {
-  struct st_my_thread_var *var;
   uint32 pins, next, top_ver;
   LF_PINS *el;
   /*
@@ -156,7 +147,7 @@ LF_PINS *_lf_pinbox_get_pins(LF_PINBOX *pinbox)
     pinstack_top_ver is 32 bits; 16 low bits are the index in the
     array, to the first element of the list. 16 high bits are a version
     (every time the 16 low bits are updated, the 16 high bits are
-    incremented). Versioniong prevents the ABA problem.
+    incremented). Versioning prevents the ABA problem.
   */
   top_ver= pinbox->pinstack_top_ver;
   do
@@ -189,12 +180,6 @@ LF_PINS *_lf_pinbox_get_pins(LF_PINBOX *pinbox)
   el->link= pins;
   el->purgatory_count= 0;
   el->pinbox= pinbox;
-  var= my_thread_var;
-  /*
-    Threads that do not call my_thread_init() should still be
-    able to use the LF_HASH.
-  */
-  el->stack_ends_here= (var ? & var->stack_ends_here : NULL);
   return el;
 }
 
@@ -244,22 +229,21 @@ void _lf_pinbox_put_pins(LF_PINS *pins)
   } while (!my_atomic_cas32((int32 volatile*) &pinbox->pinstack_top_ver,
                             (int32*) &top_ver,
                             top_ver-pins->link+nr+LF_PINBOX_MAX_PINS));
-  return;
 }
 
-static int ptr_cmp(void **a, void **b)
+/*
+  Get the next pointer in the purgatory list.
+  Note that next_node is not used to avoid the extra volatile.
+*/
+#define pnext_node(P, X) (*((void **)(((char *)(X)) + (P)->free_ptr_offset)))
+
+static inline void add_to_purgatory(LF_PINS *pins, void *addr)
 {
-  return *a < *b ? -1 : *a == *b ? 0 : 1;
+  pnext_node(pins->pinbox, addr)= pins->purgatory;
+  pins->purgatory= addr;
+  pins->purgatory_count++;
 }
 
-#define add_to_purgatory(PINS, ADDR)                                    \
-  do                                                                    \
-  {                                                                     \
-    *(void **)((char *)(ADDR)+(PINS)->pinbox->free_ptr_offset)=         \
-      (PINS)->purgatory;                                                \
-    (PINS)->purgatory= (ADDR);                                          \
-    (PINS)->purgatory_count++;                                          \
-  } while (0)
 
 /*
   Free an object allocated via pinbox allocator
@@ -271,145 +255,88 @@ static int ptr_cmp(void **a, void **b)
 void _lf_pinbox_free(LF_PINS *pins, void *addr)
 {
   add_to_purgatory(pins, addr);
-  if (pins->purgatory_count % LF_PURGATORY_SIZE)
+  if (pins->purgatory_count % LF_PURGATORY_SIZE == 0)
     _lf_pinbox_real_free(pins);
 }
 
-struct st_harvester {
-  void **granary;
-  int npins;
+struct st_match_and_save_arg {
+  LF_PINS *pins;
+  LF_PINBOX *pinbox;
+  void *old_purgatory;
 };
 
 /*
-  callback for _lf_dynarray_iterate:
-  scan all pins of all threads and accumulate all pins
+  Callback for lf_dynarray_iterate:
+  Scan all pins of all threads, for each active (non-null) pin,
+  scan the current thread's purgatory. If present there, move it
+  to a new purgatory. At the end, the old purgatory will contain
+  pointers not pinned by any thread.
 */
-static int harvest_pins(LF_PINS *el, struct st_harvester *hv)
+static int match_and_save(LF_PINS *el, struct st_match_and_save_arg *arg)
 {
   int i;
-  LF_PINS *el_end= el + MY_MIN(hv->npins, LF_DYNARRAY_LEVEL_LENGTH);
+  LF_PINS *el_end= el + LF_DYNARRAY_LEVEL_LENGTH;
   for (; el < el_end; el++)
   {
     for (i= 0; i < LF_PINBOX_PINS; i++)
     {
       void *p= el->pin[i];
       if (p)
-        *hv->granary++= p;
+      {
+        void *cur= arg->old_purgatory;
+        void **list_prev= &arg->old_purgatory;
+        while (cur)
+        {
+          void *next= pnext_node(arg->pinbox, cur);
+
+          if (p == cur)
+          {
+            /* pinned - keeping */
+            add_to_purgatory(arg->pins, cur);
+            /* unlink from old purgatory */
+            *list_prev= next;
+          }
+          else
+            list_prev= (void **)((char *)cur+arg->pinbox->free_ptr_offset);
+          cur= next;
+        }
+        if (!arg->old_purgatory)
+          return 1;
+      }
     }
   }
-  /*
-    hv->npins may become negative below, but it means that
-    we're on the last dynarray page and harvest_pins() won't be
-    called again. We don't bother to make hv->npins() correct
-    (that is 0) in this case.
-  */
-  hv->npins-= LF_DYNARRAY_LEVEL_LENGTH;
   return 0;
 }
 
-/*
-  callback for _lf_dynarray_iterate:
-  scan all pins of all threads and see if addr is present there
-*/
-static int match_pins(LF_PINS *el, void *addr)
-{
-  int i;
-  LF_PINS *el_end= el+LF_DYNARRAY_LEVEL_LENGTH;
-  for (; el < el_end; el++)
-    for (i= 0; i < LF_PINBOX_PINS; i++)
-      if (el->pin[i] == addr)
-        return 1;
-  return 0;
-}
-
-#if STACK_DIRECTION < 0
-#define available_stack_size(CUR,END) (long) ((char*)(CUR) - (char*)(END))
-#else
-#define available_stack_size(CUR,END) (long) ((char*)(END) - (char*)(CUR))
-#endif
-
-#define next_node(P, X) (*((uchar * volatile *)(((uchar *)(X)) + (P)->free_ptr_offset)))
-#define anext_node(X) next_node(&allocator->pinbox, (X))
-
 /*
   Scan the purgatory and free everything that can be freed
 */
 static void _lf_pinbox_real_free(LF_PINS *pins)
 {
-  int npins;
-  void *list;
-  void **addr= NULL;
-  void *first= NULL, *last= NULL;
   LF_PINBOX *pinbox= pins->pinbox;
 
-  npins= pinbox->pins_in_array+1;
+  /* Store info about current purgatory. */
+  struct st_match_and_save_arg arg = {pins, pinbox, pins->purgatory};
+  /* Reset purgatory. */
+  pins->purgatory= NULL;
+  pins->purgatory_count= 0;
 
-#ifdef HAVE_ALLOCA
-  if (pins->stack_ends_here != NULL)
-  {
-    int alloca_size= sizeof(void *)*LF_PINBOX_PINS*npins;
-    /* create a sorted list of pinned addresses, to speed up searches */
-    if (available_stack_size(&pinbox, *pins->stack_ends_here) > alloca_size)
-    {
-      struct st_harvester hv;
-      addr= (void **) alloca(alloca_size);
-      hv.granary= addr;
-      hv.npins= npins;
-      /* scan the dynarray and accumulate all pinned addresses */
-      _lf_dynarray_iterate(&pinbox->pinarray,
-                           (lf_dynarray_func)harvest_pins, &hv);
-
-      npins= hv.granary-addr;
-      /* and sort them */
-      if (npins)
-        qsort(addr, npins, sizeof(void *), (qsort_cmp)ptr_cmp);
-    }
-  }
-#endif
+  lf_dynarray_iterate(&pinbox->pinarray,
+                      (lf_dynarray_func)match_and_save, &arg);
 
-  list= pins->purgatory;
-  pins->purgatory= 0;
-  pins->purgatory_count= 0;
-  while (list)
+  if (arg.old_purgatory)
   {
-    void *cur= list;
-    list= *(void **)((char *)cur+pinbox->free_ptr_offset);
-    if (npins)
-    {
-      if (addr) /* use binary search */
-      {
-        void **a, **b, **c;
-        for (a= addr, b= addr+npins-1, c= a+(b-a)/2; (b-a) > 1; c= a+(b-a)/2)
-          if (cur == *c)
-            a= b= c;
-          else if (cur > *c)
-            a= c;
-          else
-            b= c;
-        if (cur == *a || cur == *b)
-          goto found;
-      }
-      else /* no alloca - no cookie. linear search here */
-      {
-        if (_lf_dynarray_iterate(&pinbox->pinarray,
-                                 (lf_dynarray_func)match_pins, cur))
-          goto found;
-      }
-    }
-    /* not pinned - freeing */
-    if (last)
-      last= next_node(pinbox, last)= (uchar *)cur;
-    else
-      first= last= (uchar *)cur;
-    continue;
-found:
-    /* pinned - keeping */
-    add_to_purgatory(pins, cur);
+    /* Some objects in the old purgatory were not pinned, free them. */
+    void *last= arg.old_purgatory;
+    while (pnext_node(pinbox, last))
+      last= pnext_node(pinbox, last);
+    pinbox->free_func(arg.old_purgatory, last, pinbox->free_func_arg);
   }
-  if (last)
-    pinbox->free_func(first, last, pinbox->free_func_arg);
 }
 
+#define next_node(P, X) (*((uchar * volatile *)(((uchar *)(X)) + (P)->free_ptr_offset)))
+#define anext_node(X) next_node(&allocator->pinbox, (X))
+
 /* lock-free memory allocator for fixed-size objects */
 
 LF_REQUIRE_PINS(1)
index 545084ea97f8caa69f3a2056839443a22d60953a..10c410e01099a36712ff193d6827fe4ecd62c1a4 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 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
@@ -26,7 +26,7 @@
          this, just remember the file name for later removal
        */
 
-static my_bool cache_remove_open_tmp(IO_CACHE *cache __attribute__((unused)),
+static my_bool cache_remove_open_tmp(IO_CACHE *cache MY_ATTRIBUTE((unused)),
                                     const char *name)
 {
 #if O_TEMPORARY == 0
index da66d458c727911da766daa18280f58e754d3448..015acf2c2cf293d65e76c722ea13ac5866221ef9 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 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
@@ -323,7 +323,7 @@ static void my_aiowait(my_aio_result *result)
 
 my_bool reinit_io_cache(IO_CACHE *info, enum cache_type type,
                        my_off_t seek_offset,
-                       pbool use_async_io __attribute__((unused)),
+                       pbool use_async_io MY_ATTRIBUTE((unused)),
                        pbool clear_cache)
 {
   DBUG_ENTER("reinit_io_cache");
@@ -1129,7 +1129,7 @@ static void copy_to_read_buffer(IO_CACHE *write_cache,
   while (write_length)
   {
     size_t copy_length= MY_MIN(write_length, write_cache->buffer_length);
-    int  __attribute__((unused)) rc;
+    int  MY_ATTRIBUTE((unused)) rc;
 
     rc= lock_io_cache(write_cache, write_cache->pos_in_file);
     /* The writing thread does always have the lock when it awakes. */
@@ -1732,7 +1732,7 @@ int my_block_write(register IO_CACHE *info, const uchar *Buffer, size_t Count,
   unlock_append_buffer(info);
 
 int my_b_flush_io_cache(IO_CACHE *info,
-                        int need_append_buffer_lock __attribute__((unused)))
+                        int need_append_buffer_lock MY_ATTRIBUTE((unused)))
 {
   size_t length;
   my_off_t pos_in_file;
index cf37b45764f55ab0dc49a60e6febbbc4b71c3283..b6758316419c61aa79179745118a06658d03de85 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 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
@@ -2498,8 +2498,8 @@ static void read_block(KEY_CACHE *keycache,
 uchar *key_cache_read(KEY_CACHE *keycache,
                       File file, my_off_t filepos, int level,
                       uchar *buff, uint length,
-                      uint block_length __attribute__((unused)),
-                      int return_buffer __attribute__((unused)))
+                      uint block_length MY_ATTRIBUTE((unused)),
+                      int return_buffer MY_ATTRIBUTE((unused)))
 {
   my_bool locked_and_incremented= FALSE;
   int error=0;
@@ -2979,7 +2979,7 @@ int key_cache_insert(KEY_CACHE *keycache,
 int key_cache_write(KEY_CACHE *keycache,
                     File file, my_off_t filepos, int level,
                     uchar *buff, uint length,
-                    uint block_length  __attribute__((unused)),
+                    uint block_length  MY_ATTRIBUTE((unused)),
                     int dont_write)
 {
   my_bool locked_and_incremented= FALSE;
@@ -4206,7 +4206,7 @@ static int flush_all_key_blocks(KEY_CACHE *keycache)
     0 on success (always because it can't fail)
 */
 
-int reset_key_cache_counters(const char *name __attribute__((unused)),
+int reset_key_cache_counters(const char *name MY_ATTRIBUTE((unused)),
                              KEY_CACHE *key_cache)
 {
   DBUG_ENTER("reset_key_cache_counters");
@@ -4230,9 +4230,9 @@ int reset_key_cache_counters(const char *name __attribute__((unused)),
 /*
   Test if disk-cache is ok
 */
-static void test_key_cache(KEY_CACHE *keycache __attribute__((unused)),
-                           const char *where __attribute__((unused)),
-                           my_bool lock __attribute__((unused)))
+static void test_key_cache(KEY_CACHE *keycache MY_ATTRIBUTE((unused)),
+                           const char *where MY_ATTRIBUTE((unused)),
+                           my_bool lock MY_ATTRIBUTE((unused)))
 {
   /* TODO */
 }
index b49a46f2e788c312d6dfd1a8271b42e2407230c6..cdc66b753b2f86f5b8c23c3608508d9fd29730ee 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2003, 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
@@ -77,7 +77,7 @@ static void safe_hash_entry_free(SAFE_HASH_ENTRY *entry)
 /* Get key and length for a SAFE_HASH_ENTRY */
 
 static uchar *safe_hash_entry_get(SAFE_HASH_ENTRY *entry, size_t *length,
-                                  my_bool not_used __attribute__((unused)))
+                                  my_bool not_used MY_ATTRIBUTE((unused)))
 {
   *length=entry->length;
   return (uchar*) entry->key;
index 62b3e09747fe61ae4bbd979c671a37c4ebea751e..eaab53883a574da1c936001a07c1db0b18318852 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 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
@@ -55,8 +55,8 @@
 */
 
 File create_temp_file(char *to, const char *dir, const char *prefix,
-                     int mode __attribute__((unused)),
-                     myf MyFlags __attribute__((unused)))
+                     int mode MY_ATTRIBUTE((unused)),
+                     myf MyFlags MY_ATTRIBUTE((unused)))
 {
   File file= -1;
 #ifdef __WIN__
index 6777c27bc96543701c0eee36209df31701372ee0..05df11ed8fa60a7bb36a9e1d3d5d4303f6955873 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 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
@@ -24,7 +24,7 @@
   @param to   A pathname.
 */
 
-void to_unix_path(char *to __attribute__((unused)))
+void to_unix_path(char *to MY_ATTRIBUTE((unused)))
 {
 #if FN_LIBCHAR != '/'
   {
index 13ebe51f7db3159c59402e5916a543b1218b88bb..e963866f2e88e2e4806234df7267918b02430bf0 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 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
@@ -187,9 +187,9 @@ static my_bool does_drive_exists(char drive_letter)
  
   @return TRUE if the file name is allowed, FALSE otherwise.
 */
-my_bool is_filename_allowed(const char *name __attribute__((unused)),
-                            size_t length __attribute__((unused)),
-                            my_bool allow_current_dir __attribute__((unused)))
+my_bool is_filename_allowed(const char *name MY_ATTRIBUTE((unused)),
+                            size_t length MY_ATTRIBUTE((unused)),
+                            my_bool allow_current_dir MY_ATTRIBUTE((unused)))
 {
   /* 
     For Windows, check if the file name contains : character.
index fb36d69a43ce103f26aab003f0f6c8718196f47e..582088d8618c06ecead195f39b8e931848ac422f 100644 (file)
@@ -1,5 +1,4 @@
-/* Copyright (C) 2000 MySQL AB
-   Use is subject to license terms
+/* Copyright (c) 2000, 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
@@ -12,7 +11,7 @@
 
    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 */
+   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA */
 
 /* Function to set a varible when we got a alarm */
 /* Used by my_lock samt functions in m_alarm.h */
@@ -24,7 +23,7 @@
 #ifdef HAVE_ALARM
 
        /* ARGSUSED */
-sig_handler my_set_alarm_variable(int signo __attribute__((unused)))
+sig_handler my_set_alarm_variable(int signo MY_ATTRIBUTE((unused)))
 {
   my_have_got_alarm=1;                 /* Tell program that time expired */
   return;
index 731760afd404683875d891f7a31ea570fee8ef58..e689fb356a726a63d4bcbee8db887759139479a6 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 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
@@ -44,7 +44,7 @@
 */
 
 void init_alloc_root(MEM_ROOT *mem_root, size_t block_size,
-                    size_t pre_alloc_size __attribute__((unused)))
+                    size_t pre_alloc_size MY_ATTRIBUTE((unused)))
 {
   DBUG_ENTER("init_alloc_root");
   DBUG_PRINT("enter",("root: 0x%lx", (long) mem_root));
@@ -94,7 +94,7 @@ void init_alloc_root(MEM_ROOT *mem_root, size_t block_size,
 */
 
 void reset_root_defaults(MEM_ROOT *mem_root, size_t block_size,
-                         size_t pre_alloc_size __attribute__((unused)))
+                         size_t pre_alloc_size MY_ATTRIBUTE((unused)))
 {
   DBUG_ASSERT(alloc_root_inited(mem_root));
 
index 7f2888b027a612454d602d4cb488cd643f14132f..d9ecd35ea99232648eda4a72c4bebada6314000a 100644 (file)
@@ -1,5 +1,5 @@
 /*
-   Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved.
+   Copyright (c) 2001, 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
@@ -81,14 +81,14 @@ void create_last_word_mask(MY_BITMAP *map)
 }
 
 
-static inline void bitmap_lock(MY_BITMAP *map __attribute__((unused)))
+static inline void bitmap_lock(MY_BITMAP *map MY_ATTRIBUTE((unused)))
 {
   if (map->mutex)
     mysql_mutex_lock(map->mutex);
 }
 
 
-static inline void bitmap_unlock(MY_BITMAP *map __attribute__((unused)))
+static inline void bitmap_unlock(MY_BITMAP *map MY_ATTRIBUTE((unused)))
 {
   if (map->mutex)
     mysql_mutex_unlock(map->mutex);
@@ -136,7 +136,7 @@ static inline uint get_first_not_set(uint32 value, uint word_pos)
 
 
 my_bool bitmap_init(MY_BITMAP *map, my_bitmap_map *buf, uint n_bits,
-                   my_bool thread_safe __attribute__((unused)))
+                   my_bool thread_safe MY_ATTRIBUTE((unused)))
 {
   DBUG_ENTER("bitmap_init");
   if (!buf)
index dc640a07234393dedcb7b6c70cf62e161fd942ef..e3a933a048d553b4fc74013e48c2355ef370810d 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 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
@@ -147,7 +147,7 @@ static FILE *my_win_freopen(const char *path, const char *mode, FILE *stream)
 
 /* No close operation hook. */
 
-static int no_close(void *cookie __attribute__((unused)))
+static int no_close(void *cookie MY_ATTRIBUTE((unused)))
 {
   return 0;
 }
index 263d8ba8a94c6fb0aff12d40cfc7c0d00cf69fb9..26b6c451f0beff904af81a591eb0643fc9e661c9 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 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
@@ -171,7 +171,7 @@ size_t my_fwrite(FILE *stream, const uchar *Buffer, size_t Count, myf MyFlags)
 /* Seek to position in file */
 
 my_off_t my_fseek(FILE *stream, my_off_t pos, int whence,
-                 myf MyFlags __attribute__((unused)))
+                 myf MyFlags MY_ATTRIBUTE((unused)))
 {
   DBUG_ENTER("my_fseek");
   DBUG_PRINT("my",("stream: 0x%lx  pos: %lu  whence: %d  MyFlags: %d",
@@ -183,7 +183,7 @@ my_off_t my_fseek(FILE *stream, my_off_t pos, int whence,
 
 /* Tell current position of file */
 
-my_off_t my_ftell(FILE *stream, myf MyFlags __attribute__((unused)))
+my_off_t my_ftell(FILE *stream, myf MyFlags MY_ATTRIBUTE((unused)))
 {
   off_t pos;
   DBUG_ENTER("my_ftell");
index 42f5e3ea47822e88366dd214f3b378e771e91635..32b2593f7f1fe897e8eccbf6e688a29c2ec3fd25 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2004, 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
@@ -228,14 +228,14 @@ my_bool my_gethwaddr(uchar *to)
 
 #else /* __FreeBSD__ || __linux__ || __WIN__ */
 /* just fail */
-my_bool my_gethwaddr(uchar *to __attribute__((unused)))
+my_bool my_gethwaddr(uchar *to MY_ATTRIBUTE((unused)))
 {
   return 1;
 }
 #endif
 
 #else /* MAIN */
-int main(int argc __attribute__((unused)),char **argv)
+int main(int argc MY_ATTRIBUTE((unused)),char **argv)
 {
   uchar mac[6];
   uint i;
index 40dc33e3bd24470874062da5b6582428db2551eb..5e9ff149113eef1580feb01198b892213e4d405c 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2004, 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
@@ -170,7 +170,7 @@ ulonglong my_micro_time_and_time(time_t *time_arg)
   @retval current time.
 */
 
-time_t my_time_possible_from_micro(ulonglong microtime __attribute__((unused)))
+time_t my_time_possible_from_micro(ulonglong microtime MY_ATTRIBUTE((unused)))
 {
 #ifdef _WIN32
   time_t t;
index 470be096d79188ed6a871d2c90b05e7d4c28f706..f4d0ebed8f8ca9eb93864227410f9d28c1cde1dd 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 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
 #include       <m_string.h>
 #include       <my_dir.h>      /* Structs used by my_dir,includes sys/types */
 #include       "mysys_err.h"
-#if defined(HAVE_DIRENT_H)
+#if !defined(_WIN32)
 # include <dirent.h>
-# define NAMLEN(dirent) strlen((dirent)->d_name)
-#else
-# define dirent direct
-# define NAMLEN(dirent) (dirent)->d_namlen
-# if defined(HAVE_SYS_NDIR_H)
-#  include <sys/ndir.h>
-# endif
-# if defined(HAVE_SYS_DIR_H)
-#  include <sys/dir.h>
-# endif
-# if defined(HAVE_NDIR_H)
-#  include <ndir.h>
 # endif
-# if defined(_WIN32)
-# ifdef __BORLANDC__
-# include <dir.h>
-# endif
-# endif
-#endif
 
-#if defined(HAVE_READDIR_R)
-#define READDIR(A,B,C) ((errno=readdir_r(A,B,&C)) != 0 || !C)
-#else
-#define READDIR(A,B,C) (!(C=readdir(A)))
-#endif
 
 /*
   We are assuming that directory we are reading is either has less than 
@@ -88,6 +65,8 @@ static int comp_names(struct fileinfo *a, struct fileinfo *b)
 
 #if !defined(_WIN32)
 
+static char* directory_file_name(char *dst, const char *src);
+
 MY_DIR *my_dir(const char *path, myf MyFlags)
 {
   char          *buffer;
@@ -96,17 +75,12 @@ MY_DIR      *my_dir(const char *path, myf MyFlags)
   DYNAMIC_ARRAY *dir_entries_storage;
   MEM_ROOT      *names_storage;
   DIR          *dirp;
-  struct dirent *dp;
   char         tmp_path[FN_REFLEN + 2], *tmp_file;
-  char dirent_tmp[sizeof(struct dirent)+_POSIX_PATH_MAX+1];
+  const struct dirent *dp;
 
   DBUG_ENTER("my_dir");
   DBUG_PRINT("my",("path: '%s' MyFlags: %d",path,MyFlags));
 
-#if !defined(HAVE_READDIR_R)
-  mysql_mutex_lock(&THR_LOCK_open);
-#endif
-
   dirp = opendir(directory_file_name(tmp_path,(char *) path));
 #if defined(__amiga__)
   if ((dirp->dd_fd) < 0)                       /* Directory doesn't exists */
@@ -135,9 +109,7 @@ MY_DIR      *my_dir(const char *path, myf MyFlags)
 
   tmp_file=strend(tmp_path);
 
-  dp= (struct dirent*) dirent_tmp;
-  
-  while (!(READDIR(dirp,(struct dirent*) dirent_tmp,dp)))
+  for (dp= readdir(dirp) ; dp; dp= readdir(dirp))
   {
     if (!(finfo.name= strdup_root(names_storage, dp->d_name)))
       goto error;
@@ -162,9 +134,7 @@ MY_DIR      *my_dir(const char *path, myf MyFlags)
   }
 
   (void) closedir(dirp);
-#if !defined(HAVE_READDIR_R)
-  mysql_mutex_unlock(&THR_LOCK_open);
-#endif
+
   result->dir_entry= (FILEINFO *)dir_entries_storage->buffer;
   result->number_off_files= dir_entries_storage->elements;
   
@@ -174,9 +144,6 @@ MY_DIR      *my_dir(const char *path, myf MyFlags)
   DBUG_RETURN(result);
 
  error:
-#if !defined(HAVE_READDIR_R)
-  mysql_mutex_unlock(&THR_LOCK_open);
-#endif
   my_errno=errno;
   if (dirp)
     (void) closedir(dirp);
@@ -198,7 +165,7 @@ MY_DIR      *my_dir(const char *path, myf MyFlags)
  * Returns pointer to dst;
  */
 
-char * directory_file_name (char * dst, const char *src)
+static char* directory_file_name(char *dst, const char *src)
 {
   /* Process as Unix format: just remove test the final slash. */
   char *end;
@@ -390,7 +357,7 @@ error:
 
 
 int my_fstat(File Filedes, MY_STAT *stat_area,
-             myf MyFlags __attribute__((unused)))
+             myf MyFlags MY_ATTRIBUTE((unused)))
 {
   DBUG_ENTER("my_fstat");
   DBUG_PRINT("my",("fd: %d  MyFlags: %d", Filedes, MyFlags));
index 8ee816b385ae3df40d1b7f3f6d2775f8505b346a..b7f175b5ab0fd5ff7fdfcebcc963451d20912f61 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 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
@@ -15,7 +15,7 @@
 
 #include "mysys_priv.h"
 
-void my_message_stderr(uint error __attribute__((unused)),
+void my_message_stderr(uint error MY_ATTRIBUTE((unused)),
                        const char *str, myf MyFlags)
 {
   DBUG_ENTER("my_message_stderr");
index 142491f3818e07731fa0ba84692715bb2a9a1066..1ce758b4cd7585c3cf8f3fe6f3170330319a916a 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 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
@@ -35,6 +35,9 @@ struct utimbuf {
 
          if MY_REDEL_MAKE_COPY is given, then the orginal file
          is renamed to org_name-'current_time'.BAK
+
+          if MY_REDEL_NO_COPY_STAT is given, stats are not copied
+          from org_name to tmp_name.
        */
 
 #define REDEL_EXT ".BAK"
@@ -46,8 +49,11 @@ int my_redel(const char *org_name, const char *tmp_name, myf MyFlags)
   DBUG_PRINT("my",("org_name: '%s' tmp_name: '%s'  MyFlags: %d",
                   org_name,tmp_name,MyFlags));
 
-  if (my_copystat(org_name,tmp_name,MyFlags) < 0)
-    goto end;
+  if (!(MyFlags & MY_REDEL_NO_COPY_STAT))
+  {
+    if (my_copystat(org_name,tmp_name,MyFlags) < 0)
+      goto end;
+  }
   if (MyFlags & MY_REDEL_MAKE_BACKUP)
   {
     char name_buff[FN_REFLEN+20];    
index 86e2a0d5a7e9ab19869ba004b6a8e68ee5fd3672..5fc866fde56242fd5f51744cd20c5d4dae427dba 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 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
@@ -74,12 +74,12 @@ void (*error_handler_hook)(uint error, const char *str, myf MyFlags)=
 void (*fatal_error_handler_hook)(uint error, const char *str, myf MyFlags)=
   my_message_stderr;
 
-static void proc_info_dummy(void *a __attribute__((unused)),
-                            const PSI_stage_info *b __attribute__((unused)),
-                            PSI_stage_info *c __attribute__((unused)),
-                            const char *d __attribute__((unused)),
-                            const char *e __attribute__((unused)),
-                            const unsigned int f __attribute__((unused)))
+static void proc_info_dummy(void *a MY_ATTRIBUTE((unused)),
+                            const PSI_stage_info *b MY_ATTRIBUTE((unused)),
+                            PSI_stage_info *c MY_ATTRIBUTE((unused)),
+                            const char *d MY_ATTRIBUTE((unused)),
+                            const char *e MY_ATTRIBUTE((unused)),
+                            const unsigned int f MY_ATTRIBUTE((unused)))
 {
   return;
 }
index f70f9a79dab8a24cd5c0559f361c8f558a48411c..4b71df66f86b12b0ec275f4b8ea0f92bf99af828 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2001, 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
@@ -107,7 +107,7 @@ int my_symlink(const char *content, const char *linkname, myf MyFlags)
 #endif
 
 
-int my_is_symlink(const char *filename __attribute__((unused)))
+int my_is_symlink(const char *filename MY_ATTRIBUTE((unused)))
 {
 #if defined (HAVE_LSTAT) && defined (S_ISLNK)
   struct stat stat_buff;
index 566cc9b2a40e5486a10318a415db7894b4754721..a2b4647421203086fa5aae2efb088df6826e44ad 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2003, 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
@@ -159,8 +159,8 @@ int my_sync_dir(const char *dir_name, myf my_flags)
 
 #else /* NEED_EXPLICIT_SYNC_DIR */
 
-int my_sync_dir(const char *dir_name __attribute__((unused)),
-                myf my_flags __attribute__((unused)))
+int my_sync_dir(const char *dir_name MY_ATTRIBUTE((unused)),
+                myf my_flags MY_ATTRIBUTE((unused)))
 {
   return 0;
 }
@@ -192,8 +192,8 @@ int my_sync_dir_by_file(const char *file_name, myf my_flags)
 
 #else /* NEED_EXPLICIT_SYNC_DIR */
 
-int my_sync_dir_by_file(const char *file_name __attribute__((unused)),
-                        myf my_flags __attribute__((unused)))
+int my_sync_dir_by_file(const char *file_name MY_ATTRIBUTE((unused)),
+                        myf my_flags MY_ATTRIBUTE((unused)))
 {
   return 0;
 }
index 6d5615035c2a2b436b8ed32ebb6f551c517dd0de..6eda795ddba22bab2109271a426b47d335ed3892 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 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
@@ -297,9 +297,6 @@ my_bool my_thread_init(void)
   mysql_mutex_init(key_my_thread_var_mutex, &tmp->mutex, MY_MUTEX_INIT_FAST);
   mysql_cond_init(key_my_thread_var_suspend, &tmp->suspend, NULL);
 
-  tmp->stack_ends_here= (char*)&tmp +
-                         STACK_DIRECTION * (long)my_thread_stack_size;
-
   mysql_mutex_lock(&THR_LOCK_threads);
   tmp->id= ++thread_id;
   ++THR_thread_count;
index 7335f9609445aeccb8fd09c4dd3f6b1c835f5e03..9cf2db0f48b61835fa026be8c46b35cd0bbdc44d 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 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
index 63d189a4ded238f704079320700dd3a5b011aedd..0fb54888190a0d73cb91b8418dec5dcfb22c6768 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2011, 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
@@ -27,7 +27,7 @@
 
 C_MODE_START
 
-#define NNN __attribute__((unused))
+#define NNN MY_ATTRIBUTE((unused))
 
 static void register_mutex_noop(const char *category NNN,
                                 PSI_mutex_info *info NNN,
@@ -637,9 +637,9 @@ digest_end_noop(PSI_digest_locker *locker NNN,
 }
 
 static int
-set_thread_connect_attrs_noop(const char *buffer __attribute__((unused)),
-                             uint length  __attribute__((unused)),
-                             const void *from_cs __attribute__((unused)))
+set_thread_connect_attrs_noop(const char *buffer MY_ATTRIBUTE((unused)),
+                             uint length  MY_ATTRIBUTE((unused)),
+                             const void *from_cs MY_ATTRIBUTE((unused)))
 {
   return 0;
 }
index 156bd4da5aed4adc6b59a48e1da6aa686a736a75..66e70d73b56cb81d377d391bc64ed3bfc1e34073 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 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
@@ -45,9 +45,9 @@ static int native_compare(size_t *length, unsigned char **a, unsigned char **b)
   Special case for ORDER BY / GROUP BY CHAR(0) NOT NULL
  */
 static
-int ptr_compare_zero_length(size_t *compare_length __attribute__((unused)),
-                            uchar **a __attribute__((unused)),
-                            uchar **b __attribute__((unused)))
+int ptr_compare_zero_length(size_t *compare_length MY_ATTRIBUTE((unused)),
+                            uchar **a MY_ATTRIBUTE((unused)),
+                            uchar **b MY_ATTRIBUTE((unused)))
 {
   return 0;
 }
@@ -61,7 +61,7 @@ static int ptr_compare_3(size_t *compare_length, uchar **a, uchar **b);
        /* Get a pointer to a optimal byte-compare function for a given size */
 
 #ifdef __sun
-qsort2_cmp get_ptr_compare (size_t size __attribute__((unused)))
+qsort2_cmp get_ptr_compare (size_t size MY_ATTRIBUTE((unused)))
 {
   return (qsort2_cmp) native_compare;
 }
index e915698a3e5307a51e80724c68af61caf3f3c9f0..16014e5e543f85f76d0656e56817be88c6bd248d 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2001, 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
 #include <execinfo.h>
 #endif
 
+#ifdef __linux__
+/* __bss_start doesn't seem to work on FreeBSD and doesn't exist on OSX/Solaris. */
 #define PTR_SANE(p) ((p) && (char*)(p) >= heap_start && (char*)(p) <= heap_end)
-
 static char *heap_start;
-
-#ifdef HAVE_BSS_START
 extern char *__bss_start;
-#endif
+#else
+#define PTR_SANE(p) (p)
+#endif /* __linux */
 
 void my_init_stacktrace()
 {
-#ifdef HAVE_BSS_START
+#ifdef __linux__
   heap_start = (char*) &__bss_start;
-#endif
+#endif /* __linux__ */
 }
 
 #ifdef __linux__
@@ -134,14 +135,15 @@ static int safe_print_str(const char *addr, int max_len)
 
 void my_safe_print_str(const char* val, int max_len)
 {
+#ifdef __linux__
+/* Only needed by the linux version of PTR_SANE */
   char *heap_end;
 
-#ifdef __linux__
   if (!safe_print_str(val, max_len))
     return;
-#endif
 
   heap_end= (char*) sbrk(0);
+#endif
 
   if (!PTR_SANE(val))
   {
@@ -159,8 +161,8 @@ void my_safe_print_str(const char* val, int max_len)
 /* Use Solaris' symbolic stack trace routine. */
 #include <ucontext.h>
 
-void my_print_stacktrace(uchar* stack_bottom __attribute__((unused)), 
-                         ulong thread_stack __attribute__((unused)))
+void my_print_stacktrace(uchar* stack_bottom MY_ATTRIBUTE((unused)), 
+                         ulong thread_stack MY_ATTRIBUTE((unused)))
 {
   if (printstack(fileno(stderr)) == -1)
     my_safe_printf_stderr("%s",
@@ -178,9 +180,9 @@ void my_print_stacktrace(uchar* stack_bottom __attribute__((unused)),
 
 #if BACKTRACE_DEMANGLE
 
-char __attribute__ ((weak)) *
-my_demangle(const char *mangled_name __attribute__((unused)),
-            int *status __attribute__((unused)))
+char MY_ATTRIBUTE ((weak)) *
+my_demangle(const char *mangled_name MY_ATTRIBUTE((unused)),
+            int *status MY_ATTRIBUTE((unused)))
 {
   return NULL;
 }
index 659dd1e81ac7d98018eae2028155f98750a1377d..daff98d16a0c2a6c8398ae5c43002d3909edab55 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 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
@@ -39,7 +39,7 @@ my_bool hash_check(HASH *hash);
 void free_record(void *record);
 
 static uchar *hash2_key(const uchar *rec,uint *length,
-                      my_bool not_used __attribute__((unused)))
+                      my_bool not_used MY_ATTRIBUTE((unused)))
 {
   *length=(uint) (uchar) rec[reclength-1];
   return (uchar*) rec;
index 3a628b805807951c583f02588b17fa405ca561b9..a3d13a59b6e755f473b10e5b429605287ea4765c 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 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
@@ -60,9 +60,9 @@ static void *alarm_handler(void *arg);
 #define reschedule_alarms() pthread_kill(alarm_thread,THR_SERVER_ALARM)
 #endif
 
-static sig_handler thread_alarm(int sig __attribute__((unused)));
+static sig_handler thread_alarm(int sig MY_ATTRIBUTE((unused)));
 
-static int compare_ulong(void *not_used __attribute__((unused)),
+static int compare_ulong(void *not_used MY_ATTRIBUTE((unused)),
                         uchar *a_ptr,uchar* b_ptr)
 {
   ulong a=*((ulong*) a_ptr),b= *((ulong*) b_ptr);
@@ -274,7 +274,7 @@ void thr_end_alarm(thr_alarm_t *alarmed)
   every second.
 */
 
-sig_handler process_alarm(int sig __attribute__((unused)))
+sig_handler process_alarm(int sig MY_ATTRIBUTE((unused)))
 {
   sigset_t old_mask;
 /*
@@ -304,7 +304,7 @@ sig_handler process_alarm(int sig __attribute__((unused)))
 }
 
 
-static sig_handler process_alarm_part2(int sig __attribute__((unused)))
+static sig_handler process_alarm_part2(int sig MY_ATTRIBUTE((unused)))
 {
   ALARM *alarm_data;
   DBUG_ENTER("process_alarm");
@@ -492,7 +492,7 @@ void thr_alarm_info(ALARM_INFO *info)
 */
 
 
-static sig_handler thread_alarm(int sig __attribute__((unused)))
+static sig_handler thread_alarm(int sig MY_ATTRIBUTE((unused)))
 {
 #ifdef MAIN
   printf("thread_alarm\n"); fflush(stdout);
@@ -511,7 +511,7 @@ static sig_handler thread_alarm(int sig __attribute__((unused)))
 /* set up a alarm thread with uses 'sleep' to sleep between alarms */
 
 #ifdef USE_ALARM_THREAD
-static void *alarm_handler(void *arg __attribute__((unused)))
+static void *alarm_handler(void *arg MY_ATTRIBUTE((unused)))
 {
   int error;
   struct timespec abstime;
@@ -580,7 +580,7 @@ void thr_alarm_kill(my_thread_id thread_id)
   /* Can't do this yet */
 }
 
-sig_handler process_alarm(int sig __attribute__((unused)))
+sig_handler process_alarm(int sig MY_ATTRIBUTE((unused)))
 {
   /* Can't do this yet */
 }
@@ -774,7 +774,7 @@ static sig_handler print_signal_warning(int sig)
 #endif /* USE_ONE_SIGNAL_HAND */
 
 
-static void *signal_hand(void *arg __attribute__((unused)))
+static void *signal_hand(void *arg MY_ATTRIBUTE((unused)))
 {
   sigset_t set;
   int sig,error,err_count=0;;
@@ -842,7 +842,7 @@ static void *signal_hand(void *arg __attribute__((unused)))
 }
 
 
-int main(int argc __attribute__((unused)),char **argv __attribute__((unused)))
+int main(int argc MY_ATTRIBUTE((unused)),char **argv MY_ATTRIBUTE((unused)))
 {
   pthread_t tid;
   pthread_attr_t thr_attr;
@@ -931,7 +931,7 @@ int main(int argc __attribute__((unused)),char **argv __attribute__((unused)))
 
 #else /* !defined(DONT_USE_ALARM_THREAD) */
 
-int main(int argc __attribute__((unused)),char **argv __attribute__((unused)))
+int main(int argc MY_ATTRIBUTE((unused)),char **argv MY_ATTRIBUTE((unused)))
 {
   printf("thr_alarm disabled with DONT_USE_THR_ALARM\n");
   exit(1);
index 00f461aad601aa3b351090f5a26fb2e7b1492751..86743c4715e9d3f3338cd594d151c3739a46c0ad 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 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
@@ -1679,21 +1679,21 @@ static ulong sum=0;
 
 /* The following functions is for WRITE_CONCURRENT_INSERT */
 
-static void test_get_status(void* param __attribute__((unused)),
-                            int concurrent_insert __attribute__((unused)))
+static void test_get_status(void* param MY_ATTRIBUTE((unused)),
+                            int concurrent_insert MY_ATTRIBUTE((unused)))
 {
 }
 
-static void test_update_status(void* param __attribute__((unused)))
+static void test_update_status(void* param MY_ATTRIBUTE((unused)))
 {
 }
 
-static void test_copy_status(void* to __attribute__((unused)) ,
-                            void *from __attribute__((unused)))
+static void test_copy_status(void* to MY_ATTRIBUTE((unused)) ,
+                            void *from MY_ATTRIBUTE((unused)))
 {
 }
 
-static my_bool test_check_status(void* param __attribute__((unused)))
+static my_bool test_check_status(void* param MY_ATTRIBUTE((unused)))
 {
   return 0;
 }
@@ -1750,7 +1750,7 @@ static void *test_thread(void *arg)
 }
 
 
-int main(int argc __attribute__((unused)),char **argv __attribute__((unused)))
+int main(int argc MY_ATTRIBUTE((unused)),char **argv MY_ATTRIBUTE((unused)))
 {
   pthread_t tid;
   pthread_attr_t thr_attr;
index 536508a6f190612d92885c4de5e4c91e71c73f52..3f7bd4fcea4a1dfa3aeaddcf4e5f73d0c6009d4c 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 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
@@ -53,7 +53,7 @@ void safe_mutex_global_init(void)
 
 
 int safe_mutex_init(safe_mutex_t *mp,
-                   const pthread_mutexattr_t *attr __attribute__((unused)),
+                   const pthread_mutexattr_t *attr MY_ATTRIBUTE((unused)),
                    const char *file,
                    uint line)
 {
@@ -370,7 +370,7 @@ int safe_mutex_destroy(safe_mutex_t *mp, const char *file, uint line)
    This is ok, as this thread may not yet have been exited.
 */
 
-void safe_mutex_end(FILE *file __attribute__((unused)))
+void safe_mutex_end(FILE *file MY_ATTRIBUTE((unused)))
 {
   if (!safe_mutex_count)                       /* safetly */
     pthread_mutex_destroy(&THR_LOCK_mutex);
index dbc42b3eab24db2082d5223e85952d1f06103708..82078cb104aa4d78c6c62d6289da8446543943bd 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 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
@@ -83,7 +83,7 @@ static void rb_delete_fixup(TREE *tree,TREE_ELEMENT ***parent);
 static int test_rb_tree(TREE_ELEMENT *element);
 #endif
 
-void init_tree(TREE *tree, ulong default_alloc_size, ulong memory_limit,
+void init_tree(TREE *tree, size_t default_alloc_size, ulong memory_limit,
                int size, qsort_cmp2 compare, my_bool with_delete,
               tree_element_free free_element, const void *custom_arg)
 {
@@ -127,7 +127,7 @@ void init_tree(TREE *tree, ulong default_alloc_size, ulong memory_limit,
   }
   if (!(tree->with_delete=with_delete))
   {
-    init_alloc_root(&tree->mem_root, (uint) default_alloc_size, 0);
+    init_alloc_root(&tree->mem_root, default_alloc_size, 0);
     tree->mem_root.min_malloc=(sizeof(TREE_ELEMENT)+tree->size_of_element);
   }
   DBUG_VOID_RETURN;
index da4ade5669a87149b801fffa972bc5994e76b5b8..f1468d69a8ff73151e9484d3738d2e153c8304ba 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2008, 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
@@ -295,9 +295,9 @@ uint32 wt_cycle_stats[2][WT_CYCLE_STATS+1];
 uint32 wt_success_stats;
 
 static my_atomic_rwlock_t
-  cycle_stats_lock __attribute__((unused)),
-  wait_stats_lock __attribute__((unused)),
-  success_stats_lock __attribute__((unused));
+  cycle_stats_lock MY_ATTRIBUTE((unused)),
+  wait_stats_lock MY_ATTRIBUTE((unused)),
+  success_stats_lock MY_ATTRIBUTE((unused));
 
 #ifdef SAFE_STATISTICS
 #define incr(VAR, LOCK)                           \
index ff8f44c755dbb2e8022fcd628884488da74e7978..262c6620976e87696202119c3de880057efcfa98 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 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
@@ -106,8 +106,6 @@ static const char *my_login_path= 0;
 static char my_defaults_file_buffer[FN_REFLEN];
 static char my_defaults_extra_file_buffer[FN_REFLEN];
 
-static char my_login_file[FN_REFLEN];
-
 static my_bool defaults_already_read= FALSE;
 
 #ifdef WITH_WSREP
@@ -116,12 +114,6 @@ static my_bool defaults_already_read= FALSE;
 char wsrep_defaults_file[FN_REFLEN + 10]={0,};
 char wsrep_defaults_group_suffix[FN_EXTLEN]={0,};
 #endif /* WITH_WREP */
-/* Set to TRUE, if --no-defaults is found. */
-static my_bool found_no_defaults= FALSE;
-
-/* Set to TRUE, when login file is being processed. */
-static my_bool is_login_file= FALSE;
-
 /* Which directories are searched for options (and in which order) */
 
 #define MAX_DEFAULT_DIRS 6
@@ -154,13 +146,16 @@ struct handle_option_ctx
 };
 
 static int search_default_file(Process_option_func func, void *func_ctx,
-                              const char *dir, const char *config_file);
+                               const char *dir, const char *config_file,
+                               my_bool is_login_file);
 static int search_default_file_with_ext(Process_option_func func,
                                         void *func_ctx,
                                        const char *dir, const char *ext,
-                                       const char *config_file, int recursion_level);
-static my_bool mysql_file_getline(char *str, int size, MYSQL_FILE *file);
-
+                                        const char *config_file,
+                                        int recursion_level,
+                                        my_bool is_login_file);
+static my_bool mysql_file_getline(char *str, int size, MYSQL_FILE *file,
+                                  my_bool is_login_file);
 
 /**
   Create the list of default directories.
@@ -236,6 +231,7 @@ fn_expand(const char *filename, char *result_buf)
   func_ctx                    It's context. Usually it is the structure to
                               store additional options.
   default_directories         List of default directories.
+  found_no_defaults           TRUE, if --no-defaults is specified.
 
   DESCRIPTION
     Process the default options from argc & argv
@@ -259,7 +255,8 @@ fn_expand(const char *filename, char *result_buf)
 
 int my_search_option_files(const char *conf_file, int *argc, char ***argv,
                            uint *args_used, Process_option_func func,
-                           void *func_ctx, const char **default_directories)
+                           void *func_ctx, const char **default_directories,
+                           my_bool is_login_file, my_bool found_no_defaults)
 {
   const char **dirs, *forced_default_file, *forced_extra_defaults;
   int error= 0;
@@ -273,7 +270,7 @@ int my_search_option_files(const char *conf_file, int *argc, char ***argv,
                                       (char **) &forced_default_file,
                                       (char **) &forced_extra_defaults,
                                       (char **) &my_defaults_group_suffix,
-                                      (char **) &my_login_path);
+                                      (char **) &my_login_path, found_no_defaults);
 
     if (! my_defaults_group_suffix)
       my_defaults_group_suffix= getenv(STRINGIFY_ARG(DEFAULT_GROUP_SUFFIX_ENV));
@@ -388,14 +385,16 @@ int my_search_option_files(const char *conf_file, int *argc, char ***argv,
   // If conf_file is an absolute path, we only read it
   if (dirname_length(conf_file))
   {
-    if ((error= search_default_file(func, func_ctx, NullS, conf_file)) < 0)
-      goto err;
+    if ((error= search_default_file(func, func_ctx, NullS, conf_file,
+                                    is_login_file)) < 0)
+    goto err;
   }
   // If my defaults file is set (from a previous run), we read it
   else if (my_defaults_file)
   {
     if ((error= search_default_file_with_ext(func, func_ctx, "", "",
-                                             my_defaults_file, 0)) < 0)
+                                             my_defaults_file, 0,
+                                             is_login_file)) < 0)
       goto err;
     if (error > 0)
     {
@@ -410,14 +409,16 @@ int my_search_option_files(const char *conf_file, int *argc, char ***argv,
     {
       if (**dirs)
       {
-       if (search_default_file(func, func_ctx, *dirs, conf_file) < 0)
-         goto err;
+       if (search_default_file(func, func_ctx, *dirs, conf_file,
+                               is_login_file) < 0)
+        goto err;
       }
       else if (my_defaults_extra_file)
       {
         if ((error= search_default_file_with_ext(func, func_ctx, "", "",
-                                                my_defaults_extra_file, 0)) < 0)
-         goto err;                             /* Fatal error */
+                                                 my_defaults_extra_file, 0,
+                                                 is_login_file)) < 0)
+          goto err;                            /* Fatal error */
         if (error > 0)
         {
           fprintf(stderr, "Could not open required defaults file: %s\n",
@@ -505,7 +506,8 @@ int get_defaults_options(int argc, char **argv,
                          char **defaults,
                          char **extra_defaults,
                          char **group_suffix,
-                         char **login_path)
+                         char **login_path,
+                         my_bool found_no_defaults)
 {
   int org_argc= argc, prev_argc= 0, default_option_count= 0;
   *defaults= *extra_defaults= *group_suffix= *login_path= 0;
@@ -589,6 +591,8 @@ int load_defaults(const char *conf_file, const char **groups,
   return my_load_defaults(conf_file, groups, argc, argv, &default_directories);
 }
 
+/** A global to turn off or on reading the mylogin file. On by default */
+my_bool my_defaults_read_login_file= TRUE;
 /*
   Read options from configurations files
 
@@ -639,6 +643,8 @@ int my_load_defaults(const char *conf_file, const char **groups,
   char *ptr,**res;
   struct handle_option_ctx ctx;
   const char **dirs;
+  char my_login_file[FN_REFLEN];
+  my_bool found_no_defaults= false;
   uint args_sep= my_getopt_use_args_separator ? 1 : 0;
   DBUG_ENTER("load_defaults");
 
@@ -668,24 +674,24 @@ int my_load_defaults(const char *conf_file, const char **groups,
 
   if ((error= my_search_option_files(conf_file, argc, argv,
                                      &args_used, handle_default_option,
-                                     (void *) &ctx, dirs)))
+                                     (void *) &ctx, dirs, false, found_no_defaults)))
   {
     free_root(&alloc,MYF(0));
     DBUG_RETURN(error);
   }
 
-  /* Read options from login group. */
-  is_login_file= TRUE;
-  if (my_default_get_login_file(my_login_file, sizeof(my_login_file)) &&
-      (error= my_search_option_files(my_login_file,argc, argv, &args_used,
-                                     handle_default_option, (void *) &ctx,
-                                     dirs)))
+  if (my_defaults_read_login_file)
   {
-    free_root(&alloc,MYF(0));
-    DBUG_RETURN(error);
+    /* Read options from login group. */
+    if (my_default_get_login_file(my_login_file, sizeof(my_login_file)) &&
+      (error= my_search_option_files(my_login_file, argc, argv, &args_used,
+                                     handle_default_option, (void *) &ctx,
+                                     dirs, true, found_no_defaults)))
+    {
+      free_root(&alloc, MYF(0));
+      DBUG_RETURN(error);
+    }
   }
-  is_login_file= FALSE;
-
   /*
     Here error contains <> 0 only if we have a fully specified conf_file
     or a forced default file
@@ -767,7 +773,8 @@ void free_defaults(char **argv)
 static int search_default_file(Process_option_func opt_handler,
                                void *handler_ctx,
                               const char *dir,
-                              const char *config_file)
+                               const char *config_file,
+                               my_bool is_login_file)
 {
   char **ext;
   const char *empty_list[]= { "", 0 };
@@ -779,7 +786,7 @@ static int search_default_file(Process_option_func opt_handler,
     int error;
     if ((error= search_default_file_with_ext(opt_handler, handler_ctx,
                                              dir, *ext,
-                                            config_file, 0)) < 0)
+                                             config_file, 0, is_login_file)) < 0)
       return error;
   }
   return 0;
@@ -851,6 +858,7 @@ static char *get_argument(const char *keyword, size_t kwlen,
     group                      groups to read
     recursion_level             the level of recursion, got while processing
                                 "!include" or "!includedir"
+    is_login_file               TRUE, when login file is being processed.
 
   RETURN
     0   Success
@@ -863,7 +871,8 @@ static int search_default_file_with_ext(Process_option_func opt_handler,
                                         const char *dir,
                                         const char *ext,
                                         const char *config_file,
-                                        int recursion_level)
+                                        int recursion_level,
+                                        my_bool is_login_file)
 {
   char name[FN_REFLEN + 10], buff[4096], curr_gr[4096], *ptr, *end, **tmp_ext;
   char *value, option[4096+2], tmp[FN_REFLEN];
@@ -892,7 +901,7 @@ static int search_default_file_with_ext(Process_option_func opt_handler,
   }
   fn_format(name,name,"","",4);
 
-  if ((rc= check_file_permissions(name)) < 2)
+  if ((rc= check_file_permissions(name, is_login_file)) < 2)
     return (int) rc;
 
   if (is_login_file)
@@ -912,7 +921,7 @@ static int search_default_file_with_ext(Process_option_func opt_handler,
     strncpy(wsrep_defaults_file, name, sizeof(wsrep_defaults_file) - 1);
 #endif /* WITH_WSREP */
 
-  while (mysql_file_getline(buff, sizeof(buff) - 1, fp))
+  while (mysql_file_getline(buff, sizeof(buff) - 1, fp, is_login_file))
   {
     line++;
     /* Ignore comment and empty lines */
@@ -973,7 +982,7 @@ static int search_default_file_with_ext(Process_option_func opt_handler,
                       MY_UNPACK_FILENAME | MY_SAFE_PATH);
 
             search_default_file_with_ext(opt_handler, handler_ctx, "", "", tmp,
-                                         recursion_level + 1);
+                                         recursion_level + 1, is_login_file);
           }
         }
 
@@ -988,7 +997,7 @@ static int search_default_file_with_ext(Process_option_func opt_handler,
          goto err;
 
         search_default_file_with_ext(opt_handler, handler_ctx, "", "", ptr,
-                                     recursion_level + 1);
+                                     recursion_level + 1, is_login_file);
       }
 
       continue;
@@ -1150,15 +1159,17 @@ static char *remove_end_comment(char *ptr)
   of scrambled login file, the line read is first
   decrypted and then returned.
 
-  @param str  [out]       Buffer to store the read text.
-  @param size [in]        At max, size-1 bytes to be read.
-  @param file [in]        Source file.
+  @param str           [out]  Buffer to store the read text.
+  @param size          [in]   At max, size-1 bytes to be read.
+  @param file          [in]   Source file.
+  @param is_login_file [in]   TRUE, when login file is being processed.
 
   @return 1               Success
           0               Error
 */
 
-static my_bool mysql_file_getline(char *str, int size, MYSQL_FILE *file)
+static my_bool mysql_file_getline(char *str, int size, MYSQL_FILE *file,
+                                  my_bool is_login_file)
 {
   uchar cipher[4096], len_buf[MAX_CIPHER_STORE_LEN];
   static unsigned char my_key[LOGIN_KEY_LEN];
@@ -1297,7 +1308,7 @@ static int add_directory(MEM_ROOT *alloc, const char *dir, const char **dirs)
   char buf[FN_REFLEN];
   size_t len;
   char *p;
-  my_bool err __attribute__((unused));
+  my_bool err MY_ATTRIBUTE((unused));
 
   len= normalize_dirname(buf, dir);
   if (!(p= strmake_root(alloc, buf, len)))
@@ -1471,13 +1482,14 @@ int my_default_get_login_file(char *file_name, size_t file_name_size)
 /**
   Check file permissions of the option file.
 
-  @param file_name [in]       Name of the option file.
+  @param file_name     [in]   Name of the option file.
+  @param is_login_file [in]   TRUE, when login file is being processed.
 
   @return  0 - Non-allowable file permissions.
            1 - Failed to stat.
            2 - Success.
 */
-int check_file_permissions(const char *file_name)
+int check_file_permissions(const char *file_name, my_bool is_login_file)
 {
 #if !defined(__WIN__)
   MY_STAT stat_info;
index d67d23aeb5330f7da6845c2adbda483234bbeaa4..5ef6213d077a51afe1866099be3a5cfb2b08b8ee 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2002, 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
@@ -1370,7 +1370,7 @@ static void init_one_value(const struct my_option *option, void *variable,
 */
 
 static void fini_one_value(const struct my_option *option, void *variable,
-                          longlong value __attribute__ ((unused)))
+                          longlong value MY_ATTRIBUTE ((unused)))
 {
   DBUG_ENTER("fini_one_value");
   switch ((option->var_type & GET_TYPE_MASK)) {
index 73db450b10313cb91cefdb1b9e62ca473b89d060..132818e2278990509d393b3d0e5260977a837ba7 100644 (file)
@@ -2,7 +2,7 @@
       xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">\r
 \r
 <!--\r
-   Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.\r
+   Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved.\r
    \r
    This program is free software; you can redistribute it and/or modify\r
    it under the terms of the GNU General Public License as published by\r
     </InstallUISequence>\r
  \r
     <!-- Find previous installation -->\r
-    <Property Id="INSTALLDIR">\r
+    <Property Id="GETINSTALLDIR">\r
       <RegistrySearch Id="FindInstallLocation"\r
           Root="HKLM"\r
           Key="Software\Microsoft\Windows\CurrentVersion\Uninstall\[OLDERVERSIONBEINGUPGRADED]"\r
           Name="InstallLocation"\r
           Type="raw" />\r
     </Property>\r
+    <CustomAction Id="SetInstall"    Property="INSTALLDIR" Value="[GETINSTALLDIR]" />\r
+    <InstallUISequence>\r
+       <Custom Action="SetInstall"    After="AppSearch">Installed</Custom>\r
+    </InstallUISequence>\r
     <?if @Platform@ != "x64" ?>\r
         <Property Id="OLDERVERSION"> \r
           <RegistrySearch Id="FindOlderVersion"\r
index 28703379e95b8b624ec7e8b2ef14d339b23861bc..0fe3dc1227cf308b492803d3cb1d5f86d896e179 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/bash
 
-# Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2014, 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
@@ -27,6 +27,15 @@ take_upstart_job_backup () {
 case "$1" in
        configure)
 
+# MySQL 5.6.34 needs this
+       MYSQLFILES=/var/lib/mysql-files
+       if [ ! -d ${MYSQLFILES} -a ! -L ${MYSQLFILES} ];
+       then
+               mkdir ${MYSQLFILES}
+               chown mysql:mysql ${MYSQLFILES}
+               chmod 770 ${MYSQLFILES}
+       fi
+
        if [ -z "$2" ];
        then
                set -e
index c75743f2f84d6dc48f3966450cc9a41be60746d4..55f83a3bec28c5db250d87b48720bf62c2fe33f4 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/bash
 
-# Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2014, 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
@@ -74,6 +74,7 @@ case "$1" in
        MYSQLDATA=/var/lib/mysql
        MYSQLLOG=/var/log/mysql
        MYSQLRUN=/var/run/mysqld
+       MYSQLFILES=/var/lib/mysql-files
 
        server_stop
 
@@ -97,6 +98,11 @@ case "$1" in
                        rm -rf ${MYSQLDATA}
                fi
 
+               if [ -d ${MYSQLFILES} ] || [ -L ${MYSQLFILES} ];
+               then
+                       rm -rf ${MYSQLFILES}
+               fi
+
                if getent passwd mysql >/dev/null;
                then
                        userdel mysql
@@ -131,6 +137,11 @@ case "$1" in
                        rm -rf ${MYSQLDATA}
                fi
 
+               if [ -d ${MYSQLFILES} ] || [ -L ${MYSQLFILES} ];
+               then
+                       rm -rf ${MYSQLFILES}
+               fi
+
                if getent passwd mysql >/dev/null;
                then
                        userdel mysql
index f1838b050935f103087a145a95f54b7e1e9aa23f..e5b3b7719b69f048f96ad8872d99705a4983f59b 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/bash
 
-# Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2014, 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,6 +57,7 @@ case "$1" in
                fi
 
                MYSQLDATA=/var/lib/mysql
+               MYSQLFILES=/var/lib/mysql-files
                MYSQLLOG=/var/log/mysql
                MYSQLRUN=/var/run/mysqld
 
@@ -77,6 +78,13 @@ case "$1" in
                        chmod 750 ${MYSQLDATA}
                fi
 
+               if [ ! -d ${MYSQLFILES} -a ! -L ${MYSQLFILES} ];
+               then
+                       mkdir ${MYSQLFILES}
+                       chown mysql:mysql ${MYSQLFILES}
+                       chmod 770 ${MYSQLFILES}
+               fi
+
                if [ ! -d ${MYSQLLOG} -a ! -L ${MYSQLLOG} ];
                then
                        mkdir ${MYSQLLOG}
index 7b7e0ac33cdcef822ea82f7dc20df6aea8a564e8..2469d917769e2afb8f346cfe43f8641049918341 100644 (file)
@@ -19,6 +19,7 @@ Type: boolean
 Default: false
 Description: Remove data directory at /var/lib/mysql ?
  This operation will remove the data directory 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.
  It is highly recommended to take data backup before removing the data directory.
 
 Template: mysql-community-server/data-dir
index caac1e13dad85aa1bb45586e8412ee37fbd02a7a..adb5f54bb2d29c25dd31fb952c4177d5f895d29b 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2014, 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
@@ -30,4 +30,6 @@ debian/extra/qa_auth_interface-plugin
 debian/extra/qa_auth_server-plugin
 debian/extra/semisync_master-plugin
 debian/extra/semisync_slave-plugin
+debian/extra/test_udf_services-plugin
 debian/extra/validate_password-plugin
+debian/extra/connection_control-plugin
index 5370d9e496a0f510d727643fba22925e77603fb4..ca5d1f58d6c5d6df65924cd4aa2486d646922458 100644 (file)
   /var/lib/mysql/ r,
   /var/lib/mysql/** rwk,
 
+# Allow data files dir access
+  /var/lib/mysql-files/ r,
+  /var/lib/mysql-files/** rwk,
+
 # Allow log file access
   /var/log/mysql/ r,
   /var/log/mysql/** rw,
index 28703379e95b8b624ec7e8b2ef14d339b23861bc..0fe3dc1227cf308b492803d3cb1d5f86d896e179 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/bash
 
-# Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2014, 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
@@ -27,6 +27,15 @@ take_upstart_job_backup () {
 case "$1" in
        configure)
 
+# MySQL 5.6.34 needs this
+       MYSQLFILES=/var/lib/mysql-files
+       if [ ! -d ${MYSQLFILES} -a ! -L ${MYSQLFILES} ];
+       then
+               mkdir ${MYSQLFILES}
+               chown mysql:mysql ${MYSQLFILES}
+               chmod 770 ${MYSQLFILES}
+       fi
+
        if [ -z "$2" ];
        then
                set -e
index c75743f2f84d6dc48f3966450cc9a41be60746d4..55f83a3bec28c5db250d87b48720bf62c2fe33f4 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/bash
 
-# Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2014, 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
@@ -74,6 +74,7 @@ case "$1" in
        MYSQLDATA=/var/lib/mysql
        MYSQLLOG=/var/log/mysql
        MYSQLRUN=/var/run/mysqld
+       MYSQLFILES=/var/lib/mysql-files
 
        server_stop
 
@@ -97,6 +98,11 @@ case "$1" in
                        rm -rf ${MYSQLDATA}
                fi
 
+               if [ -d ${MYSQLFILES} ] || [ -L ${MYSQLFILES} ];
+               then
+                       rm -rf ${MYSQLFILES}
+               fi
+
                if getent passwd mysql >/dev/null;
                then
                        userdel mysql
@@ -131,6 +137,11 @@ case "$1" in
                        rm -rf ${MYSQLDATA}
                fi
 
+               if [ -d ${MYSQLFILES} ] || [ -L ${MYSQLFILES} ];
+               then
+                       rm -rf ${MYSQLFILES}
+               fi
+
                if getent passwd mysql >/dev/null;
                then
                        userdel mysql
index f1838b050935f103087a145a95f54b7e1e9aa23f..e5b3b7719b69f048f96ad8872d99705a4983f59b 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/bash
 
-# Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2014, 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,6 +57,7 @@ case "$1" in
                fi
 
                MYSQLDATA=/var/lib/mysql
+               MYSQLFILES=/var/lib/mysql-files
                MYSQLLOG=/var/log/mysql
                MYSQLRUN=/var/run/mysqld
 
@@ -77,6 +78,13 @@ case "$1" in
                        chmod 750 ${MYSQLDATA}
                fi
 
+               if [ ! -d ${MYSQLFILES} -a ! -L ${MYSQLFILES} ];
+               then
+                       mkdir ${MYSQLFILES}
+                       chown mysql:mysql ${MYSQLFILES}
+                       chmod 770 ${MYSQLFILES}
+               fi
+
                if [ ! -d ${MYSQLLOG} -a ! -L ${MYSQLLOG} ];
                then
                        mkdir ${MYSQLLOG}
index 7b7e0ac33cdcef822ea82f7dc20df6aea8a564e8..2469d917769e2afb8f346cfe43f8641049918341 100644 (file)
@@ -19,6 +19,7 @@ Type: boolean
 Default: false
 Description: Remove data directory at /var/lib/mysql ?
  This operation will remove the data directory 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.
  It is highly recommended to take data backup before removing the data directory.
 
 Template: mysql-community-server/data-dir
index caac1e13dad85aa1bb45586e8412ee37fbd02a7a..adb5f54bb2d29c25dd31fb952c4177d5f895d29b 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2014, 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
@@ -30,4 +30,6 @@ debian/extra/qa_auth_interface-plugin
 debian/extra/qa_auth_server-plugin
 debian/extra/semisync_master-plugin
 debian/extra/semisync_slave-plugin
+debian/extra/test_udf_services-plugin
 debian/extra/validate_password-plugin
+debian/extra/connection_control-plugin
index 5370d9e496a0f510d727643fba22925e77603fb4..ca5d1f58d6c5d6df65924cd4aa2486d646922458 100644 (file)
   /var/lib/mysql/ r,
   /var/lib/mysql/** rwk,
 
+# Allow data files dir access
+  /var/lib/mysql-files/ r,
+  /var/lib/mysql-files/** rwk,
+
 # Allow log file access
   /var/log/mysql/ r,
   /var/log/mysql/** rw,
index 28703379e95b8b624ec7e8b2ef14d339b23861bc..0fe3dc1227cf308b492803d3cb1d5f86d896e179 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/bash
 
-# Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2014, 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
@@ -27,6 +27,15 @@ take_upstart_job_backup () {
 case "$1" in
        configure)
 
+# MySQL 5.6.34 needs this
+       MYSQLFILES=/var/lib/mysql-files
+       if [ ! -d ${MYSQLFILES} -a ! -L ${MYSQLFILES} ];
+       then
+               mkdir ${MYSQLFILES}
+               chown mysql:mysql ${MYSQLFILES}
+               chmod 770 ${MYSQLFILES}
+       fi
+
        if [ -z "$2" ];
        then
                set -e
index c75743f2f84d6dc48f3966450cc9a41be60746d4..55f83a3bec28c5db250d87b48720bf62c2fe33f4 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/bash
 
-# Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2014, 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
@@ -74,6 +74,7 @@ case "$1" in
        MYSQLDATA=/var/lib/mysql
        MYSQLLOG=/var/log/mysql
        MYSQLRUN=/var/run/mysqld
+       MYSQLFILES=/var/lib/mysql-files
 
        server_stop
 
@@ -97,6 +98,11 @@ case "$1" in
                        rm -rf ${MYSQLDATA}
                fi
 
+               if [ -d ${MYSQLFILES} ] || [ -L ${MYSQLFILES} ];
+               then
+                       rm -rf ${MYSQLFILES}
+               fi
+
                if getent passwd mysql >/dev/null;
                then
                        userdel mysql
@@ -131,6 +137,11 @@ case "$1" in
                        rm -rf ${MYSQLDATA}
                fi
 
+               if [ -d ${MYSQLFILES} ] || [ -L ${MYSQLFILES} ];
+               then
+                       rm -rf ${MYSQLFILES}
+               fi
+
                if getent passwd mysql >/dev/null;
                then
                        userdel mysql
index f1838b050935f103087a145a95f54b7e1e9aa23f..e5b3b7719b69f048f96ad8872d99705a4983f59b 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/bash
 
-# Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2014, 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,6 +57,7 @@ case "$1" in
                fi
 
                MYSQLDATA=/var/lib/mysql
+               MYSQLFILES=/var/lib/mysql-files
                MYSQLLOG=/var/log/mysql
                MYSQLRUN=/var/run/mysqld
 
@@ -77,6 +78,13 @@ case "$1" in
                        chmod 750 ${MYSQLDATA}
                fi
 
+               if [ ! -d ${MYSQLFILES} -a ! -L ${MYSQLFILES} ];
+               then
+                       mkdir ${MYSQLFILES}
+                       chown mysql:mysql ${MYSQLFILES}
+                       chmod 770 ${MYSQLFILES}
+               fi
+
                if [ ! -d ${MYSQLLOG} -a ! -L ${MYSQLLOG} ];
                then
                        mkdir ${MYSQLLOG}
index 7b7e0ac33cdcef822ea82f7dc20df6aea8a564e8..2469d917769e2afb8f346cfe43f8641049918341 100644 (file)
@@ -19,6 +19,7 @@ Type: boolean
 Default: false
 Description: Remove data directory at /var/lib/mysql ?
  This operation will remove the data directory 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.
  It is highly recommended to take data backup before removing the data directory.
 
 Template: mysql-community-server/data-dir
index caac1e13dad85aa1bb45586e8412ee37fbd02a7a..adb5f54bb2d29c25dd31fb952c4177d5f895d29b 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2014, 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
@@ -30,4 +30,6 @@ debian/extra/qa_auth_interface-plugin
 debian/extra/qa_auth_server-plugin
 debian/extra/semisync_master-plugin
 debian/extra/semisync_slave-plugin
+debian/extra/test_udf_services-plugin
 debian/extra/validate_password-plugin
+debian/extra/connection_control-plugin
index 8ad88e4719d5495a995d1b7e6eea8c7281fbbd00..0c23142f3c132912014e551c4f265c5d119d6015 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (c) 2015, 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
@@ -30,4 +30,5 @@ debian/extra/qa_auth_interface-plugin
 debian/extra/qa_auth_server-plugin
 debian/extra/semisync_master-plugin
 debian/extra/semisync_slave-plugin
+debian/extra/test_udf_services-plugin
 debian/extra/validate_password-plugin
index 8ad88e4719d5495a995d1b7e6eea8c7281fbbd00..0c23142f3c132912014e551c4f265c5d119d6015 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (c) 2015, 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
@@ -30,4 +30,5 @@ debian/extra/qa_auth_interface-plugin
 debian/extra/qa_auth_server-plugin
 debian/extra/semisync_master-plugin
 debian/extra/semisync_slave-plugin
+debian/extra/test_udf_services-plugin
 debian/extra/validate_password-plugin
index 28703379e95b8b624ec7e8b2ef14d339b23861bc..0fe3dc1227cf308b492803d3cb1d5f86d896e179 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/bash
 
-# Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2014, 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
@@ -27,6 +27,15 @@ take_upstart_job_backup () {
 case "$1" in
        configure)
 
+# MySQL 5.6.34 needs this
+       MYSQLFILES=/var/lib/mysql-files
+       if [ ! -d ${MYSQLFILES} -a ! -L ${MYSQLFILES} ];
+       then
+               mkdir ${MYSQLFILES}
+               chown mysql:mysql ${MYSQLFILES}
+               chmod 770 ${MYSQLFILES}
+       fi
+
        if [ -z "$2" ];
        then
                set -e
index c75743f2f84d6dc48f3966450cc9a41be60746d4..55f83a3bec28c5db250d87b48720bf62c2fe33f4 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/bash
 
-# Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2014, 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
@@ -74,6 +74,7 @@ case "$1" in
        MYSQLDATA=/var/lib/mysql
        MYSQLLOG=/var/log/mysql
        MYSQLRUN=/var/run/mysqld
+       MYSQLFILES=/var/lib/mysql-files
 
        server_stop
 
@@ -97,6 +98,11 @@ case "$1" in
                        rm -rf ${MYSQLDATA}
                fi
 
+               if [ -d ${MYSQLFILES} ] || [ -L ${MYSQLFILES} ];
+               then
+                       rm -rf ${MYSQLFILES}
+               fi
+
                if getent passwd mysql >/dev/null;
                then
                        userdel mysql
@@ -131,6 +137,11 @@ case "$1" in
                        rm -rf ${MYSQLDATA}
                fi
 
+               if [ -d ${MYSQLFILES} ] || [ -L ${MYSQLFILES} ];
+               then
+                       rm -rf ${MYSQLFILES}
+               fi
+
                if getent passwd mysql >/dev/null;
                then
                        userdel mysql
index f1838b050935f103087a145a95f54b7e1e9aa23f..e5b3b7719b69f048f96ad8872d99705a4983f59b 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/bash
 
-# Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2014, 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,6 +57,7 @@ case "$1" in
                fi
 
                MYSQLDATA=/var/lib/mysql
+               MYSQLFILES=/var/lib/mysql-files
                MYSQLLOG=/var/log/mysql
                MYSQLRUN=/var/run/mysqld
 
@@ -77,6 +78,13 @@ case "$1" in
                        chmod 750 ${MYSQLDATA}
                fi
 
+               if [ ! -d ${MYSQLFILES} -a ! -L ${MYSQLFILES} ];
+               then
+                       mkdir ${MYSQLFILES}
+                       chown mysql:mysql ${MYSQLFILES}
+                       chmod 770 ${MYSQLFILES}
+               fi
+
                if [ ! -d ${MYSQLLOG} -a ! -L ${MYSQLLOG} ];
                then
                        mkdir ${MYSQLLOG}
index 7b7e0ac33cdcef822ea82f7dc20df6aea8a564e8..2469d917769e2afb8f346cfe43f8641049918341 100644 (file)
@@ -19,6 +19,7 @@ Type: boolean
 Default: false
 Description: Remove data directory at /var/lib/mysql ?
  This operation will remove the data directory 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.
  It is highly recommended to take data backup before removing the data directory.
 
 Template: mysql-community-server/data-dir
index caac1e13dad85aa1bb45586e8412ee37fbd02a7a..adb5f54bb2d29c25dd31fb952c4177d5f895d29b 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2014, 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
@@ -30,4 +30,6 @@ debian/extra/qa_auth_interface-plugin
 debian/extra/qa_auth_server-plugin
 debian/extra/semisync_master-plugin
 debian/extra/semisync_slave-plugin
+debian/extra/test_udf_services-plugin
 debian/extra/validate_password-plugin
+debian/extra/connection_control-plugin
index 8ad88e4719d5495a995d1b7e6eea8c7281fbbd00..0c23142f3c132912014e551c4f265c5d119d6015 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (c) 2015, 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
@@ -30,4 +30,5 @@ debian/extra/qa_auth_interface-plugin
 debian/extra/qa_auth_server-plugin
 debian/extra/semisync_master-plugin
 debian/extra/semisync_slave-plugin
+debian/extra/test_udf_services-plugin
 debian/extra/validate_password-plugin
diff --git a/mysql-wsrep-5.6/packaging/deb-xenial/changelog b/mysql-wsrep-5.6/packaging/deb-xenial/changelog
new file mode 100644 (file)
index 0000000..4f4e77e
--- /dev/null
@@ -0,0 +1,143 @@
+mysql-community (5.6.31-1ubuntu16.04) xenial; urgency=medium
+
+  * New upstream release
+
+ -- Lars Tangvald <ltangval@atum23>  Tue, 03 May 2016 09:30:33 +0200
+
+mysql-community (5.6.28-1ubuntu15.10) wily; urgency=low
+
+  * New upstream release
+
+ -- Lars Tangvald <lars.tangvald@oracle.com>  Thu, 12 Nov 2015 10:34:23 +0100
+
+mysql-community (5.6.26-1ubuntu15.04) vivid; urgency=low
+
+  * new upstream release
+  * mysql-commercial-server now depends on perl, psmisc
+    mysql-commercial-test now depends on python, libmysqlclient-dev
+    (Closes: #20893836)
+
+ -- Akhil Mohan <akhil.mohan@oracle.com>  Thu, 18 Jun 2015 16:34:10 +0530
+
+mysql-community (5.6.25-3ubuntu15.04) vivid; urgency=low
+
+  * new upstream release
+  * mysql-common now conflicts with
+    mysql-server-5.6, mysql-server-core-5.6
+    mysql-client-5.6, mysql-client-core-5.6
+  * mysql-*-server no more provides
+    mysql-server-5.6, mysql-server-core-5.6
+  * mysql-*-client no more provides
+    mysql-client-5.6, mysql-client-core-5.6
+
+ -- Akhil Mohan <akhil.mohan@oracle.com>  Mon, 15 Jun 2015 16:48:05 +0530
+
+mysql-community (5.6.24-3ubuntu15.04) vivid; urgency=low
+
+  * updated Standards-Version to 3.9.6 in d/control
+  * apparmor profile updated to allow read on all files under /etc/mysql
+  * added new conf files under d/extra/*.conf
+  * mysql_plugin moved from client to server pkg
+  * innochecksum moved from client to server pkg
+  * server pkg now replaces client pkg
+  * added systemd service profile and script
+  * new /etc/mysql/my.cnf management scheme added for Ubuntu 15.04
+    as discussed in Dec 2014 for native packaging source
+  * added dh "--with systemd" for enabling systemd
+
+ -- Akhil Mohan <akhil.mohan@oracle.com>  Wed, 27 May 2015 11:35:35 +0530
+
+mysql-community (5.6.24-2ubuntu15.04) vivid; urgency=low
+
+  * new upstream release
+  * forked packaging source from utopic to vivid
+
+ -- Akhil Mohan <akhil.mohan@oracle.com>  Wed, 15 Apr 2015 18:52:22 +0530
+
+mysql-community (5.6.24-1ubuntu14.10) utopic; urgency=low
+
+  * new upstream release
+
+ -- Akhil Mohan <akhil.mohan@oracle.com>  Mon, 16 Feb 2014 15:45:09 +0530
+
+mysql-community (5.6.23-1ubuntu14.10) utopic; urgency=low
+
+  * new upstream release
+  * mysql-community-server now recommends mysql-client
+  * mysql-community-server now depends on apparmor
+  * removed template install-test-db; not installed by default
+  * d/compat incremented to 9 from 8
+  * d/control updated to build depend on debhelper 9
+  * added d/*.lintian-overrides and d/source/lintian-overrides
+  * d/rules updated to reflect correct file permissions
+
+ -- Akhil Mohan <akhil.mohan@oracle.com>  Wed, 31 Dec 2014 10:51:07 +0530
+
+mysql-community (5.6.22-2ubuntu14.10) utopic; urgency=low
+
+  * new upstream release
+  * mysql-common now replaces mysql-server-{,core-}5.6
+
+ -- Akhil Mohan <akhil.mohan@oracle.com>  Wed, 28 Nov 2014 15:18:07 +0530
+
+mysql-community (5.6.22-1ubuntu14.10) utopic; urgency=low
+
+  * new upstream release
+  * fixed d/*server.postinst to allow dropping test db without
+    setting root password
+  * init script will now run my_i_db if data dir is not present or empty
+  * updated init script to read app armor profile on startup
+  * forked packaging source from trusty and rebranded for utopic
+  * updated d/m-c-source.install to pack *.xz packaging source archive
+  * added more system resources to app armor profile
+  * dh_apparmor to now run before dh_installinit in d/rules
+  * libmysqlclient-dev now replaces mysql-client-{,core-}5.6
+
+ -- Akhil Mohan <akhil.mohan@oracle.com>  Wed, 05 Nov 2014 17:04:07 +0530
+
+mysql-community (5.6.21-1ubuntu14.04) trusty; urgency=low
+
+  * new upstream release
+  * updated d/rules to increment -j8 as make option
+  * updated d/source/include-binaries to add mysql_no_login plugin
+  * updated CMake option WITH_EXTRA_CHARSETS from complex to all
+
+ -- Akhil Mohan <akhil.mohan@oracle.com>  Wed, 20 Aug 2014 19:12:30 +0530
+
+mysql-community (5.6.20-1ubuntu14.04) trusty; urgency=low
+
+  * new upstream release
+  * added fakeroot as build-dep in d/control
+  * added d/*.dirs for bench, dev and test pkg
+  * updated d/rules to make compilation verbose
+  * removed default CFLAGS, CXXFLAGS in d/rules
+  * added patch for testsuite search paths under d/patches
+  * modified cmake option for testsuite in d/rules
+  * updated patch d/fix-mysql_install_db.patch
+  * enabled two patches in d/patches/series
+  * removed extra permissions check in d/rules when fixed in source
+  * modified d/mysql-*-server.postinst to stop removing /usr/my.cnf
+  * modified d/*-test.* for updated location of testsuite
+  * updated d/{mysql-*-server.install,rules} to include debug plugins
+  * updated d/rules to remove storage engine cmake options
+  * modified data dir permission in d/*server.{pre,post}inst
+  * updated d/source/include-binaries to add debug plugins
+  * updated d/rules to rename debug plugins
+
+ -- Akhil Mohan <akhil.mohan@oracle.com>  Wed, 02 Jul 2014 17:45:30 +0530
+
+mysql-community (5.6.19-1ubuntu14.04) trusty; urgency=low
+
+  * new upstream release
+  * d/rules updated to rid of files removed from source
+  * modified path for source tar in source pkg
+  * obscured actual filenames in d/source/include-binaries
+  * modified d/rules to handle obscured filenames
+
+ -- Akhil Mohan <akhil.mohan@oracle.com>  Mon, 05 May 2014 15:45:10 +0530
+
+mysql-community (5.6.17-1ubuntu14.04) trusty; urgency=low
+
+  * new upstream release
+
+ -- Akhil Mohan <akhil.mohan@oracle.com>  Fri, 28 Feb 2014 18:06:30 +0530
diff --git a/mysql-wsrep-5.6/packaging/deb-xenial/compat b/mysql-wsrep-5.6/packaging/deb-xenial/compat
new file mode 100644 (file)
index 0000000..ec63514
--- /dev/null
@@ -0,0 +1 @@
+9
diff --git a/mysql-wsrep-5.6/packaging/deb-xenial/control b/mysql-wsrep-5.6/packaging/deb-xenial/control
new file mode 100644 (file)
index 0000000..8bc5ecd
--- /dev/null
@@ -0,0 +1,192 @@
+Source: mysql-community
+Maintainer: MySQL Release Engineering <mysql-build@oss.oracle.com>
+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, dh-apparmor, dh-systemd (>= 1.5), lsb-release, cmake, fakeroot, libnuma-dev
+
+Package: mysql-server
+Architecture: any
+Depends: mysql-community-server (= ${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
+ 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 is a meta package that depends on the latest mysql server
+ package available in the repository.
+
+Package: mysql-community-server
+Architecture: any
+Pre-depends: debconf (>= 0.2.17), adduser
+Depends: mysql-common (= ${binary:Version}), apparmor, perl, psmisc,
+ ${shlibs:Depends}, ${misc:Depends}
+Recommends: mysql-client (= ${binary:Version})
+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-commercial-server
+Replaces: 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-commercial-server,
+ mysql-community-client
+Provides: virtual-mysql-server, virtual-mysql-server-core
+Description: MySQL Server
+ The MySQL(TM) software delivers a very fast, multi-threaded, multi-user,
+ and robust SQL (Structured Query Language) database server. MySQL Server
+ is intended for mission-critical, heavy-load production systems as well
+ as for embedding into mass-deployed software. MySQL is a trademark of
+ Oracle. This package includes the MySQL server binary as well as related
+ utilities to run and administer a MySQL server.
+
+Package: mysql-client
+Architecture: any
+Depends: mysql-community-client (= ${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
+ 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 is a meta package that depends on the latest mysql client
+ package available in the repository.
+
+Package: mysql-community-client
+Architecture: any
+Depends: mysql-common (= ${binary:Version}),
+ ${shlibs:Depends}, ${misc:Depends}
+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-commercial-client
+Replaces: 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-commercial-client
+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
+ 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 standard MySQL clients and
+ administration tools.
+
+Package: libmysqlclient18
+Architecture: any
+Section: libs
+Pre-Depends: ${misc:Pre-Depends}
+Multi-Arch: same
+Depends: mysql-common (= ${binary:Version}),
+ ${shlibs:Depends}, ${misc: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
+ 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 shared libraries for MySQL client
+ applications.
+
+Package: mysql-common
+Architecture: any
+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,
+ mysql-client-5.6, mysql-client-core-5.6,
+ mariadb-server-5.5, percona-xtradb-cluster-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,
+ mariadb-server-5.5, percona-xtradb-cluster-common-5.5
+Provides: mysql-common, mysql-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, MySQL database server, and MySQL embedded 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
+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
+ 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 development header files necessary
+ to develop MySQL client applications.
+
+Package: libmysqld-dev
+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.
+
+Package: mysql-testsuite
+Architecture: any
+Depends: mysql-community-test (= ${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
+ 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 is a meta package that depends on the latest mysql test
+ package available in the repository.
+
+Package: mysql-community-test
+Architecture: any
+Depends: mysql-community-server (= ${binary:Version}),
+ mysql-community-client (= ${binary:Version}), python,
+ libmysqlclient-dev, ${shlibs:Depends}, ${misc:Depends}
+Conflicts: mysql,
+ mysql-testsuite-5.0, mysql-testsuite-5.1, mysql-testsuite-5.5,
+ mysql-testsuite-5.6, mysql-commercial-test
+Description: MySQL Test Run MTR - The MySQL testsuite
+ 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 regression test suite for MySQL
+ database server.
+
+Package: mysql-community-bench
+Architecture: any
+Depends: mysql-community-server (= ${binary:Version}),
+ ${shlibs:Depends}, ${misc:Depends}
+Conflicts: mysql, mysql-commercial-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-community-source
+Architecture: any
+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.
diff --git a/mysql-wsrep-5.6/packaging/deb-xenial/copyright b/mysql-wsrep-5.6/packaging/deb-xenial/copyright
new file mode 100644 (file)
index 0000000..0d2a19f
--- /dev/null
@@ -0,0 +1,41 @@
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: MySQL Server 5.6
+Upstream-Contact: MySQL Release Engineering <mysql-build@oss.oracle.com>
+Source: http://dev.mysql.com/
+
+Copyright: 2000, 2016, Oracle and/or its affiliates. All rights reserved.
+License:
+ This is a release of MySQL, a dual-license SQL database server.
+ For the avoidance of doubt, this particular copy of the software
+ is released under the version 2 of the GNU General Public License.
+ MySQL is brought to you by Oracle.
+ .
+ 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
+ <http://www.mysql.com/about/legal/licensing/foss-exception.html>.
+ .
+ This distribution may include materials developed by third
+ parties. For license and attribution notices for these
+ materials, please refer to the documentation that accompanies
+ this distribution (see the "Licenses for Third-Party Components"
+ appendix) or view the online documentation at
+ <http://dev.mysql.com/doc/>.
+ .
+ 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
+ .
+ The full text of the GNU General Public License version 2 can
+ be found in the file
+ `/usr/share/mysql/doc/COPYING'.
diff --git a/mysql-wsrep-5.6/packaging/deb-xenial/extra/apparmor-profile b/mysql-wsrep-5.6/packaging/deb-xenial/extra/apparmor-profile
new file mode 100644 (file)
index 0000000..5cae3bf
--- /dev/null
@@ -0,0 +1,47 @@
+# vim:syntax=apparmor
+# Last Modified: Fri Feb 28 18:06:30 2014
+#include <tunables/global>
+
+/usr/sbin/mysqld {
+  #include <abstractions/base>
+  #include <abstractions/nameservice>
+  #include <abstractions/user-tmp>
+
+# Allow system resource access
+  /sys/devices/system/cpu/ r,
+  capability sys_resource,
+  capability dac_override,
+  capability setuid,
+  capability setgid,
+
+# Allow config access
+  /etc/mysql/** r,
+
+# Allow pid and socket file access
+  /run/mysqld/mysqld.pid rw,
+  /run/mysqld/mysqld.sock rw,
+
+# Allow read/ write to /tmp
+  /tmp/ r,
+  /tmp/* rw,
+
+# Allow execution of server binary
+  /usr/sbin/mysqld mr,
+  /usr/sbin/mysqld-debug mr,
+
+# Allow plugin access
+  /usr/lib/mysql/plugin/ r,
+  /usr/lib/mysql/plugin/*.so* mr,
+
+# Allow error msg and charset access
+  /usr/share/mysql/ r,
+  /usr/share/mysql/** r,
+
+# Allow data dir access
+  /var/lib/mysql/ r,
+  /var/lib/mysql/** rwk,
+
+# Allow log file access
+  /var/log/mysql/ r,
+  /var/log/mysql/** rw,
+}
diff --git a/mysql-wsrep-5.6/packaging/deb-xenial/extra/my.cnf.fallback b/mysql-wsrep-5.6/packaging/deb-xenial/extra/my.cnf.fallback
new file mode 100644 (file)
index 0000000..4c4004c
--- /dev/null
@@ -0,0 +1,25 @@
+# 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
+# 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
+
+#
+# The MySQL Commercial Server configuration file.
+#
+# 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/
diff --git a/mysql-wsrep-5.6/packaging/deb-xenial/extra/mysql-systemd-start b/mysql-wsrep-5.6/packaging/deb-xenial/extra/mysql-systemd-start
new file mode 100644 (file)
index 0000000..d22c44d
--- /dev/null
@@ -0,0 +1,84 @@
+#!/bin/bash
+
+# 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
+# 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
+
+# Scripts to run by MySQL systemd service
+#
+# Needed argument: pre | post
+#
+# pre mode  :  try to perform sanity check for configuration, log, data
+# post mode :  ping server until answer is received
+
+pinger () {
+       while /bin/true ; do
+               sleep 1
+               mysqladmin ping >/dev/null 2>&1 && break
+       done
+}
+
+sanity () {
+       MYSQLRUN=/var/run/mysqld
+       MYSQLDATA=/var/lib/mysql
+       MYSQLLOG=/var/log/mysql
+
+       if [ ! -d ${MYSQLDATA} -a ! -L ${MYSQLDATA} ];
+       then
+               mkdir ${MYSQLDATA}
+               chown mysql:mysql ${MYSQLDATA}
+               chmod 750 ${MYSQLDATA}
+       fi
+
+       if [ ! -d "${MYSQLDATA}/mysql" -a ! -L "${MYSQLDATA}/mysql" ];
+       then
+               mkdir ${MYSQLDATA}/mysql
+               chown mysql:mysql ${MYSQLDATA}/mysql
+               chmod 750 ${MYSQLDATA}/mysql
+       fi
+
+       if [ ! "$(ls -A ${MYSQLDATA}/mysql)" ];
+       then
+               mysql_install_db --user=mysql > /dev/null
+       fi
+
+       if [ ! -d ${MYSQLLOG} -a ! -L ${MYSQLLOG} ];
+       then
+               mkdir ${MYSQLLOG}
+               chown mysql:adm ${MYSQLLOG}
+               chmod 750 ${MYSQLLOG}
+               touch ${MYSQLLOG}/error.log
+               chmod 640 ${MYSQLLOG}/error.log
+               chown mysql:adm ${MYSQLLOG}/error.log
+       fi
+
+       if [ ! -d "${MYSQLRUN}" -a ! -L "${MYSQLRUN}" ];
+       then
+               mkdir ${MYSQLRUN}
+               chown mysql:mysql ${MYSQLRUN}
+               chmod 755 ${MYSQLRUN}
+       fi
+
+       /lib/init/apparmor-profile-load usr.sbin.mysqld
+
+       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
+}
+
+case $1 in
+       "pre")  sanity ;;
+       "post") pinger ;;
+esac
diff --git a/mysql-wsrep-5.6/packaging/deb-xenial/extra/mysql.cnf b/mysql-wsrep-5.6/packaging/deb-xenial/extra/mysql.cnf
new file mode 100644 (file)
index 0000000..04caab3
--- /dev/null
@@ -0,0 +1,26 @@
+# 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
+# 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
+
+#
+# The MySQL Community Server configuration file.
+#
+# 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/mysql-wsrep-5.6/packaging/deb-xenial/extra/mysql.conf.cnf b/mysql-wsrep-5.6/packaging/deb-xenial/extra/mysql.conf.cnf
new file mode 100644 (file)
index 0000000..b76afea
--- /dev/null
@@ -0,0 +1,22 @@
+# 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
+# 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
+
+#
+# The MySQL Commercial Client configuration file.
+#
+# For explanations see
+# http://dev.mysql.com/doc/mysql/en/server-system-variables.html
+
+[mysql]
diff --git a/mysql-wsrep-5.6/packaging/deb-xenial/extra/mysql_embedded.1 b/mysql-wsrep-5.6/packaging/deb-xenial/extra/mysql_embedded.1
new file mode 100644 (file)
index 0000000..735c4e0
--- /dev/null
@@ -0,0 +1 @@
+.so man1/mysql.1
diff --git a/mysql-wsrep-5.6/packaging/deb-xenial/extra/mysqld.cnf b/mysql-wsrep-5.6/packaging/deb-xenial/extra/mysqld.cnf
new file mode 100644 (file)
index 0000000..f8275a9
--- /dev/null
@@ -0,0 +1,48 @@
+# 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
+# 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
+
+#
+# The MySQL Commercial Server configuration file.
+#
+# For explanations see
+# http://dev.mysql.com/doc/mysql/en/server-system-variables.html
+
+[mysqld_safe]
+pid-file = /var/run/mysqld/mysqld.pid
+socket   = /var/run/mysqld/mysqld.sock
+nice   = 0
+
+[mysqld]
+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
+explicit_defaults_for_timestamp
+
+# 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
+
+log-error    = /var/log/mysql/error.log
+
+# Recommended in standard MySQL setup
+sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
+
+# Disabling symbolic-links is recommended to prevent assorted security risks
+symbolic-links=0
diff --git a/mysql-wsrep-5.6/packaging/deb-xenial/libmysqlclient-dev.install b/mysql-wsrep-5.6/packaging/deb-xenial/libmysqlclient-dev.install
new file mode 100644 (file)
index 0000000..1040c1c
--- /dev/null
@@ -0,0 +1,29 @@
+# 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
+# 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/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/bin/mysql_config_editor
+usr/share/man/man1/mysql_config.1
+usr/share/man/man1/mysql_config_editor.1
+# legal
+usr/share/doc/libmysqlclient-dev/COPYING
+usr/share/doc/libmysqlclient-dev/README
diff --git a/mysql-wsrep-5.6/packaging/deb-xenial/libmysqlclient-dev.lintian-overrides b/mysql-wsrep-5.6/packaging/deb-xenial/libmysqlclient-dev.lintian-overrides
new file mode 100644 (file)
index 0000000..5684af7
--- /dev/null
@@ -0,0 +1,21 @@
+# 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
+# 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
+libmysqlclient-dev: extra-license-file usr/share/doc/libmysqlclient-dev/LICENSE.mysql
+libmysqlclient-dev: extra-license-file usr/share/doc/libmysqlclient-dev/COPYING.gz
+libmysqlclient-dev: copyright-should-refer-to-common-license-file-for-lgpl
+# Due to static linking this cannot be avoided and hence being overridden
+libmysqlclient-dev: embedded-library
diff --git a/mysql-wsrep-5.6/packaging/deb-xenial/libmysqlclient18.install b/mysql-wsrep-5.6/packaging/deb-xenial/libmysqlclient18.install
new file mode 100644 (file)
index 0000000..34656ae
--- /dev/null
@@ -0,0 +1,19 @@
+# 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
+# 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/*/libmysqlclient.so.*
+# legal
+usr/share/doc/libmysqlclient18/COPYING
+usr/share/doc/libmysqlclient18/README
diff --git a/mysql-wsrep-5.6/packaging/deb-xenial/libmysqlclient18.lintian-overrides b/mysql-wsrep-5.6/packaging/deb-xenial/libmysqlclient18.lintian-overrides
new file mode 100644 (file)
index 0000000..b209f7d
--- /dev/null
@@ -0,0 +1,21 @@
+# 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
+# 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
+libmysqlclient18: extra-license-file usr/share/doc/libmysqlclient18/LICENSE.mysql
+libmysqlclient18: extra-license-file usr/share/doc/libmysqlclient18/COPYING.gz
+libmysqlclient18: copyright-should-refer-to-common-license-file-for-lgpl
+# Due to static linking this cannot be avoided and hence being overridden
+libmysqlclient18: embedded-library
diff --git a/mysql-wsrep-5.6/packaging/deb-xenial/libmysqld-dev.install b/mysql-wsrep-5.6/packaging/deb-xenial/libmysqld-dev.install
new file mode 100644 (file)
index 0000000..25d84d7
--- /dev/null
@@ -0,0 +1,20 @@
+# 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
+# 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/COPYING
+usr/share/doc/libmysqld-dev/README
diff --git a/mysql-wsrep-5.6/packaging/deb-xenial/libmysqld-dev.lintian-overrides b/mysql-wsrep-5.6/packaging/deb-xenial/libmysqld-dev.lintian-overrides
new file mode 100644 (file)
index 0000000..5f23271
--- /dev/null
@@ -0,0 +1,19 @@
+# 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
+# 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/COPYING.gz
+libmysqld-dev: copyright-should-refer-to-common-license-file-for-lgpl
diff --git a/mysql-wsrep-5.6/packaging/deb-xenial/mysql-client.install b/mysql-wsrep-5.6/packaging/deb-xenial/mysql-client.install
new file mode 100644 (file)
index 0000000..bdfd340
--- /dev/null
@@ -0,0 +1,18 @@
+# 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
+# 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/COPYING
+usr/share/doc/mysql-client/README
diff --git a/mysql-wsrep-5.6/packaging/deb-xenial/mysql-client.lintian-overrides b/mysql-wsrep-5.6/packaging/deb-xenial/mysql-client.lintian-overrides
new file mode 100644 (file)
index 0000000..3a13702
--- /dev/null
@@ -0,0 +1,19 @@
+# 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
+# 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/COPYING.gz
+mysql-client: copyright-should-refer-to-common-license-file-for-lgpl
diff --git a/mysql-wsrep-5.6/packaging/deb-xenial/mysql-common.dirs b/mysql-wsrep-5.6/packaging/deb-xenial/mysql-common.dirs
new file mode 100644 (file)
index 0000000..6879c64
--- /dev/null
@@ -0,0 +1,16 @@
+# 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
+# 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/mysql-wsrep-5.6/packaging/deb-xenial/mysql-common.install b/mysql-wsrep-5.6/packaging/deb-xenial/mysql-common.install
new file mode 100644 (file)
index 0000000..80d940e
--- /dev/null
@@ -0,0 +1,32 @@
+# 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
+# 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/my.cnf.fallback etc/mysql/
+debian/extra/mysql.conf.cnf  etc/mysql/conf.d/mysql.cnf
+
+usr/share/aclocal/mysql.m4
+usr/share/mysql/docs/INFO_SRC
+usr/share/mysql/docs/INFO_BIN
+usr/share/mysql/docs/ChangeLog
+# localized error msgs
+usr/share/mysql/*/errmsg.sys
+usr/share/mysql/errmsg-utf8.txt
+# charsets
+usr/share/mysql/charsets/*.xml
+usr/share/mysql/charsets/README
+# legal
+usr/share/doc/mysql-common/COPYING
+usr/share/doc/mysql-common/README
diff --git a/mysql-wsrep-5.6/packaging/deb-xenial/mysql-common.lintian-overrides b/mysql-wsrep-5.6/packaging/deb-xenial/mysql-common.lintian-overrides
new file mode 100644 (file)
index 0000000..567b8c9
--- /dev/null
@@ -0,0 +1,19 @@
+# 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
+# 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/COPYING.gz
+mysql-common: copyright-should-refer-to-common-license-file-for-lgpl
diff --git a/mysql-wsrep-5.6/packaging/deb-xenial/mysql-common.postinst b/mysql-wsrep-5.6/packaging/deb-xenial/mysql-common.postinst
new file mode 100644 (file)
index 0000000..ce1cd9e
--- /dev/null
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+# 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
+# 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/mysql-wsrep-5.6/packaging/deb-xenial/mysql-common.postrm b/mysql-wsrep-5.6/packaging/deb-xenial/mysql-common.postrm
new file mode 100644 (file)
index 0000000..3c37399
--- /dev/null
@@ -0,0 +1,25 @@
+#!/bin/bash
+
+# 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
+# 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/mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-bench.install b/mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-bench.install
new file mode 100644 (file)
index 0000000..bb46ab3
--- /dev/null
@@ -0,0 +1,19 @@
+# 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
+# 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/sql-bench/*
+# legal
+usr/share/doc/mysql-community-bench/COPYING
+usr/share/doc/mysql-community-bench/README
diff --git a/mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-bench.lintian-overrides b/mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-bench.lintian-overrides
new file mode 100644 (file)
index 0000000..7d6a1cf
--- /dev/null
@@ -0,0 +1,19 @@
+# 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
+# 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-community-bench: extra-license-file usr/share/doc/mysql-community-bench/LICENSE.mysql
+mysql-community-bench: extra-license-file usr/share/doc/mysql-community-bench/COPYING.gz
+mysql-community-bench: copyright-should-refer-to-common-license-file-for-lgpl
diff --git a/mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-client.install b/mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-client.install
new file mode 100644 (file)
index 0000000..531f12d
--- /dev/null
@@ -0,0 +1,56 @@
+# 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
+# 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_embedded
+usr/bin/mysqlaccess
+usr/bin/mysqlaccess.conf
+usr/bin/mysqladmin
+usr/bin/mysqlbug
+usr/bin/mysqlcheck
+usr/bin/mysql_client_test
+usr/bin/mysql_client_test_embedded
+usr/bin/mysqldump
+usr/bin/mysqldumpslow
+usr/bin/mysql_find_rows
+usr/bin/mysql_fix_extensions
+usr/bin/mysqlimport
+usr/bin/mysqlshow
+usr/bin/mysqlslap
+usr/bin/mysql_waitpid
+# man pages
+usr/share/man/man1/myisam_ftdump.1
+usr/share/man/man1/mysql.1
+usr/share/man/man1/mysql_embedded.1
+usr/share/man/man1/mysqlaccess.1
+usr/share/man/man1/mysqladmin.1
+usr/share/man/man1/mysqlbug.1
+usr/share/man/man1/mysqlcheck.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/mysqlshow.1
+usr/share/man/man1/mysqlslap.1
+usr/share/man/man1/mysql_waitpid.1
+# legal
+usr/share/doc/mysql-community-client/COPYING
+usr/share/doc/mysql-community-client/README
diff --git a/mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-client.lintian-overrides b/mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-client.lintian-overrides
new file mode 100644 (file)
index 0000000..fa916a0
--- /dev/null
@@ -0,0 +1,21 @@
+# 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
+# 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-community-client: extra-license-file usr/share/doc/mysql-community-client/LICENSE.mysql
+mysql-community-client: extra-license-file usr/share/doc/mysql-community-clienti/COPYING.gz
+mysql-community-client: copyright-should-refer-to-common-license-file-for-lgpl
+# Due to static linking this cannot be avoided and hence being overridden
+mysql-community-client: embedded-library
diff --git a/mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-server.config b/mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-server.config
new file mode 100755 (executable)
index 0000000..d97d534
--- /dev/null
@@ -0,0 +1,88 @@
+#!/bin/bash
+
+# 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
+# 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
+
+if [ "$1" = "configure" ] && [ -z "$2" ];
+then
+
+       set -e
+
+       PKG_LIST=mysql-server-5.5:mysql-server-5.6: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-community-server/data-dir || true
+               else
+                       db_fset mysql-community-server/data-dir seen true
+               fi
+
+               while :; do
+                       PASSWD=""
+                       db_input high mysql-community-server/root-pass || true
+                       db_go
+
+                       db_get mysql-community-server/root-pass
+                       if [ -z "${RET}" ];
+                       then
+                               db_fset mysql-community-server/root-pass seen true
+                               db_fset mysql-community-server/re-root-pass seen true
+                               break
+                       fi
+                       PASSWD="${RET}"
+
+                       db_input high mysql-community-server/re-root-pass || true
+                       db_go
+
+                       db_get mysql-community-server/re-root-pass
+                       if [ "${RET}" == "${PASSWD}" ];
+                       then
+                               PASSWD=""
+                               break
+                       fi
+
+                       db_fset mysql-community-server/root-pass-mismatch seen false
+                       db_input critical mysql-community-server/root-pass-mismatch
+                       db_set mysql-community-server/root-pass ""
+                       db_set mysql-community-server/re-root-pass ""
+               done
+
+       else
+               db_fset mysql-community-server/data-dir seen true
+               db_fset mysql-community-server/root-pass seen true
+               db_fset mysql-community-server/re-root-pass seen true
+       fi
+
+       set +e
+fi
diff --git a/mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-server.dirs b/mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-server.dirs
new file mode 100644 (file)
index 0000000..4a02115
--- /dev/null
@@ -0,0 +1,19 @@
+# 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
+# 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
+etc/init.d
+usr/lib/mysql
+usr/lib/mysql/plugin
diff --git a/mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-server.install b/mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-server.install
new file mode 100644 (file)
index 0000000..d5b6b2b
--- /dev/null
@@ -0,0 +1,94 @@
+# 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
+# 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/mysqlbinlog
+usr/bin/mysql_convert_table_format
+usr/bin/mysqld_multi
+usr/bin/mysqld_safe
+usr/bin/mysqlhotcopy
+usr/bin/mysql_install_db
+usr/bin/mysql_plugin
+usr/bin/mysql_secure_installation
+usr/bin/mysql_setpermission
+usr/bin/mysqltest
+usr/bin/mysqltest_embedded
+usr/bin/mysql_tzinfo_to_sql
+usr/bin/mysql_upgrade
+usr/bin/mysql_zap
+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/msql2mysql.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/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_install_db.1
+usr/share/man/man1/mysql_plugin.1
+usr/share/man/man1/mysql_secure_installation.1
+usr/share/man/man1/mysql.server.1
+usr/share/man/man1/mysql_setpermission.1
+usr/share/man/man1/mysql-stress-test.pl.1
+usr/share/man/man1/mysqltest.1
+usr/share/man/man1/mysqltest_embedded.1
+usr/share/man/man1/mysql_tzinfo_to_sql.1
+usr/share/man/man1/mysql_upgrade.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/man8/mysqld.8
+# confguration files
+debian/extra/mysql.cnf  etc/mysql/
+debian/extra/mysqld.cnf etc/mysql/mysql.conf.d/
+# app armor profile
+etc/apparmor.d/usr.sbin.mysqld
+# SQL files
+usr/share/mysql/*.sql
+# plugins
+usr/lib/mysql/plugin/*.so
+usr/lib/mysql/plugin/debug/*.so
+usr/lib/mysql/plugin/daemon_example.ini
+usr/lib/mysql/plugin/debug/daemon_example.ini
+# support files
+usr/share/mysql/mysqld_multi.server
+usr/share/mysql/magic
+usr/share/mysql/mysql-log-rotate
+usr/share/mysql/mysql-systemd-start
+usr/share/mysql/my-default.cnf
+usr/share/mysql/dictionary.txt
+# legal
+usr/share/doc/mysql-community-server/COPYING
+usr/share/doc/mysql-community-server/README
diff --git a/mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-server.lintian-overrides b/mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-server.lintian-overrides
new file mode 100644 (file)
index 0000000..e80759a
--- /dev/null
@@ -0,0 +1,23 @@
+# 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
+# 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-community-server: extra-license-file usr/share/doc/mysql-community-server/LICENSE.mysql
+mysql-community-server: extra-license-file usr/share/doc/mysql-community-server/COPYING.gz
+mysql-community-server: copyright-should-refer-to-common-license-file-for-lgpl
+# Due to static linking this cannot be avoided and hence being overridden
+mysql-community-server: embedded-library
+# Since we ship debug plugins so this error is overridden
+mysql-community-server: unstripped-binary-or-object usr/lib/mysql/plugin/debug/*
diff --git a/mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-server.mysql.init b/mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-server.mysql.init
new file mode 100755 (executable)
index 0000000..cab9cec
--- /dev/null
@@ -0,0 +1,192 @@
+#!/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 Community Server daemon
+# Description:       This service script facilitates startup and shutdown of
+#                    mysqld daemon throught its wrapper script mysqld_safe
+### END INIT INFO
+#
+
+# 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
+# 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
+
+cd /
+umask 077
+
+MYSQLDATA=/var/lib/mysql
+VERSION=$(mysqld --version | grep mysqld | cut -d' ' -f4)
+
+get_mysql_option() {
+       RESULT=$(my_print_defaults "$1" | sed -n "s/^--$2=//p" | tail -n 1)
+       if [ -z "$RESULT" ];
+       then
+               RESULT="$3"
+       fi
+       echo $RESULT
+}
+
+get_running () {
+       PIDFILE=$(get_mysql_option mysqld_safe pid-file "")
+       if [ -z "$PIDFILE" ];
+       then
+               PIDFILE=$(get_mysql_option mysqld pid-file "$MYSQLDATA/$(hostname).pid")
+       fi
+       if [ -e "$PIDFILE" ] && [ -d "/proc/$(cat "$PIDFILE")" ];
+       then
+               echo 1
+       else
+               echo 0
+       fi
+}
+
+server_stop () {
+       RUNNING=$(get_running)
+       COUNT=0
+       while :; do
+               COUNT=$(( COUNT+1 ))
+               echo -n .
+               if [ "${RUNNING}" -eq 0 ];
+               then
+                       echo
+                       break
+               fi
+               if [ "${COUNT}" -gt 15 ];
+               then
+                       echo
+                       return 1
+               fi
+               RUNNING=$(get_running)
+               sleep 1
+       done
+       return 0
+}
+
+case "$1" in
+  'start')
+       RUNNING=$(get_running)
+       if [ "${RUNNING}" -eq 1 ];
+       then
+               log_action_msg "A MySQL Server is already started"
+       else
+               MYSQLRUN=/var/run/mysqld
+               MYSQLDATA=/var/lib/mysql
+               MYSQLLOG=/var/log/mysql
+
+               if [ ! -d ${MYSQLDATA} -a ! -L ${MYSQLDATA} ];
+               then
+                       mkdir ${MYSQLDATA}
+                       chown mysql:mysql ${MYSQLDATA}
+                       chmod 750 ${MYSQLDATA}
+               fi
+
+               if [ ! -d "${MYSQLDATA}/mysql" -a ! -L "${MYSQLDATA}/mysql" ];
+               then
+                       mkdir ${MYSQLDATA}/mysql
+                       chown mysql:mysql ${MYSQLDATA}/mysql
+                       chmod 750 ${MYSQLDATA}/mysql
+               fi
+
+               if [ ! "$(ls -A ${MYSQLDATA}/mysql)" ];
+               then
+                       mysql_install_db --user=mysql > /dev/null
+               fi
+
+               if [ ! -d ${MYSQLLOG} -a ! -L ${MYSQLLOG} ];
+               then
+                       mkdir ${MYSQLLOG}
+                       chown mysql:adm ${MYSQLLOG}
+                       chmod 750 ${MYSQLLOG}
+                       touch ${MYSQLLOG}/error.log
+                       chmod 640 ${MYSQLLOG}/error.log
+                       chown mysql:adm ${MYSQLLOG}/error.log
+               fi
+
+               if [ ! -d "${MYSQLRUN}" -a ! -L "${MYSQLRUN}" ];
+               then
+                       mkdir ${MYSQLRUN}
+                       chown mysql:mysql ${MYSQLRUN}
+                       chmod 755 ${MYSQLRUN}
+               fi
+
+               /lib/init/apparmor-profile-load usr.sbin.mysqld
+
+               su - mysql -s /bin/bash -c "mysqld_safe > /dev/null &"
+               for i in 1 2 3 4 5 6;
+               do
+                       sleep 1
+                       echo -n .
+               done
+               echo
+               RUNNING=$(get_running)
+               if [ "${RUNNING}" -eq 1 ];
+               then
+                       log_action_msg "MySQL Community Server ${VERSION} is started"
+               else
+                       log_action_msg "MySQL Community Server ${VERSION} did not start. Please check logs for more details."
+               fi
+       fi
+       ;;
+
+  'stop')
+       RUNNING=$(get_running)
+       if [ "${RUNNING}" -eq 1 ];
+       then
+               killall -15 mysqld
+               server_stop
+               if [ "$?" -eq 0 ];
+               then
+                       log_action_msg "MySQL Community Server ${VERSION} is stopped"
+               else
+                       log_action_msg "Attempt to shutdown MySQL Community Server ${VERSION} timed out"
+               fi
+       else
+               log_action_msg "MySQL Community Server ${VERSION} is already stopped"
+       fi
+       ;;
+
+  'restart'|'reload'|'force-reload')
+       log_action_msg "Stopping MySQL Community Server ${VERSION}"
+       $0 stop
+       log_action_msg "Re-starting MySQL Community Server ${VERSION}"
+       $0 start
+       ;;
+
+  'status')
+       RUNNING=$(get_running)
+       if [ ${RUNNING} -eq 1 ];
+       then
+               log_action_msg "MySQL Community Server ${VERSION} is running"
+       else
+               log_action_msg "MySQL Community 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/mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-server.mysql.service b/mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-server.mysql.service
new file mode 100644 (file)
index 0000000..e38ab61
--- /dev/null
@@ -0,0 +1,33 @@
+# 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
+# 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 Community Server
+After=network.target
+
+[Install]
+WantedBy=multi-user.target
+
+[Service]
+User=mysql
+Group=mysql
+PermissionsStartOnly=true
+ExecStartPre=/usr/share/mysql/mysql-systemd-start pre
+ExecStart=/usr/bin/mysqld_safe
+ExecStartPost=/usr/share/mysql/mysql-systemd-start post
+TimeoutSec=600
+Restart=on-failure
diff --git a/mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-server.postinst b/mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-server.postinst
new file mode 100755 (executable)
index 0000000..246c277
--- /dev/null
@@ -0,0 +1,95 @@
+#!/bin/bash
+
+# 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
+# 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
+
+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
+}
+
+case "$1" in
+       configure)
+
+       if [ -z "$2" ];
+       then
+               set -e
+
+               update-alternatives --install /etc/mysql/my.cnf my.cnf "/etc/mysql/mysql.cnf" 200
+
+               MYSQLDATA=/var/lib/mysql
+
+               if [ ! -d "${MYSQLDATA}/mysql" -a ! -L "${MYSQLDATA}/mysql" ];
+               then
+                       mkdir ${MYSQLDATA}/mysql
+                       chown mysql:mysql ${MYSQLDATA}/mysql
+                       chmod 750 ${MYSQLDATA}/mysql
+                       if [ ! "$(ls -A ${MYSQLDATA}/mysql)" ];
+                       then
+                               mysql_install_db --user=mysql > /dev/null
+                       fi
+               fi
+
+               db_get mysql-community-server/root-pass && PASSWD=${RET}
+               if [ ! -z "${PASSWD}" ];
+               then
+                       db_set mysql-community-server/root-pass ""
+                       db_set mysql-community-server/re-root-pass ""
+                       PASSWD="UPDATE user SET password=PASSWORD('${PASSWD}') WHERE user='root';"
+               else
+                       PASSWD=""
+               fi
+
+               SQL=`mktemp`
+               if [ -f "${SQL}" ];
+               then
+                       chmod 700 ${SQL}
+                       cat << EOF > ${SQL}
+USE mysql;
+${PASSWD}
+DELETE FROM user WHERE user='';
+FLUSH PRIVILEGES;
+EOF
+                       mysqld --basedir=/usr --bootstrap --user=mysql --skip-grant-tables < $SQL
+                       PASSWD=""
+                       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/mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-server.postrm b/mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-server.postrm
new file mode 100755 (executable)
index 0000000..6d9b3ec
--- /dev/null
@@ -0,0 +1,155 @@
+#!/bin/bash
+
+# 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
+# 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
+       MYSQLLOG=/var/log/mysql
+       MYSQLRUN=/var/run/mysqld
+
+       server_stop
+
+       db_input high mysql-community-server/remove-data-dir || true
+       db_go
+       db_get mysql-community-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 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 getent passwd mysql >/dev/null;
+               then
+                       userdel mysql
+               fi
+       fi
+
+       set +e
+       ;;
+
+       upgrade|abort-upgrade)
+
+       ;;
+
+       *)
+       exit 1
+       ;;
+esac
+
+#DEBHELPER#
+
+exit 0
diff --git a/mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-server.preinst b/mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-server.preinst
new file mode 100755 (executable)
index 0000000..2a747ba
--- /dev/null
@@ -0,0 +1,123 @@
+#!/bin/bash
+
+# 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
+# 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
+
+               MYSQLDATA=/var/lib/mysql
+               MYSQLLOG=/var/log/mysql
+               MYSQLRUN=/var/run/mysqld
+
+               if ! getent group mysql >/dev/null;
+               then
+                       addgroup --system mysql >/dev/null
+               fi
+
+               if ! getent passwd mysql >/dev/null;
+               then
+                       adduser --ingroup mysql --system --disabled-login --no-create-home --home ${MYSQLDATA} --shell /bin/false --gecos "MySQL Server" mysql >/dev/null
+               fi
+
+               if [ ! -d ${MYSQLDATA} -a ! -L ${MYSQLDATA} ];
+               then
+                       mkdir ${MYSQLDATA}
+                       chown mysql:mysql ${MYSQLDATA}
+                       chmod 750 ${MYSQLDATA}
+               fi
+
+               if [ ! -d ${MYSQLLOG} -a ! -L ${MYSQLLOG} ];
+               then
+                       mkdir ${MYSQLLOG}
+                       chown mysql:adm ${MYSQLLOG}
+                       chmod 750 ${MYSQLLOG}
+                       touch ${MYSQLLOG}/error.log
+                       chmod 640 ${MYSQLLOG}/error.log
+                       chown mysql:adm ${MYSQLLOG}/error.log
+               fi
+
+               if [ ! -d ${MYSQLRUN} -a ! -L ${MYSQLRUN} ];
+               then
+                       mkdir ${MYSQLRUN}
+                       chown mysql:mysql ${MYSQLRUN}
+                       chmod 755 ${MYSQLRUN}
+               fi
+
+               set +e
+
+       fi
+
+       ;;
+
+       upgrade)
+
+       set -e
+
+       #DEBHELPER#
+       server_stop
+
+       set +e
+
+       ;;
+
+       abort-upgrade)
+
+       ;;
+
+       *)
+        exit 1
+        ;;
+esac
+
+exit 0
diff --git a/mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-server.prerm b/mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-server.prerm
new file mode 100755 (executable)
index 0000000..642c03d
--- /dev/null
@@ -0,0 +1,24 @@
+#!/bin/bash
+
+# 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
+# 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/mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-server.templates b/mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-server.templates
new file mode 100644 (file)
index 0000000..7b7e0ac
--- /dev/null
@@ -0,0 +1,33 @@
+Template: mysql-community-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 if you do not wish to set or change the root password at this time.
+
+Template: mysql-community-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-community-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-community-server/remove-data-dir
+Type: boolean
+Default: false
+Description: Remove data directory at /var/lib/mysql ?
+ This operation will remove the data directory that stores all the databases, tables and related meta-data.
+ It is highly recommended to take data backup before removing the data directory.
+
+Template: mysql-community-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/mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-source.install b/mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-source.install
new file mode 100644 (file)
index 0000000..8c3fbbb
--- /dev/null
@@ -0,0 +1,21 @@
+# 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
+# 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/
+../*.tar.xz usr/src/mysql/
+# legal
+usr/share/doc/mysql-community-source/COPYING
+usr/share/doc/mysql-community-source/README
diff --git a/mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-source.lintian-overrides b/mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-source.lintian-overrides
new file mode 100644 (file)
index 0000000..8247923
--- /dev/null
@@ -0,0 +1,19 @@
+# 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
+# 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-community-source: extra-license-file usr/share/doc/mysql-community-source/LICENSE.mysql
+mysql-community-source: extra-license-file usr/share/doc/mysql-community-source/COPYING.gz
+mysql-community-source: copyright-should-refer-to-common-license-file-for-lgpl
diff --git a/mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-test.install b/mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-test.install
new file mode 100644 (file)
index 0000000..5b33d48
--- /dev/null
@@ -0,0 +1,20 @@
+# 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
+# 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/*
+usr/share/man/man1/mysql-test-run.pl.1
+# legal
+usr/share/doc/mysql-community-test/COPYING
+usr/share/doc/mysql-community-test/README
diff --git a/mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-test.links b/mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-test.links
new file mode 100644 (file)
index 0000000..6a68af0
--- /dev/null
@@ -0,0 +1,17 @@
+# 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
+# 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/mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-test.lintian-overrides b/mysql-wsrep-5.6/packaging/deb-xenial/mysql-community-test.lintian-overrides
new file mode 100644 (file)
index 0000000..38315bc
--- /dev/null
@@ -0,0 +1,19 @@
+# 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
+# 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-community-test: extra-license-file usr/share/doc/mysql-community-test/LICENSE.mysql
+mysql-community-test: extra-license-file usr/share/doc/mysql-community-test/COPYING.gz
+mysql-community-test: copyright-should-refer-to-common-license-file-for-lgpl
diff --git a/mysql-wsrep-5.6/packaging/deb-xenial/mysql-server.install b/mysql-wsrep-5.6/packaging/deb-xenial/mysql-server.install
new file mode 100644 (file)
index 0000000..47255da
--- /dev/null
@@ -0,0 +1,18 @@
+# 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
+# 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-server/COPYING
+usr/share/doc/mysql-server/README
diff --git a/mysql-wsrep-5.6/packaging/deb-xenial/mysql-server.lintian-overrides b/mysql-wsrep-5.6/packaging/deb-xenial/mysql-server.lintian-overrides
new file mode 100644 (file)
index 0000000..8642e14
--- /dev/null
@@ -0,0 +1,19 @@
+# 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
+# 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-server: extra-license-file usr/share/doc/mysql-server/LICENSE.mysql
+mysql-server: extra-license-file usr/share/doc/mysql-server/COPYING.gz
+mysql-server: copyright-should-refer-to-common-license-file-for-lgpl
diff --git a/mysql-wsrep-5.6/packaging/deb-xenial/mysql-testsuite.install b/mysql-wsrep-5.6/packaging/deb-xenial/mysql-testsuite.install
new file mode 100644 (file)
index 0000000..342af04
--- /dev/null
@@ -0,0 +1,18 @@
+# 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
+# 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-testsuite/COPYING
+usr/share/doc/mysql-testsuite/README
diff --git a/mysql-wsrep-5.6/packaging/deb-xenial/mysql-testsuite.lintian-overrides b/mysql-wsrep-5.6/packaging/deb-xenial/mysql-testsuite.lintian-overrides
new file mode 100644 (file)
index 0000000..fd192af
--- /dev/null
@@ -0,0 +1,19 @@
+# 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
+# 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-testsuite: extra-license-file usr/share/doc/mysql-testsuite/LICENSE.mysql
+mysql-testsuite: extra-license-file usr/share/doc/mysql-testsuite/COPYING.gz
+mysql-testsuite: copyright-should-refer-to-common-license-file-for-lgpl
diff --git a/mysql-wsrep-5.6/packaging/deb-xenial/patches/fix-man-page-links.patch b/mysql-wsrep-5.6/packaging/deb-xenial/patches/fix-man-page-links.patch
new file mode 100644 (file)
index 0000000..004ccdf
--- /dev/null
@@ -0,0 +1,14 @@
+From: Akhil Mohan <akhil.mohan@oracle.com>
+Description: Fix path in man page link.
+Bug: http://bugs.mysql.com/bug.php?id=70952
+
+--- a/man/mysql_client_test_embedded.1 2013-11-08 19:00:22.000000000 +0530
++++ b/man/mysql_client_test_embedded.1 2013-11-14 19:29:56.768315219 +0530
+@@ -1 +1 @@
+-.so man-gpl-tmp2/mysql_client_test.1
++.so man1/mysql_client_test.1
+--- a/man/mysqltest_embedded.1 2013-11-08 19:00:22.000000000 +0530
++++ b/man/mysqltest_embedded.1 2013-11-14 19:31:19.079280675 +0530
+@@ -1 +1 @@
+-.so man-gpl-tmp2/mysqltest.1
++.so man1/mysqltest.1
diff --git a/mysql-wsrep-5.6/packaging/deb-xenial/patches/fix-mtr-search-paths.patch b/mysql-wsrep-5.6/packaging/deb-xenial/patches/fix-mtr-search-paths.patch
new file mode 100644 (file)
index 0000000..8a27a09
--- /dev/null
@@ -0,0 +1,13 @@
+From: Akhil Mohan <akhil.mohan@oracle.com>
+Description: Adding extra search path for testsuite.
+
+--- a/mysql-test/lib/mtr_cases.pm      2014-02-24 13:14:37 +0530
++++ b/mysql-test/lib/mtr_cases.pm      2014-07-02 11:46:24 +0530
+@@ -288,6 +288,7 @@
+     {
+       $suitedir= my_find_dir($::basedir,
+                            ["share/mysql-test/suite",
++                            "lib/mysql-test/suite",
+                             "mysql-test/suite",
+                             "internal/mysql-test/suite",
+                             "mysql-test",
diff --git a/mysql-wsrep-5.6/packaging/deb-xenial/patches/fix-mysql_install_db.patch b/mysql-wsrep-5.6/packaging/deb-xenial/patches/fix-mysql_install_db.patch
new file mode 100644 (file)
index 0000000..41311b2
--- /dev/null
@@ -0,0 +1,43 @@
+From: Terje Røsten <terje.rosten@oracle.com>
+Description: Maintains the pending --skip-my-cnf option in mainline
+Bug: <TODO>
+
+diff --git a/scripts/mysql_install_db.pl.in b/scripts/mysql_install_db.pl.in
+index 440a977..7d068fc 100644
+--- a/scripts/mysql_install_db.pl.in
++++ b/scripts/mysql_install_db.pl.in
+@@ -113,6 +113,7 @@ EOF2
+   print <<EOF3;
+   --rpm                For internal use.  This option is used by RPM files
+                        during the MySQL installation process.
++                       Implies --keep-my-cnf option.
+   --skip-name-resolve  Use IP addresses rather than hostnames when creating
+                        grant table entries.  This option can be useful if
+                        your DNS does not work.
+@@ -439,7 +440,7 @@ if ( $opt->{srcdir} and $opt->{basedir} )
+ {
+   error($opt,"Specify either --basedir or --srcdir, not both");
+ }
+-if ( $opt->{'keep-my-cnf'} )
++if ( $opt->{rpm} || $opt->{'keep-my-cnf'} )
+ {
+   $keep_my_cnf = 1;
+ }
+@@ -664,7 +665,7 @@ if ( $opt->{'skip-name-resolve'} and $resolved and $resolved =~ /\s/ )
+ }
+
+ # ----------------------------------------------------------------------
+-# Create database directories mysql & test
++# Create database directory mysql
+ # ----------------------------------------------------------------------
+
+ # FIXME The shell variant uses "mkdir -p":
+@@ -697,7 +698,7 @@ if ($opt_user)
+   }
+ }
+
+-foreach my $dir ( $opt->{ldata}, "$opt->{ldata}/mysql", "$opt->{ldata}/test" )
++foreach my $dir ( $opt->{ldata}, "$opt->{ldata}/mysql")
+ {
+   mkdir($dir, 0700) unless -d $dir;
+   if ($opt_user and -w "/")
diff --git a/mysql-wsrep-5.6/packaging/deb-xenial/patches/series b/mysql-wsrep-5.6/packaging/deb-xenial/patches/series
new file mode 100644 (file)
index 0000000..48069e2
--- /dev/null
@@ -0,0 +1,18 @@
+# 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
+# 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
+
+#fix-man-page-links.patch
+fix-mysql_install_db.patch
+fix-mtr-search-paths.patch
diff --git a/mysql-wsrep-5.6/packaging/deb-xenial/rules b/mysql-wsrep-5.6/packaging/deb-xenial/rules
new file mode 100755 (executable)
index 0000000..e81d6a2
--- /dev/null
@@ -0,0 +1,137 @@
+#!/usr/bin/make -f
+
+# 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
+# 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
+
+%:
+       dh $@
+
+export DH_VERBOSE=1
+export CFLAGS=
+export CXXFLAGS=
+
+override_dh_auto_configure:
+       @echo "RULES.$@"
+       cmake . \
+               -DBUILD_CONFIG=mysql_release \
+               -DCMAKE_INSTALL_PREFIX=/usr \
+               -DINSTALL_DOCDIR=share/mysql/docs \
+               -DINSTALL_DOCREADMEDIR=share/mysql \
+               -DINSTALL_INCLUDEDIR=include/mysql \
+               -DINSTALL_INFODIR=share/mysql/docs \
+               -DINSTALL_LIBDIR=lib/$(DEB_HOST_MULTIARCH) \
+               -DINSTALL_MANDIR=share/man \
+               -DINSTALL_MYSQLSHAREDIR=share/mysql \
+               -DINSTALL_MYSQLTESTDIR=lib/mysql-test \
+               -DINSTALL_PLUGINDIR=lib/mysql/plugin \
+               -DINSTALL_SBINDIR=sbin \
+               -DINSTALL_SCRIPTDIR=bin \
+               -DINSTALL_SQLBENCHDIR=lib/mysql \
+               -DINSTALL_SUPPORTFILESDIR=share/mysql \
+               -DMYSQL_DATADIR=/var/lib/mysql \
+               -DSYSCONFDIR=/etc/mysql \
+               -DMYSQL_UNIX_ADDR=/var/run/mysqld/mysqld.sock \
+               -DWITH_SSL=bundled \
+               -DWITH_ZLIB=system \
+               -DWITH_EXTRA_CHARSETS=all \
+               -DWITH_INNODB_MEMCACHED=1 \
+               -DCOMPILATION_COMMENT="MySQL Community Server (GPL)" \
+               -DINSTALL_LAYOUT=DEB
+
+       cat CMakeCache.txt
+       touch $@
+
+override_dh_auto_build:
+       @echo "RULES.$@"
+       $(MAKE) -j8 VERBOSE=1
+       touch $@
+
+override_dh_auto_test:
+       @echo "RULES.$@"
+       echo "No tests run because test 9: pfs_connect_attr is failing unreasonably"
+       touch $@
+
+override_dh_auto_install:
+
+       @echo "RULES.$@"
+       # complete install first
+       $(MAKE) install DESTDIR=debian/tmp
+       # remove all redundant files and links
+       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 -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
+       # add apparmor profile
+       install -g root -o root -m 0644 -D debian/extra/apparmor-profile debian/tmp/etc/apparmor.d/usr.sbin.mysqld
+       # add systemd script
+       install -m 0755 debian/extra/mysql-systemd-start debian/tmp/usr/share/mysql/
+       # 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-community-server
+       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-community-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/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-community-bench
+       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-community-test
+       install -g root -o root -m 0755 -d debian/tmp/usr/share/doc/mysql-community-source
+       # add COPYING file to each package
+       install -g root -o root -m 0644 debian/tmp/usr/share/mysql/COPYING debian/tmp/usr/share/doc/mysql-server/COPYING
+       install -g root -o root -m 0644 debian/tmp/usr/share/mysql/COPYING debian/tmp/usr/share/doc/mysql-community-server/COPYING
+       install -g root -o root -m 0644 debian/tmp/usr/share/mysql/COPYING debian/tmp/usr/share/doc/mysql-client/COPYING
+       install -g root -o root -m 0644 debian/tmp/usr/share/mysql/COPYING debian/tmp/usr/share/doc/mysql-community-client/COPYING
+       install -g root -o root -m 0644 debian/tmp/usr/share/mysql/COPYING debian/tmp/usr/share/doc/mysql-common/COPYING
+       install -g root -o root -m 0644 debian/tmp/usr/share/mysql/COPYING debian/tmp/usr/share/doc/libmysqlclient18/COPYING
+       install -g root -o root -m 0644 debian/tmp/usr/share/mysql/COPYING debian/tmp/usr/share/doc/libmysqlclient-dev/COPYING
+       install -g root -o root -m 0644 debian/tmp/usr/share/mysql/COPYING debian/tmp/usr/share/doc/libmysqld-dev/COPYING
+       install -g root -o root -m 0644 debian/tmp/usr/share/mysql/COPYING debian/tmp/usr/share/doc/mysql-community-bench/COPYING
+       install -g root -o root -m 0644 debian/tmp/usr/share/mysql/COPYING debian/tmp/usr/share/doc/mysql-testsuite/COPYING
+       install -g root -o root -m 0644 debian/tmp/usr/share/mysql/COPYING debian/tmp/usr/share/doc/mysql-community-test/COPYING
+       install -g root -o root -m 0644 debian/tmp/usr/share/mysql/COPYING debian/tmp/usr/share/doc/mysql-community-source/COPYING
+       # 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-community-server/README
+       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-community-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/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-community-bench/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-community-test/README
+       install -g root -o root -m 0644 debian/tmp/usr/share/mysql/README debian/tmp/usr/share/doc/mysql-community-source/README
+       touch $@
+
+override_dh_installinit:
+       @echo "RULES.$@"
+       dh_apparmor -pmysql-community-server --profile-name=usr.sbin.mysqld
+       dh_systemd_enable --name=mysql
+       dh_installinit --name=mysql -- defaults 19 21
+       dh_systemd_start --restart-after-upgrade
+       touch $@
diff --git a/mysql-wsrep-5.6/packaging/deb-xenial/source/format b/mysql-wsrep-5.6/packaging/deb-xenial/source/format
new file mode 100644 (file)
index 0000000..163aaf8
--- /dev/null
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/mysql-wsrep-5.6/packaging/deb-xenial/source/include-binaries b/mysql-wsrep-5.6/packaging/deb-xenial/source/include-binaries
new file mode 100644 (file)
index 0000000..a199230
--- /dev/null
@@ -0,0 +1,34 @@
+# 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
+# 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
+
+# obscured filename for mysqld-debug, libmysqld-debug.a and debug plugins
+debian/extra/server-binary
+debian/extra/embedded-server
+debian/extra/adt_null-plugin
+debian/extra/auth-plugin
+debian/extra/auth_socket-plugin
+debian/extra/auth_test_plugin-plugin
+debian/extra/innodb_engine-plugin
+debian/extra/libdaemon_example-plugin
+debian/extra/libmemcached-plugin
+debian/extra/mypluglib-plugin
+debian/extra/mysql_no_login-plugin
+debian/extra/qa_auth_client-plugin
+debian/extra/qa_auth_interface-plugin
+debian/extra/qa_auth_server-plugin
+debian/extra/semisync_master-plugin
+debian/extra/semisync_slave-plugin
+debian/extra/test_udf_services-plugin
+debian/extra/validate_password-plugin
diff --git a/mysql-wsrep-5.6/packaging/deb-xenial/watch b/mysql-wsrep-5.6/packaging/deb-xenial/watch
new file mode 100644 (file)
index 0000000..c45c5e3
--- /dev/null
@@ -0,0 +1,2 @@
+version=3
+http://mysql.mirrors.pair.com/Downloads/MySQL-5.6/mysql-([\d\.]+).tar.gz
index 47498f34f95ebb0c5983dbde83239ad7f688c6fe..e51fdbcbeb2e37bfa274fe0f27c51a3996b079a9 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2000, 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
@@ -189,7 +189,8 @@ done
 
 #  Remove test plugins
 for p in auth.so auth_test_plugin.so daemon_example.ini libdaemon_example.so qa_auth_client.so \
-    qa_auth_interface.so qa_auth_server.so replication_observers_example_plugin.so ha_example.so ; do
+    qa_auth_interface.so qa_auth_server.so replication_observers_example_plugin.so ha_example.so \
+    test_udf_services.so ; do
     rm -f %{buildroot}%{_libdir}/mysql/plugin/$p
 done
 
@@ -238,6 +239,7 @@ rm -r $(readlink var) var
 %dir %{_libdir}/mysql/plugin
 %attr(755, root, root) %{_libdir}/mysql/plugin/adt_null.so
 %attr(755, root, root) %{_libdir}/mysql/plugin/auth_socket.so
+%attr(755, root, root) %{_libdir}/mysql/plugin/connection_control.so
 %attr(755, root, root) %{_libdir}/mysql/plugin/innodb_engine.so
 %attr(755, root, root) %{_libdir}/mysql/plugin/libmemcached.so
 %attr(755, root, root) %{_libdir}/mysql/plugin/mypluglib.so
@@ -286,6 +288,12 @@ rm -r $(readlink var) var
 %dir %attr(750, mysql, mysql) /var/lib/mysql-files
 
 %changelog
+* Tue Sep 13 2016 Balasubramanian Kandasamy <balasubramanian.kandasamy@oracle.com> - 5.6.34-1
+- Add connection_control.so to server subpackage
+
+* Mon Mar 14 2016 Georgi Kodinov <georgi.kodinov@oracle.com> - 5.6.31-1
+- Add test_udf_services.so plugin
+
 * Thu Jun 25 2015 Balasubramanian Kandasamy <balasubramanian.kandasamy@oracle.com> - 5.6.26-1
 - Update package names
 
index 63dc7d1d777a39e44770b3168b92cede77605836..51bf0035df8ae0cdf3e11431e1d4467aa1103c8d 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2012, 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
@@ -28,7 +28,7 @@ IF(UNIX)
 
   FOREACH(fedfile my.cnf my_config.h mysql_config.sh
           mysqld.service mysql-systemd-start mysql.conf
-          mysql-5.6.16-mysql-install.patch mysql-5.6-libmysqlclient-symbols.patch)
+          mysql-5.6.16-mysql-install.patch)
     CONFIGURE_FILE(${fedfile} ${CMAKE_CURRENT_BINARY_DIR}/${fedfile} COPYONLY)
   ENDFOREACH()
 ENDIF()
index fab7b3627b31a4b2629677f591c6748aae10e435..c744bdceeb4d9aafedb9760c67e42c619c76188b 100644 (file)
@@ -22,7 +22,9 @@ install_db () {
     datadir=$(get_option mysqld datadir "/var/lib/mysql")
 
     # Restore log, dir, perms and SELinux contexts
-    [ -d "$datadir" ] || install -d -m 0755 -omysql -gmysql "$datadir" || exit 1
+    if [ ! -d "$datadir" -a ! -h "$datadir" -a "x$(dirname "$datadir")" = "x/var/lib" ]; then
+       install -d -m 0755 -omysql -gmysql "$datadir" || exit 1
+    fi
     log=/var/log/mysqld.log
     [ -e $log ] || touch $log
     chmod 0640 $log
@@ -30,6 +32,12 @@ install_db () {
     if [ -x /usr/sbin/restorecon ]; then
         /usr/sbin/restorecon "$datadir"
         /usr/sbin/restorecon $log
+        for dir in /var/lib/mysql-files ; do
+            if [ -x /usr/sbin/semanage -a -d /var/lib/mysql -a -d $dir ] ; then
+               /usr/sbin/semanage fcontext -a -e /var/lib/mysql $dir >/dev/null 2>&1
+               /sbin/restorecon $dir
+           fi
+       done
     fi
 
     # If special mysql dir is in place, skip db install 
index 2f571ac455b02338fbd31cce6e7bd2ba2edca90f..55fb390113b10ca6b0a1e7b25eb037b2d6fdf810 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2000, 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
@@ -54,6 +54,8 @@
 %global license_type          GPLv2
 %endif
 
+%global min                   5.6.10
+
 Name:           mysql-%{product_suffix}
 Summary:        A very fast and reliable SQL database server
 Group:          Applications/Databases
@@ -69,8 +71,7 @@ Source2:        mysqld.service
 Source3:        mysql.conf
 Source4:        my_config.h
 Source6:        mysql_config.sh
-Patch0:         mysql-5.6-libmysqlclient-symbols.patch
-Patch1:         mysql-5.6.16-mysql-install.patch
+Patch0:         mysql-5.6.16-mysql-install.patch
 BuildRequires:  cmake
 BuildRequires:  perl
 BuildRequires:  time
@@ -114,14 +115,15 @@ Requires:       shadow-utils
 Requires:       net-tools
 %if 0%{?commercial}
 Obsoletes:      mysql-community-server < %{version}-%{release}
-Requires:       mysql-commercial-client%{?_isa} = %{version}-%{release}
+Requires:       mysql-commercial-client%{?_isa} >= %{min}
 Requires:       mysql-commercial-common%{?_isa} = %{version}-%{release}
 %else
-Requires:       mysql-community-client%{?_isa} = %{version}-%{release}
+Requires:       mysql-community-client%{?_isa} >= %{min}
 Requires:       mysql-community-common%{?_isa} = %{version}-%{release}
 %endif
 Obsoletes:      mariadb-server
 Obsoletes:      mariadb-galera-server
+Obsoletes:      mariadb-server-galera
 Obsoletes:      community-mysql-server < %{version}-%{release}
 Obsoletes:      mysql-server < %{version}-%{release}
 Provides:       mysql-server = %{version}-%{release}
@@ -158,9 +160,9 @@ Summary:        MySQL database client applications and tools
 Group:          Applications/Databases
 %if 0%{?commercial}
 Obsoletes:      mysql-community-client < %{version}-%{release}
-Requires:       mysql-commercial-libs%{?_isa} = %{version}-%{release}
+Requires:       mysql-commercial-libs%{?_isa} >= %{min}
 %else
-Requires:       mysql-community-libs%{?_isa} = %{version}-%{release}
+Requires:       mysql-community-libs%{?_isa} >= %{min}
 %endif
 Obsoletes:      mariadb
 Obsoletes:      community-mysql < %{version}-%{release}
@@ -196,10 +198,10 @@ MySQL database server, and MySQL embedded server.
 Summary:        Test suite for the MySQL database server
 Group:          Applications/Databases
 %if 0%{?commercial}
-Requires:       mysql-commercial-server%{?_isa} = %{version}-%{release}
+Requires:       mysql-commercial-server%{?_isa} >= %{min}
 Obsoletes:      mysql-community-test < %{version}-%{release}
 %else
-Requires:       mysql-community-server%{?_isa} = %{version}-%{release}
+Requires:       mysql-community-server%{?_isa} >= %{min}
 %endif
 Obsoletes:      mariadb-test
 Obsoletes:      community-mysql-test < %{version}-%{release}
@@ -217,9 +219,9 @@ Summary:        MySQL benchmark suite
 Group:          Applications/Databases
 %if 0%{?commercial}
 Obsoletes:      mysql-community-bench < %{version}-%{release}
-Requires:       mysql-commercial-server%{?_isa} = %{version}-%{release}
+Requires:       mysql-commercial-server%{?_isa} >= %{min}
 %else
-Requires:       mysql-community-server%{?_isa} = %{version}-%{release}
+Requires:       mysql-community-server%{?_isa} >= %{min}
 %endif
 Obsoletes:      mariadb-bench
 Obsoletes:      community-mysql-bench < %{obs_ver}
@@ -236,9 +238,9 @@ Summary:        Development header files and libraries for MySQL database client
 Group:          Applications/Databases
 %if 0%{?commercial}
 Obsoletes:      mysql-community-devel < %{version}-%{release}
-Requires:       mysql-enterprise-libs%{?_isa} = %{version}-%{release}
+Requires:       mysql-commercial-libs%{?_isa} >= %{min}
 %else
-Requires:       mysql-community-libs%{?_isa} = %{version}-%{release}
+Requires:       mysql-community-libs%{?_isa} >= %{min}
 %endif
 Obsoletes:      mariadb-devel
 Obsoletes:      community-mysql-devel < %{obs_ver}
@@ -255,9 +257,9 @@ Summary:        Shared libraries for MySQL database client applications
 Group:          Applications/Databases
 %if 0%{?commercial}
 Obsoletes:      mysql-community-libs < %{version}-%{release}
-Requires:       mysql-commercial-common%{?_isa} = %{version}-%{release}
+Requires:       mysql-commercial-common%{?_isa} >= %{min}
 %else
-Requires:       mysql-community-common%{?_isa} = %{version}-%{release}
+Requires:       mysql-community-common%{?_isa} >= %{min}
 %endif
 Obsoletes:      mariadb-libs
 Obsoletes:      community-mysql-libs < %{version}-%{release}
@@ -301,11 +303,11 @@ Summary:        Development header files and libraries for MySQL as an embeddabl
 Group:          Applications/Databases
 %if 0%{?commercial}
 Obsoletes:      mysql-community-embedded-devel < %{version}-%{release}
-Requires:       mysql-commercial-devel%{?_isa} = %{version}-%{release}
-Requires:       mysql-commercial-embedded%{?_isa} = %{version}-%{release}
+Requires:       mysql-commercial-devel%{?_isa} >= %{min}
+Requires:       mysql-commercial-embedded%{?_isa} >= %{min}
 %else
-Requires:       mysql-community-devel%{?_isa} = %{version}-%{release}
-Requires:       mysql-community-embedded%{?_isa} = %{version}-%{release}
+Requires:       mysql-community-devel%{?_isa} >= %{min}
+Requires:       mysql-community-embedded%{?_isa} >= %{min}
 %endif
 Obsoletes:      mariadb-embedded-devel
 Obsoletes:      community-mysql-embedded-devel < %{version}-%{release}
@@ -321,7 +323,6 @@ the embedded version of the MySQL server.
 %setup -q -T -a 0 -c -n %{src_dir}
 pushd %{src_dir}
 %patch0 -p1
-%patch1 -p1
 
 %build
 # Fail quickly and obviously if user tries to build as root
@@ -352,6 +353,7 @@ mkdir debug
            -DINSTALL_SQLBENCHDIR=share \
            -DMYSQL_UNIX_ADDR="%{mysqldatadir}/mysql.sock" \
            -DFEATURE_SET="%{feature_set}" \
+           -DWITH_SYMVER16=1 \
            -DWITH_EMBEDDED_SERVER=1 \
            -DWITH_EMBEDDED_SHARED_LIBRARY=1 \
            %{?ssl_option} \
@@ -377,6 +379,7 @@ mkdir release
            -DINSTALL_SQLBENCHDIR=share \
            -DMYSQL_UNIX_ADDR="%{mysqldatadir}/mysql.sock" \
            -DFEATURE_SET="%{feature_set}" \
+           -DWITH_SYMVER16=1 \
            -DWITH_EMBEDDED_SERVER=1 \
            -DWITH_EMBEDDED_SHARED_LIBRARY=1 \
            %{?ssl_option} \
@@ -393,6 +396,7 @@ MBD=$RPM_BUILD_DIR/%{src_dir}
 install -d -m 0755 %{buildroot}%{_datadir}/mysql/SELinux/RHEL4
 install -d -m 0755 %{buildroot}/var/lib/mysql
 install -d -m 0755 %{buildroot}/var/run/mysqld
+install -d -m 0750 %{buildroot}/var/lib/mysql-files
 
 # Install all binaries
 pushd $MBD/release
@@ -458,6 +462,7 @@ rm -r $(readlink var) var
 datadir=$(/usr/bin/my_print_defaults server mysqld | grep '^--datadir=' | sed -n 's/--datadir=//p' | tail -n 1)
 /bin/chmod 0755 "$datadir" >/dev/null 2>&1 || :
 /bin/touch /var/log/mysqld.log >/dev/null 2>&1 || :
+/bin/chown mysql:mysql /var/log/mysqld.log >/dev/null 2>&1 || :
 %systemd_post mysqld.service
 /usr/bin/systemctl enable mysqld >/dev/null 2>&1 || :
 
@@ -542,6 +547,7 @@ datadir=$(/usr/bin/my_print_defaults server mysqld | grep '^--datadir=' | sed -n
 %dir %{_libdir}/mysql/plugin
 %attr(755, root, root) %{_libdir}/mysql/plugin/adt_null.so
 %attr(755, root, root) %{_libdir}/mysql/plugin/auth_socket.so
+%attr(755, root, root) %{_libdir}/mysql/plugin/connection_control.so
 %attr(755, root, root) %{_libdir}/mysql/plugin/innodb_engine.so
 %attr(755, root, root) %{_libdir}/mysql/plugin/libmemcached.so
 %attr(755, root, root) %{_libdir}/mysql/plugin/mypluglib.so
@@ -552,6 +558,7 @@ datadir=$(/usr/bin/my_print_defaults server mysqld | grep '^--datadir=' | sed -n
 %dir %{_libdir}/mysql/plugin/debug
 %attr(755, root, root) %{_libdir}/mysql/plugin/debug/adt_null.so
 %attr(755, root, root) %{_libdir}/mysql/plugin/debug/auth_socket.so
+%attr(755, root, root) %{_libdir}/mysql/plugin/debug/connection_control.so
 %attr(755, root, root) %{_libdir}/mysql/plugin/debug/innodb_engine.so
 %attr(755, root, root) %{_libdir}/mysql/plugin/debug/libmemcached.so
 %attr(755, root, root) %{_libdir}/mysql/plugin/debug/mypluglib.so
@@ -577,6 +584,7 @@ datadir=$(/usr/bin/my_print_defaults server mysqld | grep '^--datadir=' | sed -n
 %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/mysqld
+%dir %attr(750, mysql, mysql) /var/lib/mysql-files
 
 %files common
 %defattr(-, root, root, -)
@@ -625,8 +633,6 @@ datadir=$(/usr/bin/my_print_defaults server mysqld | grep '^--datadir=' | sed -n
 %attr(755, root, root) %{_bindir}/mysqlimport
 %attr(755, root, root) %{_bindir}/mysqlshow
 %attr(755, root, root) %{_bindir}/mysqlslap
-%attr(755, root, root) %{_bindir}/mysql_config
-%attr(755, root, root) %{_bindir}/mysql_config-%{__isa_bits}
 %attr(755, root, root) %{_bindir}/mysql_config_editor
 
 %attr(644, root, root) %{_mandir}/man1/msql2mysql.1*
@@ -679,12 +685,14 @@ datadir=$(/usr/bin/my_print_defaults server mysqld | grep '^--datadir=' | sed -n
 %attr(755, root, root) %{_libdir}/mysql/plugin/auth_test_plugin.so
 %attr(644, root, root) %{_libdir}/mysql/plugin/daemon_example.ini
 %attr(755, root, root) %{_libdir}/mysql/plugin/libdaemon_example.so
+%attr(755, root, root) %{_libdir}/mysql/plugin/test_udf_services.so
 %attr(755, root, root) %{_libdir}/mysql/plugin/qa_auth_client.so
 %attr(755, root, root) %{_libdir}/mysql/plugin/qa_auth_interface.so
 %attr(755, root, root) %{_libdir}/mysql/plugin/qa_auth_server.so
 %attr(755, root, root) %{_libdir}/mysql/plugin/debug/auth.so
 %attr(755, root, root) %{_libdir}/mysql/plugin/debug/auth_test_plugin.so
 %attr(755, root, root) %{_libdir}/mysql/plugin/debug/libdaemon_example.so
+%attr(755, root, root) %{_libdir}/mysql/plugin/debug/test_udf_services.so
 %attr(755, root, root) %{_libdir}/mysql/plugin/debug/qa_auth_client.so
 %attr(755, root, root) %{_libdir}/mysql/plugin/debug/qa_auth_interface.so
 %attr(755, root, root) %{_libdir}/mysql/plugin/debug/qa_auth_server.so
@@ -716,6 +724,18 @@ datadir=$(/usr/bin/my_print_defaults server mysqld | grep '^--datadir=' | sed -n
 %attr(755, root, root) %{_libdir}/mysql/libmysqld.so
 
 %changelog
+* Mon Oct 31 2016 Balasubramanian Kandasamy <balasubramanian.kandasamy@oracle.com> - 5.6.35-1
+- Add connection_control.so to server subpackage
+
+* Mon Sep 26 2016 Balasubramanian Kandasamy <balasubramanian.kandasamy@oracle.com> - 5.6.34-1
+- Include mysql-files directory
+
+* Tue Jul 05 2016 Balasubramanian Kandasamy <balasubramanian.kandasamy@oracle.com> - 5.6.32-1
+- Remove mysql_config from client subpackage
+
+* Mon Mar 14 2016 Georgi Kodinov <georgi.kodinov@oracle.com> - 5.6.31-1
+- Add test_udf_services.so plugin
+
 * Wed Jan 14 2015 Balasubramanian Kandasamy <balasubramanian.kandasamy@oracle.com> - 5.6.24-1
 - Add mysql_no_login.so plugin
 
index abe46e0ed74dee4fc05e1c2de5ccbd5b9b2ff38c..8044ed441641a4536363b823d9d009092a66f2d2 100644 (file)
@@ -2,22 +2,30 @@
 #
 # Wrapper script for mysql_config to support multilib
 #
-# Only works on OEL6/RHEL6 and similar
 #
-# This command respects setarch
 
+# This command respects setarch, works on OL6/RHEL6 and later
 bits=$(rpm --eval %__isa_bits)
 
 case $bits in
-    32|64) status=known ;;
-        *) status=unknown ;;
+    32|64) ;;
+        *) bits=unknown ;;
 esac
 
-if [ "$status" = "unknown" ] ; then
-    echo "$0: error: command 'rpm --eval %__isa_bits' returned unknown value: $bits"
-    exit 1
+# Try mapping by uname if rpm command failed
+if [ "$bits" = "unknown" ] ; then
+    arch=$(uname -m)
+    case $arch in
+       x86_64|ppc64|ppc64le|aarch64|s390x|sparc64) bits=64 ;;
+       i386|i486|i586|i686|pentium3|pentium4|athlon|ppc|s390|sparc) bits=32 ;;
+       *) bits=unknown ;;
+    esac
 fi
 
+if [ "$bits" == "unknown" ] ; then
+    echo "$0: error: failed to determine isa bits on your arch."
+    exit 1
+fi
 
 if [ -x /usr/bin/mysql_config-$bits ] ; then
     /usr/bin/mysql_config-$bits "$@"
@@ -25,4 +33,3 @@ else
     echo "$0: error: needed binary: /usr/bin/mysql_config-$bits is missing. Please check your MySQL installation."
     exit 1
 fi
-
index 8831cc6642f625b6b503320696baa2b1601c9852..0f75a1302569eae68acbb7605bf18dea5a6b7467 100644 (file)
@@ -34,7 +34,7 @@ PermissionsStartOnly=true
 ExecStartPre=/usr/bin/mysql-systemd-start pre
 
 # Start main service
-ExecStart=/usr/bin/mysqld_safe
+ExecStart=/usr/bin/mysqld_safe --basedir=/usr
 
 # Don't signal startup success before a ping works
 ExecStartPost=/usr/bin/mysql-systemd-start post
index 252573e801c5a22fbdbc183052dec7868e75fbdd..948305b8d52d86a7ce3187ac6d50912eec1b57b3 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2012, 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
@@ -29,8 +29,7 @@ IF(UNIX)
   FOREACH(fedfile my.cnf my_config.h mysql_config.sh
           mysqld.service mysql-systemd-start mysql.conf
           mysql-5.6.16-mysql-install.patch mysql.init
-          filter-requires.sh filter-provides.sh
-          mysql-5.6-libmysqlclient-symbols.patch)
+          filter-requires.sh filter-provides.sh)
     CONFIGURE_FILE(${fedfile} ${CMAKE_CURRENT_BINARY_DIR}/${fedfile} COPYONLY)
   ENDFOREACH()
 ENDIF()
index fab7b3627b31a4b2629677f591c6748aae10e435..c744bdceeb4d9aafedb9760c67e42c619c76188b 100644 (file)
@@ -22,7 +22,9 @@ install_db () {
     datadir=$(get_option mysqld datadir "/var/lib/mysql")
 
     # Restore log, dir, perms and SELinux contexts
-    [ -d "$datadir" ] || install -d -m 0755 -omysql -gmysql "$datadir" || exit 1
+    if [ ! -d "$datadir" -a ! -h "$datadir" -a "x$(dirname "$datadir")" = "x/var/lib" ]; then
+       install -d -m 0755 -omysql -gmysql "$datadir" || exit 1
+    fi
     log=/var/log/mysqld.log
     [ -e $log ] || touch $log
     chmod 0640 $log
@@ -30,6 +32,12 @@ install_db () {
     if [ -x /usr/sbin/restorecon ]; then
         /usr/sbin/restorecon "$datadir"
         /usr/sbin/restorecon $log
+        for dir in /var/lib/mysql-files ; do
+            if [ -x /usr/sbin/semanage -a -d /var/lib/mysql -a -d $dir ] ; then
+               /usr/sbin/semanage fcontext -a -e /var/lib/mysql $dir >/dev/null 2>&1
+               /sbin/restorecon $dir
+           fi
+       done
     fi
 
     # If special mysql dir is in place, skip db install 
index bfd4a4c84886f342fa523af80c41a459ffa3695a..a316e29e115d8876bf9c8a24b79d4ff678cbf4c9 100644 (file)
@@ -70,29 +70,39 @@ start(){
        ret=0
     else
        # prepare for start
-       touch "$errlogfile"
-       chown mysql:mysql "$errlogfile" 
-       chmod 0640 "$errlogfile"
+       if [ ! -e "$errlogfile" -a ! -h "$errlogfile" -a "x$(dirname "$errlogfile")" = "x/var/log" ]; then
+           install /dev/null -m0640 -omysql -gmysql "$errlogfile"
+       fi
        [ -x /sbin/restorecon ] && /sbin/restorecon "$errlogfile"
        if [ ! -d "$datadir/mysql" ] ; then
            # First, make sure $datadir is there with correct permissions
-           if [ ! -e "$datadir" -a ! -h "$datadir" ]
-           then
-               mkdir -p "$datadir" || exit 1
+           if [ ! -d "$datadir" -a ! -h "$datadir" -a "x$(dirname "$datadir")" = "x/var/lib" ]; then
+               install -d -m0755 -omysql -gmysql "$datadir" || exit 1
+           fi
+           if [ ! -h "$datadir" -a "x$(dirname "$datadir")" = "x/var/lib" ]; then
+               chown mysql:mysql "$datadir"
+               chmod 0755 "$datadir"
+           fi
+           if [ -x /sbin/restorecon ]; then
+               /sbin/restorecon "$datadir"
+               for dir in /var/lib/mysql-files ; do
+                   if [ -x /usr/sbin/semanage -a -d /var/lib/mysql -a -d $dir ] ; then
+                       /usr/sbin/semanage fcontext -a -e /var/lib/mysql $dir >/dev/null 2>&1
+                       /sbin/restorecon $dir
+                   fi
+               done
            fi
-           chown mysql:mysql "$datadir"
-           chmod 0755 "$datadir"
-           [ -x /sbin/restorecon ] && /sbin/restorecon "$datadir"
            # Now create the database
            action $"Initializing MySQL database: " /usr/bin/mysql_install_db --rpm --datadir="$datadir" --user=mysql
            ret=$?
-           chown -R mysql:mysql "$datadir"
            if [ $ret -ne 0 ] ; then
                return $ret
            fi
        fi
-       chown mysql:mysql "$datadir"
-       chmod 0755 "$datadir"
+       if [ ! -h "$datadir" -a "x$(dirname "$datadir")" = "x/var/lib" ]; then
+           chown mysql:mysql "$datadir"
+           chmod 0755 "$datadir"
+       fi
        # Pass all the options determined above, to ensure consistent behavior.
        # In many cases mysqld_safe would arrive at the same conclusions anyway
        # but we need to be sure.  (An exception is that we don't force the
@@ -102,7 +112,7 @@ start(){
        # alarms, per bug #547485
        $exec   --datadir="$datadir" --socket="$socketfile" \
                --pid-file="$mypidfile" \
-               --basedir=/usr --user=mysql >/dev/null 2>&1 &
+               --basedir=/usr --user=mysql >/dev/null &
        safe_pid=$!
        # Spin for a maximum of N seconds waiting for the server to come up;
        # exit the loop immediately if mysqld_safe process disappears.
index 6e442564c746ba7b1191f19de69c723142f33179..c5da35b2c0306a1e4fcd20bbb51f2c95ffa401e2 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2000, 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
@@ -81,6 +81,8 @@
 %global license_type          GPLv2
 %endif
 
+%global min                   5.6.10
+
 Name:           mysql-%{product_suffix}
 Summary:        A very fast and reliable SQL database server
 Group:          Applications/Databases
@@ -102,7 +104,6 @@ Source7:        %{compatsrc}
 Source90:       filter-provides.sh
 Source91:       filter-requires.sh
 Patch0:         mysql-5.6.16-mysql-install.patch
-Patch1:         mysql-5.6-libmysqlclient-symbols.patch
 BuildRequires:  cmake
 BuildRequires:  perl
 %{?el7:BuildRequires: perl(Time::HiRes)}
@@ -160,11 +161,11 @@ Requires:       net-tools
 Provides:       MySQL-server-advanced%{?_isa} = %{version}-%{release}
 Obsoletes:      MySQL-server-advanced < %{version}-%{release}
 Obsoletes:      mysql-community-server < %{version}-%{release}
-Requires:       mysql-commercial-client%{?_isa} = %{version}-%{release}
+Requires:       mysql-commercial-client%{?_isa} >= %{min}
 Requires:       mysql-commercial-common%{?_isa} = %{version}-%{release}
 %else
 Provides:       MySQL-server%{?_isa} = %{version}-%{release}
-Requires:       mysql-community-client%{?_isa} = %{version}-%{release}
+Requires:       mysql-community-client%{?_isa} >= %{min}
 Requires:       mysql-community-common%{?_isa} = %{version}-%{release}
 %endif
 Obsoletes:      MySQL-server < %{version}-%{release}
@@ -213,10 +214,10 @@ Group:          Applications/Databases
 Provides:       MySQL-client-advanced%{?_isa} = %{version}-%{release}
 Obsoletes:      MySQL-client-advanced < %{version}-%{release}
 Obsoletes:      mysql-community-client < %{version}-%{release}
-Requires:       mysql-commercial-libs%{?_isa} = %{version}-%{release}
+Requires:       mysql-commercial-libs%{?_isa} >= %{min}
 %else
 Provides:       MySQL-client%{?_isa} = %{version}-%{release}
-Requires:       mysql-community-libs%{?_isa} = %{version}-%{release}
+Requires:       mysql-community-libs%{?_isa} >= %{min}
 %endif
 Obsoletes:      MySQL-client < %{version}-%{release}
 Obsoletes:      mariadb
@@ -238,7 +239,7 @@ Obsoletes:      mysql-community-common < %{version}-%{release}
 %endif
 Provides:       mysql-common = %{version}-%{release}
 Provides:       mysql-common%{?_isa} = %{version}-%{release}
-%{?el5:Requires: mysql%{?_isa} = %{version}-%{release}} 
+%{?el5:Requires: mysql%{?_isa} >= %{min}}
 
 %description    common
 This packages contains common files needed by MySQL client library,
@@ -252,10 +253,10 @@ Group:          Applications/Databases
 Provides:       MySQL-test-advanced%{?_isa} = %{version}-%{release}
 Obsoletes:      MySQL-test-advanced < %{version}-%{release}
 Obsoletes:      mysql-community-test < %{version}-%{release}
-Requires:       mysql-commercial-server%{?_isa} = %{version}-%{release}
+Requires:       mysql-commercial-server%{?_isa} >= %{min}
 %else
 Provides:       MySQL-test%{?_isa} = %{version}-%{release}
-Requires:       mysql-community-server%{?_isa} = %{version}-%{release}
+Requires:       mysql-community-server%{?_isa} >= %{min}
 %endif
 Obsoletes:      MySQL-test < %{version}-%{release}
 Obsoletes:      mysql-test < %{version}-%{release}
@@ -273,9 +274,9 @@ Summary:        MySQL benchmark suite
 Group:          Applications/Databases
 %if 0%{?commercial}
 Obsoletes:      mysql-community-bench < %{version}-%{release}
-Requires:       mysql-commercial-server%{?_isa} = %{version}-%{release}
+Requires:       mysql-commercial-server%{?_isa} >= %{min}
 %else
-Requires:       mysql-community-server%{?_isa} = %{version}-%{release}
+Requires:       mysql-community-server%{?_isa} >= %{min}
 %endif
 Obsoletes:      mariadb-bench
 Obsoletes:      community-mysql-bench < %{version}-%{release}
@@ -294,10 +295,10 @@ Group:          Applications/Databases
 Provides:       MySQL-devel-advanced%{?_isa} = %{version}-%{release}
 Obsoletes:      MySQL-devel-advanced < %{version}-%{release}
 Obsoletes:      mysql-community-devel < %{version}-%{release}
-Requires:       mysql-commercial-libs%{?_isa} = %{version}-%{release}
+Requires:       mysql-commercial-libs%{?_isa} >= %{min}
 %else
 Provides:       MySQL-devel%{?_isa} = %{version}-%{release}
-Requires:       mysql-community-libs%{?_isa} = %{version}-%{release}
+Requires:       mysql-community-libs%{?_isa} >= %{min}
 %endif
 Obsoletes:      MySQL-devel < %{version}-%{release}
 Obsoletes:      mysql-devel < %{version}-%{release}
@@ -317,10 +318,10 @@ Group:          Applications/Databases
 Provides:       MySQL-shared-advanced%{?_isa} = %{version}-%{release}
 Obsoletes:      MySQL-shared-advanced < %{version}-%{release}
 Obsoletes:      mysql-community-libs < %{version}-%{release}
-Requires:       mysql-commercial-common%{?_isa} = %{version}-%{release}
+Requires:       mysql-commercial-common%{?_isa} >= %{min}
 %else
 Provides:       MySQL-shared%{?_isa} = %{version}-%{release}
-Requires:       mysql-community-common%{?_isa} = %{version}-%{release}
+Requires:       mysql-community-common%{?_isa} >= %{min}
 %endif
 Obsoletes:      MySQL-shared < %{version}-%{release}
 Obsoletes:      mysql-libs < %{version}-%{release}
@@ -344,10 +345,10 @@ Provides:       mysql-libs-compat%{?_isa} = %{version}-%{release}
 Provides:       MySQL-shared-compat-advanced%{?_isa} = %{version}-%{release}
 Obsoletes:      MySQL-shared-compat-advanced < %{version}-%{release}
 Obsoletes:      mysql-community-libs-compat < %{version}-%{release}
-Requires:       mysql-commercial-libs%{?_isa} = %{version}-%{release}
+Requires:       mysql-commercial-libs%{?_isa} >= %{min}
 %else
 Provides:       MySQL-shared-compat%{?_isa} = %{version}-%{release}
-Requires:       mysql-community-libs%{?_isa} = %{version}-%{release}
+Requires:       mysql-community-libs%{?_isa} >= %{min}
 %endif
 Obsoletes:      MySQL-shared-compat < %{version}-%{release}
 %if 0%{?rhel} > 5
@@ -394,11 +395,11 @@ Summary:        Development header files and libraries for MySQL as an embeddabl
 Group:          Applications/Databases
 %if 0%{?commercial}
 Obsoletes:      mysql-community-embedded-devel < %{version}-%{release}
-Requires:       mysql-commercial-devel%{?_isa} = %{version}-%{release}
-Requires:       mysql-commercial-embedded%{?_isa} = %{version}-%{release}
+Requires:       mysql-commercial-devel%{?_isa} >= %{min}
+Requires:       mysql-commercial-embedded%{?_isa} >= %{min}
 %else
-Requires:       mysql-community-devel%{?_isa} = %{version}-%{release}
-Requires:       mysql-community-embedded%{?_isa} = %{version}-%{release}
+Requires:       mysql-community-devel%{?_isa} >= %{min}
+Requires:       mysql-community-embedded%{?_isa} >= %{min}
 %endif
 Obsoletes:      mariadb-embedded-devel
 Obsoletes:      mysql-embedded-devel < %{version}-%{release}
@@ -414,13 +415,13 @@ the embedded version of the MySQL server.
 Summary:        Convenience package for easy upgrades of MySQL package set
 Group:          Applications/Databases
 %if 0%{?commercial}
-Requires:       mysql-commercial-client%{?_isa} = %{version}-%{release}
-Requires:       mysql-commercial-libs%{?_isa} = %{version}-%{release}
-Requires:       mysql-commercial-libs-compat%{?_isa} = %{version}-%{release}
+Requires:       mysql-commercial-client%{?_isa} >= %{min}
+Requires:       mysql-commercial-libs%{?_isa} >= %{min}
+Requires:       mysql-commercial-libs-compat%{?_isa} >= %{min}
 %else
-Requires:       mysql-community-client%{?_isa} = %{version}-%{release}
-Requires:       mysql-community-libs%{?_isa} = %{version}-%{release}
-Requires:       mysql-community-libs-compat%{?_isa} = %{version}-%{release}
+Requires:       mysql-community-client%{?_isa} >= %{min}
+Requires:       mysql-community-libs%{?_isa} >= %{min}
+Requires:       mysql-community-libs-compat%{?_isa} >= %{min}
 %endif
 
 %description -n mysql
@@ -439,7 +440,6 @@ package has been split into several subpackages.
 %endif # 0%{?compatlib}
 pushd %{src_dir}
 %patch0 -p1
-%{?el7:%patch1 -p1}
 
 %build
 # Fail quickly and obviously if user tries to build as root
@@ -511,6 +511,7 @@ mkdir debug
            -DINSTALL_SQLBENCHDIR=share \
            -DMYSQL_UNIX_ADDR="%{mysqldatadir}/mysql.sock" \
            -DFEATURE_SET="%{feature_set}" \
+           %{?el7:-DWITH_SYMVER16=1} \
            -DWITH_EMBEDDED_SERVER=1 \
            -DWITH_EMBEDDED_SHARED_LIBRARY=1 \
            %{?ssl_option} \
@@ -536,6 +537,7 @@ mkdir release
            -DINSTALL_SQLBENCHDIR=share \
            -DMYSQL_UNIX_ADDR="%{mysqldatadir}/mysql.sock" \
            -DFEATURE_SET="%{feature_set}" \
+           %{?el7:-DWITH_SYMVER16=1} \
            -DWITH_EMBEDDED_SERVER=1 \
            -DWITH_EMBEDDED_SHARED_LIBRARY=1 \
            %{?ssl_option} \
@@ -562,6 +564,7 @@ MBD=$RPM_BUILD_DIR/%{src_dir}
 install -d -m 0755 %{buildroot}%{_datadir}/mysql/SELinux/RHEL4
 install -d -m 0755 %{buildroot}/var/lib/mysql
 install -d -m 0755 %{buildroot}/var/run/mysqld
+install -d -m 0750 %{buildroot}/var/lib/mysql-files
 
 # Install all binaries
 cd $MBD/release
@@ -633,6 +636,7 @@ rm -r $(readlink var) var
 datadir=$(/usr/bin/my_print_defaults server mysqld | grep '^--datadir=' | sed -n 's/--datadir=//p' | tail -n 1)
 /bin/chmod 0755 "$datadir" >/dev/null 2>&1 || :
 /bin/touch /var/log/mysqld.log >/dev/null 2>&1 || :
+/bin/chown mysql:mysql /var/log/mysqld.log >/dev/null 2>&1 || :
 %if 0%{?systemd}
 %systemd_post mysqld.service
 /usr/bin/systemctl enable mysqld >/dev/null 2>&1 || :
@@ -743,6 +747,7 @@ fi
 %dir %{_libdir}/mysql/plugin
 %attr(755, root, root) %{_libdir}/mysql/plugin/adt_null.so
 %attr(755, root, root) %{_libdir}/mysql/plugin/auth_socket.so
+%attr(755, root, root) %{_libdir}/mysql/plugin/connection_control.so
 %attr(755, root, root) %{_libdir}/mysql/plugin/innodb_engine.so
 %attr(755, root, root) %{_libdir}/mysql/plugin/libmemcached.so
 %attr(755, root, root) %{_libdir}/mysql/plugin/mypluglib.so
@@ -753,6 +758,7 @@ fi
 %dir %{_libdir}/mysql/plugin/debug
 %attr(755, root, root) %{_libdir}/mysql/plugin/debug/adt_null.so
 %attr(755, root, root) %{_libdir}/mysql/plugin/debug/auth_socket.so
+%attr(755, root, root) %{_libdir}/mysql/plugin/debug/connection_control.so
 %attr(755, root, root) %{_libdir}/mysql/plugin/debug/innodb_engine.so
 %attr(755, root, root) %{_libdir}/mysql/plugin/debug/libmemcached.so
 %attr(755, root, root) %{_libdir}/mysql/plugin/debug/mypluglib.so
@@ -765,12 +771,14 @@ fi
 %attr(755, root, root) %{_libdir}/mysql/plugin/auth_test_plugin.so
 %attr(644, root, root) %{_libdir}/mysql/plugin/daemon_example.ini
 %attr(755, root, root) %{_libdir}/mysql/plugin/libdaemon_example.so
+%attr(755, root, root) %{_libdir}/mysql/plugin/test_udf_services.so
 %attr(755, root, root) %{_libdir}/mysql/plugin/qa_auth_client.so
 %attr(755, root, root) %{_libdir}/mysql/plugin/qa_auth_interface.so
 %attr(755, root, root) %{_libdir}/mysql/plugin/qa_auth_server.so
 %attr(755, root, root) %{_libdir}/mysql/plugin/debug/auth.so
 %attr(755, root, root) %{_libdir}/mysql/plugin/debug/auth_test_plugin.so
 %attr(755, root, root) %{_libdir}/mysql/plugin/debug/libdaemon_example.so
+%attr(755, root, root) %{_libdir}/mysql/plugin/debug/test_udf_services.so
 %attr(755, root, root) %{_libdir}/mysql/plugin/debug/qa_auth_client.so
 %attr(755, root, root) %{_libdir}/mysql/plugin/debug/qa_auth_interface.so
 %attr(755, root, root) %{_libdir}/mysql/plugin/debug/qa_auth_server.so
@@ -809,6 +817,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/mysqld
+%dir %attr(750, mysql, mysql) /var/lib/mysql-files
 
 %files common
 %defattr(-, root, root, -)
@@ -857,8 +866,6 @@ fi
 %attr(755, root, root) %{_bindir}/mysqlimport
 %attr(755, root, root) %{_bindir}/mysqlshow
 %attr(755, root, root) %{_bindir}/mysqlslap
-%attr(755, root, root) %{_bindir}/mysql_config
-%attr(755, root, root) %{_bindir}/mysql_config-%{__isa_bits}
 %attr(755, root, root) %{_bindir}/mysql_config_editor
 
 %attr(644, root, root) %{_mandir}/man1/msql2mysql.1*
@@ -949,6 +956,18 @@ fi
 %endif
 
 %changelog
+* Mon Oct 31 2016 Balasubramanian Kandasamy <balasubramanian.kandasamy@oracle.com> - 5.6.35-1
+- Add connection_control.so to server subpackage
+
+* Mon Sep 26 2016 Balasubramanian Kandasamy <balasubramanian.kandasamy@oracle.com> - 5.6.34-1
+- Include mysql-files directory
+
+* Tue Jul 05 2016 Balasubramanian Kandasamy <balasubramanian.kandasamy@oracle.com> - 5.6.32-1
+- Remove mysql_config from client subpackage
+
+* Mon Mar 14 2016 Georgi Kodinov <georgi.kodinov@oracle.com> - 5.6.31-1
+- Add test_udf_services.so plugin
+
 * Tue Sep 29 2015 Balasubramanian Kandasamy <balasubramanian.kandasamy@oracle.com> - 5.6.28-1
 - Added conflicts to mysql-connector-c-shared dependencies
 
index 05007f7344e020d3f0683b5a04aa9a677b727a0e..8044ed441641a4536363b823d9d009092a66f2d2 100644 (file)
@@ -5,10 +5,10 @@
 #
 
 # This command respects setarch, works on OL6/RHEL6 and later
-isa_bits=$(rpm --eval %__isa_bits)
+bits=$(rpm --eval %__isa_bits)
 
 case $bits in
-    32|64) bits=$isa_bits ;;
+    32|64) ;;
         *) bits=unknown ;;
 esac
 
@@ -16,8 +16,8 @@ esac
 if [ "$bits" = "unknown" ] ; then
     arch=$(uname -m)
     case $arch in
-       x86_64|ppc64) bits=64 ;;
-       i386|i486|i586|i686|pentium3|pentium4|athlon|ppc) bits=32 ;;
+       x86_64|ppc64|ppc64le|aarch64|s390x|sparc64) bits=64 ;;
+       i386|i486|i586|i686|pentium3|pentium4|athlon|ppc|s390|sparc) bits=32 ;;
        *) bits=unknown ;;
     esac
 fi
@@ -33,4 +33,3 @@ else
     echo "$0: error: needed binary: /usr/bin/mysql_config-$bits is missing. Please check your MySQL installation."
     exit 1
 fi
-
index 78ef3bffe601ce37299afde6deddaf3e8e048b25..871f191c0171aeb8d15e4524ccf9395de69fc4ac 100644 (file)
@@ -34,7 +34,7 @@ PermissionsStartOnly=true
 ExecStartPre=/usr/bin/mysql-systemd-start pre
 
 # Start main service
-ExecStart=/usr/bin/mysqld_safe
+ExecStart=/usr/bin/mysqld_safe --basedir=/usr
 
 # Don't signal startup success before a ping works
 ExecStartPost=/usr/bin/mysql-systemd-start post
index d3a79202e749d7cbb212ee5b279837c0754345c2..29b6de5c7c448d46f4e2a5e2a4f640d2676ef18a 100644 (file)
@@ -13,7 +13,9 @@ install_db () {
     datadir=$(/usr/bin/my_print_defaults server mysqld | grep '^--datadir=' | sed -n 's/--datadir=//p' | tail -n 1)
     
     # Restore log, dir, perms and SELinux contexts
-    [ -d "$datadir" ] || install -d -m 0755 -omysql -gmysql "$datadir" || exit 1
+    if [ ! -d "$datadir" -a ! -h "$datadir" -a "x$(dirname "$datadir")" = "x/var/lib" ]; then
+       install -d -m 0755 -omysql -gmysql "$datadir" || exit 1
+    fi
     log=/var/log/mysql/mysqld.log
     [ -e $log ] || touch $log
     chmod 0640 $log
index 749aa200e52a26ae020018a635c013e976295984..8b7c94475f7543c1b9e1f8df7d11aa4185a12507 100644 (file)
@@ -65,7 +65,6 @@ get_option () {
 datadir=$(get_option mysqld datadir "/var/lib/mysql")
 socket=$(get_option  mysqld socket "$datadir/mysql.sock")
 pidfile=$(get_option mysqld_safe pid-file "/var/run/mysql/mysqld.pid")
-logfile=$(get_option mysqld_safe log-error "/var/log/mysql/mysqld.log")
 
 install_db () {
     # Note: something different than datadir=/var/lib/mysql requires 
@@ -74,14 +73,16 @@ install_db () {
     logfile=$(get_option mysqld_safe log-error "/var/log/mysql/mysqld.log")
 
     # Restore log, dir, perms and SELinux contexts
-    [ -d "$datadir" ] || install -d -m 0755 -omysql -gmysql "$datadir" || return 1
+    if [ ! -d "$datadir" -a ! -h "$datadir" -a "x$(dirname "$datadir")" = "x/var/lib" ]; then
+       install -d -m 0755 -omysql -gmysql "$datadir" || return 1
+    fi
 
-    [ -e $logfile ] || touch $logfile || return 1
-    chmod 0640 $logfile
-    chown mysql:mysql $logfile || return 1
+    if [ ! -e "$logfile" -a ! -h "$logfile" -a "x$(dirname "$logfile")" = "x/var/log/mysql" ]; then
+       install /dev/null -omysql -gmysql "$logfile" || return 1
+    fi
     if [ -x /usr/sbin/restorecon ]; then
         /usr/sbin/restorecon "$datadir"
-        /usr/sbin/restorecon $logfile
+        /usr/sbin/restorecon "$logfile"
     fi
 
     # If special mysql dir is in place, skip db install 
@@ -153,7 +154,7 @@ start () {
        rc_failed 6 ; rc_status -v ; rc_exit
     fi
 
-    $PROG --basedir=/usr --datadir="$datadir" --pid-file="$pidfile" >/dev/null 2>&1 &
+    $PROG --basedir=/usr --datadir="$datadir" --pid-file="$pidfile" >/dev/null &
     if pinger $! ; then
        echo -n "Starting service MySQL:"
        touch $lockfile
index 2fed2da793b055e063c39f4dedaba8aa94a1c791..ca3494936b659caee5ff90d4d0739a52ddec1488 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2000, 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
@@ -66,6 +66,8 @@
 %{?sles12:                %global systemd 1}
 %{!?_tmpfilesdir:         %global _tmpfilesdir /usr/lib/tmpfiles.d}
 
+%global min                   5.6.10
+
 Name:           mysql-%{product_suffix}
 Summary:        A very fast and reliable SQL database server
 Group:          Applications/Databases
@@ -136,12 +138,12 @@ Requires:       perl-base
 Provides:       MySQL-server-advanced = %{version}-%{release}
 Obsoletes:      MySQL-server-advanced < %{version}-%{release}
 Obsoletes:      mysql-community-server < %{version}-%{release}
-Requires:       mysql-commercial-client = %{version}-%{release}
-Requires:       mysql-commercial-common = %{version}-%{release}
+Requires:       mysql-commercial-client >= %{min}
+Requires:       mysql-commercial-common >= %{min}
 %else
 Provides:       MySQL-server = %{version}-%{release}
-Requires:       mysql-community-client = %{version}-%{release}
-Requires:       mysql-community-common = %{version}-%{release}
+Requires:       mysql-community-client >= %{min}
+Requires:       mysql-community-common >= %{min}
 %endif
 Obsoletes:      MySQL-server < %{version}-%{release}
 Obsoletes:      mysql < %{version}-%{release}
@@ -189,10 +191,10 @@ Group:          Applications/Databases
 Provides:       MySQL-client-advanced = %{version}-%{release}
 Obsoletes:      MySQL-client-advanced < %{version}-%{release}
 Obsoletes:      mysql-community-client < %{version}-%{release}
-Requires:       mysql-commercial-libs = %{version}-%{release}
+Requires:       mysql-commercial-libs >= %{min}
 %else
 Provides:       MySQL-client = %{version}-%{release}
-Requires:       mysql-community-libs = %{version}-%{release}
+Requires:       mysql-community-libs >= %{min}
 %endif
 Obsoletes:      MySQL-client < %{version}-%{release}
 Provides:       mysql-client = %{version}-%{release}
@@ -224,10 +226,10 @@ Group:          Applications/Databases
 Provides:       MySQL-test-advanced = %{version}-%{release}
 Obsoletes:      MySQL-test-advanced < %{version}-%{release}
 Obsoletes:      mysql-community-test < %{version}-%{release}
-Requires:       mysql-commercial-server = %{version}-%{release}
+Requires:       mysql-commercial-server >= %{min}
 %else
 Provides:       MySQL-test = %{version}-%{release}
-Requires:       mysql-community-server = %{version}-%{release}
+Requires:       mysql-community-server >= %{min}
 %endif
 Obsoletes:      MySQL-test < %{version}-%{release}
 Obsoletes:      mysql-test < %{version}-%{release}
@@ -245,9 +247,9 @@ Summary:        MySQL benchmark suite
 Group:          Applications/Databases
 %if 0%{?commercial}
 Obsoletes:      mysql-community-bench < %{version}-%{release}
-Requires:       mysql-commercial-server = %{version}-%{release}
+Requires:       mysql-commercial-server >= %{min}
 %else
-Requires:       mysql-community-server = %{version}-%{release}
+Requires:       mysql-community-server >= %{min}
 %endif
 Obsoletes:      mariadb-bench
 Obsoletes:      community-mysql-bench < %{version}-%{release}
@@ -266,10 +268,10 @@ Group:          Applications/Databases
 Provides:       MySQL-devel-advanced = %{version}-%{release}
 Obsoletes:      MySQL-devel-advanced < %{version}-%{release}
 Obsoletes:      mysql-community-devel < %{version}-%{release}
-Requires:       mysql-commercial-libs = %{version}-%{release}
+Requires:       mysql-commercial-libs >= %{min}
 %else
 Provides:       MySQL-devel = %{version}-%{release}
-Requires:       mysql-community-libs = %{version}-%{release}
+Requires:       mysql-community-libs >= %{min}
 %endif
 Obsoletes:      MySQL-devel < %{version}-%{release}
 Obsoletes:      mysql-devel < %{version}-%{release}
@@ -290,10 +292,10 @@ Group:          Applications/Databases
 Provides:       MySQL-shared-advanced = %{version}-%{release}
 Obsoletes:      MySQL-shared-advanced < %{version}-%{release}
 Obsoletes:      mysql-community-libs < %{version}-%{release}
-Requires:       mysql-commercial-common = %{version}-%{release}
+Requires:       mysql-commercial-common >= %{min}
 %else
 Provides:       MySQL-shared = %{version}-%{release}
-Requires:       mysql-community-common = %{version}-%{release}
+Requires:       mysql-community-common >= %{min}
 %endif
 Obsoletes:      MySQL-shared < %{version}-%{release}
 Obsoletes:      mysql-libs < %{version}-%{release}
@@ -316,10 +318,10 @@ Group:          Applications/Databases
 Provides:       MySQL-embedded-advanced = %{version}-%{release}
 Obsoletes:      MySQL-embedded-advanced < %{version}-%{release}
 Obsoletes:      mysql-community-embedded < %{version}-%{release}
-Requires:       mysql-commercial-common = %{version}-%{release}
+Requires:       mysql-commercial-common >= %{min}
 %else
 Provides:       MySQL-embedded = %{version}-%{release}
-Requires:       mysql-community-common = %{version}-%{release}
+Requires:       mysql-community-common >= %{min}
 %endif
 Obsoletes:      mariadb-embedded
 Obsoletes:      MySQL-embedded < %{version}-%{release}
@@ -343,11 +345,11 @@ Summary:        Development header files and libraries for MySQL as an embeddabl
 Group:          Applications/Databases
 %if 0%{?commercial}
 Obsoletes:      mysql-community-embedded-devel < %{version}-%{release}
-Requires:       mysql-commercial-devel = %{version}-%{release}
-Requires:       mysql-commercial-embedded = %{version}-%{release}
+Requires:       mysql-commercial-devel >= %{min}
+Requires:       mysql-commercial-embedded >= %{min}
 %else
-Requires:       mysql-community-devel = %{version}-%{release}
-Requires:       mysql-community-embedded = %{version}-%{release}
+Requires:       mysql-community-devel >= %{min}
+Requires:       mysql-community-embedded >= %{min}
 %endif
 Obsoletes:      mariadb-embedded-devel
 Obsoletes:      mysql-embedded-devel < %{version}-%{release}
@@ -432,6 +434,7 @@ MBD=$RPM_BUILD_DIR/%{src_dir}
 install -d -m 0755 %{buildroot}/var/lib/mysql
 install -d -m 0755 %{buildroot}/var/run/mysql
 install -d -m 0750 %{buildroot}/var/log/mysql
+install -d -m 0750 %{buildroot}/var/lib/mysql-files
 
 # Install all binaries
 cd $MBD/release
@@ -507,6 +510,7 @@ rm -r $(readlink var) var
 datadir=$(/usr/bin/my_print_defaults server mysqld | grep '^--datadir=' | sed -n 's/--datadir=//p' | tail -n 1)
 /bin/chmod 0755 "$datadir"
 /bin/touch /var/log/mysql/mysqld.log
+/bin/chown mysql:mysql /var/log/mysql/mysqld.log >/dev/null 2>&1 || :
 %if 0%{?systemd}
 %service_add_post mysql.service
 /usr/bin/systemd-tmpfiles --create %{_tmpfilesdir}/mysql.conf >/dev/null 2>&1 || :
@@ -619,6 +623,7 @@ fi
 %dir %{_libdir}/mysql/plugin
 %attr(755, root, root) %{_libdir}/mysql/plugin/adt_null.so
 %attr(755, root, root) %{_libdir}/mysql/plugin/auth_socket.so
+%attr(755, root, root) %{_libdir}/mysql/plugin/connection_control.so
 %attr(755, root, root) %{_libdir}/mysql/plugin/innodb_engine.so
 %attr(755, root, root) %{_libdir}/mysql/plugin/libmemcached.so
 %attr(755, root, root) %{_libdir}/mysql/plugin/mypluglib.so
@@ -629,6 +634,7 @@ fi
 %dir %{_libdir}/mysql/plugin/debug
 %attr(755, root, root) %{_libdir}/mysql/plugin/debug/adt_null.so
 %attr(755, root, root) %{_libdir}/mysql/plugin/debug/auth_socket.so
+%attr(755, root, root) %{_libdir}/mysql/plugin/debug/connection_control.so
 %attr(755, root, root) %{_libdir}/mysql/plugin/debug/innodb_engine.so
 %attr(755, root, root) %{_libdir}/mysql/plugin/debug/libmemcached.so
 %attr(755, root, root) %{_libdir}/mysql/plugin/debug/mypluglib.so
@@ -669,6 +675,7 @@ fi
 %dir %attr(755, mysql, mysql) /var/lib/mysql
 %dir %attr(755, mysql, mysql) /var/run/mysql
 %dir %attr(750, mysql, mysql) /var/log/mysql
+%dir %attr(750, mysql, mysql) /var/lib/mysql-files
 
 %files common
 %defattr(-, root, root, -)
@@ -717,7 +724,6 @@ fi
 %attr(755, root, root) %{_bindir}/mysqlimport
 %attr(755, root, root) %{_bindir}/mysqlshow
 %attr(755, root, root) %{_bindir}/mysqlslap
-%attr(755, root, root) %{_bindir}/mysql_config
 %attr(755, root, root) %{_bindir}/mysql_config_editor
 
 %attr(644, root, root) %{_mandir}/man1/msql2mysql.1*
@@ -781,12 +787,14 @@ fi
 %attr(755, root, root) %{_libdir}/mysql/plugin/auth_test_plugin.so
 %attr(644, root, root) %{_libdir}/mysql/plugin/daemon_example.ini
 %attr(755, root, root) %{_libdir}/mysql/plugin/libdaemon_example.so
+%attr(755, root, root) %{_libdir}/mysql/plugin/test_udf_services.so
 %attr(755, root, root) %{_libdir}/mysql/plugin/qa_auth_client.so
 %attr(755, root, root) %{_libdir}/mysql/plugin/qa_auth_interface.so
 %attr(755, root, root) %{_libdir}/mysql/plugin/qa_auth_server.so
 %attr(755, root, root) %{_libdir}/mysql/plugin/debug/auth.so
 %attr(755, root, root) %{_libdir}/mysql/plugin/debug/auth_test_plugin.so
 %attr(755, root, root) %{_libdir}/mysql/plugin/debug/libdaemon_example.so
+%attr(755, root, root) %{_libdir}/mysql/plugin/debug/test_udf_services.so
 %attr(755, root, root) %{_libdir}/mysql/plugin/debug/qa_auth_client.so
 %attr(755, root, root) %{_libdir}/mysql/plugin/debug/qa_auth_interface.so
 %attr(755, root, root) %{_libdir}/mysql/plugin/debug/qa_auth_server.so
@@ -818,6 +826,15 @@ fi
 %attr(755, root, root) %{_libdir}/mysql/libmysqld.so
 
 %changelog
+* Mon Oct 31 2016 Balasubramanian Kandasamy <balasubramanian.kandasamy@oracle.com> - 5.6.35-1
+- Add connection_control.so to server subpackage
+
+* Mon Sep 26 2016 Balasubramanian Kandasamy <balasubramanian.kandasamy@oracle.com> - 5.6.34-1
+- Include mysql-files directory
+
+* Mon Mar 14 2016 Georgi Kodinov <georgi.kodinov@oracle.com> - 5.6.31-1
+- Add test_udf_services.so plugin
+
 * Tue Sep 29 2015 Balasubramanian Kandasamy <balasubramanian.kandasamy@oracle.com> - 5.6.28-1
 - Added conflicts to mysql-connector-c-shared dependencies
 
index 78ef3bffe601ce37299afde6deddaf3e8e048b25..871f191c0171aeb8d15e4524ccf9395de69fc4ac 100644 (file)
@@ -34,7 +34,7 @@ PermissionsStartOnly=true
 ExecStartPre=/usr/bin/mysql-systemd-start pre
 
 # Start main service
-ExecStart=/usr/bin/mysqld_safe
+ExecStart=/usr/bin/mysqld_safe --basedir=/usr
 
 # Don't signal startup success before a ping works
 ExecStartPost=/usr/bin/mysql-systemd-start post
index 83656aa638779a2529afd2f00b42f6dafc6ce630..0a923f876ca5c218bda2a98abda7760868ee5050 100644 (file)
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2008, 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
@@ -26,6 +26,7 @@ mygroup=mysql
 myuser=mysql
 mydatadir=/var/lib/mysql
 basedir=@@basedir@@
+mysecurefiledir=/var/lib/mysql-files
 
 if [ -n "$BASEDIR" ] ; then
   basedir="$BASEDIR"
@@ -58,6 +59,10 @@ fi
 
 chown -R $myuser:$mygroup $mydatadir
 
+# Create securefile directory
+[ -d "$mysecurefiledir"  ] || mkdir -p -m 770 "$mysecurefiledir"      || exit 1
+chown -R $myuser:$mygroup $mysecurefiledir
+
 # Solaris patch 119255 (somewhere around revision 42) changes the behaviour
 # of pkgadd to set TMPDIR internally to a root-owned install directory.  This
 # has the unfortunate side effect of breaking running mysql_install_db with
index 5ff93753ad1bc1cd0016e8efa48f5176829e90cc..4ac85f22b8c8fe0015cde40b2d9438aa319e331f 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2009, 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
@@ -18,9 +18,7 @@
 #include <mysql/plugin.h>
 #include <mysql/plugin_audit.h>
 
-#if !defined(__attribute__) && (defined(__cplusplus) || !defined(__GNUC__)  || __GNUC__ == 2 && __GNUC_MINOR__ < 8)
-#define __attribute__(A)
-#endif
+#include "my_attribute.h"
 
 static volatile int number_of_calls; /* for SHOW STATUS, see below */
 /* Count MYSQL_AUDIT_GENERAL_CLASS event instances */
@@ -48,7 +46,7 @@ static volatile int number_of_calls_connection_change_user;
     1                    failure (cannot happen)
 */
 
-static int audit_null_plugin_init(void *arg __attribute__((unused)))
+static int audit_null_plugin_init(void *arg MY_ATTRIBUTE((unused)))
 {
   number_of_calls= 0;
   number_of_calls_general_log= 0;
@@ -75,7 +73,7 @@ static int audit_null_plugin_init(void *arg __attribute__((unused)))
 
 */
 
-static int audit_null_plugin_deinit(void *arg __attribute__((unused)))
+static int audit_null_plugin_deinit(void *arg MY_ATTRIBUTE((unused)))
 {
   return(0);
 }
@@ -91,7 +89,7 @@ static int audit_null_plugin_deinit(void *arg __attribute__((unused)))
   DESCRIPTION
 */
 
-static void audit_null_notify(MYSQL_THD thd __attribute__((unused)),
+static void audit_null_notify(MYSQL_THD thd MY_ATTRIBUTE((unused)),
                               unsigned int event_class,
                               const void *event)
 {
index ea600743b92055bf14374fd38f040f7127908fb9..9f9c0ef2668ca9bfeea859e5f6795a817e8e771c 100644 (file)
@@ -1,4 +1,4 @@
-/*  Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
+/*  Copyright (c) 2010, 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
@@ -207,8 +207,8 @@ typedef char *(*mysql_authentication_dialog_ask_t)(struct st_mysql *mysql,
 
 static mysql_authentication_dialog_ask_t ask;
 
-static char *builtin_ask(MYSQL *mysql __attribute__((unused)),
-                         int type __attribute__((unused)),
+static char *builtin_ask(MYSQL *mysql MY_ATTRIBUTE((unused)),
+                         int type MY_ATTRIBUTE((unused)),
                          const char *prompt,
                          char *buf, int buf_len)
 {
@@ -309,10 +309,10 @@ static int perform_dialog(MYSQL_PLUGIN_VIO *vio, MYSQL *mysql)
   or fall back to the default implementation.
 */
 
-static int init_dialog(char *unused1   __attribute__((unused)), 
-                       size_t unused2  __attribute__((unused)), 
-                       int unused3     __attribute__((unused)), 
-                       va_list unused4 __attribute__((unused)))
+static int init_dialog(char *unused1   MY_ATTRIBUTE((unused)), 
+                       size_t unused2  MY_ATTRIBUTE((unused)), 
+                       int unused3     MY_ATTRIBUTE((unused)), 
+                       va_list unused4 MY_ATTRIBUTE((unused)))
 {
   void *sym= dlsym(RTLD_DEFAULT, "mysql_authentication_dialog_ask");
   ask= sym ? (mysql_authentication_dialog_ask_t) sym : builtin_ask;
index c7a5520549d801418780585c0c3e7fccbd6fce7e..024665ce5f268e500ceb1067778f57549bc216d3 100644 (file)
@@ -1,4 +1,4 @@
-/*  Copyright (c) 2014, 2015 Oracle and/or its affiliates. All rights reserved.
+/*  Copyright (c) 2014, 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
@@ -32,8 +32,8 @@
 #include <stdlib.h>
 
 static int mysql_no_login(
-    MYSQL_PLUGIN_VIO *vio __attribute__((unused)),
-    MYSQL_SERVER_AUTH_INFO *info __attribute__((unused)))
+    MYSQL_PLUGIN_VIO *vio MY_ATTRIBUTE((unused)),
+    MYSQL_SERVER_AUTH_INFO *info MY_ATTRIBUTE((unused)))
 {
   return CR_ERROR;
 }
diff --git a/mysql-wsrep-5.6/plugin/connection_control/CMakeLists.txt b/mysql-wsrep-5.6/plugin/connection_control/CMakeLists.txt
new file mode 100644 (file)
index 0000000..700a805
--- /dev/null
@@ -0,0 +1,22 @@
+# 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
+# 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_ADD_PLUGIN(connection_control
+                connection_control_coordinator.cc
+                connection_control.cc
+                security_context_wrapper.cc
+                connection_delay.cc
+                 MODULE_ONLY)
+
diff --git a/mysql-wsrep-5.6/plugin/connection_control/connection_control.cc b/mysql-wsrep-5.6/plugin/connection_control/connection_control.cc
new file mode 100644 (file)
index 0000000..c19845b
--- /dev/null
@@ -0,0 +1,480 @@
+/* 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
+   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 <mysql/plugin_audit.h>         /* mysql_event_connection */
+#include "mysql_version.h"
+#include <my_global.h>
+#include <my_pthread.h>
+#include <my_atomic.h>
+
+#include "connection_control.h"
+#include "connection_delay_api.h"       /* connection_delay apis */
+#include "connection_control_coordinator.h" /* g_connection_event_coordinator */
+
+namespace connection_control
+{
+  class Connection_control_error_handler : public Error_handler
+  {
+  public:
+    Connection_control_error_handler(MYSQL_PLUGIN plugin_info)
+      : m_plugin_info(plugin_info)
+    {}
+
+    void handle_error(const char * error_message)
+    {
+      my_plugin_log_message(&m_plugin_info,
+                            MY_ERROR_LEVEL,
+                            error_message);
+    }
+  private:
+    MYSQL_PLUGIN m_plugin_info;
+  };
+}
+
+using connection_control::Connection_event_coordinator;
+using connection_control::Connection_event_coordinator_services;
+using connection_control::Connection_control_statistics;
+using connection_control::Connection_control_variables;
+using connection_control::Error_handler;
+using connection_control::Connection_control_error_handler;
+
+typedef unsigned int mysql_event_class_t;
+
+Connection_control_statistics g_statistics;
+Connection_control_variables g_variables;
+
+Connection_event_coordinator *g_connection_event_coordinator= 0;
+MYSQL_PLUGIN connection_control_plugin_info= 0;
+
+
+/**
+  event_notify() implementation for connection_control
+
+  For connection event, notify Connection_event_coordinator
+  which in turn will notify subscribers.
+
+  @param thd [in]            Handle to THD
+  @param event_class [in]    Event class.
+                             We are interested in MYSQL_AUDIT_CONNECTION_CLASS.
+  @param event [in]          mysql_event_connection handle
+*/
+
+static void
+connection_control_notify(MYSQL_THD thd,
+                          mysql_event_class_t event_class,
+                          const void *event)
+{
+  DBUG_ENTER("connection_control_notify");
+  try
+  {
+    if (event_class == MYSQL_AUDIT_CONNECTION_CLASS)
+    {
+      const struct mysql_event_connection *connection_event=
+        (const struct mysql_event_connection *) event;
+      Connection_control_error_handler error_handler(connection_control_plugin_info);
+      /** Notify event coordinator */
+      g_connection_event_coordinator->notify_event(thd, &error_handler,
+                                                   connection_event);
+    }
+  }
+  catch (...)
+  {
+    /* Happily ignore any bad behavior */
+  }
+
+  DBUG_VOID_RETURN;
+}
+
+
+/**
+  Plugin initialization function
+
+  @param plugin_info [in]  MYSQL_PLUGIN information
+
+  @returns initialization status
+    @retval 0 Success
+    @retval 1 Failure
+*/
+
+static int
+connection_control_init(MYSQL_PLUGIN plugin_info)
+{
+  connection_control_plugin_info= plugin_info;
+  Connection_control_error_handler error_handler(connection_control_plugin_info);
+  g_connection_event_coordinator= new Connection_event_coordinator();
+  if (!g_connection_event_coordinator)
+  {
+    error_handler.handle_error("Failed to initialize Connection_event_coordinator");
+    return 1;
+  }
+
+  if (init_connection_delay_event((Connection_event_coordinator_services *)
+                                  g_connection_event_coordinator,
+                                  &error_handler))
+  {
+    delete g_connection_event_coordinator;
+    return 1;
+  }
+  return 0;
+}
+
+
+/**
+  Plugin deinitialization
+
+  @param arg  Unused
+
+  @returns success
+*/
+
+static int
+connection_control_deinit(void *arg MY_ATTRIBUTE((unused)))
+{
+  delete g_connection_event_coordinator;
+  g_connection_event_coordinator= 0;
+  connection_control::deinit_connection_delay_event();
+  connection_control_plugin_info= 0;
+  return 0;
+}
+
+
+/** Connection_control plugin descriptor */
+static struct st_mysql_audit connection_control_descriptor=
+{
+  MYSQL_AUDIT_INTERFACE_VERSION,                    /* interface version */\r
+  NULL,                                             /* release_thd() */\r
+  connection_control_notify,                        /* event_notify() */\r
+  {(ulong)MYSQL_AUDIT_CONNECTION_CLASSMASK}         /* class mask */
+};
+
+
+/**
+  check() function for connection_control_failed_connections_threshold
+
+  Check whether new value is within valid bounds or not.
+
+  @param thd        Not used.
+  @param var        Not used.
+  @param save       Not used.
+  @param value      New value for the option.
+
+  @returns whether new value is within valid bounds or not.
+    @retval 0 Value is ok
+    @retval 1 Value is not within valid bounds
+*/
+
+static int
+check_failed_connections_threshold(MYSQL_THD thd MY_ATTRIBUTE((unused)),
+                                   struct st_mysql_sys_var *var MY_ATTRIBUTE((unused)),
+                                   void *save MY_ATTRIBUTE((unused)),
+                                   struct st_mysql_value *value)
+{
+  longlong new_value;
+  if (value->val_int(value, &new_value))
+    return 1;                           /* NULL value */
+
+  if (new_value >= connection_control::MIN_THRESHOLD &&
+      new_value <= connection_control::MAX_THRESHOLD)
+  {
+    *(reinterpret_cast<longlong *>(save))= new_value;
+    return 0;
+  }
+
+  return 1;
+}
+
+
+/**
+  update() function for connection_control_failed_connections_threshold
+
+  Updates g_connection_event_coordinator with new value.
+  Also notifies observers about the update.
+
+  @param thd        Not used.
+  @param var        Not used.
+  @param var_ptr    Variable information
+  @param save       New value for connection_control_failed_connections_threshold
+*/
+
+static void
+update_failed_connections_threshold(MYSQL_THD thd MY_ATTRIBUTE((unused)),
+                                    struct st_mysql_sys_var *var MY_ATTRIBUTE((unused)),
+                                    void *var_ptr, const void *save)
+{
+  /*
+    This won't result in overflow because we have already checked that this is
+    within valid bounds.
+  */
+  longlong new_value= *(reinterpret_cast<const longlong *>(save));
+  g_variables.failed_connections_threshold= (int64)new_value;
+  Connection_control_error_handler error_handler(connection_control_plugin_info);
+  g_connection_event_coordinator->notify_sys_var(&error_handler,
+                                                 OPT_FAILED_CONNECTIONS_THRESHOLD,
+                                                 &new_value);
+  return;
+}
+
+
+/** Declaration of connection_control_failed_connections_threshold */
+static MYSQL_SYSVAR_LONGLONG(
+  failed_connections_threshold,
+  g_variables.failed_connections_threshold,
+  PLUGIN_VAR_RQCMDARG,
+  "Failed connection threshold to trigger delay. Default is 3.",
+  check_failed_connections_threshold,
+  update_failed_connections_threshold,
+  connection_control::DEFAULT_THRESHOLD,
+  connection_control::MIN_THRESHOLD,
+  connection_control::MAX_THRESHOLD,
+  1
+);
+
+
+/**
+  check() function for connection_control_min_connection_delay
+
+  Check whether new value is within valid bounds or not.
+
+  @param thd        Not used.
+  @param var        Not used.
+  @param save       Not used.
+  @param value      New value for the option.
+
+  @returns whether new value is within valid bounds or not.
+    @retval 0 Value is ok
+    @retval 1 Value is not within valid bounds
+*/
+
+static int
+check_min_connection_delay(MYSQL_THD thd MY_ATTRIBUTE((unused)),
+                           struct st_mysql_sys_var *var MY_ATTRIBUTE((unused)),
+                           void *save MY_ATTRIBUTE((unused)),
+                           struct st_mysql_value *value)
+{
+  long long new_value;
+  int64 existing_value= g_variables.max_connection_delay;
+  if (value->val_int(value, &new_value))
+    return 1;                           /* NULL value */
+
+  if (new_value >= connection_control::MIN_DELAY &&
+      new_value <= connection_control::MAX_DELAY &&
+      new_value <= existing_value)
+  {
+    *(reinterpret_cast<longlong *>(save))= new_value;
+    return 0;
+  }
+  return 1;
+}
+
+
+/**
+  update() function for connection_control_min_connection_delay
+
+  Updates g_connection_event_coordinator with new value.
+  Also notifies observers about the update.
+
+  @param thd        Not used.
+  @param var        Not used.
+  @param var_ptr    Variable information
+  @param save       New value for connection_control_min_connection_delay
+*/
+
+static void
+update_min_connection_delay(MYSQL_THD thd MY_ATTRIBUTE((unused)),
+                            struct st_mysql_sys_var *var MY_ATTRIBUTE((unused)),
+                            void *var_ptr, const void *save)
+{
+  longlong new_value= *(reinterpret_cast<const longlong *>(save));
+  g_variables.min_connection_delay= (int64)new_value;
+  Connection_control_error_handler error_handler(connection_control_plugin_info);
+  g_connection_event_coordinator->notify_sys_var(&error_handler,
+                                                 OPT_MIN_CONNECTION_DELAY,
+                                                 &new_value);
+  return;
+}
+
+
+/** Declaration of connection_control_max_connection_delay */
+static MYSQL_SYSVAR_LONGLONG(
+  min_connection_delay,
+  g_variables.min_connection_delay,
+  PLUGIN_VAR_RQCMDARG,
+  "Maximum delay to be introduced. Default is 1000.",
+  check_min_connection_delay,
+  update_min_connection_delay,
+  connection_control::DEFAULT_MIN_DELAY,
+  connection_control::MIN_DELAY,
+  connection_control::MAX_DELAY,
+  1
+);
+
+
+/**
+  check() function for connection_control_max_connection_delay
+
+  Check whether new value is within valid bounds or not.
+
+  @param thd        Not used.
+  @param var        Not used.
+  @param save       Not used.
+  @param value      New value for the option.
+
+  @returns whether new value is within valid bounds or not.
+    @retval 0 Value is ok
+    @retval 1 Value is not within valid bounds
+*/
+
+static int
+check_max_connection_delay(MYSQL_THD thd MY_ATTRIBUTE((unused)),
+                           struct st_mysql_sys_var *var MY_ATTRIBUTE((unused)),
+                           void *save MY_ATTRIBUTE((unused)),
+                           struct st_mysql_value *value)
+{
+  long long new_value;
+  int64 existing_value= my_atomic_load64(&g_variables.min_connection_delay);
+  if (value->val_int(value, &new_value))
+    return 1;                           /* NULL value */
+
+  if (new_value >= connection_control::MIN_DELAY &&
+      new_value <= connection_control::MAX_DELAY &&
+      new_value >= existing_value)
+  {
+    *(reinterpret_cast<longlong *>(save))= new_value;
+    return 0;
+  }
+  return 1;
+}
+
+
+/**
+  update() function for connection_control_max_connection_delay
+
+  Updates g_connection_event_coordinator with new value.
+  Also notifies observers about the update.
+
+  @param thd        Not used.
+  @param var        Not used.
+  @param var_ptr    Variable information
+  @param save       New value for connection_control_max_connection_delay
+*/
+
+static void
+update_max_connection_delay(MYSQL_THD thd MY_ATTRIBUTE((unused)),
+                            struct st_mysql_sys_var *var MY_ATTRIBUTE((unused)),
+                            void *var_ptr, const void *save)
+{
+  longlong new_value= *(reinterpret_cast<const longlong *>(save));
+  my_atomic_store64(&g_variables.max_connection_delay, (int64)new_value);
+  Connection_control_error_handler error_handler(connection_control_plugin_info);
+  g_connection_event_coordinator->notify_sys_var(&error_handler,
+                                                 OPT_MAX_CONNECTION_DELAY,
+                                                 &new_value);
+  return;
+}
+
+
+/** Declaration of connection_control_max_connection_delay */
+static MYSQL_SYSVAR_LONGLONG(
+  max_connection_delay,
+  g_variables.max_connection_delay,
+  PLUGIN_VAR_RQCMDARG,
+  "Maximum delay to be introduced. Default is 2147483647.",
+  check_max_connection_delay,
+  update_max_connection_delay,
+  connection_control::DEFAULT_MAX_DELAY,
+  connection_control::MIN_DELAY,
+  connection_control::MAX_DELAY,
+  1
+);
+
+
+/** Array of system variables. Used in plugin declaration. */
+struct st_mysql_sys_var *
+connection_control_system_variables[OPT_LAST + 1]=
+{
+  MYSQL_SYSVAR(failed_connections_threshold),
+  MYSQL_SYSVAR(min_connection_delay),
+  MYSQL_SYSVAR(max_connection_delay),
+  NULL
+};
+
+
+/**
+  Function to display value for status variable : Connection_control_delay_generated
+
+  @param thd  MYSQL_THD handle. Unused.
+  @param var  Status variable structure
+  @param buff Value buffer.
+
+  @returns Always returns success.
+*/
+
+static int show_delay_generated(MYSQL_THD,
+                                struct st_mysql_show_var *var,
+                                char *buff)
+{
+  var->type= SHOW_LONGLONG;
+  var->value= buff;
+  longlong *value= reinterpret_cast<longlong *>(buff);
+  int64 current_val= my_atomic_load64(&g_statistics.stats_array[STAT_CONNECTION_DELAY_TRIGGERED]);
+  *value= static_cast<longlong>(current_val);
+  return 0;
+}
+
+
+/** Array of status variables. Used in plugin declaration. */
+struct st_mysql_show_var
+connection_control_status_variables[STAT_LAST + 1]={
+  {
+    "Connection_control_delay_generated",
+    (char *)&show_delay_generated,
+    SHOW_FUNC
+  },
+  {0, 0, enum_mysql_show_type(0)}
+};
+
+
+mysql_declare_plugin(audit_log)
+{
+  MYSQL_AUDIT_PLUGIN,                   /* plugin type                   */
+  &connection_control_descriptor,       /* type specific descriptor      */
+  "CONNECTION_CONTROL",                 /* plugin name                   */
+  "Oracle Inc",                         /* author                        */
+  "Connection event processing",        /* description                   */
+  PLUGIN_LICENSE_GPL        ,           /* license                       */
+  connection_control_init,              /* plugin initializer            */
+  connection_control_deinit,            /* plugin deinitializer          */
+  0x0100,                               /* version                       */
+  connection_control_status_variables,  /* status variables              */
+  connection_control_system_variables,  /* system variables              */
+  NULL,                                 /* reserverd                     */
+  0                                     /* flags                         */
+},
+{
+  MYSQL_INFORMATION_SCHEMA_PLUGIN,
+   &connection_control_failed_attempts_view,
+   "CONNECTION_CONTROL_FAILED_LOGIN_ATTEMPTS",
+   "Oracle Inc",
+   "I_S table providing a view into failed attempts statistics",
+   PLUGIN_LICENSE_GPL,
+   connection_control_failed_attempts_view_init,
+   NULL,
+   0x0100,
+   NULL,
+   NULL,
+   NULL,
+   0
+}
+mysql_declare_plugin_end;
diff --git a/mysql-wsrep-5.6/plugin/connection_control/connection_control.h b/mysql-wsrep-5.6/plugin/connection_control/connection_control.h
new file mode 100644 (file)
index 0000000..638143f
--- /dev/null
@@ -0,0 +1,87 @@
+/* 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
+   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 */
+
+#ifndef CONNECTION_CONTROL_H
+#define CONNECTION_CONTROL_H
+
+#include <mysql/psi/mysql_thread.h>     /* mysql_rwlock_t */
+
+#include "connection_control_data.h"
+
+namespace connection_control
+{
+
+  /** Helper class : Wrapper on READ lock */
+
+  class RD_lock
+  {
+  public:
+    explicit RD_lock(mysql_rwlock_t *lock) : m_lock(lock)
+    {
+      if (m_lock)
+        mysql_rwlock_rdlock(m_lock);
+    }
+    ~RD_lock()
+    {
+      if (m_lock)
+        mysql_rwlock_unlock(m_lock);
+    }
+    void lock()
+    {
+      mysql_rwlock_rdlock(m_lock);
+    }
+    void unlock()
+    {
+      mysql_rwlock_unlock(m_lock);
+    }
+  private:
+    mysql_rwlock_t *m_lock;
+
+    RD_lock(const RD_lock&);             /* Not copyable. */
+    void operator=(const RD_lock&);      /* Not assignable. */
+  };
+
+
+  /** Helper class : Wrapper on write lock */
+
+  class WR_lock
+  {
+  public:
+    explicit WR_lock(mysql_rwlock_t *lock) : m_lock(lock)
+    {
+      if (m_lock)
+        mysql_rwlock_wrlock(m_lock);
+    }
+    ~WR_lock()
+    {
+      if (m_lock)
+        mysql_rwlock_unlock(m_lock);
+    }
+    void lock()
+    {
+      mysql_rwlock_wrlock(m_lock);
+    }
+    void unlock()
+    {
+      mysql_rwlock_unlock(m_lock);
+    }
+  private:
+    mysql_rwlock_t *m_lock;
+
+    WR_lock(const WR_lock&);             /* Not copyable. */
+    void operator=(const WR_lock&);      /* Not assignable. */
+  };
+}
+#endif /* !CONNECTION_CONTROL_H */
diff --git a/mysql-wsrep-5.6/plugin/connection_control/connection_control_coordinator.cc b/mysql-wsrep-5.6/plugin/connection_control/connection_control_coordinator.cc
new file mode 100644 (file)
index 0000000..ab2ea83
--- /dev/null
@@ -0,0 +1,280 @@
+/* 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
+   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 <my_global.h>
+#include <my_pthread.h>
+#include <my_atomic.h>
+
+#include "connection_control_coordinator.h"
+#include "connection_control.h"
+
+namespace connection_control
+{
+  /**
+    Reset Connection_event_coordinator information
+  */
+
+  void
+    Connection_event_coordinator::reset()
+  {
+    m_subscribers.clear();
+    for (uint i= (uint)STAT_CONNECTION_DELAY_TRIGGERED;
+         i < (uint)STAT_LAST; ++i)
+      m_status_vars_subscription[i]= 0;
+  }
+
+
+  /**
+    Register an event subscriber.
+
+    A subscriber can provide following preferences:
+      1. Set of events for which subscriber is interested
+      2. Set of variables for which subscriber would like to receive update
+      3. Set of stats for which subscriber would like to send update
+
+    @param subscriber [in]    Handle to Connection_event_observers
+    @param events [in]        Event mask supplied by subscriber
+    @param sys_vars [in]      opt_connection_control vector
+    @param status_vars [in]   stats_connection_control vector
+
+    @returns subscription status
+      @retval false Subscription successful
+      @retval true Failure in subscription for given combination of prefernece.
+                   Most probably, other subscriber has already subscribed for
+                   status var update.
+  */
+
+  bool
+  Connection_event_coordinator::register_event_subscriber(
+    Connection_event_observer **subscriber,
+    std::vector<opt_connection_control> *sys_vars,
+    std::vector<stats_connection_control> *status_vars)
+  {
+    DBUG_ENTER("Connection_event_coordinator::register_event_subscriber");
+    bool error= false;
+    std::vector<opt_connection_control>::iterator sys_vars_it;
+    std::vector<stats_connection_control>::iterator status_vars_it;
+
+    DBUG_ASSERT(subscriber != 0);
+
+    if (status_vars)
+    {
+      for (status_vars_it= status_vars->begin();
+           status_vars_it != status_vars->end();
+           ++status_vars_it)
+      {
+        if (*status_vars_it >= STAT_LAST ||
+            m_status_vars_subscription[*status_vars_it] != 0)
+        {
+          /*
+            Either an invalid status variable is specified or
+            someone has already subscribed for status variable
+          */
+          error= true;
+          break;
+        }
+      }
+    }
+
+    if (!error && sys_vars)
+    {
+      for (sys_vars_it= sys_vars->begin();
+           sys_vars_it != sys_vars->end();
+           ++sys_vars_it)
+      {
+        if (*sys_vars_it >= OPT_LAST)
+          error= true;
+        break;
+      }
+    }
+
+    if (!error)
+    {
+      /*
+        Create Connection_event_subscriber object and
+        initialize it with required details.
+      */
+      Connection_event_subscriber subscriber_info;
+      subscriber_info.m_subscriber= *subscriber;
+
+      /* Reset the list first */
+      for (uint i= (uint)OPT_FAILED_CONNECTIONS_THRESHOLD;
+           i < (uint)OPT_LAST;
+           ++i)
+        subscriber_info.m_sys_vars[i]= false;
+
+      /* Now set the bits which are requested by subscriber */
+      for (sys_vars_it= sys_vars->begin();
+           sys_vars_it != sys_vars->end();
+           ++sys_vars_it)
+        subscriber_info.m_sys_vars[*sys_vars_it]= true;
+
+      /* Insert new entry in m_subscribers */
+      try
+      {
+        m_subscribers.push_back(subscriber_info);
+      }
+      catch (...)
+      {
+        /* Something went wrong. Mostly likely OOM. */
+        error= true;
+      }
+
+      /*
+        Update m_status_vars_subscription only if subscriber information
+        has been inserted in m_subscribers successfully.
+      */
+      if (!error)
+      {
+        for (status_vars_it= status_vars->begin();
+             status_vars_it != status_vars->end();
+             ++status_vars_it)
+          m_status_vars_subscription[*status_vars_it]= *subscriber;
+      }
+    }
+    DBUG_RETURN(error);
+  }
+
+
+  /**
+      Handle connection event.
+      When a notification from server is received, perform following:
+      1. Iterate through list of subscribers
+      - If a subscriber has shown interest in received event,
+        call notify() for the subscriber
+      2. Interate through list of status variables
+      - If subscriber has show interest in any status variable,
+        call notify_status_var() for the subscriber
+      - If subscriber suggests an action on status variable,
+        perform the action
+
+      Note : If we receive error from a subscriber, we log it and move on.
+
+      @param thd [in]               THD handle
+      @param error_handler [in]     Error handler class
+      @param connection_event [in]  Event information
+  */
+
+  void
+  Connection_event_coordinator::notify_event(
+    MYSQL_THD thd,
+    Error_handler *error_handler,
+    const mysql_event_connection *connection_event)
+  {
+    DBUG_ENTER("Connection_event_coordinator::notify_event");
+    std::vector<Connection_event_subscriber>::iterator it= m_subscribers.begin();
+
+    while (it != m_subscribers.end())
+    {
+      Connection_event_subscriber event_subscriber= *it;
+      (void)event_subscriber.m_subscriber->notify_event(thd, this,
+                                                        connection_event,
+                                                        error_handler);
+
+      ++it;
+    }
+
+    DBUG_VOID_RETURN;
+  }
+
+
+  /**
+    Process change in sys_var value
+
+    Iterate through all subscribers
+    - If a subscriber has shown interest in getting notification for given
+      system variable, call notify_sys_var.
+
+    Note : If we receive error from a subscriber, we log it and move on.
+
+    @param error_hanlder [in]     Error handler class
+    @param opt_connection_control Variable information
+    @param new_value [in]         New value for variable
+  */
+
+  void
+  Connection_event_coordinator::notify_sys_var(Error_handler *error_handler,
+                                               opt_connection_control variable,
+                                               void *new_value)
+  {
+    DBUG_ENTER("Connection_event_coordinator::notify_sys_var");
+    std::vector<Connection_event_subscriber>::iterator it= m_subscribers.begin();
+
+    while (it != m_subscribers.end())
+    {
+      Connection_event_subscriber event_subscriber= *it;
+      if (event_subscriber.m_sys_vars[variable])
+      {
+        (void) event_subscriber.m_subscriber->notify_sys_var(this,
+                                                             variable,
+                                                             new_value,
+                                                             error_handler);
+      }
+      ++it;
+    }
+
+    DBUG_VOID_RETURN;
+  }
+
+
+  /**
+    Update a status variable
+
+    @param observer [in]   Requestor
+    @param status_var [in] Status variable to be updated
+    @param action [in]     Operation to be performed on status variable
+
+    @returns status of the operation
+      @retval false Success
+      @retval true Error in processing
+  */
+
+  bool
+  Connection_event_coordinator::notify_status_var(Connection_event_observer **observer,
+                                                  stats_connection_control status_var,
+                                                  status_var_action action)
+  {
+    DBUG_ENTER("Connection_event_coordinator::notify_status_var");
+    bool error= false;
+
+    if (m_status_vars_subscription[status_var] == *observer)
+    {
+      if (status_var < STAT_LAST)
+      {
+        switch (action)
+        {
+          case ACTION_INC:
+          {
+            my_atomic_add64(&g_statistics.stats_array[status_var], 1);
+            break;
+          }
+          case ACTION_RESET:
+          {
+            my_atomic_store64(&g_statistics.stats_array[status_var], 0);
+            break;
+          }
+          default:
+          {
+            error= true;
+            DBUG_ASSERT(FALSE);
+            break;
+          }
+        }
+      }
+    }
+
+    DBUG_RETURN(error);
+  }
+}
diff --git a/mysql-wsrep-5.6/plugin/connection_control/connection_control_coordinator.h b/mysql-wsrep-5.6/plugin/connection_control/connection_control_coordinator.h
new file mode 100644 (file)
index 0000000..4509c5a
--- /dev/null
@@ -0,0 +1,73 @@
+/* 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
+   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 */
+
+#ifndef CONNECTION_CONTROL_COORDINATOR_H
+#define CONNECTION_CONTROL_COORDINATOR_H
+
+#include "connection_control_interfaces.h" /* Connection_event_coordinator_services */
+#include "connection_control_memory.h"  /* Connection_control_alloc */
+
+namespace connection_control
+{
+  /**
+    Connection event coordinator.
+    This class will keep list of subscribers for different  subevents
+    and notify them based on their preference.
+  */
+
+  class Connection_event_coordinator : public Connection_event_coordinator_services,
+                                       public Connection_control_alloc
+  {
+  public:
+    Connection_event_coordinator()
+    {
+      reset();
+    }
+    ~Connection_event_coordinator()
+    {
+      reset();
+    }
+
+    /* Functions to receive notification from server */
+    void notify_event(MYSQL_THD thd,
+                      Error_handler * error_handler,
+                      const mysql_event_connection *connection_event);
+    void notify_sys_var(Error_handler * error_handler,
+                        opt_connection_control variable,
+                        void *new_value);
+
+    /* Services provided to observers */
+    bool register_event_subscriber(Connection_event_observer **subscriber,
+                                   std::vector<opt_connection_control> *sys_vars,
+                                   std::vector<stats_connection_control> *status_vars);
+
+    bool notify_status_var(Connection_event_observer **observer,
+                           stats_connection_control status_var,
+                           status_var_action action);
+
+  private:
+    void reset();
+    class Connection_event_subscriber
+    {
+    public:
+      Connection_event_observer * m_subscriber;
+      bool m_sys_vars[OPT_LAST];
+    };
+
+    std::vector<Connection_event_subscriber> m_subscribers;
+    Connection_event_observer *m_status_vars_subscription[STAT_LAST];
+  };
+}
+#endif // !CONNECTION_CONTROL_COORDINATOR_H
diff --git a/mysql-wsrep-5.6/plugin/connection_control/connection_control_data.h b/mysql-wsrep-5.6/plugin/connection_control/connection_control_data.h
new file mode 100644 (file)
index 0000000..1372447
--- /dev/null
@@ -0,0 +1,68 @@
+/* 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
+   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 */
+
+#ifndef CONNECTION_CONTROL_DATA_H
+#define CONNECTION_CONTROL_DATA_H
+
+#include <my_global.h>
+
+/**
+  Enum for system variables : Must be in sync with
+  members of Connection_control_variables.
+*/
+typedef enum opt_connection_control
+{
+  OPT_FAILED_CONNECTIONS_THRESHOLD= 0,
+  OPT_MIN_CONNECTION_DELAY,
+  OPT_MAX_CONNECTION_DELAY,
+  OPT_LAST /* Must be last */
+}opt_connection_control;
+
+/**
+  Enum for status variables : Must be in sync with
+  memebers of Connection_control_statistics.
+*/
+typedef enum stats_connection_control
+{
+  STAT_CONNECTION_DELAY_TRIGGERED= 0,
+  STAT_LAST /* Must be last */
+}stats_connection_control;
+
+namespace connection_control
+{
+  /** Structure to maintain system variables */
+  class Connection_control_variables
+  {
+  public:
+    /* Various global variables */
+    int64 failed_connections_threshold;
+    int64 min_connection_delay;
+    int64 max_connection_delay;
+  };
+
+  /** Structure to maintain statistics */
+  class Connection_control_statistics
+  {
+  public:
+    Connection_control_statistics()
+    {}
+    /* Various statistics to be collected */
+    volatile int64 stats_array[STAT_LAST];
+  };
+}
+
+extern connection_control::Connection_control_statistics g_statistics;
+extern connection_control::Connection_control_variables g_variables;
+#endif // !CONNECTION_CONTROL_DATA_H
diff --git a/mysql-wsrep-5.6/plugin/connection_control/connection_control_interfaces.h b/mysql-wsrep-5.6/plugin/connection_control/connection_control_interfaces.h
new file mode 100644 (file)
index 0000000..1faff23
--- /dev/null
@@ -0,0 +1,103 @@
+/* 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
+   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 */
+
+#ifndef CONNECTION_CONTROL_INTERFACES_H
+#define CONNECTION_CONTROL_INTERFACES_H
+
+#include <mysql/plugin_audit.h>         /* mysql_event_connection */
+
+#include "connection_control_data.h"    /* Variables and Status */
+
+#include <vector>                       /* std::vector */
+#include <string>                       /* std::string */
+
+namespace connection_control
+{
+  /* Typedefs for convenience */
+  typedef std::string Sql_string;
+
+  /* Forward declarations */
+  class Connection_event_coordinator_services;
+
+  class Error_handler
+  {
+  public:
+    virtual void handle_error(const char * error_message)= 0;
+    virtual ~Error_handler() {}
+  };
+
+  /**
+    Interface for recording connection events
+  */
+
+  class Connection_event_records
+  {
+  public:
+    virtual bool create_or_update_entry(const Sql_string &s)= 0;
+    virtual bool remove_entry(const Sql_string &s)= 0;
+    virtual bool match_entry(const Sql_string &s, void *value)= 0;
+    virtual void reset_all()= 0;
+    virtual ~Connection_event_records()
+    { /* Emptiness! */ }
+  };
+
+
+  /**
+    Interface for defining action on connection events
+  */
+  class Connection_event_observer
+  {
+  public:
+    virtual bool notify_event(MYSQL_THD thd,
+                              Connection_event_coordinator_services *coordinator,
+                              const mysql_event_connection *connection_event,
+                              Error_handler *error_handler)= 0;
+    virtual bool notify_sys_var(Connection_event_coordinator_services *coordinator,
+                                opt_connection_control variable,
+                                void *new_value,
+                                Error_handler *error_handler)= 0;
+    virtual ~Connection_event_observer()
+    { /* Nothing to see here! */ }
+  };
+
+
+  /* Status variable action enum */
+  typedef enum status_var_action
+  {
+    ACTION_NONE=0,
+    ACTION_INC,
+    ACTION_RESET,
+    ACTION_LAST /* Must be at the end */
+  }status_var_action;
+
+
+  /**
+    Interface to provide service to observers
+  */
+
+  class Connection_event_coordinator_services
+  {
+  public:
+    virtual bool notify_status_var(Connection_event_observer **observer,
+                                   stats_connection_control status_var,
+                                   status_var_action action)= 0;
+    virtual bool register_event_subscriber(Connection_event_observer **subscriber,
+                                           std::vector<opt_connection_control> *sys_vars,
+                                           std::vector<stats_connection_control> *status_vars)= 0;
+    virtual ~Connection_event_coordinator_services()
+    { /* go away */ }
+  };
+}
+#endif // !CONNECTION_CONTROL_INTERFACES_H
diff --git a/mysql-wsrep-5.6/plugin/connection_control/connection_control_memory.h b/mysql-wsrep-5.6/plugin/connection_control/connection_control_memory.h
new file mode 100644 (file)
index 0000000..710cc1a
--- /dev/null
@@ -0,0 +1,55 @@
+/* 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
+   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 */
+
+#ifndef CONNECTION_CONTROL_MEMORY_H
+#define CONNECTION_CONTROL_MEMORY_H
+
+#include <my_global.h>
+#include <my_sys.h>
+#include <limits>
+#include <memory>
+
+namespace connection_control
+{
+  template <class T>
+  T Connection_control_malloc(size_t size)
+  {
+    void *allocated_memory= my_malloc(size, MYF(MY_WME));
+    return allocated_memory ? reinterpret_cast<T>(allocated_memory) : NULL;
+  }
+
+  class Connection_control_alloc
+  {
+    public:
+      static void *operator new(size_t size) throw ()
+      {
+        return Connection_control_malloc<void*>(size);
+      }
+      static void *operator new[](size_t size) throw ()
+      {
+        return Connection_control_malloc<void*>(size);
+      }
+      static void operator delete(void* ptr, std::size_t sz)
+      {
+          my_free(ptr);
+      }
+      static void operator delete[](void* ptr, std::size_t sz)
+      {
+          my_free(ptr);
+      }
+  };
+}
+
+#endif //CONNECTION_CONTROL_MEMORY_H
diff --git a/mysql-wsrep-5.6/plugin/connection_control/connection_delay.cc b/mysql-wsrep-5.6/plugin/connection_control/connection_delay.cc
new file mode 100644 (file)
index 0000000..e7172ba
--- /dev/null
@@ -0,0 +1,998 @@
+/* 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
+   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 */
+
+#define MYSQL_SERVER  "We need security context"
+#include <m_ctype.h>                    /* my_charset_bin */
+#include <sql_class.h>                  /* THD, Security context */
+#include <item_cmpfunc.h>
+#include <mysql/psi/mysql_thread.h>
+
+#include "connection_delay.h"
+#include "connection_control.h"
+#include "security_context_wrapper.h"
+
+
+
+/* Forward declaration */
+bool schema_table_store_record(THD *thd, TABLE *table);
+
+struct st_mysql_information_schema
+  connection_control_failed_attempts_view={MYSQL_INFORMATION_SCHEMA_INTERFACE_VERSION};
+
+/** Fields of information_schema.connection_control_failed_attempts */
+static ST_FIELD_INFO failed_attempts_view_fields[]=
+{
+  {"USERHOST", USERNAME_LENGTH + MAX_HOSTNAME + 5, MYSQL_TYPE_STRING, 0, MY_I_S_UNSIGNED, 0, 0},
+  {"FAILED_ATTEMPTS", 16, MYSQL_TYPE_LONG, 0, MY_I_S_UNSIGNED, 0, 0},
+  {0, 0, MYSQL_TYPE_NULL, 0, 0, 0, 0}
+};
+
+
+namespace connection_control
+{
+
+  /** constants/variables declared in connection_delay_interfaces.h */
+
+  int64 DEFAULT_THRESHOLD= 3;
+  int64 MIN_THRESHOLD= 0;
+  int64 DISABLE_THRESHOLD= 0;
+  int64 MAX_THRESHOLD= INT_MAX32;
+
+  int64 DEFAULT_MAX_DELAY= INT_MAX32;
+  int64 DEFAULT_MIN_DELAY= 1000;
+  int64 MIN_DELAY= 1000;
+  int64 MAX_DELAY= INT_MAX32;
+
+  /** variables used by connection_delay.cc */
+  static mysql_rwlock_t connection_event_delay_lock;
+  static PSI_rwlock_key key_connection_event_delay_lock;
+  static PSI_rwlock_info all_rwlocks[]=
+  {
+    {&key_connection_event_delay_lock, "connection_event_delay_lock", 0}
+  };
+
+  static opt_connection_control opt_enums[]=
+  {
+    OPT_FAILED_CONNECTIONS_THRESHOLD,
+    OPT_MIN_CONNECTION_DELAY,
+    OPT_MAX_CONNECTION_DELAY
+  };
+  size_t opt_enums_size= 3;
+
+  static stats_connection_control status_vars_enums[]=
+  {
+    STAT_CONNECTION_DELAY_TRIGGERED
+  };
+  size_t status_vars_enums_size= 1;
+
+  static Connection_delay_action *g_max_failed_connection_handler= 0;
+
+  Sql_string I_S_CONNECTION_CONTROL_FAILED_ATTEMPTS_USERHOST
+    ("information_schema.connection_control_failed_login_attempts.userhost");
+
+  /**
+    Helper function for Connection_delay_event::reset_all
+
+    @param ptr [in]        Pointer to an entry in hash
+
+    @returns 1 to indicate that entry is a match
+  */
+  int match_all_entries(const uchar *ptr)
+  {
+    return 1;
+  }
+
+
+  /**
+    Callback function for LF hash to get key information
+
+    Returns a pointer to a buffer which represent a key in the hash.
+    The function does NOT calculate a hash.
+    The function is called during lf_hash_insert(). The buffer is
+    fed to an internal calc_hash() which use the defined charset to
+    calculate a hash from the key buffer (in most cases a murmur)
+
+    @param el [in]        Pointer to an element in the hash
+    @param length [out]   The length of the key belonging to the element
+
+    @returns Pointer to key buffer
+  */
+
+  uchar *connection_delay_event_hash_key(const uchar *el, size_t *length, my_bool huh)
+  {
+    const Connection_event_record * const *entry;
+    const Connection_event_record *entry_info;
+    entry= reinterpret_cast<const Connection_event_record* const *>(el);
+    DBUG_ASSERT(entry != NULL);
+    entry_info= *entry;
+    *length= entry_info->get_length();
+    return (const_cast<uchar *>(entry_info->get_userhost()));
+  }
+
+
+  /**
+    Constructor for Connection_delay_event
+
+    Initialize LF hash.
+  */
+
+  Connection_delay_event::Connection_delay_event()
+  {
+    lf_hash_init(&m_entries, sizeof(Connection_event_record**), LF_HASH_UNIQUE,
+                 0, /* key offset */
+                 0, /* key length not used */
+                 connection_delay_event_hash_key,
+                 &my_charset_bin);
+  }
+
+
+  /**
+    Creates or updates an entry in hash
+
+    @param s [in]    User information in '<user'@'<host>' format
+
+    @returns status of insertion/update
+      @retval false  Insertion/Update successful
+      @retval true   Failed to insert/update an entry
+  */
+
+  bool
+  Connection_delay_event::create_or_update_entry(const Sql_string &s)
+  {
+    Connection_event_record **searched_entry= NULL;
+    Connection_event_record *searched_entry_info= NULL;
+    Connection_event_record *new_entry= NULL;
+    int insert_status;
+    DBUG_ENTER("Connection_delay_event::create_or_update_entry");
+
+    LF_PINS *pins= lf_hash_get_pins(&m_entries);
+    if (unlikely(pins == NULL))
+      DBUG_RETURN(true);
+
+    searched_entry= reinterpret_cast<Connection_event_record **>
+      (lf_hash_search(&m_entries, pins, s.c_str(), s.length()));
+
+    if (searched_entry && (searched_entry != MY_ERRPTR))
+    {
+      /* We found an entry, so increment the count */
+      searched_entry_info= *searched_entry;
+      DBUG_ASSERT(searched_entry_info != NULL);
+      searched_entry_info->inc_count();
+      lf_hash_search_unpin(pins);
+      lf_hash_put_pins(pins);
+      DBUG_RETURN(false);
+    }
+    else
+    {
+      /* No entry found, so try to add new entry */
+      lf_hash_search_unpin(pins);
+      new_entry= new Connection_event_record(s);
+
+      insert_status= lf_hash_insert(&m_entries, pins, &new_entry);
+
+      if (likely(insert_status == 0))
+      {
+        lf_hash_put_pins(pins);
+        DBUG_RETURN(false);
+      }
+      else
+      {
+        /*
+          OOM. We are likely in bigger trouble than just
+          failing to insert an entry in hash.
+        */
+        lf_hash_put_pins(pins);
+        delete new_entry;
+        new_entry= NULL;
+        DBUG_RETURN(true);
+      }
+    }
+  }
+
+
+  /**
+    Resets count stored against given user entry
+
+    @param s [in]    User information in '<user'@'<host>' format
+
+    @returns status of reset operation
+      @retval false Reset successful
+      @retval true Failed to find given entry
+  */
+
+  bool
+  Connection_delay_event::remove_entry(const Sql_string &s)
+  {
+    Connection_event_record **searched_entry= NULL;
+    Connection_event_record *searched_entry_info= NULL;
+    DBUG_ENTER("Connection_delay_event::reset_entry");
+
+    LF_PINS *pins= lf_hash_get_pins(&m_entries);
+
+    searched_entry= reinterpret_cast<Connection_event_record **>
+      (lf_hash_search(&m_entries, pins, s.c_str(), s.length()));
+
+    if (searched_entry && searched_entry != MY_ERRPTR)
+    {
+      searched_entry_info= *searched_entry;
+      DBUG_ASSERT(searched_entry_info != NULL);
+      int rc= lf_hash_delete(&m_entries, pins, s.c_str(), s.length());
+      lf_hash_search_unpin(pins);
+      lf_hash_put_pins(pins);
+      if (rc == 0)
+      {
+        /* free memory upon successful deletion */
+        delete searched_entry_info;
+      }
+      DBUG_RETURN(rc != 0);
+    }
+    else
+    {
+      /* No entry found. */
+      lf_hash_search_unpin(pins);
+      lf_hash_put_pins(pins);
+      DBUG_RETURN(true);
+    }
+  }
+
+
+  /**
+    Retrieve stored value for given user entry
+
+    @param s [in]        User information in '<user'@'<host>' format
+    @param value [out]   Buffer to hold value stored against given user
+
+    @returns whether given entry is present in hash or not
+      @retval false  Entry found. Corresponding value is copied in value buffer.
+      @retval true   No matching entry found. value buffer should not be used.
+  */
+
+  bool
+  Connection_delay_event::match_entry(const Sql_string &s, void *value)
+  {
+    Connection_event_record **searched_entry= NULL;
+    Connection_event_record *searched_entry_info= NULL;
+    int64 count= DISABLE_THRESHOLD;
+    bool error= true;
+    DBUG_ENTER("Connection_delay_event::match_entry");
+
+    LF_PINS *pins= lf_hash_get_pins(&m_entries);
+
+    searched_entry= reinterpret_cast<Connection_event_record **>
+      (lf_hash_search(&m_entries, pins, s.c_str(), s.length()));
+
+    if (searched_entry && searched_entry != MY_ERRPTR)
+    {
+      searched_entry_info= *searched_entry;
+      count= searched_entry_info->get_count();
+      error= false;
+    }
+
+    lf_hash_search_unpin(pins);
+    lf_hash_put_pins(pins);
+    *(reinterpret_cast<int64 *>(value))= count;
+
+    DBUG_RETURN(error);
+  }
+
+
+  /**
+    Delete all entries from hash and free memory
+
+    @returns Reset was successful or not
+      @retval true All entries removed.
+      @retval false Failed to remove some entries
+  */
+
+  void
+  Connection_delay_event::reset_all()
+  {
+    Connection_event_record **searched_entry= NULL;
+    DBUG_ENTER("Connection_delay_event::reset_all");
+    LF_PINS *pins= lf_hash_get_pins(&m_entries);
+
+    do
+    {
+      /* match anything */
+      searched_entry= reinterpret_cast<Connection_event_record**>
+        (lf_hash_random_match(&m_entries, pins, match_all_entries, 0));
+
+      if (searched_entry != NULL && searched_entry != MY_ERRPTR
+          && (*searched_entry)
+          && !lf_hash_delete(&m_entries, pins,
+          (*searched_entry)->get_userhost(),
+                             (*searched_entry)->get_length()))
+      {
+        delete (*searched_entry);
+        *searched_entry= NULL;
+      }
+      else
+      {
+        /* Failed to delete didn't remove any pins */
+        lf_hash_search_unpin(pins);
+      }
+    } while (searched_entry != 0);
+
+    lf_hash_put_pins(pins);
+    DBUG_VOID_RETURN;
+  }
+
+
+  /** This works because connction_delay_IS_table is protected by wrlock */
+  static TABLE * connection_delay_IS_table;
+  void set_connection_delay_IS_table(TABLE *t)
+  {
+    connection_delay_IS_table= t;
+  }
+
+
+  /**
+    Function to populate information_schema view.
+
+    @param ptr [in]  Entry from LF hash
+
+    @returns status of row insertion
+      @retval 0 Success
+      @retval 1 Error
+  */
+
+  int connection_delay_IS_table_writer(const uchar *ptr)
+  {
+    /* Always return "no match" so that we go through all entries */
+    THD *thd= current_thd;
+    const Connection_event_record * const * entry;
+    const Connection_event_record *entry_info;
+    entry= reinterpret_cast<const Connection_event_record * const *>(ptr);
+    entry_info= *entry;
+    connection_delay_IS_table->field[0]->store((char *)entry_info->get_userhost(),
+                                               entry_info->get_length(),
+                                               system_charset_info);
+    connection_delay_IS_table->field[1]->store(entry_info->get_count(), true);
+    if (schema_table_store_record(thd, connection_delay_IS_table))
+      return 1;
+    /* Always return "no match" so that we go over all entries in the hash */
+    return 0;
+  }
+
+
+  /**
+    Function to dump LF hash data to IS table.
+
+    @param thd [in]    THD handle
+    @param tables [in] Handle to
+                       information_schema.connection_control_failed_attempts
+  */
+
+  void
+  Connection_delay_event::fill_IS_table(THD *thd,
+                                        TABLE_LIST *tables)
+  {
+    DBUG_ENTER("Connection_delay_event::fill_IS_table");
+    TABLE *table= tables->table;
+    set_connection_delay_IS_table(table);
+    LF_PINS *pins= lf_hash_get_pins(&m_entries);
+    void *key= 0;
+
+    do
+    {
+      key= lf_hash_random_match(&m_entries,
+                                pins,
+                                /* Functor: match anything and store the fields */
+                                connection_delay_IS_table_writer,
+                                0);
+      /* Always unpin after lf_hash_random_match() */
+      lf_hash_search_unpin(pins);
+    } while (key != 0);
+
+    lf_hash_put_pins(pins);
+    DBUG_VOID_RETURN;
+  }
+
+
+  /**
+    Connection_delay_action Constructor.
+
+    @param [in] threshold         Defines a threshold after which wait is triggered
+    @param [in] min_delay         Lower cap on wait
+    @param [in] max_delay         Upper cap on wait
+    @param [in] sys_vars          System variables
+    @param [in] sys_vars_size     Size of sys_vars array
+    @param [in] status_vars       Status variables
+    @param [in] status_vars_size  Size of status_vars array
+    @param [in] lock              RW lock handle
+  */
+
+  Connection_delay_action::Connection_delay_action(int64 threshold,
+                                                   int64 min_delay,
+                                                   int64 max_delay,
+                                                   opt_connection_control *sys_vars,
+                                                   size_t sys_vars_size,
+                                                   stats_connection_control *status_vars,
+                                                   size_t status_vars_size,
+                                                   mysql_rwlock_t *lock)
+    : m_threshold(threshold),
+      m_min_delay(min_delay),
+      m_max_delay(max_delay),
+      m_lock(lock)
+  {
+    if (sys_vars_size)
+    {
+      for (uint i=0; i < sys_vars_size; ++i)
+        m_sys_vars.push_back(sys_vars[i]);
+    }
+
+    if (status_vars_size)
+    {
+      for (uint i=0; i < status_vars_size; ++i)
+        m_stats_vars.push_back(status_vars[i]);
+    }
+  }
+
+
+  /**
+    Create hash key of the format '<user>'@'<host>'.
+    Policy:
+    1. Use proxy_user information if available. Else if,
+    2. Use priv_user/priv_host if either of them is not empty. Else,
+    3. Use user/host
+
+    @param thd [in]        THD pointer for getting security context
+    @param s [out]         Hash key is stored here
+  */
+
+  void
+  Connection_delay_action::make_hash_key(MYSQL_THD thd, Sql_string &s)
+  {
+    /* Our key for hash will be of format : '<user>'@'<host>' */
+
+    /* If proxy_user is set then use it directly for lookup */
+    Security_context_wrapper sctx_wrapper(thd);
+    const char * proxy_user= sctx_wrapper.get_proxy_user();
+    if (proxy_user && *proxy_user)
+    {
+      s.append(proxy_user);
+    } /* else if priv_user and/or priv_host is set, then use them */
+    else
+    {
+      const char * priv_user= sctx_wrapper.get_priv_user();
+      const char * priv_host= sctx_wrapper.get_priv_host();
+      if ((priv_user && *priv_user) || (priv_host && *priv_host))
+      {
+        s.append("'");
+
+        if (*priv_user)
+          s.append(priv_user);
+
+        s.append("'@'");
+
+        if (*priv_host)
+          s.append(priv_host);
+
+        s.append("'");
+      }
+      else
+      {
+        const char *user= sctx_wrapper.get_user();
+        const char *host= sctx_wrapper.get_host();
+        const char *ip= sctx_wrapper.get_ip();
+
+        s.append("'");
+
+        if (user && *user)
+          s.append(user);
+
+        s.append("'@'");
+
+        if (host && *host)
+          s.append(host);
+        else if (ip && *ip)
+          s.append(ip);
+
+        s.append("'");
+      }
+    }
+  }
+
+
+  /**
+    Wait till the wait_time expires or thread is killed
+
+    @param thd [in]        Handle to MYSQL_THD object
+    @param wait_time [in]  Maximum time to wait
+  */
+
+  void
+  Connection_delay_action::conditional_wait(MYSQL_THD thd,
+                                            ulonglong wait_time)
+  {
+    DBUG_ENTER("Connection_delay_action::conditional_wait");
+    const char * category= "connection_delay";
+
+    /** mysql_cond_timedwait requires wait time in timespec format */
+    struct timespec abstime;
+    /** Since we get wait_time in milliseconds, convert it to nanoseconds */
+    set_timespec_nsec(abstime, wait_time * 1000000ULL);
+
+    /** PSI_stage_info for thd_enter_cond/thd_exit_cond */
+    PSI_stage_info old_stage;
+    PSI_stage_info stage_waiting_in_connection_control_plugin=
+    {0, "Waiting in connection_control plugin", 0};
+
+    /** Initialize mutex required for mysql_cond_timedwait */
+    mysql_mutex_t connection_delay_mutex;
+    PSI_mutex_key key_connection_delay_mutex;
+    PSI_mutex_info connection_delay_mutex_info[]=
+    {
+      {&key_connection_delay_mutex, "connection_delay_mutex", PSI_FLAG_GLOBAL}
+    };
+    int count_mutex= array_elements(connection_delay_mutex_info);
+    PSI_server->register_mutex(category, connection_delay_mutex_info, count_mutex);
+    mysql_mutex_init(key_connection_delay_mutex, &connection_delay_mutex,
+                     MY_MUTEX_INIT_FAST);
+
+    /* Initialize condition to wait for */
+    mysql_cond_t connection_delay_wait_condition;
+    PSI_cond_key key_connection_delay_wait;
+    PSI_cond_info connection_delay_wait_info[]=
+    {
+      {&key_connection_delay_wait, "connection_delay_wait_condition", 0}
+    };
+    int count_cond= array_elements(connection_delay_wait_info);
+    PSI_server->register_cond(category, connection_delay_wait_info, count_cond);
+    mysql_cond_init(key_connection_delay_wait, &connection_delay_wait_condition, NULL);
+
+    /** Register wait condition with THD */
+    mysql_mutex_lock(&connection_delay_mutex);
+    thd_enter_cond(thd, &connection_delay_wait_condition, &connection_delay_mutex,
+                   &stage_waiting_in_connection_control_plugin, &old_stage,
+                   __func__, __FILE__, __LINE__);
+
+    /*
+      At this point, thread is essentially going to sleep till
+      timeout. If admin issues KILL statement for this THD,
+      there is no point keeping this thread in sleep mode only
+      to wake up to be terminated. Hence, in case of KILL,
+      we will return control to server without worring about
+      wait_time.
+    */
+    mysql_cond_timedwait(&connection_delay_wait_condition, &connection_delay_mutex, &abstime);
+
+    /* Finish waiting and deregister wait condition */
+    thd_exit_cond(thd, &stage_waiting_in_connection_control_plugin,
+                  __func__, __FILE__, __LINE__);
+
+    /* Cleanup */
+    mysql_mutex_destroy(&connection_delay_mutex);
+    mysql_cond_destroy(&connection_delay_wait_condition);
+    DBUG_VOID_RETURN;
+  }
+
+
+  /**
+    @brief  Handle a connection event and if requried,
+    wait for random amount of time before returning.
+
+    We only care about CONNECT and CHANGE_USER sub events.
+
+    @param thd [in]                THD pointer
+    @param coordinator [in]        Connection_event_coordinator
+    @param connection_event [in]   Connection event to be handled
+    @param error_handler [in]      Error handler object
+
+    @returns status of connection event handling
+      @retval false  Successfully handled an event.
+      @retval true   Something went wrong.
+                     error_buffer may contain details.
+  */
+
+  bool
+  Connection_delay_action::notify_event(MYSQL_THD thd,
+                                        Connection_event_coordinator_services *coordinator,
+                                        const mysql_event_connection *connection_event,
+                                        Error_handler *error_handler)
+  {
+    DBUG_ENTER("Connection_delay_action::notify");
+    bool error= false;
+    unsigned int subclass= connection_event->event_subclass;
+    Connection_event_observer *self= this;
+
+    if (subclass != MYSQL_AUDIT_CONNECTION_CONNECT &&
+        subclass != MYSQL_AUDIT_CONNECTION_CHANGE_USER)
+      DBUG_RETURN(error);
+
+    RD_lock rd_lock(m_lock);
+
+    int64 threshold= this->get_threshold();
+
+    /* If feature was disabled, return */
+    if (threshold <= DISABLE_THRESHOLD)
+      DBUG_RETURN(error);
+
+    int64 current_count= 0;
+    bool user_present= false;
+    Sql_string userhost;
+
+    make_hash_key(thd, userhost);
+
+    DBUG_PRINT("info", ("Connection control : Connection event lookup for: %s",
+                        userhost.c_str()));
+
+    /* Cache current failure count */
+    user_present=
+      m_userhost_hash.match_entry(userhost, (void *)&current_count) ? false : true;
+
+    if (current_count >= threshold || current_count < 0)
+    {
+      /*
+        If threshold is crosed, regardless of connection success
+        or failure, wait for (current_count + 1) - threshold seconds
+        Note that current_count is not yet updated in hash. So we
+        have to consider current connection as well - Hence the usage
+        of current_count + 1.
+      */
+      ulonglong wait_time= get_wait_time((current_count + 1) - threshold);
+
+      if ((error= coordinator->notify_status_var(
+                    &self, STAT_CONNECTION_DELAY_TRIGGERED, ACTION_INC)))
+      {
+        error_handler->handle_error("Failed to update connection delay triggered stats");
+      }
+      /*
+        Invoking sleep while holding read lock on Connection_delay_action
+        would block access to cache data through IS table.
+      */
+      rd_lock.unlock();
+      conditional_wait(thd, wait_time);
+      rd_lock.lock();
+    }
+
+    if (connection_event->status)
+    {
+      /*
+        Connection failure.
+        Add new entry to hash or increment failed connection count
+        for an existing entry
+      */
+      if (m_userhost_hash.create_or_update_entry(userhost))
+      {
+        char error_buffer[512];
+        memset(error_buffer, 0, sizeof(error_buffer));
+        my_snprintf(error_buffer, sizeof(error_buffer)-1,
+                    "Failed to update connection delay hash for account : %s",
+                    userhost.c_str());
+        error_handler->handle_error(error_buffer);
+        error= true;
+      }
+    }
+    else
+    {
+      /*
+        Successful connection.
+        delete entry for given account from the hash
+      */
+      if (user_present && m_userhost_hash.remove_entry(userhost))
+      {
+        char error_buffer[512];
+        memset(error_buffer, 0, sizeof(error_buffer));
+        my_snprintf(error_buffer, sizeof(error_buffer) - 1,
+                    "Failed to delete connection delay hash entry for acount : %s."
+                    " It might have been deleted already.",
+                    userhost.c_str());
+        error_handler->handle_error(error_buffer);
+        error= true;
+      }
+    }
+
+    DBUG_RETURN(error);
+  }
+
+
+  /**
+    Notification of a change in system variable value
+
+    @param coordinator [in]        Handle to coordinator
+    @param variable [in]           Enum of variable
+    @param new_value [in]          New value for variable
+    @param error_buffer [out]      Buffer to log error message if any
+    @param error_buffer_size [in]  Size of error buffer
+
+    @returns processing status
+      @retval false  Change in variable value processed successfully
+      @retval true Error processing new value.
+                    error_buffer may contain more details.
+  */
+
+  bool
+  Connection_delay_action::notify_sys_var(Connection_event_coordinator_services *coordinator,
+                                          opt_connection_control variable,
+                                          void *new_value,
+                                          Error_handler * error_handler)
+  {
+    DBUG_ENTER("Connection_delay_action::notify_sys_var");
+    bool error= true;
+    Connection_event_observer *self= this;
+
+    WR_lock wr_lock(m_lock);
+
+    switch (variable)
+    {
+      case OPT_FAILED_CONNECTIONS_THRESHOLD:
+      {
+        int64 new_threshold= *(static_cast<int64 *>(new_value));
+        DBUG_ASSERT(new_threshold >= DISABLE_THRESHOLD);
+        set_threshold(new_threshold);
+
+        if ((error= coordinator->notify_status_var(&self,
+                                                   STAT_CONNECTION_DELAY_TRIGGERED,
+                                                   ACTION_RESET)))
+        {
+          error_handler->handle_error("Failed to reset connection delay triggered stats");
+        }
+        break;
+      }
+      case OPT_MIN_CONNECTION_DELAY:
+      case OPT_MAX_CONNECTION_DELAY:
+      {
+        int64 new_delay= *(static_cast<int64 *>(new_value));
+        if ((error= set_delay(new_delay,
+                      (variable == OPT_MIN_CONNECTION_DELAY))))
+        {
+          char error_buffer[512];
+          memset(error_buffer, 0, sizeof(error_buffer));
+          my_snprintf(error_buffer, sizeof(error_buffer) - 1,
+                      "Could not set %s delay for connection delay.",
+                      (variable == OPT_MIN_CONNECTION_DELAY) ? "min" : "max");
+          error_handler->handle_error(error_buffer);
+        }
+        break;
+      }
+      default:
+        /* Should never reach here. */
+        DBUG_ASSERT(FALSE);
+        error_handler->handle_error("Unexpected option type for connection delay.");
+    };
+    DBUG_RETURN(error);
+  }
+
+
+  /**
+    Subscribe with coordinator for connection events
+
+    @param coordinator [in]  Handle to Connection_event_coordinator_services
+                             for registration
+  */
+  void
+  Connection_delay_action::init(Connection_event_coordinator_services *coordinator)
+  {
+    DBUG_ENTER("Connection_delay_action::init");
+    DBUG_ASSERT(coordinator);
+    bool retval;
+    Connection_event_observer *subscriber= this;
+    WR_lock wr_lock(m_lock);
+    retval= coordinator->register_event_subscriber(&subscriber,
+                                                   &m_sys_vars,
+                                                   &m_stats_vars);
+    DBUG_ASSERT(!retval);
+    if (retval)
+      retval= false;                    /* Make compiler happy */
+    DBUG_VOID_RETURN;
+  }
+
+
+  /**
+    Clear data from Connection_delay_action
+  */
+
+  void
+    Connection_delay_action::deinit()
+  {
+    mysql_rwlock_wrlock(m_lock);
+    m_userhost_hash.reset_all();
+    m_sys_vars.clear();
+    m_stats_vars.clear();
+    m_threshold= DISABLE_THRESHOLD;
+    mysql_rwlock_unlock(m_lock);
+    m_lock= 0;
+  }
+
+
+
+  /**
+    Get user information from "where userhost = <value>"
+
+    @param cond [in]        Equality condition structure
+    @param eq_arg [out]     Sql_string handle to store user information
+    @param field_name [in]  userhost field
+
+    @returns whether a value was found or not
+      @retval false Found a value. Check eq_arg
+      @retval true Error.
+  */
+
+  static
+  bool get_equal_condition_argument(Item *cond, Sql_string *eq_arg,
+                                    const Sql_string &field_name)
+  {
+    if (cond != 0 && cond->type() == Item::FUNC_ITEM)
+    {
+      Item_func *func= static_cast<Item_func *>(cond);
+      if (func != NULL && func->functype() == Item_func::EQ_FUNC)
+      {
+        Item_func_eq* eq_func= static_cast<Item_func_eq*>(func);
+        if (eq_func->arguments()[0]->type() == Item::FIELD_ITEM &&
+            my_strcasecmp(system_charset_info,
+                          eq_func->arguments()[0]->full_name(),
+                          field_name.c_str()) == 0)
+        {
+          char buff[1024];
+          String *res;
+          String filter(buff, sizeof(buff), system_charset_info);
+          if (eq_func->arguments()[1] != NULL &&
+            (res= eq_func->arguments()[1]->val_str(&filter)))
+          {
+            eq_arg->append(res->c_ptr_safe(), res->length());
+            return false;
+          }
+        }
+      }
+    }
+    return true;
+  }
+
+
+  /**
+    Function to fill information_schema.connection_control_failed_attempts.
+
+    Handles query with equality condition.
+    For full scan, calls Connection_delay_event::fill_IS_table()
+
+    Permission : SUPER_ACL is required.
+
+    @param thd [in]     THD handle.
+    @param tables [in]  Handle to
+                        information_schema.connection_control_failed_attempts.
+    @param cond [in]    Condition if any.
+  */
+
+  void
+  Connection_delay_action::fill_IS_table(THD *thd,
+                                         TABLE_LIST *tables,
+                                         Item *cond)
+  {
+    DBUG_ENTER("Connection_delay_action::fill_IS_table");
+    Security_context_wrapper sctx_wrapper(thd);
+    if (!sctx_wrapper.is_super_user())
+      DBUG_VOID_RETURN;
+    WR_lock wr_lock(m_lock);
+    Sql_string eq_arg;
+    if (cond != 0 &&
+        !get_equal_condition_argument(cond,
+                                      &eq_arg,
+                                      I_S_CONNECTION_CONTROL_FAILED_ATTEMPTS_USERHOST))
+    {
+      int64 current_count= 0;
+      if (m_userhost_hash.match_entry(eq_arg, (void *)&current_count))
+      {
+        /* There are no matches given the condition */
+        DBUG_VOID_RETURN;
+      }
+      else
+      {
+        /* There is exactly one matching userhost entry */
+        TABLE *table= tables->table;
+        table->field[0]->store(eq_arg.c_str(), eq_arg.length(),
+                               system_charset_info);
+        table->field[1]->store(current_count, true);
+        schema_table_store_record(thd, table);
+      }
+    }
+    else
+      m_userhost_hash.fill_IS_table(thd, tables);
+
+    DBUG_VOID_RETURN;
+  }
+
+
+  /**
+    Initializes required objects for handling connection events.
+
+    @param coordinator [in]    Connection_event_coordinator_services handle.
+  */
+
+  bool init_connection_delay_event(Connection_event_coordinator_services *coordinator,
+                                   Error_handler *error_handler)
+  {
+    /*
+      1. Initialize lock(s)
+    */
+    const char *category= "conn_control";
+    int count= array_elements(all_rwlocks);
+    mysql_rwlock_register(category, all_rwlocks, count);
+    mysql_rwlock_init(key_connection_event_delay_lock,
+                      &connection_event_delay_lock);
+    g_max_failed_connection_handler= new Connection_delay_action(g_variables.failed_connections_threshold,
+                                                                 g_variables.min_connection_delay,
+                                                                 g_variables.max_connection_delay,
+                                                                 opt_enums, opt_enums_size,
+                                                                 status_vars_enums, status_vars_enums_size,
+                                                                 &connection_event_delay_lock);
+    if (!g_max_failed_connection_handler)
+    {
+      error_handler->handle_error("Failed to initialization Connection_delay_action");
+      return true;
+    }
+    g_max_failed_connection_handler->init(coordinator);
+
+    return false;
+  }
+
+
+  /**
+    Deinitializes objects and frees associated memory.
+  */
+
+  void deinit_connection_delay_event()
+  {
+    if (g_max_failed_connection_handler)
+      delete g_max_failed_connection_handler;
+    g_max_failed_connection_handler= 0;
+    mysql_rwlock_destroy(&connection_event_delay_lock);
+    return;
+  }
+}
+
+
+/**
+  Function to fill information_schema.connection_control_failed_attempts.
+
+  @param thd [in]     THD handle.
+  @param tables [in]  Handle to
+                      information_schema.connection_control_failed_attempts.
+  @param cond [in]    Condition if any.
+
+  @returns Always returns FALSE.
+*/
+
+int fill_failed_attempts_view(THD *thd,
+                              TABLE_LIST *tables,
+                              Item *cond)
+{
+  if (connection_control::g_max_failed_connection_handler)
+    connection_control::g_max_failed_connection_handler->fill_IS_table(thd, tables, cond);
+  return FALSE;
+}
+
+
+/**
+  View init function
+
+  @param ptr [in]    Handle to
+                     information_schema.connection_control_failed_attempts.
+
+  @returns Always returns 0.
+*/
+
+int connection_control_failed_attempts_view_init(void *ptr)
+{
+  ST_SCHEMA_TABLE *schema_table= (ST_SCHEMA_TABLE *)ptr;
+
+  schema_table->fields_info= failed_attempts_view_fields;
+  schema_table->fill_table= fill_failed_attempts_view;
+  schema_table->idx_field1= 0;
+  schema_table->idx_field2= 1;
+  return 0;
+}
+
+
diff --git a/mysql-wsrep-5.6/plugin/connection_control/connection_delay.h b/mysql-wsrep-5.6/plugin/connection_control/connection_delay.h
new file mode 100644 (file)
index 0000000..48fc5a0
--- /dev/null
@@ -0,0 +1,292 @@
+/* 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
+   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 */
+
+#ifndef CONNECTION_DELAY_H
+#define CONNECTION_DELAY_H
+
+#include <lf.h>                         /* LF Hash */
+#include <my_global.h>
+#include <my_atomic.h>                  /* my_atomic_* */
+#include <mysql_com.h>                  /* USERNAME_LENGTH */
+#include "table.h"                      /* TABLE_LIST */
+
+#include "connection_control_interfaces.h" /* Observer interface */
+#include "connection_delay_api.h"       /* Constants */
+#include "connection_control_data.h"    /* variables and status */
+#include "connection_control_memory.h"  /* Connection_control_alloc */
+
+namespace connection_control
+{
+  /**
+    Class to store failed attempts information for a given user.
+  */
+
+  class Connection_event_record : public Connection_control_alloc
+  {
+  public:
+
+    /**
+      Constructor for Connection_event_record. Always initializes failed login count to 1.
+    */
+    Connection_event_record(const Sql_string &s)
+      : m_count(1)
+    {
+      memset((void *)m_userhost, 0, sizeof(m_userhost));
+      memcpy((void *)m_userhost, s.c_str(), s.length());
+      m_length= s.length();
+      m_count= 1;
+    }
+
+    /**
+      Retrives failed login count for given user entry
+
+      @returns Failed login count
+    */
+    int64 get_count() const
+    {
+      int64 result= my_atomic_load64((volatile int64*)&m_count);
+      return result;
+    }
+
+    /** Increment failed login count for given user entry by 1 */
+    void inc_count()
+    {
+      my_atomic_add64((volatile int64*)&m_count, 1);
+    }
+
+    /** Reset failed login count for given user entry */
+    void reset_count()
+    {
+      my_atomic_store64(&m_count, 0);
+    }
+
+    /** Get user information */
+    uchar * get_userhost() const
+    {
+      return const_cast<uchar *> (m_userhost);
+    }
+
+    /**  Get length information  */
+    size_t get_length() const
+    {
+      return m_length;
+    }
+
+    /** Destructor */
+    ~Connection_event_record()
+    {
+      m_count= DISABLE_THRESHOLD;
+    }
+
+  private:
+    /* '<user>'@'<host>' */
+    uchar m_userhost[1 + USERNAME_LENGTH + 3 + HOSTNAME_LENGTH + 1 + 1];
+    /* Length of m_userhost */
+    size_t m_length;
+    /* connection event count */
+    volatile int64 m_count;
+  };
+
+
+  /**
+    Hash for a connection event.
+    Stores information in Connection_event_record object for each user.
+  */
+
+  class Connection_delay_event : public Connection_event_records
+  {
+  public:
+
+    /** Constructor. Also initializes the hash */
+    Connection_delay_event();
+
+    /** Destructor. Removes all entries from hash before destroying hash */
+    ~Connection_delay_event()
+    {
+      reset_all();
+      lf_hash_destroy(&m_entries);
+    }
+
+    void fill_IS_table(THD *thd, TABLE_LIST *tables);
+
+    /* Overridden function */
+    bool create_or_update_entry(const Sql_string &s);
+    bool remove_entry(const Sql_string &s);
+    bool match_entry(const Sql_string &s, void * value);
+    void reset_all();
+
+  private:
+    /** Hash for storing Connection_event_record per user */
+    LF_HASH m_entries;
+  };
+
+
+  /**
+    Connection event action to enforce max failed login constraint
+  */
+
+  class Connection_delay_action : public Connection_event_observer,
+                                  public Connection_control_alloc
+  {
+  public:
+
+    Connection_delay_action(int64 threshold,
+                            int64 min_delay,
+                            int64 max_delay,
+                            opt_connection_control *sys_vars,
+                            size_t sys_vars_size,
+                            stats_connection_control *status_vars,
+                            size_t status_vars_size,
+                            mysql_rwlock_t *lock);
+
+    /** Destructor */
+    ~Connection_delay_action()
+    {
+      deinit();
+      m_lock= 0;
+    }
+
+    void init(Connection_event_coordinator_services *coordinator);
+
+    /**
+      Set threshold value.
+
+      @param threshold [in]        New threshold value
+
+      @returns whether threshold value was changed successfully or not
+        @retval true  Success
+        @retval false Failure. Invalid threshold value specified.
+    */
+
+    void set_threshold(int64 threshold)
+    {
+      my_atomic_store64(&m_threshold, threshold);
+      /* Clear the hash */
+      m_userhost_hash.reset_all();
+    }
+
+    /** Get threshold value */
+    int64 get_threshold()
+    {
+      int64 result= my_atomic_load64(&m_threshold);
+      return result;
+    }
+
+    /**
+      Set min/max delay
+
+      @param new_value [in]        New m_min_delay/m_max_delay value
+      @param min [in]              true for m_min_delay. false otherwise.
+
+      @returns whether m_min_delay/m_max_delay value was changed successfully or not
+        @retval false  Success
+        @retval true Failure. Invalid value specified.
+    */
+
+    bool set_delay(int64 new_value, bool min)
+    {
+      int64 current_max= get_max_delay();
+      int64 current_min= get_min_delay();
+
+      if (new_value < MIN_DELAY)
+        return true;
+
+      if ((min && new_value > current_max) ||
+        (!min && new_value < current_min))
+        return true;
+
+      else
+        min ? my_atomic_store64(&m_min_delay, new_value) :
+        my_atomic_store64(&m_max_delay, new_value);
+      return false;
+    }
+
+    /** Get max value */
+    int64 get_max_delay()
+    {
+      int64 result= my_atomic_load64(&m_max_delay);
+      return result;
+    }
+
+    /** Get min value */
+    int64 get_min_delay()
+    {
+      int64 result= my_atomic_load64(&m_min_delay);
+      return result;
+    }
+
+    void fill_IS_table(THD *thd,
+                       TABLE_LIST *tables,
+                       Item *cond);
+
+    /** Overridden functions */
+    bool notify_event(MYSQL_THD thd,
+                      Connection_event_coordinator_services *coordinator,
+                      const mysql_event_connection *connection_event,
+                      Error_handler *error_handler);
+    bool notify_sys_var(Connection_event_coordinator_services *coordinator,
+                        opt_connection_control variable,
+                        void *new_value,
+                        Error_handler *error_handler);
+
+  private:
+    void deinit();
+    void make_hash_key(MYSQL_THD thd, Sql_string &s);
+    /**
+      Generates wait time
+
+      @param count [in] Proposed delay
+
+      @returns wait time
+    */
+
+    inline ulonglong get_wait_time(int64 count)
+    {
+      int64 max_delay= get_max_delay();
+      int64 min_delay= get_min_delay();
+      int64 count_mili= count*1000;
+
+      /*
+        if count < 0 (can happen in edge cases
+        we return max_delay.
+        Otherwise, following equation will be used:
+        wait_time = MIN(MIN(count, min_delay),
+                        max_delay)
+      */
+      return (static_cast<ulonglong>((count_mili >= MIN_DELAY && count_mili < max_delay) ?
+        (count_mili < min_delay ? min_delay : count_mili) :
+                                  max_delay));
+    }
+    void conditional_wait(THD *thd,
+                          ulonglong wait_time);
+
+  private:
+    /** Threshold value which triggers wait */
+    volatile int64 m_threshold;
+    /** Lower cap on delay to be generated */
+    volatile int64 m_min_delay;
+    /** Upper cap on delay to be generated */
+    volatile int64 m_max_delay;
+    /** System variables */
+    std::vector<opt_connection_control> m_sys_vars;
+    /** Status variables */
+    std::vector<stats_connection_control> m_stats_vars;
+    /** Hash to store failed attempts for each user entry */
+    Connection_delay_event m_userhost_hash;
+    /** RW lock */
+    mysql_rwlock_t *m_lock;
+  };
+}
+#endif /* !CONNECTION_DELAY_H */
diff --git a/mysql-wsrep-5.6/plugin/connection_control/connection_delay_api.h b/mysql-wsrep-5.6/plugin/connection_control/connection_delay_api.h
new file mode 100644 (file)
index 0000000..81a4b89
--- /dev/null
@@ -0,0 +1,49 @@
+/* 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
+   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 */
+
+#ifndef CONNECTION_DELAY_API_H
+#define CONNECTION_DELAY_API_H
+
+/* Structures/Functions requried for information schema table */
+
+extern struct st_mysql_information_schema connection_control_failed_attempts_view;
+int connection_control_failed_attempts_view_init(void *ptr);
+
+namespace connection_control
+{
+
+  /* constants/variables defined in connection_delay.cc */
+
+  extern int64 DEFAULT_THRESHOLD;
+  extern int64 MIN_THRESHOLD;
+  extern int64 DISABLE_THRESHOLD;
+  extern int64 MAX_THRESHOLD;
+
+  extern int64 DEFAULT_MAX_DELAY;
+  extern int64 DEFAULT_MIN_DELAY;
+  extern int64 MIN_DELAY;
+  extern int64 MAX_DELAY;
+
+  /** Functions being used by connection_control.cc */
+
+  class Connection_event_coordinator_services;
+  class Error_handler;
+
+  bool init_connection_delay_event(Connection_event_coordinator_services *coordinator,
+                                   Error_handler *error_handler);
+  void deinit_connection_delay_event();
+
+}
+#endif // !CONNECTION_DELAY_API_H
diff --git a/mysql-wsrep-5.6/plugin/connection_control/security_context_wrapper.cc b/mysql-wsrep-5.6/plugin/connection_control/security_context_wrapper.cc
new file mode 100644 (file)
index 0000000..44f1ade
--- /dev/null
@@ -0,0 +1,219 @@
+/* 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
+   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 */
+
+#define MYSQL_SERVER  "We need security context"
+
+#include <sql_class.h>                      /* THD, Security context */
+#include <sql_acl.h>                        /* SUPER_ACL */
+
+#include "security_context_wrapper.h"
+
+namespace connection_control
+{
+  /**
+    Security_context_wrapper constructor.
+
+    @param thd [in]    Handle to THD
+
+    Get security context from thd.
+  */
+  Security_context_wrapper::Security_context_wrapper(MYSQL_THD thd)
+  {
+    m_valid= thd->security_ctx ? true : false;
+    m_thd= thd;
+  }
+
+
+  /**
+    Get value for given property from security context
+
+    @param property [in]    Property to be checked
+    @param value    [out]   Value of the property
+
+    @returns status of property check
+      @retval true Error fetching property value
+      @retval false value contains valid value for given property
+  */
+
+  bool
+  Security_context_wrapper::get_property(const char *property, LEX_CSTRING *value)
+  {
+    value->length=0;
+    value->str= 0;
+
+    if (!m_valid || !property)
+      return true;
+    else
+    {
+      if (!strcmp(property, "priv_user"))\r
+      {\r
+        if (m_thd->security_ctx->priv_user)\r
+        {\r
+          value->str= m_thd->security_ctx->priv_user;\r
+          value->length= strlen(value->str);\r
+        }\r
+      }
+      else if (!strcmp(property, "priv_host"))
+      {
+        if (m_thd->security_ctx->priv_host)
+        {
+          value->str= m_thd->security_ctx->priv_host;
+          value->length= strlen(value->str);
+        }
+      }
+      else if (!strcmp(property, "user"))
+      {
+        if (m_thd->security_ctx->user)
+        {
+          value->str= m_thd->security_ctx->user;
+          value->length= strlen(value->str);
+        }
+      }
+      else if (!strcmp(property, "proxy_user"))\r
+      {\r
+        if (m_thd->security_ctx->proxy_user)\r
+        {\r
+          value->str= m_thd->security_ctx->proxy_user;\r
+          value->length= strlen(value->str);\r
+        }\r
+      }
+      else if (!strcmp(property, "host"))
+      {
+        if (m_thd->security_ctx->get_host()->length())
+        {
+          value->str= m_thd->security_ctx->get_host()->c_ptr();
+          value->length= strlen(value->str);
+        }
+      }
+      else if (!strcmp(property, "ip"))
+      {
+        if (m_thd->security_ctx->get_ip()->length())
+        {
+          value->str= m_thd->security_ctx->get_ip()->c_ptr();
+          value->length= strlen(value->str);
+        }
+      }
+      else
+      {
+        return true;
+      }
+    }
+    return false;
+  }
+
+
+  /**  Get proxy user information from security context */
+
+  const char *
+    Security_context_wrapper::get_proxy_user()
+  {
+    LEX_CSTRING proxy_user;
+    if (get_property("proxy_user", &proxy_user))
+      return 0;
+    return proxy_user.str;
+  }
+
+
+  /** Get priv user information from security context */
+
+  const char *
+    Security_context_wrapper::get_priv_user()
+  {
+    LEX_CSTRING priv_user;
+    if (get_property("priv_user", &priv_user))
+      return 0;
+    return priv_user.str;
+  }
+
+
+  /** Get priv host information from security context */
+
+  const char *
+    Security_context_wrapper::get_priv_host()
+  {
+    LEX_CSTRING priv_host;
+    if (get_property("priv_host", &priv_host))
+      return 0;
+    return priv_host.str;
+  }
+
+
+  /** Get connected user information from security context */
+
+  const char *
+    Security_context_wrapper::get_user()
+  {
+    LEX_CSTRING user;
+    if (get_property("user", &user))
+      return 0;
+    return user.str;
+  }
+
+
+  /** Get connected host information from security context */
+
+  const char *
+    Security_context_wrapper::get_host()
+  {
+    /*
+      We can't use thd->security_ctx->priv_host_name()
+      because it returns "%" if hostname is empty.
+      However, thd->security_ctx->proxy_user won't have
+      "%" if hostname was empty.
+
+      To be consistent, we will always use
+      'user'@'host'/''@'host'/''@'' type of representation.
+    */
+    LEX_CSTRING host;
+    if (get_property("host", &host))
+      return 0;
+    return host.str;
+  }
+
+
+  /** Get connected ip information from security context */
+
+  const char *
+    Security_context_wrapper::get_ip()
+  {
+    LEX_CSTRING ip;
+    if (get_property("ip", &ip))
+      return 0;
+    return ip.str;
+  }
+
+
+  /** Check if valid security context exists for give THD or not */
+
+  bool
+    Security_context_wrapper::security_context_exists()
+  {
+    return m_valid;
+  }
+
+
+  /** Check whether user has requried privilege or not */
+
+  bool
+    Security_context_wrapper::is_super_user()
+  {
+    if (!m_valid)
+      return false;
+
+    bool has_super= ((m_thd->security_ctx->master_access & SUPER_ACL) == SUPER_ACL);
+
+    return has_super;
+  }
+}
diff --git a/mysql-wsrep-5.6/plugin/connection_control/security_context_wrapper.h b/mysql-wsrep-5.6/plugin/connection_control/security_context_wrapper.h
new file mode 100644 (file)
index 0000000..41a2f1f
--- /dev/null
@@ -0,0 +1,44 @@
+/* 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
+   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 */
+
+#ifndef HAVE_SECURITY_CONTEXT_WRAPPER_H
+#define HAVE_SECURITY_CONTEXT_WRAPPER_H
+
+#include <mysql/plugin.h>
+
+namespace connection_control
+{
+  class Security_context_wrapper
+  {
+  public:
+    Security_context_wrapper(MYSQL_THD thd);
+    ~Security_context_wrapper()
+    {}
+    const char * get_proxy_user();
+    const char * get_priv_user();
+    const char * get_priv_host();
+    const char * get_user();
+    const char * get_host();
+    const char * get_ip();
+    bool security_context_exists();
+    bool is_super_user();
+
+  private:
+    bool get_property(const char *property, LEX_CSTRING *value);
+    MYSQL_THD m_thd;
+    bool m_valid;
+  };
+}
+#endif // !HAVE_SECURITY_CONTEXT_WRAPPER_H
index 094cbe87bb1cfcaac1e719001d6bb5af6c5cbae2..8b5d52c5afdf478073981c3ac8b3a516555f142d 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2006, 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
 #include "sql_plugin.h"                         // st_plugin_int
 
 /*
-  Disable __attribute__() on non-gcc compilers.
+  Disable MY_ATTRIBUTE() on non-gcc compilers.
 */
-#if !defined(__attribute__) && !defined(__GNUC__)
-#define __attribute__(A)
+#if !defined(MY_ATTRIBUTE) && !defined(__GNUC__)
+#define MY_ATTRIBUTE(A)
 #endif
 
 
index d5f6d869ea18beb9e32810752eb2615d61eb1a58..b13dd223a14e0d1f91325ec2a29901bfe76d07a4 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2005, 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
@@ -17,9 +17,7 @@
 #include <ctype.h>
 #include <mysql/plugin.h>
 
-#if !defined(__attribute__) && (defined(__cplusplus) || !defined(__GNUC__)  || __GNUC__ == 2 && __GNUC_MINOR__ < 8)
-#define __attribute__(A)
-#endif
+#include "my_attribute.h"
 
 static long number_of_calls= 0; /* for SHOW STATUS, see below */
 
@@ -62,7 +60,7 @@ static long number_of_calls= 0; /* for SHOW STATUS, see below */
     1                    failure (cannot happen)
 */
 
-static int simple_parser_plugin_init(void *arg __attribute__((unused)))
+static int simple_parser_plugin_init(void *arg MY_ATTRIBUTE((unused)))
 {
   return(0);
 }
@@ -81,7 +79,7 @@ static int simple_parser_plugin_init(void *arg __attribute__((unused)))
 
 */
 
-static int simple_parser_plugin_deinit(void *arg __attribute__((unused)))
+static int simple_parser_plugin_deinit(void *arg MY_ATTRIBUTE((unused)))
 {
   return(0);
 }
@@ -102,7 +100,7 @@ static int simple_parser_plugin_deinit(void *arg __attribute__((unused)))
 */
 
 static int simple_parser_init(MYSQL_FTPARSER_PARAM *param
-                              __attribute__((unused)))
+                              MY_ATTRIBUTE((unused)))
 {
   return(0);
 }
@@ -123,7 +121,7 @@ static int simple_parser_init(MYSQL_FTPARSER_PARAM *param
 */
 
 static int simple_parser_deinit(MYSQL_FTPARSER_PARAM *param
-                                __attribute__((unused)))
+                                MY_ATTRIBUTE((unused)))
 {
   return(0);
 }
diff --git a/mysql-wsrep-5.6/plugin/innodb_memcached/daemon_memcached/.gitignore b/mysql-wsrep-5.6/plugin/innodb_memcached/daemon_memcached/.gitignore
new file mode 100644 (file)
index 0000000..685f686
--- /dev/null
@@ -0,0 +1,57 @@
+# Keep the entries sorted to reduce the risk for a merge conflict
+*.[ao]
+*.exe
+*.gcda
+*.gcno
+*.gcov
+*.l[ao]
+*.tcov
+*.pyc
+*~
+.deps
+/.libs/
+/INSTALL
+/aclocal.m4
+/autom4te.cache
+/breakdancer_testsuite.c
+/config.h
+/config.h.in
+/config.log
+/config.status
+/config/Doxyfile
+/config/Doxyfile-api
+/config/compile
+/config/config.guess
+/config/config.sub
+/config/depcomp
+/config/install-sh
+/config/ltmain.sh
+/config/missing
+/configure
+/doc/doxy
+/doc/doxy-api
+/doc/engine-interface.txt
+/doc/protocol-binary-range.txt
+/doc/protocol-binary.txt
+/engine_testapp
+/libtool
+/m4/version.m4
+/mcstat
+/memcached
+/memcached-*.tar.gz
+/memcached-debug
+/memcached-debug.profile
+/memcached.spec
+/memcached_dtrace.h
+/mkinstalldirs
+/sizes
+/stamp-h1
+/t/binary-sasl.t
+/testapp
+/timedrun
+/version.num
+Makefile
+Makefile.in
+TAGS
+cscope.out
+tags
index ff00508703efb85bb926b93615c0b44b2cb35555..7c64a880841758b9e0e6f340d79e1e332b4d4303 100644 (file)
@@ -137,6 +137,12 @@ void log_engine_details(ENGINE_HANDLE * engine,
             offset += nw;
             for (int ii = 0; ii < info->num_features; ++ii) {
                 if (info->features[ii].description != NULL) {
+                    // We don't want to write partially from source
+                    if (sizeof(message)-offset <=
+                        2+strlen(info->features[ii].description))
+                    {
+                        return;
+                    }
                     nw = snprintf(message + offset, sizeof(message) - offset,
                                   "%s%s", comma ? ", " : "",
                                   info->features[ii].description);
diff --git a/mysql-wsrep-5.6/plugin/innodb_memcached/innodb_memcache/.gitignore b/mysql-wsrep-5.6/plugin/innodb_memcached/innodb_memcache/.gitignore
new file mode 100644 (file)
index 0000000..12dc37f
--- /dev/null
@@ -0,0 +1,38 @@
+*.build
+xcode/ndbmemcache.xcodeproj/jdd.perspectivev3
+xcode/ndbmemcache.xcodeproj/jdd.mode1v3
+xcode/ndbmemcache.xcodeproj/*.mode1v3
+xcode/ndbmemcache.xcodeproj/*.pbxuser
+.DS_Store
+Makefile.in
+junkbin
+aclocal.m4
+compile
+configure
+depcomp
+install-sh
+ltmain.sh
+missing
+autom4te.cache/
+config.guess
+config.h.in
+config.sub
+Makefile
+config.h
+config.log
+config.status
+libtool
+src/.deps/
+src/Makefile
+stamp-h1
+unit/.deps/
+unit/test_workqueue
+unit/Makefile
+unit/casbits_test
+unit/ndbapi_interp_test
+unit/test_interp
+.libs
+.deps
+*.la
+*.lo
+
index d7c6ee52f91804425006d948d4a8c6d7e05d7364..60fc3720df07111d2cb48c3048936e48af0af705 100644 (file)
@@ -1,6 +1,6 @@
 /***********************************************************************
 
-Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
+Copyright (c) 2011, 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
@@ -1929,6 +1929,9 @@ search_done:
                                                &col_value->value_int,
                                                col_value->value_len,
                                                col_value->is_unsigned);
+
+                                        assert(int_len <= conn_data->mul_col_buf_len);
+
                                        memcpy(c_value, int_buf, int_len);
                                        c_value += int_len;
                                } else {
index 9bee07c03216a87e167a02bf1b50a2e639f320e6..23970aae29c759e42e6a057e6f921d6b830c016e 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2012, 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
 
 
 /*  
-  __attribute__(A) needs to be defined for Windows else complier
+  MY_ATTRIBUTE(A) needs to be defined for Windows else complier
   do not recognise it. Argument in plugin_init and plugin_deinit
   Used in other plugins as well.
 */
-#if !defined(__attribute__) && (defined(__cplusplus) || !defined(__GNUC__)  || __GNUC__ == 2 && __GNUC_MINOR__ < 8)
-#define __attribute__(A)
+#if !defined(MY_ATTRIBUTE) && (defined(__cplusplus) || !defined(__GNUC__)  || __GNUC__ == 2 && __GNUC_MINOR__ < 8)
+#define MY_ATTRIBUTE(A)
 #endif
 
 #define MAX_DICTIONARY_FILE_LENGTH    1024 * 1024
@@ -367,7 +367,7 @@ static int validate_password_init(MYSQL_PLUGIN plugin_info)
   It empty the std::set and returns 0
 */
 
-static int validate_password_deinit(void *arg __attribute__((unused)))
+static int validate_password_deinit(void *arg MY_ATTRIBUTE((unused)))
 {
   free_dictionary_file();
   mysql_rwlock_destroy(&LOCK_dict_file);
@@ -380,8 +380,8 @@ static int validate_password_deinit(void *arg __attribute__((unused)))
   the cache and re-load the new dictionary file.
 */
 static void
-dictionary_update(MYSQL_THD thd __attribute__((unused)),
-                  struct st_mysql_sys_var *var __attribute__((unused)),
+dictionary_update(MYSQL_THD thd MY_ATTRIBUTE((unused)),
+                  struct st_mysql_sys_var *var MY_ATTRIBUTE((unused)),
                   void *var_ptr, const void *save)
 {
   *(const char**)var_ptr= *(const char**)save;
@@ -396,8 +396,8 @@ dictionary_update(MYSQL_THD thd __attribute__((unused)),
   4. validate_password_special_char_count
 */
 static void
-length_update(MYSQL_THD thd __attribute__((unused)),
-              struct st_mysql_sys_var *var __attribute__((unused)),
+length_update(MYSQL_THD thd MY_ATTRIBUTE((unused)),
+              struct st_mysql_sys_var *var MY_ATTRIBUTE((unused)),
               void *var_ptr, const void *save)
 {
   int new_validate_password_length;
index af459cc7d2200a50cc8b968ae9f0e46a66c455d8..a2d03bc2a1d17d5dc970339e18be4d3f4ad20765 100644 (file)
@@ -670,6 +670,7 @@ int ReplSemiSyncMaster::commitTrx(const char* trx_wait_binlog_name,
 
   TranxNode* entry= NULL;
   mysql_cond_t* thd_cond= NULL;
+  bool is_semi_sync_trans= true;
   if (active_tranxs_ != NULL && trx_wait_binlog_name)
   {
     entry=
@@ -733,6 +734,25 @@ int ReplSemiSyncMaster::commitTrx(const char* trx_wait_binlog_name,
           break;
         }
       }
+      /*
+        When code reaches here an Entry object may not be present in the
+        following scenario.
+
+        Semi sync was not enabled when transaction entered into ordered_commit
+        process. During flush stage, semi sync was not enabled and there was no
+        'Entry' object created for the transaction being committed and at a
+        later stage it was enabled. In this case trx_wait_binlog_name and
+        trx_wait_binlog_pos are set but the 'Entry' object is not present. Hence
+        dump thread will not wait for reply from slave and it will not update
+        reply_file_name. In such case the committing transaction should not wait
+        for an ack from slave and it should be considered as an async
+        transaction.
+      */
+      if (!entry)
+      {
+        is_semi_sync_trans= false;
+        goto l_end;
+      }
 
       /* Let us update the info about the minimum binlog position of waiting
        * threads.
@@ -833,7 +853,7 @@ int ReplSemiSyncMaster::commitTrx(const char* trx_wait_binlog_name,
 
 l_end:
     /* Update the status counter. */
-    if (is_on())
+    if (is_on() && is_semi_sync_trans)
       rpl_semi_sync_master_yes_transactions++;
     else
       rpl_semi_sync_master_no_transactions++;
diff --git a/mysql-wsrep-5.6/plugin/udf_services/CMakeLists.txt b/mysql-wsrep-5.6/plugin/udf_services/CMakeLists.txt
new file mode 100644 (file)
index 0000000..7b2fc4f
--- /dev/null
@@ -0,0 +1,16 @@
+# 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
+# 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_ADD_PLUGIN(test_udf_services test_udf_services.cc MODULE_ONLY)
diff --git a/mysql-wsrep-5.6/plugin/udf_services/test_udf_services.cc b/mysql-wsrep-5.6/plugin/udf_services/test_udf_services.cc
new file mode 100644 (file)
index 0000000..2baf651
--- /dev/null
@@ -0,0 +1,101 @@
+/* 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
+   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 <my_global.h>
+#include <mysql_version.h>
+#include <mysql/plugin.h>
+#include <mysql_com.h>
+
+/**
+  @file test_udf_services.cc
+
+  This is a test suite plugin to verify that plugins can co-exist with UDFs.
+  The file defines one DAEMON plugin @ref test_udf_services_plugin and one
+  UDF function: @ref test_udf_services_udf.
+  The test then checks if the plugin can be unloaded and loaded while the
+  UDF is defined.
+
+  No user-facing functionality in this plugin. Just test material !
+*/
+
+static struct st_mysql_daemon test_udf_services_plugin=
+{ MYSQL_DAEMON_INTERFACE_VERSION  };
+
+mysql_declare_plugin(test_udf_services)
+{
+  MYSQL_DAEMON_PLUGIN,
+  &test_udf_services_plugin,
+  "test_udf_services",
+  "Georgi Kodinov",
+  "MySQL mtr test framework",
+  PLUGIN_LICENSE_GPL,
+  NULL,                       /* Plugin Init          */
+  NULL,                       /* Plugin Deinit        */
+  0x0100,                     /* Plugin version: 1.0  */
+  NULL,                       /* status variables     */
+  NULL,                       /* system variables     */
+  NULL,                       /* config options       */
+  0,                          /* flags                */
+}
+mysql_declare_plugin_end;
+
+#ifdef WIN32
+#define PLUGIN_EXPORT extern "C" __declspec(dllexport)
+#else
+#define PLUGIN_EXPORT extern "C"
+#endif
+
+
+/**
+  Initialization function for @ref test_udf_services_udf
+
+  Must be present otherwise the server refuses to load
+
+  @param      initrd    Return value from xxxx_init
+  @param      args      Array of arguments
+  @param[out] message   Error message in case of error.
+  @retval     FALSE     success
+  @retval     TRUE      Failure. Error in the message argument
+*/
+PLUGIN_EXPORT my_bool
+test_udf_services_udf_init(UDF_INIT *initid MY_ATTRIBUTE((unused)),
+                           UDF_ARGS *args MY_ATTRIBUTE((unused)),
+                           char *message MY_ATTRIBUTE((unused)))
+{
+  return FALSE;
+}
+
+
+/**
+  A UDF function returning 0.
+
+  @param      initrd    Return value from xxxx_init
+  @param      args      Array of arguments
+  @param[out] is_null   If the result is null, store 1 here
+  @param[out] error     On error store 1 here
+*/
+PLUGIN_EXPORT longlong
+test_udf_services_udf(UDF_INIT *initid MY_ATTRIBUTE((unused)),
+                      UDF_ARGS *args MY_ATTRIBUTE((unused)),
+                      char *is_null MY_ATTRIBUTE((unused)),
+                      char *error MY_ATTRIBUTE((unused)))
+{
+  char buffer[10];
+  *is_null= 0;
+  *error= 0;
+  /* use a plugin service function */
+  my_snprintf(buffer, sizeof(buffer), "test");
+  return 0;
+}
index 727082871aba2d3dfddd1abfaceeef2d2d54090d..5fe6c538e46e4dd7614ab248c9bb8cf6fb3a6c3f 100644 (file)
@@ -3,7 +3,7 @@
 
    This file was modified by Oracle on 2015-05-18 for 32-bit compatibility.
 
-   Modifications copyright (c) 2015, Oracle and/or its affiliates. All rights
+   Modifications copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights
    reserved. */
 
 #include <my_global.h>
@@ -1258,8 +1258,8 @@ register char *cp;
  */
 static void
 mcinvert(p, cs)
-  register struct parse *p __attribute__((unused));
-  register cset *cs __attribute__((unused));
+  register struct parse *p MY_ATTRIBUTE((unused));
+  register cset *cs MY_ATTRIBUTE((unused));
 {
        assert(cs->multis == NULL);     /* xxx */
 }
@@ -1273,8 +1273,8 @@ mcinvert(p, cs)
  */
 static void
 mccase(p, cs)
-register struct parse *p __attribute__((unused));
-register cset *cs __attribute__((unused));
+register struct parse *p MY_ATTRIBUTE((unused));
+register cset *cs MY_ATTRIBUTE((unused));
 {
        assert(cs->multis == NULL);     /* xxx */
 }
index bd2a53c01e3342a0aae4c1971426f3ff85cd56c7..abae74eba9c26d4a08cd371ab070861bcd116b74 100644 (file)
@@ -159,10 +159,18 @@ char *argv[];
 
        if (argc > 4)
                for (n = atoi(argv[3]); n > 0; n--) {
+                        if(sizeof(buf)-1 < strlen(argv[1]))
+                        {
+                          exit(EXIT_FAILURE);
+                        }
                        (void) strcpy(buf, argv[1]);
                }
        else if (argc > 3)
                for (n = atoi(argv[3]); n > 0; n--) {
+                        if(sizeof(buf)-1 < strlen(argv[1]))
+                        {
+                          exit(EXIT_FAILURE);
+                        }
                        (void) strcpy(buf, argv[1]);
                        (void) split(buf, fields, MNF, argv[2]);
                }
index 265f81f2755aca7d4dd1ce00f818a2ca136d7a70..37c34e60813c5cbb40ec80b77888675a2f8c254d 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2006, 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
@@ -125,7 +125,13 @@ STRING(REPLACE       "-grecord-gcc-switches"         "" CXXFLAGS "${CXXFLAGS}")
 STRING(REPLACE       "-pipe"                         "" CXXFLAGS "${CXXFLAGS}")
 
 IF(UNIX)
-  # FIND_PROC and CHECK_PID are used by mysqld_safe
+  # SHELL_PATH, FIND_PROC, CHECK_PID are used by mysqld_safe
+IF(CMAKE_SYSTEM_NAME MATCHES "SunOS")
+  SET (SHELL_PATH "/bin/bash")
+ELSE()
+  SET (SHELL_PATH "/bin/sh")
+ENDIF()
+
 IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
   SET (FIND_PROC 
     "ps wwwp $PID | grep -v mysqld_safe | grep -- $MYSQLD > /dev/null")
index 528db4b9f8b1bbaa2d71e06ef86ffc97fdd20461..e6a6f0220fac2408be4b2c2dd40201ea93e69d5f 100644 (file)
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 
-# Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2000, 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 Library General Public
@@ -687,7 +687,11 @@ sub my_which
   my ($command) = @_;
   my (@paths, $path);
 
-  return $command if (-f $command && -x $command);
+ # If the argument is not 'my_print_defaults' then it would be of the format
+ # <absolute_path>/<program>
+ return $command if ($command ne 'my_print_defaults' && -f $command &&
+                     -x $command);
+
   @paths = split(':', $ENV{'PATH'});
   foreach $path (@paths)
   {
index c975843fbbea983dff64045d2b2ff4f40fcf5b48..eb408b34d9d3861d276d754fa1ab033a82cbf2bf 100644 (file)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!@SHELL_PATH@
 # Copyright Abandoned 1996 TCX DataKonsult AB & Monty Program KB & Detron HB
 # This file is public domain and comes with NO WARRANTY of any kind
 #
@@ -126,7 +126,13 @@ log_generic () {
   echo "$msg"
   case $logging in
     init) ;;  # Just echo the message, don't save it anywhere
-    file) echo "$msg" >> "$err_log" ;;
+    file)
+      if [ -w / -o "$USER" = "root" ]; then
+        true
+      else
+        echo "$msg" >> "$err_log"
+      fi
+      ;;
     syslog) logger -t "$syslog_tag_mysqld_safe" -p "$priority" "$*" ;;
     *)
       echo "Internal program error (non-fatal):" \
@@ -146,7 +152,13 @@ log_notice () {
 eval_log_error () {
   local cmd="$1"
   case $logging in
-    file) cmd="$cmd >> "`shell_quote_string "$err_log"`" 2>&1" ;;
+    file)
+      if [ -w / -o "$USER" = "root" ]; then
+        cmd="$cmd > /dev/null 2>&1"
+      else
+        cmd="$cmd >> "`shell_quote_string "$err_log"`" 2>&1"
+      fi
+      ;;
     syslog)
       # mysqld often prefixes its messages with a timestamp, which is
       # redundant when logging to syslog (which adds its own timestamp)
@@ -279,10 +291,25 @@ parse_arguments() {
 
       # mysqld_safe-specific options - must be set in my.cnf ([mysqld_safe])!
       --core-file-size=*) core_file_size="$val" ;;
-      --ledir=*) ledir="$val" ;;
+      --ledir=*)
+        if [ -z "$pick_args" ]; then
+          log_error "--ledir option can only be used as command line option, found in config file"
+          exit 1
+        fi
+        ledir="$val"
+        ;;
       --malloc-lib=*) set_malloc_lib "$val" ;;
-      --mysqld=*) MYSQLD="$val" ;;
+      --mysqld=*)
+        if [ -z "$pick_args" ]; then
+          log_error "--mysqld option can only be used as command line option, found in config file"
+          exit 1
+        fi
+        MYSQLD="$val" ;;
       --mysqld-version=*)
+        if [ -z "$pick_args" ]; then
+          log_error "--mysqld-version option can only be used as command line option, found in config file"
+          exit 1
+        fi
         if test -n "$val"
         then
           MYSQLD="mysqld-$val"
@@ -376,38 +403,22 @@ mysqld_ld_preload_text() {
   echo "$text"
 }
 
-
-mysql_config=
-get_mysql_config() {
-  if [ -z "$mysql_config" ]; then
-    mysql_config=`echo "$0" | sed 's,/[^/][^/]*$,/mysql_config,'`
-    if [ ! -x "$mysql_config" ]; then
-      log_error "Can not run mysql_config $@ from '$mysql_config'"
-      exit 1
-    fi
-  fi
-
-  "$mysql_config" "$@"
-}
-
-
 # set_malloc_lib LIB
 # - If LIB is empty, do nothing and return
-# - If LIB is 'tcmalloc', look for tcmalloc shared library in /usr/lib
-#   then pkglibdir.  tcmalloc is part of the Google perftools project.
+# - If LIB is 'tcmalloc', look for tcmalloc shared library in $malloc_dirs.
+#   tcmalloc is part of the Google perftools project.
 # - If LIB is an absolute path, assume it is a malloc shared library
 #
 # Put LIB in mysqld_ld_preload, which will be added to LD_PRELOAD when
 # running mysqld.  See ld.so for details.
 set_malloc_lib() {
+  # This list is kept intentionally simple.
+  malloc_dirs="/usr/lib /usr/lib64 /usr/lib/i386-linux-gnu /usr/lib/x86_64-linux-gnu"
   malloc_lib="$1"
 
   if [ "$malloc_lib" = tcmalloc ]; then
-    pkglibdir=`get_mysql_config --variable=pkglibdir`
     malloc_lib=
-    # This list is kept intentionally simple.  Simply set --malloc-lib
-    # to a full path if another location is desired.
-    for libdir in /usr/lib "$pkglibdir" "$pkglibdir/mysql"; do
+    for libdir in `echo $malloc_dirs`; do
       for flavor in _minimal '' _and_profiler _debug; do
         tmp="$libdir/libtcmalloc$flavor.so"
         #log_notice "DEBUG: Checking for malloc lib '$tmp'"
@@ -418,7 +429,7 @@ set_malloc_lib() {
     done
 
     if [ -z "$malloc_lib" ]; then
-      log_error "no shared library for --malloc-lib=tcmalloc found in /usr/lib or $pkglibdir"
+      log_error "no shared library for --malloc-lib=tcmalloc found in $malloc_dirs"
       exit 1
     fi
   fi
@@ -429,9 +440,21 @@ set_malloc_lib() {
   case "$malloc_lib" in
     /*)
       if [ ! -r "$malloc_lib" ]; then
-        log_error "--malloc-lib '$malloc_lib' can not be read and will not be used"
+        log_error "--malloc-lib can not be read and will not be used"
         exit 1
       fi
+
+      # Restrict to a the list in $malloc_dirs above
+      case "`dirname "$malloc_lib"`" in
+        /usr/lib) ;;
+        /usr/lib64) ;;
+        /usr/lib/i386-linux-gnu) ;;
+        /usr/lib/x86_64-linux-gnu) ;;
+        *)
+          log_error "--malloc-lib must be located in one of the directories: $malloc_dirs"
+          exit 1
+          ;;
+      esac
       ;;
     *)
       log_error "--malloc-lib must be an absolute path or 'tcmalloc'; " \
@@ -456,7 +479,15 @@ else
   relpkgdata='@pkgdatadir@'
 fi
 
-MY_PWD=`pwd`
+case "$0" in
+  /*)
+  MY_PWD='@prefix@'
+  ;;
+  *)
+  MY_PWD=`dirname $0`
+  MY_PWD=`dirname $MY_PWD`
+  ;;
+esac
 # Check for the directories we would expect from a binary release install
 if test -n "$MY_BASEDIR_VERSION" -a -d "$MY_BASEDIR_VERSION"
 then
@@ -644,14 +675,7 @@ then
   fi
 
   # Log to err_log file
-  log_notice "Logging to '$err_log'."
   logging=file
-
-  if [ ! -f "$err_log" ]; then                  # if error log already exists,
-    touch "$err_log"                            # we just append. otherwise,
-    chmod "$fmode" "$err_log"                   # fix the permissions here!
-  fi
-
 else
   if [ -n "$syslog_tag" ]
   then
@@ -664,6 +688,48 @@ else
   logging=syslog
 fi
 
+logdir=`dirname "$err_log"`
+# Change the err log to the right user, if possible and it is in use
+if [ $logging = "file" -o $logging = "both" ]; then
+  if [ ! -f "$err_log" -a ! -h "$err_log" ]; then
+    if test -w / -o "$USER" = "root"; then
+      case $logdir in
+        /var/log)
+          (
+            umask 0137
+            set -o noclobber
+            > "$err_log" && chown $user "$err_log"
+          ) ;;
+        *) ;;
+      esac
+    else
+      (
+        umask 0137
+        set -o noclobber
+        > "$err_log"
+      )
+    fi
+  fi
+
+  if [ -f "$err_log" ]; then        # Log to err_log file
+    log_notice "Logging to '$err_log'."
+  elif [ "x$user" = "xroot" ]; then # running as root, mysqld can create log file; continue
+    echo "Logging to '$err_log'." >&2
+  else
+    case $logdir in
+      # We can't create $err_log, however mysqld can; continue
+      /tmp|/var/tmp|/var/log/mysql|$DATADIR)
+        echo "Logging to '$err_log'." >&2
+        ;;
+      # We can't create $err_log and don't know if mysqld can; error out
+      *)
+        log_error "error: log-error set to '$err_log', however file don't exists. Create writable for user '$user'."
+        exit 1
+        ;;
+    esac
+  fi
+fi
+
 USER_OPTION=""
 if test -w / -o "$USER" = "root"
 then
@@ -671,11 +737,6 @@ then
   then
     USER_OPTION="--user=$user"
   fi
-  # Change the err log to the right user, if it is in use
-  if [ $want_syslog -eq 0 ]; then
-    touch "$err_log"
-    chown $user "$err_log"
-  fi
   if test -n "$open_files"
   then
     ulimit -n $open_files
@@ -688,13 +749,12 @@ then
 fi
 
 safe_mysql_unix_port=${mysql_unix_port:-${MYSQL_UNIX_PORT:-@MYSQL_UNIX_ADDR@}}
-# Make sure that directory for $safe_mysql_unix_port exists
+# Check that directory for $safe_mysql_unix_port exists
 mysql_unix_port_dir=`dirname $safe_mysql_unix_port`
 if [ ! -d $mysql_unix_port_dir ]
 then
-  mkdir $mysql_unix_port_dir
-  chown $user $mysql_unix_port_dir
-  chmod 755 $mysql_unix_port_dir
+  log_error "Directory '$mysql_unix_port_dir' for UNIX socket file don't exists."
+  exit 1
 fi
 
 # If the user doesn't specify a binary, we assume name "mysqld"
@@ -806,7 +866,9 @@ then
       exit 1
     fi
   fi
-  rm -f "$pid_file"
+  if [ ! -h "$pid_file" ]; then
+      rm -f "$pid_file"
+  fi
   if test -f "$pid_file"
   then
     log_error "Fatal error: Can't remove the pid file:
@@ -861,7 +923,13 @@ max_wsrep_restarts=0
 
 while true
 do
-  rm -f $safe_mysql_unix_port "$pid_file"      # Some extra safety
+  # Some extra safety
+  if [ ! -h "$safe_mysql_unix_port" ]; then
+    rm -f "$safe_mysql_unix_port"
+  fi
+  if [ ! -h "$pid_file" ]; then
+    rm -f "$pid_file"
+  fi
 
   start_time=`date +%M%S`
 
@@ -879,11 +947,31 @@ do
     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
-    chown $user "$err_log"              # flushed yet. we'd recreate it with
-    chmod "$fmode" "$err_log"           # wrong owner next time we log, so set
-  fi                                    # it up correctly while we can!
+  # hypothetical: log was renamed but not
+  # flushed yet. we'd recreate it with
+  # wrong owner next time we log, so set
+  # it up correctly while we can!
+
+  if [ $want_syslog -eq 0 -a ! -f "$err_log" -a ! -h "$err_log" ]; then
+    if test -w / -o "$USER" = "root"; then
+      logdir=`dirname "$err_log"`
+      case $logdir in
+        /var/log)
+          (
+            umask 0137
+            set -o noclobber
+            > "$err_log" && chown $user "$err_log"
+          ) ;;
+        *) ;;
+      esac
+    else
+      (
+        umask 0137
+        set -o noclobber
+        > "$err_log"
+      )
+    fi
+  fi
 
   end_time=`date +%M%S`
 
index 4f5f85f0de95ef13c3bd24a1f1a731cbfdde9e37..cd3c2e0292d31b86d818f560a75ff684c3178650 100644 (file)
@@ -1128,6 +1128,22 @@ static int add_init_command(struct st_mysql_options *options, const char *cmd)
     } while(0)
 #endif
 
+static char *set_ssl_option_unpack_path(struct st_mysql_options *options,
+                                        const char *arg)
+{
+  char *opt_var= NULL;
+  if (arg)
+  {
+    char *buff= (char *)my_malloc(FN_REFLEN + 1, MYF(MY_WME));
+    unpack_filename(buff, (char *)arg);
+    opt_var= my_strdup(buff, MYF(MY_WME));
+    options->use_ssl= 1;
+    my_free(buff);
+  }
+  return opt_var;
+}
+
+
 void mysql_read_default_options(struct st_mysql_options *options,
                                const char *filename,const char *group)
 {
@@ -1725,12 +1741,12 @@ mysql_init(MYSQL *mysql)
 #define strdup_if_not_null(A) (A) == 0 ? 0 : my_strdup((A),MYF(MY_WME))
 
 my_bool STDCALL
-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)))
+mysql_ssl_set(MYSQL *mysql MY_ATTRIBUTE((unused)) ,
+             const char *key MY_ATTRIBUTE((unused)),
+             const char *cert MY_ATTRIBUTE((unused)),
+             const char *ca MY_ATTRIBUTE((unused)),
+             const char *capath MY_ATTRIBUTE((unused)),
+             const char *cipher MY_ATTRIBUTE((unused)))
 {
   my_bool result= 0;
   DBUG_ENTER("mysql_ssl_set");
@@ -1755,7 +1771,7 @@ mysql_ssl_set(MYSQL *mysql __attribute__((unused)) ,
 #if defined(HAVE_OPENSSL) && !defined(EMBEDDED_LIBRARY)
 
 static void
-mysql_ssl_free(MYSQL *mysql __attribute__((unused)))
+mysql_ssl_free(MYSQL *mysql MY_ATTRIBUTE((unused)))
 {
   struct st_VioSSLFd *ssl_fd= (struct st_VioSSLFd*) mysql->connector_fd;
   DBUG_ENTER("mysql_ssl_free");
@@ -1801,7 +1817,7 @@ mysql_ssl_free(MYSQL *mysql __attribute__((unused)))
 */
 
 const char * STDCALL
-mysql_get_ssl_cipher(MYSQL *mysql __attribute__((unused)))
+mysql_get_ssl_cipher(MYSQL *mysql MY_ATTRIBUTE((unused)))
 {
   DBUG_ENTER("mysql_get_ssl_cipher");
 #if defined(HAVE_OPENSSL) && !defined(EMBEDDED_LIBRARY)
@@ -4069,8 +4085,8 @@ static void mysql_prune_stmt_list(MYSQL *mysql)
     should also be reflected there.
 */
 
-void mysql_detach_stmt_list(LIST **stmt_list __attribute__((unused)),
-                            const char *func_name __attribute__((unused)))
+void mysql_detach_stmt_list(LIST **stmt_list MY_ATTRIBUTE((unused)),
+                            const char *func_name MY_ATTRIBUTE((unused)))
 {
 #ifdef MYSQL_CLIENT
   /* Reset connection handle in all prepared statements. */
@@ -4480,17 +4496,43 @@ mysql_options(MYSQL *mysql,enum mysql_option option, const void *arg)
   case MYSQL_DEFAULT_AUTH:
     EXTENSION_SET_STRING(&mysql->options, default_auth, arg);
     break;
-  case MYSQL_OPT_SSL_KEY:      SET_SSL_OPTION(ssl_key, arg);     break;
-  case MYSQL_OPT_SSL_CERT:     SET_SSL_OPTION(ssl_cert, arg);    break;
-  case MYSQL_OPT_SSL_CA:       SET_SSL_OPTION(ssl_ca, arg);      break;
-  case MYSQL_OPT_SSL_CAPATH:   SET_SSL_OPTION(ssl_capath, arg);  break;
+  case MYSQL_OPT_SSL_KEY:
+    if (mysql->options.ssl_key)
+      my_free(mysql->options.ssl_key);
+    mysql->options.ssl_key= set_ssl_option_unpack_path(&mysql->options, arg);
+    break;
+  case MYSQL_OPT_SSL_CERT:
+    if (mysql->options.ssl_cert)
+      my_free(mysql->options.ssl_cert);
+    mysql->options.ssl_cert= set_ssl_option_unpack_path(&mysql->options, arg);
+    break;
+  case MYSQL_OPT_SSL_CA:
+    if (mysql->options.ssl_ca)
+      my_free(mysql->options.ssl_ca);
+    mysql->options.ssl_ca= set_ssl_option_unpack_path(&mysql->options, arg);
+    break;
+  case MYSQL_OPT_SSL_CAPATH:
+    if (mysql->options.ssl_capath)
+      my_free(mysql->options.ssl_capath);
+    mysql->options.ssl_capath= set_ssl_option_unpack_path(&mysql->options, arg);
+    break;
   case MYSQL_OPT_SSL_CIPHER:   SET_SSL_OPTION(ssl_cipher, arg);  break;
-  case MYSQL_OPT_SSL_CRL:      EXTENSION_SET_SSL_STRING(&mysql->options,
-                                                        ssl_crl, arg);
-                               break;
-  case MYSQL_OPT_SSL_CRLPATH:  EXTENSION_SET_SSL_STRING(&mysql->options,
-                                                        ssl_crlpath, arg);
-                               break;
+  case MYSQL_OPT_SSL_CRL:
+    if (mysql->options.extension)
+      my_free(mysql->options.extension->ssl_crl);
+    else
+      ALLOCATE_EXTENSIONS(&mysql->options);
+    mysql->options.extension->ssl_crl=
+                   set_ssl_option_unpack_path(&mysql->options, arg);
+    break;
+  case MYSQL_OPT_SSL_CRLPATH:
+    if (mysql->options.extension)
+      my_free(mysql->options.extension->ssl_crlpath);
+    else
+      ALLOCATE_EXTENSIONS(&mysql->options);
+    mysql->options.extension->ssl_crlpath=
+                   set_ssl_option_unpack_path(&mysql->options, arg);
+    break;
   case MYSQL_SERVER_PUBLIC_KEY:
     EXTENSION_SET_STRING(&mysql->options, server_public_key_path, arg);
     break;
@@ -4556,7 +4598,7 @@ mysql_options(MYSQL *mysql,enum mysql_option option, const void *arg)
 */
 uchar *
 get_attr_key(LEX_STRING *part, size_t *length,
-             my_bool not_used __attribute__((unused)))
+             my_bool not_used MY_ATTRIBUTE((unused)))
 {
   *length= part[0].length;
   return (uchar *) part[0].str;
@@ -4917,3 +4959,138 @@ static int clear_password_auth_client(MYSQL_PLUGIN_VIO *vio, MYSQL *mysql)
 
   return res ? CR_ERROR : CR_OK;
 }
+
+#if defined(EXPORT_SYMVER16)
+#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
+#endif  /* EXPORT_SYMVER16 */
index ddc24bbec3dd9df12664f094cb74dd65a9bf6a8a..bf04d0d4bd7caa1fa4f736fffd62c61a583e6311 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2004, 2014, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2004, 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
@@ -64,8 +64,8 @@ uint calc_days_in_year(uint year)
    @param tm[OUT]    The value to set.
    @param time_type  Timestasmp type
 */
-inline void set_zero_time(MYSQL_TIME *tm,
-                          enum enum_mysql_timestamp_type time_type)
+void set_zero_time(MYSQL_TIME *tm,
+                   enum enum_mysql_timestamp_type time_type)
 {
   memset(tm, 0, sizeof(*tm));
   tm->time_type= time_type;
@@ -76,7 +76,7 @@ inline void set_zero_time(MYSQL_TIME *tm,
   Set hour, minute and second of a MYSQL_TIME variable to maximum time value.
   Unlike set_max_time(), does not touch the other structure members.
 */
-inline void set_max_hhmmss(MYSQL_TIME *tm)
+void set_max_hhmmss(MYSQL_TIME *tm)
 {
   tm->hour= TIME_MAX_HOUR;
   tm->minute= TIME_MAX_MINUTE;
@@ -152,7 +152,7 @@ my_bool check_date(const MYSQL_TIME *ltime, my_bool not_zero_date,
   @retval  TRUE   if the value is fatally bad.
   @retval  FALSE  if the value is Ok.
 */
-inline my_bool check_time_mmssff_range(const MYSQL_TIME *ltime)
+my_bool check_time_mmssff_range(const MYSQL_TIME *ltime)
 {
   return ltime->minute >= 60 || ltime->second >= 60 ||
          ltime->second_part > 999999;
@@ -171,7 +171,7 @@ inline my_bool check_time_mmssff_range(const MYSQL_TIME *ltime)
   @retval        FALSE if value is Ok.
   @retval        TRUE if value is out of range. 
 */
-inline my_bool check_time_range_quick(const MYSQL_TIME *ltime)
+my_bool check_time_range_quick(const MYSQL_TIME *ltime)
 {
   longlong hour= (longlong) ltime->hour + 24LL * ltime->day;
   /* The input value should not be fatally bad */
index 1e0fa53c63930630e481c3cce2b44552054005f9..9be49498ab64034dd4f468f81af29abb7ce803dc 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2009, 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
@@ -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 (WSREP_ON && thd->slave_thread) thd->wsrep_replicate_GTID= true;
+#endif /* WITH_WSREP */
   ret= mysql_bin_log.commit(thd, true);
 
 err:
@@ -1410,7 +1413,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 +1610,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;
 
@@ -2045,17 +2058,16 @@ trans_has_updated_trans_table(const THD* thd)
   This function checks if a transactional table was updated by the
   current statement.
 
-  @param thd The client thread that executed the current statement.
+  @param ha_list Registered storage engine handler list.
   @return
     @c true if a transactional table was updated, @c false otherwise.
 */
 bool
-stmt_has_updated_trans_table(const THD *thd)
+stmt_has_updated_trans_table(Ha_trx_info* ha_list)
 {
   Ha_trx_info *ha_info;
 
-  for (ha_info= thd->transaction.stmt.ha_list; ha_info;
-       ha_info= ha_info->next())
+  for (ha_info= ha_list; ha_info; ha_info= ha_info->next())
   {
     if (ha_info->is_trx_read_write() && ha_info->ht() != binlog_hton)
       return (TRUE);
@@ -3479,23 +3491,48 @@ int MYSQL_BIN_LOG::move_crash_safe_index_file_to_index_file(bool need_lock_index
     if (mysql_file_close(index_file.file, MYF(0)) < 0)
     {
       error= -1;
-      sql_print_error("MYSQL_BIN_LOG::move_crash_safe_index_file_to_index_file "
-                      "failed to close the index file.");
-      goto err;
+      sql_print_error("While rebuilding index file %s: "
+                      "Failed to close the index file.", index_file_name);
+      /*
+        Delete Crash safe index file here and recover the binlog.index
+        state(index_file io_cache) from old binlog.index content.
+       */
+      mysql_file_delete(key_file_binlog_index, crash_safe_index_file_name,
+                        MYF(0));
+
+      goto recoverable_err;
+    }
+    if (DBUG_EVALUATE_IF("force_index_file_delete_failure", 1, 0) ||
+        mysql_file_delete(key_file_binlog_index, index_file_name, MYF(MY_WME)))
+    {
+      error= -1;
+      sql_print_error("While rebuilding index file %s: "
+                      "Failed to delete the existing index file. It could be "
+                      "that file is being used by some other process.",
+                      index_file_name);
+      /*
+        Delete Crash safe file index file here and recover the binlog.index
+        state(index_file io_cache) from old binlog.index content.
+       */
+      mysql_file_delete(key_file_binlog_index, crash_safe_index_file_name,
+                        MYF(0));
+
+      goto recoverable_err;
     }
-    mysql_file_delete(key_file_binlog_index, index_file_name, MYF(MY_WME));
   }
 
   DBUG_EXECUTE_IF("crash_create_before_rename_index_file", DBUG_SUICIDE(););
   if (my_rename(crash_safe_index_file_name, index_file_name, MYF(MY_WME)))
   {
     error= -1;
-    sql_print_error("MYSQL_BIN_LOG::move_crash_safe_index_file_to_index_file "
-                    "failed to move crash_safe_index_file to index file.");
-    goto err;
+    sql_print_error("While rebuilding index file %s: "
+                    "Failed to rename the new index file to the existing "
+                    "index file.", index_file_name);
+    goto fatal_err;
   }
   DBUG_EXECUTE_IF("crash_create_after_rename_index_file", DBUG_SUICIDE(););
 
+recoverable_err:
   if ((fd= mysql_file_open(key_file_binlog_index,
                            index_file_name,
                            O_RDWR | O_CREAT | O_BINARY,
@@ -3505,16 +3542,32 @@ int MYSQL_BIN_LOG::move_crash_safe_index_file_to_index_file(bool need_lock_index
                          mysql_file_seek(fd, 0L, MY_SEEK_END, MYF(0)),
                                          0, MYF(MY_WME | MY_WAIT_IF_FULL)))
   {
-    error= -1;
-    sql_print_error("MYSQL_BIN_LOG::move_crash_safe_index_file_to_index_file "
-                    "failed to open the index file.");
-    goto err;
+    sql_print_error("After rebuilding the index file %s: "
+                    "Failed to open the index file.", index_file_name);
+    goto fatal_err;
   }
 
-err:
   if (need_lock_index)
     mysql_mutex_unlock(&LOCK_index);
   DBUG_RETURN(error);
+
+fatal_err:
+  /*
+    This situation is very very rare to happen (unless there is some serious
+    memory related issues like OOM) and should be treated as fatal error.
+    Hence it is better to bring down the server without respecting
+    'binlog_error_action' value here.
+  */
+  exec_binlog_error_action_abort("MySQL server failed to update the "
+                                 "binlog.index file's content properly. "
+                                 "It might not be in sync with available "
+                                 "binlogs and the binlog.index file state is in "
+                                 "unrecoverable state. Aborting the server.");
+  /*
+    Server is aborted in the above function.
+    This is dead code to make compiler happy.
+   */
+  DBUG_RETURN(error);
 }
 
 
@@ -4417,7 +4470,7 @@ err:
 
   int error_index= 0, close_error_index= 0;
   /* Read each entry from purge_index_file and delete the file. */
-  if (is_inited_purge_index_file() &&
+  if (!error && is_inited_purge_index_file() &&
       (error_index= purge_index_entry(thd, decrease_log_space, false/*need_lock_index=false*/)))
     sql_print_error("MYSQL_BIN_LOG::purge_logs failed to process registered files"
                     " that would be purged.");
@@ -5529,7 +5582,8 @@ int MYSQL_BIN_LOG::rotate(bool force_rotate, bool* check_purge)
 
   *check_purge= false;
 
-  if (force_rotate || (my_b_tell(&log_file) >= (my_off_t) max_size))
+  if (DBUG_EVALUATE_IF("force_rotate", 1, 0) || force_rotate ||
+      (my_b_tell(&log_file) >= (my_off_t) max_size))
   {
     error= new_file_without_locking(NULL);
     *check_purge= true;
@@ -6584,6 +6638,14 @@ TC_LOG::enum_result MYSQL_BIN_LOG::commit(THD *thd, bool all)
   */
   if (stuff_logged)
   {
+#ifdef WITH_WSREP
+    if (WSREP_ON && thd->wsrep_replicate_GTID &&
+        wsrep_replicate_GTID(thd))
+    {
+      /* GTID replication failed */
+      DBUG_RETURN(RESULT_ABORTED);
+    }
+#endif /* WITH_WSREP */
     if (ordered_commit(thd, all))
       DBUG_RETURN(RESULT_INCONSISTENT);
   }
@@ -7353,7 +7415,8 @@ commit_stage:
     If we need to rotate, we do it without commit error.
     Otherwise the thd->commit_error will be possibly reset.
    */
-  if (do_rotate && thd->commit_error == THD::CE_NONE)
+  if (DBUG_EVALUATE_IF("force_rotate", 1, 0) ||
+      (do_rotate && thd->commit_error == THD::CE_NONE))
   {
     /*
       Do not force the rotate as several consecutive groups may
@@ -7735,7 +7798,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 */
@@ -8000,6 +8063,26 @@ has_write_table_auto_increment_not_first_in_pk(TABLE_LIST *tables)
   return 0;
 }
 
+#ifndef DBUG_OFF
+const char * get_locked_tables_mode_name(enum_locked_tables_mode locked_tables_mode)
+{
+   switch (locked_tables_mode)
+   {
+   case LTM_NONE:
+     return "LTM_NONE";
+   case LTM_LOCK_TABLES:
+     return "LTM_LOCK_TABLES";
+   case LTM_PRELOCKED:
+     return "LTM_PRELOCKED";
+   case LTM_PRELOCKED_UNDER_LOCK_TABLES:
+     return "LTM_PRELOCKED_UNDER_LOCK_TABLES";
+   default:
+     return "Unknown table lock mode";
+   }
+}
+#endif
+
+
 /**
   Decide on logging format to use for the statement and issue errors
   or warnings as needed.  The decision depends on the following
@@ -8115,10 +8198,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 &&
@@ -8195,13 +8278,8 @@ int THD::decide_logging_format(TABLE_LIST *tables)
     uint non_replicated_tables_count= 0;
 #ifndef DBUG_OFF
     {
-      static const char *prelocked_mode_name[] = {
-        "NON_PRELOCKED",
-        "PRELOCKED",
-        "PRELOCKED_UNDER_LOCK_TABLES",
-      };
       DBUG_PRINT("debug", ("prelocked_mode: %s",
-                           prelocked_mode_name[locked_tables_mode]));
+                           get_locked_tables_mode_name(locked_tables_mode)));
     }
 #endif
 
@@ -8460,7 +8538,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), "");
@@ -8739,7 +8817,7 @@ template <class RowsEventT> Rows_log_event*
 THD::binlog_prepare_pending_rows_event(TABLE* table, uint32 serv_id,
                                        size_t needed,
                                        bool is_transactional,
-                                      RowsEventT *hint __attribute__((unused)),
+                                      RowsEventT *hint MY_ATTRIBUTE((unused)),
                                        const uchar* extra_row_info)
 {
   DBUG_ENTER("binlog_prepare_pending_rows_event");
@@ -8925,7 +9003,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 */
@@ -8960,7 +9038,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 */
@@ -9032,7 +9110,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 */
@@ -9155,7 +9233,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 */
@@ -9428,8 +9506,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 */
index 4ed6db27214b5a2d7d0f3db0873c781a100b1ef6..3251a4a35af7e7db4644e71b50b864bd74a78f94 100644 (file)
@@ -1,5 +1,5 @@
 #ifndef BINLOG_H_INCLUDED
-/* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2010, 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
@@ -86,7 +86,7 @@ public:
 
     /** Lock for protecting the queue. */
     mysql_mutex_t m_lock;
-  } __attribute__((aligned(CPU_LEVEL1_DCACHE_LINESIZE)));
+  } MY_ATTRIBUTE((aligned(CPU_LEVEL1_DCACHE_LINESIZE)));
 
 public:
   Stage_manager()
@@ -690,7 +690,7 @@ typedef struct st_load_file_info
 extern MYSQL_PLUGIN_IMPORT MYSQL_BIN_LOG mysql_bin_log;
 
 bool trans_has_updated_trans_table(const THD* thd);
-bool stmt_has_updated_trans_table(const THD *thd);
+bool stmt_has_updated_trans_table(Ha_trx_info* ha_list);
 bool ending_trans(THD* thd, const bool all);
 bool ending_single_stmt_trans(THD* thd, const bool all);
 bool trans_cannot_safely_rollback(const THD* thd);
index 301beb51594821887fb8f6d89e285eb632ee4439..2b06f8501662cd4c634a507a45a9302083e25f22 100644 (file)
@@ -1,5 +1,5 @@
 /*
-   Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
+   Copyright (c) 2000, 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
@@ -1164,12 +1164,15 @@ void Field_num::prepend_zeros(String *value)
   int diff;
   if ((diff= (int) (field_length - value->length())) > 0)
   {
-    bmove_upp((uchar*) value->ptr()+field_length,
-              (uchar*) value->ptr()+value->length(),
-             value->length());
-    memset(const_cast<char*>(value->ptr()), '0', diff);
-    value->length(field_length);
-    (void) value->c_ptr_quick();               // Avoid warnings in purify
+   const bool error= value->realloc(field_length);
+   if (!error)
+   {
+     bmove_upp((uchar*) value->ptr()+field_length,
+               (uchar*) value->ptr()+value->length(),
+              value->length());
+     memset(const_cast<char*>(value->ptr()), '0', diff);
+     value->length(field_length);
+   }
   }
 }
 
@@ -1290,7 +1293,7 @@ out_of_range:
 */
 type_conversion_status
 Field_num::store_time(MYSQL_TIME *ltime,
-                      uint8 dec_arg __attribute__((unused)))
+                      uint8 dec_arg MY_ATTRIBUTE((unused)))
 {
   longlong nr= TIME_to_ulonglong_round(ltime);
   return store(ltime->neg ? -nr : nr, 0);
@@ -1444,8 +1447,8 @@ bool Field::send_binary(Protocol *protocol)
    master's field size, @c false otherwise.
 */
 bool Field::compatible_field_size(uint field_metadata,
-                                  Relay_log_info *rli_arg __attribute__((unused)),
-                                  uint16 mflags __attribute__((unused)),
+                                  Relay_log_info *rli_arg MY_ATTRIBUTE((unused)),
+                                  uint16 mflags MY_ATTRIBUTE((unused)),
                                   int *order_var)
 {
   uint const source_size= pack_length_from_metadata(field_metadata);
@@ -1508,7 +1511,7 @@ Field::store(const char *to, uint length, const CHARSET_INFO *cs,
 */
 uchar *
 Field::pack(uchar *to, const uchar *from, uint max_length,
-            bool low_byte_first __attribute__((unused)))
+            bool low_byte_first MY_ATTRIBUTE((unused)))
 {
   uint32 length= pack_length();
   set_if_smaller(length, max_length);
@@ -1548,7 +1551,7 @@ Field::pack(uchar *to, const uchar *from, uint max_length,
 */
 const uchar *
 Field::unpack(uchar* to, const uchar *from, uint param_data,
-              bool low_byte_first __attribute__((unused)))
+              bool low_byte_first MY_ATTRIBUTE((unused)))
 {
   uint length=pack_length();
   int from_type= 0;
@@ -1860,7 +1863,7 @@ bool Field::optimize_range(uint idx, uint part)
 
 
 Field *Field::new_field(MEM_ROOT *root, TABLE *new_table,
-                        bool keep_type __attribute__((unused)))
+                        bool keep_type MY_ATTRIBUTE((unused)))
 {
   Field *tmp= clone(root);
   if (tmp == NULL)
@@ -2435,7 +2438,7 @@ longlong Field_decimal::val_int(void)
 }
 
 
-String *Field_decimal::val_str(String *val_buffer __attribute__((unused)),
+String *Field_decimal::val_str(String *val_buffer MY_ATTRIBUTE((unused)),
                               String *val_ptr)
 {
   ASSERT_COLUMN_MARKED_FOR_READ;
@@ -2806,7 +2809,7 @@ Field_new_decimal::store_decimal(const my_decimal *decimal_value)
 
 type_conversion_status
 Field_new_decimal::store_time(MYSQL_TIME *ltime,
-                                  uint8 dec_arg __attribute__((unused)))
+                                  uint8 dec_arg MY_ATTRIBUTE((unused)))
 {
   my_decimal decimal_value;
   return store_value(date2my_decimal(ltime, &decimal_value));
@@ -2847,7 +2850,7 @@ my_decimal* Field_new_decimal::val_decimal(my_decimal *decimal_value)
 
 
 String *Field_new_decimal::val_str(String *val_buffer,
-                                   String *val_ptr __attribute__((unused)))
+                                   String *val_ptr MY_ATTRIBUTE((unused)))
 {
   ASSERT_COLUMN_MARKED_FOR_READ;
   my_decimal decimal_value;
@@ -2960,8 +2963,8 @@ uint Field_new_decimal::pack_length_from_metadata(uint field_metadata)
    @return @c true
 */
 bool Field_new_decimal::compatible_field_size(uint field_metadata,
-                                              Relay_log_info * __attribute__((unused)),
-                                              uint16 mflags __attribute__((unused)),
+                                              Relay_log_info * MY_ATTRIBUTE((unused)),
+                                              uint16 mflags MY_ATTRIBUTE((unused)),
                                               int *order_var)
 {
   uint const source_precision= (field_metadata >> 8U) & 0x00ff;
@@ -3161,7 +3164,7 @@ longlong Field_tiny::val_int(void)
 
 
 String *Field_tiny::val_str(String *val_buffer,
-                           String *val_ptr __attribute__((unused)))
+                           String *val_ptr MY_ATTRIBUTE((unused)))
 {
   ASSERT_COLUMN_MARKED_FOR_READ;
   const CHARSET_INFO *cs= &my_charset_numeric;
@@ -3376,7 +3379,7 @@ longlong Field_short::val_int(void)
 
 
 String *Field_short::val_str(String *val_buffer,
-                            String *val_ptr __attribute__((unused)))
+                            String *val_ptr MY_ATTRIBUTE((unused)))
 {
   ASSERT_COLUMN_MARKED_FOR_READ;
   const CHARSET_INFO *cs= &my_charset_numeric;
@@ -3596,7 +3599,7 @@ longlong Field_medium::val_int(void)
 
 
 String *Field_medium::val_str(String *val_buffer,
-                             String *val_ptr __attribute__((unused)))
+                             String *val_ptr MY_ATTRIBUTE((unused)))
 {
   ASSERT_COLUMN_MARKED_FOR_READ;
   const CHARSET_INFO *cs= &my_charset_numeric;
@@ -3830,7 +3833,7 @@ longlong Field_long::val_int(void)
 }
 
 String *Field_long::val_str(String *val_buffer,
-                           String *val_ptr __attribute__((unused)))
+                           String *val_ptr MY_ATTRIBUTE((unused)))
 {
   ASSERT_COLUMN_MARKED_FOR_READ;
   const CHARSET_INFO *cs= &my_charset_numeric;
@@ -4079,7 +4082,7 @@ longlong Field_longlong::val_int(void)
 
 
 String *Field_longlong::val_str(String *val_buffer,
-                               String *val_ptr __attribute__((unused)))
+                               String *val_ptr MY_ATTRIBUTE((unused)))
 {
   const CHARSET_INFO *cs= &my_charset_numeric;
   uint length;
@@ -4199,7 +4202,7 @@ Field_real::unpack(uchar *to, const uchar *from,
 
 type_conversion_status
 Field_real::store_time(MYSQL_TIME *ltime,
-                       uint8 dec_arg __attribute__((unused)))
+                       uint8 dec_arg MY_ATTRIBUTE((unused)))
 {
   double nr= TIME_to_double(ltime);
   return store(ltime->neg ? -nr : nr);
@@ -4289,7 +4292,7 @@ longlong Field_float::val_int(void)
 
 
 String *Field_float::val_str(String *val_buffer,
-                            String *val_ptr __attribute__((unused)))
+                            String *val_ptr MY_ATTRIBUTE((unused)))
 {
   ASSERT_COLUMN_MARKED_FOR_READ;
   DBUG_ASSERT(!zerofill || field_length <= MAX_FIELD_CHARLENGTH);
@@ -4625,7 +4628,7 @@ bool Field_real::get_time(MYSQL_TIME *ltime)
 
 
 String *Field_double::val_str(String *val_buffer,
-                             String *val_ptr __attribute__((unused)))
+                             String *val_ptr MY_ATTRIBUTE((unused)))
 {
   ASSERT_COLUMN_MARKED_FOR_READ;
   DBUG_ASSERT(!zerofill || field_length <= MAX_FIELD_CHARLENGTH);
@@ -5089,7 +5092,7 @@ Field_temporal_with_date::convert_number_to_TIME(longlong nr,
 
 type_conversion_status
 Field_temporal_with_date::store_time(MYSQL_TIME *ltime,
-                                     uint8 dec_arg __attribute__((unused)))
+                                     uint8 dec_arg MY_ATTRIBUTE((unused)))
 {
   ASSERT_COLUMN_MARKED_FOR_WRITE;
   type_conversion_status error;
@@ -5480,7 +5483,7 @@ int Field_timestamp::cmp(const uchar *a_ptr, const uchar *b_ptr)
 }
 
 
-void Field_timestamp::make_sort_key(uchar *to,uint length __attribute__((unused)))
+void Field_timestamp::make_sort_key(uchar *to,uint length MY_ATTRIBUTE((unused)))
 {
 #ifdef WORDS_BIGENDIAN
   if (!table || !table->s->db_low_byte_first)
@@ -5699,7 +5702,7 @@ Field_time_common::convert_number_to_TIME(longlong nr, bool unsigned_val,
 
 type_conversion_status
 Field_time_common::store_time(MYSQL_TIME *ltime,
-                              uint8 dec_arg __attribute__((unused)))
+                              uint8 dec_arg MY_ATTRIBUTE((unused)))
 {
   /* Check if seconds or minutes are out of range */
   if (ltime->second >= 60 || ltime->minute >= 60)
@@ -5725,7 +5728,7 @@ Field_time_common::store_internal_with_round(MYSQL_TIME *ltime, int *warnings)
 
 
 String *Field_time_common::val_str(String *val_buffer,
-                                   String *val_ptr __attribute__((unused)))
+                                   String *val_ptr MY_ATTRIBUTE((unused)))
 {
   ASSERT_COLUMN_MARKED_FOR_READ;
   MYSQL_TIME ltime;
@@ -6039,7 +6042,7 @@ type_conversion_status Field_year::store(double nr)
 
 type_conversion_status
 Field_year::store_time(MYSQL_TIME *ltime,
-                       uint8 dec_arg __attribute__((unused)))
+                       uint8 dec_arg MY_ATTRIBUTE((unused)))
 {
   if (ltime->time_type != MYSQL_TIMESTAMP_DATETIME &&
       ltime->time_type != MYSQL_TIMESTAMP_DATE)
@@ -6103,7 +6106,7 @@ longlong Field_year::val_int(void)
 
 
 String *Field_year::val_str(String *val_buffer,
-                           String *val_ptr __attribute__((unused)))
+                           String *val_ptr MY_ATTRIBUTE((unused)))
 {
   DBUG_ASSERT(field_length < 5);
   val_buffer->alloc(5);
@@ -6203,7 +6206,7 @@ longlong Field_newdate::val_time_temporal()
 
 
 String *Field_newdate::val_str(String *val_buffer,
-                              String *val_ptr __attribute__((unused)))
+                              String *val_ptr MY_ATTRIBUTE((unused)))
 {
   ASSERT_COLUMN_MARKED_FOR_READ;
   val_buffer->alloc(field_length);
@@ -6393,7 +6396,7 @@ longlong Field_datetime::val_int()
   Using my_datetime_number_to_str() instead of my_datetime_to_str().
 */
 String *Field_datetime::val_str(String *val_buffer,
-                               String *val_ptr __attribute__((unused)))
+                               String *val_ptr MY_ATTRIBUTE((unused)))
 {
   ASSERT_COLUMN_MARKED_FOR_READ;
   val_buffer->alloc(field_length + 1);
@@ -6787,7 +6790,7 @@ longlong Field_string::val_int(void)
 }
 
 
-String *Field_string::val_str(String *val_buffer __attribute__((unused)),
+String *Field_string::val_str(String *val_buffer MY_ATTRIBUTE((unused)),
                              String *val_ptr)
 {
   ASSERT_COLUMN_MARKED_FOR_READ;
@@ -6845,7 +6848,7 @@ check_field_for_37426(const void *param_arg)
 bool
 Field_string::compatible_field_size(uint field_metadata,
                                     Relay_log_info *rli_arg,
-                                    uint16 mflags __attribute__((unused)),
+                                    uint16 mflags MY_ATTRIBUTE((unused)),
                                     int *order_var)
 {
 #ifdef HAVE_REPLICATION
@@ -6883,7 +6886,7 @@ int Field_string::cmp(const uchar *a_ptr, const uchar *b_ptr)
 
 void Field_string::make_sort_key(uchar *to, uint length)
 {
-  uint tmp __attribute__((unused))=
+  uint tmp MY_ATTRIBUTE((unused))=
     field_charset->coll->strnxfrm(field_charset,
                                   to, length, char_length(),
                                   ptr, field_length,
@@ -6915,7 +6918,7 @@ void Field_string::sql_type(String &res) const
 
 uchar *Field_string::pack(uchar *to, const uchar *from,
                           uint max_length,
-                          bool low_byte_first __attribute__((unused)))
+                          bool low_byte_first MY_ATTRIBUTE((unused)))
 {
   uint length=      min(field_length,max_length);
   uint local_char_length= max_length/field_charset->mbmaxlen;
@@ -6974,7 +6977,7 @@ const uchar *
 Field_string::unpack(uchar *to,
                      const uchar *from,
                      uint param_data,
-                     bool low_byte_first __attribute__((unused)))
+                     bool low_byte_first MY_ATTRIBUTE((unused)))
 {
   uint from_length, length;
 
@@ -7229,7 +7232,7 @@ longlong Field_varstring::val_int(void)
   return result;
 }
 
-String *Field_varstring::val_str(String *val_buffer __attribute__((unused)),
+String *Field_varstring::val_str(String *val_buffer MY_ATTRIBUTE((unused)),
                                 String *val_ptr)
 {
   ASSERT_COLUMN_MARKED_FOR_READ;
@@ -7391,7 +7394,7 @@ uint32 Field_varstring::data_length()
 
 uchar *Field_varstring::pack(uchar *to, const uchar *from,
                              uint max_length,
-                             bool low_byte_first __attribute__((unused)))
+                             bool low_byte_first MY_ATTRIBUTE((unused)))
 {
   uint length= length_bytes == 1 ? (uint) *from : uint2korr(from);
   set_if_smaller(max_length, field_length);
@@ -7428,7 +7431,7 @@ uchar *Field_varstring::pack(uchar *to, const uchar *from,
 const uchar *
 Field_varstring::unpack(uchar *to, const uchar *from,
                         uint param_data,
-                        bool low_byte_first __attribute__((unused)))
+                        bool low_byte_first MY_ATTRIBUTE((unused)))
 {
   uint length;
   uint l_bytes= (param_data && (param_data < field_length)) ? 
@@ -7887,7 +7890,7 @@ longlong Field_blob::val_int(void)
   return my_strntoll(charset(),blob,length,10,NULL,&not_used);
 }
 
-String *Field_blob::val_str(String *val_buffer __attribute__((unused)),
+String *Field_blob::val_str(String *val_buffer MY_ATTRIBUTE((unused)),
                            String *val_ptr)
 {
   ASSERT_COLUMN_MARKED_FOR_READ;
@@ -8539,7 +8542,7 @@ int Field_enum::do_save_field_metadata(uchar *metadata_ptr)
 }
 
 
-String *Field_enum::val_str(String *val_buffer __attribute__((unused)),
+String *Field_enum::val_str(String *val_buffer MY_ATTRIBUTE((unused)),
                            String *val_ptr)
 {
   uint tmp=(uint) Field_enum::val_int();
@@ -8683,7 +8686,7 @@ type_conversion_status Field_set::store(longlong nr, bool unsigned_val)
 
 
 String *Field_set::val_str(String *val_buffer,
-                          String *val_ptr __attribute__((unused)))
+                          String *val_ptr MY_ATTRIBUTE((unused)))
 {
   ulonglong tmp=(ulonglong) Field_enum::val_int();
   uint bitnr=0;
@@ -9148,7 +9151,7 @@ longlong Field_bit::val_int(void)
 
 
 String *Field_bit::val_str(String *val_buffer,
-                           String *val_ptr __attribute__((unused)))
+                           String *val_ptr MY_ATTRIBUTE((unused)))
 {
   ASSERT_COLUMN_MARKED_FOR_READ;
   char buff[sizeof(longlong)];
@@ -9308,7 +9311,7 @@ uint Field_bit::pack_length_from_metadata(uint field_metadata)
 */
 bool
 Field_bit::compatible_field_size(uint field_metadata,
-                                 Relay_log_info * __attribute__((unused)),
+                                 Relay_log_info * MY_ATTRIBUTE((unused)),
                                  uint16 mflags,
                                  int *order_var)
 {
@@ -9348,7 +9351,7 @@ void Field_bit::sql_type(String &res) const
 
 uchar *
 Field_bit::pack(uchar *to, const uchar *from, uint max_length,
-                bool low_byte_first __attribute__((unused)))
+                bool low_byte_first MY_ATTRIBUTE((unused)))
 {
   DBUG_ASSERT(max_length > 0);
   uint length;
@@ -9396,7 +9399,7 @@ Field_bit::pack(uchar *to, const uchar *from, uint max_length,
 */
 const uchar *
 Field_bit::unpack(uchar *to, const uchar *from, uint param_data,
-                  bool low_byte_first __attribute__((unused)))
+                  bool low_byte_first MY_ATTRIBUTE((unused)))
 {
   DBUG_ENTER("Field_bit::unpack");
   DBUG_PRINT("enter", ("to: %p, from: %p, param_data: 0x%x",
index ff3b49f5188db23947dd1f552a696f2e99402914..eb3e3691956e7183f1b5d32746cdd49b38e34600 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef FIELD_INCLUDED
 #define FIELD_INCLUDED
 
-/* Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 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
@@ -1889,13 +1889,13 @@ public:
     return new Field_long(*this);
   }
   virtual uchar *pack(uchar* to, const uchar *from,
-                      uint max_length __attribute__((unused)),
+                      uint max_length MY_ATTRIBUTE((unused)),
                       bool low_byte_first)
   {
     return pack_int32(to, from, low_byte_first);
   }
   virtual const uchar *unpack(uchar* to, const uchar *from,
-                              uint param_data __attribute__((unused)),
+                              uint param_data MY_ATTRIBUTE((unused)),
                               bool low_byte_first)
   {
     return unpack_int32(to, from, low_byte_first);
@@ -1954,13 +1954,13 @@ public:
     return new Field_longlong(*this);
   }
   virtual uchar *pack(uchar* to, const uchar *from,
-                      uint max_length  __attribute__((unused)),
+                      uint max_length  MY_ATTRIBUTE((unused)),
                       bool low_byte_first)
   {
     return pack_int64(to, from, low_byte_first);
   }
   virtual const uchar *unpack(uchar* to, const uchar *from,
-                              uint param_data __attribute__((unused)),
+                              uint param_data MY_ATTRIBUTE((unused)),
                               bool low_byte_first)
   {
     return unpack_int64(to, from, low_byte_first);
@@ -2560,12 +2560,12 @@ public:
     return new Field_timestamp(*this);
   }
   uchar *pack(uchar *to, const uchar *from,
-              uint max_length __attribute__((unused)), bool low_byte_first)
+              uint max_length MY_ATTRIBUTE((unused)), bool low_byte_first)
   {
     return pack_int32(to, from, low_byte_first);
   }
   const uchar *unpack(uchar* to, const uchar *from,
-                      uint param_data __attribute__((unused)),
+                      uint param_data MY_ATTRIBUTE((unused)),
                       bool low_byte_first)
   {
     return unpack_int32(to, from, low_byte_first);
@@ -2998,12 +2998,12 @@ public:
     return new Field_datetime(*this);
   }
   uchar *pack(uchar* to, const uchar *from,
-              uint max_length __attribute__((unused)), bool low_byte_first)
+              uint max_length MY_ATTRIBUTE((unused)), bool low_byte_first)
   {
     return pack_int64(to, from, low_byte_first);
   }
   const uchar *unpack(uchar* to, const uchar *from,
-                      uint param_data __attribute__((unused)),
+                      uint param_data MY_ATTRIBUTE((unused)),
                       bool low_byte_first)
   {
     return unpack_int64(to, from, low_byte_first);
index 1e44aefc424906ca8e4e99b9148e4cf6e0df89ba..9f6de2a3e63fce6fd554e09ba7786f97fb8ab4fc 100644 (file)
@@ -195,7 +195,7 @@ set_field_to_null_with_conversions(Field *field, bool no_conversions)
 }
 
 
-static void do_skip(Copy_field *copy __attribute__((unused)))
+static void do_skip(Copy_field *copy MY_ATTRIBUTE((unused)))
 {
 }
 
index 3d5ba0ccd18d0e96896305197b0c86d91e63b665..eeed08b004737e5cfa7fafaf3a5d18baf7bb0bd7 100644 (file)
@@ -1,5 +1,5 @@
 /*
-   Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
+   Copyright (c) 2000, 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
@@ -1040,7 +1040,7 @@ void make_sortkey(Sort_param *param, uchar *to, uchar *ref_pos)
         if (sort_field->need_strxnfrm)
         {
           char *from=(char*) res->ptr();
-          uint tmp_length __attribute__((unused));
+          uint tmp_length MY_ATTRIBUTE((unused));
           if ((uchar*) from == to)
           {
             DBUG_ASSERT(sort_field->length >= length);
index bbbcf1b6401905fbbdde98cddab4dcbe04f3b8ca..7c4c4eff19e59db491bd7011f47d5c7af32c02f0 100644 (file)
@@ -1,5 +1,5 @@
 /*
-   Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
+   Copyright (c) 2000, 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
@@ -229,6 +229,21 @@ void generate_find_structs()
   insert_sql_functions();
 }
 
+struct hash_map_cleanup
+{
+  hash_map_cleanup(char **buffer, int *sz)
+    : m_buffer(buffer), m_sz(sz)
+  {}
+  ~hash_map_cleanup()
+  {
+    free(*m_buffer);
+    *m_buffer= NULL;
+    *m_sz= 0;
+  }
+  char **m_buffer;
+  int   *m_sz;
+};
+
 char *hash_map= 0;
 int size_hash_map= 0;
 
@@ -307,18 +322,21 @@ void print_hash_map(const char *name)
 
 void print_find_structs()
 {
-  add_structs_to_map(root_by_len,max_len);
-  set_links(root_by_len,max_len);
-  print_hash_map("sql_functions_map");
-
-  hash_map= 0;
-  size_hash_map= 0;
+  {
+    hash_map_cleanup cleanup(&hash_map, &size_hash_map);
+    add_structs_to_map(root_by_len,max_len);
+    set_links(root_by_len,max_len);
+    print_hash_map("sql_functions_map");
+  }
 
   printf("\n");
 
-  add_structs_to_map(root_by_len2,max_len2);
-  set_links(root_by_len2,max_len2);
-  print_hash_map("symbols_map");
+  {
+    hash_map_cleanup cleanup(&hash_map, &size_hash_map);
+    add_structs_to_map(root_by_len2,max_len2);
+    set_links(root_by_len2,max_len2);
+    print_hash_map("symbols_map");
+  }
 }
 
 int check_dup_symbols(SYMBOL *s1, SYMBOL *s2)
index d4f654d491bd3f8783a1fe49b6da72ff526971af..a9ade57d5e83f23e0d180a88050837084c466c43 100644 (file)
@@ -1,5 +1,5 @@
 /*
-   Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+   Copyright (c) 2011, 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
@@ -1727,7 +1727,7 @@ ndb_index_stat_stop_listener(Ndb_index_stat_proc &pr)
 }
 
 pthread_handler_t
-ndb_index_stat_thread_func(void *arg __attribute__((unused)))
+ndb_index_stat_thread_func(void *arg MY_ATTRIBUTE((unused)))
 {
   THD *thd; /* needs to be first for thread_stack */
   struct timespec abstime;
index 18194f93e496dacd91210743ea3ee28db6c2d08f..b46f07b43318e67d7d32e1f2a26c7b310564e794 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2004, 2015, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2004, 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
@@ -417,7 +417,7 @@ pthread_mutex_t ndbcluster_mutex;
 HASH ndbcluster_open_tables;
 
 static uchar *ndbcluster_get_key(NDB_SHARE *share, size_t *length,
-                                my_bool not_used __attribute__((unused)));
+                                my_bool not_used MY_ATTRIBUTE((unused)));
 
 static void modify_shared_stats(NDB_SHARE *share,
                                 Ndb_local_table_statistics *local_stat);
@@ -1293,7 +1293,7 @@ typedef struct st_thd_ndb_share {
 } THD_NDB_SHARE;
 static
 uchar *thd_ndb_share_get_key(THD_NDB_SHARE *thd_ndb_share, size_t *length,
-                            my_bool not_used __attribute__((unused)))
+                            my_bool not_used MY_ATTRIBUTE((unused)))
 {
   *length= sizeof(thd_ndb_share->key);
   return (uchar*) &thd_ndb_share->key;
@@ -11106,7 +11106,7 @@ int ndbcluster_table_exists_in_engine(handlerton *hton, THD* thd,
 
 
 extern "C" uchar* tables_get_key(const char *entry, size_t *length,
-                                my_bool not_used __attribute__((unused)))
+                                my_bool not_used MY_ATTRIBUTE((unused)))
 {
   *length= strlen(entry);
   return (uchar*) entry;
@@ -12657,7 +12657,7 @@ ha_ndbcluster::register_query_cache_table(THD *thd,
 */
 
 static uchar *ndbcluster_get_key(NDB_SHARE *share, size_t *length,
-                                my_bool not_used __attribute__((unused)))
+                                my_bool not_used MY_ATTRIBUTE((unused)))
 {
   *length= share->key_length;
   return (uchar*) share->key;
@@ -14539,7 +14539,7 @@ ha_ndbcluster::update_table_comment(
 /**
   Utility thread main loop.
 */
-pthread_handler_t ndb_util_thread_func(void *arg __attribute__((unused)))
+pthread_handler_t ndb_util_thread_func(void *arg MY_ATTRIBUTE((unused)))
 {
   THD *thd; /* needs to be first for thread_stack */
   struct timespec abstime;
index 21f20b556d7d185c28991735e1513e14acad5f59..29f2ca102da531f334ca58cd9de0770f5e673713 100644 (file)
@@ -1,5 +1,5 @@
 /*
-  Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
+  Copyright (c) 2006, 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
@@ -6252,7 +6252,7 @@ private:
 static uchar *
 ndb_schema_objects_get_key(NDB_SCHEMA_OBJECT *schema_object,
                            size_t *length,
-                           my_bool not_used __attribute__((unused)))
+                           my_bool not_used MY_ATTRIBUTE((unused)))
 {
   *length= schema_object->key_length;
   return (uchar*) schema_object->key;
index 1626305611d24a336504485b013e8e9d944fef6d..a3e437186a935793aa32d7de0f1d0a6684f3f544 100644 (file)
@@ -1,5 +1,5 @@
 /*
-   Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
+   Copyright (c) 2005, 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
@@ -222,7 +222,7 @@ static uint partition_flags()
   return HA_CAN_PARTITION;
 }
 
-static uint alter_table_flags(uint flags __attribute__((unused)))
+static uint alter_table_flags(uint flags MY_ATTRIBUTE((unused)))
 {
   return (HA_PARTITION_FUNCTION_SUPPORTED |
           HA_FAST_CHANGE_PARTITION);
@@ -1676,9 +1676,9 @@ int ha_partition::change_partitions(HA_CREATE_INFO *create_info,
                                     ulonglong * const copied,
                                     ulonglong * const deleted,
                                     const uchar *pack_frm_data
-                                    __attribute__((unused)),
+                                    MY_ATTRIBUTE((unused)),
                                     size_t pack_frm_len
-                                    __attribute__((unused)))
+                                    MY_ATTRIBUTE((unused)))
 {
   List_iterator<partition_element> part_it(m_part_info->partitions);
   List_iterator <partition_element> t_it(m_part_info->temp_partitions);
@@ -2962,7 +2962,7 @@ bool ha_partition::get_from_handler_file(const char *name, MEM_ROOT *mem_root,
 */
 
 static uchar *get_part_name(PART_NAME_DEF *part, size_t *length,
-                            my_bool not_used __attribute__((unused)))
+                            my_bool not_used MY_ATTRIBUTE((unused)))
 {
   *length= part->length;
   return part->partition_name;
index a891766af71406a2ff1165c0a52904c3840392e4..ecb2a35f8f4cc72a12bd0035df0ed460fa336d29 100644 (file)
@@ -1443,7 +1443,7 @@ int ha_commit_trans(THD *thd, bool all, bool ignore_global_read_lock)
       DEBUG_SYNC(thd, "ha_commit_trans_after_acquire_commit_lock");
     }
 
-    if (rw_trans &&
+    if (rw_trans && stmt_has_updated_trans_table(ha_info) &&
         opt_readonly &&
         !(thd->security_ctx->master_access & SUPER_ACL) &&
         !thd->slave_thread)
@@ -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();
@@ -6359,7 +6362,7 @@ end:
 ha_rows DsMrr_impl::dsmrr_info(uint keyno, uint n_ranges, uint rows,
                                uint *bufsz, uint *flags, Cost_estimate *cost)
 {  
-  ha_rows res __attribute__((unused));
+  ha_rows res MY_ATTRIBUTE((unused));
   uint def_flags= *flags;
   uint def_bufsz= *bufsz;
 
@@ -7231,14 +7234,27 @@ int binlog_log_row(TABLE* table,
 
 #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"))
+  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)))
   {
-    return 0;
-  } 
+      return 0;
+  }
+
+  /* enforce wsrep_max_ws_rows */
+  if (table->s->tmp_table == NO_TMP_TABLE)
+  {
+    thd->wsrep_affected_rows++;
+    if (wsrep_max_ws_rows &&
+        thd->wsrep_exec_mode != REPL_RECV &&
+        thd->wsrep_affected_rows > wsrep_max_ws_rows)
+    {
+      trans_rollback_stmt(thd) || trans_rollback(thd);
+      my_message(ER_ERROR_DURING_COMMIT, "wsrep_max_ws_rows exceeded", MYF(0));
+      return ER_ERROR_DURING_COMMIT;
+    }
+  }
 #endif /* WITH_WSREP */
   if (check_table_binlog_row_based(thd, table))
   {
index b0ed7a55e45529024fdfbf0e729508d98e836943..484774d72fc65f8c61d3ae8cbccfdd8a9bc179e3 100644 (file)
@@ -3073,7 +3073,7 @@ private:
   */
   virtual int rnd_init(bool scan)= 0;
   virtual int rnd_end() { return 0; }
-  virtual int write_row(uchar *buf __attribute__((unused)))
+  virtual int write_row(uchar *buf MY_ATTRIBUTE((unused)))
   {
     return HA_ERR_WRONG_COMMAND;
   }
@@ -3086,13 +3086,13 @@ private:
     the columns required for the error message are not read, the error
     message will contain garbage.
   */
-  virtual int update_row(const uchar *old_data __attribute__((unused)),
-                         uchar *new_data __attribute__((unused)))
+  virtual int update_row(const uchar *old_data MY_ATTRIBUTE((unused)),
+                         uchar *new_data MY_ATTRIBUTE((unused)))
   {
     return HA_ERR_WRONG_COMMAND;
   }
 
-  virtual int delete_row(const uchar *buf __attribute__((unused)))
+  virtual int delete_row(const uchar *buf MY_ATTRIBUTE((unused)))
   {
     return HA_ERR_WRONG_COMMAND;
   }
@@ -3125,8 +3125,8 @@ private:
     @return  non-0 in case of failure, 0 in case of success.
     When lock_type is F_UNLCK, the return value is ignored.
   */
-  virtual int external_lock(THD *thd __attribute__((unused)),
-                            int lock_type __attribute__((unused)))
+  virtual int external_lock(THD *thd MY_ATTRIBUTE((unused)),
+                            int lock_type MY_ATTRIBUTE((unused)))
   {
     return 0;
   }
index d3944ba847c2886746ff0c293f7b456346d6bd62..b999be8c7d25388eaad366ad0575009eca98b264 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 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
@@ -413,7 +413,7 @@ int ip_to_hostname(struct sockaddr_storage *ip_storage,
 {
   const struct sockaddr *ip= (const sockaddr *) ip_storage;
   int err_code;
-  bool err_status __attribute__((unused));
+  bool err_status MY_ATTRIBUTE((unused));
   Host_errors errors;
 
   DBUG_ENTER("ip_to_hostname");
index 88cd8e6e178efa34dfa13cb387fdb01a3593bc6b..2edef6376310ed0322c84ce686c81df8e46e2614 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2006, 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
@@ -19,6 +19,6 @@
 #include "my_global.h"                          /* ulong */
 
 void unireg_init(ulong options);
-void unireg_end(void) __attribute__((noreturn));
+void unireg_end(void) MY_ATTRIBUTE((noreturn));
 
 #endif /* INIT_INCLUDED */
index e2635c198d60f95497d8897ebb45cb90b0c2ec12..6468342cd030434b13f1c6b3041c51eb355c4e50 100644 (file)
@@ -230,9 +230,6 @@ bool Item::val_bool()
 */
 String *Item::val_str_ascii(String *str)
 {
-  if (!(collation.collation->state & MY_CS_NONASCII))
-    return val_str(str);
-  
   DBUG_ASSERT(str != &str_value);
   
   uint errors;
@@ -240,11 +237,15 @@ String *Item::val_str_ascii(String *str)
   if (!res)
     return 0;
   
-  if ((null_value= str->copy(res->ptr(), res->length(),
-                             collation.collation, &my_charset_latin1,
-                             &errors)))
-    return 0;
-  
+  if (!(res->charset()->state & MY_CS_NONASCII))
+    str= res;
+  else
+  {
+    if ((null_value= str->copy(res->ptr(), res->length(), collation.collation,
+                               &my_charset_latin1, &errors)))
+      return 0;
+  }
+
   return str;
 }
 
@@ -2914,11 +2915,24 @@ table_map Item_field::used_tables() const
 }
 
 
-table_map Item_field::resolved_used_tables() const
+bool Item_field::used_tables_for_level(uchar *arg)
 {
-  if (field->table->const_table)
-    return 0;                                  // const item
-  return field->table->map;
+  // Used by resolver only, so can never reach a "const" table.
+  DBUG_ASSERT(!field->orig_table->const_table);
+  TABLE_LIST *tr= field->orig_table->pos_in_table_list;
+  Used_tables *const ut= (Used_tables *)(arg);
+
+  /*
+    When the qualifying query for the field (table_ref->select_lex) is the
+    same level as the requested level, add the table's map. When the qualifying
+    query for the field is outer relative to the requested level, add an outer
+    reference.
+  */
+  if (ut->select == tr->select_lex)
+    ut->used_tables|= tr->table->map;
+  else if (ut->select->nest_level > tr->select_lex->nest_level)
+    ut->used_tables|= OUTER_REF_TABLE_BIT;
+  return false;
 }
 
 void Item_ident::fix_after_pullout(st_select_lex *parent_select,
@@ -2993,7 +3007,9 @@ void Item_ident::fix_after_pullout(st_select_lex *parent_select,
     */
     Item_subselect *subq_predicate= child_select->master_unit()->item;
 
-    subq_predicate->used_tables_cache|= this->resolved_used_tables();
+    Used_tables ut(depended_from);
+    (void) walk(&Item::used_tables_for_level, true, (uchar *)(&ut));
+    subq_predicate->used_tables_cache|= ut.used_tables;
     subq_predicate->const_item_cache&= this->const_item();
   }
 }
@@ -3412,8 +3428,8 @@ Item *Item_null::safe_charset_converter(const CHARSET_INFO *tocs)
 
 static void
 default_set_param_func(Item_param *param,
-                       uchar **pos __attribute__((unused)),
-                       ulong len __attribute__((unused)))
+                       uchar **pos MY_ATTRIBUTE((unused)),
+                       ulong len MY_ATTRIBUTE((unused)))
 {
   param->set_null();
 }
@@ -4724,8 +4740,10 @@ void mark_select_range_as_dependent(THD *thd,
     if (found_field == view_ref_found)
     {
       Item::Type type= found_item->type();
-      prev_subselect_item->used_tables_cache|=
-        found_item->used_tables();
+      Used_tables ut(last_select);
+      (void) found_item->walk(&Item::used_tables_for_level, true,
+                              (uchar *)(&ut));
+      prev_subselect_item->used_tables_cache|= ut.used_tables;
       dependent= ((type == Item::REF_ITEM || type == Item::FIELD_ITEM) ?
                   (Item_ident*) found_item :
                   0);
@@ -5170,8 +5188,10 @@ Item_field::fix_outer_field(THD *thd, Field **from_field, Item **reference)
         else
         {
           Item::Type ref_type= (*reference)->type();
-          prev_subselect_item->used_tables_cache|=
-            (*reference)->used_tables();
+          Used_tables ut(select);
+          (void) (*reference)->walk(&Item::used_tables_for_level, true,
+                                    (uchar *)(&ut));
+          prev_subselect_item->used_tables_cache|= ut.used_tables;
           prev_subselect_item->const_item_cache&=
             (*reference)->const_item();
           mark_as_dependent(thd, last_checked_context->select_lex,
index e0d90ae921db3f36a5651709b3836095740b4a73..99404bf25ef326296ccde09c517fe1043f6bc846 100644 (file)
@@ -143,6 +143,19 @@ public:
     }
   }
 };
+/**
+  Class used as argument to Item::walk() together with used_tables_for_level()
+*/
+class Used_tables
+{
+public:
+  explicit Used_tables(st_select_lex *select) :
+  select(select), used_tables(0)
+  {}
+
+  st_select_lex *const select;           ///< Level for which data is accumulated
+  table_map used_tables;              ///< Accumulated used tables data
+};
 
 /*************************************************************************/
 
@@ -1192,23 +1205,6 @@ public:
 
   /* bit map of tables used by item */
   virtual table_map used_tables() const { return (table_map) 0L; }
-  /**
-    Return used table information for the level this item is resolved on.
-     - For fields, this returns the table the item is resolved from.
-     - For all other items, this behaves like used_tables().
-
-    @note: Use this function with caution. External calls to this function
-           should only be made for class objects derived from Item_ident.
-           Item::resolved_used_tables is for internal use only, in order to
-           process fields underlying a view column reference.
-  */
-  virtual table_map resolved_used_tables() const
-  {
-    // As this is the level this item was resolved on, it cannot be outer:
-    DBUG_ASSERT(!(used_tables() & OUTER_REF_TABLE_BIT));
-
-    return used_tables();
-  }
   /*
     Return table map of tables that can't be NULL tables (tables that are
     used in a context where if they would contain a NULL row generated
@@ -1440,6 +1436,21 @@ public:
   virtual bool reset_query_id_processor(uchar *query_id_arg) { return 0; }
   virtual bool find_item_processor(uchar *arg) { return this == (void *) arg; }
   virtual bool register_field_in_read_map(uchar *arg) { return 0; }
+/**
+    Return used table information for the specified query block (level).
+    For a field that is resolved from this query block, return the table number.
+    For a field that is resolved from a query block outer to the specified one,
+    return OUTER_REF_TABLE_BIT
+
+    @param[in,out] arg pointer to an instance of class Used_tables, which is
+                       constructed with the query block as argument.
+                       The used tables information is accumulated in the field
+                       used_tables in this class.
+
+    @note This function is used to update used tables information after
+          merging a query block (a subquery) with its parent.
+  */
+  virtual bool used_tables_for_level(uchar *arg) { return false; }
   virtual bool inform_item_in_cond_of_tab(uchar *join_tab_index) { return false; }
   /**
      Clean up after removing the item from the item tree.
@@ -2243,7 +2254,6 @@ public:
   type_conversion_status save_in_field(Field *field,bool no_conversions);
   void save_org_in_field(Field *field);
   table_map used_tables() const;
-  virtual table_map resolved_used_tables() const;
   enum Item_result result_type () const
   {
     return field->result_type();
@@ -2278,6 +2288,7 @@ public:
   bool add_field_to_set_processor(uchar * arg);
   bool remove_column_from_bitmap(uchar * arg);
   bool find_item_in_field_list_processor(uchar *arg);
+  bool used_tables_for_level(uchar *arg);
   bool register_field_in_read_map(uchar *arg);
   bool check_partition_func_processor(uchar *int_arg) {return FALSE;}
   void cleanup();
@@ -3245,9 +3256,6 @@ public:
       (*ref)->update_used_tables(); 
   }
 
-  virtual table_map resolved_used_tables() const
-  { return (*ref)->resolved_used_tables(); }
-
   table_map not_null_tables() const
   {
     /*
@@ -4191,11 +4199,6 @@ public:
 
   void set_used_tables(table_map map) { used_table_map= map; }
 
-  virtual table_map resolved_used_tables() const
-  {
-    return example ? example->resolved_used_tables() : used_table_map;
-  }
-
   virtual bool allocate(uint i) { return 0; }
   virtual bool setup(Item *item)
   {
index a42976443de25ac99f25c801286a1b3881049410..5fb940c1db5d6ead1458b03975fc73c7446942f3 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 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
@@ -239,6 +239,16 @@ Item_func::fix_fields(THD *thd, Item **ref)
 void Item_func::fix_after_pullout(st_select_lex *parent_select,
                                   st_select_lex *removed_select)
 {
+  if (const_item())
+  {
+    /*
+      Pulling out a const item changes nothing to it. Moreover, some items may
+      have decided that they're const by some other logic than the generic
+      one below, and we must preserve that decision.
+    */
+    return;
+  }
+
   Item **arg,**arg_end;
 
   used_tables_cache= get_initial_pseudo_tables();
@@ -3997,7 +4007,7 @@ public:
 };
 
 uchar *ull_get_key(const User_level_lock *ull, size_t *length,
-                   my_bool not_used __attribute__((unused)))
+                   my_bool not_used MY_ATTRIBUTE((unused)))
 {
   *length= ull->key_length;
   return ull->key;
index dce888942891934a94035e9241b33233f206b5b5..9ec8de9e3031ea9b4b90e4a79ae9f358a661ed45 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2003, 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
@@ -200,7 +200,7 @@ String *Item_func_geometry_type::val_str_ascii(String *str)
   /* String will not move */
   str->copy(geom->get_class_info()->m_name.str,
            geom->get_class_info()->m_name.length,
-           default_charset());
+           &my_charset_latin1);
   return str;
 }
 
index 95306db81acaa186ab86e7d262fe3e9dd52a3c4a..b3b21f0cf0d6be9dc8fa277f91d6210bc359e21f 100644 (file)
@@ -519,7 +519,21 @@ class Item_func_distance: public Item_real_func
   Gcalc_function func;
   Gcalc_scan_iterator scan_it;
 public:
-  Item_func_distance(Item *a, Item *b): Item_real_func(a, b) {}
+  Item_func_distance(Item *a, Item *b): Item_real_func(a, b)
+  {
+    /*
+      Distance could be NULL, if either of the operands are
+      not geometries.
+    */
+    maybe_null= true;
+  }
+
+  void fix_length_and_dec()
+  {
+    Item_real_func::fix_length_and_dec();
+    maybe_null= true;
+  }
+
   double val_real();
   const char *func_name() const { return "st_distance"; }
 };
index 58bac62684917de80e291d134ee5288bee1d1628..f35735a45fef1500f5c87616cd3fbd2098a5bc0e 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
    rights reserved.
 
    This program is free software; you can redistribute it and/or modify
@@ -3070,7 +3070,7 @@ int group_concat_key_cmp_with_order(const void* arg, const void* key1,
 */
 
 extern "C"
-int dump_leaf_key(void* key_arg, element_count count __attribute__((unused)),
+int dump_leaf_key(void* key_arg, element_count count MY_ATTRIBUTE((unused)),
                   void* item_arg)
 {
   Item_func_group_concat *item= (Item_func_group_concat *) item_arg;
index 7862fb0d7cf16914f62da17e816b4753be2826a3..1ec80e92fcd5ee69716594468874518e39657c5d 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef ITEM_SUM_INCLUDED
 #define ITEM_SUM_INCLUDED
 
-/* Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. reserved.
+/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. reserved.
    reserved.
 
    This program is free software; you can redistribute it and/or modify
@@ -1417,7 +1417,7 @@ int group_concat_key_cmp_with_distinct(const void* arg, const void* key1,
 int group_concat_key_cmp_with_order(const void* arg, const void* key1,
                                     const void* key2);
 int dump_leaf_key(void* key_arg,
-                  element_count count __attribute__((unused)),
+                  element_count count MY_ATTRIBUTE((unused)),
                   void* item_arg);
 C_MODE_END
 
@@ -1463,7 +1463,7 @@ class Item_func_group_concat : public Item_sum
                                              const void* key1,
                                             const void* key2);
   friend int dump_leaf_key(void* key_arg,
-                           element_count count __attribute__((unused)),
+                           element_count count MY_ATTRIBUTE((unused)),
                           void* item_arg);
 
 public:
index 4078ec89e5406a94d82bbfd7b4f16654a938cddc..05117ffae549cdeba1ba7e0fcbfdacd7f3eec071 100644 (file)
@@ -1,5 +1,5 @@
 /*
-   Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+   Copyright (c) 2000, 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
@@ -1902,7 +1902,7 @@ Item_func_now::save_in_field(Field *to, bool no_conversions)
     time zone. Defines time zone (local) used for whole SYSDATE function.
 */
 bool Item_func_sysdate_local::get_date(MYSQL_TIME *now_time,
-                                       uint fuzzy_date __attribute__((unused)))
+                                       uint fuzzy_date MY_ATTRIBUTE((unused)))
 {
   THD *thd= current_thd;
   ulonglong tmp= my_micro_time();
@@ -2138,7 +2138,7 @@ void Item_func_from_unixtime::fix_length_and_dec()
 
 
 bool Item_func_from_unixtime::get_date(MYSQL_TIME *ltime,
-                                      uint fuzzy_date __attribute__((unused)))
+                                      uint fuzzy_date MY_ATTRIBUTE((unused)))
 {
   lldiv_t lld;
   if (decimals)
@@ -2177,7 +2177,7 @@ void Item_func_convert_tz::fix_length_and_dec()
 
 
 bool Item_func_convert_tz::get_date(MYSQL_TIME *ltime,
-                                    uint fuzzy_date __attribute__((unused)))
+                                    uint fuzzy_date MY_ATTRIBUTE((unused)))
 {
   my_time_t my_time_tmp;
   String str;
index d6c8ba96c31e36a643d446136f0b1c3734637bef..8643609235d13557c18b46da758101af02527442 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 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
@@ -1496,6 +1496,78 @@ bool MYSQL_LOG::init_and_set_log_file_name(const char *log_name,
 }
 
 
+bool is_valid_log_name(const char *name, size_t len)
+{
+  if (len > 3)
+  {
+    const char *tail= name + len - 4;
+    if (my_strcasecmp(system_charset_info, tail, ".ini") == 0 ||
+        my_strcasecmp(system_charset_info, tail, ".cnf") == 0)
+    {
+      return false;
+    }
+  }
+  return true;
+}
+
+
+/**
+  Get the real log file name, and possibly reopen file.
+
+  Use realpath() to get the path with symbolic links
+  expanded. Then, close the file, and reopen the real path using the
+  O_NOFOLLOW flag. This will reject following symbolic links.
+
+  @param          file                  File descriptor.
+  @param          log_file_key          Key for P_S instrumentation.
+  @param          open_flags            Flags to use for opening the file.
+  @param          opened_file_name      Name of the open fd.
+
+  @retval file descriptor to open file with 'real_file_name', or '-1'
+          in case of errors.
+*/
+
+#ifndef _WIN32
+static File mysql_file_real_name_reopen(File file,
+#ifdef HAVE_PSI_INTERFACE
+                                        PSI_file_key log_file_key,
+#endif
+                                        int open_flags,
+                                        const char *opened_file_name)
+{
+  DBUG_ASSERT(file);
+  DBUG_ASSERT(opened_file_name);
+
+  /* Buffer for realpath must have capacity for PATH_MAX. */
+  char real_file_name[PATH_MAX];
+
+  /* Get realpath, validate, open realpath with O_NOFOLLOW. */
+  if (realpath(opened_file_name, real_file_name) == NULL)
+  {
+    (void) mysql_file_close(file, MYF(0));
+    return -1;
+  }
+
+  if (mysql_file_close(file, MYF(0)))
+    return -1;
+
+  if (strlen(real_file_name) > FN_REFLEN)
+    return -1;
+
+  if (!is_valid_log_name(real_file_name, strlen(real_file_name)))
+  {
+    sql_print_error("Invalid log file name after expanding symlinks: '%s'",
+                    real_file_name);
+    return -1;
+  }
+
+  return mysql_file_open(log_file_key, real_file_name,
+                         open_flags | O_NOFOLLOW,
+                         MYF(MY_WME | ME_WAITTANG));
+}
+#endif // _WIN32
+
+
 /*
   Open a (new) log file.
 
@@ -1566,6 +1638,18 @@ bool MYSQL_LOG::open(
                              MYF(MY_WME | ME_WAITTANG))) < 0)
     goto err;
 
+#ifndef _WIN32
+  /* Reopen and validate path. */
+  if ((log_type_arg == LOG_UNKNOWN || log_type_arg == LOG_NORMAL) &&
+      (file= mysql_file_real_name_reopen(file,
+#ifdef HAVE_PSI_INTERFACE
+                                         log_file_key,
+#endif
+                                         open_flags,
+                                         log_file_name)) < 0)
+    goto err;
+#endif // _WIN32
+
   if ((pos= mysql_file_tell(file, MYF(MY_WME))) == MY_FILEPOS_ERROR)
   {
     if (my_errno == ESPIPE)
index 8c0d91eb344bd4a6af05827937c3ad592fdce44b..649659587bfb28ec7a982e3f04ef44e6ad68a727 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2005, 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
@@ -610,6 +610,16 @@ bool flush_error_log();
 
 char *make_log_name(char *buff, const char *name, const char* log_ext);
 
+/**
+  Check given log name against certain blacklisted names/extensions.
+
+  @param name     Log name to check
+  @param len      Length of log name
+
+  @returns true if name is valid, false otherwise.
+*/
+bool is_valid_log_name(const char *name, size_t len);
+
 extern LOGGER logger;
 
 #endif /* LOG_H */
index e7878a35b8775bc31fb0770960aa19a44c554dcb..b0158efaa1d895a7b3362f8bbf391d02fb858c94 100644 (file)
@@ -354,7 +354,7 @@ inline int idempotent_error_code(int err_code)
   Ignore error code specified on command line.
 */
 
-inline int ignored_error_code(int err_code)
+int ignored_error_code(int err_code)
 {
 #ifdef HAVE_NDB_BINLOG
   /*
@@ -1743,7 +1743,7 @@ Log_event* Log_event::read_log_event(const char* buf, uint event_len,
 
 void Log_event::print_header(IO_CACHE* file,
                              PRINT_EVENT_INFO* print_event_info,
-                             bool is_more __attribute__((unused)))
+                             bool is_more MY_ATTRIBUTE((unused)))
 {
   char llbuff[22];
   my_off_t hexdump_from= print_event_info->hexdump_from;
@@ -2727,7 +2727,7 @@ Slave_worker *Log_event::get_slave_worker(Relay_log_info *rli)
   {
     if (!rli->curr_group_seen_gtid && !rli->curr_group_seen_begin)
     {
-      ulong gaq_idx __attribute__((unused));
+      ulong gaq_idx MY_ATTRIBUTE((unused));
       rli->mts_groups_assigned++;
 
       rli->curr_group_isolated= FALSE;
@@ -3772,7 +3772,8 @@ Query_log_event::Query_log_event(THD* thd_arg, const char* query_arg,
   if (cmd_can_generate_row_events)
   {
     cmd_must_go_to_trx_cache= cmd_must_go_to_trx_cache || using_trans;
-    if (cmd_must_go_to_trx_cache || stmt_has_updated_trans_table(thd) ||
+    if (cmd_must_go_to_trx_cache ||
+        stmt_has_updated_trans_table(thd->transaction.stmt.ha_list) ||
         thd->lex->is_mixed_stmt_unsafe(thd->in_multi_stmt_transaction_mode(),
                                        thd->variables.binlog_direct_non_trans_update,
                                        trans_has_updated_trans_table(thd),
@@ -11126,6 +11127,7 @@ end:
 int Rows_log_event::do_apply_event(Relay_log_info const *rli)
 {
   DBUG_ENTER("Rows_log_event::do_apply_event(Relay_log_info*)");
+  TABLE *table= NULL;
   int error= 0;
 
   if (opt_bin_log)
@@ -11215,28 +11217,33 @@ int Rows_log_event::do_apply_event(Relay_log_info const *rli)
 #endif
       if (thd->is_slave_error || thd->is_fatal_error)
       {
-        /*
-          Error reporting borrowed from Query_log_event with many excessive
-          simplifications. 
-          We should not honour --slave-skip-errors at this point as we are
-          having severe errors which should not be skiped.
-        */
-        rli->report(ERROR_LEVEL, actual_error,
-                    "Error executing row event: '%s'",
-                    (actual_error ? thd->get_stmt_da()->message() :
-                     "unexpected success or fatal error"));
-        thd->is_slave_error= 1;
+        if (ignored_error_code(actual_error))
+        {
+          if (log_warnings > 1)
+            rli->report(WARNING_LEVEL, actual_error,
+                        "Error executing row event: '%s'",
+                        (actual_error ? thd->get_stmt_da()->message() :
+                         "unexpected success or fatal error"));
+          thd->get_stmt_da()->clear_warning_info(thd->query_id);
+          clear_all_errors(thd, const_cast<Relay_log_info*>(rli));
+          error= 0;
+          goto end;
+        }
+        else
+        {
+          rli->report(ERROR_LEVEL, actual_error,
+                      "Error executing row event: '%s'",
+                      (actual_error ? thd->get_stmt_da()->message() :
+                       "unexpected success or fatal error"));
+          thd->is_slave_error= 1;
+          const_cast<Relay_log_info*>(rli)->slave_close_thread_tables(thd);
+          DBUG_RETURN(actual_error);
+        }
       }
-      const_cast<Relay_log_info*>(rli)->slave_close_thread_tables(thd);
-      DBUG_RETURN(actual_error);
     }
-
     /*
       When the open and locking succeeded, we check all tables to
       ensure that they still have the correct type.
-
-      We can use a down cast here since we know that every table added
-      to the tables_to_lock is a RPL_TABLE_LIST.
     */
 
     {
@@ -11255,10 +11262,37 @@ int Rows_log_event::do_apply_event(Relay_log_info const *rli)
         NOTE: The base tables are added here are removed when 
               close_thread_tables is called.
        */
-      RPL_TABLE_LIST *ptr= rli->tables_to_lock;
-      for (uint i= 0 ; ptr && (i < rli->tables_to_lock_count);
-           ptr= static_cast<RPL_TABLE_LIST*>(ptr->next_global), i++)
+      TABLE_LIST *table_list_ptr= rli->tables_to_lock;
+      for (uint i=0 ; table_list_ptr && (i < rli->tables_to_lock_count);
+           table_list_ptr= table_list_ptr->next_global, i++)
       {
+        /*
+          Below if condition takes care of skipping base tables that
+          make up the MERGE table (which are added by open_tables()
+          call). They are added next to the merge table in the list.
+          For eg: If RPL_TABLE_LIST is t3->t1->t2 (where t1 and t2
+          are base tables for merge table 't3'), open_tables will modify
+          the list by adding t1 and t2 again immediately after t3 in the
+          list (*not at the end of the list*). New table_to_lock list will
+          look like t3->t1'->t2'->t1->t2 (where t1' and t2' are TABLE_LIST
+          objects added by open_tables() call). There is no flag(or logic) in
+          open_tables() that can skip adding these base tables to the list.
+          So the logic here should take care of skipping them.
+
+          tables_to_lock_count logic will take care of skipping base tables
+          that are added at the end of the list.
+          For eg: If RPL_TABLE_LIST is t1->t2->t3, open_tables will modify
+          the list into t1->t2->t3->t1'->t2'. t1' and t2' will be skipped
+          because tables_to_lock_count logic in this for loop.
+        */
+        if (table_list_ptr->parent_l)
+          continue;
+        /*
+          We can use a down cast here since we know that every table added
+          to the tables_to_lock is a RPL_TABLE_LIST (or child table which is
+          skipped above).
+        */
+        RPL_TABLE_LIST *ptr= static_cast<RPL_TABLE_LIST*>(table_list_ptr);
         DBUG_ASSERT(ptr->m_tabledef_valid);
         TABLE *conv_table;
         if (!ptr->m_tabledef.compatible_with(thd, const_cast<Relay_log_info*>(rli),
@@ -11267,13 +11301,18 @@ int Rows_log_event::do_apply_event(Relay_log_info const *rli)
           DBUG_PRINT("debug", ("Table: %s.%s is not compatible with master",
                                ptr->table->s->db.str,
                                ptr->table->s->table_name.str));
-          /*
-            We should not honour --slave-skip-errors at this point as we are
-            having severe errors which should not be skiped.
-          */
-          thd->is_slave_error= 1;
-          const_cast<Relay_log_info*>(rli)->slave_close_thread_tables(thd);
-          DBUG_RETURN(ERR_BAD_TABLE_DEF);
+          if (thd->is_slave_error)
+          {
+            const_cast<Relay_log_info*>(rli)->slave_close_thread_tables(thd);
+            DBUG_RETURN(ERR_BAD_TABLE_DEF);
+          }
+          else
+          {
+            thd->get_stmt_da()->clear_warning_info(thd->query_id);
+            clear_all_errors(thd, const_cast<Relay_log_info*>(rli));
+            error= 0;
+            goto end;
+          }
         }
         DBUG_PRINT("debug", ("Table: %s.%s is compatible with master"
                              " - conv_table: %p",
@@ -11299,7 +11338,15 @@ int Rows_log_event::do_apply_event(Relay_log_info const *rli)
      */
     TABLE_LIST *ptr= rli->tables_to_lock;
     for (uint i=0 ;  ptr && (i < rli->tables_to_lock_count); ptr= ptr->next_global, i++)
+    {
+      /*
+        Please see comment in above 'for' loop to know the reason
+        for this if condition
+      */
+      if (ptr->parent_l)
+        continue;
       const_cast<Relay_log_info*>(rli)->m_table_map.set_table(ptr->table_id, ptr->table);
+    }
 
 #ifdef HAVE_QUERY_CACHE
 #ifdef WITH_WSREP
@@ -11317,8 +11364,7 @@ int Rows_log_event::do_apply_event(Relay_log_info const *rli)
 #endif
   }
 
-  TABLE* 
-    table= 
+  table=
     m_table= const_cast<Relay_log_info*>(rli)->m_table_map.get_table(m_table_id);
 
   DBUG_PRINT("debug", ("m_table: 0x%lx, m_table_id: %llu", (ulong) m_table,
@@ -11551,7 +11597,7 @@ AFTER_MAIN_EXEC_ROW_LOOP:
     thd->is_slave_error= 1;
     DBUG_RETURN(error);
   }
-
+end:
   if (get_flags(STMT_END_F))
   {
 
@@ -11563,12 +11609,25 @@ AFTER_MAIN_EXEC_ROW_LOOP:
 #endif /* WITH_WSREP && HAVE_QUERY_CACHE */
 
    if((error= rows_event_stmt_cleanup(rli, thd)))
-    slave_rows_error_report(ERROR_LEVEL,
-                            thd->is_error() ? 0 : error,
-                            rli, thd, table,
-                            get_type_str(),
-                            const_cast<Relay_log_info*>(rli)->get_rpl_log_name(),
-                            (ulong) log_pos);
+   {
+     if (table)
+       slave_rows_error_report(ERROR_LEVEL,
+                               thd->is_error() ? 0 : error,
+                               rli, thd, table,
+                               get_type_str(),
+                               const_cast<Relay_log_info*>(rli)->get_rpl_log_name(),
+                               (ulong) log_pos);
+     else
+     {
+       rli->report(ERROR_LEVEL,
+                   thd->is_error() ? thd->get_stmt_da()->sql_errno() : error,
+                   "Error in cleaning up after an event of type:%s; %s; the group"
+                   " log file/position: %s %lu", get_type_str(),
+                   thd->is_error() ? thd->get_stmt_da()->message() : "unexpected error",
+                   const_cast<Relay_log_info*>(rli)->get_rpl_log_name(),
+                   (ulong) log_pos);
+     }
+   }
    /* We are at end of the statement (STMT_END_F flag), lets clean
      the memory which was used from thd's mem_root now.
      This needs to be done only if we are here in SQL thread context.
@@ -11610,6 +11669,11 @@ Rows_log_event::do_shall_skip(Relay_log_info *rli)
 
 static int rows_event_stmt_cleanup(Relay_log_info const *rli, THD * thd)
 {
+  DBUG_EXECUTE_IF("simulate_rows_event_cleanup_failure",
+                  {
+                    my_error(ER_ERROR_DURING_COMMIT, MYF(0), 1);
+                    return (1);
+                  });
   int error;
   {
     /*
@@ -11666,6 +11730,12 @@ static int rows_event_stmt_cleanup(Relay_log_info const *rli, THD * thd)
     thd->reset_current_stmt_binlog_format_row();
 
     const_cast<Relay_log_info*>(rli)->cleanup_context(thd, 0);
+
+    /*
+      Clean sql_command value
+    */
+    thd->lex->sql_command= SQLCOM_END;
+
   }
   return error;
 }
@@ -12506,6 +12576,16 @@ Write_rows_log_event::do_before_row_operations(const Slave_reporting_capability
   if (get_flags(STMT_END_F))
     status_var_increment(thd->status_var.com_stat[SQLCOM_INSERT]);
 
+  /*
+    Let storage engines treat this event as an INSERT command.
+
+    Set 'sql_command' as SQLCOM_INSERT after the tables are locked.
+    When locking the tables, it should be SQLCOM_END.
+    THD::decide_binlog_format which is called from "lock tables"
+    assumes that row_events will have 'sql_command' as SQLCOM_END.
+  */
+  thd->lex->sql_command= SQLCOM_INSERT;
+
   /**
      todo: to introduce a property for the event (handler?) which forces
      applying the event in the replace (idempotent) fashion.
@@ -13025,6 +13105,17 @@ Delete_rows_log_event::do_before_row_operations(const Slave_reporting_capability
    */
   if (get_flags(STMT_END_F))
     status_var_increment(thd->status_var.com_stat[SQLCOM_DELETE]);  
+
+  /*
+    Let storage engines treat this event as a DELETE command.
+
+    Set 'sql_command' as SQLCOM_UPDATE after the tables are locked.
+    When locking the tables, it should be SQLCOM_END.
+    THD::decide_binlog_format which is called from "lock tables"
+    assumes that row_events will have 'sql_command' as SQLCOM_END.
+  */
+  thd->lex->sql_command= SQLCOM_DELETE;
+
   error= row_operations_scan_and_key_setup();
   DBUG_RETURN(error);
 
@@ -13134,6 +13225,17 @@ Update_rows_log_event::do_before_row_operations(const Slave_reporting_capability
   */
   if (get_flags(STMT_END_F))
     status_var_increment(thd->status_var.com_stat[SQLCOM_UPDATE]);
+
+  /*
+    Let storage engines treat this event as an UPDATE command.
+
+    Set 'sql_command' as SQLCOM_UPDATE after the tables are locked.
+    When locking the tables, it should be SQLCOM_END.
+    THD::decide_binlog_format which is called from "lock tables"
+    assumes that row_events will have 'sql_command' as SQLCOM_END.
+   */
+  thd->lex->sql_command= SQLCOM_UPDATE;
+
   error= row_operations_scan_and_key_setup();
   DBUG_RETURN(error);
 
index 86059035a278060e3b1abdb14f327d198f2f6e86..d4884af637384e7478c5b96dff62b31300789b98 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 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
@@ -53,7 +53,9 @@
 class String;
 typedef ulonglong sql_mode_t;
 typedef struct st_db_worker_hash_entry db_worker_hash_entry;
-
+#if defined(HAVE_REPLICATION) && !defined(MYSQL_CLIENT)
+int ignored_error_code(int err_code);
+#endif
 #define PREFIX_SQL_LOAD "SQL_LOAD-"
 
 /**
@@ -1311,7 +1313,7 @@ public:
   }
   virtual bool write_data_header(IO_CACHE* file)
   { return 0; }
-  virtual bool write_data_body(IO_CACHE* file __attribute__((unused)))
+  virtual bool write_data_body(IO_CACHE* file MY_ATTRIBUTE((unused)))
   { return 0; }
   inline time_t get_time()
   {
@@ -4520,7 +4522,7 @@ public:
   static bool binlog_row_logging_function(THD *thd, TABLE *table,
                                           bool is_transactional,
                                           const uchar *before_record
-                                          __attribute__((unused)),
+                                          MY_ATTRIBUTE((unused)),
                                           const uchar *after_record)
   {
     return thd->binlog_write_row(table, is_transactional,
@@ -4660,7 +4662,7 @@ public:
                                           bool is_transactional,
                                           const uchar *before_record,
                                           const uchar *after_record
-                                          __attribute__((unused)))
+                                          MY_ATTRIBUTE((unused)))
   {
     return thd->binlog_delete_row(table, is_transactional,
                                   before_record, NULL);
index d2be228b2acb4f50d6da0949c11cc198e0eee87a..49a14c007f6857784991cfc1539302dc569264de 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2007, 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
@@ -126,16 +126,25 @@ Old_rows_log_event::do_apply_event(Old_rows_log_event *ev, const Relay_log_info
     /*
       When the open and locking succeeded, we check all tables to
       ensure that they still have the correct type.
-
-      We can use a down cast here since we know that every table added
-      to the tables_to_lock is a RPL_TABLE_LIST.
     */
 
     {
-      RPL_TABLE_LIST *ptr= rli->tables_to_lock;
-      for (uint i= 0 ; ptr&& (i< rli->tables_to_lock_count); 
-           ptr= static_cast<RPL_TABLE_LIST*>(ptr->next_global), i++)
+      TABLE_LIST *table_list_ptr= rli->tables_to_lock;
+      for (uint i=0 ; table_list_ptr&& (i< rli->tables_to_lock_count);
+           table_list_ptr= table_list_ptr->next_global, i++)
       {
+        /*
+          Please see comment in log_event.cc-Rows_log_event::do_apply_event()
+          function for the explanation of the below if condition
+        */
+        if (table_list_ptr->parent_l)
+          continue;
+        /*
+          We can use a down cast here since we know that every table added
+          to the tables_to_lock is a RPL_TABLE_LIST(or child table which is
+          skipped above).
+        */
+        RPL_TABLE_LIST *ptr=static_cast<RPL_TABLE_LIST*>(table_list_ptr);
         DBUG_ASSERT(ptr->m_tabledef_valid);
         TABLE *conv_table;
         if (!ptr->m_tabledef.compatible_with(thd, const_cast<Relay_log_info*>(rli),
@@ -169,7 +178,15 @@ Old_rows_log_event::do_apply_event(Old_rows_log_event *ev, const Relay_log_info
      */
     TABLE_LIST *ptr= rli->tables_to_lock;
     for (uint i=0; ptr && (i < rli->tables_to_lock_count); ptr= ptr->next_global, i++)
+    {
+      /*
+        Please see comment in log_event.cc-Rows_log_event::do_apply_event()
+        function for the explanation of the below if condition
+       */
+      if (ptr->parent_l)
+        continue;
       const_cast<Relay_log_info*>(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);
 #endif
@@ -1538,16 +1555,25 @@ int Old_rows_log_event::do_apply_event(Relay_log_info const *rli)
     /*
       When the open and locking succeeded, we check all tables to
       ensure that they still have the correct type.
-
-      We can use a down cast here since we know that every table added
-      to the tables_to_lock is a RPL_TABLE_LIST.
     */
 
     {
-      RPL_TABLE_LIST *ptr= rli->tables_to_lock;
-      for (uint i= 0 ; ptr&& (i< rli->tables_to_lock_count);
-           ptr= static_cast<RPL_TABLE_LIST*>(ptr->next_global), i++)
+      TABLE_LIST *table_list_ptr= rli->tables_to_lock;
+      for (uint i=0; table_list_ptr&& (i< rli->tables_to_lock_count);
+           table_list_ptr= static_cast<RPL_TABLE_LIST*>(table_list_ptr->next_global), i++)
       {
+        /*
+          Please see comment in log_event.cc-Rows_log_event::do_apply_event()
+          function for the explanation of the below if condition
+        */
+        if (table_list_ptr->parent_l)
+          continue;
+        /*
+          We can use a down cast here since we know that every table added
+          to the tables_to_lock is a RPL_TABLE_LIST (or child table which is
+          skipped above).
+        */
+        RPL_TABLE_LIST *ptr=static_cast<RPL_TABLE_LIST*>(table_list_ptr);
         TABLE *conv_table;
         if (ptr->m_tabledef.compatible_with(thd, const_cast<Relay_log_info*>(rli),
                                             ptr->table, &conv_table))
index e6f3cc02312a7da0f93d9ce537223c46b7f69c38..3995c8114f9f266f243955b1320daff27995bd7c 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2007, 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
@@ -369,7 +369,7 @@ public:
   static bool binlog_row_logging_function(THD *thd, TABLE *table,
                                           bool is_transactional,
                                           const uchar *before_record
-                                          __attribute__((unused)),
+                                          MY_ATTRIBUTE((unused)),
                                           const uchar *after_record)
   {
     return thd->binlog_write_row(table, is_transactional,
@@ -518,7 +518,7 @@ public:
                                           bool is_transactional,
                                           const uchar *before_record,
                                           const uchar *after_record
-                                          __attribute__((unused)))
+                                          MY_ATTRIBUTE((unused)))
   {
     return thd->binlog_delete_row(table, is_transactional,
                                   before_record, NULL);
index 6f3d730e56eb996f2309b90bd8234419a2677e46..8e6221660045542914a0b8f0164877d5a5615123 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2007, 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
@@ -107,7 +107,7 @@ void MDL_key::init_psi_keys()
 {
   int i;
   int count;
-  PSI_stage_info *info __attribute__((unused));
+  PSI_stage_info *info MY_ATTRIBUTE((unused));
 
   count= array_elements(MDL_key::m_namespace_to_wait_state_name);
   for (i= 0; i<count; i++)
@@ -664,7 +664,7 @@ extern "C"
 {
 static uchar *
 mdl_locks_key(const uchar *record, size_t *length,
-              my_bool not_used __attribute__((unused)))
+              my_bool not_used MY_ATTRIBUTE((unused)))
 {
   MDL_lock *lock=(MDL_lock*) record;
   *length= lock->key.length();
index 5645580a07d460bb59300e29c32d5a2b231ff4b1..aeb58c5cc18f51a20c5f006cbac0bc491513c47c 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 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
@@ -49,7 +49,7 @@ extern "C" {
 
 
 int _my_b_net_read(register IO_CACHE *info, uchar *Buffer,
-                  size_t Count __attribute__((unused)))
+                  size_t Count MY_ATTRIBUTE((unused)))
 {
   ulong read_length;
   NET *net= &(current_thd)->net;
index aaa60ad9249733d15d542510e7ce2e4138dc8acc..bfa9028664ec4c480bb11b2196097102ec13ee45 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights
+/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights
    reserved.
 
    This program is free software; you can redistribute it and/or modify
@@ -1332,7 +1332,7 @@ static void close_server_sock();
 static void clean_up_mutexes(void);
 static void wait_for_signal_thread_to_end(void);
 static void create_pid_file();
-static void mysqld_exit(int exit_code) __attribute__((noreturn));
+static void mysqld_exit(int exit_code) MY_ATTRIBUTE((noreturn));
 #endif
 static void delete_pid_file(myf flags);
 static void end_ssl();
@@ -1782,7 +1782,7 @@ static void __cdecl kill_server(int sig_ptr)
 
 
 #if defined(USE_ONE_SIGNAL_HAND)
-pthread_handler_t kill_server_thread(void *arg __attribute__((unused)))
+pthread_handler_t kill_server_thread(void *arg MY_ATTRIBUTE((unused)))
 {
   my_thread_init();       // Initialize new thread
   kill_server(0);
@@ -2727,7 +2727,7 @@ void close_connection(THD *thd, uint sql_errno)
 
 /** Called when a thread is aborted. */
 /* ARGSUSED */
-extern "C" sig_handler end_thread_signal(int sig __attribute__((unused)))
+extern "C" sig_handler end_thread_signal(int sig MY_ATTRIBUTE((unused)))
 {
   THD *thd=current_thd;
   my_safe_printf_stderr("end_thread_signal %p", thd);
@@ -2939,7 +2939,7 @@ void kill_blocked_pthreads()
   @todo
     One should have to fix that thr_alarm know about this thread too.
 */
-extern "C" sig_handler abort_thread(int sig __attribute__((unused)))
+extern "C" sig_handler abort_thread(int sig MY_ATTRIBUTE((unused)))
 {
   THD *thd=current_thd;
   DBUG_ENTER("abort_thread");
@@ -3250,7 +3250,7 @@ static void start_signal_handler(void)
 
 /** This threads handles all signals and alarms. */
 /* ARGSUSED */
-pthread_handler_t signal_hand(void *arg __attribute__((unused)))
+pthread_handler_t signal_hand(void *arg MY_ATTRIBUTE((unused)))
 {
   sigset_t set;
   int sig;
@@ -4237,6 +4237,22 @@ int init_common_variables()
   if (!opt_slow_logname || !*opt_slow_logname)
     opt_slow_logname= make_default_log_name(slow_logname_path, "-slow.log");
 
+  if (opt_logname &&
+      !is_valid_log_name(opt_logname, strlen(opt_logname)))
+  {
+    sql_print_error("Invalid value for --general_log_file: %s",
+                    opt_logname);
+    return 1;
+  }
+
+  if (opt_slow_logname &&
+      !is_valid_log_name(opt_slow_logname, strlen(opt_slow_logname)))
+  {
+    sql_print_error("Invalid value for --slow_query_log_file: %s",
+                    opt_slow_logname);
+    return 1;
+  }
+
 #if defined(ENABLED_DEBUG_SYNC)
   /* Initialize the debug sync facility. See debug_sync.cc. */
   if (debug_sync_init())
@@ -4671,7 +4687,7 @@ static int init_server_auto_options()
   /* load_defaults require argv[0] is not null */
   char **argv= &name;
   int argc= 1;
-  if (!check_file_permissions(fname))
+  if (!check_file_permissions(fname, false))
   {
     /*
       Found a world writable file hence removing it as it is dangerous to write
@@ -4702,6 +4718,24 @@ static int init_server_auto_options()
       sql_print_error("The server_uuid stored in auto.cnf file is not a valid UUID.");
       goto err;
     }
+    /*
+      Uuid::is_valid() cannot do strict check on the length as it will be
+      called by GTID::is_valid() as well (GTID = UUID:seq_no). We should
+      explicitly add the *length check* here in this function.
+
+      If UUID length is less than '36' (UUID_LENGTH), that error case would have
+      got caught in above is_valid check. The below check is to make sure that
+      length is not greater than UUID_LENGTH i.e., there are no extra characters
+      (Garbage) at the end of the valid UUID.
+    */
+    if (strlen(uuid) > UUID_LENGTH)
+    {
+      sql_print_error("Garbage characters found at the end of the server_uuid "
+                      "value in auto.cnf file. It should be of length '%d' "
+                      "(UUID_LENGTH). Clear it and restart the server. ",
+                      UUID_LENGTH);
+      goto err;
+    }
     strcpy(server_uuid, uuid);
   }
   else
@@ -4827,9 +4861,10 @@ static int init_server_components()
 
   proc_info_hook= set_thd_stage_info;
 
-#ifdef WITH_PERFSCHEMA_STORAGE_ENGINE
   /*
-    Parsing the performance schema command line option may have reported
+    Parsing the performance schema command line option and
+    adjusting the values for options such as "open_files_limit",
+    "max_connections", and "table_cache_size" may have reported
     warnings/information messages.
     Now that the logger is finally available, and redirected
     to the proper file when the --log--error option is used,
@@ -4837,7 +4872,6 @@ static int init_server_components()
   */
   buffered_logs.print();
   buffered_logs.cleanup();
-#endif /* WITH_PERFSCHEMA_STORAGE_ENGINE */
 
   /*
     Now that the logger is available, redirect character set
@@ -5189,8 +5223,14 @@ a file name for --log-bin-index option", opt_binlog_index_name);
       if (WSREP_ON)
         tc_log=  &tc_log_dummy;
       else
-#endif /* WITH_WSREP */
+        /*
+         * wsrep hton grows total_ha_2pc count to 2, even in native mysql mode.
+         * Have to force using tc_log_dummy here, as tc_log_mmap segfaults
+         */
+        tc_log=  &tc_log_dummy;
+#else
       tc_log= &tc_log_mmap;
+#endif /* WITH_WSREP */
   }
   else
     tc_log= &tc_log_dummy;
@@ -5869,6 +5909,7 @@ int mysqld_main(int argc, char **argv)
   orig_argc= argc;
   orig_argv= argv;
   my_getopt_use_args_separator= TRUE;
+  my_defaults_read_login_file= FALSE;
   if (load_defaults(MYSQL_CONFIG_NAME, load_default_groups, &argc, &argv))
     return 1;
   my_getopt_use_args_separator= FALSE;
@@ -8914,7 +8955,6 @@ static int mysql_init_variables(void)
   opt_logname= opt_update_logname= opt_binlog_index_name= opt_slow_logname= 0;
   opt_tc_log_file= (char *)"tc.log";      // no hostname in tc_log file name !
   opt_secure_auth= 0;
-  opt_secure_file_priv= NULL;
   opt_myisam_log= 0;
   mqh_used= 0;
   kill_in_progress= 0;
@@ -9094,7 +9134,7 @@ static int mysql_init_variables(void)
   (void) strmake(mysql_home, tmpenv, sizeof(mysql_home)-1);
 #endif
 #ifdef WITH_WSREP
-  if (WSREP_ON && wsrep_init_vars())
+  if (wsrep_init_vars())
     return 1;
 #endif
   return 0;
@@ -9102,7 +9142,7 @@ static int mysql_init_variables(void)
 
 my_bool
 mysqld_get_one_option(int optid,
-                      const struct my_option *opt __attribute__((unused)),
+                      const struct my_option *opt MY_ATTRIBUTE((unused)),
                       char *argument)
 {
   switch(optid) {
@@ -9118,6 +9158,7 @@ mysqld_get_one_option(int optid,
     break;
   case 'b':
     strmake(mysql_home,argument,sizeof(mysql_home)-1);
+    mysql_home_ptr= mysql_home;
     break;
   case 'C':
     if (default_collation_name == compiled_default_collation_name)
@@ -9862,9 +9903,9 @@ bool is_secure_file_path(char *path)
   char buff1[FN_REFLEN], buff2[FN_REFLEN];
   size_t opt_secure_file_priv_len;
   /*
-    All paths are secure if opt_secure_file_path is 0
+    All paths are secure if opt_secure_file_priv is 0
   */
-  if (!opt_secure_file_priv)
+  if (!opt_secure_file_priv[0])
     return TRUE;
 
   opt_secure_file_priv_len= strlen(opt_secure_file_priv);
@@ -9872,6 +9913,9 @@ bool is_secure_file_path(char *path)
   if (strlen(path) >= FN_REFLEN)
     return FALSE;
 
+  if (!my_strcasecmp(system_charset_info, opt_secure_file_priv, "NULL"))
+    return FALSE;
+
   if (my_realpath(buff1, path, 0))
   {
     /*
@@ -9938,9 +9982,183 @@ bool is_mysql_datadir_path(const char *path)
 
 }
 
+/**
+  check_secure_file_priv_path : Checks path specified through
+  --secure-file-priv and raises warning in following cases:
+  1. If path is empty string or NULL and mysqld is not running
+     with --bootstrap mode.
+  2. If path can access data directory
+  3. If path points to a directory which is accessible by
+     all OS users (non-Windows build only)
+
+  It throws error in following cases:
+
+  1. If path normalization fails
+  2. If it can not get stats of the directory
+
+  @params NONE
+
+  Assumptions :
+  1. Data directory path has been normalized
+  2. opt_secure_file_priv has been normalized unless it is set
+     to "NULL".
+
+  @returns Status of validation
+    @retval true : Validation is successful with/without warnings
+    @retval false : Validation failed. Error is raised.
+*/
+
+bool check_secure_file_priv_path()
+{
+  char datadir_buffer[FN_REFLEN+1]={0};
+  char plugindir_buffer[FN_REFLEN+1]={0};
+  char whichdir[20]= {0};
+  size_t opt_plugindir_len= 0;
+  size_t opt_datadir_len= 0;
+  size_t opt_secure_file_priv_len= 0;
+  bool warn= false;
+  bool case_insensitive_fs;
+#ifndef _WIN32
+  MY_STAT dir_stat;
+#endif
+
+  if (!opt_secure_file_priv[0])
+  {
+    if (opt_bootstrap)
+    {
+      /*
+        Do not impose --secure-file-priv restriction
+        in --bootstrap mode
+      */
+      sql_print_information("Ignoring --secure-file-priv value as server is "
+                            "running with --bootstrap.");
+    }
+    else
+    {
+      sql_print_warning("Insecure configuration for --secure-file-priv: "
+                        "Current value does not restrict location of generated "
+                        "files. Consider setting it to a valid, "
+                        "non-empty path.");
+    }
+    return true;
+  }
+
+  /*
+    Setting --secure-file-priv to NULL would disable
+    reading/writing from/to file
+  */
+  if(!my_strcasecmp(system_charset_info, opt_secure_file_priv, "NULL"))
+  {
+    sql_print_information("--secure-file-priv is set to NULL. "
+                          "Operations related to importing and exporting "
+                          "data are disabled");
+    return true;
+  }
+
+  /*
+    Check if --secure-file-priv can access data directory
+  */
+  opt_secure_file_priv_len= strlen(opt_secure_file_priv);
+
+  /*
+    Adds dir seperator at the end.
+    This is required in subsequent comparison
+  */
+  convert_dirname(datadir_buffer, mysql_unpacked_real_data_home, NullS);
+  opt_datadir_len= strlen(datadir_buffer);
+
+  case_insensitive_fs=
+    (test_if_case_insensitive(datadir_buffer) == 1);
+
+  if (!case_insensitive_fs)
+  {
+    if (!strncmp(datadir_buffer, opt_secure_file_priv,
+          opt_datadir_len < opt_secure_file_priv_len ?
+          opt_datadir_len : opt_secure_file_priv_len))
+    {
+      warn= true;
+      strcpy(whichdir, "Data directory");
+    }
+  }
+  else
+  {
+    if (!files_charset_info->coll->strnncoll(files_charset_info,
+          (uchar *) datadir_buffer,
+          opt_datadir_len,
+          (uchar *) opt_secure_file_priv,
+          opt_secure_file_priv_len,
+          TRUE))
+    {
+      warn= true;
+      strcpy(whichdir, "Data directory");
+    }
+  }
+
+  /*
+    Don't bother comparing --secure-file-priv with --plugin-dir
+    if we already have a match against --datadir or
+    --plugin-dir is not pointing to a valid directory.
+  */
+  if (!warn && !my_realpath(plugindir_buffer, opt_plugin_dir, 0))
+  {
+    convert_dirname(plugindir_buffer, plugindir_buffer, NullS);
+    opt_plugindir_len= strlen(plugindir_buffer);
+
+    if (!case_insensitive_fs)
+    {
+      if (!strncmp(plugindir_buffer, opt_secure_file_priv,
+          opt_plugindir_len < opt_secure_file_priv_len ?
+          opt_plugindir_len : opt_secure_file_priv_len))
+      {
+        warn= true;
+        strcpy(whichdir, "Plugin directory");
+      }
+    }
+    else
+    {
+      if (!files_charset_info->coll->strnncoll(files_charset_info,
+          (uchar *) plugindir_buffer,
+          opt_plugindir_len,
+          (uchar *) opt_secure_file_priv,
+          opt_secure_file_priv_len,
+          TRUE))
+      {
+        warn= true;
+        strcpy(whichdir, "Plugin directory");
+      }
+    }
+  }
+
+
+  if (warn)
+    sql_print_warning("Insecure configuration for --secure-file-priv: "
+                      "%s is accessible through "
+                      "--secure-file-priv. Consider choosing a different "
+                      "directory.", whichdir);
+
+#ifndef _WIN32
+  /*
+     Check for --secure-file-priv directory's permission
+  */
+  if (!(my_stat(opt_secure_file_priv, &dir_stat, MYF(0))))
+  {
+    sql_print_error("Failed to get stat for directory pointed out "
+                    "by --secure-file-priv");
+    return false;
+  }
+
+  if (dir_stat.st_mode & S_IRWXO)
+    sql_print_warning("Insecure configuration for --secure-file-priv: "
+                      "Location is accessible to all OS users. "
+                      "Consider choosing a different directory.");
+#endif
+  return true;
+}
+
 static int fix_paths(void)
 {
   char buff[FN_REFLEN],*pos;
+  bool secure_file_priv_nonempty= false;
   convert_dirname(mysql_home,mysql_home,NullS);
   /* Resolve symlinks to allow 'mysql_home' to be a relative symlink */
   my_realpath(mysql_home,mysql_home,MYF(0));
@@ -9997,25 +10215,57 @@ static int fix_paths(void)
   /*
     Convert the secure-file-priv option to system format, allowing
     a quick strcmp to check if read or write is in an allowed dir
-   */
-  if (opt_secure_file_priv)
+  */
+  if (opt_bootstrap)
+    opt_secure_file_priv= EMPTY_STR.str;
+  secure_file_priv_nonempty= opt_secure_file_priv[0] ? true : false;
+
+  if (secure_file_priv_nonempty && strlen(opt_secure_file_priv) > FN_REFLEN)
   {
-    if (*opt_secure_file_priv == 0)
-      opt_secure_file_priv= NULL;
-    else
+    sql_print_warning("Value for --secure-file-priv is longer than maximum "
+                      "limit of %d", FN_REFLEN-1);
+    return 1;
+  }
+
+  memset(buff, 0, sizeof(buff));
+  if (secure_file_priv_nonempty &&
+      my_strcasecmp(system_charset_info, opt_secure_file_priv, "NULL"))
+  {
+    int retval= my_realpath(buff, opt_secure_file_priv, MYF(MY_WME));
+    if (!retval)
     {
-      if (strlen(opt_secure_file_priv) >= FN_REFLEN)
-        opt_secure_file_priv[FN_REFLEN-1]= '\0';
-      if (my_realpath(buff, opt_secure_file_priv, 0))
+      convert_dirname(secure_file_real_path, buff, NullS);
+#ifdef WIN32
+      MY_DIR *dir= my_dir(secure_file_real_path, MYF(MY_DONT_SORT+MY_WME));
+      if (!dir)
       {
-        sql_print_warning("Failed to normalize the argument for --secure-file-priv.");
-        return 1;
+        retval= 1;
       }
-      convert_dirname(secure_file_real_path, buff, NullS);
-      opt_secure_file_priv= secure_file_real_path;
+      else
+      {
+        my_dirend(dir);
+      }
+#endif
     }
+
+    if (retval)
+    {
+      char err_buffer[FN_REFLEN];
+      my_snprintf(err_buffer, FN_REFLEN-1,
+                  "Failed to access directory for --secure-file-priv."
+                  " Please make sure that directory exists and is "
+                  "accessible by MySQL Server. Supplied value : %s",
+                  opt_secure_file_priv);
+      err_buffer[FN_REFLEN-1]='\0';
+      sql_print_error("%s", err_buffer);
+      return 1;
+    }
+    opt_secure_file_priv= secure_file_real_path;
   }
 
+  if (!check_secure_file_priv_path())
+    return 1;
+
   return 0;
 }
 
index 88daae7d539b7b6a233fa00f233b235f01173577..cb58e68976626e69e0b1cf6757851ef28043e256 100644 (file)
@@ -718,7 +718,7 @@ enum enum_query_type
     it evaluates to. Should be used for error messages, so that they
     don't reveal values.
   */
-  QT_NO_DATA_EXPANSION= (1 << 9),
+  QT_NO_DATA_EXPANSION= (1 << 9)
 };
 
 /* query_id */
@@ -726,10 +726,10 @@ typedef int64 query_id_t;
 extern query_id_t global_query_id;
 extern my_atomic_rwlock_t global_query_id_lock;
 
-void unireg_end(void) __attribute__((noreturn));
+void unireg_end(void) MY_ATTRIBUTE((noreturn));
 
 /* increment query_id and return it.  */
-inline __attribute__((warn_unused_result)) query_id_t next_query_id()
+inline MY_ATTRIBUTE((warn_unused_result)) query_id_t next_query_id()
 {
   query_id_t id;
   my_atomic_rwlock_wrlock(&global_query_id_lock);
@@ -742,7 +742,7 @@ inline __attribute__((warn_unused_result)) query_id_t next_query_id()
   TODO: Replace this with an inline function.
  */
 #ifndef EMBEDDED_LIBRARY
-extern "C" void unireg_abort(int exit_code) __attribute__((noreturn));
+extern "C" void unireg_abort(int exit_code) MY_ATTRIBUTE((noreturn));
 #else
 extern "C" void unireg_clear(int exit_code);
 #define unireg_abort(exit_code) do { unireg_clear(exit_code); DBUG_RETURN(exit_code); } while(0)
index 06a5bcb19578e8a3715f1225925a8b2e72610c51..53c3034ca51540767b19484455a931a582df99ef 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 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
@@ -191,7 +191,7 @@ my_bool net_realloc(NET *net, size_t length)
 */
 
 void net_clear(NET *net,
-               my_bool check_buffer __attribute__((unused)))
+               my_bool check_buffer MY_ATTRIBUTE((unused)))
 {
   DBUG_ENTER("net_clear");
 
@@ -238,21 +238,19 @@ my_bool net_flush(NET *net)
 */
 
 static my_bool
-net_should_retry(NET *net, uint *retry_count __attribute__((unused)))
+net_should_retry(NET *net, uint *retry_count MY_ATTRIBUTE((unused)))
 {
   my_bool retry;
 
-#if !defined(MYSQL_SERVER) && defined(THREAD_SAFE_CLIENT)
+#ifndef MYSQL_SERVER
   /*
-    In the thread safe client library, interrupted I/O operations
-    are always retried.  Otherwise, its either a timeout or a
-    unrecoverable error.
+    In the  client library, interrupted I/O operations are always retried.
+    Otherwise, it's either a timeout or an unrecoverable error.
   */
   retry= vio_should_retry(net->vio);
 #else
   /*
-    In the non-thread safe client library, or in the server,
-    interrupted I/O operations are retried up to a limit.
+    In the server, interrupted I/O operations are retried up to a limit.
     In this scenario, pthread_kill can be used to wake up
     (interrupt) threads waiting for I/O.
   */
@@ -1047,3 +1045,17 @@ void my_net_set_write_timeout(NET *net, uint timeout)
   DBUG_VOID_RETURN;
 }
 
+#if defined(EXPORT_SYMVER16)
+#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
+#endif  // EXPORT_SYMVER16
index 95dd5370d7a81e55b328f2666bc715fa07ee4add..9f4ecbe2ed77ead6cfd1ec2761d821702d9a73ff 100644 (file)
@@ -13030,9 +13030,16 @@ int QUICK_GROUP_MIN_MAX_SELECT::reset(void)
   }
   if (quick_prefix_select && quick_prefix_select->reset())
     DBUG_RETURN(1);
+
   result= head->file->ha_index_last(record);
-  if (result == HA_ERR_END_OF_FILE)
-    DBUG_RETURN(0);
+  if (result != 0)
+  {
+    if (result == HA_ERR_END_OF_FILE)
+      DBUG_RETURN(0);
+    else
+      DBUG_RETURN(result);
+  }
+
   /* Save the prefix of the last group. */
   key_copy(last_prefix, record, index_info, group_prefix_len);
 
index c3a970d7242a05b31155a22230acbb7202b6c055..2d660eb3619593b8e674e0934b43dd4b3fcc1b66 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2006, 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
@@ -945,7 +945,7 @@ partition_element *partition_info::get_part_elem(const char *partition_name,
 */
 
 static const char *get_part_name_from_elem(const char *name, size_t *length,
-                                      my_bool not_used __attribute__((unused)))
+                                      my_bool not_used MY_ATTRIBUTE((unused)))
 {
   *length= strlen(name);
   return name;
@@ -3127,6 +3127,30 @@ void partition_info::print_debug(const char *str, uint *value)
     DBUG_PRINT("info", ("parser: %s", str));
   DBUG_VOID_RETURN;
 }
+
+bool has_external_data_or_index_dir(partition_info &pi)
+{
+  List_iterator<partition_element> part_it(pi.partitions);
+  for (partition_element *part= part_it++; part; part= part_it++)
+  {
+    if (part->data_file_name != NULL || part->index_file_name != NULL)
+    {
+      return true;
+    }
+    List_iterator<partition_element> subpart_it(part->subpartitions);
+    for (const partition_element *subpart= subpart_it++;
+         subpart;
+         subpart= subpart_it++)
+    {
+      if (subpart->data_file_name != NULL || subpart->index_file_name != NULL)
+      {
+        return true;
+      }
+    }
+  }
+  return false;
+}
+
 #else /* WITH_PARTITION_STORAGE_ENGINE */
  /*
    For builds without partitioning we need to define these functions
index 37f00eaf1cc7d9c5cc8ebe6ad94febeebb791fe9..e98d7fe88189fdbb4a632e59429031e4f3aed0ee 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef PARTITION_INFO_INCLUDED
 #define PARTITION_INFO_INCLUDED
 
-/* Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2006, 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
@@ -404,4 +404,15 @@ void init_all_partitions_iterator(partition_info *part_info,
   part_iter->get_next= get_next_partition_id_range;
 }
 
+/**
+  Predicate which returns true if any partition or subpartition uses
+  an external data directory or external index directory.
+
+  @param pi partitioning information
+  @retval true if any partition or subpartition has an external
+  data directory or external index directory.
+  @retval false otherwise
+ */
+bool has_external_data_or_index_dir(partition_info &pi);
+
 #endif /* PARTITION_INFO_INCLUDED */
index 4f4c8bc4538c9a2f61e25e031f16a40dc4e17f9d..d8d2ca094968086c276c3e0175d04e47f2ed39f2 100644 (file)
@@ -1,5 +1,5 @@
 /*
-   Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+   Copyright (c) 2000, 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
@@ -584,3 +584,18 @@ void make_password_from_salt(char *to, const uint8 *hash_stage2)
   octet2hex(to, (const char*) hash_stage2, SHA1_HASH_SIZE);
 }
 
+#if defined(EXPORT_SYMVER16)
+#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
+#endif  /* EXPORT_SYMVER16 */
index 22cdf906b2dbe11c1027362a7453813c8325b809..07b4926f5e9eee8fcbcf19b3056b50c9339a5253 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 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
@@ -508,7 +508,7 @@ extern "C" uchar *get_table_key(const uchar *, size_t *, my_bool);
 extern "C" void free_table_ent(void* a);
 
 uchar *get_table_key(const uchar* a, size_t *len,
-                     my_bool __attribute__((unused)))
+                     my_bool MY_ATTRIBUTE((unused)))
 {
   TABLE_RULE_ENT *e= (TABLE_RULE_ENT *) a;
 
index a8d0caf44ebb8bae71bdec4fa395d35fd7d70395..f95a39f17cb0da9d5e586bd88cb3c3231470a3d6 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2010, 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
@@ -21,7 +21,7 @@ Rpl_info_dummy::Rpl_info_dummy(const int nparam)
 {
 }
 
-int Rpl_info_dummy::do_init_info(uint instance __attribute__((unused)))
+int Rpl_info_dummy::do_init_info(uint instance MY_ATTRIBUTE((unused)))
 {
   return 0;
 }
@@ -51,13 +51,13 @@ enum_return_check Rpl_info_dummy::do_check_info()
   return REPOSITORY_DOES_NOT_EXIST;
 }
 
-enum_return_check Rpl_info_dummy::do_check_info(uint instance __attribute__((unused)))
+enum_return_check Rpl_info_dummy::do_check_info(uint instance MY_ATTRIBUTE((unused)))
 {
   DBUG_ASSERT(!abort);
   return REPOSITORY_DOES_NOT_EXIST;
 }
 
-int Rpl_info_dummy::do_flush_info(const bool force __attribute__((unused)))
+int Rpl_info_dummy::do_flush_info(const bool force MY_ATTRIBUTE((unused)))
 {
   DBUG_ASSERT(!abort);
   return 0;
@@ -85,105 +85,105 @@ uint Rpl_info_dummy::do_get_rpl_info_type()
   return INFO_REPOSITORY_DUMMY;
 }
 
-bool Rpl_info_dummy::do_set_info(const int pos __attribute__((unused)),
-                                const char *value __attribute__((unused)))
+bool Rpl_info_dummy::do_set_info(const int pos MY_ATTRIBUTE((unused)),
+                                const char *value MY_ATTRIBUTE((unused)))
 {
   DBUG_ASSERT(!abort);
 
   return FALSE;
 }
 
-bool Rpl_info_dummy::do_set_info(const int pos __attribute__((unused)),
-                                const uchar *value __attribute__((unused)),
-                                const size_t size __attribute__((unused)))
+bool Rpl_info_dummy::do_set_info(const int pos MY_ATTRIBUTE((unused)),
+                                const uchar *value MY_ATTRIBUTE((unused)),
+                                const size_t size MY_ATTRIBUTE((unused)))
 {
   DBUG_ASSERT(!abort);
 
   return FALSE;
 }
 
-bool Rpl_info_dummy::do_set_info(const int pos __attribute__((unused)),
-                                const ulong value __attribute__((unused)))
+bool Rpl_info_dummy::do_set_info(const int pos MY_ATTRIBUTE((unused)),
+                                const ulong value MY_ATTRIBUTE((unused)))
 {
   DBUG_ASSERT(!abort);
 
   return FALSE;
 }
 
-bool Rpl_info_dummy::do_set_info(const int pos __attribute__((unused)),
-                                const int value __attribute__((unused)))
+bool Rpl_info_dummy::do_set_info(const int pos MY_ATTRIBUTE((unused)),
+                                const int value MY_ATTRIBUTE((unused)))
 {
   DBUG_ASSERT(!abort);
 
   return FALSE;
 }
 
-bool Rpl_info_dummy::do_set_info(const int pos __attribute__((unused)),
-                                const float value __attribute__((unused)))
+bool Rpl_info_dummy::do_set_info(const int pos MY_ATTRIBUTE((unused)),
+                                const float value MY_ATTRIBUTE((unused)))
 {
   DBUG_ASSERT(!abort);
 
   return FALSE;
 }
 
-bool Rpl_info_dummy::do_set_info(const int pos __attribute__((unused)),
-                                const Dynamic_ids *value __attribute__((unused)))
+bool Rpl_info_dummy::do_set_info(const int pos MY_ATTRIBUTE((unused)),
+                                const Dynamic_ids *value MY_ATTRIBUTE((unused)))
 {
   DBUG_ASSERT(!abort);
 
   return FALSE;
 }
 
-bool Rpl_info_dummy::do_get_info(const int pos __attribute__((unused)),
-                                char *value __attribute__((unused)),
-                                const size_t size __attribute__((unused)),
-                                const char *default_value __attribute__((unused)))
+bool Rpl_info_dummy::do_get_info(const int pos MY_ATTRIBUTE((unused)),
+                                char *value MY_ATTRIBUTE((unused)),
+                                const size_t size MY_ATTRIBUTE((unused)),
+                                const char *default_value MY_ATTRIBUTE((unused)))
 {
     DBUG_ASSERT(!abort);
 
   return FALSE;
 }
 
-bool Rpl_info_dummy::do_get_info(const int pos __attribute__((unused)),
-                                uchar *value __attribute__((unused)),
-                                const size_t size __attribute__((unused)),
-                                const uchar *default_value __attribute__((unused)))
+bool Rpl_info_dummy::do_get_info(const int pos MY_ATTRIBUTE((unused)),
+                                uchar *value MY_ATTRIBUTE((unused)),
+                                const size_t size MY_ATTRIBUTE((unused)),
+                                const uchar *default_value MY_ATTRIBUTE((unused)))
 {
   DBUG_ASSERT(!abort);
 
   return FALSE;
 }
 
-bool Rpl_info_dummy::do_get_info(const int pos __attribute__((unused)),
-                                ulong *value __attribute__((unused)),
-                                const ulong default_value __attribute__((unused)))
+bool Rpl_info_dummy::do_get_info(const int pos MY_ATTRIBUTE((unused)),
+                                ulong *value MY_ATTRIBUTE((unused)),
+                                const ulong default_value MY_ATTRIBUTE((unused)))
 {
   DBUG_ASSERT(!abort);
 
   return FALSE;
 }
 
-bool Rpl_info_dummy::do_get_info(const int pos __attribute__((unused)),
-                                int *value __attribute__((unused)),
-                                const int default_value __attribute__((unused)))
+bool Rpl_info_dummy::do_get_info(const int pos MY_ATTRIBUTE((unused)),
+                                int *value MY_ATTRIBUTE((unused)),
+                                const int default_value MY_ATTRIBUTE((unused)))
 {
   DBUG_ASSERT(!abort);
 
   return FALSE;
 }
 
-bool Rpl_info_dummy::do_get_info(const int pos __attribute__((unused)),
-                                float *value __attribute__((unused)),
-                                const float default_value __attribute__((unused)))
+bool Rpl_info_dummy::do_get_info(const int pos MY_ATTRIBUTE((unused)),
+                                float *value MY_ATTRIBUTE((unused)),
+                                const float default_value MY_ATTRIBUTE((unused)))
 {
   DBUG_ASSERT(!abort);
 
   return FALSE;
 }
 
-bool Rpl_info_dummy::do_get_info(const int pos __attribute__((unused)),
-                                Dynamic_ids *value __attribute__((unused)),
-                                const Dynamic_ids *default_value __attribute__((unused)))
+bool Rpl_info_dummy::do_get_info(const int pos MY_ATTRIBUTE((unused)),
+                                Dynamic_ids *value MY_ATTRIBUTE((unused)),
+                                const Dynamic_ids *default_value MY_ATTRIBUTE((unused)))
 {
   DBUG_ASSERT(!abort);
 
index 1f434e6184d2847eef7ec87ccabfdeaa6f728664..24b63bf840e41a326c44ffea63f707f934df1f32 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2010, 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
@@ -438,7 +438,7 @@ bool Rpl_info_file::do_get_info(const int pos, float *value,
 }
 
 bool Rpl_info_file::do_get_info(const int pos, Dynamic_ids *value,
-                                const Dynamic_ids *default_value __attribute__((unused)))
+                                const Dynamic_ids *default_value MY_ATTRIBUTE((unused)))
 {
   /*
     Static buffer to use most of the times. However, if it is not big
index 000c4cbed922c42f3573363b240bdca06030c905..28c8b2ce16b877f97b7d65ffe5c8cfb7deaedf62 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2010, 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
@@ -600,7 +600,7 @@ bool Rpl_info_table::do_get_info(const int pos, char *value, const size_t size,
 }
 
 bool Rpl_info_table::do_get_info(const int pos, uchar *value, const size_t size,
-                                 const uchar *default_value __attribute__((unused)))
+                                 const uchar *default_value MY_ATTRIBUTE((unused)))
 {
   if (field_values->value[pos].length() == size)
     return (!memcpy((char *) value, (char *)
@@ -661,7 +661,7 @@ bool Rpl_info_table::do_get_info(const int pos, float *value,
 }
 
 bool Rpl_info_table::do_get_info(const int pos, Dynamic_ids *value,
-                                 const Dynamic_ids *default_value __attribute__((unused)))
+                                 const Dynamic_ids *default_value MY_ATTRIBUTE((unused)))
 {
   if (value->unpack_dynamic_ids(field_values->value[pos].c_ptr_safe()))
     return TRUE;
index fa5abbf08a0043eb17a44fdeafe7e7661e81bf21..503ad4262c621c0661c5c47b0ee271a5cd7eaaaa 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2010, 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
@@ -62,7 +62,7 @@ extern TYPELIB binlog_checksum_typelib;
 
 extern "C" uint32
 *slave_list_key(SLAVE_INFO* si, size_t *len,
-               my_bool not_used __attribute__((unused)))
+               my_bool not_used MY_ATTRIBUTE((unused)))
 {
   *len = 4;
   return &si->server_id;
@@ -738,7 +738,6 @@ bool com_binlog_dump(THD *thd, char *packet, uint packet_length)
 {
   DBUG_ENTER("com_binlog_dump");
   ulong pos;
-  String slave_uuid;
   ushort flags= 0;
   const uchar* packet_position= (uchar *) packet;
   uint packet_bytes_todo= packet_length;
@@ -759,8 +758,7 @@ bool com_binlog_dump(THD *thd, char *packet, uint packet_length)
 
   DBUG_PRINT("info", ("pos=%lu flags=%d server_id=%d", pos, flags, thd->server_id));
 
-  get_slave_uuid(thd, &slave_uuid);
-  kill_zombie_dump_threads(&slave_uuid);
+  kill_zombie_dump_threads(thd);
 
   general_log_print(thd, thd->get_command(), "Log: '%s'  Pos: %ld",
                     packet + 10, (long) pos);
@@ -783,7 +781,6 @@ bool com_binlog_dump_gtid(THD *thd, char *packet, uint packet_length)
     Before going GA, we need to make this protocol extensible without
     breaking compatitibilty. /Alfranio.
   */
-  String slave_uuid;
   ushort flags= 0;
   uint32 data_size= 0;
   uint64 pos= 0;
@@ -815,8 +812,7 @@ bool com_binlog_dump_gtid(THD *thd, char *packet, uint packet_length)
   DBUG_PRINT("info", ("Slave %d requested to read %s at position %llu gtid set "
                       "'%s'.", thd->server_id, name, pos, gtid_string));
 
-  get_slave_uuid(thd, &slave_uuid);
-  kill_zombie_dump_threads(&slave_uuid);
+  kill_zombie_dump_threads(thd);
   general_log_print(thd, thd->get_command(), "Log: '%s' Pos: %llu GTIDs: '%s'",
                     name, pos, gtid_string);
   my_free(gtid_string);
@@ -888,7 +884,7 @@ void mysql_binlog_send(THD* thd, char* log_ident, my_off_t pos,
   Diagnostics_area temp_da;
   Diagnostics_area *saved_da= thd->get_stmt_da();
   thd->set_stmt_da(&temp_da);
-  bool was_killed_by_duplicate_slave_uuid= false;
+  bool was_killed_by_duplicate_slave_id= false;
 
   DBUG_ENTER("mysql_binlog_send");
   DBUG_PRINT("enter",("log_ident: '%s'  pos: %ld", log_ident, (long) pos));
@@ -1960,11 +1956,11 @@ end:
     reconnect anymore.
   */
   mysql_mutex_lock(&thd->LOCK_thd_data);
-  was_killed_by_duplicate_slave_uuid= thd->duplicate_slave_uuid;
+  was_killed_by_duplicate_slave_id= thd->duplicate_slave_id;
   mysql_mutex_unlock(&thd->LOCK_thd_data);
-  if (was_killed_by_duplicate_slave_uuid)
+  if (was_killed_by_duplicate_slave_id)
   {
-    errmsg= "A slave with the same server_uuid as this slave "
+    errmsg= "A slave with the same server_uuid/server_id as this slave "
             "has connected to the master";
     my_errno= ER_MASTER_FATAL_ERROR_READING_BINLOG;
     goto err;
@@ -2056,41 +2052,58 @@ String *get_slave_uuid(THD *thd, String *value)
 /*
 
   Kill all Binlog_dump threads which previously talked to the same slave
-  ("same" means with the same server id). Indeed, if the slave stops, if the
+  ("same" means with the same UUID(for slave versions >= 5.6) or same server id
+  (for slave versions < 5.6). Indeed, if the slave stops, if the
   Binlog_dump thread is waiting (mysql_cond_wait) for binlog update, then it
   will keep existing until a query is written to the binlog. If the master is
   idle, then this could last long, and if the slave reconnects, we could have 2
   Binlog_dump threads in SHOW PROCESSLIST, until a query is written to the
   binlog. To avoid this, when the slave reconnects and sends COM_BINLOG_DUMP,
-  the master kills any existing thread with the slave's server id (if this id is
+  the master kills any existing thread with the slave's UUID/server id (if this id is
   not zero; it will be true for real slaves, but false for mysqlbinlog when it
   sends COM_BINLOG_DUMP to get a remote binlog dump).
 
   SYNOPSIS
     kill_zombie_dump_threads()
-    slave_uuid      the slave's UUID
+    @param thd newly connected dump thread object
 
 */
 
-
-void kill_zombie_dump_threads(String *slave_uuid)
+void kill_zombie_dump_threads(THD *thd)
 {
-  if (slave_uuid->length() == 0)
+  String slave_uuid;
+  get_slave_uuid(thd, &slave_uuid);
+  if (slave_uuid.length() == 0 && thd->server_id == 0)
     return;
-  DBUG_ASSERT(slave_uuid->length() == UUID_LENGTH);
 
   mysql_mutex_lock(&LOCK_thread_count);
   THD *tmp= NULL;
   Thread_iterator it= global_thread_list_begin();
   Thread_iterator end= global_thread_list_end();
+  bool is_zombie_thread= false;
   for (; it != end; ++it)
   {
-    if ((*it) != current_thd && ((*it)->get_command() == COM_BINLOG_DUMP ||
-                                 (*it)->get_command() == COM_BINLOG_DUMP_GTID))
+    if ((*it) != thd && ((*it)->get_command() == COM_BINLOG_DUMP ||
+                         (*it)->get_command() == COM_BINLOG_DUMP_GTID))
     {
       String tmp_uuid;
-      if (get_slave_uuid((*it), &tmp_uuid) != NULL &&
-          !strncmp(slave_uuid->c_ptr(), tmp_uuid.c_ptr(), UUID_LENGTH))
+      get_slave_uuid((*it), &tmp_uuid);
+      if (slave_uuid.length())
+      {
+        is_zombie_thread= (tmp_uuid.length() &&
+                           !strncmp(slave_uuid.c_ptr(),
+                                    tmp_uuid.c_ptr(), UUID_LENGTH));
+      }
+      else
+      {
+        /*
+          Check if it is a 5.5 slave's dump thread i.e., server_id should be
+          same && dump thread should not contain 'UUID'.
+        */
+        is_zombie_thread= (((*it)->server_id == thd->server_id) &&
+                           !tmp_uuid.length());
+      }
+      if (is_zombie_thread)
       {
         tmp= *it;
         mysql_mutex_lock(&tmp->LOCK_thd_data); // Lock from delete
@@ -2107,17 +2120,30 @@ void kill_zombie_dump_threads(String *slave_uuid)
       again. We just to do kill the thread ourselves.
     */
     if (log_warnings > 1)
-      sql_print_information("While initializing dump thread for slave with "
-                            "UUID <%s>, found a zombie dump thread with "
-                            "the same UUID. Master is killing the zombie dump "
-                            "thread(%lu).", slave_uuid->c_ptr(), tmp->thread_id);
-    tmp->duplicate_slave_uuid= true;
+    {
+      if (slave_uuid.length())
+      {
+        sql_print_information("While initializing dump thread for slave with "
+                              "UUID <%s>, found a zombie dump thread with the "
+                              "same UUID. Master is killing the zombie dump "
+                              "thread(%lu).", slave_uuid.c_ptr(),
+                              tmp->thread_id);
+      }
+      else
+      {
+        sql_print_information("While initializing dump thread for slave with "
+                              "server_id <%u>, found a zombie dump thread with the "
+                              "same server_id. Master is killing the zombie dump "
+                              "thread(%lu).", thd->server_id,
+                              tmp->thread_id);
+      }
+    }
+    tmp->duplicate_slave_id= true;
     tmp->awake(THD::KILL_QUERY);
     mysql_mutex_unlock(&tmp->LOCK_thd_data);
   }
 }
 
-
 /**
   Execute a RESET MASTER statement.
 
index 94b7608336845e2521ab67e4000dbb346b77ab54..ff662b22bd8ef52697ae7c9b4f44fb67b9d682d1 100644 (file)
@@ -1,5 +1,5 @@
 #ifndef RPL_MASTER_H_INCLUDED
-/* Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2010, 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
@@ -44,7 +44,7 @@ bool show_slave_hosts(THD* thd);
 String *get_slave_uuid(THD *thd, String *value);
 bool show_master_status(THD* thd);
 bool show_binlogs(THD* thd);
-void kill_zombie_dump_threads(String *slave_uuid);
+void kill_zombie_dump_threads(THD* thd);
 
 /**
   Process a COM_BINLOG_DUMP_GTID packet.
index dba281f189a0c5f2c927a465171e7c6f84c7fc4c..37c41e7ddf00bd67a78eef140d284f01b380b572 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2006, 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
@@ -542,7 +542,7 @@ bool Master_info::write_info(Rpl_info_handler *to)
 }
 
 bool Master_info::set_password(const char* password_arg,
-                               int password_arg_size __attribute__((unused)))
+                               int password_arg_size MY_ATTRIBUTE((unused)))
 {
   bool ret= true;
   DBUG_ENTER("Master_info::set_password");
index 7ed317ea173689c8beb467f861d1f5dffae840cf..93d12c8776d1a71f27bb1e3b44675d747daf8b9f 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2007, 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
@@ -487,11 +487,30 @@ int prepare_record(TABLE *const table, const MY_BITMAP *cols, const bool check)
   */
   
   DBUG_PRINT_BITSET("debug", "cols: %s", cols);
+  /**
+    Save a reference to the original write set bitmaps.
+    We will need this to restore the bitmaps at the end.
+  */
+  MY_BITMAP *old_write_set= table->write_set;
+  /**
+    Just to be sure that tmp_set is currently not in use as
+    the read_set already.
+  */
+  DBUG_ASSERT(table->write_set != &table->tmp_set);
+  /* set the temporary write_set */
+  table->column_bitmaps_set_no_signal(table->read_set,
+                                      &table->tmp_set);
+  /**
+    Set table->write_set bits for all the columns as they
+    will be checked in set_default() function.
+  */
+  bitmap_set_all(table->write_set);
+
   for (Field **field_ptr= table->field; *field_ptr; ++field_ptr)
   {
-    if ((uint) (field_ptr - table->field) >= cols->n_bits ||
-        !bitmap_is_set(cols, field_ptr - table->field))
-    {   
+    uint field_index= (uint) (field_ptr - table->field);
+    if (field_index >= cols->n_bits || !bitmap_is_set(cols, field_index))
+    {
       Field *const f= *field_ptr;
       if ((f->flags &  NO_DEFAULT_VALUE_FLAG) &&
           (f->real_type() != MYSQL_TYPE_ENUM))
@@ -503,9 +522,17 @@ int prepare_record(TABLE *const table, const MY_BITMAP *cols, const bool check)
                             ER(ER_NO_DEFAULT_FOR_FIELD),
                             f->field_name);
       }
+      else if (f->has_insert_default_function())
+      {
+        f->set_default();
+      }
     }
   }
 
+  /* set the write_set back to original*/
+  table->column_bitmaps_set_no_signal(table->read_set,
+                                      old_write_set);
+
   DBUG_RETURN(0);
 }
 
index bf31ae45ff3431b08ac4a6c428d6870dab318939..08593b8f087ddeccd9b4b5a7e39af768e34b3ff4 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2006, 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
@@ -77,7 +77,8 @@ Relay_log_info::Relay_log_info(bool is_slave_recovery
    cur_log_fd(-1), relay_log(&sync_relaylog_period),
    is_relay_log_recovery(is_slave_recovery),
    save_temporary_tables(0),
-   cur_log_old_open_count(0), group_relay_log_pos(0), event_relay_log_pos(0),
+   cur_log_old_open_count(0), error_on_rli_init_info(false),
+   group_relay_log_pos(0), event_relay_log_pos(0),
    group_master_log_pos(0),
    gtid_set(global_sid_map, global_sid_lock),
    log_space_total(0), ignore_log_space_limit(0),
@@ -100,7 +101,7 @@ Relay_log_info::Relay_log_info(bool is_slave_recovery
    mts_group_status(MTS_NOT_IN_GROUP), reported_unsafe_warning(false),
    rli_description_event(NULL),
    sql_delay(0), sql_delay_end(0), m_flags(0), row_stmt_start_timestamp(0),
-   long_find_row_note_printed(false), error_on_rli_init_info(false)
+   long_find_row_note_printed(false)
 {
   DBUG_ENTER("Relay_log_info::Relay_log_info");
 
@@ -1343,9 +1344,7 @@ bool Relay_log_info::is_until_satisfied(THD *thd, Log_event *ev)
     break;
 
   case UNTIL_SQL_AFTER_MTS_GAPS:
-#ifndef DBUG_OFF
   case UNTIL_DONE:
-#endif
     /*
       TODO: this condition is actually post-execution or post-scheduling
             so the proper place to check it before SQL thread goes
@@ -1360,9 +1359,7 @@ bool Relay_log_info::is_until_satisfied(THD *thd, Log_event *ev)
                             "UNTIL SQL_AFTER_MTS_GAPS as it has "
                             "processed all gap transactions left from "
                             "the previous slave session.");
-#ifndef DBUG_OFF
       until_condition= UNTIL_DONE;
-#endif
       DBUG_RETURN(true);
     }
     else
@@ -1920,7 +1917,11 @@ a file name for --relay-log-index option.", opt_relaylog_index_name);
     goto err;
   }
 
-  is_relay_log_recovery= FALSE;
+  /*
+    In case of MTS the recovery is deferred until the end of global_init_info.
+  */
+  if (!mi->rli->mts_recovery_group_cnt)
+    is_relay_log_recovery= FALSE;
   DBUG_RETURN(error);
 
 err:
index f6fdcac77f575ef8a9514f2d3fcdbe7af26e5292..678d30e2e81e72de1bf6480f8fe64e7613fdf793 100644 (file)
@@ -186,6 +186,13 @@ public:
   */
   uint32 cur_log_old_open_count;
 
+  /*
+    If on init_info() call error_on_rli_init_info is true that means
+    that previous call to init_info() terminated with an error, RESET
+    SLAVE must be executed and the problem fixed manually.
+   */
+  bool error_on_rli_init_info;
+
   /*
     Let's call a group (of events) :
       - a transaction
@@ -314,10 +321,7 @@ public:
    */
   enum {UNTIL_NONE= 0, UNTIL_MASTER_POS, UNTIL_RELAY_POS,
         UNTIL_SQL_BEFORE_GTIDS, UNTIL_SQL_AFTER_GTIDS,
-        UNTIL_SQL_AFTER_MTS_GAPS
-#ifndef DBUG_OFF
-        , UNTIL_DONE
-#endif
+        UNTIL_SQL_AFTER_MTS_GAPS, UNTIL_DONE
 }
     until_condition;
   char until_log_name[FN_REFLEN];
@@ -979,12 +983,6 @@ private:
   time_t row_stmt_start_timestamp;
   bool long_find_row_note_printed;
 
-  /*
-    If on init_info() call error_on_rli_init_info is true that means
-    that previous call to init_info() terminated with an error, RESET
-    SLAVE must be executed and the problem fixed manually.
-   */
-  bool error_on_rli_init_info;
 };
 
 bool mysql_show_relaylog_events(THD* thd);
index 7b03f1baf6e1df0e015ee26461af7ed5edbfe578..2c2e134661fd6deaa716c5a1024fc0446780713e 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2011, 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
@@ -629,7 +629,7 @@ static  mysql_cond_t slave_worker_hash_cond;
 
 
 extern "C" uchar *get_key(const uchar *record, size_t *length,
-                          my_bool not_used __attribute__((unused)))
+                          my_bool not_used MY_ATTRIBUTE((unused)))
 {
   DBUG_ENTER("get_key");
 
@@ -1490,7 +1490,7 @@ ulong Slave_committed_queue::move_queue_head(DYNAMIC_ARRAY *ws)
     Slave_worker *w_i;
     Slave_job_group *ptr_g, g;
     char grl_name[FN_REFLEN];
-    ulong ind __attribute__((unused));
+    ulong ind MY_ATTRIBUTE((unused));
 
 #ifndef DBUG_OFF
     if (DBUG_EVALUATE_IF("check_slave_debug_group", 1, 0) &&
index 2fc70b8cc3d04cca68c543a2625633c6bfe2d09b..97a72f9329fb9df29ee5f4d4f11b90b3dabb8e35 100644 (file)
@@ -603,6 +603,51 @@ err:
   DBUG_RETURN(error);
 }
 
+/*
+  Updates the master info based on the information stored in the
+  relay info and ignores relay logs previously retrieved by the IO
+  thread, which thus starts fetching again based on to the
+  master_log_pos and master_log_name. Eventually, the old
+  relay logs will be purged by the normal purge mechanism.
+
+  When GTID's are enabled the "Retrieved GTID" set should be cleared
+  so that partial read events are discarded and they are
+  fetched once again
+
+  @param mi    pointer to Master_info instance
+*/
+static void recover_relay_log(Master_info *mi)
+{
+  Relay_log_info *rli=mi->rli;
+  // Set Receiver Thread's positions as per the recovered Applier Thread.
+  mi->set_master_log_pos(max<ulonglong>(BIN_LOG_HEADER_SIZE,
+                                        rli->get_group_master_log_pos()));
+  mi->set_master_log_name(rli->get_group_master_log_name());
+
+  sql_print_warning("Recovery from master pos %ld and file %s. "
+                    "Previous relay log pos and relay log file had "
+                    "been set to %lld, %s respectively.",
+                    (ulong) mi->get_master_log_pos(), mi->get_master_log_name(),
+                    rli->get_group_relay_log_pos(), rli->get_group_relay_log_name());
+
+  // Start with a fresh relay log.
+  rli->set_group_relay_log_name(rli->relay_log.get_log_fname());
+  rli->set_event_relay_log_name(rli->relay_log.get_log_fname());
+  rli->set_group_relay_log_pos(BIN_LOG_HEADER_SIZE);
+  rli->set_event_relay_log_pos(BIN_LOG_HEADER_SIZE);
+  /*
+    Clear the retrieved GTID set so that events that are written partially
+    will be fetched again.
+  */
+  if (gtid_mode == GTID_MODE_ON)
+  {
+    global_sid_lock->wrlock();
+    (const_cast<Gtid_set *>(rli->get_gtid_set()))->clear();
+    global_sid_lock->unlock();
+  }
+}
+
+
 /*
   Updates the master info based on the information stored in the
   relay info and ignores relay logs previously retrieved by the IO
@@ -668,14 +713,7 @@ int init_recovery(Master_info* mi, const char** errmsg)
         rli->clear_mts_recovery_groups();
       }
       else
-      {
-        error= 1;
-        sql_print_error("--relay-log-recovery cannot be executed when the slave "
-                        "was stopped with an error or killed in MTS mode; "
-                        "consider using RESET SLAVE or restart the server "
-                        "with --relay-log-recovery = 0 followed by "
-                        "START SLAVE UNTIL SQL_AFTER_MTS_GAPS");
-      }
+        DBUG_RETURN(error);
     }
   }
 
@@ -697,30 +735,112 @@ int init_recovery(Master_info* mi, const char** errmsg)
       if (error)
         DBUG_RETURN(error);
     }
-    mi->set_master_log_pos(max<ulonglong>(BIN_LOG_HEADER_SIZE,
-                                               rli->get_group_master_log_pos()));
-    mi->set_master_log_name(rli->get_group_master_log_name());
+    recover_relay_log(mi);
+  }
+  DBUG_RETURN(error);
+}
+
+/*
+  Relay log recovery in the case of MTS, is handled by the following function.
+  Gaps in MTS execution are filled using implicit execution of
+  START SLAVE UNTIL SQL_AFTER_MTS_GAPS call. Once slave reaches a consistent
+  gapless state receiver thread's positions are initialized to applier thread's
+  positions and the old relay logs are discarded. This completes the recovery
+  process.
 
-    sql_print_warning("Recovery from master pos %ld and file %s. "
-                      "Previous relay log pos and relay log file had "
-                      "been set to %lld, %s respectively.",
-                      (ulong) mi->get_master_log_pos(), mi->get_master_log_name(),
-                      rli->get_group_relay_log_pos(), rli->get_group_relay_log_name());
+  @param mi    pointer to Master_info instance.
 
-    rli->set_group_relay_log_name(rli->relay_log.get_log_fname());
-    rli->set_event_relay_log_name(rli->relay_log.get_log_fname());
-    rli->set_group_relay_log_pos(BIN_LOG_HEADER_SIZE);
-    rli->set_event_relay_log_pos(BIN_LOG_HEADER_SIZE);
+  @retval 0 success
+  @retval 1 error
+*/
+static inline int fill_mts_gaps_and_recover(Master_info* mi)
+{
+  DBUG_ENTER("fill_mts_gaps_and_recover");
+  Relay_log_info *rli= mi->rli;
+  int recovery_error= 0;
+  rli->is_relay_log_recovery= FALSE;
+  rli->until_condition= Relay_log_info::UNTIL_SQL_AFTER_MTS_GAPS;
+  rli->opt_slave_parallel_workers= rli->recovery_parallel_workers;
+  sql_print_information("MTS recovery: starting coordinator thread to fill MTS "
+                        "gaps.");
+  recovery_error= start_slave_thread(
+#ifdef HAVE_PSI_INTERFACE
+                                     key_thread_slave_sql,
+#endif
+                                     handle_slave_sql, &rli->run_lock,
+                                     &rli->run_lock,
+                                     &rli->start_cond,
+                                     &rli->slave_running,
+                                     &rli->slave_run_id,
+                                     mi);
+
+  if (recovery_error)
+  {
+    sql_print_warning("MTS recovery: failed to start the coordinator "
+                      "thread. Check the error log for additional"
+                      " details.");
+    goto err;
+  }
+  mysql_mutex_lock(&rli->run_lock);
+  mysql_cond_wait(&rli->stop_cond, &rli->run_lock);
+  mysql_mutex_unlock(&rli->run_lock);
+  if (rli->until_condition != Relay_log_info::UNTIL_DONE)
+  {
+    sql_print_warning("MTS recovery: automatic recovery failed. Either the "
+                      "slave server had stopped due to an error during an "
+                      "earlier session or relay logs are corrupted."
+                      "Fix the cause of the slave side error and restart the "
+                      "slave server or consider using RESET SLAVE.");
+    goto err;
   }
 
   /*
-    Clear the retrieved GTID set so that events that are written partially
-    will be fetched again.
-    */
-  global_sid_lock->wrlock();
-  (const_cast<Gtid_set *>(rli->get_gtid_set()))->clear();
-  global_sid_lock->unlock();
-  DBUG_RETURN(error);
+    We need a mutex while we are changing master info parameters to
+    keep other threads from reading bogus info
+  */
+  mysql_mutex_lock(&mi->data_lock);
+  mysql_mutex_lock(&rli->data_lock);
+  recover_relay_log(mi);
+
+  const char* msg;
+  if (rli->init_relay_log_pos(rli->get_group_relay_log_name(),
+                              rli->get_group_relay_log_pos(),
+                              false/*need_data_lock=false*/,
+                              &msg, 0))
+  {
+    char llbuf[22];
+    sql_print_error("Failed to open the relay log '%s' (relay_log_pos %s).",
+                    rli->get_group_relay_log_name(),
+                    llstr(rli->get_group_relay_log_pos(), llbuf));
+
+    recovery_error=1;
+    mysql_mutex_unlock(&mi->data_lock);
+    mysql_mutex_unlock(&rli->data_lock);
+    goto err;
+  }
+  if (mi->flush_info(true) || rli->flush_info(true))
+  {
+    recovery_error= 1;
+    mysql_mutex_unlock(&mi->data_lock);
+    mysql_mutex_unlock(&rli->data_lock);
+    goto err;
+  }
+  rli->inited=1;
+  rli->error_on_rli_init_info= false;
+  mysql_mutex_unlock(&mi->data_lock);
+  mysql_mutex_unlock(&rli->data_lock);
+  sql_print_information("MTS recovery: completed successfully.\n");
+  DBUG_RETURN(recovery_error);
+err:
+  /*
+    If recovery failed means we failed to initialize rli object in the case
+    of MTS. We should not allow the START SLAVE command to work as we do in
+    the case of STS. i.e if init_recovery call fails then we set inited=0.
+  */
+  rli->end_info();
+  rli->inited=0;
+  rli->error_on_rli_init_info= true;
+  DBUG_RETURN(recovery_error);
 }
 
 int global_init_info(Master_info* mi, bool ignore_if_no_info, int thread_mask)
@@ -761,7 +881,10 @@ int global_init_info(Master_info* mi, bool ignore_if_no_info, int thread_mask)
   */
   check_return= mi->check_info();
   if (check_return == ERROR_CHECKING_REPOSITORY)
+  {
+    init_error= 1;
     goto end;
+  }
 
   if (!(ignore_if_no_info && check_return == REPOSITORY_DOES_NOT_EXIST))
   {
@@ -771,7 +894,10 @@ int global_init_info(Master_info* mi, bool ignore_if_no_info, int thread_mask)
 
   check_return= mi->rli->check_info();
   if (check_return == ERROR_CHECKING_REPOSITORY)
+  {
+    init_error= 1;
     goto end;
+  }
   if (!(ignore_if_no_info && check_return == REPOSITORY_DOES_NOT_EXIST))
   {
     if (((thread_mask & SLAVE_SQL) != 0 || !(mi->rli->inited))
@@ -793,7 +919,20 @@ end:
 
   mysql_mutex_unlock(&mi->rli->data_lock);
   mysql_mutex_unlock(&mi->data_lock);
-  DBUG_RETURN(check_return == ERROR_CHECKING_REPOSITORY || init_error);
+
+  /*
+    Handling MTS Relay-log recovery after successful initialization of mi and
+    rli objects.
+
+    MTS Relay-log recovery is handled by SSUG command. In order to start the
+    slave applier thread rli needs to be inited and mi->rli->data_lock should
+    be in released state. Hence we do the MTS recovery at this point of time
+    where both conditions are satisfied.
+  */
+  if (!init_error && mi->rli->is_relay_log_recovery
+      && mi->rli->mts_recovery_group_cnt)
+    init_error= fill_mts_gaps_and_recover(mi);
+  DBUG_RETURN(init_error);
 }
 
 void end_info(Master_info* mi)
@@ -1248,7 +1387,7 @@ terminate_slave_thread(THD *thd,
 
   while (*slave_running)                        // Should always be true
   {
-    int error __attribute__((unused));
+    int error MY_ATTRIBUTE((unused));
     DBUG_PRINT("loop", ("killing slave thread"));
 
     mysql_mutex_lock(&thd->LOCK_thd_data);
@@ -1258,7 +1397,7 @@ terminate_slave_thread(THD *thd,
       EINVAL: invalid signal number (can't happen)
       ESRCH: thread already killed (can happen, should be ignored)
     */
-    int err __attribute__((unused))= pthread_kill(thd->real_id, thr_client_alarm);
+    int err MY_ATTRIBUTE((unused))= pthread_kill(thd->real_id, thr_client_alarm);
     DBUG_ASSERT(err != EINVAL);
 #endif
     thd->awake(THD::NOT_KILLED);
@@ -1709,6 +1848,10 @@ bool is_network_error(uint errorno)
       errorno == ER_CON_COUNT_ERROR ||
       errorno == ER_SERVER_SHUTDOWN)
     return TRUE;
+#ifdef WITH_WSREP
+  if (errorno == ER_UNKNOWN_COM_ERROR)
+    return TRUE;
+#endif /* WITH_WSREP */
 
   return FALSE;   
 }
@@ -1809,6 +1952,7 @@ int io_thread_init_commands(MYSQL *mysql, Master_info *mi)
 {
   char query[256];
   int ret= 0;
+  DBUG_EXECUTE_IF("fake_5_5_version_slave", return ret;);
 
   sprintf(query, "SET @slave_uuid= '%s'", server_uuid);
   if (mysql_real_query(mysql, query, strlen(query))
@@ -3032,11 +3176,9 @@ bool show_slave_status(THD* thd, Master_info* mi)
       break;
     case Relay_log_info::UNTIL_SQL_AFTER_MTS_GAPS:
       until_type= "SQL_AFTER_MTS_GAPS";
-#ifndef DBUG_OFF
     case Relay_log_info::UNTIL_DONE:
       until_type= "DONE";
       break;
-#endif
     default:
       DBUG_ASSERT(0);
     }
@@ -4104,10 +4246,9 @@ apply_event_and_update_pos(Log_event** ptr_ev, THD* thd, Relay_log_info* rli)
                                 rli->get_group_relay_log_pos(),
                                 rli->get_group_master_log_name(),
                                 rli->get_group_master_log_pos());
-#ifndef DBUG_OFF
-          /* 
+          /*
              Few tests wait for UNTIL_SQL_AFTER_MTS_GAPS completion.
-             Due to exisiting convention the status won't change 
+             Due to exisiting convention the status won't change
              prior to slave restarts.
              So making of UNTIL_SQL_AFTER_MTS_GAPS completion isdone here,
              and only in the debug build to make the test to catch the change
@@ -4117,7 +4258,6 @@ apply_event_and_update_pos(Log_event** ptr_ev, THD* thd, Relay_log_info* rli)
           {
             rli->until_condition= Relay_log_info::UNTIL_DONE;
           }
-#endif
           // reset the Worker tables to remove last slave session time info
           if ((error= rli->mts_finalize_recovery()))
           {
@@ -4403,7 +4543,6 @@ static int exec_relay_log_event(THD* thd, Relay_log_info* rli)
         Hence deferred events wont be deleted here.
         They will be deleted in Deferred_log_events::rewind() funciton.
     */
-    WSREP_DEBUG("apply_event_and_update_pos result: %d", exec_res);
     if (*ptr_ev)
     {
       DBUG_ASSERT(*ptr_ev == ev); // event remains to belong to Coordinator
@@ -7691,9 +7830,9 @@ static IO_CACHE *reopen_relay_log(Relay_log_info *rli, const char **errmsg)
 
 /**
   Reads next event from the relay log.  Should be called from the
-  slave IO thread.
+  slave SQL thread.
 
-  @param rli Relay_log_info structure for the slave IO thread.
+  @param rli Relay_log_info structure for the slave SQL thread.
 
   @return The event read, or NULL on error.  If an error occurs, the
   error is reported through the sql_print_information() or
@@ -7738,7 +7877,8 @@ static Log_event* next_event(Relay_log_info* rli)
         We just have a read only log that nobody else will be updating.
     */
     bool hot_log;
-    if ((hot_log = (cur_log != &rli->cache_buf)))
+    if ((hot_log = (cur_log != &rli->cache_buf)) ||
+        DBUG_EVALUATE_IF("force_sql_thread_error", 1, 0))
     {
       DBUG_ASSERT(rli->cur_log_fd == -1); // foreign descriptor
       mysql_mutex_lock(log_lock);
@@ -7747,7 +7887,8 @@ static Log_event* next_event(Relay_log_info* rli)
         Reading xxx_file_id is safe because the log will only
         be rotated when we hold relay_log.LOCK_log
       */
-      if (rli->relay_log.get_open_count() != rli->cur_log_old_open_count)
+      if (rli->relay_log.get_open_count() != rli->cur_log_old_open_count &&
+          DBUG_EVALUATE_IF("force_sql_thread_error", 0, 1))
       {
         // The master has switched to a new log file; Reopen the old log file
         cur_log=reopen_relay_log(rli, &errmsg);
@@ -7762,8 +7903,13 @@ static Log_event* next_event(Relay_log_info* rli)
       error during a write by the slave I/O thread may have closed it), we
       have to test it.
     */
-    if (!my_b_inited(cur_log))
+    if (!my_b_inited(cur_log) ||
+        DBUG_EVALUATE_IF("force_sql_thread_error", 1, 0))
+    {
+      if (hot_log)
+        mysql_mutex_unlock(log_lock);
       goto err;
+    }
 #ifndef DBUG_OFF
     {
       DBUG_PRINT("info", ("assertion skip %lu file pos %lu event relay log pos %lu file %s\n",
@@ -8348,6 +8494,7 @@ bool rpl_master_has_bug(const Relay_log_info *rli, uint bug_id, bool report,
         (memcmp(fixed_in,      master_ver, 3) >  0) &&
         (pred == NULL || (*pred)(param)))
     {
+      enum loglevel report_level= INFORMATION_LEVEL;
       if (!report)
        return TRUE;
       // a short message for SHOW SLAVE STATUS (message length constraints)
@@ -8356,25 +8503,35 @@ bool rpl_master_has_bug(const Relay_log_info *rli, uint bug_id, bool report,
                       " so slave stops; check error log on slave"
                       " for more info", MYF(0), bug_id);
       // a verbose message for the error log
-      rli->report(ERROR_LEVEL, ER_UNKNOWN_ERROR,
-                  "According to the master's version ('%s'),"
-                  " it is probable that master suffers from this bug:"
-                  " http://bugs.mysql.com/bug.php?id=%u"
-                  " and thus replicating the current binary log event"
-                  " may make the slave's data become different from the"
-                  " master's data."
-                  " To take no risk, slave refuses to replicate"
-                  " this event and stops."
-                  " We recommend that all updates be stopped on the"
-                  " master and slave, that the data of both be"
-                  " manually synchronized,"
-                  " that master's binary logs be deleted,"
-                  " that master be upgraded to a version at least"
-                  " equal to '%d.%d.%d'. Then replication can be"
-                  " restarted.",
-                  rli->get_rli_description_event()->server_version,
-                  bug_id,
-                  fixed_in[0], fixed_in[1], fixed_in[2]);
+      if (!ignored_error_code(ER_UNKNOWN_ERROR))
+      {
+        report_level= ERROR_LEVEL;
+        current_thd->is_slave_error= 1;
+      }
+      /* In case of ignored errors report warnings only if log_warnings > 1. */
+      else if (log_warnings > 1)
+        report_level= WARNING_LEVEL;
+
+      if (report_level != INFORMATION_LEVEL)
+        rli->report(report_level, ER_UNKNOWN_ERROR,
+                    "According to the master's version ('%s'),"
+                    " it is probable that master suffers from this bug:"
+                    " http://bugs.mysql.com/bug.php?id=%u"
+                    " and thus replicating the current binary log event"
+                    " may make the slave's data become different from the"
+                    " master's data."
+                    " To take no risk, slave refuses to replicate"
+                    " this event and stops."
+                    " We recommend that all updates be stopped on the"
+                    " master and slave, that the data of both be"
+                    " manually synchronized,"
+                    " that master's binary logs be deleted,"
+                    " that master be upgraded to a version at least"
+                    " equal to '%d.%d.%d'. Then replication can be"
+                    " restarted.",
+                    rli->get_rli_description_event()->server_version,
+                    bug_id,
+                    fixed_in[0], fixed_in[1], fixed_in[2]);
       return TRUE;
     }
   }
index 4b92ecd4d6e5a5271da83c8c5cf85cc46db0b7da..a085c42318494d5b9b8f5caf43ae0ee71fa48f3d 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2006, 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
@@ -350,7 +350,7 @@ uint32 table_def::calc_field_size(uint col, uchar *master_data) const
   return length;
 }
 
-#ifndef MYSQL_CLIENT
+#if defined(MYSQL_SERVER) && defined(HAVE_REPLICATION)
 /**
  */
 static void show_sql_type(enum_field_types type, uint16 metadata, String *str,
@@ -916,14 +916,26 @@ table_def::compatible_with(THD *thd, Relay_log_info *rli,
       const char *tbl_name= table->s->table_name.str;
       char source_buf[MAX_FIELD_WIDTH];
       char target_buf[MAX_FIELD_WIDTH];
+      enum loglevel report_level= INFORMATION_LEVEL;
+
       String source_type(source_buf, sizeof(source_buf), &my_charset_latin1);
       String target_type(target_buf, sizeof(target_buf), &my_charset_latin1);
       show_sql_type(type(col), field_metadata(col), &source_type, field->charset());
       field->sql_type(target_type);
-      rli->report(ERROR_LEVEL, ER_SLAVE_CONVERSION_FAILED,
-                  ER(ER_SLAVE_CONVERSION_FAILED),
-                  col, db_name, tbl_name,
-                  source_type.c_ptr_safe(), target_type.c_ptr_safe());
+      if (!ignored_error_code(ER_SLAVE_CONVERSION_FAILED))
+      {
+        report_level= ERROR_LEVEL;
+        thd->is_slave_error= 1;
+      }
+      /* In case of ignored errors report warnings only if log_warnings > 1. */
+      else if (log_warnings > 1)
+        report_level= WARNING_LEVEL;
+
+      if (report_level != INFORMATION_LEVEL)
+        rli->report(report_level, ER_SLAVE_CONVERSION_FAILED,
+                    ER(ER_SLAVE_CONVERSION_FAILED),
+                    col, db_name, tbl_name,
+                    source_type.c_ptr_safe(), target_type.c_ptr_safe());
       return false;
     }
   }
@@ -1061,10 +1073,23 @@ TABLE *table_def::create_conversion_table(THD *thd, Relay_log_info *rli, TABLE *
 
 err:
   if (conv_table == NULL)
-    rli->report(ERROR_LEVEL, ER_SLAVE_CANT_CREATE_CONVERSION,
-                ER(ER_SLAVE_CANT_CREATE_CONVERSION),
-                target_table->s->db.str,
-                target_table->s->table_name.str);
+  {
+    enum loglevel report_level= INFORMATION_LEVEL;
+    if (!ignored_error_code(ER_SLAVE_CANT_CREATE_CONVERSION))
+    {
+      report_level= ERROR_LEVEL;
+      thd->is_slave_error= 1;
+    }
+    /* In case of ignored errors report warnings only if log_warnings > 1. */
+    else if (log_warnings > 1)
+      report_level= WARNING_LEVEL;
+
+    if (report_level != INFORMATION_LEVEL)
+      rli->report(report_level, ER_SLAVE_CANT_CREATE_CONVERSION,
+                  ER(ER_SLAVE_CANT_CREATE_CONVERSION),
+                  target_table->s->db.str,
+                  target_table->s->table_name.str);
+  }
   DBUG_RETURN(conv_table);
 }
 
@@ -1243,7 +1268,7 @@ bool event_checksum_test(uchar *event_buf, ulong event_len, uint8 alg)
 static uchar*
 hash_slave_rows_get_key(const uchar *record,
                         size_t *length,
-                        my_bool not_used __attribute__((unused)))
+                        my_bool not_used MY_ATTRIBUTE((unused)))
 {
   DBUG_ENTER("get_key");
 
index 2ed066954b07d9cdd6f5c119b641b3be1a006a80..ade6664c5378a43da3e56ad2b63b33833c501a02 100644 (file)
@@ -1,5 +1,5 @@
 /*
-   Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
+   Copyright (c) 2002, 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
@@ -2553,8 +2553,9 @@ uint sp_get_flags_for_command(LEX *lex)
 
 bool sp_check_name(LEX_STRING *ident)
 {
-  if (!ident || !ident->str || !ident->str[0] ||
-      ident->str[ident->length-1] == ' ')
+  DBUG_ASSERT(ident != NULL && ident->str != NULL);
+
+  if (!ident->str[0] || ident->str[ident->length-1] == ' ')
   {
     my_error(ER_SP_WRONG_NAME, MYF(0), ident->str);
     return true;
index 5a6e3ca911d42e9753339ff517e851b24cff9cdf..c4d3980d46a959712c7db0914ad51fa9c9ed8394 100644 (file)
@@ -1,5 +1,5 @@
 /* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
-
+sql_authenticate
    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.
@@ -625,7 +625,7 @@ public:
 
 
 static uchar* acl_entry_get_key(acl_entry *entry, size_t *length,
-                                my_bool not_used __attribute__((unused)))
+                                my_bool not_used MY_ATTRIBUTE((unused)))
 {
   *length=(uint) entry->length;
   return (uchar*) entry->key;
@@ -1673,7 +1673,7 @@ bool acl_getroot(Security_context *sctx, char *user, char *host,
 }
 
 static uchar* check_get_key(ACL_USER *buff, size_t *length,
-                            my_bool not_used __attribute__((unused)))
+                            my_bool not_used MY_ATTRIBUTE((unused)))
 {
   *length=buff->host.get_host_len();
   return (uchar*) buff->host.get_host();
@@ -2872,9 +2872,14 @@ static int replace_user_table(THD *thd, TABLE *table, LEX_USER *combo,
       goto end;
     }
 
-    if (!combo->uses_identified_by_clause &&
-        !combo->uses_identified_with_clause &&
-        !combo->uses_identified_by_password_clause)
+    if ((!combo->uses_identified_by_clause &&
+         !combo->uses_identified_with_clause &&
+         !combo->uses_identified_by_password_clause) ||
+        (combo->uses_identified_with_clause &&
+         (!my_strcasecmp(system_charset_info, combo->plugin.str,
+                         native_password_plugin_name.str) ||
+          !my_strcasecmp(system_charset_info, combo->plugin.str,
+                         old_password_plugin_name.str))))
     {
       if (check_password_policy(NULL))
       {
@@ -3643,7 +3648,7 @@ public:
 
 
 static uchar* get_key_column(GRANT_COLUMN *buff, size_t *length,
-                           my_bool not_used __attribute__((unused)))
+                           my_bool not_used MY_ATTRIBUTE((unused)))
 {
   *length=buff->key_length;
   return (uchar*) buff->column;
@@ -3836,7 +3841,7 @@ GRANT_TABLE::~GRANT_TABLE()
 
 
 static uchar* get_grant_table(GRANT_NAME *buff, size_t *length,
-                            my_bool not_used __attribute__((unused)))
+                            my_bool not_used MY_ATTRIBUTE((unused)))
 {
   *length=buff->key_length;
   return (uchar*) buff->hash_key;
@@ -11087,6 +11092,27 @@ server_mpvio_update_thd(THD *thd, MPVIO_EXT *mpvio)
     thd->variables.sql_mode|= MODE_IGNORE_SPACE;
 }
 
+/**
+  Assign priv_user and priv_host fields of the Security_context.
+
+  @param sctx Security context, which priv_user and priv_host fields are
+              updated.
+  @param user Authenticated user data.
+*/
+inline void
+assign_priv_user_host(Security_context *sctx, const ACL_USER *user)
+{
+  if (user->user)
+    strmake(sctx->priv_user, user->user, USERNAME_LENGTH - 1);
+  else
+    *sctx->priv_user= 0;
+
+  if (user->host.get_host())
+    strmake(sctx->priv_host, user->host.get_host(), MAX_HOSTNAME - 1);
+  else
+    *sctx->priv_host= 0;
+}
+
 /**
   Perform the handshake, authorize the client and update thd sctx variables.
 
@@ -11214,6 +11240,9 @@ acl_authenticate(THD *thd, uint com_change_user_pkt_len)
     res= CR_ERROR;
   }
 
+  if (mpvio.can_authenticate())
+    assign_priv_user_host(sctx, acl_user);
+
   if (res > CR_OK && mpvio.status != MPVIO_EXT::SUCCESS)
   {
     Host_errors errors;
@@ -11296,15 +11325,7 @@ acl_authenticate(THD *thd, uint com_change_user_pkt_len)
 #endif
 
     sctx->master_access= acl_user->access;
-    if (acl_user->user)
-      strmake(sctx->priv_user, acl_user->user, USERNAME_LENGTH - 1);
-    else
-      *sctx->priv_user= 0;
-
-    if (acl_user->host.get_host())
-      strmake(sctx->priv_host, acl_user->host.get_host(), MAX_HOSTNAME - 1);
-    else
-      *sctx->priv_host= 0;
+    assign_priv_user_host(sctx, acl_user);
 
 #ifndef NO_EMBEDDED_ACCESS_CHECKS
     /*
index 2b3d41de87d1a00ee7ce12ea3c3444373298674b..f3a2570eee2c7448cef1d978425c01c50a7e276f 100644 (file)
@@ -1,5 +1,5 @@
 /*
-   Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
+   Copyright (c) 2000, 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
 using std::min;
 using std::max;
 
-int sortcmp2(void* cmp_arg __attribute__((unused)),
+int sortcmp2(void* cmp_arg MY_ATTRIBUTE((unused)),
             const String *a,const String *b)
 {
   return sortcmp(a,b,a->charset());
 }
 
-int compare_double2(void* cmp_arg __attribute__((unused)),
+int compare_double2(void* cmp_arg MY_ATTRIBUTE((unused)),
                    const double *s, const double *t)
 {
   return compare_double(s,t);
 }
 
-int compare_longlong2(void* cmp_arg __attribute__((unused)),
+int compare_longlong2(void* cmp_arg MY_ATTRIBUTE((unused)),
                      const longlong *s, const longlong *t)
 {
   return compare_longlong(s,t);
 }
 
-int compare_ulonglong2(void* cmp_arg __attribute__((unused)),
+int compare_ulonglong2(void* cmp_arg MY_ATTRIBUTE((unused)),
                       const ulonglong *s, const ulonglong *t)
 {
   return compare_ulonglong(s,t);
@@ -835,7 +835,7 @@ void field_str::get_opt_type(String *answer, ha_rows total_rows)
 
 
 void field_real::get_opt_type(String *answer,
-                             ha_rows total_rows __attribute__((unused)))
+                             ha_rows total_rows MY_ATTRIBUTE((unused)))
 {
   char buff[MAX_FIELD_WIDTH];
 
@@ -888,7 +888,7 @@ void field_real::get_opt_type(String *answer,
 
 
 void field_longlong::get_opt_type(String *answer,
-                                 ha_rows total_rows __attribute__((unused)))
+                                 ha_rows total_rows MY_ATTRIBUTE((unused)))
 {
   char buff[MAX_FIELD_WIDTH];
 
@@ -919,7 +919,7 @@ void field_longlong::get_opt_type(String *answer,
 
 
 void field_ulonglong::get_opt_type(String *answer,
-                                  ha_rows total_rows __attribute__((unused)))
+                                  ha_rows total_rows MY_ATTRIBUTE((unused)))
 {
   char buff[MAX_FIELD_WIDTH];
 
@@ -944,7 +944,7 @@ void field_ulonglong::get_opt_type(String *answer,
 
 
 void field_decimal::get_opt_type(String *answer,
-                                 ha_rows total_rows __attribute__((unused)))
+                                 ha_rows total_rows MY_ATTRIBUTE((unused)))
 {
   my_decimal zero;
   char buff[MAX_FIELD_WIDTH];
@@ -1022,7 +1022,7 @@ String *field_decimal::std(String *s, ha_rows rows)
 
 
 int collect_string(String *element,
-                  element_count count __attribute__((unused)),
+                  element_count count MY_ATTRIBUTE((unused)),
                   TREE_INFO *info)
 {
   if (info->found)
@@ -1037,7 +1037,7 @@ int collect_string(String *element,
 } // collect_string
 
 
-int collect_real(double *element, element_count count __attribute__((unused)),
+int collect_real(double *element, element_count count MY_ATTRIBUTE((unused)),
                 TREE_INFO *info)
 {
   char buff[MAX_FIELD_WIDTH];
@@ -1078,7 +1078,7 @@ int collect_decimal(uchar *element, element_count count,
 
 
 int collect_longlong(longlong *element,
-                    element_count count __attribute__((unused)),
+                    element_count count MY_ATTRIBUTE((unused)),
                     TREE_INFO *info)
 {
   char buff[MAX_FIELD_WIDTH];
@@ -1097,7 +1097,7 @@ int collect_longlong(longlong *element,
 
 
 int collect_ulonglong(ulonglong *element,
-                     element_count count __attribute__((unused)),
+                     element_count count MY_ATTRIBUTE((unused)),
                      TREE_INFO *info)
 {
   char buff[MAX_FIELD_WIDTH];
index f2e097bb977c0c2a390f2c701a8bb164a02993a3..b10270969f1d1bbed41b1c3fa775b33ef0e37f72 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef SQL_ANALYSE_INCLUDED
 #define SQL_ANALYSE_INCLUDED
 
-/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 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
@@ -53,13 +53,13 @@ uint check_ulonglong(const char *str, uint length);
 bool get_ev_num_info(EV_NUM_INFO *ev_info, NUM_INFO *info, const char *num);
 bool test_if_number(NUM_INFO *info, const char *str, uint str_len);
 int compare_double(const double *s, const double *t);
-int compare_double2(void* cmp_arg __attribute__((unused)),
+int compare_double2(void* cmp_arg MY_ATTRIBUTE((unused)),
                    const double *s, const double *t);
 int compare_longlong(const longlong *s, const longlong *t);
-int compare_longlong2(void* cmp_arg __attribute__((unused)),
+int compare_longlong2(void* cmp_arg MY_ATTRIBUTE((unused)),
                      const longlong *s, const longlong *t);
 int compare_ulonglong(const ulonglong *s, const ulonglong *t);
-int compare_ulonglong2(void* cmp_arg __attribute__((unused)),
+int compare_ulonglong2(void* cmp_arg MY_ATTRIBUTE((unused)),
                       const ulonglong *s, const ulonglong *t);
 int compare_decimal2(int* len, const char *s, const char *t);
 void free_string(String*);
@@ -97,7 +97,7 @@ public:
 int collect_string(String *element, element_count count,
                   TREE_INFO *info);
 
-int sortcmp2(void* cmp_arg __attribute__((unused)),
+int sortcmp2(void* cmp_arg MY_ATTRIBUTE((unused)),
             const String *a,const String *b);
 
 class field_str :public field_info
@@ -120,9 +120,9 @@ public:
 
   void  add();
   void  get_opt_type(String*, ha_rows);
-  String *get_min_arg(String *not_used __attribute__((unused)))
+  String *get_min_arg(String *not_used MY_ATTRIBUTE((unused)))
   { return &min_arg; }
-  String *get_max_arg(String *not_used __attribute__((unused)))
+  String *get_max_arg(String *not_used MY_ATTRIBUTE((unused)))
   { return &max_arg; }
   String *avg(String *s, ha_rows rows)
   {
@@ -137,8 +137,8 @@ public:
                            TREE_INFO *info);
   tree_walk_action collect_enum()
   { return (tree_walk_action) collect_string; }
-  String *std(String *s __attribute__((unused)),
-             ha_rows rows __attribute__((unused)))
+  String *std(String *s MY_ATTRIBUTE((unused)),
+             ha_rows rows MY_ATTRIBUTE((unused)))
   { return (String*) 0; }
 };
 
index ef14fefae3d668532cf54f37a3231c68e86d6a66..f31ccb508a8954f92bb6bfdbdecc3b0c83f72acb 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2007, 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
@@ -494,7 +494,7 @@ static void event_class_dispatch(THD *thd, unsigned int event_class,
 
 
 /**  There's at least one active audit plugin tracking the general events */
-bool is_any_audit_plugin_active(THD *thd __attribute__((unused)))
+bool is_any_audit_plugin_active(THD *thd MY_ATTRIBUTE((unused)))
 {
   return (mysql_global_audit_mask[0] & MYSQL_AUDIT_GENERAL_CLASSMASK);
 }
index 993068ca90ed17cceea64ed60c56800b9c37adc4..39b9a19aab308ec6723b26d1b4e576b38d5fba25 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2007, 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
@@ -37,7 +37,7 @@ extern void mysql_audit_acquire_plugins(THD *thd, uint event_class);
 #ifndef EMBEDDED_LIBRARY
 extern void mysql_audit_notify(THD *thd, uint event_class,
                                uint event_subtype, ...);
-bool is_any_audit_plugin_active(THD *thd __attribute__((unused)));
+bool is_any_audit_plugin_active(THD *thd MY_ATTRIBUTE((unused)));
 #else
 #define mysql_audit_notify(...)
 #endif
index 93d45168465001657e17266b6242bf852c4299e3..c5bbd5843c028e6f69eb8ff6f3a169797e5cd9ab 100644 (file)
@@ -333,7 +333,7 @@ uint get_table_def_key(const TABLE_LIST *table_list, const char **key)
 *****************************************************************************/
 
 extern "C" uchar *table_def_key(const uchar *record, size_t *length,
-                               my_bool not_used __attribute__((unused)))
+                               my_bool not_used MY_ATTRIBUTE((unused)))
 {
   TABLE_SHARE *entry=(TABLE_SHARE*) record;
   *length= entry->table_cache_key.length;
@@ -994,7 +994,6 @@ bool close_cached_tables(THD *thd, TABLE_LIST *tables,
 
   while (found && ! thd->killed)
   {
-    WSREP_DEBUG("close_cached_tables, wait loop");
     TABLE_SHARE *share;
     found= FALSE;
     /*
@@ -4869,7 +4868,7 @@ end:
 }
 
 extern "C" uchar *schema_set_get_key(const uchar *record, size_t *length,
-                                     my_bool not_used __attribute__((unused)))
+                                     my_bool not_used MY_ATTRIBUTE((unused)))
 {
   TABLE_LIST *table=(TABLE_LIST*) record;
   *length= table->db_length;
@@ -5482,6 +5481,15 @@ handle_view(THD *thd, Query_tables_list *prelocking_ctx,
                                  &table_list->view->sroutines_list,
                                  table_list->top_table());
   }
+
+  /*
+    If a trigger was defined on one of the associated tables then assign the
+    'trg_event_map' value of the view to the next table in table_list. When a
+    Stored function is invoked, all the associated tables including the tables
+    associated with the trigger are prelocked.
+  */
+  if (table_list->trg_event_map && table_list->next_global)
+    table_list->next_global->trg_event_map= table_list->trg_event_map;
   return FALSE;
 }
 
index 31c83e75678bef2cfa4512cfb13299ea6a1d317e..17b46a650bd5e8a78b1288894a4acc43e035ca5c 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000, 2013, 2015, Oracle and/or its affiliates. All rights
+/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights
    reserved.
 
    This program is free software; you can redistribute it and/or modify
@@ -729,7 +729,7 @@ inline Query_cache_block_table * Query_cache_block::table(TABLE_COUNTER_TYPE n)
 extern "C"
 {
 uchar *query_cache_table_get_key(const uchar *record, size_t *length,
-                               my_bool not_used __attribute__((unused)))
+                               my_bool not_used MY_ATTRIBUTE((unused)))
 {
   Query_cache_block* table_block = (Query_cache_block*) record;
   *length = (table_block->used - table_block->headers_len() -
index 3208e0412b19aff118d2cf9c1a65e9b88f49d0dc..2397125e61c25ba1929438f6d4332967e522c314 100644 (file)
@@ -87,7 +87,7 @@ const char * const THD::DEFAULT_WHERE= "field list";
 ****************************************************************************/
 
 extern "C" uchar *get_var_key(user_var_entry *entry, size_t *length,
-                              my_bool not_used __attribute__((unused)))
+                              my_bool not_used MY_ATTRIBUTE((unused)))
 {
   *length= entry->entry_name.length();
   return (uchar*) entry->entry_name.ptr();
@@ -640,21 +640,26 @@ void THD::enter_stage(const PSI_stage_info *new_stage,
 
 extern "C"
 void thd_enter_cond(MYSQL_THD thd, mysql_cond_t *cond, mysql_mutex_t *mutex,
-                    const PSI_stage_info *stage, PSI_stage_info *old_stage)
+                    const PSI_stage_info *stage, PSI_stage_info *old_stage,
+                    const char *src_function, const char *src_file,
+                    int src_line)
 {
   if (!thd)
     thd= current_thd;
 
-  return thd->ENTER_COND(cond, mutex, stage, old_stage);
+  return thd->enter_cond(cond, mutex, stage, old_stage,
+                         src_function, src_file, src_line);
 }
 
 extern "C"
-void thd_exit_cond(MYSQL_THD thd, const PSI_stage_info *stage)
+void thd_exit_cond(MYSQL_THD thd, const PSI_stage_info *stage,
+                   const char *src_function, const char *src_file,
+                  int src_line)
 {
   if (!thd)
     thd= current_thd;
 
-  thd->EXIT_COND(stage);
+  thd->exit_cond(stage, src_function, src_file, src_line);
   return;
 }
 
@@ -854,7 +859,7 @@ extern "C" void wsrep_thd_set_query_state(
 extern "C" void wsrep_thd_set_conflict_state(
        THD *thd, enum wsrep_conflict_state state)
 {
-  thd->wsrep_conflict_state= state;
+  if (WSREP(thd)) thd->wsrep_conflict_state= state;
 }
 
 
@@ -911,11 +916,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);
 }
@@ -1117,7 +1122,7 @@ THD::THD(bool enable_plugins)
    owned_gtid_set(global_sid_map),
    main_da(0, false),
    m_stmt_da(&main_da),
-   duplicate_slave_uuid(false)
+   duplicate_slave_id(false)
 {
   ulong tmp;
 
@@ -1215,7 +1220,9 @@ THD::THD(bool enable_plugins)
   wsrep_mysql_replicated  = 0;
   wsrep_TOI_pre_query     = NULL;
   wsrep_TOI_pre_query_len = 0;
-  wsrep_sync_wait_gtid= WSREP_GTID_UNDEFINED;
+  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();
@@ -1492,8 +1499,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  "
@@ -1624,7 +1638,9 @@ 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;
+  wsrep_sync_wait_gtid    = WSREP_GTID_UNDEFINED;
+  wsrep_affected_rows     = 0;
+  wsrep_replicate_GTID    = false;
 #endif
   binlog_row_event_extra_data= 0;
 
@@ -2137,13 +2153,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);
@@ -2314,6 +2330,8 @@ void THD::cleanup_after_query()
 
 #ifdef WITH_WSREP
   wsrep_sync_wait_gtid= WSREP_GTID_UNDEFINED;
+  if (!in_active_multi_stmt_transaction())
+    wsrep_affected_rows= 0;
 #endif /* WITH_WSREP */
 }
 
@@ -3314,7 +3332,7 @@ err:
 
 
 int
-select_dump::prepare(List<Item> &list __attribute__((unused)),
+select_dump::prepare(List<Item> &list MY_ATTRIBUTE((unused)),
                     SELECT_LEX_UNIT *u)
 {
   unit= u;
@@ -3726,7 +3744,7 @@ C_MODE_START
 
 static uchar *
 get_statement_id_as_hash_key(const uchar *record, size_t *key_length,
-                             my_bool not_used __attribute__((unused)))
+                             my_bool not_used MY_ATTRIBUTE((unused)))
 {
   const Statement *statement= (const Statement *) record; 
   *key_length= sizeof(statement->id);
@@ -3739,7 +3757,7 @@ static void delete_statement_as_hash_key(void *key)
 }
 
 static uchar *get_stmt_name_hash_key(Statement *entry, size_t *length,
-                                    my_bool not_used __attribute__((unused)))
+                                    my_bool not_used MY_ATTRIBUTE((unused)))
 {
   *length= entry->name.length;
   return (uchar*) entry->name.str;
@@ -5045,7 +5063,7 @@ extern "C" uchar *xid_get_hash_key(const uchar *, size_t *, my_bool);
 extern "C" void xid_free_hash(void *);
 
 uchar *xid_get_hash_key(const uchar *ptr, size_t *length,
-                                  my_bool not_used __attribute__((unused)))
+                                  my_bool not_used MY_ATTRIBUTE((unused)))
 {
   *length=((XID_STATE*)ptr)->xid.key_length();
   return ((XID_STATE*)ptr)->xid.key();
index 4b7b11eb410ffcc385d59b7dcc974e73c2c325cf..33fe0a3efa5b0a1dfde2968923bc5a174ecc1c5c 100644 (file)
@@ -69,7 +69,17 @@ void set_thd_stage_info(void *thd,
                         const char *calling_func,
                         const char *calling_file,
                         const unsigned int calling_line);
-                        
+extern "C"
+void thd_enter_cond(MYSQL_THD thd, mysql_cond_t *cond, mysql_mutex_t *mutex,
+                    const PSI_stage_info *stage, PSI_stage_info *old_stage,
+                    const char *src_function, const char *src_file,
+                    int src_line);
+
+extern "C"
+void thd_exit_cond(MYSQL_THD thd, const PSI_stage_info *stage,
+                   const char *src_function, const char *src_file,
+                   int src_line);
+
 #define THD_STAGE_INFO(thd, stage) \
   (thd)->enter_stage(& stage, NULL, __func__, __FILE__, __LINE__)
 
@@ -83,6 +93,8 @@ struct wsrep_thd_shadow {
   ulong                tx_isolation;
   char                 *db;
   size_t               db_length;
+  struct timeval       user_time;
+  longlong             row_count_func;
 };
 #endif
 class Reprepare_observer;
@@ -1583,6 +1595,8 @@ typedef I_List<Item_change_record> Item_change_list;
 /**
   Type of locked tables mode.
   See comment for THD::locked_tables_mode for complete description.
+  While adding new enum values add them to the getter method for this enum
+  declared below and defined in binlog.cc as well.
 */
 
 enum enum_locked_tables_mode
@@ -1593,6 +1607,15 @@ enum enum_locked_tables_mode
   LTM_PRELOCKED_UNDER_LOCK_TABLES
 };
 
+#ifndef DBUG_OFF
+/**
+  Getter for the enum enum_locked_tables_mode
+  @param locked_tables_mode enum for types of locked tables mode
+
+  @return The string represantation of that enum value
+*/
+const char * get_locked_tables_mode_name(enum_locked_tables_mode locked_tables_mode);
+#endif
 
 /**
   Class that holds information about tables which were opened and locked
@@ -3205,6 +3228,8 @@ public:
   void*                     wsrep_apply_format;
   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.
@@ -4214,11 +4239,12 @@ private:
 public:
   /**
     This is only used by master dump threads.
-    When the master receives a new connection from a slave with a UUID that
-    is already connected, it will set this flag TRUE before killing the old
-    slave connection.
+    When the master receives a new connection from a slave with a
+    UUID (for slave versions >= 5.6)/server_id(for slave versions < 5.6)
+    that is already connected, it will set this flag TRUE
+    before killing the old slave connection.
   */
-  bool duplicate_slave_uuid;
+  bool duplicate_slave_id;
 };
 
 
index 9034a6e41d3b4982d76557c9060b260eb3f05e63..b60f2f4f548f3b2eddaeeb34dbbfe6f6ad324601 100644 (file)
@@ -1,5 +1,5 @@
 /*
-   Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved.
+   Copyright (c) 2007, 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
@@ -340,7 +340,7 @@ void release_user_connection(THD *thd)
 */
 
 extern "C" uchar *get_key_conn(user_conn *buff, size_t *length,
-            my_bool not_used __attribute__((unused)))
+            my_bool not_used MY_ATTRIBUTE((unused)))
 {
   *length= buff->len;
   return (uchar*) buff->user;
@@ -451,7 +451,7 @@ bool thd_init_client_charset(THD *thd, uint cs_number)
       my_error(ER_WRONG_VALUE_FOR_VAR, MYF(0), "character_set_client",
                global_system_variables.character_set_client->csname);
       return true;
-    }    
+    }
     thd->variables.character_set_client=
       global_system_variables.character_set_client;
     thd->variables.collation_connection=
@@ -751,6 +751,7 @@ bool login_connection(THD *thd)
   my_net_set_write_timeout(net, connect_timeout);
 
   error= check_connection(thd);
+  MYSQL_AUDIT_NOTIFY_CONNECTION_CONNECT(thd);
   thd->protocol->end_statement();
 
   if (error)
@@ -922,7 +923,6 @@ bool thd_prepare_connection(THD *thd)
   bool rc;
   lex_start(thd);
   rc= login_connection(thd);
-  MYSQL_AUDIT_NOTIFY_CONNECTION_CONNECT(thd);
   if (rc)
     return rc;
 
index 0c6b7e70d3788e10144b927277e4d2cc4ce8b09b..cd074a7db726623d20b395ba67f788ab47d91683 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2005, 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
@@ -47,7 +47,7 @@ public:
 
   int send_result_set_metadata(THD *thd, List<Item> &send_result_set_metadata);
   virtual bool is_open() const { return table != 0; }
-  virtual int open(JOIN *join __attribute__((unused)));
+  virtual int open(JOIN *join MY_ATTRIBUTE((unused)));
   virtual void fetch(ulong num_rows);
   virtual void close();
   virtual ~Materialized_cursor();
@@ -277,7 +277,7 @@ end:
 }
 
 
-int Materialized_cursor::open(JOIN *join __attribute__((unused)))
+int Materialized_cursor::open(JOIN *join MY_ATTRIBUTE((unused)))
 {
   THD *thd= fake_unit.thd;
   int rc;
index 2554332c9cfd92d3f2222b029989ef88f38e0f54..479fe77e579ab5fcfd072cf9ea8cce982c9a15bd 100644 (file)
@@ -1,5 +1,5 @@
 /*
-   Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
+   Copyright (c) 2000, 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
@@ -86,7 +86,7 @@ extern "C" uchar* dboptions_get_key(my_dbopt_t *opt, size_t *length,
                                     my_bool not_used);
 
 uchar* dboptions_get_key(my_dbopt_t *opt, size_t *length,
-                         my_bool not_used __attribute__((unused)))
+                         my_bool not_used MY_ATTRIBUTE((unused)))
 {
   *length= opt->name_length;
   return (uchar*) opt->name;
index 448ab526b4034bd24b27d50ce3e635cc55fca2a0..2808dc32b34011e4ce6549e64def58bf7dfde516 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 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
@@ -484,7 +484,7 @@ init_tmptable_sum_functions(Item_sum **func_ptr)
 
 static void
 update_tmptable_sum_func(Item_sum **func_ptr,
-                        TABLE *tmp_table __attribute__((unused)))
+                        TABLE *tmp_table MY_ATTRIBUTE((unused)))
 {
   Item_sum *func;
   while ((func= *(func_ptr++)))
@@ -2256,7 +2256,7 @@ join_read_last_key(JOIN_TAB *tab)
 
        /* ARGSUSED */
 static int
-join_no_more_records(READ_RECORD *info __attribute__((unused)))
+join_no_more_records(READ_RECORD *info MY_ATTRIBUTE((unused)))
 {
   return -1;
 }
@@ -2858,7 +2858,7 @@ end_send(JOIN *join, JOIN_TAB *join_tab, bool end_of_records)
 
        /* ARGSUSED */
 enum_nested_loop_state
-end_send_group(JOIN *join, JOIN_TAB *join_tab __attribute__((unused)),
+end_send_group(JOIN *join, JOIN_TAB *join_tab MY_ATTRIBUTE((unused)),
               bool end_of_records)
 {
   int idx= -1;
@@ -3856,7 +3856,7 @@ setup_copy_fields(THD *thd, TMP_TABLE_PARAM *param,
   Item *pos;
   List_iterator_fast<Item> li(all_fields);
   Copy_field *copy= NULL;
-  Copy_field *copy_start __attribute__((unused));
+  Copy_field *copy_start MY_ATTRIBUTE((unused));
   res_selected_fields.empty();
   res_all_fields.empty();
   List_iterator_fast<Item> itr(res_all_fields);
index 654a6f95e660d5d4994959de46bbd33431893996..bf9298473daa63e670618653e6fb501605d7cfec 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef SQL_EXECUTOR_INCLUDED
 #define SQL_EXECUTOR_INCLUDED
 
-/* Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights
+/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights
    reserved.
 
    This program is free software; you can redistribute it and/or modify
@@ -258,7 +258,7 @@ private:
   /** Write function that would be used for saving records in tmp table. */
   Next_select_func write_func;
   enum_nested_loop_state put_record(bool end_of_records);
-  __attribute__((warn_unused_result))
+  MY_ATTRIBUTE((warn_unused_result))
   bool prepare_tmp_table();
 };
 
index 707495be4233621c4c195dbab1a6df7e9a9f2b7c..5387eee9b61914da64bb785c243e5a8aef51a7eb 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2001, 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
@@ -89,7 +89,7 @@ static bool mysql_ha_open_table(THD *thd, TABLE_LIST *table);
 */
 
 static char *mysql_ha_hash_get_key(TABLE_LIST *tables, size_t *key_len_p,
-                                   my_bool first __attribute__((unused)))
+                                   my_bool first MY_ATTRIBUTE((unused)))
 {
   *key_len_p= strlen(tables->alias) + 1 ; /* include '\0' in comparisons */
   return tables->alias;
index 2ad22038bfb14bd7c0e9d67ce92d584f56aef612..31fbf8b386d021fd3b68a1dcc82e91d36c4c5e78 100644 (file)
@@ -1679,16 +1679,25 @@ int write_record(THD *thd, TABLE *table, COPY_INFO *info, COPY_INFO *update)
         insert_id_for_cur_row= table->file->insert_id_for_cur_row;
       else
         table->file->insert_id_for_cur_row= insert_id_for_cur_row;
-      bool is_duplicate_key_error;
-      if (table->file->is_fatal_error(error, HA_CHECK_DUP | HA_CHECK_FK_ERROR))
+
+      /*
+        If it is a FK constraint violation and 'ignore' flag is set,
+        report a warning instead of error.
+      */
+      if (ignore_errors && !table->file->is_fatal_error(error,
+                                                        HA_CHECK_FK_ERROR))
+        goto ok_or_after_trg_err;
+
+      if (table->file->is_fatal_error(error, HA_CHECK_DUP))
        goto err;
-      is_duplicate_key_error= table->file->is_fatal_error(error, 0);
-      if (!is_duplicate_key_error)
+
+      if (!table->file->is_fatal_error(error, 0))
       {
         /*
-          We come here when we had an ignorable error which is not a duplicate
-          key error. In this we ignore error if ignore flag is set, otherwise
-          report error as usual. We will not do any duplicate key processing.
+          We come here when we have an ignorable error which is not a duplicate
+          key error or FK error(Ex: Partition related errors). In this case we
+          ignore the error if ignore flag is set, otherwise report error as usual.
+          We will not do any duplicate key processing.
         */
         if (ignore_errors)
           goto ok_or_after_trg_err; /* Ignoring a not fatal error, return 0 */
index 5cca60373f24a1e9100f4949b98b78e8c4d54e50..29ef17919b497d4ac1ac976c2df0b87cca783dc5 100644 (file)
@@ -3580,6 +3580,9 @@ void LEX::first_lists_tables_same()
     if (query_tables_last == &first_table->next_global)
       query_tables_last= first_table->prev_global;
 
+    if (query_tables_own_last == &first_table->next_global)
+      query_tables_own_last= first_table->prev_global;
+
     if ((next= *first_table->prev_global= first_table->next_global))
       next->prev_global= first_table->prev_global;
     /* include in new place */
index 4c30dfe674a1b8a7a0dfd3fe33ce8276828dc7dd..c9245bf215a9a8fc2426f9032f8abafd2f494554 100644 (file)
@@ -209,7 +209,7 @@ int mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list,
   */
   char *tdb= thd->db ? thd->db : db;           // Result is never null
   ulong skip_lines= ex->skip_lines;
-  bool transactional_table __attribute__((unused));
+  bool transactional_table MY_ATTRIBUTE((unused));
   DBUG_ENTER("mysql_load");
 
   /*
index d2faf941802ff233b59a81341267afd3620e6509..8b9d81adaa6e6fc4a5781b2714e4fedbfcfaf2f8 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 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
@@ -63,7 +63,7 @@ bool mysql_manager_submit(void (*action)())
   return result;
 }
 
-pthread_handler_t handle_manager(void *arg __attribute__((unused)))
+pthread_handler_t handle_manager(void *arg MY_ATTRIBUTE((unused)))
 {
   int error = 0;
   struct timespec abstime;
index a8427873b850053f763b2effa5932884fa04cbe2..5e75a099f67cbeab47c3b6b6e60fe5dec3335d24 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 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
@@ -100,6 +100,7 @@ only_eq_ref_tables(JOIN *join, ORDER *order, table_map tables,
                    table_map *cached_eq_ref_tables, table_map
                    *eq_ref_tables);
 
+static bool can_switch_from_ref_to_range(THD *thd, JOIN_TAB *tab);
 
 /**
   global select optimisation.
@@ -1121,8 +1122,8 @@ public:
   {
     return (void*) sql_alloc((uint) size);
   }
-  static void operator delete(void *ptr __attribute__((unused)),
-                              size_t size __attribute__((unused)))
+  static void operator delete(void *ptr MY_ATTRIBUTE((unused)),
+                              size_t size MY_ATTRIBUTE((unused)))
   { TRASH(ptr, size); }
 
   Item *and_level;
@@ -1656,6 +1657,9 @@ static Item *build_equal_items_for_cond(THD *thd, Item *cond,
   COND_EQUAL cond_equal;
   cond_equal.upper_levels= inherited;
 
+  if (check_stack_overrun(thd, STACK_MIN_SIZE, NULL))
+    return cond;
+
   if (cond->type() == Item::COND_ITEM)
   {
     List<Item> eq_list;
@@ -7669,45 +7673,8 @@ static bool make_join_select(JOIN *join, Item *cond)
       bool use_quick_range=0;
       Item *tmp;
 
-      /*
-        Heuristic: Switch from 'ref' to 'range' access if 'range'
-        access can utilize more keyparts than 'ref' access. Conditions
-        for doing switching:
-
-        1) Current decision is to use 'ref' access
-        2) 'ref' access depends on a constant, not a value read from a
-           table earlier in the join sequence.
-
-           Rationale: if 'ref' depends on a value from another table,
-           the join condition is not used to limit the rows read by
-           'range' access (that would require dynamic range - 'Range
-           checked for each record'). In other words, if 'ref' depends
-           on a value from another table, we have a query with
-           conditions of the form
-
-            this_table.idx_col1 = other_table.col AND   <<- used by 'ref'
-            this_table.idx_col1 OP <const> AND          <<- used by 'range'
-            this_table.idx_col2 OP <const> AND ...      <<- used by 'range'
-
-           and an index on (idx_col1,idx_col2,...). But the fact that
-           'range' access uses more keyparts does not mean that it is
-           more selective than 'ref' access because these access types
-           utilize different parts of the query condition. We
-           therefore trust the cost based choice made by
-           best_access_path() instead of forcing a heuristic choice
-           here.
-        3) Range access is possible, and it is less costly than
-           table/index scan
-        4) 'ref' access and 'range' access uses the same index
-        5) 'range' access uses more keyparts than 'ref' access
-
-        @todo: This decision should rather be made in best_access_path()
-       */
-      if (tab->type == JT_REF &&                                  // 1)
-          !tab->ref.depend_map &&                                 // 2)
-          tab->quick &&                                           // 3)
-          (uint) tab->ref.key == tab->quick->index &&             // 4)
-          tab->ref.key_length < tab->quick->max_used_key_length)  // 5)
+      /// See if you need to switch to range access
+      if (tab->type == JT_REF && can_switch_from_ref_to_range(thd, tab))
       {
         Opt_trace_object wrapper(trace);
         Opt_trace_object (trace, "access_type_changed").
@@ -8210,6 +8177,99 @@ only_eq_ref_tables(JOIN *join, ORDER *order, table_map tables,
   return true;
 }
 
+/**
+  Heuristic: Switch from 'ref' to 'range' access if 'range' access can utilize
+  more keyparts than 'ref' access. Conditions for doing switching:
+
+  1) 'ref' access depends on a constant, not a value read from a table earlier
+      in the join sequence.
+
+  Rationale: if 'ref' depends on a value from another table, the join condition
+  is not used to limit the rows read by 'range' access (that would require
+  dynamic range - 'Range checked for each record'). In other words, if 'ref'
+  depends on a value from another table, we have a query with conditions of
+  the form
+    this_table.idx_col1 = other_table.col AND   <<- used by 'ref'
+    this_table.idx_col1 OP <const> AND          <<- used by 'range'
+    this_table.idx_col2 OP <const> AND ...      <<- used by 'range'
+
+  and an index on (idx_col1,idx_col2,...). But the fact that 'range' access
+  uses more keyparts does not mean that it is more selective than 'ref' access
+  because these access types utilize different parts of the query condition. We
+  therefore trust the cost based choice made by best_access_path() instead of
+  forcing a heuristic choice here.
+
+  2) Range access is possible, and it is less costly than table/index scan.
+
+    3a) 'ref' access and 'range' access uses the same index.
+    3b) 'range' access uses more keyparts than 'ref' access
+
+    OR
+
+    4) Ref has borrowed the index estimate from range and created a cost
+       estimate (See Optimize_table_order::find_best_ref). This will be a
+       problem if range built it's row estimate using a larger number of key
+       parts than ref. In such a case, shift to range access over the same
+       index. So run the range optimizer with that index as the only choice.
+       (Condition 5 is not relevant here since it has been tested in
+       find_best_ref.)
+
+  @param thd THD      To re-run range optimizer.
+  @param tab JOIN_TAB To check the above conditions.
+
+  @return true   Range is better than ref
+  @return false  Ref is better or switch isn't possible
+
+  @todo: This decision should rather be made in best_access_path()
+*/
+static bool can_switch_from_ref_to_range(THD *thd, JOIN_TAB *tab)
+{
+  if (!tab->ref.depend_map &&                                          // 1)
+      tab->quick)                                                      // 2)
+  {
+    if ((uint) tab->ref.key == tab->quick->index &&                    // 3a)
+        tab->ref.key_length < tab->quick->max_used_key_length)         // 3b)
+      return true;
+    else if (tab->dodgy_ref_cost)                                      // 4)
+    {
+      int error;
+      SQL_SELECT *select;
+      JOIN *join= tab->join;
+      select= make_select(tab->table, join->found_const_table_map,
+                          join->found_const_table_map,
+                          *tab->on_expr_ref ? *tab->on_expr_ref : join->conds,
+                          1, &error);
+
+      if (select)
+      {
+        Opt_trace_context * const trace= &thd->opt_trace;
+        Opt_trace_object trace_wrapper(trace);
+        Opt_trace_array
+          trace_setup_cond(trace,
+                           "rerunning_range_optimizer_for_single_index");
+
+        key_map new_ref_key_map;
+        new_ref_key_map.set_bit(tab->position->key->key);
+        bool retcode= false;
+        if (select->test_quick_select(thd, new_ref_key_map, 0,
+                                      (join->select_options &
+                                       OPTION_FOUND_ROWS ? HA_POS_ERROR :
+                                       join->unit->select_limit_cnt),
+                                      false,  // don't force quick range
+                                      ORDER::ORDER_NOT_RELEVANT) > 0)
+        {
+          delete tab->quick;
+          tab->quick= select->quick;
+          retcode= true;
+        }
+        select->quick= 0;
+        delete select;
+        return retcode;
+      }
+    }
+  }
+  return false;
+}
 
 /**
   Check if an expression in ORDER BY or GROUP BY is a duplicate of a
index e8baa144eab7c15dcc7b1aa703171f8c21dacc99..3634646e8e077b087824177551eb9561adea12ee 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 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
@@ -35,6 +35,9 @@
 #include "sql_insert.h"       // mysql_insert
 #include "sql_update.h"       // mysql_update, mysql_multi_update
 #include "sql_partition.h"    // struct partition_info
+#ifdef WITH_PARTITION_STORAGE_ENGINE
+#include "partition_info.h"   // has_external_data_or_index_dir
+#endif /* WITH_PARTITION_STORAGE_ENGINE */
 #include "sql_db.h"           // mysql_change_db, mysql_create_db,
                               // mysql_rm_db, mysql_upgrade_db,
                               // mysql_alter_db,
@@ -301,43 +304,37 @@ uint server_command_flags[COM_END+1];
 void init_update_queries(void)
 {
   /* Initialize the server command flags array. */
-#ifdef WITH_WSREP
   memset(server_command_flags, 0, sizeof(server_command_flags));
-  server_command_flags[COM_STATISTICS]=   CF_SKIP_QUESTIONS |
-    CF_SKIP_WSREP_CHECK;
-  server_command_flags[COM_PING]=         CF_SKIP_QUESTIONS |
-    CF_SKIP_WSREP_CHECK;
-  server_command_flags[COM_STMT_PREPARE]= CF_SKIP_QUESTIONS |
-    CF_SKIP_WSREP_CHECK;
-  server_command_flags[COM_STMT_EXECUTE]= CF_SKIP_WSREP_CHECK;
-  server_command_flags[COM_STMT_FETCH]=   CF_SKIP_WSREP_CHECK;
-  server_command_flags[COM_STMT_CLOSE]=   CF_SKIP_QUESTIONS |
-    CF_SKIP_WSREP_CHECK;
-  server_command_flags[COM_STMT_RESET]=   CF_SKIP_QUESTIONS |
-    CF_SKIP_WSREP_CHECK;
-  server_command_flags[COM_STMT_SEND_LONG_DATA] = CF_SKIP_WSREP_CHECK;
-
-  server_command_flags[COM_QUIT]= CF_SKIP_WSREP_CHECK;
-  server_command_flags[COM_PROCESS_INFO]= CF_SKIP_WSREP_CHECK;
-  server_command_flags[COM_PROCESS_KILL]= CF_SKIP_WSREP_CHECK;
-  server_command_flags[COM_SHUTDOWN]= CF_SKIP_WSREP_CHECK;
-  server_command_flags[COM_SLEEP]= CF_SKIP_WSREP_CHECK;
-  server_command_flags[COM_TIME]= CF_SKIP_WSREP_CHECK;
-  server_command_flags[COM_INIT_DB]= CF_SKIP_WSREP_CHECK;
-  server_command_flags[COM_END]= CF_SKIP_WSREP_CHECK;
 
-  /*
-    COM_QUERY and COM_SET_OPTION are allowed to pass the early COM_xxx filter,
-    they're checked later in mysql_execute_command().
-  */
-  server_command_flags[COM_QUERY]= CF_SKIP_WSREP_CHECK;
-  server_command_flags[COM_SET_OPTION]= CF_SKIP_WSREP_CHECK;
-#else
   server_command_flags[COM_STATISTICS]= CF_SKIP_QUESTIONS;
   server_command_flags[COM_PING]=       CF_SKIP_QUESTIONS;
   server_command_flags[COM_STMT_PREPARE]= CF_SKIP_QUESTIONS;
   server_command_flags[COM_STMT_CLOSE]=   CF_SKIP_QUESTIONS;
   server_command_flags[COM_STMT_RESET]=   CF_SKIP_QUESTIONS;
+#ifdef WITH_WSREP
+  server_command_flags[COM_STATISTICS]|=   CF_SKIP_WSREP_CHECK;
+  server_command_flags[COM_PING]|=         CF_SKIP_WSREP_CHECK;
+  server_command_flags[COM_STMT_PREPARE]|= CF_SKIP_WSREP_CHECK;
+  server_command_flags[COM_STMT_EXECUTE]|= CF_SKIP_WSREP_CHECK;
+  server_command_flags[COM_STMT_FETCH]|=   CF_SKIP_WSREP_CHECK;
+  server_command_flags[COM_STMT_CLOSE]|=   CF_SKIP_WSREP_CHECK;
+  server_command_flags[COM_STMT_RESET]|=   CF_SKIP_WSREP_CHECK;
+  server_command_flags[COM_STMT_SEND_LONG_DATA]|= CF_SKIP_WSREP_CHECK;
+  server_command_flags[COM_QUIT]|=         CF_SKIP_WSREP_CHECK;
+  server_command_flags[COM_PROCESS_INFO]|= CF_SKIP_WSREP_CHECK;
+  server_command_flags[COM_PROCESS_KILL]|= CF_SKIP_WSREP_CHECK;
+  server_command_flags[COM_SHUTDOWN]|=     CF_SKIP_WSREP_CHECK;
+  server_command_flags[COM_SLEEP]|=        CF_SKIP_WSREP_CHECK;
+  server_command_flags[COM_TIME]|=         CF_SKIP_WSREP_CHECK;
+  server_command_flags[COM_INIT_DB]|=      CF_SKIP_WSREP_CHECK;
+  server_command_flags[COM_END]|=          CF_SKIP_WSREP_CHECK;
+
+  /*
+    COM_QUERY and COM_SET_OPTION are allowed to pass the early COM_xxx filter,
+    they're checked later in mysql_execute_command().
+  */
+  server_command_flags[COM_QUERY]|=        CF_SKIP_WSREP_CHECK;
+  server_command_flags[COM_SET_OPTION]|=   CF_SKIP_WSREP_CHECK;
 #endif /* WITH_WSREP */
 
   /* Initialize the sql command flags array. */
@@ -1384,17 +1381,47 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
   thd->enable_slow_log= TRUE;
   thd->lex->sql_command= SQLCOM_END; /* to avoid confusing VIEW detectors */
   thd->set_time();
-  if (!thd->is_valid_time())
+  if (thd->is_valid_time() == false)
   {
     /*
-     If the time has got past 2038 we need to shut this server down
-     We do this by making sure every command is a shutdown and we 
-     have enough privileges to shut the server down
-
-     TODO: remove this when we have full 64 bit my_time_t support
+      If the time has gone past 2038 we need to shutdown the server. But
+      there is possibility of getting invalid time value on some platforms.
+      For example, gettimeofday() might return incorrect value on solaris
+      platform. Hence validating the current time with 5 iterations before
+      initiating the normal server shutdown process because of time getting
+      past 2038.
     */
-    thd->security_ctx->master_access|= SHUTDOWN_ACL;
-    command= COM_SHUTDOWN;
+    const int max_tries= 5;
+    sql_print_warning("Current time has got past year 2038. Validating current "
+                      "time with %d iterations before initiating the normal "
+                      "server shutdown process.", max_tries);
+
+    int tries= 0;
+    while (++tries <= max_tries)
+    {
+      thd->set_time();
+      if (thd->is_valid_time() == true)
+      {
+        sql_print_warning("Iteration %d: Obtained valid current time from "
+                           "system", tries);
+        break;
+      }
+      sql_print_warning("Iteration %d: Current time obtained from system is "
+                        "greater than 2038", tries);
+    }
+    if (tries > max_tries)
+    {
+      /*
+        If the time has got past 2038 we need to shut this server down.
+        We do this by making sure every command is a shutdown and we
+        have enough privileges to shut the server down
+
+        TODO: remove this when we have full 64 bit my_time_t support
+      */
+      sql_print_error("This MySQL server doesn't support dates later than 2038");
+      thd->security_ctx->master_access|= SHUTDOWN_ACL;
+      command= COM_SHUTDOWN;
+    }
   }
   thd->set_query_id(next_query_id());
   inc_thread_running();
@@ -1912,7 +1939,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
   {
     STATUS_VAR current_global_status_var;
     ulong uptime;
-    uint length __attribute__((unused));
+    uint length MY_ATTRIBUTE((unused));
     ulonglong queries_per_second1000;
     char buff[250];
     uint buff_len= sizeof(buff);
@@ -2068,6 +2095,7 @@ done:
 
   thd->reset_query();
   thd->set_command(COM_SLEEP);
+  thd->proc_info= 0;
 
   /* Performance Schema Interface instrumentation, end */
   MYSQL_END_STATEMENT(thd->m_statement_psi, thd->get_stmt_da());
@@ -2081,7 +2109,7 @@ done:
   /* DTRACE instrumentation, end */
   if (MYSQL_QUERY_DONE_ENABLED() || MYSQL_COMMAND_DONE_ENABLED())
   {
-    int res __attribute__((unused));
+    int res MY_ATTRIBUTE((unused));
     res= (int) thd->is_error();
     if (command == COM_QUERY)
     {
@@ -3222,7 +3250,6 @@ case SQLCOM_PREPARE:
       copy.
     */
     Alter_info alter_info(lex->alter_info, thd->mem_root);
-
     if (thd->is_fatal_error)
     {
       /* If out of memory when creating a copy of alter_info. */
@@ -3230,6 +3257,15 @@ case SQLCOM_PREPARE:
       goto end_with_restore_list;
     }
 
+    if (((lex->create_info.used_fields & HA_CREATE_USED_DATADIR) != 0 ||
+         (lex->create_info.used_fields & HA_CREATE_USED_INDEXDIR) != 0) &&
+        check_access(thd, FILE_ACL, NULL, NULL, NULL, FALSE, FALSE))
+    {
+      res= 1;
+      my_error(ER_SPECIFIC_ACCESS_DENIED_ERROR, MYF(0), "FILE");
+      goto end_with_restore_list;
+    }
+
     if ((res= create_table_precheck(thd, select_tables, create_table)))
       goto end_with_restore_list;
 
@@ -3267,6 +3303,12 @@ case SQLCOM_PREPARE:
 #ifdef WITH_PARTITION_STORAGE_ENGINE
     {
       partition_info *part_info= thd->lex->part_info;
+      if (part_info != NULL && has_external_data_or_index_dir(*part_info) &&
+          check_access(thd, FILE_ACL, NULL, NULL, NULL, FALSE, FALSE))
+      {
+        res= -1;
+        goto end_with_restore_list;
+      }
       if (part_info && !(part_info= thd->lex->part_info->get_clone(true)))
       {
         res= -1;
@@ -5548,6 +5590,7 @@ create_sp_error:
     if (check_access(thd, UPDATE_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_user_password_expire(thd, lex->users_list)))
       my_ok(thd);
@@ -6506,7 +6549,7 @@ long max_stack_used;
   - Passing to check_stack_overrun() prevents the compiler from removing it.
 */
 bool check_stack_overrun(THD *thd, long margin,
-                        uchar *buf __attribute__((unused)))
+                        uchar *buf MY_ATTRIBUTE((unused)))
 {
   long stack_used;
   DBUG_ASSERT(thd == current_thd);
@@ -6992,7 +7035,7 @@ static void wsrep_mysql_parse(THD *thd, char *rawbuf, uint length,
 void mysql_parse(THD *thd, char *rawbuf, uint length,
                  Parser_state *parser_state)
 {
-  int error __attribute__((unused));
+  int error MY_ATTRIBUTE((unused));
   DBUG_ENTER("mysql_parse");
 
   DBUG_EXECUTE_IF("parser_debug", turn_parser_debug_on(););
index 867ab0777ae0abb90c63c5187816a0bf9f695dda..7c10ac4a9733dff2e0e3e6e47e49b40d3d3d69fd 100644 (file)
@@ -231,6 +231,7 @@ inline bool is_supported_parser_charset(const CHARSET_INFO *cs)
 
 #define WSREP_TO_ISOLATION_BEGIN(db_, table_, table_list_)
 #define WSREP_TO_ISOLATION_END 
+#define WSREP_TO_ISOLATION_BEGIN_WRTCHK(db_, table_, table_list_)
 
 #endif /* WITH_WSREP */
 
index 6c2d21b26df13831554648fb60e5f0e1e2fc71be..7924d5f06b19cce138386aa8a7a0f7089e05c6be 100644 (file)
@@ -482,6 +482,8 @@ void Optimize_table_order::best_access_path(
       key_part_map const_part= 0;
       /* The or-null keypart in ref-or-null access: */
       key_part_map ref_or_null_part= 0;
+      /// Set dodgy_ref_cost only if that index is chosen for ref access.
+      bool is_dodgy= false;
 
       /* Calculate how many key segments of the current key we can use */
       Key_use *const start_key= keyuse;
@@ -747,7 +749,10 @@ void Optimize_table_order::best_access_path(
                 if (!found_ref && table->quick_keys.is_set(key) &&    // (1)
                     table->quick_key_parts[key] > max_key_part &&     // (2)
                     records < (double)table->quick_rows[key])         // (3)
+                {
                   records= (double)table->quick_rows[key];
+                  is_dodgy= true;
+                }
 
                 tmp= records;
               }
@@ -855,7 +860,10 @@ void Optimize_table_order::best_access_path(
         }
       }
   done_with_index:
-      trace_access_idx.add("chosen", best_key == start_key);
+      bool chosen= (best_key == start_key);
+      trace_access_idx.add("chosen", chosen);
+      if (chosen)
+        s->dodgy_ref_cost= is_dodgy;
     } /* for each key */
     records= best_records;
   }
@@ -1516,7 +1524,7 @@ bool Optimize_table_order::greedy_search(table_map remaining_tables)
       join state will not be reverted back to its initial state because we
       don't "pop" tables already present in the partial plan.
     */
-    bool is_interleave_error __attribute__((unused))= 
+    bool is_interleave_error MY_ATTRIBUTE((unused))= 
       check_interleaving_with_nj (best_table);
     /* This has been already checked by best_extension_by_limited_search */
     DBUG_ASSERT(!is_interleave_error);
index 99b15a16178796af94c3fae913eb48227829d517..36e9bb3f63b9f043399c32a4162a5e7bf76ff291 100644 (file)
@@ -1,5 +1,5 @@
 /*
-   Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
+   Copyright (c) 2005, 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
@@ -528,8 +528,9 @@ static st_plugin_dl *plugin_dl_add(const LEX_STRING *dl, int report)
     if ((sym= dlsym(plugin_dl.handle, list_of_services[i].name)))
     {
       uint ver= (uint)(intptr)*(void**)sym;
-      if (ver > list_of_services[i].version ||
-        (ver >> 8) < (list_of_services[i].version >> 8))
+      if ((*(void**)sym) != list_of_services[i].service && /* already replaced */
+          (ver > list_of_services[i].version ||
+           (ver >> 8) < (list_of_services[i].version >> 8)))
       {
         char buf[MYSQL_ERRMSG_SIZE];
         my_snprintf(buf, sizeof(buf),
@@ -1215,7 +1216,7 @@ extern "C" uchar *get_bookmark_hash_key(const uchar *, size_t *, my_bool);
 
 
 uchar *get_plugin_hash_key(const uchar *buff, size_t *length,
-                           my_bool not_used __attribute__((unused)))
+                           my_bool not_used MY_ATTRIBUTE((unused)))
 {
   struct st_plugin_int *plugin= (st_plugin_int *)buff;
   *length= (uint)plugin->name.length;
@@ -1224,7 +1225,7 @@ uchar *get_plugin_hash_key(const uchar *buff, size_t *length,
 
 
 uchar *get_bookmark_hash_key(const uchar *buff, size_t *length,
-                             my_bool not_used __attribute__((unused)))
+                             my_bool not_used MY_ATTRIBUTE((unused)))
 {
   struct st_bookmark *var= (st_bookmark *)buff;
   *length= var->name_len + 1;
@@ -3399,7 +3400,7 @@ static void plugin_opt_set_limits(struct my_option *options,
 extern "C" my_bool get_one_plugin_option(int optid, const struct my_option *,
                                          char *);
 
-my_bool get_one_plugin_option(int optid __attribute__((unused)),
+my_bool get_one_plugin_option(int optid MY_ATTRIBUTE((unused)),
                               const struct my_option *opt,
                               char *argument)
 {
@@ -3720,7 +3721,7 @@ static my_option *construct_help_options(MEM_ROOT *mem_root,
 
 static my_bool check_if_option_is_deprecated(int optid,
                                              const struct my_option *opt,
-                                             char *argument __attribute__((unused)))
+                                             char *argument MY_ATTRIBUTE((unused)))
 {
   if (optid == -1)
   {
@@ -3770,7 +3771,7 @@ static int test_plugin_options(MEM_ROOT *tmp_root, struct st_plugin_int *tmp,
   LEX_STRING plugin_name;
   char *varname;
   int error;
-  sys_var *v __attribute__((unused));
+  sys_var *v MY_ATTRIBUTE((unused));
   struct st_bookmark *var;
   uint len, count= EXTRA_OPTIONS;
   DBUG_ENTER("test_plugin_options");
index 32a0f24bf9576ca562f0efcb600fb5aed652059b..21cb3c76a6d917c6d1a58ab02e09f66c4ac2eece 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2002, 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
@@ -399,7 +399,7 @@ static bool send_prep_stmt(Prepared_statement *stmt, uint columns)
 }
 #else
 static bool send_prep_stmt(Prepared_statement *stmt,
-                           uint columns __attribute__((unused)))
+                           uint columns MY_ATTRIBUTE((unused)))
 {
   THD *thd= stmt->thd;
 
@@ -1183,7 +1183,7 @@ swap_parameter_array(Item_param **param_array_dst,
 
 static bool insert_params_from_vars(Prepared_statement *stmt,
                                     List<LEX_STRING>& varnames,
-                                    String *query __attribute__((unused)))
+                                    String *query MY_ATTRIBUTE((unused)))
 {
   Item_param **begin= stmt->param_array;
   Item_param **end= begin + stmt->param_count;
@@ -4028,7 +4028,10 @@ bool Prepared_statement::execute(String *expanded_query, bool open_cursor)
   /* Go! */
 
   if (open_cursor)
+  {
+    lex->safe_to_cache_query= 0;
     error= mysql_open_cursor(thd, &result, &cursor);
+  }
   else
   {
     /*
@@ -4547,7 +4550,7 @@ bool Protocol_local::store(const char *str, size_t length,
 /* Store MYSQL_TIME (in binary format) */
 
 bool Protocol_local::store(MYSQL_TIME *time,
-                           uint precision __attribute__((unused)))
+                           uint precision MY_ATTRIBUTE((unused)))
 {
   return store_column(time, sizeof(MYSQL_TIME));
 }
@@ -4564,7 +4567,7 @@ bool Protocol_local::store_date(MYSQL_TIME *time)
 /** Store MYSQL_TIME (in binary format) */
 
 bool Protocol_local::store_time(MYSQL_TIME *time,
-                                uint precision __attribute__((unused)))
+                                uint precision MY_ATTRIBUTE((unused)))
 {
   return store_column(time, sizeof(MYSQL_TIME));
 }
index 503d9aecc9ab86f9ba1f5d653082ed6dbd6ffc41..3a557b4a88af2633597ffcd776778019ddc1d7e4 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 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
@@ -3075,7 +3075,7 @@ bool JOIN_TAB::and_with_jt_and_sel_condition(Item *add_cond, uint line)
 */
 bool JOIN_TAB::and_with_condition(Item *add_cond, uint line)
 {
-  Item *old_cond __attribute__((unused))= m_condition;
+  Item *old_cond MY_ATTRIBUTE((unused))= m_condition;
   if (and_conditions(&m_condition, add_cond))
     return true;
   DBUG_PRINT("info", ("JOIN_TAB::m_condition extended. Change %p -> %p "
index 01cf33ba67f9c4782396b3d59fd64de1711c6435..76d6f21158c55debc2073a7d58d72c59ae970c85 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef SQL_SELECT_INCLUDED
 #define SQL_SELECT_INCLUDED
 
-/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 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
@@ -769,6 +769,12 @@ public:
   /** TRUE <=> remove duplicates on this table. */
   bool distinct;
 
+  /**
+    Setting this flag means ref is using lesser number of key parts than range
+    and it borrows range's row estimate.
+  */
+  bool dodgy_ref_cost;
+
   /** Clean up associated table after query execution, including resources */
   void cleanup();
   inline bool is_using_loose_index_scan()
@@ -968,7 +974,8 @@ st_join_table::st_join_table()
     ref_array(NULL),
     send_records(0),
     having(NULL),
-    distinct(false)
+    distinct(false),
+    dodgy_ref_cost(false)
 {
   /**
     @todo Add constructor to READ_RECORD.
index d11082ac1ade3623732e85eb263949180f40a217..11ba354efbb3c8bddf1a3d48982eb405a0720bfa 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 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
@@ -86,7 +86,7 @@ static void merge_server_struct(FOREIGN_SERVER *from, FOREIGN_SERVER *to);
 
 
 static uchar *servers_cache_get_key(FOREIGN_SERVER *server, size_t *length,
-                              my_bool not_used __attribute__((unused)))
+                              my_bool not_used MY_ATTRIBUTE((unused)))
 {
   DBUG_ENTER("servers_cache_get_key");
   DBUG_PRINT("info", ("server_name_length %d server_name %s",
index 9d6dad07170a3dac9c96e4c5bd71c2c78a74d15c..3219b9951b47040e21498d484819977d903ad8cc 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 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
@@ -372,7 +372,7 @@ ignore_db_dirs_init()
 
 static uchar *
 db_dirs_hash_get_key(const uchar *data, size_t *len_ret,
-                     my_bool __attribute__((unused)))
+                     my_bool MY_ATTRIBUTE((unused)))
 {
   LEX_STRING *e= (LEX_STRING *) data;
 
@@ -2035,8 +2035,8 @@ public:
   {
     return (void*) sql_alloc((uint) size);
   }
-  static void operator delete(void *ptr __attribute__((unused)),
-                              size_t size __attribute__((unused)))
+  static void operator delete(void *ptr MY_ATTRIBUTE((unused)),
+                              size_t size MY_ATTRIBUTE((unused)))
   { TRASH(ptr, size); }
 
   ulong thread_id;
index d152301effd2152a5678f3428521152750334749..02298cb1734c69d1cc6d3fa4e4d90aaadf0964c8 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights
+/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights
  * reserved.
 
    This program is free software; you can redistribute it and/or modify
@@ -433,10 +433,11 @@ void String::strip_sp()
 
 bool String::append(const String &s)
 {
-  DBUG_ASSERT(!this->uses_buffer_owned_by(&s));
-  DBUG_ASSERT(!s.uses_buffer_owned_by(this));
   if (s.length())
   {
+    DBUG_ASSERT(!this->uses_buffer_owned_by(&s));
+    DBUG_ASSERT(!s.uses_buffer_owned_by(this));
+
     if (realloc(str_length+s.length()))
       return TRUE;
     memcpy(Ptr+str_length,s.ptr(),s.length());
index b90716ea978822b725eadfbc1a728f79923b56c3..00cb417b74991688cf780e8c9a4ba2dc44f9cf4a 100644 (file)
@@ -87,7 +87,9 @@ static bool check_engine(THD *thd, const char *db_name,
                          HA_CREATE_INFO *create_info);
 
 static int
-mysql_prepare_create_table(THD *thd, HA_CREATE_INFO *create_info,
+mysql_prepare_create_table(THD *thd, const char *error_schema_name,
+                           const char *error_table_name,
+                           HA_CREATE_INFO *create_info,
                            Alter_info *alter_info,
                            bool tmp_table,
                            uint *db_options,
@@ -1863,7 +1865,9 @@ bool mysql_write_frm(ALTER_PARTITION_PARAM_TYPE *lpt, uint flags)
   strxmov(shadow_frm_name, shadow_path, reg_ext, NullS);
   if (flags & WFRM_WRITE_SHADOW)
   {
-    if (mysql_prepare_create_table(lpt->thd, lpt->create_info,
+    if (mysql_prepare_create_table(lpt->thd, lpt->db,
+                                   lpt->table_name,
+                                   lpt->create_info,
                                    lpt->alter_info,
                                    /*tmp_table*/ 1,
                                    &lpt->db_options,
@@ -3267,12 +3271,15 @@ void promote_first_timestamp_column(List<Create_field> *column_definitions)
 /**
   Check if there is a duplicate key. Report a warning for every duplicate key.
 
-  @param thd              Thread context.
-  @param key              Key to be checked.
-  @param key_info         Key meta-data info.
-  @param alter_info       List of columns and indexes to create.
+  @param thd                Thread context.
+  @param error_schema_name  Schema name of the table used for error reporting.
+  @param error_table_name   Table name used for error reporting.
+  @param key                Key to be checked.
+  @param key_info           Key meta-data info.
+  @param alter_info         List of columns and indexes to create.
 */
-static void check_duplicate_key(THD *thd,
+static void check_duplicate_key(THD *thd, const char *error_schema_name,
+                                const char *error_table_name,
                                 Key *key, KEY *key_info,
                                 Alter_info *alter_info)
 {
@@ -3352,8 +3359,8 @@ static void check_duplicate_key(THD *thd,
       push_warning_printf(thd, Sql_condition::WARN_LEVEL_NOTE,
                           ER_DUP_INDEX, ER(ER_DUP_INDEX),
                           key_info->name,
-                          thd->lex->query_tables->db,
-                          thd->lex->query_tables->table_name);
+                          error_schema_name,
+                          error_table_name);
       break;
     }
   }
@@ -3366,6 +3373,10 @@ static void check_duplicate_key(THD *thd,
   SYNOPSIS
     mysql_prepare_create_table()
       thd                       Thread object.
+      error_schema_name         Schema name of the table to create/alter,only
+                                used for error reporting.
+      error_table_name          Name of table to create/alter, only used for
+                                error reporting.
       create_info               Create information (like MAX_ROWS).
       alter_info                List of columns and indexes to create
       tmp_table                 If a temporary table is to be created.
@@ -3387,7 +3398,9 @@ static void check_duplicate_key(THD *thd,
 */
 
 static int
-mysql_prepare_create_table(THD *thd, HA_CREATE_INFO *create_info,
+mysql_prepare_create_table(THD *thd, const char *error_schema_name,
+                           const char *error_table_name,
+                           HA_CREATE_INFO *create_info,
                            Alter_info *alter_info,
                            bool tmp_table,
                            uint *db_options,
@@ -4219,9 +4232,18 @@ mysql_prepare_create_table(THD *thd, HA_CREATE_INFO *create_info,
        else
          key_info->flags|= HA_PACK_KEY;
       }
-      /* Check if the key segment is partial, set the key flag accordingly */
-      if (key_part_length != sql_field->key_length)
-        key_info->flags|= HA_KEY_HAS_PART_KEY_SEG;
+      /* 
+         Check if the key segment is partial, set the key flag
+         accordingly. The key segment for a POINT column is NOT considered
+         partial if key_length==MAX_LEN_GEOM_POINT_FIELD.
+      */
+      if (key_part_length != sql_field->key_length &&
+          !(sql_field->sql_type == MYSQL_TYPE_GEOMETRY &&
+            sql_field->geom_type == Field::GEOM_POINT &&
+            key_part_length == MAX_LEN_GEOM_POINT_FIELD))
+        {
+          key_info->flags|= HA_KEY_HAS_PART_KEY_SEG;
+        }
 
       key_length+= key_part_length;
       key_part_info++;
@@ -4279,7 +4301,8 @@ mysql_prepare_create_table(THD *thd, HA_CREATE_INFO *create_info,
     }
 
     // Check if a duplicate index is defined.
-    check_duplicate_key(thd, key, key_info, alter_info);
+    check_duplicate_key(thd, error_schema_name, error_table_name,
+                        key, key_info, alter_info);
 
     key_info++;
   }
@@ -4529,6 +4552,8 @@ static void sp_prepare_create_field(THD *thd, Create_field *sql_field)
   @param thd                 Thread object
   @param db                  Database
   @param table_name          Table name
+  @param error_table_name    The real table name in case table_name is a temporary
+                             table (ALTER). Only used for error messages.
   @param path                Path to table (i.e. to its .FRM file without
                              the extension).
   @param create_info         Create information (like MAX_ROWS)
@@ -4561,6 +4586,7 @@ static void sp_prepare_create_field(THD *thd, Create_field *sql_field)
 static
 bool create_table_impl(THD *thd,
                        const char *db, const char *table_name,
+                       const char *error_table_name,
                        const char *path,
                        HA_CREATE_INFO *create_info,
                        Alter_info *alter_info,
@@ -4807,7 +4833,8 @@ bool create_table_impl(THD *thd,
   }
 #endif
 
-  if (mysql_prepare_create_table(thd, create_info, alter_info,
+  if (mysql_prepare_create_table(thd, db, error_table_name,
+                                 create_info, alter_info,
                                  internal_tmp_table,
                                  &db_options, file,
                                  key_info, key_count,
@@ -5080,9 +5107,9 @@ bool mysql_create_table_no_lock(THD *thd,
     }
   }
 
-  return create_table_impl(thd, db, table_name, path, create_info, alter_info,
-                           false, select_field_count, false, is_trans,
-                           &not_used_1, &not_used_2);
+  return create_table_impl(thd, db, table_name, table_name, path, create_info,
+                           alter_info, false, select_field_count, false,
+                           is_trans, &not_used_1, &not_used_2);
 }
 
 
@@ -5567,7 +5594,7 @@ bool mysql_create_like_table(THD* thd, TABLE_LIST* table, TABLE_LIST* src_table,
           */
           create_info->used_fields|= HA_CREATE_USED_ENGINE;
 
-          int result __attribute__((unused))=
+          int result MY_ATTRIBUTE((unused))=
             store_create_info(thd, table, &query,
                               create_info, TRUE /* show_database */);
 
@@ -6303,8 +6330,8 @@ bool mysql_compare_tables(TABLE *table,
   KEY *key_info_buffer= NULL;
 
   /* Create the prepared information. */
-  if (mysql_prepare_create_table(thd, create_info,
-                                 &tmp_alter_info,
+  if (mysql_prepare_create_table(thd, "", "",
+                                 create_info, &tmp_alter_info,
                                  (table->s->tmp_table != NO_TMP_TABLE),
                                  &db_options,
                                  table->file, &key_info_buffer,
@@ -8437,6 +8464,7 @@ bool mysql_alter_table(THD *thd,char *new_db, char *new_name,
 
   tmp_disable_binlog(thd);
   error= create_table_impl(thd, alter_ctx.new_db, alter_ctx.tmp_name,
+                           alter_ctx.table_name,
                            alter_ctx.get_tmp_path(),
                            create_info, alter_info,
                            true, 0, true, NULL,
index 0349d894d079aa2342ddac56cdd3c906ad023bdc..b57649b021ff2af10fd3911064fb2f65d8cf1963 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 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
@@ -1187,7 +1187,7 @@ const char *get_date_time_format_str(KNOWN_DATE_TIME_FORMAT *format,
   @param OUT str  String to conver to
   @param dec      Number of fractional digits.
 */
-void make_time(const DATE_TIME_FORMAT *format __attribute__((unused)),
+void make_time(const DATE_TIME_FORMAT *format MY_ATTRIBUTE((unused)),
                const MYSQL_TIME *l_time, String *str, uint dec)
 {
   uint length= (uint) my_time_to_str(l_time, (char*) str->ptr(), dec);
@@ -1202,7 +1202,7 @@ void make_time(const DATE_TIME_FORMAT *format __attribute__((unused)),
   @param l_time   DATE value
   @param OUT str  String to conver to
 */
-void make_date(const DATE_TIME_FORMAT *format __attribute__((unused)),
+void make_date(const DATE_TIME_FORMAT *format MY_ATTRIBUTE((unused)),
                const MYSQL_TIME *l_time, String *str)
 {
   uint length= (uint) my_date_to_str(l_time, (char*) str->ptr());
@@ -1218,7 +1218,7 @@ void make_date(const DATE_TIME_FORMAT *format __attribute__((unused)),
   @param OUT str  String to conver to
   @param dec      Number of fractional digits.
 */
-void make_datetime(const DATE_TIME_FORMAT *format __attribute__((unused)),
+void make_datetime(const DATE_TIME_FORMAT *format MY_ATTRIBUTE((unused)),
                    const MYSQL_TIME *l_time, String *str, uint dec)
 {
   uint length= (uint) my_datetime_to_str(l_time, (char*) str->ptr(), dec);
index f664e8f87ec0bea934e66b5a6436368f4911765b..1e966012da1f5694a9ac639b0c43df0fd3311a3b 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2011, 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
@@ -359,6 +359,7 @@ Field *create_tmp_field(THD *thd, TABLE *table,Item *item, Item::Type type,
   case Item::REF_ITEM:
   case Item::NULL_ITEM:
   case Item::VARBIN_ITEM:
+  case Item::PARAM_ITEM:
     if (make_copy_field)
     {
       DBUG_ASSERT(((Item_result_field*)item)->result_field);
index a7c44d23a69e0879794d057e27d2ddccd00be2d2..8527173ee904b0427a3326f141f805cf32c8af46 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 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
@@ -94,7 +94,7 @@ static char *init_syms(udf_func *tmp, char *nm)
 
 
 extern "C" uchar* get_hash_key(const uchar *buff, size_t *length,
-                             my_bool not_used __attribute__((unused)))
+                             my_bool not_used MY_ATTRIBUTE((unused)))
 {
   udf_func *udf=(udf_func*) buff;
   *length=(uint) udf->name.length;
index 5ee39eb406bb39a08ccc6c9e50d6e4803d76780c..5305fae6989cceac6befeb8421715aa6caa53aa7 100644 (file)
@@ -452,7 +452,7 @@ int mysql_update(THD *thd,
   /* Update the table->file->stats.records number */
   table->file->info(HA_STATUS_VARIABLE | HA_STATUS_NO_LOCK);
 
-  table->mark_columns_needed_for_update();
+  table->mark_columns_needed_for_update(false/*mark_binlog_columns=false*/);
   select= make_select(table, 0, 0, conds, 0, &error);
 
   { // Enter scope for optimizer trace wrapper
@@ -530,7 +530,7 @@ int mysql_update(THD *thd,
 #ifdef WITH_PARTITION_STORAGE_ENGINE
   used_key_is_modified|= partition_key_modified(table, table->write_set);
 #endif
-
+  table->mark_columns_per_binlog_row_image();
   using_filesort= order && (need_sort||used_key_is_modified);
   if (thd->lex->describe)
   {
@@ -1863,12 +1863,12 @@ multi_update::initialize_tables(JOIN *join)
     {
       if (safe_update_on_fly(thd, join->join_tab, table_ref, all_tables))
       {
-        table->mark_columns_needed_for_update();
+        table->mark_columns_needed_for_update(true/*mark_binlog_columns=true*/);
        table_to_update= table;                 // Update table on the fly
        continue;
       }
     }
-    table->mark_columns_needed_for_update();
+    table->mark_columns_needed_for_update(true/*mark_binlog_columns=true*/);
 
     /*
       enable uncacheable flag if we update a view with check option
index 1b94b6df10978d8ed5c19f1ebb7cccf8ecfacbed..a80d6d11762c3a9bda7a7255f02538a32700bb93 100644 (file)
@@ -113,18 +113,18 @@ int yylex(void *yylval, void *yythd);
 <pre>
   yyerrlab1:
   #if defined (__GNUC_MINOR__) && 2093 <= (__GNUC__ * 1000 + __GNUC_MINOR__)
-    __attribute__ ((__unused__))
+    MY_ATTRIBUTE ((__unused__))
   #endif
 </pre>
-  This usage of __attribute__ is illegal, so we remove it.
+  This usage of MY_ATTRIBUTE is illegal, so we remove it.
   See the following references for details:
   http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00014.html
   http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14273
 */
 
 #if defined (__GNUC_MINOR__) && 2093 <= (__GNUC__ * 1000 + __GNUC_MINOR__)
-#undef __attribute__
-#define __attribute__(X)
+#undef MY_ATTRIBUTE
+#define MY_ATTRIBUTE(X)
 #endif
 
 
@@ -2515,6 +2515,11 @@ server_def:
           ident_or_text
           OPTIONS_SYM '(' server_options_list ')'
           {
+            if ($2.length == 0)
+            {
+              my_error(ER_WRONG_VALUE, MYF(0), "server name", "");
+              MYSQL_YYABORT;
+            }
             Lex->server_options.server_name= $2.str;
             Lex->server_options.server_name_length= $2.length;
             Lex->server_options.scheme= $6.str;
@@ -5557,6 +5562,12 @@ part_name:
           {
             partition_info *part_info= Lex->part_info;
             partition_element *p_elem= part_info->curr_part_elem;
+            if (check_string_char_length(&$1, "", NAME_CHAR_LEN,
+                                         system_charset_info, true))
+            {
+              my_error(ER_TOO_LONG_IDENT, MYF(0), $1.str);
+              MYSQL_YYABORT;
+            }
             p_elem->partition_name= $1.str;
           }
         ;
@@ -5851,7 +5862,15 @@ sub_part_definition:
 
 sub_name:
           ident_or_text
-          { Lex->part_info->curr_part_elem->partition_name= $1.str; }
+          {
+            if (check_string_char_length(&$1, "", NAME_CHAR_LEN,
+                                         system_charset_info, true))
+            {
+              my_error(ER_TOO_LONG_IDENT, MYF(0), $1.str);
+              MYSQL_YYABORT;
+            }
+            Lex->part_info->curr_part_elem->partition_name= $1.str;
+          }
         ;
 
 opt_part_options:
index 8f403d085e5c8db22ff78b2e29dc0c7a02eb668c..078b861f069c4d75d7d1ee1d1571f2187813a159 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2002, 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
@@ -2603,7 +2603,11 @@ static Sys_var_charptr Sys_secure_file_priv(
        "Limit LOAD DATA, SELECT ... OUTFILE, and LOAD_FILE() to files "
        "within specified directory",
        READ_ONLY GLOBAL_VAR(opt_secure_file_priv),
-       CMD_LINE(REQUIRED_ARG), IN_FS_CHARSET, DEFAULT(0));
+#ifndef EMBEDDED_LIBRARY
+       CMD_LINE(REQUIRED_ARG), IN_FS_CHARSET, DEFAULT(DEFAULT_SECURE_FILE_PRIV_DIR));
+#else
+       CMD_LINE(REQUIRED_ARG), IN_FS_CHARSET, DEFAULT(DEFAULT_SECURE_FILE_PRIV_EMBEDDED_DIR));
+#endif
 
 static bool fix_server_id(sys_var *self, THD *thd, enum_var_type type)
 {
@@ -3686,6 +3690,14 @@ static bool check_log_path(sys_var *self, THD *thd, set_var *var)
   if (!var->save_result.string_value.str)
     return true;
 
+  if (!is_valid_log_name(var->save_result.string_value.str,
+                         var->save_result.string_value.length))
+  {
+    my_error(ER_WRONG_VALUE_FOR_VAR, MYF(0),
+             self->name.str, var->save_result.string_value.str);
+    return true;
+  }
+
   if (var->save_result.string_value.length > FN_REFLEN)
   { // path is too long
     my_error(ER_PATH_LENGTH, MYF(0), self->name.str);
@@ -3732,7 +3744,7 @@ static bool check_log_path(sys_var *self, THD *thd, set_var *var)
   return false;
 }
 static bool fix_log(char** logname, const char* default_logname,
-                    const char*ext, bool enabled, void (*reopen)(char*))
+                    const char*ext, bool enabled, bool (*reopen)(char*))
 {
   if (!*logname) // SET ... = DEFAULT
   {
@@ -3744,16 +3756,17 @@ static bool fix_log(char** logname, const char* default_logname,
   }
   logger.lock_exclusive();
   mysql_mutex_unlock(&LOCK_global_system_variables);
+  bool error= false;
   if (enabled)
-    reopen(*logname);
+    error= reopen(*logname);
   logger.unlock();
   mysql_mutex_lock(&LOCK_global_system_variables);
-  return false;
+  return error;
 }
-static void reopen_general_log(char* name)
+static bool reopen_general_log(char* name)
 {
   logger.get_log_file_handler()->close(0);
-  logger.get_log_file_handler()->open_query_log(name);
+  return logger.get_log_file_handler()->open_query_log(name);
 }
 static bool fix_general_log_file(sys_var *self, THD *thd, enum_var_type type)
 {
@@ -3766,10 +3779,10 @@ static Sys_var_charptr Sys_general_log_path(
        IN_FS_CHARSET, DEFAULT(0), NO_MUTEX_GUARD, NOT_IN_BINLOG,
        ON_CHECK(check_log_path), ON_UPDATE(fix_general_log_file));
 
-static void reopen_slow_log(char* name)
+static bool reopen_slow_log(char* name)
 {
   logger.get_slow_log_file_handler()->close(0);
-  logger.get_slow_log_file_handler()->open_slow_log(name);
+  return logger.get_slow_log_file_handler()->open_slow_log(name);
 }
 static bool fix_slow_log_file(sys_var *self, THD *thd, enum_var_type type)
 {
@@ -4399,13 +4412,14 @@ static Sys_var_charptr Sys_wsrep_start_position (
 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));
+       VALID_RANGE(1024, WSREP_MAX_WS_SIZE), DEFAULT(WSREP_MAX_WS_SIZE),
+       BLOCK_SIZE(1), NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(0),
+       ON_UPDATE(wsrep_max_ws_size_update));
 
 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));
+       VALID_RANGE(0, 1048576), DEFAULT(0), BLOCK_SIZE(1));
 
 static Sys_var_charptr Sys_wsrep_notify_cmd(
        "wsrep_notify_cmd", "",
index 7481677ed3358e2f1ffe80b8d29e88d68cdfa53b..a848dd27e3a7715534c4396638333755e1873540 100644 (file)
@@ -1,5 +1,5 @@
 /*
-   Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
+   Copyright (c) 2000, 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
@@ -210,7 +210,7 @@ View_creation_ctx * View_creation_ctx::create(THD *thd,
 /* Get column name from column hash */
 
 static uchar *get_field_name(Field **buff, size_t *length,
-                             my_bool not_used __attribute__((unused)))
+                             my_bool not_used MY_ATTRIBUTE((unused)))
 {
   *length= (uint) strlen((*buff)->field_name);
   return (uchar*) (*buff)->field_name;
@@ -1788,8 +1788,10 @@ static int open_binary_frm(THD *thd, TABLE_SHARE *share, uchar *head,
   /* Fix key->name and key_part->field */
   if (key_parts)
   {
-    uint primary_key=(uint) (find_type(primary_key_name, &share->keynames,
-                                       FIND_TYPE_NO_PREFIX) - 1);
+    const int pk_off= find_type(primary_key_name, &share->keynames,
+                                  FIND_TYPE_NO_PREFIX);
+    uint primary_key= (pk_off > 0 ? pk_off-1 : MAX_KEY);
+
     longlong ha_option= handler_file->ha_table_flags();
     keyinfo= share->key_info;
     key_part= keyinfo->key_part;
@@ -5353,12 +5355,14 @@ void TABLE::mark_columns_needed_for_delete()
   @brief
   Mark columns needed for doing an update of a row
 
+  @param mark_binlog_columns if true, mark columns as per binlog_row_image
+                             requirements.
   @details
     Some engines needs to have all columns in an update (to be able to
     build a complete row). If this is the case, we mark all not
     updated columns to be read.
 
-    If this is no the case, we do like in the delete case and mark
+    If this is not the case, we do like in the delete case and mark
     if neeed, either the primary key column or all columns to be read.
     (see mark_columns_needed_for_delete() for details)
 
@@ -5366,17 +5370,30 @@ void TABLE::mark_columns_needed_for_delete()
     mark all USED key columns as 'to-be-read'. This allows the engine to
     loop over the given record to find all changed keys and doesn't have to
     retrieve the row again.
-    
+
     Unlike other similar methods, it doesn't mark fields used by triggers,
     that is the responsibility of the caller to do, by using
     Table_triggers_list::mark_used_fields(TRG_EVENT_UPDATE)!
+
+    Note: Marking additional columns as per binlog_row_image requirements will
+    influence query execution plan. For example in the case of
+    binlog_row_image=FULL the entire read_set and write_set needs to be flagged.
+    This will influence update query to think that 'used key is being modified'
+    and query will create a temporary table to process the update operation.
+    Which will result in performance degradation. Hence callers who don't want
+    their query execution to be influenced as per binlog_row_image requirements
+    can skip marking binlog specific columns here and they should make an
+    explicit call to 'mark_columns_per_binlog_row_image()' function to mark
+    binlog_row_image specific columns.
 */
 
-void TABLE::mark_columns_needed_for_update()
+void TABLE::mark_columns_needed_for_update(bool mark_binlog_columns)
 {
 
   DBUG_ENTER("mark_columns_needed_for_update");
-  mark_columns_per_binlog_row_image();
+
+  if (mark_binlog_columns)
+    mark_columns_per_binlog_row_image();
   if (file->ha_table_flags() & HA_REQUIRES_KEY_COLUMNS_FOR_DELETE)
   {
     /* Mark all used key columns for read */
index ea790ec4c6a65c7734959b4d8518dbdaa31e25d5..43e9124695bf01f27c47c686a8c04ee3d11b3f49 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef TABLE_INCLUDED
 #define TABLE_INCLUDED
 
-/* Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 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
@@ -1216,7 +1216,7 @@ public:
   void mark_columns_used_by_index_no_reset(uint index, MY_BITMAP *map);
   void mark_columns_used_by_index(uint index);
   void mark_auto_increment_column(void);
-  void mark_columns_needed_for_update(void);
+  void mark_columns_needed_for_update(bool mark_binlog_columns);
   void mark_columns_needed_for_delete(void);
   void mark_columns_needed_for_insert(void);
   void mark_columns_per_binlog_row_image(void);
index cca5727c3cce753df7eb197d1b9b1efe263ec029..e87b0a23f8d942f843e6d08693882f3a02c343fa 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2012, 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
@@ -33,7 +33,7 @@ PSI_mutex_info Table_cache::m_mutex_keys[]= {
 
 extern "C" uchar *table_cache_key(const uchar *record,
                                   size_t *length,
-                                  my_bool not_used __attribute__((unused)))
+                                  my_bool not_used MY_ATTRIBUTE((unused)))
 {
   TABLE_SHARE *share= ((Table_cache_element*)record)->get_share();
   *length= share->table_cache_key.length;
index 124791786471394b88c77aa4ea4ea0e812563681..5f3b4c95343cac634b74856af83e39606def0067 100644 (file)
@@ -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=
index 1fc75dba8872b15acc2f57f8788da545173201f9..bb5249f736a30d98414d3af55020e69d0a9960b8 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2004, 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
@@ -1490,7 +1490,7 @@ public:
 
 extern "C" uchar *
 my_tz_names_get_key(Tz_names_entry *entry, size_t *length,
-                    my_bool not_used __attribute__((unused)))
+                    my_bool not_used MY_ATTRIBUTE((unused)))
 {
   *length= entry->name.length();
   return (uchar*) entry->name.ptr();
@@ -1499,7 +1499,7 @@ my_tz_names_get_key(Tz_names_entry *entry, size_t *length,
 extern "C" uchar *
 my_offset_tzs_get_key(Time_zone_offset *entry,
                       size_t *length,
-                      my_bool not_used __attribute__((unused)))
+                      my_bool not_used MY_ATTRIBUTE((unused)))
 {
   *length= sizeof(long);
   return (uchar*) &entry->offset;
index 1b1c92e7a7c45195257642234fcd00e26cd04f9b..3b22eb670ff83f3b13a3f8ccebe5895ea70e6ad1 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 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
@@ -227,7 +227,7 @@ my_bool metaphon_init(UDF_INIT *initid, UDF_ARGS *args, char *message)
 ****************************************************************************/
 
 
-void metaphon_deinit(UDF_INIT *initid __attribute__((unused)))
+void metaphon_deinit(UDF_INIT *initid MY_ATTRIBUTE((unused)))
 {
 }
 
@@ -273,9 +273,9 @@ static char codes[26] =  {
 #define NOGHTOF(x)  (codes[(x) - 'A'] & 16)    /* BDH */
 
 
-char *metaphon(UDF_INIT *initid __attribute__((unused)),
+char *metaphon(UDF_INIT *initid MY_ATTRIBUTE((unused)),
                UDF_ARGS *args, char *result, unsigned long *length,
-               char *is_null, char *error __attribute__((unused)))
+               char *is_null, char *error MY_ATTRIBUTE((unused)))
 {
   const char *word=args->args[0];
   const char *w_end;
@@ -550,8 +550,8 @@ my_bool myfunc_double_init(UDF_INIT *initid, UDF_ARGS *args, char *message)
 }
 
 
-double myfunc_double(UDF_INIT *initid __attribute__((unused)), UDF_ARGS *args,
-                     char *is_null, char *error __attribute__((unused)))
+double myfunc_double(UDF_INIT *initid MY_ATTRIBUTE((unused)), UDF_ARGS *args,
+                     char *is_null, char *error MY_ATTRIBUTE((unused)))
 {
   unsigned long val = 0;
   unsigned long v = 0;
@@ -589,9 +589,9 @@ double myfunc_double(UDF_INIT *initid __attribute__((unused)), UDF_ARGS *args,
 
 /* This function returns the sum of all arguments */
 
-longlong myfunc_int(UDF_INIT *initid __attribute__((unused)), UDF_ARGS *args,
-                    char *is_null __attribute__((unused)),
-                    char *error __attribute__((unused)))
+longlong myfunc_int(UDF_INIT *initid MY_ATTRIBUTE((unused)), UDF_ARGS *args,
+                    char *is_null MY_ATTRIBUTE((unused)),
+                    char *error MY_ATTRIBUTE((unused)))
 {
   longlong val = 0;
   uint i;
@@ -621,9 +621,9 @@ longlong myfunc_int(UDF_INIT *initid __attribute__((unused)), UDF_ARGS *args,
   At least one of _init/_deinit is needed unless the server is started
   with --allow_suspicious_udfs.
 */
-my_bool myfunc_int_init(UDF_INIT *initid __attribute__((unused)),
-                        UDF_ARGS *args __attribute__((unused)),
-                        char *message __attribute__((unused)))
+my_bool myfunc_int_init(UDF_INIT *initid MY_ATTRIBUTE((unused)),
+                        UDF_ARGS *args MY_ATTRIBUTE((unused)),
+                        char *message MY_ATTRIBUTE((unused)))
 {
   return 0;
 }
@@ -663,9 +663,9 @@ void sequence_deinit(UDF_INIT *initid)
     free(initid->ptr);
 }
 
-longlong sequence(UDF_INIT *initid __attribute__((unused)), UDF_ARGS *args,
-                  char *is_null __attribute__((unused)),
-                  char *error __attribute__((unused)))
+longlong sequence(UDF_INIT *initid MY_ATTRIBUTE((unused)), UDF_ARGS *args,
+                  char *is_null MY_ATTRIBUTE((unused)),
+                  char *error MY_ATTRIBUTE((unused)))
 {
   ulonglong val=0;
   if (args->arg_count)
@@ -727,16 +727,16 @@ my_bool lookup_init(UDF_INIT *initid, UDF_ARGS *args, char *message)
   return 0;
 }
 
-void lookup_deinit(UDF_INIT *initid __attribute__((unused)))
+void lookup_deinit(UDF_INIT *initid MY_ATTRIBUTE((unused)))
 {
 #if !defined(HAVE_GETHOSTBYADDR_R) || !defined(HAVE_SOLARIS_STYLE_GETHOST)
   (void) pthread_mutex_destroy(&LOCK_hostname);
 #endif
 }
 
-char *lookup(UDF_INIT *initid __attribute__((unused)), UDF_ARGS *args,
+char *lookup(UDF_INIT *initid MY_ATTRIBUTE((unused)), UDF_ARGS *args,
              char *result, unsigned long *res_length, char *null_value,
-             char *error __attribute__((unused)))
+             char *error MY_ATTRIBUTE((unused)))
 {
   uint length;
   char name_buff[256];
@@ -807,16 +807,16 @@ my_bool reverse_lookup_init(UDF_INIT *initid, UDF_ARGS *args, char *message)
   return 0;
 }
 
-void reverse_lookup_deinit(UDF_INIT *initid __attribute__((unused)))
+void reverse_lookup_deinit(UDF_INIT *initid MY_ATTRIBUTE((unused)))
 {
 #if !defined(HAVE_GETHOSTBYADDR_R) || !defined(HAVE_SOLARIS_STYLE_GETHOST)
   (void) pthread_mutex_destroy(&LOCK_hostname);
 #endif
 }
 
-char *reverse_lookup(UDF_INIT *initid __attribute__((unused)), UDF_ARGS *args,
+char *reverse_lookup(UDF_INIT *initid MY_ATTRIBUTE((unused)), UDF_ARGS *args,
                      char *result, unsigned long *res_length,
-                     char *null_value, char *error __attribute__((unused)))
+                     char *null_value, char *error MY_ATTRIBUTE((unused)))
 {
 #if defined(HAVE_GETHOSTBYADDR_R) && defined(HAVE_SOLARIS_STYLE_GETHOST)
   char name_buff[256];
@@ -970,8 +970,8 @@ avgcost_reset(UDF_INIT* initid, UDF_ARGS* args, char* is_null, char* message)
 /* This is needed to get things to work in MySQL 4.1.1 and above */
 
 void
-avgcost_clear(UDF_INIT* initid, char* is_null __attribute__((unused)),
-              char* message __attribute__((unused)))
+avgcost_clear(UDF_INIT* initid, char* is_null MY_ATTRIBUTE((unused)),
+              char* message MY_ATTRIBUTE((unused)))
 {
   struct avgcost_data* data = (struct avgcost_data*)initid->ptr;
   data->totalprice=    0.0;
@@ -982,8 +982,8 @@ avgcost_clear(UDF_INIT* initid, char* is_null __attribute__((unused)),
 
 void
 avgcost_add(UDF_INIT* initid, UDF_ARGS* args,
-            char* is_null __attribute__((unused)),
-            char* message __attribute__((unused)))
+            char* is_null MY_ATTRIBUTE((unused)),
+            char* message MY_ATTRIBUTE((unused)))
 {
   if (args->args[0] && args->args[1])
   {
@@ -1029,8 +1029,8 @@ avgcost_add(UDF_INIT* initid, UDF_ARGS* args,
 
 
 double
-avgcost( UDF_INIT* initid, UDF_ARGS* args __attribute__((unused)),
-         char* is_null, char* error __attribute__((unused)))
+avgcost( UDF_INIT* initid, UDF_ARGS* args MY_ATTRIBUTE((unused)),
+         char* is_null, char* error MY_ATTRIBUTE((unused)))
 {
   struct avgcost_data* data = (struct avgcost_data*)initid->ptr;
   if (!data->count || !data->totalquantity)
@@ -1063,10 +1063,10 @@ my_bool myfunc_argument_name_init(UDF_INIT *initid, UDF_ARGS *args,
   return 0;
 }
 
-char *myfunc_argument_name(UDF_INIT *initid __attribute__((unused)),
+char *myfunc_argument_name(UDF_INIT *initid MY_ATTRIBUTE((unused)),
                            UDF_ARGS *args, char *result,
                            unsigned long *length, char *null_value,
-                           char *error __attribute__((unused)))
+                           char *error MY_ATTRIBUTE((unused)))
 {
   if (!args->attributes[0])
   {
@@ -1094,9 +1094,9 @@ my_bool is_const_init(UDF_INIT *initid, UDF_ARGS *args, char *message)
   return 0;
 }
 
-char * is_const(UDF_INIT *initid, UDF_ARGS *args __attribute__((unused)),
+char * is_const(UDF_INIT *initid, UDF_ARGS *args MY_ATTRIBUTE((unused)),
                 char *result, unsigned long *length,
-                char *is_null, char *error __attribute__((unused)))
+                char *is_null, char *error MY_ATTRIBUTE((unused)))
 {
   if (initid->ptr != 0) {
     sprintf(result, "const");
@@ -1135,9 +1135,9 @@ my_bool check_const_len_init(UDF_INIT *initid, UDF_ARGS *args, char *message)
 }
 
 extern "C"
-char * check_const_len(UDF_INIT *initid, UDF_ARGS *args __attribute__((unused)),
+char * check_const_len(UDF_INIT *initid, UDF_ARGS *args MY_ATTRIBUTE((unused)),
                 char *result, unsigned long *length,
-                char *is_null, char *error __attribute__((unused)))
+                char *is_null, char *error MY_ATTRIBUTE((unused)))
 {
   strmov(result, initid->ptr);
   *length= (uint) strlen(result);
@@ -1183,8 +1183,8 @@ void my_median_deinit(UDF_INIT* initid)
 }
 
 void my_median_add(UDF_INIT* initid, UDF_ARGS* args,
-                   char* is_null __attribute__((unused)),
-                   char* message __attribute__((unused)))
+                   char* is_null MY_ATTRIBUTE((unused)),
+                   char* message MY_ATTRIBUTE((unused)))
 {
   My_median_data *data=
     static_cast<My_median_data*>(static_cast<void*>(initid->ptr));
@@ -1197,8 +1197,8 @@ void my_median_add(UDF_INIT* initid, UDF_ARGS* args,
 }
 
 void my_median_clear(UDF_INIT* initid, UDF_ARGS* args,
-                     char* is_null __attribute__((unused)),
-                     char* message __attribute__((unused)))
+                     char* is_null MY_ATTRIBUTE((unused)),
+                     char* message MY_ATTRIBUTE((unused)))
 {
   My_median_data *data=
     static_cast<My_median_data*>(static_cast<void*>(initid->ptr));
@@ -1207,7 +1207,7 @@ void my_median_clear(UDF_INIT* initid, UDF_ARGS* args,
 
 longlong my_median(UDF_INIT* initid, UDF_ARGS* args,
                    char* is_null,
-                   char* message __attribute__((unused)))
+                   char* message MY_ATTRIBUTE((unused)))
 {
   My_median_data *data=
     static_cast<My_median_data*>(static_cast<void*>(initid->ptr));
index ad2265c57d6f5f8bef61fc2b98e094bab92287a8..3932478163c355c767dcf7d1b95fdaf4817f1a52 100644 (file)
@@ -40,15 +40,8 @@ static Log_event* wsrep_read_log_event(
   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, 0);
 
-err:
   if (!res)
   {
     DBUG_ASSERT(error != 0);
index a7b680f616b1d7563d8d5f35d63ae777ed51c8f1..c29d51caf2cbab41fcf7ccf537a4f55a9550a5b3 100644 (file)
@@ -19,7 +19,7 @@
 #include "sql_class.h" // THD, IO_CACHE
 
 #define HEAP_PAGE_SIZE 65536 /* 64K */
-#define WSREP_MAX_WS_SIZE (0xFFFFFFFFUL - HEAP_PAGE_SIZE)
+#define WSREP_MAX_WS_SIZE 2147483647 /* 2GB */
 
 /*
   Write the contents of a cache to a memory buffer.
index 33667480f6a26cc94e742154abd94ae15e6a5886..b2be924593099e94d27f58272e87c3f179036e3c 100644 (file)
@@ -38,11 +38,14 @@ enum wsrep_trx_status wsrep_run_wsrep_commit(THD *thd, handlerton *hton,
 */
 void wsrep_cleanup_transaction(THD *thd)
 {
+  if (!WSREP(thd)) return;
+
   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;
+  thd->wsrep_affected_rows= 0;
   return;
 }
 
@@ -111,6 +114,8 @@ void wsrep_register_hton(THD* thd, bool all)
  */
 void wsrep_post_commit(THD* thd, bool all)
 {
+  if (!WSREP(thd)) return;
+
   switch (thd->wsrep_exec_mode)
   {
   case LOCAL_COMMIT:
@@ -310,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());
   }
 
@@ -440,7 +445,8 @@ wsrep_run_wsrep_commit(THD *thd, handlerton *hton, bool all)
                   "wsrep status (%d %d %d)",
                   WSREP_QUERY(thd),
                   thd->get_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);
     }
@@ -509,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)
     {
@@ -574,6 +583,38 @@ wsrep_run_wsrep_commit(THD *thd, handlerton *hton, bool all)
   DBUG_RETURN(WSREP_TRX_OK);
 }
 
+bool 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);
+    (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)
+    {
+      /*
+        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_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);
+  }
+  thd->wsrep_replicate_GTID= false;
+
+  return false;
+}
 
 static int wsrep_hton_init(void *p)
 {
index edceaa80463a0e6c9c2bd38a18c22be8303c1527..ded6d871a8ca1568521dad44edac63c836657595 100644 (file)
@@ -73,7 +73,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;
+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] =
 {
@@ -186,8 +186,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));
@@ -455,8 +454,7 @@ int wsrep_init()
       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;
+      return wsrep_init();
     }
     else /* this is for recursive call above */
     {
@@ -643,6 +641,9 @@ void wsrep_init_startup (bool first)
   wsrep_thr_lock_init(wsrep_thd_is_BF, wsrep_abort_thd,
                       wsrep_debug, wsrep_convert_LOCK_to_trx, wsrep_on);
 
+  /* Skip replication start if dummy wsrep provider is loaded */
+  if (!strcmp(wsrep_provider, WSREP_NONE)) return;
+
   /* Skip replication start if no cluster address */
   if (!wsrep_cluster_address || strlen(wsrep_cluster_address) == 0) return;
 
@@ -1225,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() */
@@ -1233,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;
@@ -1241,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;
index 8a25588b5689d0542fb5ecf5a259ca17713dbf85..098ae79a86882f646a5183370c19fa5c90a050c6 100644 (file)
@@ -201,14 +201,24 @@ extern void wsrep_prepend_PATH (const char* path);
 /* Other global variables */
 extern wsrep_seqno_t wsrep_locked_seqno;
 
-#define WSREP_ON \
-  (global_system_variables.wsrep_on)
+#define WSREP_ON                         \
+  ((global_system_variables.wsrep_on) && \
+   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)
@@ -330,4 +340,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();
+bool wsrep_replicate_GTID(THD* thd);
+
 #endif /* WSREP_MYSQLD_H */
index 54d165c377e7d144d9125d4a9e841abd427057ff..8042339ae150f692c40d6bd66388a5931fda87ac 100644 (file)
@@ -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)
index 9a64386a24ad67d311c6fa28efa83ab3f10070d8..8de761031f69fd5c8fc989b0747ec712d5144f79 100644 (file)
@@ -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)
@@ -172,6 +121,9 @@ 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;
+  shadow->row_count_func= thd->get_row_count_func();
 }
 
 static void wsrep_return_from_bf_mode(THD *thd, struct wsrep_thd_shadow* shadow)
@@ -182,6 +134,8 @@ 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;
+  thd->set_row_count_func(shadow->row_count_func);
 }
 
 void wsrep_replay_transaction(THD *thd)
@@ -204,6 +158,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;
@@ -270,7 +243,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:
@@ -461,6 +444,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);
@@ -519,9 +507,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;
@@ -535,10 +523,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;
index 7993fc977dca3dbb917ae27ab72bdb1f490ea9d7..cb7c4fdac0eee1459a548531ad48ca623782d36e 100644 (file)
@@ -186,6 +186,32 @@ void wsrep_start_position_init (const char* val)
   wsrep_set_local_position (val, false);
 }
 
+static int get_provider_option_value(const char* opts,
+                                     const char* opt_name,
+                                     ulong* opt_value)
+{
+  int ret= 1;
+  ulong opt_value_tmp;
+  char *opt_value_str, *s, *opts_copy= my_strdup(opts, MYF(MY_WME));
+
+  if ((opt_value_str= strstr(opts_copy, opt_name)) == NULL)
+    goto end;
+  opt_value_str= strtok_r(opt_value_str, "=", &s);
+  if (opt_value_str == NULL) goto end;
+  opt_value_str= strtok_r(NULL, ";", &s);
+  if (opt_value_str == NULL) goto end;
+
+  opt_value_tmp= strtoul(opt_value_str, NULL, 10);
+  if (errno == ERANGE) goto end;
+
+  *opt_value= opt_value_tmp;
+  ret= 0;
+
+end:
+  my_free(opts_copy);
+  return ret;
+}
+
 static bool refresh_provider_options()
 {
   WSREP_DEBUG("refresh_provider_options: %s", 
@@ -193,9 +219,11 @@ 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);
+    get_provider_option_value(wsrep_provider_options,
+                              (char*)"repl.max_ws_size",
+                              &wsrep_max_ws_size);
+    free(opts);
   }
   else
   {
@@ -561,6 +589,21 @@ bool wsrep_desync_update (sys_var *self, THD* thd, enum_var_type type)
   return false;
 }
 
+bool wsrep_max_ws_size_update (sys_var *self, THD *thd, enum_var_type)
+{
+  char max_ws_size_opt[128];
+  my_snprintf(max_ws_size_opt, sizeof(max_ws_size_opt),
+              "repl.max_ws_size=%d", wsrep_max_ws_size);
+  wsrep_status_t ret= wsrep->options_set(wsrep, max_ws_size_opt);
+  if (ret != WSREP_OK)
+  {
+    WSREP_ERROR("Set options returned %d", ret);
+    refresh_provider_options();
+    return true;
+  }
+  return refresh_provider_options();
+}
+
 /*
  * Status variables stuff below
  */
index da18854e3a5a5a98f9b5756bdcb28389b13d74ca..5030a6779b5338e53b95f9a224c11ed1bd2fb8f7 100644 (file)
@@ -81,6 +81,8 @@ extern bool wsrep_slave_threads_update       UPDATE_ARGS;
 extern bool wsrep_desync_check               CHECK_ARGS;
 extern bool wsrep_desync_update              UPDATE_ARGS;
 
+extern bool wsrep_max_ws_size_update         UPDATE_ARGS;
+
 extern bool wsrep_reject_queries_update    UPDATE_ARGS;
 
 #endif /* WSREP_VAR_H */
index 2475418fef9555fe5b7fb730e2bc97d9855ef05f..838479e66546a23edf09d0e8f8d45416fef1b6d3 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2007, 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
@@ -22,6 +22,7 @@
 #include <m_string.h>
 #include <my_getopt.h>
 #include <mysql_version.h>
+#include <welcome_copyright_notice.h> // ORACLE_WELCOME_COPYRIGHT_NOTICE
 
 #define BUFFER_LEN 1024
 #define ARCHIVE_ROW_HEADER_SIZE 4
@@ -292,7 +293,7 @@ end:
 
 static my_bool
 get_one_option(int optid,
-              const struct my_option *opt __attribute__((unused)),
+              const struct my_option *opt MY_ATTRIBUTE((unused)),
               char *argument)
 {
   switch (optid) {
@@ -388,8 +389,8 @@ static struct my_option my_long_options[] =
 static void usage(void)
 {
   print_version();
-  puts("Copyright 2007-2008 MySQL AB, 2008 Sun Microsystems, Inc.");
-  puts("This software comes with ABSOLUTELY NO WARRANTY. This is free software,\nand you are welcome to modify and redistribute it under the GPL license\n");
+  puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2007"));
+
   puts("Read and modify Archive files directly\n");
   printf("Usage: %s [OPTIONS] file_to_be_looked_at [file_for_backup]\n", my_progname);
   print_defaults("my", load_default_groups);
index 1ec66df0cfa2ec0e8bee35b36cc3de71529540ad..4a70b4d69ebd48125a191e2558903a0fb5275d1d 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2005, 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
@@ -383,7 +383,7 @@ static void blackhole_free_key(st_blackhole_share *share)
 }
 
 static uchar* blackhole_get_key(st_blackhole_share *share, size_t *length,
-                                my_bool not_used __attribute__((unused)))
+                                my_bool not_used MY_ATTRIBUTE((unused)))
 {
   *length= share->table_name_length;
   return (uchar*) share->table_name;
index 09de75a0008f03a87ff967c5eda00457f39b5f17..25c2199c7f29906170767fd673f7545f12998a47 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2004, 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
@@ -102,7 +102,7 @@ int sort_set (tina_set *a, tina_set *b)
 }
 
 static uchar* tina_get_key(TINA_SHARE *share, size_t *length,
-                          my_bool not_used __attribute__((unused)))
+                          my_bool not_used MY_ATTRIBUTE((unused)))
 {
   *length=share->table_name_length;
   return (uchar*) share->table_name;
index 462dc8a7e8c85ce78b067978d274dc395c4b0146..6d508650aa0ae6a2666ea7f6987d7d02b7080366 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2004, 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
@@ -436,9 +436,9 @@ int ha_example::delete_row(const uchar *buf)
 */
 
 int ha_example::index_read_map(uchar *buf, const uchar *key,
-                               key_part_map keypart_map __attribute__((unused)),
+                               key_part_map keypart_map MY_ATTRIBUTE((unused)),
                                enum ha_rkey_function find_flag
-                               __attribute__((unused)))
+                               MY_ATTRIBUTE((unused)))
 {
   int rc;
   DBUG_ENTER("ha_example::index_read");
index 9af193652edf4d9a5f530fb2167d8ca52b7105fa..5c17c8736d4b1130e6168dbba9f45c0e6796edae 100644 (file)
@@ -425,7 +425,7 @@ static handler *federated_create_handler(handlerton *hton,
 /* Function we use in the creation of our hash to get key */
 
 static uchar *federated_get_key(FEDERATED_SHARE *share, size_t *length,
-                                my_bool not_used __attribute__ ((unused)))
+                                my_bool not_used MY_ATTRIBUTE ((unused)))
 {
   *length= share->share_key_length;
   return (uchar*) share->share_key;
@@ -2743,7 +2743,7 @@ int ha_federated::read_next(uchar *buf, MYSQL_RES *result)
   @param[in]  record  record data (unused)
 */
 
-void ha_federated::position(const uchar *record __attribute__ ((unused)))
+void ha_federated::position(const uchar *record MY_ATTRIBUTE ((unused)))
 {
   DBUG_ENTER("ha_federated::position");
   
index a2958dbb60a56a86d0d492c1d419d5a266ce53c3..cba07f1e5cd174eee4818bca9abfe6b8f885a12f 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 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
@@ -867,7 +867,7 @@ uint hp_rb_pack_key(HP_KEYDEF *keydef, uchar *key, const uchar *old,
 
 
 uint hp_rb_key_length(HP_KEYDEF *keydef, 
-                     const uchar *key __attribute__((unused)))
+                     const uchar *key MY_ATTRIBUTE((unused)))
 {
   return keydef->length;
 }
index 2abd03fa7848a57060d1bc0f82635fc60467b667..007c1b6c3f13ff7cb4474fd8ec0d3a215ba77354 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
    reserved
 
    This program is free software; you can redistribute it and/or modify
@@ -660,7 +660,7 @@ static int rnd(int max_value)
 } /* rnd */
 
 
-static sig_handler endprog(int sig_number __attribute__((unused)))
+static sig_handler endprog(int sig_number MY_ATTRIBUTE((unused)))
 {
   {
     hp_panic(HA_PANIC_CLOSE);
index 99bb42466d01677c82c64c3a2696c4244aa31239..2c5e9a175e27cffab7c564aca06304b08299cfb8 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1994, 2015, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved.
 Copyright (c) 2012, Facebook Inc.
 
 This program is free software; you can redistribute it and/or modify it under
@@ -1102,7 +1102,7 @@ that the caller has made the reservation for free extents!
 @retval block, rw_lock_x_lock_count(&block->lock) == 1 if allocation succeeded
 (init_mtr == mtr, or the page was not previously freed in mtr)
 @retval block (not allocated or initialized) otherwise */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 buf_block_t*
 btr_page_alloc_low(
 /*===============*/
@@ -1971,7 +1971,7 @@ IBUF_BITMAP_FREE is unaffected by reorganization.
 
 @retval true if the operation was successful
 @retval false if it is a compressed page, and recompression failed */
-static __attribute__((nonnull))
+static MY_ATTRIBUTE((nonnull))
 bool
 btr_page_reorganize_block(
 /*======================*/
@@ -2033,7 +2033,8 @@ btr_parse_page_reorganize(
 {
        ulint   level;
 
-       ut_ad(ptr && end_ptr);
+       ut_ad(ptr != NULL);
+       ut_ad(end_ptr != NULL);
 
        /* If dealing with a compressed page the record has the
        compression level used during original compression written in
@@ -2500,7 +2501,7 @@ func_exit:
 Returns TRUE if the insert fits on the appropriate half-page with the
 chosen split_rec.
 @return        true if fits */
-static __attribute__((nonnull(1,3,4,6), warn_unused_result))
+static MY_ATTRIBUTE((nonnull(1,3,4,6), warn_unused_result))
 bool
 btr_page_insert_fits(
 /*=================*/
@@ -2643,7 +2644,7 @@ btr_insert_on_non_leaf_level_func(
 /**************************************************************//**
 Attaches the halves of an index page on the appropriate level in an
 index tree. */
-static __attribute__((nonnull))
+static MY_ATTRIBUTE((nonnull))
 void
 btr_attach_half_pages(
 /*==================*/
@@ -2779,7 +2780,7 @@ btr_attach_half_pages(
 /*************************************************************//**
 Determine if a tuple is smaller than any record on the page.
 @return TRUE if smaller */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 bool
 btr_page_tuple_smaller(
 /*===================*/
@@ -3355,7 +3356,7 @@ Removes a page from the level list of pages.
 
 /*************************************************************//**
 Removes a page from the level list of pages. */
-static __attribute__((nonnull))
+static MY_ATTRIBUTE((nonnull))
 void
 btr_level_list_remove_func(
 /*=======================*/
@@ -3371,7 +3372,8 @@ btr_level_list_remove_func(
        ulint   prev_page_no;
        ulint   next_page_no;
 
-       ut_ad(page && mtr);
+       ut_ad(page != NULL);
+       ut_ad(mtr != NULL);
        ut_ad(mtr_memo_contains_page(mtr, page, MTR_MEMO_PAGE_X_FIX));
        ut_ad(space == page_get_space_id(page));
        /* Get the previous and next page numbers of page */
index eeed866d69161838dcab7c09b3b5c1cf11c95ec7..abb6040f53059536a2841ca4ae3f2aa5e91f708c 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1994, 2015, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved.
 Copyright (c) 2008, Google Inc.
 Copyright (c) 2012, Facebook Inc.
 
@@ -1084,7 +1084,7 @@ This has to be done either within the same mini-transaction,
 or by invoking ibuf_reset_free_bits() before mtr_commit().
 
 @return        pointer to inserted record if succeed, else NULL */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 rec_t*
 btr_cur_insert_if_possible(
 /*=======================*/
@@ -1127,7 +1127,7 @@ btr_cur_insert_if_possible(
 /*************************************************************//**
 For an insert, checks the locks and does the undo logging if desired.
 @return        DB_SUCCESS, DB_WAIT_LOCK, DB_FAIL, or error number */
-UNIV_INLINE __attribute__((warn_unused_result, nonnull(2,3,5,6)))
+UNIV_INLINE MY_ATTRIBUTE((warn_unused_result, nonnull(2,3,5,6)))
 dberr_t
 btr_cur_ins_lock_and_undo(
 /*======================*/
@@ -1653,7 +1653,7 @@ btr_cur_pessimistic_insert(
 /*************************************************************//**
 For an update, checks the locks and does the undo logging.
 @return        DB_SUCCESS, DB_WAIT_LOCK, or error number */
-UNIV_INLINE __attribute__((warn_unused_result, nonnull(2,3,6,7)))
+UNIV_INLINE MY_ATTRIBUTE((warn_unused_result, nonnull(2,3,6,7)))
 dberr_t
 btr_cur_upd_lock_and_undo(
 /*======================*/
@@ -1672,7 +1672,7 @@ btr_cur_upd_lock_and_undo(
        const rec_t*    rec;
        dberr_t         err;
 
-       ut_ad(thr || (flags & BTR_NO_LOCKING_FLAG));
+       ut_ad((thr != NULL) || (flags & BTR_NO_LOCKING_FLAG));
 
        rec = btr_cur_get_rec(cursor);
        index = cursor->index;
@@ -2961,7 +2961,7 @@ btr_cur_del_mark_set_clust_rec(
        ut_ad(page_is_leaf(page_align(rec)));
 
 #ifdef UNIV_DEBUG
-       if (btr_cur_print_record_ops && thr) {
+       if (btr_cur_print_record_ops && (thr != NULL)) {
                btr_cur_trx_report(thr_get_trx(thr)->id, index, "del mark ");
                rec_print_new(stderr, rec, offsets);
        }
@@ -3111,7 +3111,7 @@ btr_cur_del_mark_set_sec_rec(
        rec = btr_cur_get_rec(cursor);
 
 #ifdef UNIV_DEBUG
-       if (btr_cur_print_record_ops && thr) {
+       if (btr_cur_print_record_ops && (thr != NULL)) {
                btr_cur_trx_report(thr_get_trx(thr)->id, cursor->index,
                                   "del mark ");
                rec_print(stderr, rec, cursor->index);
@@ -4994,7 +4994,7 @@ btr_free_externally_stored_field(
        ulint           i,              /*!< in: field number of field_ref;
                                        ignored if rec == NULL */
        enum trx_rb_ctx rb_ctx,         /*!< in: rollback context */
-       mtr_t*          local_mtr __attribute__((unused))) /*!< in: mtr
+       mtr_t*          local_mtr MY_ATTRIBUTE((unused))) /*!< in: mtr
                                        containing the latch to data an an
                                        X-latch to the index tree */
 {
index df70f8a11303910a9f6763489d7e92497baaabb4..dd28f50f4f675a2c7763959a25104843e1a838d0 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1996, 2012, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
 Copyright (c) 2008, Google Inc.
 
 Portions of this file contain modifications contributed and copyrighted by
@@ -473,7 +473,7 @@ btr_search_update_block_hash_info(
 /*==============================*/
        btr_search_t*   info,   /*!< in: search info */
        buf_block_t*    block,  /*!< in: buffer block */
-       btr_cur_t*      cursor __attribute__((unused)))
+       btr_cur_t*      cursor MY_ATTRIBUTE((unused)))
                                /*!< in: cursor */
 {
 #ifdef UNIV_SYNC_DEBUG
index 958b3b5cfada3eebb63ab41ba853d6aa5eb0513e..f2ab73217e01a4ebb98ee9d47e4a96d928cb192a 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 2006, 2013, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2006, 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
@@ -112,7 +112,7 @@ buf_buddy_mem_invalid(
 /**********************************************************************//**
 Check if a buddy is stamped free.
 @return        whether the buddy is free */
-UNIV_INLINE __attribute__((warn_unused_result))
+UNIV_INLINE MY_ATTRIBUTE((warn_unused_result))
 bool
 buf_buddy_stamp_is_free(
 /*====================*/
@@ -225,7 +225,7 @@ Checks if a buf is free i.e.: in the zip_free[].
 @retval BUF_BUDDY_STATE_FREE if fully free
 @retval BUF_BUDDY_STATE_USED if currently in use
 @retval BUF_BUDDY_STATE_PARTIALLY_USED if partially in use. */
-static  __attribute__((warn_unused_result))
+static  MY_ATTRIBUTE((warn_unused_result))
 buf_buddy_state_t
 buf_buddy_is_free(
 /*==============*/
index 85e44294e6081d71d70af374e1f922b8e08f6c08..6f206918212c92aa07808798c41c28b36e5fe7de 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1995, 2015, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved.
 Copyright (c) 2008, Google Inc.
 
 Portions of this file contain modifications contributed and copyrighted by
@@ -3470,7 +3470,7 @@ buf_page_init_low(
 
 /********************************************************************//**
 Inits a page to the buffer buf_pool. */
-static __attribute__((nonnull))
+static MY_ATTRIBUTE((nonnull))
 void
 buf_page_init(
 /*==========*/
index cb67381f0c882fbd3edb2d6ee72be543e46debb1..ed27a70307d70cbfad893e4fcf1c8bd2f755d472 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 2011, 2015, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2011, 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
@@ -105,7 +105,7 @@ SELECT variable_value FROM information_schema.global_status WHERE
 variable_name = 'INNODB_BUFFER_POOL_DUMP_STATUS';
 or by:
 SHOW STATUS LIKE 'innodb_buffer_pool_dump_status'; */
-static __attribute__((nonnull, format(printf, 2, 3)))
+static MY_ATTRIBUTE((nonnull, format(printf, 2, 3)))
 void
 buf_dump_status(
 /*============*/
@@ -141,7 +141,7 @@ SELECT variable_value FROM information_schema.global_status WHERE
 variable_name = 'INNODB_BUFFER_POOL_LOAD_STATUS';
 or by:
 SHOW STATUS LIKE 'innodb_buffer_pool_load_status'; */
-static __attribute__((nonnull, format(printf, 2, 3)))
+static MY_ATTRIBUTE((nonnull, format(printf, 2, 3)))
 void
 buf_load_status(
 /*============*/
@@ -594,7 +594,7 @@ extern "C" UNIV_INTERN
 os_thread_ret_t
 DECLARE_THREAD(buf_dump_thread)(
 /*============================*/
-       void*   arg __attribute__((unused)))    /*!< in: a dummy parameter
+       void*   arg MY_ATTRIBUTE((unused)))     /*!< in: a dummy parameter
                                                required by os_thread_create */
 {
        ut_ad(!srv_read_only_mode);
index 540d6383813d2440b735aba15982fcc962b1eef4..1cdd1610c4f9cf133627c5a260634f26d8289181 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1995, 2015, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1995, 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
@@ -2384,7 +2384,7 @@ extern "C" UNIV_INTERN
 os_thread_ret_t
 DECLARE_THREAD(buf_flush_page_cleaner_thread)(
 /*==========================================*/
-       void*   arg __attribute__((unused)))
+       void*   arg MY_ATTRIBUTE((unused)))
                        /*!< in: a dummy parameter required by
                        os_thread_create */
 {
index a1618020bca2cd95278690f9cb70e8560c7a924b..13a91b7e4c4de7f72d416f5d834db9fb01153e09 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1995, 2013, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1995, 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
@@ -142,7 +142,7 @@ If a compressed page is freed other compressed pages may be relocated.
 caller needs to free the page to the free list
 @retval false if BUF_BLOCK_ZIP_PAGE was removed from page_hash. In
 this case the block is already returned to the buddy allocator. */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 bool
 buf_LRU_block_remove_hashed(
 /*========================*/
@@ -366,7 +366,7 @@ want to hog the CPU and resources. Release the buffer pool and block
 mutex and try to force a context switch. Then reacquire the same mutexes.
 The current page is "fixed" before the release of the mutexes and then
 "unfixed" again once we have reacquired the mutexes. */
-static __attribute__((nonnull))
+static MY_ATTRIBUTE((nonnull))
 void
 buf_flush_yield(
 /*============*/
@@ -407,7 +407,7 @@ If we have hogged the resources for too long then release the buffer
 pool and flush list mutex and do a thread yield. Set the current page
 to "sticky" so that it is not relocated during the yield.
 @return true if yielded */
-static __attribute__((nonnull(1), warn_unused_result))
+static MY_ATTRIBUTE((nonnull(1), warn_unused_result))
 bool
 buf_flush_try_yield(
 /*================*/
@@ -450,7 +450,7 @@ buf_flush_try_yield(
 Removes a single page from a given tablespace inside a specific
 buffer pool instance.
 @return true if page was removed. */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 bool
 buf_flush_or_remove_page(
 /*=====================*/
@@ -531,7 +531,7 @@ the list as they age towards the tail of the LRU.
 @retval DB_SUCCESS if all freed
 @retval DB_FAIL if not all freed
 @retval DB_INTERRUPTED if the transaction was interrupted */
-static __attribute__((nonnull(1), warn_unused_result))
+static MY_ATTRIBUTE((nonnull(1), warn_unused_result))
 dberr_t
 buf_flush_or_remove_pages(
 /*======================*/
@@ -637,7 +637,7 @@ Remove or flush all the dirty pages that belong to a given tablespace
 inside a specific buffer pool instance. The pages will remain in the LRU
 list and will be evicted from the LRU list as they age and move towards
 the tail of the LRU list. */
-static __attribute__((nonnull(1)))
+static MY_ATTRIBUTE((nonnull(1)))
 void
 buf_flush_dirty_pages(
 /*==================*/
@@ -677,7 +677,7 @@ buf_flush_dirty_pages(
 /******************************************************************//**
 Remove all pages that belong to a given tablespace inside a specific
 buffer pool instance when we are DISCARDing the tablespace. */
-static __attribute__((nonnull))
+static MY_ATTRIBUTE((nonnull))
 void
 buf_LRU_remove_all_pages(
 /*=====================*/
@@ -825,7 +825,7 @@ buffer pool instance when we are deleting the data file(s) of that
 tablespace. The pages still remain a part of LRU and are evicted from
 the list as they age towards the tail of the LRU only if buf_remove
 is BUF_REMOVE_FLUSH_NO_WRITE. */
-static __attribute__((nonnull(1)))
+static MY_ATTRIBUTE((nonnull(1)))
 void
 buf_LRU_remove_pages(
 /*=================*/
index 179de79b69fe59af1ff9e19f7f8cf8f6c777e30c..593af089b005a6fafae4878fee80147a8fbd0f95 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1994, 2012, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1994, 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
@@ -67,7 +67,8 @@ dtuple_coll_cmp(
        ulint   n_fields;
        ulint   i;
 
-       ut_ad(tuple1 && tuple2);
+       ut_ad(tuple1 != NULL);
+       ut_ad(tuple2 != NULL);
        ut_ad(tuple1->magic_n == DATA_TUPLE_MAGIC_N);
        ut_ad(tuple2->magic_n == DATA_TUPLE_MAGIC_N);
        ut_ad(dtuple_check_typed(tuple1));
@@ -715,7 +716,7 @@ UNIV_INTERN
 void
 dtuple_convert_back_big_rec(
 /*========================*/
-       dict_index_t*   index __attribute__((unused)),  /*!< in: index */
+       dict_index_t*   index MY_ATTRIBUTE((unused)),   /*!< in: index */
        dtuple_t*       entry,  /*!< in: entry whose data was put to vector */
        big_rec_t*      vector) /*!< in, own: big rec vector; it is
                                freed in this function */
index 30523ff2af4c7233c6973f3f0e4cdfae73195167..b3edfefb9c49965e7f5e3e4ae6f7ff420735912d 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1996, 2014, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1996, 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
@@ -246,7 +246,7 @@ dict_create_sys_columns_tuple(
 /***************************************************************//**
 Builds a table definition to insert.
 @return        DB_SUCCESS or error code */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 dict_build_table_def_step(
 /*======================*/
@@ -573,7 +573,7 @@ dict_create_search_tuple(
 /***************************************************************//**
 Builds an index definition row to insert.
 @return        DB_SUCCESS or error code */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 dict_build_index_def_step(
 /*======================*/
@@ -648,7 +648,7 @@ dict_build_field_def_step(
 /***************************************************************//**
 Creates an index tree for the index if it is not a member of a cluster.
 @return        DB_SUCCESS or DB_OUT_OF_FILE_SPACE */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 dict_create_index_tree_step(
 /*========================*/
@@ -1464,7 +1464,7 @@ dict_create_or_check_foreign_constraint_tables(void)
 /****************************************************************//**
 Evaluate the given foreign key SQL statement.
 @return        error code or DB_SUCCESS */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 dict_foreign_eval_sql(
 /*==================*/
@@ -1530,7 +1530,7 @@ dict_foreign_eval_sql(
 Add a single foreign key field definition to the data dictionary tables in
 the database.
 @return        error code or DB_SUCCESS */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 dict_create_add_foreign_field_to_dictionary(
 /*========================================*/
index 35bf505805e346c8c07846add555430c94705f4d..b040bce064716f075661faeb30fddabe3704c86e 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1996, 2015, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
 Copyright (c) 2012, Facebook Inc.
 
 This program is free software; you can redistribute it and/or modify it under
@@ -5805,7 +5805,7 @@ dict_set_corrupted_index_cache_only(
        dict_index_t*   index,          /*!< in/out: index */
        dict_table_t*   table)          /*!< in/out: table */
 {
-       ut_ad(index);
+       ut_ad(index != NULL);
        ut_ad(mutex_own(&dict_sys->mutex));
        ut_ad(!dict_table_is_comp(dict_sys->sys_tables));
        ut_ad(!dict_table_is_comp(dict_sys->sys_indexes));
@@ -5815,8 +5815,9 @@ dict_set_corrupted_index_cache_only(
        if (dict_index_is_clust(index)) {
                dict_table_t*   corrupt_table;
 
-               corrupt_table = table ? table : index->table;
-               ut_ad(!index->table || !table || index->table  == table);
+               corrupt_table = (table != NULL) ? table : index->table;
+               ut_ad((index->table != NULL) || (table != NULL)
+                     || index->table  == table);
 
                if (corrupt_table) {
                        corrupt_table->corrupted = TRUE;
@@ -5896,11 +5897,6 @@ dict_table_get_index_on_name(
 {
        dict_index_t*   index;
 
-       /* If name is NULL, just return */
-       if (!name) {
-               return(NULL);
-       }
-
        index = dict_table_get_first_index(table);
 
        while (index != NULL) {
index 69211990bfacd2df5c32b3d30f801bd42d35e227..9dc63ff202656bd009ca0d352bb5d0a76be8ac66 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1996, 2013, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1996, 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
@@ -1744,7 +1744,7 @@ err_len:
                goto err_len;
        }
        type = mach_read_from_4(field);
-       if (type & (~0 << DICT_IT_BITS)) {
+       if (type & (~0U << DICT_IT_BITS)) {
                return("unknown SYS_INDEXES.TYPE bits");
        }
 
@@ -1783,7 +1783,7 @@ Loads definitions for table indexes. Adds them to the data dictionary
 cache.
 @return DB_SUCCESS if ok, DB_CORRUPTION if corruption of dictionary
 table or DB_UNSUPPORTED if table has unknown index type */
-static __attribute__((nonnull))
+static MY_ATTRIBUTE((nonnull))
 dberr_t
 dict_load_indexes(
 /*==============*/
@@ -2531,6 +2531,7 @@ func_exit:
                        /* the table->fts could be created in dict_load_column
                        when a user defined FTS_DOC_ID is present, but no
                        FTS */
+                       fts_optimize_remove_table(table);
                        fts_free(table);
                } else {
                        fts_optimize_add_table(table);
@@ -2596,14 +2597,13 @@ dict_load_table_on_id(
        btr_pcur_open_on_user_rec(sys_table_ids, tuple, PAGE_CUR_GE,
                                  BTR_SEARCH_LEAF, &pcur, &mtr);
 
-check_rec:
        rec = btr_pcur_get_rec(&pcur);
 
        if (page_rec_is_user_rec(rec)) {
                /*---------------------------------------------------*/
                /* Now we have the record in the secondary index
                containing the table ID and NAME */
-
+check_rec:
                field = rec_get_nth_field_old(
                        rec, DICT_FLD__SYS_TABLE_IDS__ID, &len);
                ut_ad(len == 8);
@@ -2613,12 +2613,14 @@ check_rec:
                        if (rec_get_deleted_flag(rec, 0)) {
                                /* Until purge has completed, there
                                may be delete-marked duplicate records
-                               for the same SYS_TABLES.ID.
-                               Due to Bug #60049, some delete-marked
-                               records may survive the purge forever. */
-                               if (btr_pcur_move_to_next(&pcur, &mtr)) {
-
-                                       goto check_rec;
+                               for the same SYS_TABLES.ID, but different
+                               SYS_TABLES.NAME. */
+                               while (btr_pcur_move_to_next(&pcur, &mtr)) {
+                                       rec = btr_pcur_get_rec(&pcur);
+
+                                       if (page_rec_is_user_rec(rec)) {
+                                               goto check_rec;
+                                       }
                                }
                        } else {
                                /* Now we get the table name from the record */
@@ -2787,7 +2789,7 @@ dict_load_foreign_cols(
 /***********************************************************************//**
 Loads a foreign key constraint to the dictionary cache.
 @return        DB_SUCCESS or error code */
-static __attribute__((nonnull(1), warn_unused_result))
+static MY_ATTRIBUTE((nonnull(1), warn_unused_result))
 dberr_t
 dict_load_foreign(
 /*==============*/
index 846ce302b08e37c44c64cc08885186ea8c9d8d75..b39e1e171ee8fc715a27c55366f64bd9dded620a 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1996, 2015, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
 Copyright (c) 2012, Facebook Inc.
 
 This program is free software; you can redistribute it and/or modify it under
@@ -264,7 +264,7 @@ dict_mem_table_add_col(
 
 /**********************************************************************//**
 Renames a column of a table in the data dictionary cache. */
-static __attribute__((nonnull))
+static MY_ATTRIBUTE((nonnull))
 void
 dict_mem_table_col_rename_low(
 /*==========================*/
index 9aa63caa579a81aa43659009e93f224ed87b2b97..b0ba98308be71e406be10fdf915067c4de1d5f24 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 2009, 2015, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2009, 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
@@ -1095,7 +1095,8 @@ dict_stats_analyze_index_level(
                them away) which brings non-determinism. We skip only
                leaf-level delete marks because delete marks on
                non-leaf level do not make sense. */
-               if (level == 0 &&
+
+               if (level == 0 && srv_stats_include_delete_marked? 0:
                    rec_get_deleted_flag(
                            rec,
                            page_is_comp(btr_pcur_get_page(&pcur)))) {
@@ -1281,8 +1282,12 @@ enum page_scan_method_t {
                                the given page and count the number of
                                distinct ones, also ignore delete marked
                                records */
-       QUIT_ON_FIRST_NON_BORING/* quit when the first record that differs
+       QUIT_ON_FIRST_NON_BORING,/* quit when the first record that differs
                                from its right neighbor is found */
+       COUNT_ALL_NON_BORING_INCLUDE_DEL_MARKED/* scan all records on
+                               the given page and count the number of
+                               distinct ones, include delete marked
+                               records */
 };
 /* @} */
 
@@ -1558,6 +1563,8 @@ dict_stats_analyze_index_below_cur(
 
        offsets_rec = dict_stats_scan_page(
                &rec, offsets1, offsets2, index, page, n_prefix,
+               srv_stats_include_delete_marked ?
+               COUNT_ALL_NON_BORING_INCLUDE_DEL_MARKED:
                COUNT_ALL_NON_BORING_AND_SKIP_DEL_MARKED, n_diff,
                n_external_pages);
 
index 9e1f75a13a9698e9f8183d58619a1cca0bab62de..6f01c37977651cd43f31ae6657d12d25f49c0c6d 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 2012, 2013, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2012, 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
@@ -331,7 +331,7 @@ extern "C" UNIV_INTERN
 os_thread_ret_t
 DECLARE_THREAD(dict_stats_thread)(
 /*==============================*/
-       void*   arg __attribute__((unused)))    /*!< in: a dummy parameter
+       void*   arg MY_ATTRIBUTE((unused)))     /*!< in: a dummy parameter
                                                required by os_thread_create */
 {
        ut_a(!srv_read_only_mode);
index 77c1353843cee3e3001fc83f30bafd433ddf9b3d..5e1a9d6c05e830b64da81ffcc50c03938ee86b73 100644 (file)
@@ -1875,7 +1875,7 @@ fil_set_max_space_id_if_bigger(
 Writes the flushed lsn and the latest archived log number to the page header
 of the first page of a data file of the system tablespace (space 0),
 which is uncompressed. */
-static __attribute__((warn_unused_result))
+static MY_ATTRIBUTE((warn_unused_result))
 dberr_t
 fil_write_lsn_and_arch_no_to_file(
 /*==============================*/
@@ -1883,7 +1883,7 @@ fil_write_lsn_and_arch_no_to_file(
        ulint   sum_of_sizes,   /*!< in: combined size of previous files
                                in space, in database pages */
        lsn_t   lsn,            /*!< in: lsn to write */
-       ulint   arch_log_no __attribute__((unused)))
+       ulint   arch_log_no MY_ATTRIBUTE((unused)))
                                /*!< in: archived log number to write */
 {
        byte*   buf1;
@@ -1970,7 +1970,7 @@ Checks the consistency of the first data page of a tablespace
 at database startup.
 @retval NULL on success, or if innodb_force_recovery is set
 @return pointer to an error message string */
-static __attribute__((warn_unused_result))
+static MY_ATTRIBUTE((warn_unused_result))
 const char*
 fil_check_first_page(
 /*=================*/
index 0f8d6bcc4f065fed12e3a0a04fea26d38bc79999..f09cbb03d004a50a81d5d237eae1c9316682267b 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1995, 2015, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1995, 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
@@ -93,7 +93,7 @@ fseg_n_reserved_pages_low(
 /********************************************************************//**
 Marks a page used. The page must reside within the extents of the given
 segment. */
-static __attribute__((nonnull))
+static MY_ATTRIBUTE((nonnull))
 void
 fseg_mark_page_used(
 /*================*/
@@ -132,7 +132,7 @@ fsp_fill_free_list(
        ulint           space,          /*!< in: space */
        fsp_header_t*   header,         /*!< in/out: space header */
        mtr_t*          mtr)            /*!< in/out: mini-transaction */
-       UNIV_COLD __attribute__((nonnull));
+       UNIV_COLD MY_ATTRIBUTE((nonnull));
 /**********************************************************************//**
 Allocates a single free page from a segment. This function implements
 the intelligent allocation strategy which tries to minimize file space
@@ -161,7 +161,7 @@ fseg_alloc_free_page_low(
                                in which the page should be initialized.
                                If init_mtr!=mtr, but the page is already
                                latched in mtr, do not initialize the page. */
-       __attribute__((warn_unused_result, nonnull));
+       MY_ATTRIBUTE((warn_unused_result, nonnull));
 #endif /* !UNIV_HOTBACKUP */
 
 /**********************************************************************//**
@@ -425,7 +425,7 @@ descriptor resides is x-locked. This function no longer extends the data
 file.
 @return pointer to the extent descriptor, NULL if the page does not
 exist in the space or if the offset is >= the free limit */
-UNIV_INLINE __attribute__((nonnull, warn_unused_result))
+UNIV_INLINE MY_ATTRIBUTE((nonnull, warn_unused_result))
 xdes_t*
 xdes_get_descriptor_with_space_hdr(
 /*===============================*/
@@ -487,7 +487,7 @@ is necessary to make the descriptor defined, as they are uninitialized
 above the free limit.
 @return pointer to the extent descriptor, NULL if the page does not
 exist in the space or if the offset exceeds the free limit */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 xdes_t*
 xdes_get_descriptor(
 /*================*/
@@ -614,7 +614,7 @@ byte*
 fsp_parse_init_file_page(
 /*=====================*/
        byte*           ptr,    /*!< in: buffer */
-       byte*           end_ptr __attribute__((unused)), /*!< in: buffer end */
+       byte*           end_ptr MY_ATTRIBUTE((unused)), /*!< in: buffer end */
        buf_block_t*    block)  /*!< in: block or NULL */
 {
        ut_ad(ptr && end_ptr);
@@ -850,7 +850,7 @@ fsp_header_get_tablespace_size(void)
 Tries to extend a single-table tablespace so that a page would fit in the
 data file.
 @return        TRUE if success */
-static UNIV_COLD __attribute__((nonnull, warn_unused_result))
+static UNIV_COLD MY_ATTRIBUTE((nonnull, warn_unused_result))
 ibool
 fsp_try_extend_data_file_with_pages(
 /*================================*/
@@ -882,7 +882,7 @@ fsp_try_extend_data_file_with_pages(
 /***********************************************************************//**
 Tries to extend the last data file of a tablespace if it is auto-extending.
 @return        FALSE if not auto-extending */
-static UNIV_COLD __attribute__((nonnull))
+static UNIV_COLD MY_ATTRIBUTE((nonnull))
 ibool
 fsp_try_extend_data_file(
 /*=====================*/
@@ -1064,7 +1064,8 @@ fsp_fill_free_list(
        ulint   i;
        mtr_t   ibuf_mtr;
 
-       ut_ad(header && mtr);
+       ut_ad(header != NULL);
+       ut_ad(mtr != NULL);
        ut_ad(page_offset(header) == FSP_HEADER_OFFSET);
 
        /* Check if we can fill free list from above the free list limit */
@@ -1236,7 +1237,7 @@ fsp_alloc_free_extent(
 
 /**********************************************************************//**
 Allocates a single free page from a space. */
-static __attribute__((nonnull))
+static MY_ATTRIBUTE((nonnull))
 void
 fsp_alloc_from_free_frag(
 /*=====================*/
@@ -1327,7 +1328,7 @@ Allocates a single free page from a space. The page is marked as used.
 @retval block, rw_lock_x_lock_count(&block->lock) == 1 if allocation succeeded
 (init_mtr == mtr, or the page was not previously freed in mtr)
 @retval block (not allocated or initialized) otherwise */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 buf_block_t*
 fsp_alloc_free_page(
 /*================*/
@@ -1576,9 +1577,9 @@ fsp_seg_inode_page_get_nth_inode(
 /*=============================*/
        page_t* page,   /*!< in: segment inode page */
        ulint   i,      /*!< in: inode index on page */
-       ulint   zip_size __attribute__((unused)),
+       ulint   zip_size MY_ATTRIBUTE((unused)),
                        /*!< in: compressed page size, or 0 */
-       mtr_t*  mtr __attribute__((unused)))
+       mtr_t*  mtr MY_ATTRIBUTE((unused)))
                        /*!< in/out: mini-transaction */
 {
        ut_ad(i < FSP_SEG_INODES_PER_PAGE(zip_size));
@@ -1877,7 +1878,7 @@ fseg_get_nth_frag_page_no(
 /*======================*/
        fseg_inode_t*   inode,  /*!< in: segment inode */
        ulint           n,      /*!< in: slot index */
-       mtr_t*          mtr __attribute__((unused)))
+       mtr_t*          mtr MY_ATTRIBUTE((unused)))
                                /*!< in/out: mini-transaction */
 {
        ut_ad(inode && mtr);
@@ -2958,7 +2959,7 @@ fsp_get_available_space_in_free_extents(
 /********************************************************************//**
 Marks a page used. The page must reside within the extents of the given
 segment. */
-static __attribute__((nonnull))
+static MY_ATTRIBUTE((nonnull))
 void
 fseg_mark_page_used(
 /*================*/
@@ -3030,7 +3031,8 @@ fseg_free_page_low(
        ib_id_t seg_id;
        ulint   i;
 
-       ut_ad(seg_inode && mtr);
+       ut_ad(seg_inode != NULL);
+       ut_ad(mtr != NULL);
        ut_ad(mach_read_from_4(seg_inode + FSEG_MAGIC_N)
              == FSEG_MAGIC_N_VALUE);
        ut_ad(!((page_offset(seg_inode) - FSEG_ARR_OFFSET) % FSEG_INODE_SIZE));
@@ -3239,7 +3241,8 @@ fseg_free_extent(
        ulint   descr_n_used;
        ulint   i;
 
-       ut_ad(seg_inode && mtr);
+       ut_ad(seg_inode != NULL);
+       ut_ad(mtr != NULL);
 
        descr = xdes_get_descriptor(space, zip_size, page, mtr);
 
index 7d0acb00a3ba2dce0a63ddb107a9863a8a6d92d5..2d71934fa0ef65323b976c4b8610f39038d92fa6 100644 (file)
@@ -305,9 +305,9 @@ YY_BUFFER_STATE fts0b_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner
 YY_BUFFER_STATE fts0b_scan_string (yyconst char *yy_str ,yyscan_t yyscanner );
 YY_BUFFER_STATE fts0b_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner );
 
-void *fts0balloc (yy_size_t ,           yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) );
-void *fts0brealloc (void *,yy_size_t ,           yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) );
-void fts0bfree (void * ,           yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) );
+void *fts0balloc (yy_size_t ,           yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) );
+void *fts0brealloc (void *,yy_size_t ,           yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) );
+void fts0bfree (void * ,           yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) );
 
 #define yy_new_buffer fts0b_create_buffer
 
@@ -347,7 +347,7 @@ typedef int yy_state_type;
 static yy_state_type yy_get_previous_state (yyscan_t yyscanner );
 static yy_state_type yy_try_NUL_trans (yy_state_type current_state  ,yyscan_t yyscanner);
 static int yy_get_next_buffer (yyscan_t yyscanner );
-static void yy_fatal_error (yyconst char msg[] ,           yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) );
+static void yy_fatal_error (yyconst char msg[] ,           yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) );
 
 /* Done after the current pattern has been matched and before the
  * corresponding action - sets up yytext.
@@ -451,7 +451,7 @@ static yyconst flex_int16_t yy_chk[32] =
 #line 1 "fts0blex.l"
 /*****************************************************************************
 
-Copyright (c) 2007, 2014, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2007, 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
@@ -579,11 +579,11 @@ extern int fts0bwrap (yyscan_t yyscanner );
 #endif
 
 #ifndef yytext_ptr
-static void yy_flex_strncpy (char *,yyconst char *,int ,           yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)));
+static void yy_flex_strncpy (char *,yyconst char *,int ,           yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)));
 #endif
 
 #ifdef YY_NEED_STRLEN
-static int yy_flex_strlen (yyconst char * ,           yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)));
+static int yy_flex_strlen (yyconst char * ,           yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)));
 #endif
 
 #ifndef YY_NO_INPUT
@@ -1609,7 +1609,7 @@ YY_BUFFER_STATE fts0b_scan_bytes  (yyconst char * yybytes, int  _yybytes_len , y
 #define YY_EXIT_FAILURE 2
 #endif
 
-static void yy_fatal_error (yyconst char* msg ,            yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)))
+static void yy_fatal_error (yyconst char* msg ,            yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)))
 {
        (void) fprintf( stderr, "%s\n", msg );
        exit( YY_EXIT_FAILURE );
@@ -1910,7 +1910,7 @@ int fts0blex_destroy  (yyscan_t yyscanner)
  */
 
 #ifndef yytext_ptr
-static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ,            yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)))
+static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ,            yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)))
 {
        register int i;
        for ( i = 0; i < n; ++i )
@@ -1919,7 +1919,7 @@ static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ,            yys
 #endif
 
 #ifdef YY_NEED_STRLEN
-static int yy_flex_strlen (yyconst char * s ,            yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)))
+static int yy_flex_strlen (yyconst char * s ,            yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)))
 {
        register int n;
        for ( n = 0; s[n]; ++n )
@@ -1929,12 +1929,12 @@ static int yy_flex_strlen (yyconst char * s ,            yyscan_t yyscanner __at
 }
 #endif
 
-void *fts0balloc (yy_size_t  size ,            yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)))
+void *fts0balloc (yy_size_t  size ,            yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)))
 {
        return (void *) malloc( size );
 }
 
-void *fts0brealloc  (void * ptr, yy_size_t  size ,            yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)))
+void *fts0brealloc  (void * ptr, yy_size_t  size ,            yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)))
 {
        /* The cast to (char *) in the following accommodates both
         * implementations that use char* generic pointers, and those
@@ -1946,7 +1946,7 @@ void *fts0brealloc  (void * ptr, yy_size_t  size ,            yyscan_t yyscanner
        return (void *) realloc( (char *) ptr, size );
 }
 
-void fts0bfree (void * ptr ,            yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)))
+void fts0bfree (void * ptr ,            yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)))
 {
        free( (char *) ptr );   /* see fts0brealloc() for (char *) cast */
 }
index 25047b38b9de09b5bc124bc43789afab22846d5a..a0f0fab5566b01ee9887869483a89b11dadcdf30 100644 (file)
@@ -108,6 +108,7 @@ UNIV_INTERN mysql_pfs_key_t fts_pll_tokenize_mutex_key;
 /** variable to record innodb_fts_internal_tbl_name for information
 schema table INNODB_FTS_INSERTED etc. */
 UNIV_INTERN char* fts_internal_tbl_name                = NULL;
+UNIV_INTERN char* fts_internal_tbl_name2       = NULL;
 
 /** InnoDB default stopword list:
 There are different versions of stopwords, the stop words listed
@@ -265,13 +266,15 @@ FTS auxiliary INDEX table and clear the cache at the end.
 @param[in,out] sync            sync state
 @param[in]     unlock_cache    whether unlock cache lock when write node
 @param[in]     wait            whether wait when a sync is in progress
+@param[in]      has_dict        whether has dict operation lock
 @return DB_SUCCESS if all OK */
 static
 dberr_t
 fts_sync(
        fts_sync_t*     sync,
        bool            unlock_cache,
-       bool            wait);
+       bool            wait,
+       bool            has_dict);
 
 /****************************************************************//**
 Release all resources help by the words rb tree e.g., the node ilist. */
@@ -280,7 +283,7 @@ void
 fts_words_free(
 /*===========*/
        ib_rbt_t*       words)          /*!< in: rb tree of words */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 #ifdef FTS_CACHE_SIZE_DEBUG
 /****************************************************************//**
 Read the max cache size parameter from the config table. */
@@ -302,7 +305,7 @@ fts_add_doc_by_id(
 /*==============*/
        fts_trx_table_t*ftt,            /*!< in: FTS trx table */
        doc_id_t        doc_id,         /*!< in: doc id */
-       ib_vector_t*    fts_indexes __attribute__((unused)));
+       ib_vector_t*    fts_indexes MY_ATTRIBUTE((unused)));
                                        /*!< in: affected fts indexes */
 #ifdef FTS_DOC_STATS_DEBUG
 /****************************************************************//**
@@ -317,7 +320,7 @@ fts_is_word_in_index(
        fts_table_t*    fts_table,      /*!< in: table instance */
        const fts_string_t* word,       /*!< in: the word to check */
        ibool*          found)          /*!< out: TRUE if exists */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 #endif /* FTS_DOC_STATS_DEBUG */
 
 /******************************************************************//**
@@ -332,7 +335,7 @@ fts_update_sync_doc_id(
        const char*             table_name,     /*!< in: table name, or NULL */
        doc_id_t                doc_id,         /*!< in: last document id */
        trx_t*                  trx)            /*!< in: update trx, or NULL */
-       __attribute__((nonnull(1)));
+       MY_ATTRIBUTE((nonnull(1)));
 
 /****************************************************************//**
 This function loads the default InnoDB stopword list */
@@ -1075,13 +1078,12 @@ fts_words_free(
        }
 }
 
-/*********************************************************************//**
-Clear cache. */
+/** Clear cache.
+@param[in,out] cache   fts cache */
 UNIV_INTERN
 void
 fts_cache_clear(
-/*============*/
-       fts_cache_t*    cache)          /*!< in: cache */
+       fts_cache_t*    cache)
 {
        ulint           i;
 
@@ -1477,7 +1479,7 @@ fts_cache_add_doc(
 /****************************************************************//**
 Drops a table. If the table can't be found we return a SUCCESS code.
 @return DB_SUCCESS or error code */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 fts_drop_table(
 /*===========*/
@@ -1519,7 +1521,7 @@ fts_drop_table(
 /****************************************************************//**
 Rename a single auxiliary table due to database name change.
 @return DB_SUCCESS or error code */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 fts_rename_one_aux_table(
 /*=====================*/
@@ -1628,7 +1630,7 @@ Drops the common ancillary tables needed for supporting an FTS index
 on the given table. row_mysql_lock_data_dictionary must have been called
 before this.
 @return DB_SUCCESS or error code */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 fts_drop_common_tables(
 /*===================*/
@@ -1755,7 +1757,7 @@ Drops FTS ancillary tables needed for supporting an FTS index
 on the given table. row_mysql_lock_data_dictionary must have been called
 before this.
 @return DB_SUCCESS or error code */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 fts_drop_all_index_tables(
 /*======================*/
@@ -2663,7 +2665,7 @@ fts_get_next_doc_id(
 This function fetch the Doc ID from CONFIG table, and compare with
 the Doc ID supplied. And store the larger one to the CONFIG table.
 @return DB_SUCCESS if OK */
-static __attribute__((nonnull))
+static MY_ATTRIBUTE((nonnull))
 dberr_t
 fts_cmp_set_sync_doc_id(
 /*====================*/
@@ -2917,7 +2919,7 @@ fts_add(
 /*********************************************************************//**
 Do commit-phase steps necessary for the deletion of a row.
 @return DB_SUCCESS or error code */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 fts_delete(
 /*=======*/
@@ -3008,7 +3010,7 @@ fts_delete(
 /*********************************************************************//**
 Do commit-phase steps necessary for the modification of a row.
 @return DB_SUCCESS or error code */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 fts_modify(
 /*=======*/
@@ -3079,7 +3081,7 @@ fts_create_doc_id(
 The given transaction is about to be committed; do whatever is necessary
 from the FTS system's POV.
 @return DB_SUCCESS or error code */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 fts_commit_table(
 /*=============*/
@@ -3412,7 +3414,7 @@ fts_add_doc_by_id(
 /*==============*/
        fts_trx_table_t*ftt,            /*!< in: FTS trx table */
        doc_id_t        doc_id,         /*!< in: doc id */
-       ib_vector_t*    fts_indexes __attribute__((unused)))
+       ib_vector_t*    fts_indexes MY_ATTRIBUTE((unused)))
                                        /*!< in: affected fts indexes */
 {
        mtr_t           mtr;
@@ -3532,7 +3534,7 @@ fts_add_doc_by_id(
                                get_doc, clust_index, doc_pcur, offsets, &doc);
 
                        if (doc.found) {
-                               ibool   success __attribute__((unused));
+                               ibool   success MY_ATTRIBUTE((unused));
 
                                btr_pcur_store_position(doc_pcur, &mtr);
                                mtr_commit(&mtr);
@@ -3567,7 +3569,7 @@ fts_add_doc_by_id(
 
                                DBUG_EXECUTE_IF(
                                        "fts_instrument_sync_debug",
-                                       fts_sync(cache->sync, true, true);
+                                       fts_sync(cache->sync, true, true, false);
                                );
 
                                DEBUG_SYNC_C("fts_instrument_sync_request");
@@ -3641,7 +3643,7 @@ fts_get_max_doc_id(
        dict_table_t*   table)          /*!< in: user table */
 {
        dict_index_t*   index;
-       dict_field_t*   dfield __attribute__((unused)) = NULL;
+       dict_field_t*   dfield MY_ATTRIBUTE((unused)) = NULL;
        doc_id_t        doc_id = 0;
        mtr_t           mtr;
        btr_pcur_t      pcur;
@@ -3899,7 +3901,7 @@ fts_write_node(
 /*********************************************************************//**
 Add rows to the DELETED_CACHE table.
 @return DB_SUCCESS if all went well else error code*/
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 fts_sync_add_deleted_cache(
 /*=======================*/
@@ -3953,7 +3955,7 @@ fts_sync_add_deleted_cache(
 @param[in]     index_cache     index cache
 @param[in]     unlock_cache    whether unlock cache when write node
 @return DB_SUCCESS if all went well else error code */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 fts_sync_write_words(
        trx_t*                  trx,
@@ -4089,7 +4091,7 @@ fts_sync_write_words(
 /*********************************************************************//**
 Write a single documents statistics to disk.
 @return DB_SUCCESS if all went well else error code */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 fts_sync_write_doc_stat(
 /*====================*/
@@ -4343,7 +4345,7 @@ fts_sync_begin(
 Run SYNC on the table, i.e., write out data from the index specific
 cache to the FTS aux INDEX table and FTS aux doc id stats table.
 @return DB_SUCCESS if all OK */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 fts_sync_index(
 /*===========*/
@@ -4379,13 +4381,11 @@ fts_sync_index(
 }
 
 /** Check if index cache has been synced completely
-@param[in,out] sync            sync state
 @param[in,out] index_cache     index cache
 @return true if index is synced, otherwise false. */
 static
 bool
 fts_sync_index_check(
-       fts_sync_t*             sync,
        fts_index_cache_t*      index_cache)
 {
        const ib_rbt_node_t*    rbt_node;
@@ -4408,14 +4408,36 @@ fts_sync_index_check(
        return(true);
 }
 
-/*********************************************************************//**
-Commit the SYNC, change state of processed doc ids etc.
+/** Reset synced flag in index cache when rollback
+@param[in,out] index_cache     index cache */
+static
+void
+fts_sync_index_reset(
+       fts_index_cache_t*      index_cache)
+{
+       const ib_rbt_node_t*    rbt_node;
+
+       for (rbt_node = rbt_first(index_cache->words);
+            rbt_node != NULL;
+            rbt_node = rbt_next(index_cache->words, rbt_node)) {
+
+               fts_tokenizer_word_t*   word;
+               word = rbt_value(fts_tokenizer_word_t, rbt_node);
+
+               fts_node_t*     fts_node;
+               fts_node = static_cast<fts_node_t*>(ib_vector_last(word->nodes));
+
+               fts_node->synced = false;
+       }
+}
+
+/** Commit the SYNC, change state of processed doc ids etc.
+@param[in,out] sync    sync state
 @return DB_SUCCESS if all OK */
-static  __attribute__((nonnull, warn_unused_result))
+static  MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 fts_sync_commit(
-/*============*/
-       fts_sync_t*     sync)                   /*!< in: sync state */
+       fts_sync_t*     sync)
 {
        dberr_t         error;
        trx_t*          trx = sync->trx;
@@ -4468,18 +4490,19 @@ fts_sync_commit(
                        (double) n_nodes/ (double) elapsed_time);
        }
 
+       /* Avoid assertion in trx_free(). */
+       trx->dict_operation_lock_mode = 0;
        trx_free_for_background(trx);
 
        return(error);
 }
 
-/*********************************************************************//**
-Rollback a sync operation */
+/** Rollback a sync operation
+@param[in,out] sync    sync state */
 static
 void
 fts_sync_rollback(
-/*==============*/
-       fts_sync_t*     sync)                   /*!< in: sync state */
+       fts_sync_t*     sync)
 {
        trx_t*          trx = sync->trx;
        fts_cache_t*    cache = sync->table->fts->cache;
@@ -4491,6 +4514,10 @@ fts_sync_rollback(
                index_cache = static_cast<fts_index_cache_t*>(
                        ib_vector_get(cache->indexes, i));
 
+               /* Reset synced flag so nodes will not be skipped
+               in the next sync, see fts_sync_write_words(). */
+               fts_sync_index_reset(index_cache);
+
                for (j = 0; fts_index_selector[j].value; ++j) {
 
                        if (index_cache->ins_graph[j] != NULL) {
@@ -4516,6 +4543,9 @@ fts_sync_rollback(
        rw_lock_x_unlock(&cache->lock);
 
        fts_sql_rollback(trx);
+
+       /* Avoid assertion in trx_free(). */
+       trx->dict_operation_lock_mode = 0;
        trx_free_for_background(trx);
 }
 
@@ -4524,13 +4554,15 @@ FTS auxiliary INDEX table and clear the cache at the end.
 @param[in,out] sync            sync state
 @param[in]     unlock_cache    whether unlock cache lock when write node
 @param[in]     wait            whether wait when a sync is in progress
+@param[in]      has_dict        whether has dict operation lock
 @return DB_SUCCESS if all OK */
 static
 dberr_t
 fts_sync(
        fts_sync_t*     sync,
        bool            unlock_cache,
-       bool            wait)
+       bool            wait,
+       bool            has_dict)
 {
        ulint           i;
        dberr_t         error = DB_SUCCESS;
@@ -4559,6 +4591,12 @@ fts_sync(
        DEBUG_SYNC_C("fts_sync_begin");
        fts_sync_begin(sync);
 
+       /* When sync in background, we hold dict operation lock
+       to prevent DDL like DROP INDEX, etc. */
+       if (has_dict) {
+               sync->trx->dict_operation_lock_mode = RW_S_LATCH;
+       }
+
 begin_sync:
        if (cache->total_size > fts_max_cache_size) {
                /* Avoid the case: sync never finish when
@@ -4599,7 +4637,7 @@ begin_sync:
                        ib_vector_get(cache->indexes, i));
 
                if (index_cache->index->to_be_dropped
-                   || fts_sync_index_check(sync, index_cache)) {
+                   || fts_sync_index_check(index_cache)) {
                        continue;
                }
 
@@ -4614,6 +4652,7 @@ end_sync:
        }
 
        rw_lock_x_lock(&cache->lock);
+       sync->interrupted = false;
        sync->in_progress = false;
        os_event_set(sync->event);
        rw_lock_x_unlock(&cache->lock);
@@ -4637,20 +4676,23 @@ FTS auxiliary INDEX table and clear the cache at the end.
 @param[in,out] table           fts table
 @param[in]     unlock_cache    whether unlock cache when write node
 @param[in]     wait            whether wait for existing sync to finish
+@param[in]     has_dict        whether has dict operation lock
 @return DB_SUCCESS on success, error code on failure. */
 UNIV_INTERN
 dberr_t
 fts_sync_table(
        dict_table_t*   table,
        bool            unlock_cache,
-       bool            wait)
+       bool            wait,
+       bool            has_dict)
 {
        dberr_t err = DB_SUCCESS;
 
        ut_ad(table->fts);
 
        if (!dict_table_is_discarded(table) && table->fts->cache) {
-               err = fts_sync(table->fts->cache->sync, unlock_cache, wait);
+               err = fts_sync(table->fts->cache->sync,
+                              unlock_cache, wait, has_dict);
        }
 
        return(err);
@@ -6169,7 +6211,7 @@ fts_update_hex_format_flag(
 /*********************************************************************//**
 Rename an aux table to HEX format. It's called when "%016llu" is used
 to format an object id in table name, which only happens in Windows. */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 fts_rename_one_aux_table_to_hex_format(
 /*===================================*/
@@ -6260,7 +6302,7 @@ Note the ids in tables are correct but the names are old ambiguous ones.
 
 This function should make sure that either all the parent table and aux tables
 are set DICT_TF2_FTS_AUX_HEX_NAME with flags2 or none of them are set */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 fts_rename_aux_tables_to_hex_format_low(
 /*====================================*/
@@ -6414,14 +6456,14 @@ fts_fake_hex_to_dec(
 {
        ib_id_t         dec_id = 0;
        char            tmp_id[FTS_AUX_MIN_TABLE_ID_LENGTH];
-       int             ret __attribute__((unused));
+       int             ret MY_ATTRIBUTE((unused));
 
        ret = sprintf(tmp_id, UINT64PFx, id);
        ut_ad(ret == 16);
 #ifdef _WIN32
        ret = sscanf(tmp_id, "%016llu", &dec_id);
 #else
-       ret = sscanf(tmp_id, "%016"PRIu64, &dec_id);
+       ret = sscanf(tmp_id, "%016" PRIu64, &dec_id);
 #endif /* _WIN32 */
        ut_ad(ret == 1);
 
@@ -6528,6 +6570,36 @@ fts_check_corrupt_index(
        return(0);
 }
 
+/* Get parent table name if it's a fts aux table
+@param[in]     aux_table_name  aux table name
+@param[in]     aux_table_len   aux table length
+@return parent table name, or NULL */
+char*
+fts_get_parent_table_name(
+       const char*     aux_table_name,
+       ulint           aux_table_len)
+{
+       fts_aux_table_t aux_table;
+       char*           parent_table_name = NULL;
+
+       if (fts_is_aux_table_name(&aux_table, aux_table_name, aux_table_len)) {
+               dict_table_t*   parent_table;
+
+               parent_table = dict_table_open_on_id(
+                       aux_table.parent_id, TRUE, DICT_TABLE_OP_NORMAL);
+
+               if (parent_table != NULL) {
+                       parent_table_name = mem_strdupl(
+                               parent_table->name,
+                               strlen(parent_table->name));
+
+                       dict_table_close(parent_table, TRUE, FALSE);
+               }
+       }
+
+       return(parent_table_name);
+}
+
 /** Check the validity of the parent table.
 @param[in]     aux_table       auxiliary table
 @return true if it is a valid table or false if it is not */
@@ -6736,7 +6808,7 @@ fts_drop_aux_table_from_vector(
 Check and drop all orphaned FTS auxiliary tables, those that don't have
 a parent table or FTS index defined on them.
 @return DB_SUCCESS or error code */
-static __attribute__((nonnull))
+static MY_ATTRIBUTE((nonnull))
 void
 fts_check_and_drop_orphaned_tables(
 /*===============================*/
index 72c3c4fddcf12b14a56997d5eabc99dd3986dcd8..6ea529971d2c8b42346b78666d156dbcf648ec8a 100644 (file)
@@ -578,9 +578,6 @@ fts_zip_read_word(
        fts_zip_t*      zip,            /*!< in: Zip state + data */
        fts_string_t*   word)           /*!< out: uncompressed word */
 {
-#ifdef UNIV_DEBUG
-       ulint           i;
-#endif
        short           len = 0;
        void*           null = NULL;
        byte*           ptr = word->f_str;
@@ -655,10 +652,9 @@ fts_zip_read_word(
                }
        }
 
-#ifdef UNIV_DEBUG
        /* All blocks must be freed at end of inflate. */
        if (zip->status != Z_OK) {
-               for (i = 0; i < ib_vector_size(zip->blocks); ++i) {
+               for (ulint i = 0; i < ib_vector_size(zip->blocks); ++i) {
                        if (ib_vector_getp(zip->blocks, i)) {
                                ut_free(ib_vector_getp(zip->blocks, i));
                                ib_vector_set(zip->blocks, i, &null);
@@ -669,7 +665,6 @@ fts_zip_read_word(
        if (ptr != NULL) {
                ut_ad(word->f_len == strlen((char*) ptr));
        }
-#endif /* UNIV_DEBUG */
 
        return(zip->status == Z_OK || zip->status == Z_STREAM_END ? ptr : NULL);
 }
@@ -797,7 +792,7 @@ fts_zip_deflate_end(
 Read the words from the FTS INDEX.
 @return DB_SUCCESS if all OK, DB_TABLE_NOT_FOUND if no more indexes
         to search else error code */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 fts_index_fetch_words(
 /*==================*/
@@ -1131,7 +1126,7 @@ fts_optimize_lookup(
 /**********************************************************************//**
 Encode the word pos list into the node
 @return DB_SUCCESS or error code*/
-static __attribute__((nonnull))
+static MY_ATTRIBUTE((nonnull))
 dberr_t
 fts_optimize_encode_node(
 /*=====================*/
@@ -1220,7 +1215,7 @@ fts_optimize_encode_node(
 /**********************************************************************//**
 Optimize the data contained in a node.
 @return DB_SUCCESS or error code*/
-static __attribute__((nonnull))
+static MY_ATTRIBUTE((nonnull))
 dberr_t
 fts_optimize_node(
 /*==============*/
@@ -1318,7 +1313,7 @@ test_again:
 /**********************************************************************//**
 Determine the starting pos within the deleted doc id vector for a word.
 @return delete position */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 int
 fts_optimize_deleted_pos(
 /*=====================*/
@@ -1447,7 +1442,7 @@ fts_optimize_word(
 /**********************************************************************//**
 Update the FTS index table. This is a delete followed by an insert.
 @return DB_SUCCESS or error code */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 fts_optimize_write_word(
 /*====================*/
@@ -1550,7 +1545,7 @@ fts_word_free(
 /**********************************************************************//**
 Optimize the word ilist and rewrite data to the FTS index.
 @return status one of RESTART, EXIT, ERROR */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 fts_optimize_compact(
 /*=================*/
@@ -1645,7 +1640,7 @@ fts_optimize_create(
 /**********************************************************************//**
 Get optimize start time of an FTS index.
 @return DB_SUCCESS if all OK else error code */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 fts_optimize_get_index_start_time(
 /*==============================*/
@@ -1661,7 +1656,7 @@ fts_optimize_get_index_start_time(
 /**********************************************************************//**
 Set the optimize start time of an FTS index.
 @return DB_SUCCESS if all OK else error code */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 fts_optimize_set_index_start_time(
 /*==============================*/
@@ -1677,7 +1672,7 @@ fts_optimize_set_index_start_time(
 /**********************************************************************//**
 Get optimize end time of an FTS index.
 @return DB_SUCCESS if all OK else error code */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 fts_optimize_get_index_end_time(
 /*============================*/
@@ -1692,7 +1687,7 @@ fts_optimize_get_index_end_time(
 /**********************************************************************//**
 Set the optimize end time of an FTS index.
 @return DB_SUCCESS if all OK else error code */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 fts_optimize_set_index_end_time(
 /*============================*/
@@ -1912,7 +1907,7 @@ fts_optimize_set_next_word(
 Optimize is complete. Set the completion time, and reset the optimize
 start string for this FTS index to "".
 @return DB_SUCCESS if all OK */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 fts_optimize_index_completed(
 /*=========================*/
@@ -1952,7 +1947,7 @@ fts_optimize_index_completed(
 Read the list of words from the FTS auxiliary index that will be
 optimized in this pass.
 @return DB_SUCCESS if all OK */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 fts_optimize_index_read_words(
 /*==========================*/
@@ -2009,7 +2004,7 @@ fts_optimize_index_read_words(
 Run OPTIMIZE on the given FTS index. Note: this can take a very long
 time (hours).
 @return DB_SUCCESS if all OK */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 fts_optimize_index(
 /*===============*/
@@ -2080,7 +2075,7 @@ fts_optimize_index(
 /**********************************************************************//**
 Delete the document ids in the delete, and delete cache tables.
 @return DB_SUCCESS if all OK */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 fts_optimize_purge_deleted_doc_ids(
 /*===============================*/
@@ -2149,7 +2144,7 @@ fts_optimize_purge_deleted_doc_ids(
 /**********************************************************************//**
 Delete the document ids in the pending delete, and delete tables.
 @return DB_SUCCESS if all OK */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 fts_optimize_purge_deleted_doc_id_snapshot(
 /*=======================================*/
@@ -2199,7 +2194,7 @@ Copy the deleted doc ids that will be purged during this optimize run
 to the being deleted FTS auxiliary tables. The transaction is committed
 upon successfull copy and rolled back on DB_DUPLICATE_KEY error.
 @return DB_SUCCESS if all OK */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 fts_optimize_create_deleted_doc_id_snapshot(
 /*========================================*/
@@ -2237,7 +2232,7 @@ fts_optimize_create_deleted_doc_id_snapshot(
 Read in the document ids that are to be purged during optimize. The
 transaction is committed upon successfully read.
 @return DB_SUCCESS if all OK */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 fts_optimize_read_deleted_doc_id_snapshot(
 /*======================================*/
@@ -2274,7 +2269,7 @@ Optimze all the FTS indexes, skipping those that have already been
 optimized, since the FTS auxiliary indexes are not guaranteed to be
 of the same cardinality.
 @return DB_SUCCESS if all OK */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 fts_optimize_indexes(
 /*=================*/
@@ -2344,7 +2339,7 @@ fts_optimize_indexes(
 /*********************************************************************//**
 Cleanup the snapshot tables and the master deleted table.
 @return DB_SUCCESS if all OK */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 fts_optimize_purge_snapshot(
 /*========================*/
@@ -2373,7 +2368,7 @@ fts_optimize_purge_snapshot(
 /*********************************************************************//**
 Reset the start time to 0 so that a new optimize can be started.
 @return DB_SUCCESS if all OK */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 fts_optimize_reset_start_time(
 /*==========================*/
@@ -2412,7 +2407,7 @@ fts_optimize_reset_start_time(
 /*********************************************************************//**
 Run OPTIMIZE on the given table by a background thread.
 @return DB_SUCCESS if all OK */
-static __attribute__((nonnull))
+static MY_ATTRIBUTE((nonnull))
 dberr_t
 fts_optimize_table_bk(
 /*==================*/
@@ -2759,6 +2754,7 @@ fts_optimize_new_table(
                        empty_slot = i;
                } else if (slot->table->id == table->id) {
                        /* Already exists in our optimize queue. */
+                       ut_ad(slot->table_id = table->id);
                        return(FALSE);
                }
        }
@@ -2976,15 +2972,24 @@ fts_optimize_sync_table(
 {
        dict_table_t*   table = NULL;
 
+       /* Prevent DROP INDEX etc. from running when we are syncing
+       cache in background. */
+       if (!rw_lock_s_lock_nowait(&dict_operation_lock, __FILE__, __LINE__)) {
+               /* Exit when fail to get dict operation lock. */
+               return;
+       }
+
        table = dict_table_open_on_id(table_id, FALSE, DICT_TABLE_OP_NORMAL);
 
        if (table) {
                if (dict_table_has_fts_index(table) && table->fts->cache) {
-                       fts_sync_table(table, true, false);
+                       fts_sync_table(table, true, false, true);
                }
 
                dict_table_close(table, FALSE, FALSE);
        }
+
+       rw_lock_s_unlock(&dict_operation_lock);
 }
 
 /**********************************************************************//**
index fcae656176498c53317243642bb234f96c058441..2c44a21a8f2948ca3dd1428e6da75e3de2a188ff 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 2007, 2015, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2007, 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
@@ -287,7 +287,7 @@ fts_expand_query(
        dict_index_t*   index,          /*!< in: FTS index to search */
        fts_query_t*    query)          /*!< in: query result, to be freed
                                        by the client */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /*************************************************************//**
 This function finds documents that contain all words in a
 phrase or proximity search. And if proximity search, verify
@@ -1128,7 +1128,7 @@ cont_search:
 /*****************************************************************//**
 Set difference.
 @return DB_SUCCESS if all go well */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 fts_query_difference(
 /*=================*/
@@ -1220,7 +1220,7 @@ fts_query_difference(
 /*****************************************************************//**
 Intersect the token doc ids with the current set.
 @return DB_SUCCESS if all go well */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 fts_query_intersect(
 /*================*/
@@ -1398,7 +1398,7 @@ fts_query_cache(
 /*****************************************************************//**
 Set union.
 @return DB_SUCCESS if all go well */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 fts_query_union(
 /*============*/
@@ -2014,7 +2014,7 @@ fts_query_select(
 Read the rows from the FTS index, that match word and where the
 doc id is between first and last doc id.
 @return DB_SUCCESS if all go well else error code */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 fts_query_find_term(
 /*================*/
@@ -2154,7 +2154,7 @@ fts_query_sum(
 /********************************************************************
 Calculate the total documents that contain a particular word (term).
 @return DB_SUCCESS if all go well else error code */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 fts_query_total_docs_containing_term(
 /*=================================*/
@@ -2233,7 +2233,7 @@ fts_query_total_docs_containing_term(
 /********************************************************************
 Get the total number of words in a documents.
 @return DB_SUCCESS if all go well else error code */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 fts_query_terms_in_document(
 /*========================*/
@@ -2314,7 +2314,7 @@ fts_query_terms_in_document(
 /*****************************************************************//**
 Retrieve the document and match the phrase tokens.
 @return DB_SUCCESS or error code */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 fts_query_match_document(
 /*=====================*/
@@ -2360,7 +2360,7 @@ fts_query_match_document(
 This function fetches the original documents and count the
 words in between matching words to see that is in specified distance
 @return DB_SUCCESS if all OK */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 bool
 fts_query_is_in_proximity_range(
 /*============================*/
@@ -2415,7 +2415,7 @@ fts_query_is_in_proximity_range(
 Iterate over the matched document ids and search the for the
 actual phrase in the text.
 @return DB_SUCCESS if all OK */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 fts_query_search_phrase(
 /*====================*/
@@ -2503,7 +2503,7 @@ func_exit:
 /*****************************************************************//**
 Text/Phrase search.
 @return DB_SUCCESS or error code */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 fts_query_phrase_search(
 /*====================*/
@@ -2754,7 +2754,7 @@ func_exit:
 /*****************************************************************//**
 Find the word and evaluate.
 @return DB_SUCCESS if all go well */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 fts_query_execute(
 /*==============*/
@@ -4123,7 +4123,7 @@ words in documents found in the first search pass will be used as
 search arguments to search the document again, thus "expand"
 the search result set.
 @return DB_SUCCESS if success, otherwise the error code */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 fts_expand_query(
 /*=============*/
index b744fbf0763c23340c2bca52ea5c208a28a5a2a9..d4d9b4c48d1b7a949d1aa03c933ea30d0922cabc 100644 (file)
@@ -305,9 +305,9 @@ YY_BUFFER_STATE fts0t_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner
 YY_BUFFER_STATE fts0t_scan_string (yyconst char *yy_str ,yyscan_t yyscanner );
 YY_BUFFER_STATE fts0t_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner );
 
-void *fts0talloc (yy_size_t ,           yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) );
-void *fts0trealloc (void *,yy_size_t ,           yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) );
-void fts0tfree (void * ,           yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) );
+void *fts0talloc (yy_size_t ,           yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) );
+void *fts0trealloc (void *,yy_size_t ,           yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) );
+void fts0tfree (void * ,           yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) );
 
 #define yy_new_buffer fts0t_create_buffer
 
@@ -347,7 +347,7 @@ typedef int yy_state_type;
 static yy_state_type yy_get_previous_state (yyscan_t yyscanner );
 static yy_state_type yy_try_NUL_trans (yy_state_type current_state  ,yyscan_t yyscanner);
 static int yy_get_next_buffer (yyscan_t yyscanner );
-static void yy_fatal_error (yyconst char msg[] ,           yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) );
+static void yy_fatal_error (yyconst char msg[] ,           yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) );
 
 /* Done after the current pattern has been matched and before the
  * corresponding action - sets up yytext.
@@ -447,7 +447,7 @@ static yyconst flex_int16_t yy_chk[29] =
 #line 1 "fts0tlex.l"
 /*****************************************************************************
 
-Copyright (c) 2007, 2014, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2007, 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
@@ -575,11 +575,11 @@ extern int fts0twrap (yyscan_t yyscanner );
 #endif
 
 #ifndef yytext_ptr
-static void yy_flex_strncpy (char *,yyconst char *,int ,           yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)));
+static void yy_flex_strncpy (char *,yyconst char *,int ,           yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)));
 #endif
 
 #ifdef YY_NEED_STRLEN
-static int yy_flex_strlen (yyconst char * ,           yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)));
+static int yy_flex_strlen (yyconst char * ,           yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)));
 #endif
 
 #ifndef YY_NO_INPUT
@@ -1602,7 +1602,7 @@ YY_BUFFER_STATE fts0t_scan_bytes  (yyconst char * yybytes, int  _yybytes_len , y
 #define YY_EXIT_FAILURE 2
 #endif
 
-static void yy_fatal_error (yyconst char* msg ,            yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)))
+static void yy_fatal_error (yyconst char* msg ,            yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)))
 {
        (void) fprintf( stderr, "%s\n", msg );
        exit( YY_EXIT_FAILURE );
@@ -1903,7 +1903,7 @@ int fts0tlex_destroy  (yyscan_t yyscanner)
  */
 
 #ifndef yytext_ptr
-static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ,            yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)))
+static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ,            yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)))
 {
        register int i;
        for ( i = 0; i < n; ++i )
@@ -1912,7 +1912,7 @@ static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ,            yys
 #endif
 
 #ifdef YY_NEED_STRLEN
-static int yy_flex_strlen (yyconst char * s ,            yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)))
+static int yy_flex_strlen (yyconst char * s ,            yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)))
 {
        register int n;
        for ( n = 0; s[n]; ++n )
@@ -1922,12 +1922,12 @@ static int yy_flex_strlen (yyconst char * s ,            yyscan_t yyscanner __at
 }
 #endif
 
-void *fts0talloc (yy_size_t  size ,            yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)))
+void *fts0talloc (yy_size_t  size ,            yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)))
 {
        return (void *) malloc( size );
 }
 
-void *fts0trealloc  (void * ptr, yy_size_t  size ,            yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)))
+void *fts0trealloc  (void * ptr, yy_size_t  size ,            yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)))
 {
        /* The cast to (char *) in the following accommodates both
         * implementations that use char* generic pointers, and those
@@ -1939,7 +1939,7 @@ void *fts0trealloc  (void * ptr, yy_size_t  size ,            yyscan_t yyscanner
        return (void *) realloc( (char *) ptr, size );
 }
 
-void fts0tfree (void * ptr ,            yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)))
+void fts0tfree (void * ptr ,            yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)))
 {
        free( (char *) ptr );   /* see fts0trealloc() for (char *) cast */
 }
index 2c072914c8b7fc981f9051779de492764d578c02..52b63eff6745493c0a304ece2117db3d301383f8 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# Copyright (c) 2007, 2011, Oracle and/or its affiliates. All Rights Reserved.
+# Copyright (c) 2007, 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
@@ -22,15 +22,15 @@ make -f Makefile.query
 echo '#include "univ.i"' > $TMPF
 
 # This is to avoid compiler warning about unused parameters.
-# FIXME: gcc extension "__attribute__" causing compilation errors on windows
+# FIXME: gcc extension "MY_ATTRIBUTE" causing compilation errors on windows
 # platform. Quote them out for now.
 sed -e '
-s/^\(static.*void.*yy_fatal_error.*msg.*,\)\(.*yyscanner\)/\1 \2 __attribute__((unused))/;
-s/^\(static.*void.*yy_flex_strncpy.*n.*,\)\(.*yyscanner\)/\1 \2 __attribute__((unused))/;
-s/^\(static.*int.*yy_flex_strlen.*s.*,\)\(.*yyscanner\)/\1 \2 __attribute__((unused))/;
-s/^\(\(static\|void\).*fts0[bt]alloc.*,\)\(.*yyscanner\)/\1 \3 __attribute__((unused))/;
-s/^\(\(static\|void\).*fts0[bt]realloc.*,\)\(.*yyscanner\)/\1 \3 __attribute__((unused))/;
-s/^\(\(static\|void\).*fts0[bt]free.*,\)\(.*yyscanner\)/\1 \3 __attribute__((unused))/;
+s/^\(static.*void.*yy_fatal_error.*msg.*,\)\(.*yyscanner\)/\1 \2 MY_ATTRIBUTE((unused))/;
+s/^\(static.*void.*yy_flex_strncpy.*n.*,\)\(.*yyscanner\)/\1 \2 MY_ATTRIBUTE((unused))/;
+s/^\(static.*int.*yy_flex_strlen.*s.*,\)\(.*yyscanner\)/\1 \2 MY_ATTRIBUTE((unused))/;
+s/^\(\(static\|void\).*fts0[bt]alloc.*,\)\(.*yyscanner\)/\1 \3 MY_ATTRIBUTE((unused))/;
+s/^\(\(static\|void\).*fts0[bt]realloc.*,\)\(.*yyscanner\)/\1 \3 MY_ATTRIBUTE((unused))/;
+s/^\(\(static\|void\).*fts0[bt]free.*,\)\(.*yyscanner\)/\1 \3 MY_ATTRIBUTE((unused))/;
 ' < fts0blex.cc >> $TMPF
 
 mv $TMPF fts0blex.cc
@@ -38,12 +38,12 @@ mv $TMPF fts0blex.cc
 echo '#include "univ.i"' > $TMPF
 
 sed -e '
-s/^\(static.*void.*yy_fatal_error.*msg.*,\)\(.*yyscanner\)/\1 \2 __attribute__((unused))/;
-s/^\(static.*void.*yy_flex_strncpy.*n.*,\)\(.*yyscanner\)/\1 \2 __attribute__((unused))/;
-s/^\(static.*int.*yy_flex_strlen.*s.*,\)\(.*yyscanner\)/\1 \2 __attribute__((unused))/;
-s/^\(\(static\|void\).*fts0[bt]alloc.*,\)\(.*yyscanner\)/\1 \3 __attribute__((unused))/;
-s/^\(\(static\|void\).*fts0[bt]realloc.*,\)\(.*yyscanner\)/\1 \3 __attribute__((unused))/;
-s/^\(\(static\|void\).*fts0[bt]free.*,\)\(.*yyscanner\)/\1 \3 __attribute__((unused))/;
+s/^\(static.*void.*yy_fatal_error.*msg.*,\)\(.*yyscanner\)/\1 \2 MY_ATTRIBUTE((unused))/;
+s/^\(static.*void.*yy_flex_strncpy.*n.*,\)\(.*yyscanner\)/\1 \2 MY_ATTRIBUTE((unused))/;
+s/^\(static.*int.*yy_flex_strlen.*s.*,\)\(.*yyscanner\)/\1 \2 MY_ATTRIBUTE((unused))/;
+s/^\(\(static\|void\).*fts0[bt]alloc.*,\)\(.*yyscanner\)/\1 \3 MY_ATTRIBUTE((unused))/;
+s/^\(\(static\|void\).*fts0[bt]realloc.*,\)\(.*yyscanner\)/\1 \3 MY_ATTRIBUTE((unused))/;
+s/^\(\(static\|void\).*fts0[bt]free.*,\)\(.*yyscanner\)/\1 \3 MY_ATTRIBUTE((unused))/;
 ' < fts0tlex.cc >> $TMPF
 
 mv $TMPF fts0tlex.cc
index 834b0e3033f0d94c92213bfd533156a3a715a68e..5580517afc496dac8848e4af9acc80d78a62356a 100644 (file)
@@ -1465,7 +1465,7 @@ thd_set_lock_wait_time(
 /********************************************************************//**
 Obtain the InnoDB transaction of a MySQL thread.
 @return        reference to transaction pointer */
-__attribute__((warn_unused_result, nonnull))
+MY_ATTRIBUTE((warn_unused_result, nonnull))
 static inline
 trx_t*&
 thd_to_trx(
@@ -3553,7 +3553,7 @@ int
 innobase_end(
 /*=========*/
        handlerton*             hton,   /*!< in/out: InnoDB handlerton */
-       ha_panic_function       type __attribute__((unused)))
+       ha_panic_function       type MY_ATTRIBUTE((unused)))
                                        /*!< in: ha_panic() parameter */
 {
        int     err= 0;
@@ -7027,6 +7027,7 @@ dberr_t
 ha_innobase::innobase_lock_autoinc(void)
 /*====================================*/
 {
+       DBUG_ENTER("ha_innobase::innobase_lock_autoinc");
        dberr_t         error = DB_SUCCESS;
 
        ut_ad(!srv_read_only_mode);
@@ -7061,6 +7062,8 @@ ha_innobase::innobase_lock_autoinc(void)
                /* Fall through to old style locking. */
 
        case AUTOINC_OLD_STYLE_LOCKING:
+               DBUG_EXECUTE_IF("die_if_autoinc_old_lock_style_used",
+                               ut_ad(0););
                error = row_lock_table_autoinc_for_mysql(prebuilt);
 
                if (error == DB_SUCCESS) {
@@ -7074,7 +7077,7 @@ ha_innobase::innobase_lock_autoinc(void)
                ut_error;
        }
 
-       return(error);
+       DBUG_RETURN(error);
 }
 
 /********************************************************************//**
@@ -9728,7 +9731,7 @@ create_table_check_doc_id_col(
 
 /*****************************************************************//**
 Creates a table definition to an InnoDB database. */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 int
 create_table_def(
 /*=============*/
@@ -11172,6 +11175,25 @@ ha_innobase::discard_or_import_tablespace(
        /* Commit the transaction in order to release the table lock. */
        trx_commit_for_mysql(prebuilt->trx);
 
+       if (err == DB_SUCCESS && !discard
+           && dict_stats_is_persistent_enabled(dict_table)) {
+               dberr_t         ret;
+
+               /* Adjust the persistent statistics. */
+               ret = dict_stats_update(dict_table,
+                                       DICT_STATS_RECALC_PERSISTENT);
+
+               if (ret != DB_SUCCESS) {
+                       push_warning_printf(
+                               ha_thd(),
+                               Sql_condition::WARN_LEVEL_WARN,
+                               ER_ALTER_INFO,
+                               "Error updating stats for table '%s'"
+                               " after table rebuild: %s",
+                               dict_table->name, ut_strerr(ret));
+               }
+       }
+
        DBUG_RETURN(convert_error_code_to_mysql(err, dict_table->flags, NULL));
 }
 
@@ -11422,7 +11444,7 @@ innobase_drop_database(
 /*********************************************************************//**
 Renames an InnoDB table.
 @return DB_SUCCESS or error code */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 innobase_rename_table(
 /*==================*/
@@ -12489,7 +12511,7 @@ ha_innobase::optimize(
        if (innodb_optimize_fulltext_only) {
                if (prebuilt->table->fts && prebuilt->table->fts->cache
                    && !dict_table_is_discarded(prebuilt->table)) {
-                       fts_sync_table(prebuilt->table, false, true);
+                       fts_sync_table(prebuilt->table, false, true, false);
                        fts_optimize_table(prebuilt->table);
                }
                return(HA_ADMIN_OK);
@@ -14487,6 +14509,37 @@ ha_innobase::get_auto_increment(
        ulonglong       col_max_value = innobase_get_int_col_max_value(
                table->next_number_field);
 
+       /** The following logic is needed to avoid duplicate key error
+       for autoincrement column.
+
+       (1) InnoDB gives the current autoincrement value with respect
+       to increment and offset value.
+
+       (2) Basically it does compute_next_insert_id() logic inside InnoDB
+       to avoid the current auto increment value changed by handler layer.
+
+       (3) It is restricted only for insert operations. */
+
+       if (increment > 1 && thd_sql_command(user_thd) != SQLCOM_ALTER_TABLE
+           && autoinc < col_max_value) {
+
+               ulonglong       prev_auto_inc = autoinc;
+
+               autoinc = ((autoinc - 1) + increment - offset)/ increment;
+
+               autoinc = autoinc * increment + offset;
+
+               /* If autoinc exceeds the col_max_value then reset
+               to old autoinc value. Because in case of non-strict
+               sql mode, boundary value is not considered as error. */
+
+               if (autoinc >= col_max_value) {
+                       autoinc = prev_auto_inc;
+               }
+
+               ut_ad(autoinc > 0);
+       }
+
        /* Called for the first time ? */
        if (trx->n_autoinc_rows == 0) {
 
@@ -15648,7 +15701,12 @@ innodb_internal_table_update(
                my_free(old);
        }
 
-       fts_internal_tbl_name = *(char**) var_ptr;
+       fts_internal_tbl_name2 = *(char**) var_ptr;
+       if (fts_internal_tbl_name2 == NULL) {
+               fts_internal_tbl_name = const_cast<char*>("default");
+       } else {
+               fts_internal_tbl_name = fts_internal_tbl_name2;
+       }
 }
 
 /****************************************************************//**
@@ -16381,7 +16439,7 @@ static char* srv_buffer_pool_evict;
 Evict all uncompressed pages of compressed tables from the buffer pool.
 Keep the compressed pages in the buffer pool.
 @return whether all uncompressed pages were evicted */
-static __attribute__((warn_unused_result))
+static MY_ATTRIBUTE((warn_unused_result))
 bool
 innodb_buffer_pool_evict_uncompressed(void)
 /*=======================================*/
@@ -16709,13 +16767,13 @@ void
 purge_run_now_set(
 /*==============*/
        THD*                            thd     /*!< in: thread handle */
-                                       __attribute__((unused)),
+                                       MY_ATTRIBUTE((unused)),
        struct st_mysql_sys_var*        var     /*!< in: pointer to system
                                                variable */
-                                       __attribute__((unused)),
+                                       MY_ATTRIBUTE((unused)),
        void*                           var_ptr /*!< out: where the formal
                                                string goes */
-                                       __attribute__((unused)),
+                                       MY_ATTRIBUTE((unused)),
        const void*                     save)   /*!< in: immediate result from
                                                check function */
 {
@@ -16732,13 +16790,13 @@ void
 purge_stop_now_set(
 /*===============*/
        THD*                            thd     /*!< in: thread handle */
-                                       __attribute__((unused)),
+                                       MY_ATTRIBUTE((unused)),
        struct st_mysql_sys_var*        var     /*!< in: pointer to system
                                                variable */
-                                       __attribute__((unused)),
+                                       MY_ATTRIBUTE((unused)),
        void*                           var_ptr /*!< out: where the formal
                                                string goes */
-                                       __attribute__((unused)),
+                                       MY_ATTRIBUTE((unused)),
        const void*                     save)   /*!< in: immediate result from
                                                check function */
 {
@@ -16754,13 +16812,13 @@ void
 checkpoint_now_set(
 /*===============*/
        THD*                            thd     /*!< in: thread handle */
-                                       __attribute__((unused)),
+                                       MY_ATTRIBUTE((unused)),
        struct st_mysql_sys_var*        var     /*!< in: pointer to system
                                                variable */
-                                       __attribute__((unused)),
+                                       MY_ATTRIBUTE((unused)),
        void*                           var_ptr /*!< out: where the formal
                                                string goes */
-                                       __attribute__((unused)),
+                                       MY_ATTRIBUTE((unused)),
        const void*                     save)   /*!< in: immediate result from
                                                check function */
 {
@@ -16781,13 +16839,13 @@ void
 buf_flush_list_now_set(
 /*===================*/
        THD*                            thd     /*!< in: thread handle */
-                                       __attribute__((unused)),
+                                       MY_ATTRIBUTE((unused)),
        struct st_mysql_sys_var*        var     /*!< in: pointer to system
                                                variable */
-                                       __attribute__((unused)),
+                                       MY_ATTRIBUTE((unused)),
        void*                           var_ptr /*!< out: where the formal
                                                string goes */
-                                       __attribute__((unused)),
+                                       MY_ATTRIBUTE((unused)),
        const void*                     save)   /*!< in: immediate result from
                                                check function */
 {
@@ -16884,13 +16942,13 @@ void
 buffer_pool_dump_now(
 /*=================*/
        THD*                            thd     /*!< in: thread handle */
-                                       __attribute__((unused)),
+                                       MY_ATTRIBUTE((unused)),
        struct st_mysql_sys_var*        var     /*!< in: pointer to system
                                                variable */
-                                       __attribute__((unused)),
+                                       MY_ATTRIBUTE((unused)),
        void*                           var_ptr /*!< out: where the formal
                                                string goes */
-                                       __attribute__((unused)),
+                                       MY_ATTRIBUTE((unused)),
        const void*                     save)   /*!< in: immediate result from
                                                check function */
 {
@@ -16907,13 +16965,13 @@ void
 buffer_pool_load_now(
 /*=================*/
        THD*                            thd     /*!< in: thread handle */
-                                       __attribute__((unused)),
+                                       MY_ATTRIBUTE((unused)),
        struct st_mysql_sys_var*        var     /*!< in: pointer to system
                                                variable */
-                                       __attribute__((unused)),
+                                       MY_ATTRIBUTE((unused)),
        void*                           var_ptr /*!< out: where the formal
                                                string goes */
-                                       __attribute__((unused)),
+                                       MY_ATTRIBUTE((unused)),
        const void*                     save)   /*!< in: immediate result from
                                                check function */
 {
@@ -16930,13 +16988,13 @@ void
 buffer_pool_load_abort(
 /*===================*/
        THD*                            thd     /*!< in: thread handle */
-                                       __attribute__((unused)),
+                                       MY_ATTRIBUTE((unused)),
        struct st_mysql_sys_var*        var     /*!< in: pointer to system
                                                variable */
-                                       __attribute__((unused)),
+                                       MY_ATTRIBUTE((unused)),
        void*                           var_ptr /*!< out: where the formal
                                                string goes */
-                                       __attribute__((unused)),
+                                       MY_ATTRIBUTE((unused)),
        const void*                     save)   /*!< in: immediate result from
                                                check function */
 {
@@ -16954,10 +17012,10 @@ which control InnoDB "status monitor" output to the error log.
 static
 void
 innodb_status_output_update(
-       THD*                            thd __attribute__((unused)),
-       struct st_mysql_sys_var*        var __attribute__((unused)),
-       void*                           var_ptr __attribute__((unused)),
-       const void*                     save __attribute__((unused)))
+       THD*                            thd MY_ATTRIBUTE((unused)),
+       struct st_mysql_sys_var*        var MY_ATTRIBUTE((unused)),
+       void*                           var_ptr MY_ATTRIBUTE((unused)),
+       const void*                     save MY_ATTRIBUTE((unused)))
 {
        *static_cast<my_bool*>(var_ptr) = *static_cast<const my_bool*>(save);
        /* The lock timeout monitor thread also takes care of this
@@ -17313,6 +17371,12 @@ static MYSQL_SYSVAR_BOOL(doublewrite, innobase_use_doublewrite,
   "Disable with --skip-innodb-doublewrite.",
   NULL, NULL, TRUE);
 
+static MYSQL_SYSVAR_BOOL(stats_include_delete_marked,
+  srv_stats_include_delete_marked,
+  PLUGIN_VAR_OPCMDARG,
+  "Scan delete marked records for persistent stat",
+  NULL, NULL, FALSE);
+
 static MYSQL_SYSVAR_ULONG(io_capacity, srv_io_capacity,
   PLUGIN_VAR_RQCMDARG,
   "Number of IOPs the server can do. Tunes the background IO rate",
@@ -17691,7 +17755,7 @@ static MYSQL_SYSVAR_BOOL(disable_sort_file_cache, srv_disable_sort_file_cache,
   "Whether to disable OS system file cache for sort I/O",
   NULL, NULL, FALSE);
 
-static MYSQL_SYSVAR_STR(ft_aux_table, fts_internal_tbl_name,
+static MYSQL_SYSVAR_STR(ft_aux_table, fts_internal_tbl_name2,
   PLUGIN_VAR_NOCMDARG,
   "FTS internal auxiliary table to be checked",
   innodb_internal_table_validate,
@@ -18148,6 +18212,7 @@ static struct st_mysql_sys_var* innobase_system_variables[]= {
   MYSQL_SYSVAR(data_file_path),
   MYSQL_SYSVAR(data_home_dir),
   MYSQL_SYSVAR(doublewrite),
+  MYSQL_SYSVAR(stats_include_delete_marked),
   MYSQL_SYSVAR(api_enable_binlog),
   MYSQL_SYSVAR(api_enable_mdl),
   MYSQL_SYSVAR(api_disable_rowlock),
index 45b8fd384e08d1b88f5c2cfcc5c0a17c1517f30a..898d47a533074f70af65cbfd30e7bab581dd7f49 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 2000, 2012, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2000, 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
@@ -434,14 +434,14 @@ enum durability_properties thd_get_durability_property(const MYSQL_THD thd);
 @param off     auto_increment_offset
 @param inc     auto_increment_increment */
 void thd_get_autoinc(const MYSQL_THD thd, ulong* off, ulong* inc)
-__attribute__((nonnull));
+MY_ATTRIBUTE((nonnull));
 
 /** Is strict sql_mode set.
 @param thd     Thread object
 @return True if sql_mode has strict mode (all or trans), false otherwise.
 */
 bool thd_is_strict_mode(const MYSQL_THD thd)
-__attribute__((nonnull));
+MY_ATTRIBUTE((nonnull));
 } /* extern "C" */
 
 #ifdef WITH_WSREP
@@ -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);
@@ -511,7 +511,7 @@ innobase_index_name_is_reserved(
        const KEY*      key_info,       /*!< in: Indexes to be created */
        ulint           num_of_keys)    /*!< in: Number of indexes to
                                        be created. */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 
 /*****************************************************************//**
 Determines InnoDB table flags.
@@ -528,7 +528,7 @@ innobase_table_flags(
                                                outside system tablespace */
        ulint*                  flags,          /*!< out: DICT_TF flags */
        ulint*                  flags2)         /*!< out: DICT_TF2 flags */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 
 /*****************************************************************//**
 Validates the create options. We may build on this function
@@ -545,7 +545,7 @@ create_options_are_invalid(
                                        columns and indexes */
        HA_CREATE_INFO* create_info,    /*!< in: create info. */
        bool            use_tablespace) /*!< in: srv_file_per_table */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 
 /*********************************************************************//**
 Retrieve the FTS Relevance Ranking result for doc with doc_id
@@ -575,7 +575,7 @@ void
 innobase_fts_close_ranking(
 /*=======================*/
        FT_INFO*        fts_hdl)        /*!< in: FTS handler */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /*****************************************************************//**
 Initialize the table FTS stopword list
 @return TRUE if success */
@@ -586,7 +586,7 @@ innobase_fts_load_stopword(
        dict_table_t*   table,          /*!< in: Table has the FTS */
        trx_t*          trx,            /*!< in: transaction */
        THD*            thd)            /*!< in: current thread */
-       __attribute__((nonnull(1,3), warn_unused_result));
+       MY_ATTRIBUTE((nonnull(1,3), warn_unused_result));
 
 /** Some defines for innobase_fts_check_doc_id_index() return value */
 enum fts_doc_id_index_enum {
@@ -608,7 +608,7 @@ innobase_fts_check_doc_id_index(
                                                that is being altered */
        ulint*                  fts_doc_col_no) /*!< out: The column number for
                                                Doc ID */
-       __attribute__((warn_unused_result));
+       MY_ATTRIBUTE((warn_unused_result));
 
 /*******************************************************************//**
 Check whether the table has a unique index with FTS_DOC_ID_INDEX_NAME
@@ -621,7 +621,7 @@ innobase_fts_check_doc_id_index_in_def(
 /*===================================*/
        ulint           n_key,          /*!< in: Number of keys */
        const KEY*      key_info)       /*!< in: Key definitions */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 
 /***********************************************************************
 @return version of the extended FTS API */
index 6a8aa9e723cc7a2ce665e3c2a9f8578befa6bda1..836c30d4365c3392744581384d77fb552f5d6a59 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 2005, 2015, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2005, 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
@@ -102,7 +102,7 @@ static const Alter_inplace_info::HA_ALTER_FLAGS INNOBASE_ALTER_NOREBUILD
        | Alter_inplace_info::ALTER_COLUMN_NAME;
 
 /* Report an InnoDB error to the client by invoking my_error(). */
-static UNIV_COLD __attribute__((nonnull))
+static UNIV_COLD MY_ATTRIBUTE((nonnull))
 void
 my_error_innodb(
 /*============*/
@@ -199,13 +199,16 @@ innobase_fulltext_exist(
 Determine if ALTER TABLE needs to rebuild the table.
 @param ha_alter_info           the DDL operation
 @return whether it is necessary to rebuild the table */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 bool
 innobase_need_rebuild(
 /*==================*/
        const Alter_inplace_info*       ha_alter_info)
 {
-       if (ha_alter_info->handler_flags
+       Alter_inplace_info::HA_ALTER_FLAGS alter_inplace_flags =
+               ha_alter_info->handler_flags & ~(INNOBASE_INPLACE_IGNORE);
+
+       if (alter_inplace_flags
            == Alter_inplace_info::CHANGE_CREATE_OPTION
            && !(ha_alter_info->create_info->used_fields
                 & (HA_CREATE_USED_ROW_FORMAT
@@ -519,7 +522,7 @@ ha_innobase::check_if_supported_inplace_alter(
 /*************************************************************//**
 Initialize the dict_foreign_t structure with supplied info
 @return true if added, false if duplicate foreign->id */
-static __attribute__((nonnull(1,3,5,7)))
+static MY_ATTRIBUTE((nonnull(1,3,5,7)))
 bool
 innobase_init_foreign(
 /*==================*/
@@ -608,7 +611,7 @@ innobase_init_foreign(
 /*************************************************************//**
 Check whether the foreign key options is legit
 @return true if it is */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 bool
 innobase_check_fk_option(
 /*=====================*/
@@ -640,7 +643,7 @@ innobase_check_fk_option(
 /*************************************************************//**
 Set foreign key options
 @return true if successfully set */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 bool
 innobase_set_foreign_key_option(
 /*============================*/
@@ -685,7 +688,7 @@ innobase_set_foreign_key_option(
 Check if a foreign key constraint can make use of an index
 that is being created.
 @return        useable index, or NULL if none found */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 const KEY*
 innobase_find_equiv_index(
 /*======================*/
@@ -741,7 +744,7 @@ no_match:
 Find an index whose first fields are the columns in the array
 in the same order and is not marked for deletion
 @return matching index, NULL if not found */
-static __attribute__((nonnull(1,2,6), warn_unused_result))
+static MY_ATTRIBUTE((nonnull(1,2,6), warn_unused_result))
 dict_index_t*
 innobase_find_fk_index(
 /*===================*/
@@ -788,7 +791,7 @@ next_rec:
 Create InnoDB foreign key structure from MySQL alter_info
 @retval true if successful
 @retval false on error (will call my_error()) */
-static __attribute__((nonnull(1,2,3,7,8), warn_unused_result))
+static MY_ATTRIBUTE((nonnull(1,2,3,7,8), warn_unused_result))
 bool
 innobase_get_foreign_key_info(
 /*==========================*/
@@ -1273,7 +1276,7 @@ innobase_rec_reset(
 /*******************************************************************//**
 This function checks that index keys are sensible.
 @return        0 or error number */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 int
 innobase_check_index_keys(
 /*======================*/
@@ -1394,7 +1397,7 @@ name_ok:
 
 /*******************************************************************//**
 Create index field definition for key part */
-static __attribute__((nonnull(2,3)))
+static MY_ATTRIBUTE((nonnull(2,3)))
 void
 innobase_create_index_field_def(
 /*============================*/
@@ -1441,7 +1444,7 @@ innobase_create_index_field_def(
 
 /*******************************************************************//**
 Create index definition for key */
-static __attribute__((nonnull))
+static MY_ATTRIBUTE((nonnull))
 void
 innobase_create_index_def(
 /*======================*/
@@ -1710,6 +1713,7 @@ innobase_fts_check_doc_id_index_in_def(
 
        return(FTS_NOT_EXIST_DOC_ID_INDEX);
 }
+
 /*******************************************************************//**
 Create an index table where indexes are ordered as follows:
 
@@ -1725,7 +1729,7 @@ ELSE
 ENDIF
 
 @return        key definitions */
-static __attribute__((nonnull, warn_unused_result, malloc))
+static MY_ATTRIBUTE((nonnull, warn_unused_result, malloc))
 index_def_t*
 innobase_create_key_defs(
 /*=====================*/
@@ -1776,26 +1780,11 @@ innobase_create_key_defs(
        (only prefix/part of the column is indexed), MySQL will treat the
        index as a PRIMARY KEY unless the table already has one. */
 
-       if (n_add > 0 && !new_primary && got_default_clust
-           && (key_info[*add].flags & HA_NOSAME)
-           && !(key_info[*add].flags & HA_KEY_HAS_PART_KEY_SEG)) {
-               uint    key_part = key_info[*add].user_defined_key_parts;
-
-               new_primary = true;
-
-               while (key_part--) {
-                       const uint      maybe_null
-                               = key_info[*add].key_part[key_part].key_type
-                               & FIELDFLAG_MAYBE_NULL;
-                       DBUG_ASSERT(!maybe_null
-                                   == !key_info[*add].key_part[key_part].
-                                   field->real_maybe_null());
+       ut_ad(altered_table->s->primary_key == 0
+             || altered_table->s->primary_key == MAX_KEY);
 
-                       if (maybe_null) {
-                               new_primary = false;
-                               break;
-                       }
-               }
+       if (got_default_clust && !new_primary) {
+               new_primary = (altered_table->s->primary_key != MAX_KEY);
        }
 
        const bool rebuild = new_primary || add_fts_doc_id
@@ -1813,8 +1802,14 @@ innobase_create_key_defs(
                ulint   primary_key_number;
 
                if (new_primary) {
-                       DBUG_ASSERT(n_add > 0);
-                       primary_key_number = *add;
+                       if (n_add == 0) {
+                               DBUG_ASSERT(got_default_clust);
+                               DBUG_ASSERT(altered_table->s->primary_key
+                                           == 0);
+                               primary_key_number = 0;
+                       } else {
+                               primary_key_number = *add;
+                       }
                } else if (got_default_clust) {
                        /* Create the GEN_CLUST_INDEX */
                        index_def_t*    index = indexdef++;
@@ -1944,7 +1939,7 @@ created_clustered:
 /*******************************************************************//**
 Check each index column size, make sure they do not exceed the max limit
 @return        true if index column size exceeds limit */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 bool
 innobase_check_column_length(
 /*=========================*/
@@ -2094,7 +2089,7 @@ online_retry_drop_indexes_low(
 /********************************************************************//**
 Drop any indexes that we were not able to free previously due to
 open table handles. */
-static __attribute__((nonnull))
+static MY_ATTRIBUTE((nonnull))
 void
 online_retry_drop_indexes(
 /*======================*/
@@ -2124,7 +2119,7 @@ online_retry_drop_indexes(
 /********************************************************************//**
 Commit a dictionary transaction and drop any indexes that we were not
 able to free previously due to open table handles. */
-static __attribute__((nonnull))
+static MY_ATTRIBUTE((nonnull))
 void
 online_retry_drop_indexes_with_trx(
 /*===============================*/
@@ -2153,7 +2148,7 @@ online_retry_drop_indexes_with_trx(
 @param drop_fk         constraints being dropped
 @param n_drop_fk       number of constraints that are being dropped
 @return whether the constraint is being dropped */
-inline __attribute__((pure, nonnull, warn_unused_result))
+inline MY_ATTRIBUTE((pure, nonnull, warn_unused_result))
 bool
 innobase_dropping_foreign(
 /*======================*/
@@ -2180,7 +2175,7 @@ column that is being dropped or modified to NOT NULL.
 @retval true           Not allowed (will call my_error())
 @retval false          Allowed
 */
-static __attribute__((pure, nonnull, warn_unused_result))
+static MY_ATTRIBUTE((pure, nonnull, warn_unused_result))
 bool
 innobase_check_foreigns_low(
 /*========================*/
@@ -2280,7 +2275,7 @@ column that is being dropped or modified to NOT NULL.
 @retval true           Not allowed (will call my_error())
 @retval false          Allowed
 */
-static __attribute__((pure, nonnull, warn_unused_result))
+static MY_ATTRIBUTE((pure, nonnull, warn_unused_result))
 bool
 innobase_check_foreigns(
 /*====================*/
@@ -2325,7 +2320,7 @@ innobase_check_foreigns(
 @param dfield  InnoDB data field to copy to
 @param field   MySQL value for the column
 @param comp    nonzero if in compact format */
-static __attribute__((nonnull))
+static MY_ATTRIBUTE((nonnull))
 void
 innobase_build_col_map_add(
 /*=======================*/
@@ -2359,7 +2354,7 @@ adding columns.
 @param heap            Memory heap where allocated
 @return        array of integers, mapping column numbers in the table
 to column numbers in altered_table */
-static __attribute__((nonnull(1,2,3,4,5,7), warn_unused_result))
+static MY_ATTRIBUTE((nonnull(1,2,3,4,5,7), warn_unused_result))
 const ulint*
 innobase_build_col_map(
 /*===================*/
@@ -2496,7 +2491,7 @@ innobase_drop_fts_index_table(
 @param user_table      InnoDB table as it is before the ALTER operation
 @param heap            Memory heap for the allocation
 @return array of new column names in rebuilt_table, or NULL if not renamed */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 const char**
 innobase_get_col_names(
        Alter_inplace_info*     ha_alter_info,
@@ -2559,7 +2554,7 @@ while preparing ALTER TABLE.
 @retval true           Failure
 @retval false          Success
 */
-static __attribute__((warn_unused_result, nonnull(1,2,3,4)))
+static MY_ATTRIBUTE((warn_unused_result, nonnull(1,2,3,4)))
 bool
 prepare_inplace_alter_table_dict(
 /*=============================*/
@@ -2901,6 +2896,8 @@ prepare_inplace_alter_table_dict(
                ctx->add_cols = add_cols;
        } else {
                DBUG_ASSERT(!innobase_need_rebuild(ha_alter_info));
+               DBUG_ASSERT(old_table->s->primary_key
+                           == altered_table->s->primary_key);
 
                if (!ctx->new_table->fts
                    && innobase_fulltext_exist(altered_table)) {
@@ -3197,7 +3194,7 @@ err_exit:
 /* Check whether an index is needed for the foreign key constraint.
 If so, if it is dropped, is there an equivalent index can play its role.
 @return true if the index is needed and can't be dropped */
-static __attribute__((nonnull(1,2,3,5), warn_unused_result))
+static MY_ATTRIBUTE((nonnull(1,2,3,5), warn_unused_result))
 bool
 innobase_check_foreign_key_index(
 /*=============================*/
@@ -3764,7 +3761,7 @@ err_exit:
        }
 
        if (!(ha_alter_info->handler_flags & INNOBASE_ALTER_DATA)
-           || (ha_alter_info->handler_flags
+           || ((ha_alter_info->handler_flags & ~INNOBASE_INPLACE_IGNORE)
                == Alter_inplace_info::CHANGE_CREATE_OPTION
                && !innobase_need_rebuild(ha_alter_info))) {
 
@@ -3893,6 +3890,27 @@ found_col:
                            add_fts_doc_id_idx));
 }
 
+/** Get the name of an erroneous key.
+@param[in]     error_key_num   InnoDB number of the erroneus key
+@param[in]     ha_alter_info   changes that were being performed
+@param[in]     table           InnoDB table
+@return        the name of the erroneous key */
+static
+const char*
+get_error_key_name(
+       ulint                           error_key_num,
+       const Alter_inplace_info*       ha_alter_info,
+       const dict_table_t*             table)
+{
+       if (error_key_num == ULINT_UNDEFINED) {
+               return(FTS_DOC_ID_INDEX_NAME);
+       } else if (ha_alter_info->key_count == 0) {
+               return(dict_table_get_first_index(table)->name);
+       } else {
+               return(ha_alter_info->key_info_buffer[error_key_num].name);
+       }
+}
+
 /** Alter the table structure in-place with operations
 specified using Alter_inplace_info.
 The level of concurrency allowed during this operation depends
@@ -3930,7 +3948,7 @@ ok_exit:
                DBUG_RETURN(false);
        }
 
-       if (ha_alter_info->handler_flags
+       if ((ha_alter_info->handler_flags & ~INNOBASE_INPLACE_IGNORE)
            == Alter_inplace_info::CHANGE_CREATE_OPTION
            && !innobase_need_rebuild(ha_alter_info)) {
                goto ok_exit;
@@ -4010,17 +4028,13 @@ oom:
        case DB_ONLINE_LOG_TOO_BIG:
                DBUG_ASSERT(ctx->online);
                my_error(ER_INNODB_ONLINE_LOG_TOO_BIG, MYF(0),
-                        (prebuilt->trx->error_key_num == ULINT_UNDEFINED)
-                        ? FTS_DOC_ID_INDEX_NAME
-                        : ha_alter_info->key_info_buffer[
-                                prebuilt->trx->error_key_num].name);
+                        get_error_key_name(prebuilt->trx->error_key_num,
+                                           ha_alter_info, prebuilt->table));
                break;
        case DB_INDEX_CORRUPT:
                my_error(ER_INDEX_CORRUPT, MYF(0),
-                        (prebuilt->trx->error_key_num == ULINT_UNDEFINED)
-                        ? FTS_DOC_ID_INDEX_NAME
-                        : ha_alter_info->key_info_buffer[
-                                prebuilt->trx->error_key_num].name);
+                        get_error_key_name(prebuilt->trx->error_key_num,
+                                           ha_alter_info, prebuilt->table));
                break;
        default:
                my_error_innodb(error,
@@ -4073,7 +4087,7 @@ temparary index prefix
 @param locked          TRUE=table locked, FALSE=may need to do a lazy drop
 @param trx             the transaction
 */
-static __attribute__((nonnull))
+static MY_ATTRIBUTE((nonnull))
 void
 innobase_rollback_sec_index(
 /*========================*/
@@ -4107,7 +4121,7 @@ during prepare, but might not be during commit).
 @retval true           Failure
 @retval false          Success
 */
-inline __attribute__((nonnull, warn_unused_result))
+inline MY_ATTRIBUTE((nonnull, warn_unused_result))
 bool
 rollback_inplace_alter_table(
 /*=========================*/
@@ -4239,7 +4253,7 @@ func_exit:
 @param foreign_id      Foreign key constraint identifier
 @retval true           Failure
 @retval false          Success */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 bool
 innobase_drop_foreign_try(
 /*======================*/
@@ -4296,7 +4310,7 @@ innobase_drop_foreign_try(
 @param new_clustered   whether the table has been rebuilt
 @retval true           Failure
 @retval false          Success */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 bool
 innobase_rename_column_try(
 /*=======================*/
@@ -4505,7 +4519,7 @@ rename_foreign:
 @param table_name      Table name in MySQL
 @retval true           Failure
 @retval false          Success */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 bool
 innobase_rename_columns_try(
 /*========================*/
@@ -4555,7 +4569,7 @@ as part of commit_cache_norebuild().
 @param ha_alter_info   Data used during in-place alter.
 @param table           the TABLE
 @param user_table      InnoDB table that was being altered */
-static __attribute__((nonnull))
+static MY_ATTRIBUTE((nonnull))
 void
 innobase_rename_columns_cache(
 /*==========================*/
@@ -4599,7 +4613,7 @@ processed_field:
 @param altered_table   MySQL table that is being altered
 @param old_table       MySQL table as it is before the ALTER operation
 @return the next auto-increment value (0 if not present) */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 ulonglong
 commit_get_autoinc(
 /*===============*/
@@ -4681,7 +4695,7 @@ but do not touch the data dictionary cache.
 @retval true           Failure
 @retval false          Success
 */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 bool
 innobase_update_foreign_try(
 /*========================*/
@@ -4764,7 +4778,7 @@ after the changes to data dictionary tables were committed.
 @param ctx     In-place ALTER TABLE context
 @param user_thd        MySQL connection
 @return                InnoDB error code (should always be DB_SUCCESS) */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 innobase_update_foreign_cache(
 /*==========================*/
@@ -4830,7 +4844,6 @@ innobase_update_foreign_cache(
                                "Foreign key constraints for table '%s'"
                                " are loaded with charset check off",
                                user_table->name);
-                               
                }
        }
 
@@ -4849,7 +4862,7 @@ when rebuilding the table.
 @retval true           Failure
 @retval false          Success
 */
-inline __attribute__((nonnull, warn_unused_result))
+inline MY_ATTRIBUTE((nonnull, warn_unused_result))
 bool
 commit_try_rebuild(
 /*===============*/
@@ -4930,14 +4943,13 @@ commit_try_rebuild(
                        DBUG_RETURN(true);
                case DB_ONLINE_LOG_TOO_BIG:
                        my_error(ER_INNODB_ONLINE_LOG_TOO_BIG, MYF(0),
-                                ha_alter_info->key_info_buffer[0].name);
+                                get_error_key_name(err_key, ha_alter_info,
+                                                   rebuilt_table));
                        DBUG_RETURN(true);
                case DB_INDEX_CORRUPT:
                        my_error(ER_INDEX_CORRUPT, MYF(0),
-                                (err_key == ULINT_UNDEFINED)
-                                ? FTS_DOC_ID_INDEX_NAME
-                                : ha_alter_info->key_info_buffer[err_key]
-                                .name);
+                                get_error_key_name(err_key, ha_alter_info,
+                                                   rebuilt_table));
                        DBUG_RETURN(true);
                default:
                        my_error_innodb(error, table_name, user_table->flags);
@@ -5011,7 +5023,7 @@ commit_try_rebuild(
 /** Apply the changes made during commit_try_rebuild(),
 to the data dictionary cache and the file system.
 @param ctx     In-place ALTER TABLE context */
-inline __attribute__((nonnull))
+inline MY_ATTRIBUTE((nonnull))
 void
 commit_cache_rebuild(
 /*=================*/
@@ -5106,7 +5118,7 @@ when not rebuilding the table.
 @retval true           Failure
 @retval false          Success
 */
-inline __attribute__((nonnull, warn_unused_result))
+inline MY_ATTRIBUTE((nonnull, warn_unused_result))
 bool
 commit_try_norebuild(
 /*=================*/
@@ -5216,7 +5228,7 @@ after a successful commit_try_norebuild() call.
 @param trx             Data dictionary transaction object
 (will be started and committed)
 @return whether all replacements were found for dropped indexes */
-inline __attribute__((nonnull, warn_unused_result))
+inline MY_ATTRIBUTE((nonnull, warn_unused_result))
 bool
 commit_cache_norebuild(
 /*===================*/
index 192003a19d2d877d7659df153af2c4cde1ca3c17..a780ee5cd6243f141a29c910c9836bf8847333ad 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 2007, 2015, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2007, 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
@@ -3004,15 +3004,26 @@ i_s_fts_deleted_generic_fill(
                DBUG_RETURN(0);
        }
 
-       deleted = fts_doc_ids_create();
+       /* Prevent DDL to drop fts aux tables. */
+       rw_lock_s_lock(&dict_operation_lock);
 
        user_table = dict_table_open_on_name(
                fts_internal_tbl_name, FALSE, FALSE, DICT_ERR_IGNORE_NONE);
 
        if (!user_table) {
+               rw_lock_s_unlock(&dict_operation_lock);
+
+               DBUG_RETURN(0);
+       } else if (!dict_table_has_fts_index(user_table)) {
+               dict_table_close(user_table, FALSE, FALSE);
+
+               rw_lock_s_unlock(&dict_operation_lock);
+
                DBUG_RETURN(0);
        }
 
+       deleted = fts_doc_ids_create();
+
        trx = trx_allocate_for_background();
        trx->op_info = "Select for FTS DELETE TABLE";
 
@@ -3040,6 +3051,8 @@ i_s_fts_deleted_generic_fill(
 
        dict_table_close(user_table, FALSE, FALSE);
 
+       rw_lock_s_unlock(&dict_operation_lock);
+
        DBUG_RETURN(0);
 }
 
@@ -3421,6 +3434,12 @@ i_s_fts_index_cache_fill(
                DBUG_RETURN(0);
        }
 
+       if (user_table->fts == NULL || user_table->fts->cache == NULL) {
+               dict_table_close(user_table, FALSE, FALSE);
+
+               DBUG_RETURN(0);
+       }
+
        cache = user_table->fts->cache;
 
        ut_a(cache);
@@ -3859,10 +3878,15 @@ i_s_fts_index_table_fill(
                DBUG_RETURN(0);
        }
 
+       /* Prevent DDL to drop fts aux tables. */
+       rw_lock_s_lock(&dict_operation_lock);
+
        user_table = dict_table_open_on_name(
                fts_internal_tbl_name, FALSE, FALSE, DICT_ERR_IGNORE_NONE);
 
        if (!user_table) {
+               rw_lock_s_unlock(&dict_operation_lock);
+
                DBUG_RETURN(0);
        }
 
@@ -3875,6 +3899,8 @@ i_s_fts_index_table_fill(
 
        dict_table_close(user_table, FALSE, FALSE);
 
+       rw_lock_s_unlock(&dict_operation_lock);
+
        DBUG_RETURN(0);
 }
 
@@ -4012,16 +4038,25 @@ i_s_fts_config_fill(
                DBUG_RETURN(0);
        }
 
+       DEBUG_SYNC_C("i_s_fts_config_fille_check");
+
        fields = table->field;
 
+       /* Prevent DDL to drop fts aux tables. */
+       rw_lock_s_lock(&dict_operation_lock);
+
        user_table = dict_table_open_on_name(
                fts_internal_tbl_name, FALSE, FALSE, DICT_ERR_IGNORE_NONE);
 
        if (!user_table) {
+               rw_lock_s_unlock(&dict_operation_lock);
+
                DBUG_RETURN(0);
        } else if (!dict_table_has_fts_index(user_table)) {
                dict_table_close(user_table, FALSE, FALSE);
 
+               rw_lock_s_unlock(&dict_operation_lock);
+
                DBUG_RETURN(0);
        }
 
@@ -4077,6 +4112,8 @@ i_s_fts_config_fill(
 
        dict_table_close(user_table, FALSE, FALSE);
 
+       rw_lock_s_unlock(&dict_operation_lock);
+
        DBUG_RETURN(0);
 }
 
index caf1f1a864b802daa1b2d884e9b9406007f9bbbc..945611e62237e8021e04eab7f98f6722412f36aa 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1997, 2014, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1997, 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
@@ -657,7 +657,7 @@ byte*
 ibuf_parse_bitmap_init(
 /*===================*/
        byte*           ptr,    /*!< in: buffer */
-       byte*           end_ptr __attribute__((unused)), /*!< in: buffer end */
+       byte*           end_ptr MY_ATTRIBUTE((unused)), /*!< in: buffer end */
        buf_block_t*    block,  /*!< in: block or NULL */
        mtr_t*          mtr)    /*!< in: mtr or NULL */
 {
@@ -2494,7 +2494,7 @@ ibuf_get_merge_page_nos_func(
 /*******************************************************************//**
 Get the matching records for space id.
 @return        current rec or NULL */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 const rec_t*
 ibuf_get_user_rec(
 /*===============*/
@@ -2516,7 +2516,7 @@ ibuf_get_user_rec(
 Reads page numbers for a space id from an ibuf tree.
 @return a lower limit for the combined volume of records which will be
 merged */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 ulint
 ibuf_get_merge_pages(
 /*=================*/
@@ -2624,40 +2624,22 @@ ibuf_merge_pages(
 }
 
 /*********************************************************************//**
-Get the table instance from the table id.
-@return table instance */
-static __attribute__((warn_unused_result))
-dict_table_t*
-ibuf_get_table(
-/*===========*/
-       table_id_t      table_id)       /*!< in: valid table id */
-{
-       rw_lock_s_lock_func(&dict_operation_lock, 0, __FILE__, __LINE__);
-
-       dict_table_t*   table = dict_table_open_on_id(
-               table_id, FALSE, DICT_TABLE_OP_NORMAL);
-
-       rw_lock_s_unlock_gen(&dict_operation_lock, 0);
-
-       return(table);
-}
-
-/*********************************************************************//**
-Contracts insert buffer trees by reading pages to the buffer pool.
-@return a lower limit for the combined size in bytes of entries which
-will be merged from ibuf trees to the pages read, 0 if ibuf is
-empty */
-static
+Contracts insert buffer trees by reading pages referring to space_id
+to the buffer pool.
+@returns number of pages merged.*/
+UNIV_INTERN
 ulint
 ibuf_merge_space(
 /*=============*/
-       ulint           space,  /*!< in: tablespace id to merge */
-       ulint*          n_pages)/*!< out: number of pages to which merged */
+       ulint           space)  /*!< in: tablespace id to merge */
 {
        mtr_t           mtr;
        btr_pcur_t      pcur;
        mem_heap_t*     heap = mem_heap_create(512);
        dtuple_t*       tuple = ibuf_search_tuple_build(space, 0, heap);
+       ulint           n_pages = 0;
+
+       ut_ad(space < SRV_LOG_SPACE_FIRST_ID);
 
        ibuf_mtr_start(&mtr);
 
@@ -2689,50 +2671,47 @@ ibuf_merge_space(
        } else {
 
                sum_sizes = ibuf_get_merge_pages(
-                       &pcur, space, IBUF_MAX_N_PAGES_MERGED,
-                       &pages[0], &spaces[0], &versions[0], n_pages,
-                       &mtr);
+                               &pcur, space, IBUF_MAX_N_PAGES_MERGED,
+                               &pages[0], &spaces[0], &versions[0], &n_pages,
+                               &mtr);
+               ib_logf(IB_LOG_LEVEL_INFO,"\n Size of pages merged %lu"
+                        ,sum_sizes);
 
-               ++sum_sizes;
        }
 
        ibuf_mtr_commit(&mtr);
 
        btr_pcur_close(&pcur);
 
-       if (sum_sizes > 0) {
-
-               ut_a(*n_pages > 0 || sum_sizes == 1);
+       if (n_pages > 0) {
 
 #ifdef UNIV_DEBUG
-               ut_ad(*n_pages <= UT_ARR_SIZE(pages));
+               ut_ad(n_pages <= UT_ARR_SIZE(pages));
 
-               for (ulint i = 0; i < *n_pages; ++i) {
+               for (ulint i = 0; i < n_pages; ++i) {
                        ut_ad(spaces[i] == space);
                        ut_ad(i == 0 || versions[i] == versions[i - 1]);
                }
 #endif /* UNIV_DEBUG */
 
                buf_read_ibuf_merge_pages(
-                       true, spaces, versions, pages, *n_pages);
+                       true, spaces, versions, pages, n_pages);
        }
 
-       return(sum_sizes);
+       return(n_pages);
 }
 
-/*********************************************************************//**
-Contracts insert buffer trees by reading pages to the buffer pool.
+/** Contract the change buffer by reading pages to the buffer pool.
+@param[out]    n_pages         number of pages merged
+@param[in]     sync            whether the caller waits for
+the issued reads to complete
 @return a lower limit for the combined size in bytes of entries which
 will be merged from ibuf trees to the pages read, 0 if ibuf is
 empty */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 ulint
 ibuf_merge(
 /*=======*/
-       table_id_t      table_id,       /*!< in: if merge should be
-                                       done only for a specific
-                                       table, for all tables this
-                                       should be 0 */
        ulint*          n_pages,        /*!< out: number of pages to
                                        which merged */
        bool            sync)           /*!< in: TRUE if the caller
@@ -2740,8 +2719,6 @@ ibuf_merge(
                                        read with the highest
                                        tablespace address to complete */
 {
-       dict_table_t*   table;
-
        *n_pages = 0;
 
        /* We perform a dirty read of ibuf->empty, without latching
@@ -2755,55 +2732,45 @@ ibuf_merge(
        } else if (ibuf_debug) {
                return(0);
 #endif /* UNIV_DEBUG || UNIV_IBUF_DEBUG */
-       } else if (table_id == 0) {
+       } else {
                return(ibuf_merge_pages(n_pages, sync));
-       } else if ((table = ibuf_get_table(table_id)) == 0) {
-               /* Table has been dropped. */
-               return(0);
        }
-
-       ulint   volume = ibuf_merge_space(table->space, n_pages);
-
-       dict_table_close(table, FALSE, FALSE);
-
-       return(volume);
 }
 
-/*********************************************************************//**
-Contracts insert buffer trees by reading pages to the buffer pool.
+/** Contract the change buffer by reading pages to the buffer pool.
+@param[in]     sync    whether the caller waits for
+the issued reads to complete
 @return a lower limit for the combined size in bytes of entries which
-will be merged from ibuf trees to the pages read, 0 if ibuf is
-empty */
+will be merged from ibuf trees to the pages read, 0 if ibuf is empty */
 static
 ulint
 ibuf_contract(
 /*==========*/
-       ibool   sync)   /*!< in: TRUE if the caller wants to wait for the
+       bool    sync)   /*!< in: TRUE if the caller wants to wait for the
                        issued read with the highest tablespace address
                        to complete */
 {
        ulint   n_pages;
 
-       return(ibuf_merge(0, &n_pages, sync));
+       return(ibuf_merge_pages(&n_pages, sync));
 }
 
-/*********************************************************************//**
-Contracts insert buffer trees by reading pages to the buffer pool.
+/** Contract the change buffer by reading pages to the buffer pool.
+@param[in]     full            If true, do a full contraction based
+on PCT_IO(100). If false, the size of contract batch is determined
+based on the current size of the change buffer.
 @return a lower limit for the combined size in bytes of entries which
 will be merged from ibuf trees to the pages read, 0 if ibuf is
 empty */
 UNIV_INTERN
 ulint
-ibuf_contract_in_background(
-/*========================*/
-       table_id_t      table_id,       /*!< in: if merge should be done only
-                                       for a specific table, for all tables
-                                       this should be 0 */
-       ibool           full)           /*!< in: TRUE if the caller wants to
-                                       do a full contract based on PCT_IO(100).
-                                       If FALSE then the size of contract
-                                       batch is determined based on the
-                                       current size of the ibuf tree. */
+ibuf_merge_in_background(
+/*=====================*/
+       bool    full)   /*!< in: TRUE if the caller wants to
+                       do a full contract based on PCT_IO(100).
+                       If FALSE then the size of contract
+                       batch is determined based on the
+                       current size of the ibuf tree. */
 {
        ulint   sum_bytes       = 0;
        ulint   sum_pages       = 0;
@@ -2811,7 +2778,7 @@ ibuf_contract_in_background(
        ulint   n_pages;
 
 #if defined UNIV_DEBUG || defined UNIV_IBUF_DEBUG
-       if (srv_ibuf_disable_background_merge && table_id == 0) {
+       if (srv_ibuf_disable_background_merge) {
                return(0);
        }
 #endif /* UNIV_DEBUG || UNIV_IBUF_DEBUG */
@@ -2840,7 +2807,7 @@ ibuf_contract_in_background(
        while (sum_pages < n_pages) {
                ulint   n_bytes;
 
-               n_bytes = ibuf_merge(table_id, &n_pag2, FALSE);
+               n_bytes = ibuf_merge(&n_pag2, false);
 
                if (n_bytes == 0) {
                        return(sum_bytes);
@@ -3444,7 +3411,7 @@ ibuf_get_entry_counter_func(
 Buffer an operation in the insert/delete buffer, instead of doing it
 directly to the disk page, if this is possible.
 @return        DB_SUCCESS, DB_STRONG_FAIL or other error */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 ibuf_insert_low(
 /*============*/
@@ -3511,8 +3478,7 @@ ibuf_insert_low(
 #ifdef UNIV_IBUF_DEBUG
                fputs("Ibuf too big\n", stderr);
 #endif
-               /* Use synchronous contract (== TRUE) */
-               ibuf_contract(TRUE);
+               ibuf_contract(true);
 
                return(DB_STRONG_FAIL);
        }
@@ -3935,7 +3901,7 @@ skip_watch:
 During merge, inserts to an index page a secondary index entry extracted
 from the insert buffer.
 @return        newly inserted record */
-static __attribute__((nonnull))
+static MY_ATTRIBUTE((nonnull))
 rec_t*
 ibuf_insert_to_index_page_low(
 /*==========================*/
@@ -4366,7 +4332,7 @@ ibuf_delete(
 /*********************************************************************//**
 Restores insert buffer tree cursor position
 @return        TRUE if the position was restored; FALSE if not */
-static __attribute__((nonnull))
+static MY_ATTRIBUTE((nonnull))
 ibool
 ibuf_restore_pos(
 /*=============*/
@@ -4421,7 +4387,7 @@ Deletes from ibuf the record on which pcur is positioned. If we have to
 resort to a pessimistic delete, this function commits mtr and closes
 the cursor.
 @return        TRUE if mtr was committed and pcur closed in this operation */
-static __attribute__((warn_unused_result))
+static MY_ATTRIBUTE((warn_unused_result))
 ibool
 ibuf_delete_rec(
 /*============*/
index e4c9c941de51a1ba80c6a36873bd2bb682bb6db4..500bf4fe3b22de39056b7ce4068fe3a68ada8b4e 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 2011, 2015, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2011, 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
@@ -36,7 +36,7 @@ InnoDB Native API
 #endif
 
 #if defined(__GNUC__) && (__GNUC__ > 2) && ! defined(__INTEL_COMPILER)
-#define UNIV_NO_IGNORE         __attribute__ ((warn_unused_result))
+#define UNIV_NO_IGNORE         MY_ATTRIBUTE ((warn_unused_result))
 #else
 #define UNIV_NO_IGNORE
 #endif /* __GNUC__ && __GNUC__ > 2 && !__INTEL_COMPILER */
index 305acf7e3220b0ca35b70228dd9d5ea32450abc3..d8a4545c606bff3e624092124bc34288e47943ea 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1994, 2013, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved.
 Copyright (c) 2012, Facebook Inc.
 
 This program is free software; you can redistribute it and/or modify it under
@@ -114,7 +114,7 @@ btr_corruption_report(
 /*==================*/
        const buf_block_t*      block,  /*!< in: corrupted block */
        const dict_index_t*     index)  /*!< in: index tree */
-       UNIV_COLD __attribute__((nonnull));
+       UNIV_COLD MY_ATTRIBUTE((nonnull));
 
 /** Assert that a B-tree page is not corrupted.
 @param block buffer block containing a B-tree page
@@ -156,7 +156,7 @@ btr_blob_dbg_add_blob(
        ulint           page_no,        /*!< in: start page of the column */
        dict_index_t*   index,          /*!< in/out: index tree */
        const char*     ctx)            /*!< in: context (for logging) */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /**************************************************************//**
 Display the references to off-page columns.
 This function is to be called from a debugger,
@@ -166,7 +166,7 @@ void
 btr_blob_dbg_print(
 /*===============*/
        const dict_index_t*     index)  /*!< in: index tree */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /**************************************************************//**
 Check that there are no references to off-page columns from or to
 the given page. Invoked when freeing or clearing a page.
@@ -177,7 +177,7 @@ btr_blob_dbg_is_empty(
 /*==================*/
        dict_index_t*   index,          /*!< in: index */
        ulint           page_no)        /*!< in: page number */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 
 /**************************************************************//**
 Modify the 'deleted' flag of a record. */
@@ -189,7 +189,7 @@ btr_blob_dbg_set_deleted_flag(
        dict_index_t*           index,  /*!< in/out: index */
        const ulint*            offsets,/*!< in: rec_get_offs(rec, index) */
        ibool                   del)    /*!< in: TRUE=deleted, FALSE=exists */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /**************************************************************//**
 Change the ownership of an off-page column. */
 UNIV_INTERN
@@ -201,7 +201,7 @@ btr_blob_dbg_owner(
        const ulint*            offsets,/*!< in: rec_get_offs(rec, index) */
        ulint                   i,      /*!< in: ith field in rec */
        ibool                   own)    /*!< in: TRUE=owned, FALSE=disowned */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /** Assert that there are no BLOB references to or from the given page. */
 # define btr_blob_dbg_assert_empty(index, page_no)     \
        ut_a(btr_blob_dbg_is_empty(index, page_no))
@@ -221,7 +221,7 @@ btr_root_get(
 /*=========*/
        const dict_index_t*     index,  /*!< in: index tree */
        mtr_t*                  mtr)    /*!< in: mtr */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 
 /**************************************************************//**
 Checks and adjusts the root node of a tree during IMPORT TABLESPACE.
@@ -231,7 +231,7 @@ dberr_t
 btr_root_adjust_on_import(
 /*======================*/
        const dict_index_t*     index)  /*!< in: index tree */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 
 /**************************************************************//**
 Gets the height of the B-tree (the level of the root, when the leaf
@@ -244,7 +244,7 @@ btr_height_get(
 /*===========*/
        dict_index_t*   index,  /*!< in: index tree */
        mtr_t*          mtr)    /*!< in/out: mini-transaction */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /**************************************************************//**
 Gets a buffer page and declares its latching order level. */
 UNIV_INLINE
@@ -306,7 +306,7 @@ index_id_t
 btr_page_get_index_id(
 /*==================*/
        const page_t*   page)   /*!< in: index page */
-       __attribute__((nonnull, pure, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
 #ifndef UNIV_HOTBACKUP
 /********************************************************//**
 Gets the node level field in an index page.
@@ -316,7 +316,7 @@ ulint
 btr_page_get_level_low(
 /*===================*/
        const page_t*   page)   /*!< in: index page */
-       __attribute__((nonnull, pure, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
 #define btr_page_get_level(page, mtr) btr_page_get_level_low(page)
 /********************************************************//**
 Gets the next index page number.
@@ -327,7 +327,7 @@ btr_page_get_next(
 /*==============*/
        const page_t*   page,   /*!< in: index page */
        mtr_t*          mtr)    /*!< in: mini-transaction handle */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /********************************************************//**
 Gets the previous index page number.
 @return        prev page number */
@@ -337,7 +337,7 @@ btr_page_get_prev(
 /*==============*/
        const page_t*   page,   /*!< in: index page */
        mtr_t*          mtr)    /*!< in: mini-transaction handle */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /*************************************************************//**
 Gets pointer to the previous user record in the tree. It is assumed
 that the caller has appropriate latches on the page and its neighbor.
@@ -349,7 +349,7 @@ btr_get_prev_user_rec(
        rec_t*  rec,    /*!< in: record on leaf level */
        mtr_t*  mtr)    /*!< in: mtr holding a latch on the page, and if
                        needed, also to the previous page */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /*************************************************************//**
 Gets pointer to the next user record in the tree. It is assumed
 that the caller has appropriate latches on the page and its neighbor.
@@ -361,7 +361,7 @@ btr_get_next_user_rec(
        rec_t*  rec,    /*!< in: record on leaf level */
        mtr_t*  mtr)    /*!< in: mtr holding a latch on the page, and if
                        needed, also to the next page */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /**************************************************************//**
 Releases the latch on a leaf page and bufferunfixes it. */
 UNIV_INLINE
@@ -372,7 +372,7 @@ btr_leaf_page_release(
        ulint           latch_mode,     /*!< in: BTR_SEARCH_LEAF or
                                        BTR_MODIFY_LEAF */
        mtr_t*          mtr)            /*!< in: mtr */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /**************************************************************//**
 Gets the child node file address in a node pointer.
 NOTE: the offsets array must contain all offsets for the record since
@@ -386,7 +386,7 @@ btr_node_ptr_get_child_page_no(
 /*===========================*/
        const rec_t*    rec,    /*!< in: node pointer record */
        const ulint*    offsets)/*!< in: array returned by rec_get_offsets() */
-       __attribute__((nonnull, pure, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
 /************************************************************//**
 Creates the root node for a new index tree.
 @return        page number of the created root, FIL_NULL if did not succeed */
@@ -401,7 +401,7 @@ btr_create(
        index_id_t      index_id,/*!< in: index id */
        dict_index_t*   index,  /*!< in: index */
        mtr_t*          mtr)    /*!< in: mini-transaction handle */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /************************************************************//**
 Frees a B-tree except the root page, which MUST be freed after this
 by calling btr_free_root. */
@@ -424,7 +424,7 @@ btr_free_root(
                                or 0 for uncompressed pages */
        ulint   root_page_no,   /*!< in: root page number */
        mtr_t*  mtr)            /*!< in/out: mini-transaction */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /*************************************************************//**
 Makes tree one level higher by splitting the root, and inserts
 the tuple. It is assumed that mtr contains an x-latch on the tree.
@@ -447,7 +447,7 @@ btr_root_raise_and_insert(
        const dtuple_t* tuple,  /*!< in: tuple to insert */
        ulint           n_ext,  /*!< in: number of externally stored columns */
        mtr_t*          mtr)    /*!< in: mtr */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /*************************************************************//**
 Reorganizes an index page.
 
@@ -473,7 +473,7 @@ btr_page_reorganize_low(
        page_cur_t*     cursor, /*!< in/out: page cursor */
        dict_index_t*   index,  /*!< in: the index tree of the page */
        mtr_t*          mtr)    /*!< in/out: mini-transaction */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /*************************************************************//**
 Reorganizes an index page.
 
@@ -492,7 +492,7 @@ btr_page_reorganize(
        page_cur_t*     cursor, /*!< in/out: page cursor */
        dict_index_t*   index,  /*!< in: the index tree of the page */
        mtr_t*          mtr)    /*!< in/out: mini-transaction */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /*************************************************************//**
 Decides if the page should be split at the convergence point of
 inserts converging to left.
@@ -505,7 +505,7 @@ btr_page_get_split_rec_to_left(
        rec_t**         split_rec)/*!< out: if split recommended,
                                the first record on upper half page,
                                or NULL if tuple should be first */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /*************************************************************//**
 Decides if the page should be split at the convergence point of
 inserts converging to right.
@@ -518,7 +518,7 @@ btr_page_get_split_rec_to_right(
        rec_t**         split_rec)/*!< out: if split recommended,
                                the first record on upper half page,
                                or NULL if tuple should be first */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /*************************************************************//**
 Splits an index page to halves and inserts the tuple. It is assumed
 that mtr holds an x-latch to the index tree. NOTE: the tree x-latch is
@@ -542,7 +542,7 @@ btr_page_split_and_insert(
        const dtuple_t* tuple,  /*!< in: tuple to insert */
        ulint           n_ext,  /*!< in: number of externally stored columns */
        mtr_t*          mtr)    /*!< in: mtr */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /*******************************************************//**
 Inserts a data tuple to a tree on a non-leaf level. It is assumed
 that mtr holds an x-latch on the tree. */
@@ -557,7 +557,7 @@ btr_insert_on_non_leaf_level_func(
        const char*     file,   /*!< in: file name */
        ulint           line,   /*!< in: line where called */
        mtr_t*          mtr)    /*!< in: mtr */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 # define btr_insert_on_non_leaf_level(f,i,l,t,m)                       \
        btr_insert_on_non_leaf_level_func(f,i,l,t,__FILE__,__LINE__,m)
 #endif /* !UNIV_HOTBACKUP */
@@ -569,7 +569,7 @@ btr_set_min_rec_mark(
 /*=================*/
        rec_t*  rec,    /*!< in/out: record */
        mtr_t*  mtr)    /*!< in: mtr */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 #ifndef UNIV_HOTBACKUP
 /*************************************************************//**
 Deletes on the upper level the node pointer to a page. */
@@ -580,7 +580,7 @@ btr_node_ptr_delete(
        dict_index_t*   index,  /*!< in: index tree */
        buf_block_t*    block,  /*!< in: page whose node pointer is deleted */
        mtr_t*          mtr)    /*!< in: mtr */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 #ifdef UNIV_DEBUG
 /************************************************************//**
 Checks that the node pointer to a page is appropriate.
@@ -592,7 +592,7 @@ btr_check_node_ptr(
        dict_index_t*   index,  /*!< in: index tree */
        buf_block_t*    block,  /*!< in: index page */
        mtr_t*          mtr)    /*!< in: mtr */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 #endif /* UNIV_DEBUG */
 /*************************************************************//**
 Tries to merge the page first to the left immediate brother if such a
@@ -615,7 +615,7 @@ btr_compress(
        ibool           adjust, /*!< in: TRUE if should adjust the
                                cursor position even if compression occurs */
        mtr_t*          mtr)    /*!< in/out: mini-transaction */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /*************************************************************//**
 Discards a page from a B-tree. This is used to remove the last record from
 a B-tree page: the whole page must be removed at the same time. This cannot
@@ -627,7 +627,7 @@ btr_discard_page(
        btr_cur_t*      cursor, /*!< in: cursor on the page to discard: not on
                                the root page */
        mtr_t*          mtr)    /*!< in: mtr */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 #endif /* !UNIV_HOTBACKUP */
 /****************************************************************//**
 Parses the redo log record for setting an index record as the predefined
@@ -642,7 +642,7 @@ btr_parse_set_min_rec_mark(
        ulint   comp,   /*!< in: nonzero=compact page format */
        page_t* page,   /*!< in: page or NULL */
        mtr_t*  mtr)    /*!< in: mtr or NULL */
-       __attribute__((nonnull(1,2), warn_unused_result));
+       MY_ATTRIBUTE((nonnull(1,2), warn_unused_result));
 /***********************************************************//**
 Parses a redo log record of reorganizing a page.
 @return        end of log record or NULL */
@@ -656,7 +656,7 @@ btr_parse_page_reorganize(
        bool            compressed,/*!< in: true if compressed page */
        buf_block_t*    block,  /*!< in: page to be reorganized, or NULL */
        mtr_t*          mtr)    /*!< in: mtr or NULL */
-       __attribute__((nonnull(1,2,3), warn_unused_result));
+       MY_ATTRIBUTE((nonnull(1,2,3), warn_unused_result));
 #ifndef UNIV_HOTBACKUP
 /**************************************************************//**
 Gets the number of pages in a B-tree.
@@ -669,7 +669,7 @@ btr_get_size(
        ulint           flag,   /*!< in: BTR_N_LEAF_PAGES or BTR_TOTAL_SIZE */
        mtr_t*          mtr)    /*!< in/out: mini-transaction where index
                                is s-latched */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /**************************************************************//**
 Allocates a new file page to be used in an index tree. NOTE: we assume
 that the caller has made the reservation for free extents!
@@ -692,7 +692,7 @@ btr_page_alloc(
        mtr_t*          init_mtr)       /*!< in/out: mini-transaction
                                        for x-latching and initializing
                                        the page */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /**************************************************************//**
 Frees a file page used in an index tree. NOTE: cannot free field external
 storage pages because the page must contain info on its level. */
@@ -703,7 +703,7 @@ btr_page_free(
        dict_index_t*   index,  /*!< in: index tree */
        buf_block_t*    block,  /*!< in: block to be freed, x-latched */
        mtr_t*          mtr)    /*!< in: mtr */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /**************************************************************//**
 Frees a file page used in an index tree. Can be used also to BLOB
 external storage pages, because the page level 0 can be given as an
@@ -716,7 +716,7 @@ btr_page_free_low(
        buf_block_t*    block,  /*!< in: block to be freed, x-latched */
        ulint           level,  /*!< in: page level */
        mtr_t*          mtr)    /*!< in: mtr */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 #ifdef UNIV_BTR_PRINT
 /*************************************************************//**
 Prints size info of a B-tree. */
@@ -725,7 +725,7 @@ void
 btr_print_size(
 /*===========*/
        dict_index_t*   index)  /*!< in: index tree */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /**************************************************************//**
 Prints directories and other info of all nodes in the index. */
 UNIV_INTERN
@@ -735,7 +735,7 @@ btr_print_index(
        dict_index_t*   index,  /*!< in: index */
        ulint           width)  /*!< in: print this many entries from start
                                and end */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 #endif /* UNIV_BTR_PRINT */
 /************************************************************//**
 Checks the size and number of fields in a record based on the definition of
@@ -750,7 +750,7 @@ btr_index_rec_validate(
        ibool                   dump_on_error)  /*!< in: TRUE if the function
                                                should print hex dump of record
                                                and page on error */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /**************************************************************//**
 Checks the consistency of an index tree.
 @return        TRUE if ok */
@@ -760,7 +760,7 @@ btr_validate_index(
 /*===============*/
        dict_index_t*   index,                  /*!< in: index */
        const trx_t*    trx)                    /*!< in: transaction or 0 */
-       __attribute__((nonnull(1), warn_unused_result));
+       MY_ATTRIBUTE((nonnull(1), warn_unused_result));
 
 #define BTR_N_LEAF_PAGES       1
 #define BTR_TOTAL_SIZE         2
index 00f50b5dcaf265ec110401239369fec122f51ecb..2ad01259924a657a251d63dc2b7b684463b7d27c 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1994, 2012, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1994, 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
@@ -159,10 +159,11 @@ ulint
 btr_page_get_next(
 /*==============*/
        const page_t*   page,   /*!< in: index page */
-       mtr_t*          mtr __attribute__((unused)))
+       mtr_t*          mtr MY_ATTRIBUTE((unused)))
                                /*!< in: mini-transaction handle */
 {
-       ut_ad(page && mtr);
+       ut_ad(page != NULL);
+       ut_ad(mtr != NULL);
        ut_ad(mtr_memo_contains_page(mtr, page, MTR_MEMO_PAGE_X_FIX)
              || mtr_memo_contains_page(mtr, page, MTR_MEMO_PAGE_S_FIX));
 
@@ -181,7 +182,8 @@ btr_page_set_next(
        ulint           next,   /*!< in: next page number */
        mtr_t*          mtr)    /*!< in: mini-transaction handle */
 {
-       ut_ad(page && mtr);
+       ut_ad(page != NULL);
+       ut_ad(mtr != NULL);
 
        if (page_zip) {
                mach_write_to_4(page + FIL_PAGE_NEXT, next);
@@ -199,9 +201,10 @@ ulint
 btr_page_get_prev(
 /*==============*/
        const page_t*   page,   /*!< in: index page */
-       mtr_t*  mtr __attribute__((unused))) /*!< in: mini-transaction handle */
+       mtr_t*  mtr MY_ATTRIBUTE((unused))) /*!< in: mini-transaction handle */
 {
-       ut_ad(page && mtr);
+       ut_ad(page != NULL);
+       ut_ad(mtr != NULL);
 
        return(mach_read_from_4(page + FIL_PAGE_PREV));
 }
@@ -218,7 +221,8 @@ btr_page_set_prev(
        ulint           prev,   /*!< in: previous page number */
        mtr_t*          mtr)    /*!< in: mini-transaction handle */
 {
-       ut_ad(page && mtr);
+       ut_ad(page != NULL);
+       ut_ad(mtr != NULL);
 
        if (page_zip) {
                mach_write_to_4(page + FIL_PAGE_PREV, prev);
index f1e4406fcf70b1aeec9885c272c7bdaedf20aec8..89b54d06a10a30b29f03e4e14e979f0fbb268fae 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1994, 2014, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1994, 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
@@ -186,7 +186,7 @@ btr_cur_open_at_index_side_func(
        const char*     file,           /*!< in: file name */
        ulint           line,           /*!< in: line where called */
        mtr_t*          mtr)            /*!< in/out: mini-transaction */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 #define btr_cur_open_at_index_side(f,i,l,c,lv,m)                       \
        btr_cur_open_at_index_side_func(f,i,l,c,lv,__FILE__,__LINE__,m)
 /**********************************************************************//**
@@ -235,7 +235,7 @@ btr_cur_optimistic_insert(
                                compressed tablespace, the caller must
                                mtr_commit(mtr) before latching
                                any further pages */
-       __attribute__((nonnull(2,3,4,5,6,7,10), warn_unused_result));
+       MY_ATTRIBUTE((nonnull(2,3,4,5,6,7,10), warn_unused_result));
 /*************************************************************//**
 Performs an insert on a page of an index tree. It is assumed that mtr
 holds an x-latch on the tree and on the cursor page. If the insert is
@@ -266,7 +266,7 @@ btr_cur_pessimistic_insert(
        ulint           n_ext,  /*!< in: number of externally stored columns */
        que_thr_t*      thr,    /*!< in: query thread or NULL */
        mtr_t*          mtr)    /*!< in/out: mini-transaction */
-       __attribute__((nonnull(2,3,4,5,6,7,10), warn_unused_result));
+       MY_ATTRIBUTE((nonnull(2,3,4,5,6,7,10), warn_unused_result));
 /*************************************************************//**
 See if there is enough place in the page modification log to log
 an update-in-place.
@@ -293,7 +293,7 @@ btr_cur_update_alloc_zip_func(
        bool            create, /*!< in: true=delete-and-insert,
                                false=update-in-place */
        mtr_t*          mtr)    /*!< in/out: mini-transaction */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 #ifdef UNIV_DEBUG
 # define btr_cur_update_alloc_zip(page_zip,cursor,index,offsets,len,cr,mtr) \
        btr_cur_update_alloc_zip_func(page_zip,cursor,index,offsets,len,cr,mtr)
@@ -325,7 +325,7 @@ btr_cur_update_in_place(
                                is a secondary index, the caller must
                                mtr_commit(mtr) before latching any
                                further pages */
-       __attribute__((warn_unused_result, nonnull));
+       MY_ATTRIBUTE((warn_unused_result, nonnull));
 /***********************************************************//**
 Writes a redo log record of updating a record in-place. */
 UNIV_INTERN
@@ -339,7 +339,7 @@ btr_cur_update_in_place_log(
        trx_id_t        trx_id,         /*!< in: transaction id */
        roll_ptr_t      roll_ptr,       /*!< in: roll ptr */
        mtr_t*          mtr)            /*!< in: mtr */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /*************************************************************//**
 Tries to update a record on a page in an index tree. It is assumed that mtr
 holds an x-latch on the page. The operation does not succeed if there is too
@@ -371,7 +371,7 @@ btr_cur_optimistic_update(
                                is a secondary index, the caller must
                                mtr_commit(mtr) before latching any
                                further pages */
-       __attribute__((warn_unused_result, nonnull));
+       MY_ATTRIBUTE((warn_unused_result, nonnull));
 /*************************************************************//**
 Performs an update of a record on a page of a tree. It is assumed
 that mtr holds an x-latch on the tree and on the cursor page. If the
@@ -405,7 +405,7 @@ btr_cur_pessimistic_update(
        trx_id_t        trx_id, /*!< in: transaction id */
        mtr_t*          mtr)    /*!< in/out: mini-transaction; must be committed
                                before latching any further pages */
-       __attribute__((warn_unused_result, nonnull));
+       MY_ATTRIBUTE((warn_unused_result, nonnull));
 /***********************************************************//**
 Marks a clustered index record deleted. Writes an undo log record to
 undo log on this delete marking. Writes in the trx id field the id
@@ -422,7 +422,7 @@ btr_cur_del_mark_set_clust_rec(
        const ulint*    offsets,/*!< in: rec_get_offsets(rec) */
        que_thr_t*      thr,    /*!< in: query thread */
        mtr_t*          mtr)    /*!< in/out: mini-transaction */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /***********************************************************//**
 Sets a secondary index record delete mark to TRUE or FALSE.
 @return        DB_SUCCESS, DB_LOCK_WAIT, or error number */
@@ -435,7 +435,7 @@ btr_cur_del_mark_set_sec_rec(
        ibool           val,    /*!< in: value to set */
        que_thr_t*      thr,    /*!< in: query thread */
        mtr_t*          mtr)    /*!< in/out: mini-transaction */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /*************************************************************//**
 Tries to compress a page of the tree if it seems useful. It is assumed
 that mtr holds an x-latch on the tree and on the cursor page. To avoid
@@ -453,7 +453,7 @@ btr_cur_compress_if_useful(
        ibool           adjust, /*!< in: TRUE if should adjust the
                                cursor position even if compression occurs */
        mtr_t*          mtr)    /*!< in/out: mini-transaction */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /*******************************************************//**
 Removes the record on which the tree cursor is positioned. It is assumed
 that the mtr has an x-latch on the page where the cursor is positioned,
@@ -474,7 +474,7 @@ btr_cur_optimistic_delete_func(
                                TRUE on a leaf page of a secondary
                                index, the mtr must be committed
                                before latching any further pages */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 # ifdef UNIV_DEBUG
 #  define btr_cur_optimistic_delete(cursor, flags, mtr)                \
        btr_cur_optimistic_delete_func(cursor, flags, mtr)
@@ -510,7 +510,7 @@ btr_cur_pessimistic_delete(
        ulint           flags,  /*!< in: BTR_CREATE_FLAG or 0 */
        enum trx_rb_ctx rb_ctx, /*!< in: rollback context */
        mtr_t*          mtr)    /*!< in: mtr */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 #endif /* !UNIV_HOTBACKUP */
 /***********************************************************//**
 Parses a redo log record of updating a record in-place.
@@ -603,7 +603,7 @@ btr_cur_disown_inherited_fields(
        const ulint*    offsets,/*!< in: array returned by rec_get_offsets() */
        const upd_t*    update, /*!< in: update vector */
        mtr_t*          mtr)    /*!< in/out: mini-transaction */
-       __attribute__((nonnull(2,3,4,5,6)));
+       MY_ATTRIBUTE((nonnull(2,3,4,5,6)));
 
 /** Operation code for btr_store_big_rec_extern_fields(). */
 enum blob_op {
@@ -623,7 +623,7 @@ ibool
 btr_blob_op_is_update(
 /*==================*/
        enum blob_op    op)     /*!< in: operation */
-       __attribute__((warn_unused_result));
+       MY_ATTRIBUTE((warn_unused_result));
 
 /*******************************************************************//**
 Stores the fields in big_rec_vec to the tablespace and puts pointers to
@@ -648,7 +648,7 @@ btr_store_big_rec_extern_fields(
        mtr_t*          btr_mtr,        /*!< in: mtr containing the
                                        latches to the clustered index */
        enum blob_op    op)             /*! in: operation code */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 
 /*******************************************************************//**
 Frees the space in an externally stored field to the file space
@@ -742,7 +742,7 @@ btr_push_update_extern_fields(
        dtuple_t*       tuple,  /*!< in/out: data tuple */
        const upd_t*    update, /*!< in: update vector */
        mem_heap_t*     heap)   /*!< in: memory heap */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /***********************************************************//**
 Sets a secondary index record's delete mark to the given value. This
 function is only used by the insert buffer merge mechanism. */
index cfbaacf4de319ad7c1a4c75b7f857f1a71ec2661..e5b40040615daf381d8f661657e159d8c35ede33 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1996, 2013, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1996, 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
@@ -155,7 +155,7 @@ btr_pcur_open_at_index_side(
        ulint           level,          /*!< in: level to search for
                                        (0=leaf) */
        mtr_t*          mtr)            /*!< in/out: mini-transaction */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /**************************************************************//**
 Gets the up_match value for a pcur after a search.
 @return number of matched fields at the cursor or to the right if
index 848bde451a01d151602652507500414bfb1ba9e8..c95ca28057aaae871a286d4a0fd20aa862819a3f 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1996, 2011, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1996, 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
@@ -69,7 +69,7 @@ btr_search_t*
 btr_search_get_info(
 /*================*/
        dict_index_t*   index)  /*!< in: index */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /*****************************************************************//**
 Creates and initializes a search info struct.
 @return        own: search info struct */
index c1a4531f86151b9628e90006078e53756d8a1ed8..04b69d8145cc2d2dc3cc2a8fe8a769fd2ccf170b 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1996, 2011, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1996, 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
@@ -81,7 +81,7 @@ btr_blob_dbg_rbt_insert(
        dict_index_t*           index,  /*!< in/out: index tree */
        const btr_blob_dbg_t*   b,      /*!< in: the reference */
        const char*             ctx)    /*!< in: context (for logging) */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 
 /** Remove from index->blobs a reference to an off-page column.
 @param index   the index tree
@@ -94,7 +94,7 @@ btr_blob_dbg_rbt_delete(
        dict_index_t*           index,  /*!< in/out: index tree */
        const btr_blob_dbg_t*   b,      /*!< in: the reference */
        const char*             ctx)    /*!< in: context (for logging) */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 
 /**************************************************************//**
 Add to index->blobs any references to off-page columns from a record.
@@ -107,7 +107,7 @@ btr_blob_dbg_add_rec(
        dict_index_t*   index,  /*!< in/out: index */
        const ulint*    offsets,/*!< in: offsets */
        const char*     ctx)    /*!< in: context (for logging) */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /**************************************************************//**
 Remove from index->blobs any references to off-page columns from a record.
 @return number of references removed */
@@ -119,7 +119,7 @@ btr_blob_dbg_remove_rec(
        dict_index_t*   index,  /*!< in/out: index */
        const ulint*    offsets,/*!< in: offsets */
        const char*     ctx)    /*!< in: context (for logging) */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /**************************************************************//**
 Count and add to index->blobs any references to off-page columns
 from records on a page.
@@ -131,7 +131,7 @@ btr_blob_dbg_add(
        const page_t*   page,   /*!< in: rewritten page */
        dict_index_t*   index,  /*!< in/out: index */
        const char*     ctx)    /*!< in: context (for logging) */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /**************************************************************//**
 Count and remove from index->blobs any references to off-page columns
 from records on a page.
@@ -144,7 +144,7 @@ btr_blob_dbg_remove(
        const page_t*   page,   /*!< in: b-tree page */
        dict_index_t*   index,  /*!< in/out: index */
        const char*     ctx)    /*!< in: context (for logging) */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /**************************************************************//**
 Restore in index->blobs any references to off-page columns
 Used when page reorganize fails due to compressed page overflow. */
@@ -156,7 +156,7 @@ btr_blob_dbg_restore(
        const page_t*   page,   /*!< in: copy of original page */
        dict_index_t*   index,  /*!< in/out: index */
        const char*     ctx)    /*!< in: context (for logging) */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 
 /** Operation that processes the BLOB references of an index record
 @param[in]     rec     record on index page
@@ -180,7 +180,7 @@ btr_blob_dbg_op(
        dict_index_t*           index,  /*!< in/out: index */
        const char*             ctx,    /*!< in: context (for logging) */
        const btr_blob_dbg_op_f op)     /*!< in: operation on records */
-       __attribute__((nonnull(1,3,4,5)));
+       MY_ATTRIBUTE((nonnull(1,3,4,5)));
 #else /* UNIV_BLOB_DEBUG */
 # define btr_blob_dbg_add_rec(rec, index, offsets, ctx)                ((void) 0)
 # define btr_blob_dbg_add(page, index, ctx)                    ((void) 0)
index fab9a4b828b88a5a00da3a9512a4b17f5bdd5424..7fc4408505de4369f95e94399d3b93c4bcef5f1b 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 2006, 2011, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2006, 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
@@ -54,7 +54,7 @@ buf_buddy_alloc(
                                        storage was allocated from the
                                        LRU list and buf_pool->mutex was
                                        temporarily released */
-       __attribute__((malloc, nonnull));
+       MY_ATTRIBUTE((malloc, nonnull));
 
 /**********************************************************************//**
 Deallocate a block. */
@@ -68,7 +68,7 @@ buf_buddy_free(
                                        be pointed to by the buffer pool */
        ulint           size)           /*!< in: block size,
                                        up to UNIV_PAGE_SIZE */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 
 #ifndef UNIV_NONINL
 # include "buf0buddy.ic"
index be2f950162d80510e1c59ec40e565d678adc8d97..4352ebe89451006583ac71ab7bbfd175496a3341 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 2006, 2011, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2006, 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
@@ -50,7 +50,7 @@ buf_buddy_alloc_low(
                                        allocated from the LRU list and
                                        buf_pool->mutex was temporarily
                                        released */
-       __attribute__((malloc, nonnull));
+       MY_ATTRIBUTE((malloc, nonnull));
 
 /**********************************************************************//**
 Deallocate a block. */
@@ -63,7 +63,7 @@ buf_buddy_free_low(
                                        pointed to by the buffer pool */
        ulint           i)              /*!< in: index of buf_pool->zip_free[],
                                        or BUF_BUDDY_SIZES */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 
 /**********************************************************************//**
 Get the index of buf_pool->zip_free[] for a given block size.
index b669bd203e03bffceac4f7c0e9d1178dbb26ba04..50c54e5580b4fd866617cc2030eda39ba8784ed8 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1995, 2014, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1995, 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
@@ -258,7 +258,7 @@ buf_relocate(
                                buf_page_get_state(bpage) must be
                                BUF_BLOCK_ZIP_DIRTY or BUF_BLOCK_ZIP_PAGE */
        buf_page_t*     dpage)  /*!< in/out: destination control block */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /*********************************************************************//**
 Gets the current size of buffer buf_pool in bytes.
 @return        size in bytes */
@@ -289,7 +289,7 @@ UNIV_INLINE
 buf_page_t*
 buf_page_alloc_descriptor(void)
 /*===========================*/
-       __attribute__((malloc));
+       MY_ATTRIBUTE((malloc));
 /********************************************************************//**
 Free a buf_page_t descriptor. */
 UNIV_INLINE
@@ -297,7 +297,7 @@ void
 buf_page_free_descriptor(
 /*=====================*/
        buf_page_t*     bpage)  /*!< in: bpage descriptor to free. */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 
 /********************************************************************//**
 Allocates a buffer block.
@@ -534,7 +534,7 @@ ulint
 buf_page_get_freed_page_clock(
 /*==========================*/
        const buf_page_t*       bpage)  /*!< in: block */
-       __attribute__((pure));
+       MY_ATTRIBUTE((pure));
 /********************************************************************//**
 Reads the freed_page_clock of a buffer block.
 @return        freed_page_clock */
@@ -543,7 +543,7 @@ ulint
 buf_block_get_freed_page_clock(
 /*===========================*/
        const buf_block_t*      block)  /*!< in: block */
-       __attribute__((pure));
+       MY_ATTRIBUTE((pure));
 
 /********************************************************************//**
 Tells if a block is still close enough to the MRU end of the LRU list
@@ -606,7 +606,7 @@ buf_block_buf_fix_inc_func(
        ulint           line,   /*!< in: line */
 # endif /* UNIV_SYNC_DEBUG */
        buf_block_t*    block)  /*!< in/out: block to bufferfix */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 
 /*******************************************************************//**
 Increments the bufferfix count. */
@@ -652,7 +652,7 @@ buf_page_is_corrupted(
        const byte*     read_buf,       /*!< in: a database page */
        ulint           zip_size)       /*!< in: size of compressed page;
                                        0 for uncompressed pages */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /********************************************************************//**
 Checks if a page is all zeroes.
 @return        TRUE if the page is all zeroes */
@@ -682,7 +682,7 @@ ulint
 buf_block_get_lock_hash_val(
 /*========================*/
        const buf_block_t*      block)  /*!< in: block */
-       __attribute__((pure));
+       MY_ATTRIBUTE((pure));
 #ifdef UNIV_DEBUG
 /*********************************************************************//**
 Finds a block in the buffer pool that points to a
@@ -743,7 +743,7 @@ buf_page_print(
        ulint           flags)          /*!< in: 0 or
                                        BUF_PAGE_PRINT_NO_CRASH or
                                        BUF_PAGE_PRINT_NO_FULL */
-       UNIV_COLD __attribute__((nonnull));
+       UNIV_COLD MY_ATTRIBUTE((nonnull));
 /********************************************************************//**
 Decompress a block.
 @return        TRUE if successful */
@@ -870,7 +870,7 @@ enum buf_page_state
 buf_block_get_state(
 /*================*/
        const buf_block_t*      block)  /*!< in: pointer to the control block */
-       __attribute__((pure));
+       MY_ATTRIBUTE((pure));
 /*********************************************************************//**
 Sets the state of a block. */
 UNIV_INLINE
@@ -895,7 +895,7 @@ ibool
 buf_page_in_file(
 /*=============*/
        const buf_page_t*       bpage)  /*!< in: pointer to control block */
-       __attribute__((pure));
+       MY_ATTRIBUTE((pure));
 #ifndef UNIV_HOTBACKUP
 /*********************************************************************//**
 Determines if a block should be on unzip_LRU list.
@@ -905,7 +905,7 @@ ibool
 buf_page_belongs_to_unzip_LRU(
 /*==========================*/
        const buf_page_t*       bpage)  /*!< in: pointer to control block */
-       __attribute__((pure));
+       MY_ATTRIBUTE((pure));
 
 /*********************************************************************//**
 Gets the mutex of a block.
@@ -915,7 +915,7 @@ ib_mutex_t*
 buf_page_get_mutex(
 /*===============*/
        const buf_page_t*       bpage)  /*!< in: pointer to control block */
-       __attribute__((pure));
+       MY_ATTRIBUTE((pure));
 
 /*********************************************************************//**
 Get the flush type of a page.
@@ -925,7 +925,7 @@ buf_flush_t
 buf_page_get_flush_type(
 /*====================*/
        const buf_page_t*       bpage)  /*!< in: buffer page */
-       __attribute__((pure));
+       MY_ATTRIBUTE((pure));
 /*********************************************************************//**
 Set the flush type of a page. */
 UNIV_INLINE
@@ -951,7 +951,7 @@ enum buf_io_fix
 buf_page_get_io_fix(
 /*================*/
        const buf_page_t*       bpage)  /*!< in: pointer to the control block */
-       __attribute__((pure));
+       MY_ATTRIBUTE((pure));
 /*********************************************************************//**
 Gets the io_fix state of a block.
 @return        io_fix state */
@@ -960,7 +960,7 @@ enum buf_io_fix
 buf_block_get_io_fix(
 /*================*/
        const buf_block_t*      block)  /*!< in: pointer to the control block */
-       __attribute__((pure));
+       MY_ATTRIBUTE((pure));
 /*********************************************************************//**
 Sets the io_fix state of a block. */
 UNIV_INLINE
@@ -1006,7 +1006,7 @@ ibool
 buf_page_can_relocate(
 /*==================*/
        const buf_page_t*       bpage)  /*!< control block being relocated */
-       __attribute__((pure));
+       MY_ATTRIBUTE((pure));
 
 /*********************************************************************//**
 Determine if a block has been flagged old.
@@ -1016,7 +1016,7 @@ ibool
 buf_page_is_old(
 /*============*/
        const buf_page_t*       bpage)  /*!< in: control block */
-       __attribute__((pure));
+       MY_ATTRIBUTE((pure));
 /*********************************************************************//**
 Flag a block old. */
 UNIV_INLINE
@@ -1033,7 +1033,7 @@ unsigned
 buf_page_is_accessed(
 /*=================*/
        const buf_page_t*       bpage)  /*!< in: control block */
-       __attribute__((nonnull, pure));
+       MY_ATTRIBUTE((nonnull, pure));
 /*********************************************************************//**
 Flag a block accessed. */
 UNIV_INLINE
@@ -1041,7 +1041,7 @@ void
 buf_page_set_accessed(
 /*==================*/
        buf_page_t*     bpage)          /*!< in/out: control block */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /*********************************************************************//**
 Gets the buf_block_t handle of a buffered file block if an uncompressed
 page frame exists, or NULL. Note: even though bpage is not declared a
@@ -1052,7 +1052,7 @@ buf_block_t*
 buf_page_get_block(
 /*===============*/
        buf_page_t*     bpage)  /*!< in: control block, or NULL */
-       __attribute__((pure));
+       MY_ATTRIBUTE((pure));
 #endif /* !UNIV_HOTBACKUP */
 #ifdef UNIV_DEBUG
 /*********************************************************************//**
@@ -1063,7 +1063,7 @@ buf_frame_t*
 buf_block_get_frame(
 /*================*/
        const buf_block_t*      block)  /*!< in: pointer to the control block */
-       __attribute__((pure));
+       MY_ATTRIBUTE((pure));
 #else /* UNIV_DEBUG */
 # define buf_block_get_frame(block) (block)->frame
 #endif /* UNIV_DEBUG */
@@ -1075,7 +1075,7 @@ ulint
 buf_page_get_space(
 /*===============*/
        const buf_page_t*       bpage)  /*!< in: pointer to the control block */
-       __attribute__((pure));
+       MY_ATTRIBUTE((pure));
 /*********************************************************************//**
 Gets the space id of a block.
 @return        space id */
@@ -1084,7 +1084,7 @@ ulint
 buf_block_get_space(
 /*================*/
        const buf_block_t*      block)  /*!< in: pointer to the control block */
-       __attribute__((pure));
+       MY_ATTRIBUTE((pure));
 /*********************************************************************//**
 Gets the page number of a block.
 @return        page number */
@@ -1093,7 +1093,7 @@ ulint
 buf_page_get_page_no(
 /*=================*/
        const buf_page_t*       bpage)  /*!< in: pointer to the control block */
-       __attribute__((pure));
+       MY_ATTRIBUTE((pure));
 /*********************************************************************//**
 Gets the page number of a block.
 @return        page number */
@@ -1102,7 +1102,7 @@ ulint
 buf_block_get_page_no(
 /*==================*/
        const buf_block_t*      block)  /*!< in: pointer to the control block */
-       __attribute__((pure));
+       MY_ATTRIBUTE((pure));
 /*********************************************************************//**
 Gets the compressed page size of a block.
 @return        compressed page size, or 0 */
@@ -1111,7 +1111,7 @@ ulint
 buf_page_get_zip_size(
 /*==================*/
        const buf_page_t*       bpage)  /*!< in: pointer to the control block */
-       __attribute__((pure));
+       MY_ATTRIBUTE((pure));
 /*********************************************************************//**
 Gets the compressed page size of a block.
 @return        compressed page size, or 0 */
@@ -1120,7 +1120,7 @@ ulint
 buf_block_get_zip_size(
 /*===================*/
        const buf_block_t*      block)  /*!< in: pointer to the control block */
-       __attribute__((pure));
+       MY_ATTRIBUTE((pure));
 /*********************************************************************//**
 Gets the compressed page descriptor corresponding to an uncompressed page
 if applicable. */
@@ -1209,7 +1209,7 @@ buf_page_address_fold(
 /*==================*/
        ulint   space,  /*!< in: space id */
        ulint   offset) /*!< in: offset of the page within space */
-       __attribute__((const));
+       MY_ATTRIBUTE((const));
 /********************************************************************//**
 Calculates the index of a buffer pool to the buf_pool[] array.
 @return        the position of the buffer pool in buf_pool[] */
@@ -1218,7 +1218,7 @@ ulint
 buf_pool_index(
 /*===========*/
        const buf_pool_t*       buf_pool)       /*!< in: buffer pool */
-       __attribute__((nonnull, const));
+       MY_ATTRIBUTE((nonnull, const));
 /******************************************************************//**
 Returns the buffer pool instance given a page instance
 @return buf_pool */
@@ -1358,7 +1358,7 @@ buf_pool_watch_is_sentinel(
 /*=======================*/
        buf_pool_t*             buf_pool,       /*!< buffer pool instance */
        const buf_page_t*       bpage)          /*!< in: block */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /****************************************************************//**
 Add watch for the given page to be read in. Caller must have the buffer pool
 @return NULL if watch set, block if the page is in the buffer pool */
@@ -1369,7 +1369,7 @@ buf_pool_watch_set(
        ulint   space,  /*!< in: space id */
        ulint   offset, /*!< in: page number */
        ulint   fold)   /*!< in: buf_page_address_fold(space, offset) */
-       __attribute__((warn_unused_result));
+       MY_ATTRIBUTE((warn_unused_result));
 /****************************************************************//**
 Stop watching if the page has been read in.
 buf_pool_watch_set(space,offset) must have returned NULL before. */
@@ -1390,7 +1390,7 @@ buf_pool_watch_occurred(
 /*====================*/
        ulint   space,  /*!< in: space id */
        ulint   offset) /*!< in: page number */
-       __attribute__((warn_unused_result));
+       MY_ATTRIBUTE((warn_unused_result));
 /********************************************************************//**
 Get total buffer pool statistics. */
 UNIV_INTERN
index f116720574b6f5aa8f69d51a271cc88b88c869ff..0c5812f802c7790697942c10f8ce61eb39b100d9 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1995, 2013, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1995, 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
@@ -85,7 +85,7 @@ buf_flush_page_try(
 /*===============*/
        buf_pool_t*     buf_pool,       /*!< in/out: buffer pool instance */
        buf_block_t*    block)          /*!< in/out: buffer control block */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 # endif /* UNIV_DEBUG || UNIV_IBUF_DEBUG */
 /*******************************************************************//**
 This utility flushes dirty blocks from the end of the flush list of
@@ -254,7 +254,7 @@ buf_flush_ready_for_flush(
        buf_page_t*     bpage,  /*!< in: buffer control block, must be
                                buf_page_in_file(bpage) */
        buf_flush_t     flush_type)/*!< in: type of flush */
-       __attribute__((warn_unused_result));
+       MY_ATTRIBUTE((warn_unused_result));
 
 #ifdef UNIV_DEBUG
 /******************************************************************//**
index ecdaef685a1b9c18963705fb195eae74f19252c4..b5d3fe02097704ca0d494098b16d426c2503de7e 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1995, 2013, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1995, 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
@@ -93,7 +93,7 @@ buf_LRU_free_page(
        buf_page_t*     bpage,  /*!< in: block to be freed */
        bool            zip)    /*!< in: true if should remove also the
                                compressed page of an uncompressed page */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /******************************************************************//**
 Try to free a replaceable block.
 @return        TRUE if found and freed */
@@ -105,7 +105,7 @@ buf_LRU_scan_and_free_block(
        ibool           scan_all)       /*!< in: scan whole LRU list
                                        if TRUE, otherwise scan only
                                        'old' blocks. */
-       __attribute__((nonnull,warn_unused_result));
+       MY_ATTRIBUTE((nonnull,warn_unused_result));
 /******************************************************************//**
 Returns a free block from the buf_pool.  The block is taken off the
 free list.  If it is empty, returns NULL.
@@ -146,7 +146,7 @@ buf_block_t*
 buf_LRU_get_free_block(
 /*===================*/
        buf_pool_t*     buf_pool)       /*!< in/out: buffer pool instance */
-       __attribute__((nonnull,warn_unused_result));
+       MY_ATTRIBUTE((nonnull,warn_unused_result));
 /******************************************************************//**
 Determines if the unzip_LRU list should be used for evicting a victim
 instead of the general LRU list.
@@ -229,7 +229,7 @@ buf_LRU_free_one_page(
        buf_page_t*     bpage)  /*!< in/out: block, must contain a file page and
                                be in a state where it can be freed; there
                                may or may not be a hash index to the page */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 
 #if defined UNIV_DEBUG || defined UNIV_BUF_DEBUG
 /**********************************************************************//**
index a548c7b89b3d76733f11922b15c09495ba7e6ade..1d954bfc07cbe1e3bc74e59827b8538a840b7ffc 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1994, 2012, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1994, 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
@@ -46,7 +46,7 @@ dtype_t*
 dfield_get_type(
 /*============*/
        const dfield_t* field)  /*!< in: SQL data field */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /*********************************************************************//**
 Gets pointer to the data in a field.
 @return        pointer to data */
@@ -55,7 +55,7 @@ void*
 dfield_get_data(
 /*============*/
        const dfield_t* field)  /*!< in: field */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 #else /* UNIV_DEBUG */
 # define dfield_get_type(field) (&(field)->type)
 # define dfield_get_data(field) ((field)->data)
@@ -68,7 +68,7 @@ dfield_set_type(
 /*============*/
        dfield_t*       field,  /*!< in: SQL data field */
        const dtype_t*  type)   /*!< in: pointer to data type struct */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /*********************************************************************//**
 Gets length of field data.
 @return        length of data; UNIV_SQL_NULL if SQL null data */
@@ -77,7 +77,7 @@ ulint
 dfield_get_len(
 /*===========*/
        const dfield_t* field)  /*!< in: field */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /*********************************************************************//**
 Sets length in a field. */
 UNIV_INLINE
@@ -86,7 +86,7 @@ dfield_set_len(
 /*===========*/
        dfield_t*       field,  /*!< in: field */
        ulint           len)    /*!< in: length or UNIV_SQL_NULL */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /*********************************************************************//**
 Determines if a field is SQL NULL
 @return        nonzero if SQL null data */
@@ -95,7 +95,7 @@ ulint
 dfield_is_null(
 /*===========*/
        const dfield_t* field)  /*!< in: field */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /*********************************************************************//**
 Determines if a field is externally stored
 @return        nonzero if externally stored */
@@ -104,7 +104,7 @@ ulint
 dfield_is_ext(
 /*==========*/
        const dfield_t* field)  /*!< in: field */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /*********************************************************************//**
 Sets the "external storage" flag */
 UNIV_INLINE
@@ -112,7 +112,7 @@ void
 dfield_set_ext(
 /*===========*/
        dfield_t*       field)  /*!< in/out: field */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /*********************************************************************//**
 Sets pointer to the data and length in a field. */
 UNIV_INLINE
@@ -122,7 +122,7 @@ dfield_set_data(
        dfield_t*       field,  /*!< in: field */
        const void*     data,   /*!< in: data */
        ulint           len)    /*!< in: length or UNIV_SQL_NULL */
-       __attribute__((nonnull(1)));
+       MY_ATTRIBUTE((nonnull(1)));
 /*********************************************************************//**
 Sets a data field to SQL NULL. */
 UNIV_INLINE
@@ -130,7 +130,7 @@ void
 dfield_set_null(
 /*============*/
        dfield_t*       field)  /*!< in/out: field */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /**********************************************************************//**
 Writes an SQL null field full of zeros. */
 UNIV_INLINE
@@ -139,7 +139,7 @@ data_write_sql_null(
 /*================*/
        byte*   data,   /*!< in: pointer to a buffer of size len */
        ulint   len)    /*!< in: SQL null size in bytes */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /*********************************************************************//**
 Copies the data and len fields. */
 UNIV_INLINE
@@ -148,7 +148,7 @@ dfield_copy_data(
 /*=============*/
        dfield_t*       field1, /*!< out: field to copy to */
        const dfield_t* field2) /*!< in: field to copy from */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /*********************************************************************//**
 Copies a data field to another. */
 UNIV_INLINE
@@ -157,7 +157,7 @@ dfield_copy(
 /*========*/
        dfield_t*       field1, /*!< out: field to copy to */
        const dfield_t* field2) /*!< in: field to copy from */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /*********************************************************************//**
 Copies the data pointed to by a data field. */
 UNIV_INLINE
@@ -166,7 +166,7 @@ dfield_dup(
 /*=======*/
        dfield_t*       field,  /*!< in/out: data field */
        mem_heap_t*     heap)   /*!< in: memory heap where allocated */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 #ifndef UNIV_HOTBACKUP
 /*********************************************************************//**
 Tests if two data fields are equal.
@@ -181,7 +181,7 @@ dfield_datas_are_binary_equal(
        const dfield_t* field2, /*!< in: field */
        ulint           len)    /*!< in: maximum prefix to compare,
                                or 0 to compare the whole field length */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /*********************************************************************//**
 Tests if dfield data length and content is equal to the given.
 @return        TRUE if equal */
@@ -192,7 +192,7 @@ dfield_data_is_binary_equal(
        const dfield_t* field,  /*!< in: field */
        ulint           len,    /*!< in: data length or UNIV_SQL_NULL */
        const byte*     data)   /*!< in: data */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 #endif /* !UNIV_HOTBACKUP */
 /*********************************************************************//**
 Gets number of fields in a data tuple.
@@ -202,7 +202,7 @@ ulint
 dtuple_get_n_fields(
 /*================*/
        const dtuple_t* tuple)  /*!< in: tuple */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 #ifdef UNIV_DEBUG
 /*********************************************************************//**
 Gets nth field of a tuple.
@@ -224,7 +224,7 @@ ulint
 dtuple_get_info_bits(
 /*=================*/
        const dtuple_t* tuple)  /*!< in: tuple */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /*********************************************************************//**
 Sets info bits in a data tuple. */
 UNIV_INLINE
@@ -233,7 +233,7 @@ dtuple_set_info_bits(
 /*=================*/
        dtuple_t*       tuple,          /*!< in: tuple */
        ulint           info_bits)      /*!< in: info bits */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /*********************************************************************//**
 Gets number of fields used in record comparisons.
 @return        number of fields used in comparisons in rem0cmp.* */
@@ -242,7 +242,7 @@ ulint
 dtuple_get_n_fields_cmp(
 /*====================*/
        const dtuple_t* tuple)  /*!< in: tuple */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /*********************************************************************//**
 Gets number of fields used in record comparisons. */
 UNIV_INLINE
@@ -252,7 +252,7 @@ dtuple_set_n_fields_cmp(
        dtuple_t*       tuple,          /*!< in: tuple */
        ulint           n_fields_cmp)   /*!< in: number of fields used in
                                        comparisons in rem0cmp.* */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 
 /* Estimate the number of bytes that are going to be allocated when
 creating a new dtuple_t object */
@@ -272,7 +272,7 @@ dtuple_create_from_mem(
        void*   buf,            /*!< in, out: buffer to use */
        ulint   buf_size,       /*!< in: buffer size */
        ulint   n_fields)       /*!< in: number of fields */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 
 /**********************************************************//**
 Creates a data tuple to a memory heap. The default value for number
@@ -286,7 +286,7 @@ dtuple_create(
                                is created, DTUPLE_EST_ALLOC(n_fields)
                                bytes will be allocated from this heap */
        ulint           n_fields)/*!< in: number of fields */
-       __attribute__((nonnull, malloc));
+       MY_ATTRIBUTE((nonnull, malloc));
 
 /*********************************************************************//**
 Sets number of fields used in a tuple. Normally this is set in
@@ -297,7 +297,7 @@ dtuple_set_n_fields(
 /*================*/
        dtuple_t*       tuple,          /*!< in: tuple */
        ulint           n_fields)       /*!< in: number of fields */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /*********************************************************************//**
 Copies a data tuple to another.  This is a shallow copy; if a deep copy
 is desired, dfield_dup() will have to be invoked on each field.
@@ -309,7 +309,7 @@ dtuple_copy(
        const dtuple_t* tuple,  /*!< in: tuple to copy from */
        mem_heap_t*     heap)   /*!< in: memory heap
                                where the tuple is created */
-       __attribute__((nonnull, malloc));
+       MY_ATTRIBUTE((nonnull, malloc));
 /**********************************************************//**
 The following function returns the sum of data lengths of a tuple. The space
 occupied by the field structs or the tuple struct is not counted.
@@ -320,7 +320,7 @@ dtuple_get_data_size(
 /*=================*/
        const dtuple_t* tuple,  /*!< in: typed data tuple */
        ulint           comp)   /*!< in: nonzero=ROW_FORMAT=COMPACT  */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /*********************************************************************//**
 Computes the number of externally stored fields in a data tuple.
 @return        number of fields */
@@ -329,7 +329,7 @@ ulint
 dtuple_get_n_ext(
 /*=============*/
        const dtuple_t* tuple)  /*!< in: tuple */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /************************************************************//**
 Compare two data tuples, respecting the collation of character fields.
 @return 1, 0 , -1 if tuple1 is greater, equal, less, respectively,
@@ -340,7 +340,7 @@ dtuple_coll_cmp(
 /*============*/
        const dtuple_t* tuple1, /*!< in: tuple 1 */
        const dtuple_t* tuple2) /*!< in: tuple 2 */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /************************************************************//**
 Folds a prefix given as the number of fields of a tuple.
 @return        the folded value */
@@ -353,7 +353,7 @@ dtuple_fold(
        ulint           n_bytes,/*!< in: number of bytes to fold in an
                                incomplete last field */
        index_id_t      tree_id)/*!< in: index tree id */
-       __attribute__((nonnull, pure, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
 /*******************************************************************//**
 Sets types of fields binary in a tuple. */
 UNIV_INLINE
@@ -362,7 +362,7 @@ dtuple_set_types_binary(
 /*====================*/
        dtuple_t*       tuple,  /*!< in: data tuple */
        ulint           n)      /*!< in: number of fields to set */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /**********************************************************************//**
 Checks if a dtuple contains an SQL null value.
 @return        TRUE if some field is SQL null */
@@ -371,7 +371,7 @@ ibool
 dtuple_contains_null(
 /*=================*/
        const dtuple_t* tuple)  /*!< in: dtuple */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /**********************************************************//**
 Checks that a data field is typed. Asserts an error if not.
 @return        TRUE if ok */
@@ -380,7 +380,7 @@ ibool
 dfield_check_typed(
 /*===============*/
        const dfield_t* field)  /*!< in: data field */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /**********************************************************//**
 Checks that a data tuple is typed. Asserts an error if not.
 @return        TRUE if ok */
@@ -389,7 +389,7 @@ ibool
 dtuple_check_typed(
 /*===============*/
        const dtuple_t* tuple)  /*!< in: tuple */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /**********************************************************//**
 Checks that a data tuple is typed.
 @return        TRUE if ok */
@@ -398,7 +398,7 @@ ibool
 dtuple_check_typed_no_assert(
 /*=========================*/
        const dtuple_t* tuple)  /*!< in: tuple */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 #ifdef UNIV_DEBUG
 /**********************************************************//**
 Validates the consistency of a tuple which must be complete, i.e,
@@ -409,7 +409,7 @@ ibool
 dtuple_validate(
 /*============*/
        const dtuple_t* tuple)  /*!< in: tuple */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 #endif /* UNIV_DEBUG */
 /*************************************************************//**
 Pretty prints a dfield value according to its data type. */
@@ -418,7 +418,7 @@ void
 dfield_print(
 /*=========*/
        const dfield_t* dfield) /*!< in: dfield */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /*************************************************************//**
 Pretty prints a dfield value according to its data type. Also the hex string
 is printed if a string contains non-printable characters. */
@@ -427,7 +427,7 @@ void
 dfield_print_also_hex(
 /*==================*/
        const dfield_t* dfield)  /*!< in: dfield */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /**********************************************************//**
 The following function prints the contents of a tuple. */
 UNIV_INTERN
@@ -436,7 +436,7 @@ dtuple_print(
 /*=========*/
        FILE*           f,      /*!< in: output stream */
        const dtuple_t* tuple)  /*!< in: tuple */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /**************************************************************//**
 Moves parts of long fields in entry to the big record vector so that
 the size of tuple drops below the maximum record size allowed in the
@@ -453,7 +453,7 @@ dtuple_convert_big_rec(
        dtuple_t*       entry,  /*!< in/out: index entry */
        ulint*          n_ext)  /*!< in/out: number of
                                externally stored columns */
-       __attribute__((nonnull, malloc, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, malloc, warn_unused_result));
 /**************************************************************//**
 Puts back to entry the data stored in vector. Note that to ensure the
 fields in entry can accommodate the data, vector must have been created
@@ -466,7 +466,7 @@ dtuple_convert_back_big_rec(
        dtuple_t*       entry,  /*!< in: entry whose data was put to vector */
        big_rec_t*      vector) /*!< in, own: big rec vector; it is
                                freed in this function */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /**************************************************************//**
 Frees the memory in a big rec vector. */
 UNIV_INLINE
@@ -475,7 +475,7 @@ dtuple_big_rec_free(
 /*================*/
        big_rec_t*      vector) /*!< in, own: big rec vector; it is
                                freed in this function */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 
 /*######################################################################*/
 
index 6937d55d211c37ee5062af71942337f58b20d700..11499ab928c26e95852ab234e7cdcc9f8bde191d 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1994, 2012, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1994, 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
@@ -56,7 +56,8 @@ dfield_set_type(
        dfield_t*       field,  /*!< in: SQL data field */
        const dtype_t*  type)   /*!< in: pointer to data type struct */
 {
-       ut_ad(field && type);
+       ut_ad(field != NULL);
+       ut_ad(type != NULL);
 
        field->type = *type;
 }
@@ -194,7 +195,8 @@ dfield_copy_data(
        dfield_t*       field1, /*!< out: field to copy to */
        const dfield_t* field2) /*!< in: field to copy from */
 {
-       ut_ad(field1 && field2);
+       ut_ad(field1 != NULL);
+       ut_ad(field2 != NULL);
 
        field1->data = field2->data;
        field1->len = field2->len;
index a994c9d8ff13238337a83f5d8520816994b3e1e1..477e1150f437ba445c3fa5d96446bfbf905d35d3 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1996, 2012, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1996, 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
@@ -95,7 +95,7 @@ UNIV_INTERN
 dberr_t
 dict_boot(void)
 /*===========*/
-       __attribute__((warn_unused_result));
+       MY_ATTRIBUTE((warn_unused_result));
 
 /*****************************************************************//**
 Creates and initializes the data dictionary at the server bootstrap.
@@ -104,7 +104,7 @@ UNIV_INTERN
 dberr_t
 dict_create(void)
 /*=============*/
-       __attribute__((warn_unused_result));
+       MY_ATTRIBUTE((warn_unused_result));
 
 /*********************************************************************//**
 Check if a table id belongs to  system table.
@@ -114,7 +114,7 @@ bool
 dict_is_sys_table(
 /*==============*/
        table_id_t      id)             /*!< in: table id to check */
-       __attribute__((warn_unused_result));
+       MY_ATTRIBUTE((warn_unused_result));
 
 /* Space id and page no where the dictionary header resides */
 #define        DICT_HDR_SPACE          0       /* the SYSTEM tablespace */
index 67eab9058da55fb9dc93c6d089adfeaa9fb2f1c5..6146917469a84851694fe4fac38ce66d5a151864 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1996, 2014, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1996, 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
@@ -123,7 +123,7 @@ dict_create_add_foreign_id(
                                incremented if used */
        const char*     name,   /*!< in: table name */
        dict_foreign_t* foreign)/*!< in/out: foreign key */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 
 /** Adds the given set of foreign key objects to the dictionary tables
 in the database. This function does not modify the dictionary cache. The
@@ -142,7 +142,7 @@ dict_create_add_foreigns_to_dictionary(
        const dict_foreign_set& local_fk_set,
        const dict_table_t*     table,
        trx_t*                  trx)
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /****************************************************************//**
 Creates the tablespaces and datafiles system tables inside InnoDB
 at server bootstrap or server start if they are not found or are
@@ -177,7 +177,7 @@ dict_create_add_foreign_to_dictionary(
        const char*             name,   /*!< in: table name */
        const dict_foreign_t*   foreign,/*!< in: foreign key */
        trx_t*                  trx)    /*!< in/out: dictionary transaction */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 
 /* Table create node structure */
 struct tab_node_t{
index 2d0d9dcb85841136d854b6bfb1538f351028f5c4..1cbaa47032b55e90f240a888c81313c8f63aec86 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1996, 2012, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1996, 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
@@ -33,7 +33,7 @@ UNIV_INTERN
 bool
 row_is_mysql_tmp_table_name(
 /*========================*/
-       const char*     name) __attribute__((warn_unused_result));
+       const char*     name) MY_ATTRIBUTE((warn_unused_result));
                                /*!< in: table name in the form
                                'database/tablename' */
 
index dea4a9a2a508dd32d4224002560299508383980c..533ddc3d43bee3d683e156a23ad5b2f06796ff58 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1996, 2015, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
 Copyright (c) 2012, Facebook Inc.
 
 This program is free software; you can redistribute it and/or modify it under
@@ -53,7 +53,7 @@ void
 dict_casedn_str(
 /*============*/
        char*   a)      /*!< in/out: string to put in lower case */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /********************************************************************//**
 Get the database name length in a table name.
 @return        database name length */
@@ -63,7 +63,7 @@ dict_get_db_name_len(
 /*=================*/
        const char*     name)   /*!< in: table name in the form
                                dbname '/' tablename */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /*********************************************************************//**
 Open a table from its database and table name, this is currently used by
 foreign constraint parser to get the referenced table.
@@ -107,7 +107,7 @@ dict_remove_db_name(
 /*================*/
        const char*     name)   /*!< in: table name in the form
                                dbname '/' tablename */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 
 /** Operation to perform when opening a table */
 enum dict_table_op_t {
@@ -130,7 +130,7 @@ dict_table_open_on_id(
        table_id_t      table_id,       /*!< in: table id */
        ibool           dict_locked,    /*!< in: TRUE=data dictionary locked */
        dict_table_op_t table_op)       /*!< in: operation to perform */
-       __attribute__((warn_unused_result));
+       MY_ATTRIBUTE((warn_unused_result));
 /********************************************************************//**
 Decrements the count of open handles to a table. */
 UNIV_INTERN
@@ -142,7 +142,7 @@ dict_table_close(
        ibool           try_drop)       /*!< in: TRUE=try to drop any orphan
                                        indexes after an aborted online
                                        index creation */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /**********************************************************************//**
 Inits the data dictionary module. */
 UNIV_INTERN
@@ -167,7 +167,7 @@ ulint
 dict_col_get_mbminlen(
 /*==================*/
        const dict_col_t*       col)    /*!< in: column */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /*********************************************************************//**
 Gets the maximum number of bytes per character.
 @return maximum multi-byte char size, in bytes */
@@ -176,7 +176,7 @@ ulint
 dict_col_get_mbmaxlen(
 /*==================*/
        const dict_col_t*       col)    /*!< in: column */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /*********************************************************************//**
 Sets the minimum and maximum number of bytes per character. */
 UNIV_INLINE
@@ -188,7 +188,7 @@ dict_col_set_mbminmaxlen(
                                        character size, in bytes */
        ulint           mbmaxlen)       /*!< in: minimum multi-byte
                                        character size, in bytes */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /*********************************************************************//**
 Gets the column data type. */
 UNIV_INLINE
@@ -197,7 +197,7 @@ dict_col_copy_type(
 /*===============*/
        const dict_col_t*       col,    /*!< in: column */
        dtype_t*                type)   /*!< out: data type */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /**********************************************************************//**
 Determine bytes of column prefix to be stored in the undo log. Please
 note if the table format is UNIV_FORMAT_A (< UNIV_FORMAT_B), no prefix
@@ -210,7 +210,7 @@ dict_max_field_len_store_undo(
        dict_table_t*           table,  /*!< in: table */
        const dict_col_t*       col)    /*!< in: column which index prefix
                                        is based on */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 #endif /* !UNIV_HOTBACKUP */
 #ifdef UNIV_DEBUG
 /*********************************************************************//**
@@ -222,7 +222,7 @@ dict_col_type_assert_equal(
 /*=======================*/
        const dict_col_t*       col,    /*!< in: column */
        const dtype_t*          type)   /*!< in: data type */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 #endif /* UNIV_DEBUG */
 #ifndef UNIV_HOTBACKUP
 /***********************************************************************//**
@@ -233,7 +233,7 @@ ulint
 dict_col_get_min_size(
 /*==================*/
        const dict_col_t*       col)    /*!< in: column */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /***********************************************************************//**
 Returns the maximum size of the column.
 @return        maximum size */
@@ -242,7 +242,7 @@ ulint
 dict_col_get_max_size(
 /*==================*/
        const dict_col_t*       col)    /*!< in: column */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /***********************************************************************//**
 Returns the size of a fixed size column, 0 if not a fixed size column.
 @return        fixed size, or 0 */
@@ -252,7 +252,7 @@ dict_col_get_fixed_size(
 /*====================*/
        const dict_col_t*       col,    /*!< in: column */
        ulint                   comp)   /*!< in: nonzero=ROW_FORMAT=COMPACT  */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /***********************************************************************//**
 Returns the ROW_FORMAT=REDUNDANT stored SQL NULL size of a column.
 For fixed length types it is the fixed length of the type, otherwise 0.
@@ -263,7 +263,7 @@ dict_col_get_sql_null_size(
 /*=======================*/
        const dict_col_t*       col,    /*!< in: column */
        ulint                   comp)   /*!< in: nonzero=ROW_FORMAT=COMPACT  */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /*********************************************************************//**
 Gets the column number.
 @return        col->ind, table column position (starting from 0) */
@@ -272,7 +272,7 @@ ulint
 dict_col_get_no(
 /*============*/
        const dict_col_t*       col)    /*!< in: column */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /*********************************************************************//**
 Gets the column position in the clustered index. */
 UNIV_INLINE
@@ -281,7 +281,7 @@ dict_col_get_clust_pos(
 /*===================*/
        const dict_col_t*       col,            /*!< in: table column */
        const dict_index_t*     clust_index)    /*!< in: clustered index */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /****************************************************************//**
 If the given column name is reserved for InnoDB system columns, return
 TRUE.
@@ -291,7 +291,7 @@ ibool
 dict_col_name_is_reserved(
 /*======================*/
        const char*     name)   /*!< in: column name */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /********************************************************************//**
 Acquire the autoinc lock. */
 UNIV_INTERN
@@ -299,7 +299,7 @@ void
 dict_table_autoinc_lock(
 /*====================*/
        dict_table_t*   table)  /*!< in/out: table */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /********************************************************************//**
 Unconditionally set the autoinc counter. */
 UNIV_INTERN
@@ -308,7 +308,7 @@ dict_table_autoinc_initialize(
 /*==========================*/
        dict_table_t*   table,  /*!< in/out: table */
        ib_uint64_t     value)  /*!< in: next value to assign to a row */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 
 /** Store autoinc value when the table is evicted.
 @param[in]     table   table evicted */
@@ -333,7 +333,7 @@ ib_uint64_t
 dict_table_autoinc_read(
 /*====================*/
        const dict_table_t*     table)  /*!< in: table */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /********************************************************************//**
 Updates the autoinc counter if the value supplied is greater than the
 current value. */
@@ -344,7 +344,7 @@ dict_table_autoinc_update_if_greater(
 
        dict_table_t*   table,  /*!< in/out: table */
        ib_uint64_t     value)  /*!< in: value which was assigned to a row */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /********************************************************************//**
 Release the autoinc lock. */
 UNIV_INTERN
@@ -352,7 +352,7 @@ void
 dict_table_autoinc_unlock(
 /*======================*/
        dict_table_t*   table)  /*!< in/out: table */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 #endif /* !UNIV_HOTBACKUP */
 /**********************************************************************//**
 Adds system columns to a table object. */
@@ -362,7 +362,7 @@ dict_table_add_system_columns(
 /*==========================*/
        dict_table_t*   table,  /*!< in/out: table */
        mem_heap_t*     heap)   /*!< in: temporary heap */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 #ifndef UNIV_HOTBACKUP
 /**********************************************************************//**
 Adds a table object to the dictionary cache. */
@@ -373,7 +373,7 @@ dict_table_add_to_cache(
        dict_table_t*   table,          /*!< in: table */
        ibool           can_be_evicted, /*!< in: TRUE if can be evicted*/
        mem_heap_t*     heap)           /*!< in: temporary heap */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /**********************************************************************//**
 Removes a table object from the dictionary cache. */
 UNIV_INTERN
@@ -381,7 +381,7 @@ void
 dict_table_remove_from_cache(
 /*=========================*/
        dict_table_t*   table)  /*!< in, own: table */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /**********************************************************************//**
 Removes a table object from the dictionary cache. */
 UNIV_INTERN
@@ -404,7 +404,7 @@ dict_table_rename_in_cache(
                                        /*!< in: in ALTER TABLE we want
                                        to preserve the original table name
                                        in constraints which reference it */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /**********************************************************************//**
 Removes an index from the dictionary cache. */
 UNIV_INTERN
@@ -413,7 +413,7 @@ dict_index_remove_from_cache(
 /*=========================*/
        dict_table_t*   table,  /*!< in/out: table */
        dict_index_t*   index)  /*!< in, own: index */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /**********************************************************************//**
 Change the id of a table object in the dictionary cache. This is used in
 DISCARD TABLESPACE. */
@@ -423,7 +423,7 @@ dict_table_change_id_in_cache(
 /*==========================*/
        dict_table_t*   table,  /*!< in/out: table object already in cache */
        table_id_t      new_id) /*!< in: new id to set */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /**********************************************************************//**
 Removes a foreign constraint struct from the dictionary cache. */
 UNIV_INTERN
@@ -431,7 +431,7 @@ void
 dict_foreign_remove_from_cache(
 /*===========================*/
        dict_foreign_t* foreign)        /*!< in, own: foreign constraint */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /**********************************************************************//**
 Adds a foreign key constraint object to the dictionary cache. May free
 the object if there already is an object with the same identifier in.
@@ -452,7 +452,7 @@ dict_foreign_add_to_cache(
                                compatibility */
        dict_err_ignore_t       ignore_err)
                                /*!< in: error to be ignored */
-       __attribute__((nonnull(1), warn_unused_result));
+       MY_ATTRIBUTE((nonnull(1), warn_unused_result));
 /*********************************************************************//**
 Checks if a table is referenced by foreign keys.
 @return        TRUE if table is referenced by a foreign key */
@@ -461,7 +461,7 @@ ibool
 dict_table_is_referenced_by_foreign_key(
 /*====================================*/
        const dict_table_t*     table)  /*!< in: InnoDB table */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /**********************************************************************//**
 Replace the index passed in with another equivalent index in the
 foreign key lists of the table.
@@ -475,7 +475,7 @@ dict_foreign_replace_index(
                                        /*!< in: column names, or NULL
                                        to use table->col_names */
        const dict_index_t*     index)  /*!< in: index to be replaced */
-       __attribute__((nonnull(1,3), warn_unused_result));
+       MY_ATTRIBUTE((nonnull(1,3), warn_unused_result));
 /**********************************************************************//**
 Determines whether a string starts with the specified keyword.
 @return TRUE if str starts with keyword */
@@ -486,7 +486,7 @@ dict_str_starts_with_keyword(
        THD*            thd,            /*!< in: MySQL thread handle */
        const char*     str,            /*!< in: string to scan for keyword */
        const char*     keyword)        /*!< in: keyword to look for */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /*********************************************************************//**
 Scans a table create SQL string and adds to the data dictionary
 the foreign key constraints declared in the string. This function
@@ -515,7 +515,7 @@ dict_create_foreign_constraints(
        ibool           reject_fks)     /*!< in: if TRUE, fail with error
                                        code DB_CANNOT_ADD_CONSTRAINT if
                                        any foreign keys are found. */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /**********************************************************************//**
 Parses the CONSTRAINT id's to be dropped in an ALTER TABLE statement.
 @return DB_SUCCESS or DB_CANNOT_DROP_CONSTRAINT if syntax error or the
@@ -532,7 +532,7 @@ dict_foreign_parse_drop_constraints(
                                                to drop */
        const char***   constraints_to_drop)    /*!< out: id's of the
                                                constraints to drop */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /**********************************************************************//**
 Returns a table object and increments its open handle count.
 NOTE! This is a high-level function to be used mainly from outside the
@@ -551,7 +551,7 @@ dict_table_open_on_name(
        dict_err_ignore_t
                        ignore_err)     /*!< in: error to be ignored when
                                        loading the table */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 
 /*********************************************************************//**
 Tries to find an index whose first fields are the columns in the array,
@@ -580,7 +580,7 @@ dict_foreign_find_index(
                                        /*!< in: nonzero if none of
                                        the columns must be declared
                                        NOT NULL */
-       __attribute__((nonnull(1,3), warn_unused_result));
+       MY_ATTRIBUTE((nonnull(1,3), warn_unused_result));
 /**********************************************************************//**
 Returns a column's name.
 @return column name. NOTE: not guaranteed to stay valid if table is
@@ -591,7 +591,7 @@ dict_table_get_col_name(
 /*====================*/
        const dict_table_t*     table,  /*!< in: table */
        ulint                   col_nr) /*!< in: column number */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /**********************************************************************//**
 Prints a table data. */
 UNIV_INTERN
@@ -599,7 +599,7 @@ void
 dict_table_print(
 /*=============*/
        dict_table_t*   table)  /*!< in: table */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /**********************************************************************//**
 Outputs info on foreign keys of a table. */
 UNIV_INTERN
@@ -613,7 +613,7 @@ dict_print_info_on_foreign_keys(
        FILE*           file,   /*!< in: file where to print */
        trx_t*          trx,    /*!< in: transaction */
        dict_table_t*   table)  /*!< in: table */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /**********************************************************************//**
 Outputs info on a foreign key of a table in a format suitable for
 CREATE TABLE. */
@@ -625,7 +625,7 @@ dict_print_info_on_foreign_key_in_create_format(
        trx_t*          trx,            /*!< in: transaction */
        dict_foreign_t* foreign,        /*!< in: foreign key constraint */
        ibool           add_newline)    /*!< in: whether to add a newline */
-       __attribute__((nonnull(1,3)));
+       MY_ATTRIBUTE((nonnull(1,3)));
 /********************************************************************//**
 Displays the names of the index and the table. */
 UNIV_INTERN
@@ -635,7 +635,7 @@ dict_index_name_print(
        FILE*                   file,   /*!< in: output stream */
        const trx_t*            trx,    /*!< in: transaction */
        const dict_index_t*     index)  /*!< in: index to print */
-       __attribute__((nonnull(1,3)));
+       MY_ATTRIBUTE((nonnull(1,3)));
 /*********************************************************************//**
 Tries to find an index whose first fields are the columns in the array,
 in the same order and is not marked for deletion and is not the same
@@ -664,7 +664,7 @@ dict_foreign_qualify_index(
                                        /*!< in: nonzero if none of
                                        the columns must be declared
                                        NOT NULL */
-       __attribute__((nonnull(1,3), warn_unused_result));
+       MY_ATTRIBUTE((nonnull(1,3), warn_unused_result));
 #ifdef UNIV_DEBUG
 /********************************************************************//**
 Gets the first index on the table (the clustered index).
@@ -674,7 +674,7 @@ dict_index_t*
 dict_table_get_first_index(
 /*=======================*/
        const dict_table_t*     table)  /*!< in: table */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /********************************************************************//**
 Gets the last index on the table.
 @return        index, NULL if none exists */
@@ -683,7 +683,7 @@ dict_index_t*
 dict_table_get_last_index(
 /*=======================*/
        const dict_table_t*     table)  /*!< in: table */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /********************************************************************//**
 Gets the next index on the table.
 @return        index, NULL if none left */
@@ -692,7 +692,7 @@ dict_index_t*
 dict_table_get_next_index(
 /*======================*/
        const dict_index_t*     index)  /*!< in: index */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 #else /* UNIV_DEBUG */
 # define dict_table_get_first_index(table) UT_LIST_GET_FIRST((table)->indexes)
 # define dict_table_get_last_index(table) UT_LIST_GET_LAST((table)->indexes)
@@ -721,7 +721,7 @@ ulint
 dict_index_is_clust(
 /*================*/
        const dict_index_t*     index)  /*!< in: index */
-       __attribute__((nonnull, pure, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
 /********************************************************************//**
 Check whether the index is unique.
 @return        nonzero for unique index, zero for other indexes */
@@ -730,7 +730,7 @@ ulint
 dict_index_is_unique(
 /*=================*/
        const dict_index_t*     index)  /*!< in: index */
-       __attribute__((nonnull, pure, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
 /********************************************************************//**
 Check whether the index is the insert buffer tree.
 @return        nonzero for insert buffer, zero for other indexes */
@@ -739,7 +739,7 @@ ulint
 dict_index_is_ibuf(
 /*===============*/
        const dict_index_t*     index)  /*!< in: index */
-       __attribute__((nonnull, pure, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
 /********************************************************************//**
 Check whether the index is a secondary index or the insert buffer tree.
 @return        nonzero for insert buffer, zero for other indexes */
@@ -748,7 +748,7 @@ ulint
 dict_index_is_sec_or_ibuf(
 /*======================*/
        const dict_index_t*     index)  /*!< in: index */
-       __attribute__((nonnull, pure, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
 
 /************************************************************************
 Gets the all the FTS indexes for the table. NOTE: must not be called for
@@ -760,7 +760,7 @@ dict_table_get_all_fts_indexes(
                                /* out: number of indexes collected */
        dict_table_t*   table,  /* in: table */
        ib_vector_t*    indexes)/* out: vector for collecting FTS indexes */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /********************************************************************//**
 Gets the number of user-defined columns in a table in the dictionary
 cache.
@@ -770,7 +770,7 @@ ulint
 dict_table_get_n_user_cols(
 /*=======================*/
        const dict_table_t*     table)  /*!< in: table */
-       __attribute__((nonnull, pure, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
 /********************************************************************//**
 Gets the number of system columns in a table in the dictionary cache.
 @return        number of system (e.g., ROW_ID) columns of a table */
@@ -779,7 +779,7 @@ ulint
 dict_table_get_n_sys_cols(
 /*======================*/
        const dict_table_t*     table)  /*!< in: table */
-       __attribute__((nonnull, pure, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
 /********************************************************************//**
 Gets the number of all columns (also system) in a table in the dictionary
 cache.
@@ -789,7 +789,7 @@ ulint
 dict_table_get_n_cols(
 /*==================*/
        const dict_table_t*     table)  /*!< in: table */
-       __attribute__((nonnull, pure, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
 /********************************************************************//**
 Gets the approximately estimated number of rows in the table.
 @return        estimated number of rows */
@@ -798,7 +798,7 @@ ib_uint64_t
 dict_table_get_n_rows(
 /*==================*/
        const dict_table_t*     table)  /*!< in: table */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /********************************************************************//**
 Increment the number of rows in the table by one.
 Notice that this operation is not protected by any latch, the number is
@@ -808,7 +808,7 @@ void
 dict_table_n_rows_inc(
 /*==================*/
        dict_table_t*   table)  /*!< in/out: table */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /********************************************************************//**
 Decrement the number of rows in the table by one.
 Notice that this operation is not protected by any latch, the number is
@@ -818,7 +818,7 @@ void
 dict_table_n_rows_dec(
 /*==================*/
        dict_table_t*   table)  /*!< in/out: table */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 #ifdef UNIV_DEBUG
 /********************************************************************//**
 Gets the nth column of a table.
@@ -829,7 +829,7 @@ dict_table_get_nth_col(
 /*===================*/
        const dict_table_t*     table,  /*!< in: table */
        ulint                   pos)    /*!< in: position of column */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /********************************************************************//**
 Gets the given system column of a table.
 @return        pointer to column object */
@@ -839,7 +839,7 @@ dict_table_get_sys_col(
 /*===================*/
        const dict_table_t*     table,  /*!< in: table */
        ulint                   sys)    /*!< in: DATA_ROW_ID, ... */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 #else /* UNIV_DEBUG */
 #define dict_table_get_nth_col(table, pos) \
 ((table)->cols + (pos))
@@ -855,7 +855,7 @@ dict_table_get_sys_col_no(
 /*======================*/
        const dict_table_t*     table,  /*!< in: table */
        ulint                   sys)    /*!< in: DATA_ROW_ID, ... */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 #ifndef UNIV_HOTBACKUP
 /********************************************************************//**
 Returns the minimum data size of an index record.
@@ -865,7 +865,7 @@ ulint
 dict_index_get_min_size(
 /*====================*/
        const dict_index_t*     index)  /*!< in: index */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 #endif /* !UNIV_HOTBACKUP */
 /********************************************************************//**
 Check whether the table uses the compact page format.
@@ -875,7 +875,7 @@ ibool
 dict_table_is_comp(
 /*===============*/
        const dict_table_t*     table)  /*!< in: table */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /********************************************************************//**
 Determine the file format of a table.
 @return        file format version */
@@ -884,7 +884,7 @@ ulint
 dict_table_get_format(
 /*==================*/
        const dict_table_t*     table)  /*!< in: table */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /********************************************************************//**
 Determine the file format from a dict_table_t::flags.
 @return        file format version */
@@ -893,7 +893,7 @@ ulint
 dict_tf_get_format(
 /*===============*/
        ulint           flags)          /*!< in: dict_table_t::flags */
-       __attribute__((warn_unused_result));
+       MY_ATTRIBUTE((warn_unused_result));
 /********************************************************************//**
 Set the various values in a dict_table_t::flags pointer. */
 UNIV_INLINE
@@ -904,7 +904,7 @@ dict_tf_set(
        rec_format_t    format,         /*!< in: file format */
        ulint           zip_ssize,      /*!< in: zip shift size */
        bool            remote_path)    /*!< in: table uses DATA DIRECTORY */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /********************************************************************//**
 Convert a 32 bit integer table flags to the 32 bit integer that is
 written into the tablespace header at the offset FSP_SPACE_FLAGS and is
@@ -921,7 +921,7 @@ ulint
 dict_tf_to_fsp_flags(
 /*=================*/
        ulint   flags)  /*!< in: dict_table_t::flags */
-       __attribute__((const));
+       MY_ATTRIBUTE((const));
 /********************************************************************//**
 Extract the compressed page size from table flags.
 @return        compressed page size, or 0 if not compressed */
@@ -930,7 +930,7 @@ ulint
 dict_tf_get_zip_size(
 /*=================*/
        ulint   flags)                  /*!< in: flags */
-       __attribute__((const));
+       MY_ATTRIBUTE((const));
 /********************************************************************//**
 Check whether the table uses the compressed compact page format.
 @return        compressed page size, or 0 if not compressed */
@@ -939,7 +939,7 @@ ulint
 dict_table_zip_size(
 /*================*/
        const dict_table_t*     table)  /*!< in: table */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 #ifndef UNIV_HOTBACKUP
 /*********************************************************************//**
 Obtain exclusive locks on all index trees of the table. This is to prevent
@@ -950,7 +950,7 @@ void
 dict_table_x_lock_indexes(
 /*======================*/
        dict_table_t*   table)  /*!< in: table */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /*********************************************************************//**
 Release the exclusive locks on all index tree. */
 UNIV_INLINE
@@ -958,7 +958,7 @@ void
 dict_table_x_unlock_indexes(
 /*========================*/
        dict_table_t*   table)  /*!< in: table */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /********************************************************************//**
 Checks if a column is in the ordering columns of the clustered index of a
 table. Column prefixes are treated like whole columns.
@@ -969,7 +969,7 @@ dict_table_col_in_clustered_key(
 /*============================*/
        const dict_table_t*     table,  /*!< in: table */
        ulint                   n)      /*!< in: column number */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /*******************************************************************//**
 Check if the table has an FTS index.
 @return TRUE if table has an FTS index */
@@ -978,7 +978,7 @@ ibool
 dict_table_has_fts_index(
 /*=====================*/
        dict_table_t*   table)          /*!< in: table */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /*******************************************************************//**
 Copies types of columns contained in table to tuple and sets all
 fields of the tuple to the SQL NULL value.  This function should
@@ -989,7 +989,7 @@ dict_table_copy_types(
 /*==================*/
        dtuple_t*               tuple,  /*!< in/out: data tuple */
        const dict_table_t*     table)  /*!< in: table */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /********************************************************************
 Wait until all the background threads of the given table have exited, i.e.,
 bg_threads == 0. Note: bg_threads_mutex must be reserved when
@@ -1001,7 +1001,7 @@ dict_table_wait_for_bg_threads_to_exit(
        dict_table_t*   table,  /* in: table */
        ulint           delay)  /* in: time in microseconds to wait between
                                checks of bg_threads. */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /**********************************************************************//**
 Looks for an index with the given id. NOTE that we do not reserve
 the dictionary mutex: this function is for emergency purposes like
@@ -1012,7 +1012,7 @@ dict_index_t*
 dict_index_find_on_id_low(
 /*======================*/
        index_id_t      id)     /*!< in: index id */
-       __attribute__((warn_unused_result));
+       MY_ATTRIBUTE((warn_unused_result));
 /**********************************************************************//**
 Make room in the table cache by evicting an unused table. The unused table
 should not be part of FK relationship and currently not used in any user
@@ -1038,7 +1038,7 @@ dict_index_add_to_cache(
        ibool           strict) /*!< in: TRUE=refuse to create the index
                                if records could be too big to fit in
                                an B-tree page */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /**********************************************************************//**
 Removes an index from the dictionary cache. */
 UNIV_INTERN
@@ -1047,7 +1047,7 @@ dict_index_remove_from_cache(
 /*=========================*/
        dict_table_t*   table,  /*!< in/out: table */
        dict_index_t*   index)  /*!< in, own: index */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 #endif /* !UNIV_HOTBACKUP */
 /********************************************************************//**
 Gets the number of fields in the internal representation of an index,
@@ -1060,7 +1060,7 @@ dict_index_get_n_fields(
        const dict_index_t*     index)  /*!< in: an internal
                                        representation of index (in
                                        the dictionary cache) */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /********************************************************************//**
 Gets the number of fields in the internal representation of an index
 that uniquely determine the position of an index entry in the index, if
@@ -1073,7 +1073,7 @@ dict_index_get_n_unique(
 /*====================*/
        const dict_index_t*     index)  /*!< in: an internal representation
                                        of index (in the dictionary cache) */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /********************************************************************//**
 Gets the number of fields in the internal representation of an index
 which uniquely determine the position of an index entry in the index, if
@@ -1085,7 +1085,7 @@ dict_index_get_n_unique_in_tree(
 /*============================*/
        const dict_index_t*     index)  /*!< in: an internal representation
                                        of index (in the dictionary cache) */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /********************************************************************//**
 Gets the number of user-defined ordering fields in the index. In the internal
 representation we add the row id to the ordering fields to make all indexes
@@ -1098,7 +1098,7 @@ dict_index_get_n_ordering_defined_by_user(
 /*======================================*/
        const dict_index_t*     index)  /*!< in: an internal representation
                                        of index (in the dictionary cache) */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 #ifdef UNIV_DEBUG
 /********************************************************************//**
 Gets the nth field of an index.
@@ -1109,7 +1109,7 @@ dict_index_get_nth_field(
 /*=====================*/
        const dict_index_t*     index,  /*!< in: index */
        ulint                   pos)    /*!< in: position of field */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 #else /* UNIV_DEBUG */
 # define dict_index_get_nth_field(index, pos) ((index)->fields + (pos))
 #endif /* UNIV_DEBUG */
@@ -1122,7 +1122,7 @@ dict_index_get_nth_col(
 /*===================*/
        const dict_index_t*     index,  /*!< in: index */
        ulint                   pos)    /*!< in: position of the field */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /********************************************************************//**
 Gets the column number of the nth field in an index.
 @return        column number */
@@ -1132,7 +1132,7 @@ dict_index_get_nth_col_no(
 /*======================*/
        const dict_index_t*     index,  /*!< in: index */
        ulint                   pos)    /*!< in: position of the field */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /********************************************************************//**
 Looks for column n in an index.
 @return position in internal representation of the index;
@@ -1143,7 +1143,7 @@ dict_index_get_nth_col_pos(
 /*=======================*/
        const dict_index_t*     index,  /*!< in: index */
        ulint                   n)      /*!< in: column number */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /********************************************************************//**
 Looks for column n in an index.
 @return position in internal representation of the index;
@@ -1156,7 +1156,7 @@ dict_index_get_nth_col_or_prefix_pos(
        ulint                   n,              /*!< in: column number */
        ibool                   inc_prefix)     /*!< in: TRUE=consider
                                                column prefixes too */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /********************************************************************//**
 Returns TRUE if the index contains a column or a prefix of that column.
 @return        TRUE if contains the column or its prefix */
@@ -1166,7 +1166,7 @@ dict_index_contains_col_or_prefix(
 /*==============================*/
        const dict_index_t*     index,  /*!< in: index */
        ulint                   n)      /*!< in: column number */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /********************************************************************//**
 Looks for a matching field in an index. The column has to be the same. The
 column in index must be complete, or must contain a prefix longer than the
@@ -1181,7 +1181,7 @@ dict_index_get_nth_field_pos(
        const dict_index_t*     index,  /*!< in: index from which to search */
        const dict_index_t*     index2, /*!< in: index */
        ulint                   n)      /*!< in: field number in index2 */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /********************************************************************//**
 Looks for column n position in the clustered index.
 @return        position in internal representation of the clustered index */
@@ -1191,7 +1191,7 @@ dict_table_get_nth_col_pos(
 /*=======================*/
        const dict_table_t*     table,  /*!< in: table */
        ulint                   n)      /*!< in: column number */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /********************************************************************//**
 Returns the position of a system column in an index.
 @return        position, ULINT_UNDEFINED if not contained */
@@ -1201,7 +1201,7 @@ dict_index_get_sys_col_pos(
 /*=======================*/
        const dict_index_t*     index,  /*!< in: index */
        ulint                   type)   /*!< in: DATA_ROW_ID, ... */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /*******************************************************************//**
 Adds a column to index. */
 UNIV_INTERN
@@ -1212,7 +1212,7 @@ dict_index_add_col(
        const dict_table_t*     table,          /*!< in: table */
        dict_col_t*             col,            /*!< in: column */
        ulint                   prefix_len)     /*!< in: column prefix length */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 #ifndef UNIV_HOTBACKUP
 /*******************************************************************//**
 Copies types of fields contained in index to tuple. */
@@ -1224,7 +1224,7 @@ dict_index_copy_types(
        const dict_index_t*     index,          /*!< in: index */
        ulint                   n_fields)       /*!< in: number of
                                                field types to copy */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 #endif /* !UNIV_HOTBACKUP */
 /*********************************************************************//**
 Gets the field column.
@@ -1234,7 +1234,7 @@ const dict_col_t*
 dict_field_get_col(
 /*===============*/
        const dict_field_t*     field)  /*!< in: index field */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 #ifndef UNIV_HOTBACKUP
 /**********************************************************************//**
 Returns an index object if it is found in the dictionary cache.
@@ -1245,7 +1245,7 @@ dict_index_t*
 dict_index_get_if_in_cache_low(
 /*===========================*/
        index_id_t      index_id)       /*!< in: index id */
-       __attribute__((warn_unused_result));
+       MY_ATTRIBUTE((warn_unused_result));
 #if defined UNIV_DEBUG || defined UNIV_BUF_DEBUG
 /**********************************************************************//**
 Returns an index object if it is found in the dictionary cache.
@@ -1255,7 +1255,7 @@ dict_index_t*
 dict_index_get_if_in_cache(
 /*=======================*/
        index_id_t      index_id)       /*!< in: index id */
-       __attribute__((warn_unused_result));
+       MY_ATTRIBUTE((warn_unused_result));
 #endif /* UNIV_DEBUG || UNIV_BUF_DEBUG */
 #ifdef UNIV_DEBUG
 /**********************************************************************//**
@@ -1268,7 +1268,7 @@ dict_index_check_search_tuple(
 /*==========================*/
        const dict_index_t*     index,  /*!< in: index tree */
        const dtuple_t*         tuple)  /*!< in: tuple used in a search */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /** Whether and when to allow temporary index names */
 enum check_name {
        /** Require all indexes to be complete. */
@@ -1288,7 +1288,7 @@ dict_table_check_for_dup_indexes(
                                        in this table */
        enum check_name         check)  /*!< in: whether and when to allow
                                        temporary index names */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 #endif /* UNIV_DEBUG */
 /**********************************************************************//**
 Builds a node pointer out of a physical record and a page number.
@@ -1306,7 +1306,7 @@ dict_index_build_node_ptr(
                                        created */
        ulint                   level)  /*!< in: level of rec in tree:
                                        0 means leaf level */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /**********************************************************************//**
 Copies an initial segment of a physical record, long enough to specify an
 index entry uniquely.
@@ -1322,7 +1322,7 @@ dict_index_copy_rec_order_prefix(
        byte**                  buf,    /*!< in/out: memory buffer for the
                                        copied prefix, or NULL */
        ulint*                  buf_size)/*!< in/out: buffer size */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /**********************************************************************//**
 Builds a typed data tuple out of a physical record.
 @return        own: data tuple */
@@ -1334,7 +1334,7 @@ dict_index_build_data_tuple(
        rec_t*          rec,    /*!< in: record for which to build data tuple */
        ulint           n_fields,/*!< in: number of data fields */
        mem_heap_t*     heap)   /*!< in: memory heap where tuple created */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /*********************************************************************//**
 Gets the space id of the root of the index tree.
 @return        space id */
@@ -1343,7 +1343,7 @@ ulint
 dict_index_get_space(
 /*=================*/
        const dict_index_t*     index)  /*!< in: index */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /*********************************************************************//**
 Sets the space id of the root of the index tree. */
 UNIV_INLINE
@@ -1352,7 +1352,7 @@ dict_index_set_space(
 /*=================*/
        dict_index_t*   index,  /*!< in/out: index */
        ulint           space)  /*!< in: space id */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /*********************************************************************//**
 Gets the page number of the root of the index tree.
 @return        page number */
@@ -1361,7 +1361,7 @@ ulint
 dict_index_get_page(
 /*================*/
        const dict_index_t*     tree)   /*!< in: index */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /*********************************************************************//**
 Gets the read-write lock of the index tree.
 @return        read-write lock */
@@ -1370,7 +1370,7 @@ rw_lock_t*
 dict_index_get_lock(
 /*================*/
        dict_index_t*   index)  /*!< in: index */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /********************************************************************//**
 Returns free space reserved for future updates of records. This is
 relevant only in the case of many consecutive inserts, as updates
@@ -1390,7 +1390,7 @@ enum online_index_status
 dict_index_get_online_status(
 /*=========================*/
        const dict_index_t*     index)  /*!< in: secondary index */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /********************************************************************//**
 Sets the status of online index creation. */
 UNIV_INLINE
@@ -1399,7 +1399,7 @@ dict_index_set_online_status(
 /*=========================*/
        dict_index_t*                   index,  /*!< in/out: index */
        enum online_index_status        status) /*!< in: status */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /********************************************************************//**
 Determines if a secondary index is being or has been created online,
 or if the table is being rebuilt online, allowing concurrent modifications
@@ -1413,7 +1413,7 @@ bool
 dict_index_is_online_ddl(
 /*=====================*/
        const dict_index_t*     index)  /*!< in: index */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /*********************************************************************//**
 Calculates the minimum record length in an index. */
 UNIV_INTERN
@@ -1421,7 +1421,7 @@ ulint
 dict_index_calc_min_rec_len(
 /*========================*/
        const dict_index_t*     index)  /*!< in: index */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /********************************************************************//**
 Reserves the dictionary system mutex for MySQL. */
 UNIV_INTERN
@@ -1485,7 +1485,7 @@ dict_tables_have_same_db(
                                dbname '/' tablename */
        const char*     name2)  /*!< in: table name in the form
                                dbname '/' tablename */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /*********************************************************************//**
 Removes an index from the cache */
 UNIV_INTERN
@@ -1494,7 +1494,7 @@ dict_index_remove_from_cache(
 /*=========================*/
        dict_table_t*   table,  /*!< in/out: table */
        dict_index_t*   index)  /*!< in, own: index */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /**********************************************************************//**
 Get index by name
 @return        index, NULL if does not exist */
@@ -1504,7 +1504,7 @@ dict_table_get_index_on_name(
 /*=========================*/
        dict_table_t*   table,  /*!< in: table */
        const char*     name)   /*!< in: name of the index to find */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /**********************************************************************//**
 In case there is more than one index with the same name return the index
 with the min(id).
@@ -1515,7 +1515,7 @@ dict_table_get_index_on_name_and_min_id(
 /*====================================*/
        dict_table_t*   table,  /*!< in: table */
        const char*     name)   /*!< in: name of the index to find */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /***************************************************************
 Check whether a column exists in an FTS index. */
 UNIV_INLINE
@@ -1526,7 +1526,7 @@ dict_table_is_fts_column(
                                the offset within the vector */
        ib_vector_t*    indexes,/* in: vector containing only FTS indexes */
        ulint           col_no) /* in: col number to search for */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /**********************************************************************//**
 Move a table to the non LRU end of the LRU list. */
 UNIV_INTERN
@@ -1534,7 +1534,7 @@ void
 dict_table_move_from_lru_to_non_lru(
 /*================================*/
        dict_table_t*   table)  /*!< in: table to move from LRU to non-LRU */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /**********************************************************************//**
 Move a table to the LRU list from the non-LRU list. */
 UNIV_INTERN
@@ -1542,7 +1542,7 @@ void
 dict_table_move_from_non_lru_to_lru(
 /*================================*/
        dict_table_t*   table)  /*!< in: table to move from non-LRU to LRU */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /**********************************************************************//**
 Move to the most recently used segment of the LRU list. */
 UNIV_INTERN
@@ -1550,7 +1550,7 @@ void
 dict_move_to_mru(
 /*=============*/
        dict_table_t*   table)  /*!< in: table to move to MRU */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 
 /** Maximum number of columns in a foreign key constraint. Please Note MySQL
 has a much lower limit on the number of columns allowed in a foreign key
@@ -1674,7 +1674,7 @@ dict_table_schema_check(
                                                != DB_TABLE_NOT_FOUND is
                                                returned */
        size_t                  errstr_sz)      /*!< in: errstr size */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /* @} */
 
 /*********************************************************************//**
@@ -1692,7 +1692,7 @@ dict_fs2utf8(
        size_t          db_utf8_size,   /*!< in: dbname_utf8 size */
        char*           table_utf8,     /*!< out: table name, e.g. aюbØc */
        size_t          table_utf8_size)/*!< in: table_utf8 size */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 
 /**********************************************************************//**
 Closes the data dictionary module. */
@@ -1709,7 +1709,7 @@ ulint
 dict_table_is_corrupted(
 /*====================*/
        const dict_table_t*     table)  /*!< in: table */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 
 /**********************************************************************//**
 Check whether the index is corrupted.
@@ -1719,7 +1719,7 @@ ulint
 dict_index_is_corrupted(
 /*====================*/
        const dict_index_t*     index)  /*!< in: index */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 
 #endif /* !UNIV_HOTBACKUP */
 /**********************************************************************//**
@@ -1732,7 +1732,7 @@ dict_set_corrupted(
        dict_index_t*   index,  /*!< in/out: index */
        trx_t*          trx,    /*!< in/out: transaction */
        const char*     ctx)    /*!< in: context */
-       UNIV_COLD __attribute__((nonnull));
+       UNIV_COLD MY_ATTRIBUTE((nonnull));
 
 /**********************************************************************//**
 Flags an index corrupted in the data dictionary cache only. This
@@ -1744,7 +1744,7 @@ dict_set_corrupted_index_cache_only(
 /*================================*/
        dict_index_t*   index,          /*!< in/out: index */
        dict_table_t*   table)          /*!< in/out: table */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 
 /**********************************************************************//**
 Flags a table with specified space_id corrupted in the table dictionary
@@ -1764,7 +1764,7 @@ bool
 dict_tf_is_valid(
 /*=============*/
        ulint           flags)          /*!< in: table flags */
-       __attribute__((warn_unused_result));
+       MY_ATTRIBUTE((warn_unused_result));
 
 /********************************************************************//**
 Check if the tablespace for the table has been discarded.
@@ -1774,7 +1774,7 @@ bool
 dict_table_is_discarded(
 /*====================*/
        const dict_table_t*     table)  /*!< in: table to check */
-       __attribute__((nonnull, pure, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
 
 /********************************************************************//**
 Check if it is a temporary table.
@@ -1784,7 +1784,7 @@ bool
 dict_table_is_temporary(
 /*====================*/
        const dict_table_t*     table)  /*!< in: table to check */
-       __attribute__((nonnull, pure, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
 
 #ifndef UNIV_HOTBACKUP
 /*********************************************************************//**
@@ -1795,7 +1795,7 @@ void
 dict_index_zip_success(
 /*===================*/
        dict_index_t*   index)  /*!< in/out: index to be updated. */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /*********************************************************************//**
 This function should be called whenever a page compression attempt
 fails. Updates the compression padding information. */
@@ -1804,7 +1804,7 @@ void
 dict_index_zip_failure(
 /*===================*/
        dict_index_t*   index)  /*!< in/out: index to be updated. */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /*********************************************************************//**
 Return the optimal page size, for which page will likely compress.
 @return page size beyond which page may not compress*/
@@ -1814,7 +1814,7 @@ dict_index_zip_pad_optimal_page_size(
 /*=================================*/
        dict_index_t*   index)  /*!< in: index for which page size
                                is requested */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /*************************************************************//**
 Convert table flag to row format string.
 @return row format name */
index fac54d9488bc59b22b02d83baccd1baa01efe395..6fc6098f3d9c397acea9f252ec2cf8c993725fdd 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1996, 2015, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1996, 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
@@ -80,7 +80,8 @@ dict_col_copy_type(
        const dict_col_t*       col,    /*!< in: column */
        dtype_t*                type)   /*!< out: data type */
 {
-       ut_ad(col && type);
+       ut_ad(col != NULL);
+       ut_ad(type != NULL);
 
        type->mtype = col->mtype;
        type->prtype = col->prtype;
@@ -357,7 +358,7 @@ UNIV_INLINE
 ulint
 dict_table_get_n_sys_cols(
 /*======================*/
-       const dict_table_t*     table __attribute__((unused)))  /*!< in: table */
+       const dict_table_t*     table MY_ATTRIBUTE((unused)))   /*!< in: table */
 {
        ut_ad(table);
        ut_ad(table->magic_n == DICT_TABLE_MAGIC_N);
index 030190b1a8e7a2d7d07404f4658382fdccda4847..dcbc3de8e942f00636aaf5c304a56d8c526a7dff 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1996, 2013, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1996, 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
@@ -243,7 +243,7 @@ dict_load_foreigns(
        bool                    check_charsets, /*!< in: whether to check
                                                charset compatibility */
        dict_err_ignore_t       ignore_err)     /*!< in: error to be ignored */
-       __attribute__((nonnull(1), warn_unused_result));
+       MY_ATTRIBUTE((nonnull(1), warn_unused_result));
 /********************************************************************//**
 Prints to the standard output information on all tables found in the data
 dictionary system table. */
index cec6e6d45e51079de4da052b3c0a4df485bed7d5..1dd7fda1661e4388dfbc10616f89912bf5fd36f0 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1996, 2015, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
 Copyright (c) 2012, Facebook Inc.
 
 This program is free software; you can redistribute it and/or modify it under
@@ -150,19 +150,19 @@ allows InnoDB to update_create_info() accordingly. */
 
 /** Bit mask of the COMPACT field */
 #define DICT_TF_MASK_COMPACT                           \
-               ((~(~0 << DICT_TF_WIDTH_COMPACT))       \
+               ((~(~0U << DICT_TF_WIDTH_COMPACT))      \
                << DICT_TF_POS_COMPACT)
 /** Bit mask of the ZIP_SSIZE field */
 #define DICT_TF_MASK_ZIP_SSIZE                         \
-               ((~(~0 << DICT_TF_WIDTH_ZIP_SSIZE))     \
+               ((~(~0U << DICT_TF_WIDTH_ZIP_SSIZE))    \
                << DICT_TF_POS_ZIP_SSIZE)
 /** Bit mask of the ATOMIC_BLOBS field */
 #define DICT_TF_MASK_ATOMIC_BLOBS                      \
-               ((~(~0 << DICT_TF_WIDTH_ATOMIC_BLOBS))  \
+               ((~(~0U << DICT_TF_WIDTH_ATOMIC_BLOBS)) \
                << DICT_TF_POS_ATOMIC_BLOBS)
 /** Bit mask of the DATA_DIR field */
 #define DICT_TF_MASK_DATA_DIR                          \
-               ((~(~0 << DICT_TF_WIDTH_DATA_DIR))      \
+               ((~(~0U << DICT_TF_WIDTH_DATA_DIR))     \
                << DICT_TF_POS_DATA_DIR)
 
 /** Return the value of the COMPACT field */
@@ -196,7 +196,7 @@ for unknown bits in order to protect backward incompatibility. */
 /* @{ */
 /** Total number of bits in table->flags2. */
 #define DICT_TF2_BITS                  7
-#define DICT_TF2_BIT_MASK              ~(~0 << DICT_TF2_BITS)
+#define DICT_TF2_BIT_MASK              ~(~0U << DICT_TF2_BITS)
 
 /** TEMPORARY; TRUE for tables from CREATE TEMPORARY TABLE. */
 #define DICT_TF2_TEMPORARY             1
@@ -276,7 +276,7 @@ dict_mem_table_add_col(
        ulint           mtype,  /*!< in: main datatype */
        ulint           prtype, /*!< in: precise type */
        ulint           len)    /*!< in: precision */
-       __attribute__((nonnull(1)));
+       MY_ATTRIBUTE((nonnull(1)));
 /**********************************************************************//**
 Renames a column of a table in the data dictionary cache. */
 UNIV_INTERN
@@ -287,7 +287,7 @@ dict_mem_table_col_rename(
        unsigned        nth_col,/*!< in: column index */
        const char*     from,   /*!< in: old column name */
        const char*     to)     /*!< in: new column name */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /**********************************************************************//**
 This function populates a dict_col_t memory structure with
 supplied information. */
index 186f90e3694db09d3db792b4c29447b506e2db94..35ee1a00d8a7ec8ead8b9dc2b832453d205f95b3 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 2009, 2012, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2009, 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
@@ -77,7 +77,7 @@ dict_stats_set_persistent(
        dict_table_t*   table,  /*!< in/out: table */
        ibool           ps_on,  /*!< in: persistent stats explicitly enabled */
        ibool           ps_off) /*!< in: persistent stats explicitly disabled */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 
 /*********************************************************************//**
 Check whether persistent statistics is enabled for a given table.
@@ -87,7 +87,7 @@ ibool
 dict_stats_is_persistent_enabled(
 /*=============================*/
        const dict_table_t*     table)  /*!< in: table */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 
 /*********************************************************************//**
 Set the auto recalc flag for a given table (only honored for a persistent
@@ -127,7 +127,7 @@ void
 dict_stats_deinit(
 /*==============*/
        dict_table_t*   table)  /*!< in/out: table */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 
 /*********************************************************************//**
 Calculates new estimates for table and index statistics. The statistics
@@ -179,7 +179,7 @@ void
 dict_stats_update_for_index(
 /*========================*/
        dict_index_t*   index)  /*!< in/out: index */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 
 /*********************************************************************//**
 Renames a table in InnoDB persistent stats storage.
index e866ab419fef646cc1adee1aa6907b1f8db8d615..82cd2b468b9f7e2f6c1366ea19bebe287b506896 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 2012, 2013, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2012, 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
@@ -74,7 +74,7 @@ bool
 dict_stats_stop_bg(
 /*===============*/
        dict_table_t*   table)  /*!< in/out: table */
-       __attribute__((warn_unused_result));
+       MY_ATTRIBUTE((warn_unused_result));
 
 /*****************************************************************//**
 Wait until background stats thread has stopped using the specified table.
index 7f23302d1ff5a98e89ff287dd9cf76179ed48295..1bd10b6bf58bc7393dc30f9a4a5e9ad8639b7224 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1996, 2013, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1996, 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
@@ -48,7 +48,7 @@ dyn_array_create(
 /*=============*/
        dyn_array_t*    arr)    /*!< in/out memory buffer of
                                size sizeof(dyn_array_t) */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /************************************************************//**
 Frees a dynamic array. */
 UNIV_INLINE
@@ -56,7 +56,7 @@ void
 dyn_array_free(
 /*===========*/
        dyn_array_t*    arr)    /*!< in,own: dyn array */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /*********************************************************************//**
 Makes room on top of a dyn array and returns a pointer to a buffer in it.
 After copying the elements, the caller must close the buffer using
@@ -69,7 +69,7 @@ dyn_array_open(
        dyn_array_t*    arr,    /*!< in: dynamic array */
        ulint           size)   /*!< in: size in bytes of the buffer; MUST be
                                smaller than DYN_ARRAY_DATA_SIZE! */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /*********************************************************************//**
 Closes the buffer returned by dyn_array_open. */
 UNIV_INLINE
@@ -78,7 +78,7 @@ dyn_array_close(
 /*============*/
        dyn_array_t*    arr,    /*!< in: dynamic array */
        const byte*     ptr)    /*!< in: end of used space */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /*********************************************************************//**
 Makes room on top of a dyn array and returns a pointer to
 the added element. The caller must copy the element to
@@ -90,7 +90,7 @@ dyn_array_push(
 /*===========*/
        dyn_array_t*    arr,    /*!< in/out: dynamic array */
        ulint           size)   /*!< in: size in bytes of the element */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /************************************************************//**
 Returns pointer to an element in dyn array.
 @return        pointer to element */
@@ -101,7 +101,7 @@ dyn_array_get_element(
        const dyn_array_t*      arr,    /*!< in: dyn array */
        ulint                   pos)    /*!< in: position of element
                                        in bytes from array start */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /************************************************************//**
 Returns the size of stored data in a dyn array.
 @return        data size in bytes */
@@ -110,7 +110,7 @@ ulint
 dyn_array_get_data_size(
 /*====================*/
        const dyn_array_t*      arr)    /*!< in: dyn array */
-       __attribute__((nonnull, warn_unused_result, pure));
+       MY_ATTRIBUTE((nonnull, warn_unused_result, pure));
 /************************************************************//**
 Gets the first block in a dyn array.
 @param arr     dyn array
@@ -144,7 +144,7 @@ ulint
 dyn_block_get_used(
 /*===============*/
        const dyn_block_t*      block)  /*!< in: dyn array block */
-       __attribute__((nonnull, warn_unused_result, pure));
+       MY_ATTRIBUTE((nonnull, warn_unused_result, pure));
 /********************************************************************//**
 Gets pointer to the start of data in a dyn array block.
 @return        pointer to data */
@@ -153,7 +153,7 @@ byte*
 dyn_block_get_data(
 /*===============*/
        const dyn_block_t*      block)  /*!< in: dyn array block */
-       __attribute__((nonnull, warn_unused_result, pure));
+       MY_ATTRIBUTE((nonnull, warn_unused_result, pure));
 /********************************************************//**
 Pushes n bytes to a dyn array. */
 UNIV_INLINE
@@ -163,7 +163,7 @@ dyn_push_string(
        dyn_array_t*    arr,    /*!< in/out: dyn array */
        const byte*     str,    /*!< in: string to write */
        ulint           len)    /*!< in: string length */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 
 /*#################################################################*/
 
index 0296554e2eeed9109377f8e87a5a1d6511021deb..f18f2e6dff995a8eee262e666fce7a165bf609b2 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1996, 2013, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1996, 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
@@ -36,7 +36,7 @@ dyn_block_t*
 dyn_array_add_block(
 /*================*/
        dyn_array_t*    arr)    /*!< in/out: dyn array */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 
 /********************************************************************//**
 Gets the number of used bytes in a dyn array block.
index 43c9162914fed92f423c7b22d291d5d654e69cd7..4d2913846b58e8a9de42f0f1fab88a985dc13f20 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1995, 2015, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1995, 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
@@ -233,7 +233,7 @@ fil_node_create(
        ulint           id,     /*!< in: space id where to append */
        ibool           is_raw) /*!< in: TRUE if a raw device or
                                a raw disk partition */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 #ifdef UNIV_LOG_ARCHIVE
 /****************************************************************//**
 Drops files from the start of a file space, so that its size is cut by
@@ -400,7 +400,7 @@ fil_read_first_page(
                                                lsn values in data files */
        lsn_t*          max_flushed_lsn)        /*!< out: max of flushed
                                                lsn values in data files */
-       __attribute__((warn_unused_result));
+       MY_ATTRIBUTE((warn_unused_result));
 /*******************************************************************//**
 Increments the count of pending operation, if space is not being deleted.
 @return        TRUE if being deleted, and operation should be skipped */
@@ -488,7 +488,7 @@ dberr_t
 fil_discard_tablespace(
 /*===================*/
        ulint   id)     /*!< in: space id */
-       __attribute__((warn_unused_result));
+       MY_ATTRIBUTE((warn_unused_result));
 #endif /* !UNIV_HOTBACKUP */
 
 /** Test if a tablespace file can be renamed to a new filepath by checking
@@ -597,7 +597,7 @@ fil_create_new_single_table_tablespace(
        ulint           size)           /*!< in: the initial size of the
                                        tablespace file in pages,
                                        must be >= FIL_IBD_FILE_INITIAL_SIZE */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 #ifndef UNIV_HOTBACKUP
 /********************************************************************//**
 Tries to open a single-table tablespace and optionally checks the space id is
@@ -631,7 +631,7 @@ fil_open_single_table_tablespace(
        const char*     tablename,      /*!< in: table name in the
                                        databasename/tablename format */
        const char*     filepath)       /*!< in: tablespace filepath */
-       __attribute__((nonnull(5), warn_unused_result));
+       MY_ATTRIBUTE((nonnull(5), warn_unused_result));
 
 #endif /* !UNIV_HOTBACKUP */
 /********************************************************************//**
@@ -780,7 +780,7 @@ fil_io(
                                appropriately aligned */
        void*   message)        /*!< in: message for aio handler if non-sync
                                aio used, else ignored */
-       __attribute__((nonnull(8)));
+       MY_ATTRIBUTE((nonnull(8)));
 /**********************************************************************//**
 Waits for an aio operation to complete. This function is used to write the
 handler for completed requests. The aio array of pending requests is divided
@@ -975,7 +975,7 @@ fil_tablespace_iterate(
        dict_table_t*           table,
        ulint                   n_io_buffers,
        PageCallback&           callback)
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 
 /*******************************************************************//**
 Checks if a single-table tablespace for a given table name exists in the
@@ -999,7 +999,7 @@ fil_get_space_names(
 /*================*/
        space_name_list_t&      space_name_list)
                                /*!< in/out: Vector for collecting the names. */
-       __attribute__((warn_unused_result));
+       MY_ATTRIBUTE((warn_unused_result));
 
 /** Generate redo log for swapping two .ibd files
 @param[in]     old_table       old table
@@ -1014,7 +1014,7 @@ fil_mtr_rename_log(
        const dict_table_t*     new_table,
        const char*             tmp_name,
        mtr_t*                  mtr)
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 
 /*******************************************************************//**
 Finds the given page_no of the given space id from the double write buffer,
index a587ccc9f20d335277659ec18abb9a7f1d68443c..099cb8edc14d9048d0135c53e602c17ebe99faa5 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1995, 2012, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1995, 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
@@ -83,23 +83,23 @@ is found in a remote location, not the default data directory. */
 
 /** Bit mask of the POST_ANTELOPE field */
 #define FSP_FLAGS_MASK_POST_ANTELOPE                           \
-               ((~(~0 << FSP_FLAGS_WIDTH_POST_ANTELOPE))       \
+               ((~(~0U << FSP_FLAGS_WIDTH_POST_ANTELOPE))      \
                << FSP_FLAGS_POS_POST_ANTELOPE)
 /** Bit mask of the ZIP_SSIZE field */
 #define FSP_FLAGS_MASK_ZIP_SSIZE                               \
-               ((~(~0 << FSP_FLAGS_WIDTH_ZIP_SSIZE))           \
+               ((~(~0U << FSP_FLAGS_WIDTH_ZIP_SSIZE))          \
                << FSP_FLAGS_POS_ZIP_SSIZE)
 /** Bit mask of the ATOMIC_BLOBS field */
 #define FSP_FLAGS_MASK_ATOMIC_BLOBS                            \
-               ((~(~0 << FSP_FLAGS_WIDTH_ATOMIC_BLOBS))        \
+               ((~(~0U << FSP_FLAGS_WIDTH_ATOMIC_BLOBS))       \
                << FSP_FLAGS_POS_ATOMIC_BLOBS)
 /** Bit mask of the PAGE_SSIZE field */
 #define FSP_FLAGS_MASK_PAGE_SSIZE                              \
-               ((~(~0 << FSP_FLAGS_WIDTH_PAGE_SSIZE))          \
+               ((~(~0U << FSP_FLAGS_WIDTH_PAGE_SSIZE))         \
                << FSP_FLAGS_POS_PAGE_SSIZE)
 /** Bit mask of the DATA_DIR field */
 #define FSP_FLAGS_MASK_DATA_DIR                                        \
-               ((~(~0 << FSP_FLAGS_WIDTH_DATA_DIR))            \
+               ((~(~0U << FSP_FLAGS_WIDTH_DATA_DIR))           \
                << FSP_FLAGS_POS_DATA_DIR)
 
 /** Return the value of the POST_ANTELOPE field */
@@ -510,7 +510,7 @@ fseg_alloc_free_page_general(
                                in which the page should be initialized.
                                If init_mtr!=mtr, but the page is already
                                latched in mtr, do not initialize the page. */
-       __attribute__((warn_unused_result, nonnull));
+       MY_ATTRIBUTE((warn_unused_result, nonnull));
 /**********************************************************************//**
 Reserves free pages from a tablespace. All mini-transactions which may
 use several pages from the tablespace should call this function beforehand
@@ -579,7 +579,7 @@ fseg_page_is_free(
        fseg_header_t*  seg_header,     /*!< in: segment header */
        ulint           space,          /*!< in: space id */
        ulint           page)           /*!< in: page offset */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /**********************************************************************//**
 Frees part of a segment. This function can be used to free a segment
 by repeatedly calling this function in different mini-transactions.
@@ -675,7 +675,7 @@ bool
 fsp_flags_is_valid(
 /*===============*/
        ulint   flags)          /*!< in: tablespace flags */
-       __attribute__((warn_unused_result, const));
+       MY_ATTRIBUTE((warn_unused_result, const));
 /********************************************************************//**
 Determine if the tablespace is compressed from dict_table_t::flags.
 @return        TRUE if compressed, FALSE if not compressed */
index b2380f78b396ddac89b41bbdff4e734b3fc265af..50f62063893e04580505d968cfafac0f24f1a191 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 2007, 2014, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2007, 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
@@ -200,7 +200,7 @@ fts_ast_visit(
                                                and ignored processing an
                                                operator, currently we only
                                                ignore FTS_IGNORE operator */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /*****************************************************************//**
 Process (nested) sub-expression, create a new result set to store the
 sub-expression result by processing nodes under current sub-expression
@@ -213,7 +213,7 @@ fts_ast_visit_sub_exp(
        fts_ast_node_t*         node,           /*!< in: instance to traverse*/
        fts_ast_callback        visitor,        /*!< in: callback */
        void*                   arg)            /*!< in: callback arg */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /********************************************************************
 Create a lex instance.*/
 UNIV_INTERN
@@ -223,7 +223,7 @@ fts_lexer_create(
        ibool           boolean_mode,           /*!< in: query type */
        const byte*     query,                  /*!< in: query string */
        ulint           query_len)              /*!< in: query string len */
-       __attribute__((nonnull, malloc, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, malloc, warn_unused_result));
 /********************************************************************
 Free an fts_lexer_t instance.*/
 UNIV_INTERN
@@ -232,7 +232,7 @@ fts_lexer_free(
 /*===========*/
        fts_lexer_t*    fts_lexer)              /*!< in: lexer instance to
                                                free */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 
 /**
 Create an ast string object, with NUL-terminator, so the string
index 9f7b0216d9b8896c943dd4e5307cd83b697218ce..3e2f359bbebef9f40f0cca8f6f31fc76340bcb0c 100644 (file)
@@ -94,7 +94,10 @@ those defined in mysql file ft_global.h */
 /** Threshold where our optimize thread automatically kicks in */
 #define FTS_OPTIMIZE_THRESHOLD         10000000
 
-#define FTS_DOC_ID_MAX_STEP            10000
+/** Threshold to avoid exhausting of doc ids. Consecutive doc id difference
+should not exceed FTS_DOC_ID_MAX_STEP */
+#define FTS_DOC_ID_MAX_STEP            65535
+
 /** Variable specifying the FTS parallel sort degree */
 extern ulong           fts_sort_pll_degree;
 
@@ -372,6 +375,7 @@ extern bool         fts_need_sync;
 /** Variable specifying the table that has Fulltext index to display its
 content through information schema table */
 extern char*           fts_internal_tbl_name;
+extern char*           fts_internal_tbl_name2;
 
 #define        fts_que_graph_free(graph)                       \
 do {                                                   \
@@ -408,7 +412,7 @@ fts_get_next_doc_id(
 /*================*/
        const dict_table_t*     table,  /*!< in: table */
        doc_id_t*               doc_id) /*!< out: new document id */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /*********************************************************************//**
 Update the next and last Doc ID in the CONFIG table to be the input
 "doc_id" value (+ 1). We would do so after each FTS index build or
@@ -421,7 +425,7 @@ fts_update_next_doc_id(
        const dict_table_t*     table,          /*!< in: table */
        const char*             table_name,     /*!< in: table name, or NULL */
        doc_id_t                doc_id)         /*!< in: DOC ID to set */
-       __attribute__((nonnull(2)));
+       MY_ATTRIBUTE((nonnull(2)));
 
 /******************************************************************//**
 Create a new document id .
@@ -437,7 +441,7 @@ fts_create_doc_id(
                                                current row that is being
                                                inserted. */
        mem_heap_t*     heap)                   /*!< in: heap */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /******************************************************************//**
 Create a new fts_doc_ids_t.
 @return new fts_doc_ids_t. */
@@ -466,7 +470,7 @@ fts_trx_add_op(
        fts_row_state   state,                  /*!< in: state of the row */
        ib_vector_t*    fts_indexes)            /*!< in: FTS indexes affected
                                                (NULL=all) */
-       __attribute__((nonnull(1,2)));
+       MY_ATTRIBUTE((nonnull(1,2)));
 
 /******************************************************************//**
 Free an FTS trx. */
@@ -491,7 +495,7 @@ fts_create_common_tables(
                                                index */
        const char*     name,                   /*!< in: table name */
        bool            skip_doc_id_index)      /*!< in: Skip index on doc id */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /******************************************************************//**
 Wrapper function of fts_create_index_tables_low(), create auxiliary
 tables for an FTS index
@@ -503,7 +507,7 @@ fts_create_index_tables(
        trx_t*                  trx,            /*!< in: transaction handle */
        const dict_index_t*     index)          /*!< in: the FTS index
                                                instance */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /******************************************************************//**
 Creates the column specific ancillary tables needed for supporting an
 FTS index on the given table. row_mysql_lock_data_dictionary must have
@@ -519,7 +523,7 @@ fts_create_index_tables_low(
                                                instance */
        const char*     table_name,             /*!< in: the table name */
        table_id_t      table_id)               /*!< in: the table id */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /******************************************************************//**
 Add the FTS document id hidden column. */
 UNIV_INTERN
@@ -528,7 +532,7 @@ fts_add_doc_id_column(
 /*==================*/
        dict_table_t*   table,  /*!< in/out: Table with FTS index */
        mem_heap_t*     heap)   /*!< in: temporary memory heap, or NULL */
-       __attribute__((nonnull(1)));
+       MY_ATTRIBUTE((nonnull(1)));
 
 /*********************************************************************//**
 Drops the ancillary tables needed for supporting an FTS index on the
@@ -542,7 +546,7 @@ fts_drop_tables(
        trx_t*          trx,                    /*!< in: transaction */
        dict_table_t*   table)                  /*!< in: table has the FTS
                                                index */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /******************************************************************//**
 The given transaction is about to be committed; do whatever is necessary
 from the FTS system's POV.
@@ -552,7 +556,7 @@ dberr_t
 fts_commit(
 /*=======*/
        trx_t*          trx)                    /*!< in: transaction */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 
 /*******************************************************************//**
 FTS Query entry point.
@@ -569,7 +573,7 @@ fts_query(
                                                in bytes */
        fts_result_t**  result)                 /*!< out: query result, to be
                                                freed by the caller.*/
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 
 /******************************************************************//**
 Retrieve the FTS Relevance Ranking result for doc with doc_id
@@ -687,7 +691,7 @@ dberr_t
 fts_optimize_table(
 /*===============*/
        dict_table_t*   table)                  /*!< in: table to optimiza */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 
 /**********************************************************************//**
 Startup the optimize thread and create the work queue. */
@@ -713,7 +717,7 @@ fts_drop_index_tables(
 /*==================*/
        trx_t*          trx,                    /*!< in: transaction */
        dict_index_t*   index)                  /*!< in: Index to drop */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 
 /******************************************************************//**
 Remove the table from the OPTIMIZER's list. We do wait for
@@ -754,7 +758,7 @@ fts_savepoint_take(
        trx_t*          trx,                    /*!< in: transaction */
        fts_trx_t*      fts_trx,                /*!< in: fts transaction */
        const char*     name)                   /*!< in: savepoint name */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /**********************************************************************//**
 Refresh last statement savepoint. */
 UNIV_INTERN
@@ -762,7 +766,7 @@ void
 fts_savepoint_laststmt_refresh(
 /*===========================*/
        trx_t*          trx)                    /*!< in: transaction */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /**********************************************************************//**
 Release the savepoint data identified by  name. */
 UNIV_INTERN
@@ -780,13 +784,12 @@ fts_cache_destroy(
 /*==============*/
        fts_cache_t*    cache);                 /*!< in: cache*/
 
-/*********************************************************************//**
-Clear cache. */
+/** Clear cache.
+@param[in,out] cache   fts cache */
 UNIV_INTERN
 void
 fts_cache_clear(
-/*============*/
-       fts_cache_t*    cache);                 /*!< in: cache */
+       fts_cache_t*    cache);
 
 /*********************************************************************//**
 Initialize things in cache. */
@@ -821,6 +824,15 @@ void
 fts_drop_orphaned_tables(void);
 /*==========================*/
 
+/* Get parent table name if it's a fts aux table
+@param[in]     aux_table_name  aux table name
+@param[in]     aux_table_len   aux table length
+@return parent table name, or NULL */
+char*
+fts_get_parent_table_name(
+       const char*     aux_table_name,
+       ulint           aux_table_len);
+
 /******************************************************************//**
 Since we do a horizontal split on the index table, we need to drop
 all the split tables.
@@ -831,20 +843,22 @@ fts_drop_index_split_tables(
 /*========================*/
        trx_t*          trx,                    /*!< in: transaction */
        dict_index_t*   index)                  /*!< in: fts instance */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 
 /** Run SYNC on the table, i.e., write out data from the cache to the
 FTS auxiliary INDEX table and clear the cache at the end.
 @param[in,out] table           fts table
 @param[in]     unlock_cache    whether unlock cache when write node
 @param[in]     wait            whether wait for existing sync to finish
+@param[in]      has_dict        whether has dict operation lock
 @return DB_SUCCESS on success, error code on failure. */
 UNIV_INTERN
 dberr_t
 fts_sync_table(
        dict_table_t*   table,
        bool            unlock_cache,
-       bool            wait);
+       bool            wait,
+       bool            has_dict);
 
 /****************************************************************//**
 Free the query graph but check whether dict_sys->mutex is already
@@ -1023,7 +1037,7 @@ fts_drop_index(
        dict_table_t*   table,  /*!< in: Table where indexes are dropped */
        dict_index_t*   index,  /*!< in: Index to be dropped */
        trx_t*          trx)    /*!< in: Transaction for the drop */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 
 /****************************************************************//**
 Rename auxiliary tables for all fts index for a table
index b4d9e1d41ecf220ae07fe4db2e13c9e3a3de3666..2d4e9d88fd1a58484c43ab97b2bf5548118aeffe 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 2011, 2013, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2011, 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
@@ -121,7 +121,7 @@ fts_parse_sql(
        fts_table_t*    fts_table,      /*!< in: FTS aux table */
        pars_info_t*    info,           /*!< in: info struct, or NULL */
        const char*     sql)            /*!< in: SQL string to evaluate */
-       __attribute__((nonnull(3), malloc, warn_unused_result));
+       MY_ATTRIBUTE((nonnull(3), malloc, warn_unused_result));
 /******************************************************************//**
 Evaluate a parsed SQL statement
 @return DB_SUCCESS or error code */
@@ -131,7 +131,7 @@ fts_eval_sql(
 /*=========*/
        trx_t*          trx,            /*!< in: transaction */
        que_t*          graph)          /*!< in: Parsed statement */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /******************************************************************//**
 Construct the name of an ancillary FTS table for the given table.
 @return own: table name, must be freed with mem_free() */
@@ -141,7 +141,7 @@ fts_get_table_name(
 /*===============*/
        const fts_table_t*
                        fts_table)      /*!< in: FTS aux table info */
-       __attribute__((nonnull, malloc, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, malloc, warn_unused_result));
 /******************************************************************//**
 Construct the column specification part of the SQL string for selecting the
 indexed FTS columns for the given table. Adds the necessary bound
@@ -164,7 +164,7 @@ fts_get_select_columns_str(
        dict_index_t*   index,          /*!< in: FTS index */
        pars_info_t*    info,           /*!< in/out: parser info */
        mem_heap_t*     heap)           /*!< in: memory heap */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 
 /** define for fts_doc_fetch_by_doc_id() "option" value, defines whether
 we want to get Doc whose ID is equal to or greater or smaller than supplied
@@ -191,7 +191,7 @@ fts_doc_fetch_by_doc_id(
                        callback,       /*!< in: callback to read
                                        records */
        void*           arg)            /*!< in: callback arg */
-       __attribute__((nonnull(6)));
+       MY_ATTRIBUTE((nonnull(6)));
 
 /*******************************************************************//**
 Callback function for fetch that stores the text of an FTS document,
@@ -203,7 +203,7 @@ fts_query_expansion_fetch_doc(
 /*==========================*/
        void*           row,            /*!< in: sel_node_t* */
        void*           user_arg)       /*!< in: fts_doc_t* */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /********************************************************************
 Write out a single word's data as new entry/entries in the INDEX table.
 @return DB_SUCCESS if all OK. */
@@ -216,7 +216,7 @@ fts_write_node(
        fts_table_t*    fts_table,      /*!< in: the FTS aux index */
        fts_string_t*   word,           /*!< in: word in UTF-8 */
        fts_node_t*     node)           /*!< in: node columns */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /*******************************************************************//**
 Tokenize a document. */
 UNIV_INTERN
@@ -227,7 +227,7 @@ fts_tokenize_document(
                                        tokenize */
        fts_doc_t*      result)         /*!< out: if provided, save
                                        result tokens here */
-       __attribute__((nonnull(1)));
+       MY_ATTRIBUTE((nonnull(1)));
 
 /*******************************************************************//**
 Continue to tokenize a document. */
@@ -241,7 +241,7 @@ fts_tokenize_document_next(
                                        tokens from this tokenization */
        fts_doc_t*      result)         /*!< out: if provided, save
                                        result tokens here */
-       __attribute__((nonnull(1)));
+       MY_ATTRIBUTE((nonnull(1)));
 /******************************************************************//**
 Initialize a document. */
 UNIV_INTERN
@@ -249,7 +249,7 @@ void
 fts_doc_init(
 /*=========*/
        fts_doc_t*      doc)            /*!< in: doc to initialize */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 
 /******************************************************************//**
 Do a binary search for a doc id in the array
@@ -263,7 +263,7 @@ fts_bsearch(
        int             lower,          /*!< in: lower bound of array*/
        int             upper,          /*!< in: upper bound of array*/
        doc_id_t        doc_id)         /*!< in: doc id to lookup */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /******************************************************************//**
 Free document. */
 UNIV_INTERN
@@ -271,7 +271,7 @@ void
 fts_doc_free(
 /*=========*/
        fts_doc_t*      doc)            /*!< in: document */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /******************************************************************//**
 Free fts_optimizer_word_t instanace.*/
 UNIV_INTERN
@@ -279,7 +279,7 @@ void
 fts_word_free(
 /*==========*/
        fts_word_t*     word)           /*!< in: instance to free.*/
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /******************************************************************//**
 Read the rows from the FTS inde
 @return DB_SUCCESS or error code */
@@ -293,7 +293,7 @@ fts_index_fetch_nodes(
        const fts_string_t*
                        word,           /*!< in: the word to fetch */
        fts_fetch_t*    fetch)          /*!< in: fetch callback.*/
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /******************************************************************//**
 Create a fts_optimizer_word_t instance.
 @return new instance */
@@ -304,7 +304,7 @@ fts_word_init(
        fts_word_t*     word,           /*!< in: word to initialize */
        byte*           utf8,           /*!< in: UTF-8 string */
        ulint           len)            /*!< in: length of string in bytes */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /******************************************************************//**
 Compare two fts_trx_table_t instances, we actually compare the
 table id's here.
@@ -315,7 +315,7 @@ fts_trx_table_cmp(
 /*==============*/
        const void*     v1,             /*!< in: id1 */
        const void*     v2)             /*!< in: id2 */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /******************************************************************//**
 Compare a table id with a trx_table_t table id.
 @return < 0 if n1 < n2, 0 if n1 == n2, > 0 if n1 > n2 */
@@ -325,7 +325,7 @@ fts_trx_table_id_cmp(
 /*=================*/
        const void*     p1,             /*!< in: id1 */
        const void*     p2)             /*!< in: id2 */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /******************************************************************//**
 Commit a transaction.
 @return DB_SUCCESS if all OK */
@@ -334,7 +334,7 @@ dberr_t
 fts_sql_commit(
 /*===========*/
        trx_t*          trx)            /*!< in: transaction */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /******************************************************************//**
 Rollback a transaction.
 @return DB_SUCCESS if all OK */
@@ -343,7 +343,7 @@ dberr_t
 fts_sql_rollback(
 /*=============*/
        trx_t*          trx)            /*!< in: transaction */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /******************************************************************//**
 Parse an SQL string. %s is replaced with the table's id. Don't acquire
 the dict mutex
@@ -355,7 +355,7 @@ fts_parse_sql_no_dict_lock(
        fts_table_t*    fts_table,      /*!< in: table with FTS index */
        pars_info_t*    info,           /*!< in: parser info */
        const char*     sql)            /*!< in: SQL string to evaluate */
-       __attribute__((nonnull(3), malloc, warn_unused_result));
+       MY_ATTRIBUTE((nonnull(3), malloc, warn_unused_result));
 /******************************************************************//**
 Get value from config table. The caller must ensure that enough
 space is allocated for value to hold the column contents
@@ -370,7 +370,7 @@ fts_config_get_value(
                                        this parameter name */
        fts_string_t*   value)          /*!< out: value read from
                                        config table */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /******************************************************************//**
 Get value specific to an FTS index from the config table. The caller
 must ensure that enough space is allocated for value to hold the
@@ -386,7 +386,7 @@ fts_config_get_index_value(
                                        this parameter name */
        fts_string_t*   value)          /*!< out: value read from
                                        config table */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /******************************************************************//**
 Set the value in the config table for name.
 @return DB_SUCCESS or error code */
@@ -400,7 +400,7 @@ fts_config_set_value(
                                        this parameter name */
        const fts_string_t*
                        value)          /*!< in: value to update */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /****************************************************************//**
 Set an ulint value in the config table.
 @return DB_SUCCESS if all OK else error code */
@@ -412,7 +412,7 @@ fts_config_set_ulint(
        fts_table_t*    fts_table,      /*!< in: the indexed FTS table */
        const char*     name,           /*!< in: param name */
        ulint           int_value)      /*!< in: value */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /******************************************************************//**
 Set the value specific to an FTS index in the config table.
 @return DB_SUCCESS or error code */
@@ -426,7 +426,7 @@ fts_config_set_index_value(
                                        this parameter name */
        fts_string_t*   value)          /*!< out: value read from
                                        config table */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /******************************************************************//**
 Increment the value in the config table for column name.
 @return DB_SUCCESS or error code */
@@ -439,7 +439,7 @@ fts_config_increment_value(
        const char*     name,           /*!< in: increment config value
                                        for this parameter name */
        ulint           delta)          /*!< in: increment by this much */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /******************************************************************//**
 Increment the per index value in the config table for column name.
 @return DB_SUCCESS or error code */
@@ -452,7 +452,7 @@ fts_config_increment_index_value(
        const char*     name,           /*!< in: increment config value
                                        for this parameter name */
        ulint           delta)          /*!< in: increment by this much */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /******************************************************************//**
 Get an ulint value from the config table.
 @return DB_SUCCESS or error code */
@@ -464,7 +464,7 @@ fts_config_get_index_ulint(
        dict_index_t*   index,          /*!< in: FTS index */
        const char*     name,           /*!< in: param name */
        ulint*          int_value)      /*!< out: value */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /******************************************************************//**
 Set an ulint value int the config table.
 @return DB_SUCCESS or error code */
@@ -476,7 +476,7 @@ fts_config_set_index_ulint(
        dict_index_t*   index,          /*!< in: FTS index */
        const char*     name,           /*!< in: param name */
        ulint           int_value)      /*!< in: value */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /******************************************************************//**
 Get an ulint value from the config table.
 @return DB_SUCCESS or error code */
@@ -488,7 +488,7 @@ fts_config_get_ulint(
        fts_table_t*    fts_table,      /*!< in: the indexed FTS table */
        const char*     name,           /*!< in: param name */
        ulint*          int_value)      /*!< out: value */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /******************************************************************//**
 Search cache for word.
 @return the word node vector if found else NULL */
@@ -500,7 +500,7 @@ fts_cache_find_word(
                        index_cache,    /*!< in: cache to search */
        const fts_string_t*
                        text)           /*!< in: word to search for */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /******************************************************************//**
 Check cache for deleted doc id.
 @return TRUE if deleted */
@@ -511,7 +511,7 @@ fts_cache_is_deleted_doc_id(
        const fts_cache_t*
                        cache,          /*!< in: cache ito search */
        doc_id_t        doc_id)         /*!< in: doc id to search for */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /******************************************************************//**
 Append deleted doc ids to vector and sort the vector. */
 UNIV_INTERN
@@ -546,7 +546,7 @@ fts_get_total_word_count(
        trx_t*          trx,            /*!< in: transaction */
        dict_index_t*   index,          /*!< in: for this index */
        ulint*          total)          /*!< out: total words */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 #endif
 /******************************************************************//**
 Search the index specific cache for a particular FTS index.
@@ -559,7 +559,7 @@ fts_find_index_cache(
                        cache,          /*!< in: cache to search */
        const dict_index_t*
                        index)          /*!< in: index to search for */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /******************************************************************//**
 Write the table id to the given buffer (including final NUL). Buffer must be
 at least FTS_AUX_MIN_TABLE_ID_LENGTH bytes long.
@@ -570,10 +570,10 @@ fts_write_object_id(
 /*================*/
        ib_id_t         id,             /*!< in: a table/index id */
        char*           str,            /*!< in: buffer to write the id to */
-       bool            hex_format __attribute__((unused)))
+       bool            hex_format MY_ATTRIBUTE((unused)))
                                        /*!< in: true for fixed hex format,
                                        false for old ambiguous format */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /******************************************************************//**
 Read the table id from the string generated by fts_write_object_id().
 @return TRUE if parse successful */
@@ -583,7 +583,7 @@ fts_read_object_id(
 /*===============*/
        ib_id_t*        id,             /*!< out: a table id */
        const char*     str)            /*!< in: buffer to read from */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /******************************************************************//**
 Get the table id.
 @return number of bytes written */
@@ -596,7 +596,7 @@ fts_get_table_id(
        char*           table_id)       /*!< out: table id, must be at least
                                        FTS_AUX_MIN_TABLE_ID_LENGTH bytes
                                        long */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /******************************************************************//**
 Add the table to add to the OPTIMIZER's list. */
 UNIV_INTERN
@@ -604,7 +604,7 @@ void
 fts_optimize_add_table(
 /*===================*/
        dict_table_t*   table)          /*!< in: table to add */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /******************************************************************//**
 Optimize a table. */
 UNIV_INTERN
@@ -612,7 +612,7 @@ void
 fts_optimize_do_table(
 /*==================*/
        dict_table_t*   table)          /*!< in: table to optimize */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /******************************************************************//**
 Construct the prefix name of an FTS table.
 @return own: table name, must be freed with mem_free() */
@@ -622,7 +622,7 @@ fts_get_table_name_prefix(
 /*======================*/
        const fts_table_t*
                        fts_table)      /*!< in: Auxiliary table type */
-       __attribute__((nonnull, malloc, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, malloc, warn_unused_result));
 /******************************************************************//**
 Add node positions. */
 UNIV_INTERN
@@ -633,7 +633,7 @@ fts_cache_node_add_positions(
        fts_node_t*     node,           /*!< in: word node */
        doc_id_t        doc_id,         /*!< in: doc id */
        ib_vector_t*    positions)      /*!< in: fts_token_t::positions */
-       __attribute__((nonnull(2,4)));
+       MY_ATTRIBUTE((nonnull(2,4)));
 
 /******************************************************************//**
 Create the config table name for retrieving index specific value.
@@ -644,7 +644,7 @@ fts_config_create_index_param_name(
 /*===============================*/
        const char*             param,          /*!< in: base name of param */
        const dict_index_t*     index)          /*!< in: index for config */
-       __attribute__((nonnull, malloc, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, malloc, warn_unused_result));
 
 #ifndef UNIV_NONINL
 #include "fts0priv.ic"
index 2d07c60f98085115f1e295a7f62374fa9015e8d2..88f2d67c7b898b8653de978b489143bf9df696a7 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 2011, 2013, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2011, 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
@@ -33,7 +33,7 @@ fts_write_object_id(
 /*================*/
        ib_id_t         id,             /* in: a table/index id */
        char*           str,            /* in: buffer to write the id to */
-       bool            hex_format __attribute__((unused)))
+       bool            hex_format MY_ATTRIBUTE((unused)))
                                        /* in: true for fixed hex format,
                                        false for old ambiguous format */
 {
@@ -53,7 +53,7 @@ fts_write_object_id(
        /* Use this to construct old(5.6.14 and 5.7.3) windows
        ambiguous aux table names */
        DBUG_EXECUTE_IF("innodb_test_wrong_windows_fts_aux_table_name",
-                       return(sprintf(str, "%016"PRIu64, id)););
+                       return(sprintf(str, "%016" PRIu64, id)););
 
        DBUG_EXECUTE_IF("innodb_test_wrong_fts_aux_table_name",
                        return(sprintf(str, UINT64PFx, id)););
@@ -66,7 +66,7 @@ fts_write_object_id(
                // FIXME: Use ut_snprintf(), so does following one.
                return(sprintf(str, "%016llu", id));
 #else /* _WIN32 */
-               return(sprintf(str, "%016"PRIu64, id));
+               return(sprintf(str, "%016" PRIu64, id));
 #endif /* _WIN32 */
        }
 
index ee5786d920ba0ea1a5d73604ccce924ed6680543..028372f47368b7788ee570fdca210c01603eefee 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 2006, 2015, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2006, 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
@@ -135,7 +135,7 @@ enum durability_properties
 thd_requested_durability(
 /*=====================*/
        const THD* thd) /*!< in: thread handle */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 
 /******************************************************************//**
 Returns true if the transaction this thread is processing has edited
@@ -176,7 +176,7 @@ innobase_mysql_cmp(
        const unsigned char* b,         /*!< in: data field */
        unsigned int    b_length)       /*!< in: data field length,
                                        not UNIV_SQL_NULL */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /**************************************************************//**
 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
@@ -192,7 +192,7 @@ get_innobase_type_from_mysql_type(
                                        and unsigned integer
                                        types are 'unsigned types' */
        const void*     field)          /*!< in: MySQL Field */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 
 /******************************************************************//**
 Get the variable length bounds of the given character set. */
@@ -307,7 +307,7 @@ innobase_get_stmt(
 /*==============*/
        THD*    thd,            /*!< in: MySQL thread handle */
        size_t* length)         /*!< out: length of the SQL statement */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /******************************************************************//**
 This function is used to find the storage length in bytes of the first n
 characters for prefix indexes using a multibyte character set. The function
@@ -333,7 +333,7 @@ enum icp_result
 innobase_index_cond(
 /*================*/
        void*   file)   /*!< in/out: pointer to ha_innobase */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /******************************************************************//**
 Returns true if the thread supports XA,
 global value of innodb_supports_xa if thd is NULL.
@@ -469,7 +469,7 @@ innobase_format_name(
        const char*     name,           /*!< in: index or table name
                                        to format */
        ibool           is_index_name)  /*!< in: index name */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 
 /** Corresponds to Sql_condition:enum_warning_level. */
 enum ib_log_level_t {
@@ -499,7 +499,7 @@ ib_errf(
        ib_uint32_t     code,           /*!< MySQL error code */
        const char*     format,         /*!< printf format */
        ...)                            /*!< Args */
-       __attribute__((format(printf, 4, 5)));
+       MY_ATTRIBUTE((format(printf, 4, 5)));
 
 /******************************************************************//**
 Use this when the args are passed to the format string from
@@ -530,7 +530,7 @@ ib_logf(
        ib_log_level_t  level,          /*!< in: warning level */
        const char*     format,         /*!< printf format */
        ...)                            /*!< Args */
-       __attribute__((format(printf, 2, 3)));
+       MY_ATTRIBUTE((format(printf, 2, 3)));
 
 /******************************************************************//**
 Returns the NUL terminated value of glob_hostname.
@@ -576,7 +576,7 @@ innobase_next_autoinc(
        ulonglong       step,           /*!< in: AUTOINC increment step */
        ulonglong       offset,         /*!< in: AUTOINC offset */
        ulonglong       max_value)      /*!< in: max value for type */
-       __attribute__((pure, warn_unused_result));
+       MY_ATTRIBUTE((pure, warn_unused_result));
 
 /********************************************************************//**
 Get the upper limit of the MySQL integral and floating-point type.
@@ -586,7 +586,7 @@ ulonglong
 innobase_get_int_col_max_value(
 /*===========================*/
        const Field*    field)  /*!< in: MySQL field */
-       __attribute__((nonnull, pure, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
 
 /**********************************************************************
 Check if the length of the identifier exceeds the maximum allowed.
index 66b963ae39a136fb98b1f65255c9649d6e19de6a..3dd6c99eb6d8bda91ccd7991494c694795533af4 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 2005, 2013, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2005, 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
@@ -32,7 +32,7 @@ innobase_rec_to_mysql(
        const dict_index_t*     index,  /*!< in: index */
        const ulint*            offsets)/*!< in: rec_get_offsets(
                                        rec, index, ...) */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 
 /*************************************************************//**
 Copies an InnoDB index entry to table->record[0]. */
@@ -43,7 +43,7 @@ innobase_fields_to_mysql(
        struct TABLE*           table,  /*!< in/out: MySQL table */
        const dict_index_t*     index,  /*!< in: InnoDB index */
        const dfield_t*         fields) /*!< in: InnoDB index fields */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 
 /*************************************************************//**
 Copies an InnoDB row to table->record[0]. */
@@ -54,7 +54,7 @@ innobase_row_to_mysql(
        struct TABLE*           table,  /*!< in/out: MySQL table */
        const dict_table_t*     itab,   /*!< in: InnoDB table */
        const dtuple_t*         row)    /*!< in: InnoDB row */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 
 /*************************************************************//**
 Resets table->record[0]. */
@@ -63,7 +63,7 @@ void
 innobase_rec_reset(
 /*===============*/
        struct TABLE*           table)          /*!< in/out: MySQL table */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 
 /** Generate the next autoinc based on a snapshot of the session
 auto_increment_increment and auto_increment_offset variables. */
index 9c3b686c99807d4a8d9f4f5e68384b1615b3b5b6..3ee16f57fb8600ea988b7ac939c2d07395c5b52f 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1997, 2013, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1997, 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
@@ -118,7 +118,7 @@ void
 ibuf_mtr_start(
 /*===========*/
        mtr_t*  mtr)    /*!< out: mini-transaction */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /***************************************************************//**
 Commits an insert buffer mini-transaction. */
 UNIV_INLINE
@@ -126,7 +126,7 @@ void
 ibuf_mtr_commit(
 /*============*/
        mtr_t*  mtr)    /*!< in/out: mini-transaction */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /*********************************************************************//**
 Initializes an ibuf bitmap page. */
 UNIV_INTERN
@@ -252,7 +252,7 @@ ibool
 ibuf_inside(
 /*========*/
        const mtr_t*    mtr)    /*!< in: mini-transaction */
-       __attribute__((nonnull, pure));
+       MY_ATTRIBUTE((nonnull, pure));
 /***********************************************************************//**
 Checks if a page address is an ibuf bitmap page (level 3 page) address.
 @return        TRUE if a bitmap page */
@@ -285,7 +285,7 @@ ibuf_page_low(
                                is not one of the fixed address ibuf
                                pages, or NULL, in which case a new
                                transaction is created. */
-       __attribute__((warn_unused_result));
+       MY_ATTRIBUTE((warn_unused_result));
 #ifdef UNIV_DEBUG
 /** Checks if a page is a level 2 or 3 page in the ibuf hierarchy of
 pages.  Must not be called when recv_no_ibuf_operations==TRUE.
@@ -364,23 +364,31 @@ void
 ibuf_delete_for_discarded_space(
 /*============================*/
        ulint   space); /*!< in: space id */
-/*********************************************************************//**
-Contracts insert buffer trees by reading pages to the buffer pool.
+/** Contract the change buffer by reading pages to the buffer pool.
+@param[in]     full            If true, do a full contraction based
+on PCT_IO(100). If false, the size of contract batch is determined
+based on the current size of the change buffer.
 @return a lower limit for the combined size in bytes of entries which
 will be merged from ibuf trees to the pages read, 0 if ibuf is
 empty */
 UNIV_INTERN
 ulint
-ibuf_contract_in_background(
-/*========================*/
-       table_id_t      table_id,       /*!< in: if merge should be done only
-                                       for a specific table, for all tables
-                                       this should be 0 */
-       ibool           full);          /*!< in: TRUE if the caller wants to
-                                       do a full contract based on PCT_IO(100).
-                                       If FALSE then the size of contract
-                                       batch is determined based on the
-                                       current size of the ibuf tree. */
+ibuf_merge_in_background(
+       bool    full);  /*!< in: TRUE if the caller wants to
+                       do a full contract based on PCT_IO(100).
+                       If FALSE then the size of contract
+                       batch is determined based on the
+                       current size of the ibuf tree. */
+
+/** Contracts insert buffer trees by reading pages referring to space_id
+to the buffer pool.
+@returns number of pages merged.*/
+UNIV_INTERN
+ulint
+ibuf_merge_space(
+/*=============*/
+       ulint   space); /*!< in: space id */
+
 #endif /* !UNIV_HOTBACKUP */
 /*********************************************************************//**
 Parses a redo log record of an ibuf bitmap page init.
@@ -445,7 +453,7 @@ ibuf_check_bitmap_on_import(
 /*========================*/
        const trx_t*    trx,            /*!< in: transaction */
        ulint           space_id)       /*!< in: tablespace identifier */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 
 #define IBUF_HEADER_PAGE_NO    FSP_IBUF_HEADER_PAGE_NO
 #define IBUF_TREE_ROOT_PAGE_NO FSP_IBUF_TREE_ROOT_PAGE_NO
index 385853bdb685340acd0bebe17da7a34ac90dae84..35474277582f1fbd8a58f4b136e4b3d26e0f6cba 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1996, 2014, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1996, 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
@@ -266,7 +266,7 @@ lock_rec_expl_exist_on_page(
 /*========================*/
        ulint   space,  /*!< in: space id */
        ulint   page_no)/*!< in: page number */
-       __attribute__((warn_unused_result));
+       MY_ATTRIBUTE((warn_unused_result));
 /*********************************************************************//**
 Checks if locks of other transactions prevent an immediate insert of
 a record. If they do, first tests if the query thread should anyway
@@ -289,7 +289,7 @@ lock_rec_insert_check_and_lock(
                                inserted record maybe should inherit
                                LOCK_GAP type locks from the successor
                                record */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /*********************************************************************//**
 Checks if locks of other transactions prevent an immediate modify (update,
 delete mark, or delete unmark) of a clustered index record. If they do,
@@ -310,7 +310,7 @@ lock_clust_rec_modify_check_and_lock(
        dict_index_t*           index,  /*!< in: clustered index */
        const ulint*            offsets,/*!< in: rec_get_offsets(rec, index) */
        que_thr_t*              thr)    /*!< in: query thread */
-       __attribute__((warn_unused_result, nonnull));
+       MY_ATTRIBUTE((warn_unused_result, nonnull));
 /*********************************************************************//**
 Checks if locks of other transactions prevent an immediate modify
 (delete mark or delete unmark) of a secondary index record.
@@ -331,7 +331,7 @@ lock_sec_rec_modify_check_and_lock(
        que_thr_t*      thr,    /*!< in: query thread
                                (can be NULL if BTR_NO_LOCKING_FLAG) */
        mtr_t*          mtr)    /*!< in/out: mini-transaction */
-       __attribute__((warn_unused_result, nonnull(2,3,4,6)));
+       MY_ATTRIBUTE((warn_unused_result, nonnull(2,3,4,6)));
 /*********************************************************************//**
 Like lock_clust_rec_read_check_and_lock(), but reads a
 secondary index record.
@@ -418,7 +418,7 @@ lock_clust_rec_read_check_and_lock_alt(
        ulint                   gap_mode,/*!< in: LOCK_ORDINARY, LOCK_GAP, or
                                        LOCK_REC_NOT_GAP */
        que_thr_t*              thr)    /*!< in: query thread */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /*********************************************************************//**
 Checks that a record is seen in a consistent read.
 @return true if sees, or false if an earlier version of the record
@@ -450,7 +450,7 @@ lock_sec_rec_cons_read_sees(
                                        should be read or passed over
                                        by a read cursor */
        const read_view_t*      view)   /*!< in: consistent read view */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /*********************************************************************//**
 Locks the specified database table in the mode given. If the lock cannot
 be granted immediately, the query thread is put to wait.
@@ -465,7 +465,7 @@ lock_table(
                                in dictionary cache */
        enum lock_mode  mode,   /*!< in: lock mode */
        que_thr_t*      thr)    /*!< in: query thread */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /*********************************************************************//**
 Creates a table IX lock object for a resurrected transaction. */
 UNIV_INTERN
@@ -520,7 +520,7 @@ lock_rec_fold(
 /*==========*/
        ulint   space,  /*!< in: space */
        ulint   page_no)/*!< in: page number */
-       __attribute__((const));
+       MY_ATTRIBUTE((const));
 /*********************************************************************//**
 Calculates the hash value of a page file address: used in inserting or
 searching for a lock in the hash table.
@@ -570,7 +570,7 @@ lock_is_table_exclusive(
 /*====================*/
        const dict_table_t*     table,  /*!< in: table */
        const trx_t*            trx)    /*!< in: transaction */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /*********************************************************************//**
 Checks if a lock request lock1 has to wait for request lock2.
 @return        TRUE if lock1 has to wait for lock2 to be removed */
@@ -594,7 +594,7 @@ lock_report_trx_id_insanity(
        dict_index_t*   index,          /*!< in: index */
        const ulint*    offsets,        /*!< in: rec_get_offsets(rec, index) */
        trx_id_t        max_trx_id)     /*!< in: trx_sys_get_max_trx_id() */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /*********************************************************************//**
 Prints info of a table lock. */
 UNIV_INTERN
@@ -621,7 +621,7 @@ lock_print_info_summary(
 /*====================*/
        FILE*   file,   /*!< in: file where to print */
        ibool   nowait) /*!< in: whether to wait for the lock mutex */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /*********************************************************************//**
 Prints info of locks for each transaction. This function assumes that the
 caller holds the lock mutex and more importantly it will release the lock
@@ -641,7 +641,7 @@ ulint
 lock_number_of_rows_locked(
 /*=======================*/
        const trx_lock_t*       trx_lock)       /*!< in: transaction locks */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 
 /*******************************************************************//**
 Gets the type of a lock. Non-inline version for using outside of the
@@ -799,7 +799,7 @@ dberr_t
 lock_trx_handle_wait(
 /*=================*/
        trx_t*  trx)    /*!< in/out: trx lock state */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /*********************************************************************//**
 Get the number of locks on a table.
 @return number of locks */
@@ -808,7 +808,7 @@ ulint
 lock_table_get_n_locks(
 /*===================*/
        const dict_table_t*     table)  /*!< in: table */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 #ifdef UNIV_DEBUG
 /*********************************************************************//**
 Checks that a transaction id is sensible, i.e., not in the future.
@@ -821,7 +821,7 @@ lock_check_trx_id_sanity(
        const rec_t*    rec,            /*!< in: user record */
        dict_index_t*   index,          /*!< in: index */
        const ulint*    offsets)        /*!< in: rec_get_offsets(rec, index) */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /*******************************************************************//**
 Check if the transaction holds any locks on the sys tables
 or its records.
@@ -831,7 +831,7 @@ const lock_t*
 lock_trx_has_sys_table_locks(
 /*=========================*/
        const trx_t*    trx)    /*!< in: transaction to check */
-       __attribute__((warn_unused_result));
+       MY_ATTRIBUTE((warn_unused_result));
 
 /*******************************************************************//**
 Check if the transaction holds an exclusive lock on a record.
@@ -844,7 +844,7 @@ lock_trx_has_rec_x_lock(
        const dict_table_t*     table,  /*!< in: table to check */
        const buf_block_t*      block,  /*!< in: buffer block of the record */
        ulint                   heap_no)/*!< in: record heap number */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 #endif /* UNIV_DEBUG */
 
 /** Lock modes and types */
index 9f7ab9f76b6e7db7a2c2988c3cf112f6c9c08c98..2d9584833ffa10202f4e3de60b95346ddae745c7 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 2007, 2011, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2007, 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
@@ -117,7 +117,7 @@ lock_clust_rec_some_has_impl(
        const rec_t*            rec,    /*!< in: user record */
        const dict_index_t*     index,  /*!< in: clustered index */
        const ulint*            offsets)/*!< in: rec_get_offsets(rec, index) */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 
 #ifndef UNIV_NONINL
 #include "lock0priv.ic"
index 8ede49d4ecc5e0790caca077d24465182e7c49e2..f4c7b4ed882070ca99801b599081263dd512ed75 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1997, 2014, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1997, 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
@@ -51,7 +51,7 @@ recv_read_checkpoint_info_for_backup(
        lsn_t*          first_header_lsn)
                                /*!< out: lsn of of the start of the
                                first log file */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /*******************************************************************//**
 Scans the log segment and n_bytes_scanned is set to the length of valid
 log scanned. */
index d0087f56aaafefc41b394111eb1981fa348efdc2..9859def0adc9ff973f608521967f0e46adb4c9c6 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1995, 2009, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1995, 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
@@ -53,7 +53,7 @@ ulint
 mach_read_from_1(
 /*=============*/
        const byte*     b)      /*!< in: pointer to byte */
-       __attribute__((nonnull, pure));
+       MY_ATTRIBUTE((nonnull, pure));
 /*******************************************************//**
 The following function is used to store data in two consecutive
 bytes. We store the most significant byte to the lower address. */
@@ -72,7 +72,7 @@ ulint
 mach_read_from_2(
 /*=============*/
        const byte*     b)      /*!< in: pointer to two bytes */
-       __attribute__((nonnull, pure));
+       MY_ATTRIBUTE((nonnull, pure));
 
 /********************************************************//**
 The following function is used to convert a 16-bit data item
@@ -84,7 +84,7 @@ uint16
 mach_encode_2(
 /*==========*/
        ulint   n)      /*!< in: integer in machine-dependent format */
-       __attribute__((const));
+       MY_ATTRIBUTE((const));
 /********************************************************//**
 The following function is used to convert a 16-bit data item
 from the canonical format, for fast bytewise equality test
@@ -95,7 +95,7 @@ ulint
 mach_decode_2(
 /*==========*/
        uint16  n)      /*!< in: 16-bit integer in canonical format */
-       __attribute__((const));
+       MY_ATTRIBUTE((const));
 /*******************************************************//**
 The following function is used to store data in 3 consecutive
 bytes. We store the most significant byte to the lowest address. */
@@ -114,7 +114,7 @@ ulint
 mach_read_from_3(
 /*=============*/
        const byte*     b)      /*!< in: pointer to 3 bytes */
-       __attribute__((nonnull, pure));
+       MY_ATTRIBUTE((nonnull, pure));
 /*******************************************************//**
 The following function is used to store data in four consecutive
 bytes. We store the most significant byte to the lowest address. */
@@ -133,7 +133,7 @@ ulint
 mach_read_from_4(
 /*=============*/
        const byte*     b)      /*!< in: pointer to four bytes */
-       __attribute__((nonnull, pure));
+       MY_ATTRIBUTE((nonnull, pure));
 /*********************************************************//**
 Writes a ulint in a compressed form (1..5 bytes).
 @return        stored size in bytes */
@@ -151,7 +151,7 @@ ulint
 mach_get_compressed_size(
 /*=====================*/
        ulint   n)      /*!< in: ulint integer to be stored */
-       __attribute__((const));
+       MY_ATTRIBUTE((const));
 /*********************************************************//**
 Reads a ulint in a compressed form.
 @return        read integer */
@@ -160,7 +160,7 @@ ulint
 mach_read_compressed(
 /*=================*/
        const byte*     b)      /*!< in: pointer to memory from where to read */
-       __attribute__((nonnull, pure));
+       MY_ATTRIBUTE((nonnull, pure));
 /*******************************************************//**
 The following function is used to store data in 6 consecutive
 bytes. We store the most significant byte to the lowest address. */
@@ -179,7 +179,7 @@ ib_uint64_t
 mach_read_from_6(
 /*=============*/
        const byte*     b)      /*!< in: pointer to 6 bytes */
-       __attribute__((nonnull, pure));
+       MY_ATTRIBUTE((nonnull, pure));
 /*******************************************************//**
 The following function is used to store data in 7 consecutive
 bytes. We store the most significant byte to the lowest address. */
@@ -198,7 +198,7 @@ ib_uint64_t
 mach_read_from_7(
 /*=============*/
        const byte*     b)      /*!< in: pointer to 7 bytes */
-       __attribute__((nonnull, pure));
+       MY_ATTRIBUTE((nonnull, pure));
 /*******************************************************//**
 The following function is used to store data in 8 consecutive
 bytes. We store the most significant byte to the lowest address. */
@@ -217,7 +217,7 @@ ib_uint64_t
 mach_read_from_8(
 /*=============*/
        const byte*     b)      /*!< in: pointer to 8 bytes */
-       __attribute__((nonnull, pure));
+       MY_ATTRIBUTE((nonnull, pure));
 /*********************************************************//**
 Writes a 64-bit integer in a compressed form (5..9 bytes).
 @return        size in bytes */
@@ -243,7 +243,7 @@ ib_uint64_t
 mach_ull_read_compressed(
 /*=====================*/
        const byte*     b)      /*!< in: pointer to memory from where to read */
-       __attribute__((nonnull, pure));
+       MY_ATTRIBUTE((nonnull, pure));
 /*********************************************************//**
 Writes a 64-bit integer in a compressed form (1..11 bytes).
 @return        size in bytes */
@@ -261,7 +261,7 @@ ulint
 mach_ull_get_much_compressed_size(
 /*==============================*/
        ib_uint64_t     n)      /*!< in: 64-bit integer to be stored */
-       __attribute__((const));
+       MY_ATTRIBUTE((const));
 /*********************************************************//**
 Reads a 64-bit integer in a compressed form.
 @return        the value read */
@@ -270,7 +270,7 @@ ib_uint64_t
 mach_ull_read_much_compressed(
 /*==========================*/
        const byte*     b)      /*!< in: pointer to memory from where to read */
-       __attribute__((nonnull, pure));
+       MY_ATTRIBUTE((nonnull, pure));
 /*********************************************************//**
 Reads a ulint in a compressed form if the log record fully contains it.
 @return        pointer to end of the stored field, NULL if not complete */
@@ -301,7 +301,7 @@ double
 mach_double_read(
 /*=============*/
        const byte*     b)      /*!< in: pointer to memory from where to read */
-       __attribute__((nonnull, pure));
+       MY_ATTRIBUTE((nonnull, pure));
 /*********************************************************//**
 Writes a double. It is stored in a little-endian format. */
 UNIV_INLINE
@@ -318,7 +318,7 @@ float
 mach_float_read(
 /*============*/
        const byte*     b)      /*!< in: pointer to memory from where to read */
-       __attribute__((nonnull, pure));
+       MY_ATTRIBUTE((nonnull, pure));
 /*********************************************************//**
 Writes a float. It is stored in a little-endian format. */
 UNIV_INLINE
@@ -336,7 +336,7 @@ mach_read_from_n_little_endian(
 /*===========================*/
        const byte*     buf,            /*!< in: from where to read */
        ulint           buf_size)       /*!< in: from how many bytes to read */
-       __attribute__((nonnull, pure));
+       MY_ATTRIBUTE((nonnull, pure));
 /*********************************************************//**
 Writes a ulint in the little-endian format. */
 UNIV_INLINE
@@ -354,7 +354,7 @@ ulint
 mach_read_from_2_little_endian(
 /*===========================*/
        const byte*     buf)            /*!< in: from where to read */
-       __attribute__((nonnull, pure));
+       MY_ATTRIBUTE((nonnull, pure));
 /*********************************************************//**
 Writes a ulint in the little-endian format. */
 UNIV_INLINE
index f30034f3074f478fe42469703ae706f406582343..de9b8b29fd9c79f0f4fffae5aa4c1d3b8147d1a8 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1994, 2010, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1994, 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
@@ -353,7 +353,7 @@ mem_heap_printf(
 /*============*/
        mem_heap_t*     heap,   /*!< in: memory heap */
        const char*     format, /*!< in: format string */
-       ...) __attribute__ ((format (printf, 2, 3)));
+       ...) MY_ATTRIBUTE ((format (printf, 2, 3)));
 
 #ifdef MEM_PERIODIC_CHECK
 /******************************************************************//**
index 0d983d69e1a3a40bf78f8780ea297e743bfee2db..63e68150b61da7235e2cf95099563e442343a247 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1994, 2010, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1994, 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
@@ -476,9 +476,9 @@ void
 mem_heap_free_func(
 /*===============*/
        mem_heap_t*     heap,           /*!< in, own: heap to be freed */
-       const char*     file_name __attribute__((unused)),
+       const char*     file_name MY_ATTRIBUTE((unused)),
                                        /*!< in: file name where freed */
-       ulint           line  __attribute__((unused)))
+       ulint           line  MY_ATTRIBUTE((unused)))
 {
        mem_block_t*    block;
        mem_block_t*    prev_block;
index ed7fd76d425a2d29bf17e439a6029c18f7cf2eb3..db4e028e93120ebd7faed411c589687165aecc44 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1995, 2013, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved.
 Copyright (c) 2012, Facebook Inc.
 
 This program is free software; you can redistribute it and/or modify it under
@@ -207,7 +207,7 @@ void
 mtr_start(
 /*======*/
        mtr_t*  mtr)    /*!< out: mini-transaction */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /***************************************************************//**
 Commits a mini-transaction. */
 UNIV_INTERN
@@ -215,7 +215,7 @@ void
 mtr_commit(
 /*=======*/
        mtr_t*  mtr)    /*!< in/out: mini-transaction */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /**********************************************************//**
 Sets and returns a savepoint in mtr.
 @return        savepoint */
@@ -308,7 +308,7 @@ mtr_memo_release(
        mtr_t*  mtr,    /*!< in/out: mini-transaction */
        void*   object, /*!< in: object */
        ulint   type)   /*!< in: object type: MTR_MEMO_S_LOCK, ... */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 #ifdef UNIV_DEBUG
 # ifndef UNIV_HOTBACKUP
 /**********************************************************//**
@@ -321,7 +321,7 @@ mtr_memo_contains(
        mtr_t*          mtr,    /*!< in: mtr */
        const void*     object, /*!< in: object to search */
        ulint           type)   /*!< in: type of object */
-       __attribute__((warn_unused_result, nonnull));
+       MY_ATTRIBUTE((warn_unused_result, nonnull));
 
 /**********************************************************//**
 Checks if memo contains the given page.
index a9f024302209b846559f6a733ac5a267cf6942b5..3f897ae1d101d94edc687d043af474532f8e7410 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1995, 2013, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1995, 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
@@ -37,7 +37,7 @@ ibool
 mtr_block_dirtied(
 /*==============*/
        const buf_block_t*      block)  /*!< in: block being x-fixed */
-       __attribute__((nonnull,warn_unused_result));
+       MY_ATTRIBUTE((nonnull,warn_unused_result));
 
 /***************************************************************//**
 Starts a mini-transaction. */
index 13631732b1a9dd32cc5429facfd821de1a52c346..f047302c60c84fecedc72e6a498502e65760b3cc 100644 (file)
@@ -1,6 +1,6 @@
 /***********************************************************************
 
-Copyright (c) 1995, 2015, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved.
 Copyright (c) 2009, Percona Inc.
 
 Portions of this file contain modifications contributed and copyrighted
@@ -529,7 +529,7 @@ os_file_create_simple_no_error_handling_func(
                                OS_FILE_READ_ALLOW_DELETE; the last option is
                                used by a backup program reading the file */
        ibool*          success)/*!< out: TRUE if succeed, FALSE if error */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /****************************************************************//**
 Tries to disable OS caching on an opened file descriptor. */
 UNIV_INTERN
@@ -563,7 +563,7 @@ os_file_create_func(
                                function source code for the exact rules */
        ulint           type,   /*!< in: OS_DATA_FILE or OS_LOG_FILE */
        ibool*          success)/*!< out: TRUE if succeed, FALSE if error */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /***********************************************************************//**
 Deletes a file. The file has to be closed before calling this.
 @return        TRUE if success */
@@ -629,7 +629,7 @@ pfs_os_file_create_simple_func(
        ibool*          success,/*!< out: TRUE if succeed, FALSE if error */
        const char*     src_file,/*!< in: file name where func invoked */
        ulint           src_line)/*!< in: line where the func invoked */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 
 /****************************************************************//**
 NOTE! Please use the corresponding macro
@@ -654,7 +654,7 @@ pfs_os_file_create_simple_no_error_handling_func(
        ibool*          success,/*!< out: TRUE if succeed, FALSE if error */
        const char*     src_file,/*!< in: file name where func invoked */
        ulint           src_line)/*!< in: line where the func invoked */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 
 /****************************************************************//**
 NOTE! Please use the corresponding macro os_file_create(), not directly
@@ -682,7 +682,7 @@ pfs_os_file_create_func(
        ibool*          success,/*!< out: TRUE if succeed, FALSE if error */
        const char*     src_file,/*!< in: file name where func invoked */
        ulint           src_line)/*!< in: line where the func invoked */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 
 /***********************************************************************//**
 NOTE! Please use the corresponding macro os_file_close(), not directly
@@ -861,7 +861,7 @@ os_offset_t
 os_file_get_size(
 /*=============*/
        os_file_t       file)   /*!< in: handle to a file */
-       __attribute__((warn_unused_result));
+       MY_ATTRIBUTE((warn_unused_result));
 /***********************************************************************//**
 Write the specified number of zeros to a newly created file.
 @return        TRUE if success */
@@ -873,7 +873,7 @@ os_file_set_size(
                                null-terminated string */
        os_file_t       file,   /*!< in: handle to a file */
        os_offset_t     size)   /*!< in: file size */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /***********************************************************************//**
 Truncates a file at its current position.
 @return        TRUE if success */
index 37c54afae80327ce1dd4fddd4b2185cc0d149795..54f3d7554bf9568e22ea73b00c516fd39b0e1112 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1995, 2011, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1995, 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
@@ -117,15 +117,26 @@ os_thread_create_func(
        os_thread_id_t*         thread_id);     /*!< out: id of the created
                                                thread, or NULL */
 
+/** Waits until the specified thread completes and joins it.
+Its return value is ignored.
+@param[in,out] thread  thread to join */
+UNIV_INTERN
+void
+os_thread_join(
+       os_thread_t     thread);
+
 /*****************************************************************//**
 Exits the current thread. */
 UNIV_INTERN
 void
 os_thread_exit(
 /*===========*/
-       void*   exit_value)     /*!< in: exit value; in Windows this void*
+       void*   exit_value,     /*!< in: exit value; in Windows this void*
                                is cast as a DWORD */
-       UNIV_COLD __attribute__((noreturn));
+       bool    detach = true)  /*!< in: if true, the thread will be detached
+                               right before exiting. If false, another thread
+                               is responsible for joining this thread. */
+       UNIV_COLD MY_ATTRIBUTE((noreturn));
 /*****************************************************************//**
 Returns the thread identifier of current thread.
 @return        current thread identifier */
index b1ad49b49150d823647b4fa5ac946a5d2c00c7c2..f04667ff29c2ca9c5c4e1ff1f53de859a8eccdfc 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1994, 2013, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1994, 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
@@ -180,7 +180,7 @@ page_cur_tuple_insert(
        mem_heap_t**    heap,   /*!< in/out: pointer to memory heap, or NULL */
        ulint           n_ext,  /*!< in: number of externally stored columns */
        mtr_t*          mtr)    /*!< in: mini-transaction handle, or NULL */
-       __attribute__((nonnull(1,2,3,4,5), warn_unused_result));
+       MY_ATTRIBUTE((nonnull(1,2,3,4,5), warn_unused_result));
 #endif /* !UNIV_HOTBACKUP */
 /***********************************************************//**
 Inserts a record next to page cursor. Returns pointer to inserted record if
@@ -218,7 +218,7 @@ page_cur_insert_rec_low(
        const rec_t*    rec,    /*!< in: pointer to a physical record */
        ulint*          offsets,/*!< in/out: rec_get_offsets(rec, index) */
        mtr_t*          mtr)    /*!< in: mini-transaction handle, or NULL */
-       __attribute__((nonnull(1,2,3,4), warn_unused_result));
+       MY_ATTRIBUTE((nonnull(1,2,3,4), warn_unused_result));
 /***********************************************************//**
 Inserts a record next to page cursor on a compressed and uncompressed
 page. Returns pointer to inserted record if succeed, i.e.,
@@ -240,7 +240,7 @@ page_cur_insert_rec_zip(
        const rec_t*    rec,    /*!< in: pointer to a physical record */
        ulint*          offsets,/*!< in/out: rec_get_offsets(rec, index) */
        mtr_t*          mtr)    /*!< in: mini-transaction handle, or NULL */
-       __attribute__((nonnull(1,2,3,4), warn_unused_result));
+       MY_ATTRIBUTE((nonnull(1,2,3,4), warn_unused_result));
 /*************************************************************//**
 Copies records from page to a newly created page, from a given record onward,
 including that record. Infimum and supremum records are not copied.
index 0bd0a009cae83587af2c0541a845f9f65922f736..0dd5bb53d9ef70f3ca3bc9fbfc43b1d3ac1e24db 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1994, 2015, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1994, 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
@@ -165,7 +165,7 @@ page_t*
 page_align(
 /*=======*/
        const void*     ptr)    /*!< in: pointer to page frame */
-               __attribute__((const));
+               MY_ATTRIBUTE((const));
 /************************************************************//**
 Gets the offset within a page.
 @return        offset from the start of the page */
@@ -174,7 +174,7 @@ ulint
 page_offset(
 /*========*/
        const void*     ptr)    /*!< in: pointer to page frame */
-               __attribute__((const));
+               MY_ATTRIBUTE((const));
 /*************************************************************//**
 Returns the max trx id field value. */
 UNIV_INLINE
@@ -232,7 +232,7 @@ page_header_get_offs(
 /*=================*/
        const page_t*   page,   /*!< in: page */
        ulint           field)  /*!< in: PAGE_FREE, ... */
-       __attribute__((nonnull, pure));
+       MY_ATTRIBUTE((nonnull, pure));
 
 /*************************************************************//**
 Returns the pointer stored in the given header field, or NULL. */
@@ -292,7 +292,7 @@ page_rec_get_nth_const(
 /*===================*/
        const page_t*   page,   /*!< in: page */
        ulint           nth)    /*!< in: nth record */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /************************************************************//**
 Returns the nth record of the record list.
 This is the inverse function of page_rec_get_n_recs_before().
@@ -303,7 +303,7 @@ page_rec_get_nth(
 /*=============*/
        page_t* page,   /*< in: page */
        ulint   nth)    /*!< in: nth record */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 
 #ifndef UNIV_HOTBACKUP
 /************************************************************//**
@@ -316,7 +316,7 @@ rec_t*
 page_get_middle_rec(
 /*================*/
        page_t* page)   /*!< in: page */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /*************************************************************//**
 Compares a data tuple to a physical record. Differs from the function
 cmp_dtuple_rec_with_match in the way that the record must reside on an
@@ -524,7 +524,7 @@ bool
 page_is_leaf(
 /*=========*/
        const page_t*   page)   /*!< in: page */
-       __attribute__((nonnull, pure));
+       MY_ATTRIBUTE((nonnull, pure));
 /************************************************************//**
 Determine whether the page is empty.
 @return        true if the page is empty (PAGE_N_RECS = 0) */
@@ -533,7 +533,7 @@ bool
 page_is_empty(
 /*==========*/
        const page_t*   page)   /*!< in: page */
-       __attribute__((nonnull, pure));
+       MY_ATTRIBUTE((nonnull, pure));
 /************************************************************//**
 Determine whether the page contains garbage.
 @return        true if the page contains garbage (PAGE_GARBAGE is not 0) */
@@ -542,7 +542,7 @@ bool
 page_has_garbage(
 /*=============*/
        const page_t*   page)   /*!< in: page */
-       __attribute__((nonnull, pure));
+       MY_ATTRIBUTE((nonnull, pure));
 /************************************************************//**
 Gets the pointer to the next record on the page.
 @return        pointer to next record */
@@ -614,7 +614,7 @@ ibool
 page_rec_is_user_rec_low(
 /*=====================*/
        ulint   offset) /*!< in: record offset on page */
-       __attribute__((const));
+       MY_ATTRIBUTE((const));
 /************************************************************//**
 TRUE if the record is the supremum record on a page.
 @return        TRUE if the supremum record */
@@ -623,7 +623,7 @@ ibool
 page_rec_is_supremum_low(
 /*=====================*/
        ulint   offset) /*!< in: record offset on page */
-       __attribute__((const));
+       MY_ATTRIBUTE((const));
 /************************************************************//**
 TRUE if the record is the infimum record on a page.
 @return        TRUE if the infimum record */
@@ -632,7 +632,7 @@ ibool
 page_rec_is_infimum_low(
 /*====================*/
        ulint   offset) /*!< in: record offset on page */
-       __attribute__((const));
+       MY_ATTRIBUTE((const));
 
 /************************************************************//**
 TRUE if the record is a user record on the page.
@@ -642,7 +642,7 @@ ibool
 page_rec_is_user_rec(
 /*=================*/
        const rec_t*    rec)    /*!< in: record */
-       __attribute__((const));
+       MY_ATTRIBUTE((const));
 /************************************************************//**
 TRUE if the record is the supremum record on a page.
 @return        TRUE if the supremum record */
@@ -651,7 +651,7 @@ ibool
 page_rec_is_supremum(
 /*=================*/
        const rec_t*    rec)    /*!< in: record */
-       __attribute__((const));
+       MY_ATTRIBUTE((const));
 
 /************************************************************//**
 TRUE if the record is the infimum record on a page.
@@ -661,7 +661,7 @@ ibool
 page_rec_is_infimum(
 /*================*/
        const rec_t*    rec)    /*!< in: record */
-       __attribute__((const));
+       MY_ATTRIBUTE((const));
 /***************************************************************//**
 Looks for the record which owns the given record.
 @return        the owner record */
@@ -681,7 +681,7 @@ page_rec_write_field(
        ulint   i,      /*!< in: index of the field to update */
        ulint   val,    /*!< in: value to write */
        mtr_t*  mtr)    /*!< in/out: mini-transaction */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 #endif /* !UNIV_HOTBACKUP */
 /************************************************************//**
 Returns the maximum combined size of records which can be inserted on top
@@ -711,7 +711,7 @@ ulint
 page_get_free_space_of_empty(
 /*=========================*/
        ulint   comp)   /*!< in: nonzero=compact page format */
-               __attribute__((const));
+               MY_ATTRIBUTE((const));
 /**********************************************************//**
 Returns the base extra size of a physical record.  This is the
 size of the fixed header, independent of the record size.
@@ -797,7 +797,7 @@ page_create_zip(
        ulint           level,          /*!< in: the B-tree level of the page */
        trx_id_t        max_trx_id,     /*!< in: PAGE_MAX_TRX_ID */
        mtr_t*          mtr)            /*!< in/out: mini-transaction */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /**********************************************************//**
 Empty a previously created B-tree index page. */
 UNIV_INTERN
@@ -807,7 +807,7 @@ page_create_empty(
        buf_block_t*    block,  /*!< in/out: B-tree block */
        dict_index_t*   index,  /*!< in: the index of the page */
        mtr_t*          mtr)    /*!< in/out: mini-transaction */
-       __attribute__((nonnull(1,2)));
+       MY_ATTRIBUTE((nonnull(1,2)));
 /*************************************************************//**
 Differs from page_copy_rec_list_end, because this function does not
 touch the lock table and max trx id on page or compress the page.
@@ -846,7 +846,7 @@ page_copy_rec_list_end(
        rec_t*          rec,            /*!< in: record on page */
        dict_index_t*   index,          /*!< in: record descriptor */
        mtr_t*          mtr)            /*!< in: mtr */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /*************************************************************//**
 Copies records from page to new_page, up to the given record, NOT
 including that record. Infimum and supremum records are not copied.
@@ -868,7 +868,7 @@ page_copy_rec_list_start(
        rec_t*          rec,            /*!< in: record on page */
        dict_index_t*   index,          /*!< in: record descriptor */
        mtr_t*          mtr)            /*!< in: mtr */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /*************************************************************//**
 Deletes records from a page from a given record onward, including that record.
 The infimum and supremum records are not deleted. */
@@ -885,7 +885,7 @@ page_delete_rec_list_end(
                                records in the end of the chain to
                                delete, or ULINT_UNDEFINED if not known */
        mtr_t*          mtr)    /*!< in: mtr */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /*************************************************************//**
 Deletes records from page, up to the given record, NOT including
 that record. Infimum and supremum records are not deleted. */
@@ -897,7 +897,7 @@ page_delete_rec_list_start(
        buf_block_t*    block,  /*!< in: buffer block of the page */
        dict_index_t*   index,  /*!< in: record descriptor */
        mtr_t*          mtr)    /*!< in: mtr */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /*************************************************************//**
 Moves record list end to another page. Moved records include
 split_rec.
@@ -918,7 +918,7 @@ page_move_rec_list_end(
        rec_t*          split_rec,      /*!< in: first record to move */
        dict_index_t*   index,          /*!< in: record descriptor */
        mtr_t*          mtr)            /*!< in: mtr */
-       __attribute__((nonnull(1, 2, 4, 5)));
+       MY_ATTRIBUTE((nonnull(1, 2, 4, 5)));
 /*************************************************************//**
 Moves record list start to another page. Moved records do not include
 split_rec.
@@ -938,7 +938,7 @@ page_move_rec_list_start(
        rec_t*          split_rec,      /*!< in: first record not to move */
        dict_index_t*   index,          /*!< in: record descriptor */
        mtr_t*          mtr)            /*!< in: mtr */
-       __attribute__((nonnull(1, 2, 4, 5)));
+       MY_ATTRIBUTE((nonnull(1, 2, 4, 5)));
 /****************************************************************//**
 Splits a directory slot which owns too many records. */
 UNIV_INTERN
@@ -949,7 +949,7 @@ page_dir_split_slot(
        page_zip_des_t* page_zip,/*!< in/out: compressed page whose
                                uncompressed part will be written, or NULL */
        ulint           slot_no)/*!< in: the directory slot */
-       __attribute__((nonnull(1)));
+       MY_ATTRIBUTE((nonnull(1)));
 /*************************************************************//**
 Tries to balance the given directory slot with too few records
 with the upper neighbor, so that there are at least the minimum number
@@ -962,7 +962,7 @@ page_dir_balance_slot(
        page_t*         page,   /*!< in/out: index page */
        page_zip_des_t* page_zip,/*!< in/out: compressed page, or NULL */
        ulint           slot_no)/*!< in: the directory slot */
-       __attribute__((nonnull(1)));
+       MY_ATTRIBUTE((nonnull(1)));
 /**********************************************************//**
 Parses a log record of a record list end or start deletion.
 @return        end of log record or NULL */
index 95143a4bb44973f141f608789c964cd85c73e4fd..196712760db690db726f0bd79686f24c7d2c7c28 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1994, 2013, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1994, 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
@@ -129,7 +129,7 @@ page_zip_rec_set_deleted(
        page_zip_des_t* page_zip,/*!< in/out: compressed page */
        const byte*     rec,    /*!< in: record on the uncompressed page */
        ulint           flag)   /*!< in: the deleted flag (nonzero=TRUE) */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 
 /**********************************************************************//**
 Write the "owned" flag of a record on a compressed page.  The n_owned field
@@ -141,7 +141,7 @@ page_zip_rec_set_owned(
        page_zip_des_t* page_zip,/*!< in/out: compressed page */
        const byte*     rec,    /*!< in: record on the uncompressed page */
        ulint           flag)   /*!< in: the owned flag (nonzero=TRUE) */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 
 /**********************************************************************//**
 Shift the dense page directory when a record is deleted. */
@@ -154,7 +154,7 @@ page_zip_dir_delete(
        dict_index_t*   index,  /*!< in: index of rec */
        const ulint*    offsets,/*!< in: rec_get_offsets(rec) */
        const byte*     free)   /*!< in: previous start of the free list */
-       __attribute__((nonnull(1,2,3,4)));
+       MY_ATTRIBUTE((nonnull(1,2,3,4)));
 
 /**********************************************************************//**
 Add a slot to the dense page directory. */
@@ -165,5 +165,5 @@ page_zip_dir_add_slot(
        page_zip_des_t* page_zip,       /*!< in/out: compressed page */
        ulint           is_clustered)   /*!< in: nonzero for clustered index,
                                        zero for others */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 #endif
index 9d3b78ed2fcca0b91edb56f69b5ed89f225dd6d6..3a23bcb7396facf790ec1f1ec42a627a1ae9da95 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 2005, 2013, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2005, 2016, Oracle and/or its affiliates. All Rights Reserved.
 Copyright (c) 2012, Facebook Inc.
 
 This program is free software; you can redistribute it and/or modify it under
@@ -58,7 +58,7 @@ ulint
 page_zip_get_size(
 /*==============*/
        const page_zip_des_t*   page_zip)       /*!< in: compressed page */
-       __attribute__((nonnull, pure));
+       MY_ATTRIBUTE((nonnull, pure));
 /**********************************************************************//**
 Set the size of a compressed page in bytes. */
 UNIV_INLINE
@@ -81,7 +81,7 @@ page_zip_rec_needs_ext(
        ulint   n_fields,       /*!< in: number of fields in the record;
                                ignored if zip_size == 0 */
        ulint   zip_size)       /*!< in: compressed page size in bytes, or 0 */
-       __attribute__((const));
+       MY_ATTRIBUTE((const));
 
 /**********************************************************************//**
 Determine the guaranteed free space on an empty page.
@@ -92,7 +92,7 @@ page_zip_empty_size(
 /*================*/
        ulint   n_fields,       /*!< in: number of columns in the index */
        ulint   zip_size)       /*!< in: compressed page size in bytes */
-       __attribute__((const));
+       MY_ATTRIBUTE((const));
 #endif /* !UNIV_HOTBACKUP */
 
 /**********************************************************************//**
@@ -127,7 +127,7 @@ page_zip_compress(
        dict_index_t*   index,  /*!< in: index of the B-tree node */
        ulint           level,  /*!< in: compression level */
        mtr_t*          mtr)    /*!< in: mini-transaction, or NULL */
-       __attribute__((nonnull(1,2,3)));
+       MY_ATTRIBUTE((nonnull(1,2,3)));
 
 /**********************************************************************//**
 Decompress a page.  This function should tolerate errors on the compressed
@@ -145,7 +145,7 @@ page_zip_decompress(
                                FALSE=verify but do not copy some
                                page header fields that should not change
                                after page creation */
-       __attribute__((nonnull(1,2)));
+       MY_ATTRIBUTE((nonnull(1,2)));
 
 #ifdef UNIV_DEBUG
 /**********************************************************************//**
@@ -172,7 +172,7 @@ page_zip_validate_low(
        const dict_index_t*     index,  /*!< in: index of the page, if known */
        ibool                   sloppy) /*!< in: FALSE=strict,
                                        TRUE=ignore the MIN_REC_FLAG */
-       __attribute__((nonnull(1,2)));
+       MY_ATTRIBUTE((nonnull(1,2)));
 /**********************************************************************//**
 Check that the compressed and decompressed pages match. */
 UNIV_INTERN
@@ -182,7 +182,7 @@ page_zip_validate(
        const page_zip_des_t*   page_zip,/*!< in: compressed page */
        const page_t*           page,   /*!< in: uncompressed page */
        const dict_index_t*     index)  /*!< in: index of the page, if known */
-       __attribute__((nonnull(1,2)));
+       MY_ATTRIBUTE((nonnull(1,2)));
 #endif /* UNIV_ZIP_DEBUG */
 
 /**********************************************************************//**
@@ -195,7 +195,7 @@ page_zip_max_ins_size(
 /*==================*/
        const page_zip_des_t*   page_zip,/*!< in: compressed page */
        ibool                   is_clust)/*!< in: TRUE if clustered index */
-       __attribute__((nonnull, pure));
+       MY_ATTRIBUTE((nonnull, pure));
 
 /**********************************************************************//**
 Determine if enough space is available in the modification log.
@@ -209,7 +209,7 @@ page_zip_available(
        ulint                   length, /*!< in: combined size of the record */
        ulint                   create) /*!< in: nonzero=add the record to
                                        the heap */
-       __attribute__((nonnull, pure));
+       MY_ATTRIBUTE((nonnull, pure));
 
 /**********************************************************************//**
 Write data to the uncompressed header portion of a page.  The data must
@@ -222,7 +222,7 @@ page_zip_write_header(
        const byte*     str,    /*!< in: address on the uncompressed page */
        ulint           length, /*!< in: length of the data */
        mtr_t*          mtr)    /*!< in: mini-transaction, or NULL */
-       __attribute__((nonnull(1,2)));
+       MY_ATTRIBUTE((nonnull(1,2)));
 
 /**********************************************************************//**
 Write an entire record on the compressed page.  The data must already
@@ -236,7 +236,7 @@ page_zip_write_rec(
        dict_index_t*   index,  /*!< in: the index the record belongs to */
        const ulint*    offsets,/*!< in: rec_get_offsets(rec, index) */
        ulint           create) /*!< in: nonzero=insert, zero=update */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 
 /***********************************************************//**
 Parses a log record of writing a BLOB pointer of a record.
@@ -265,7 +265,7 @@ page_zip_write_blob_ptr(
        ulint           n,      /*!< in: column index */
        mtr_t*          mtr)    /*!< in: mini-transaction handle,
                                or NULL if no logging is needed */
-       __attribute__((nonnull(1,2,3,4)));
+       MY_ATTRIBUTE((nonnull(1,2,3,4)));
 
 /***********************************************************//**
 Parses a log record of writing the node pointer of a record.
@@ -290,7 +290,7 @@ page_zip_write_node_ptr(
        ulint           size,   /*!< in: data size of rec */
        ulint           ptr,    /*!< in: node pointer */
        mtr_t*          mtr)    /*!< in: mini-transaction, or NULL */
-       __attribute__((nonnull(1,2)));
+       MY_ATTRIBUTE((nonnull(1,2)));
 
 /**********************************************************************//**
 Write the trx_id and roll_ptr of a record on a B-tree leaf node page. */
@@ -304,7 +304,7 @@ page_zip_write_trx_id_and_roll_ptr(
        ulint           trx_id_col,/*!< in: column number of TRX_ID in rec */
        trx_id_t        trx_id, /*!< in: transaction identifier */
        roll_ptr_t      roll_ptr)/*!< in: roll_ptr */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 
 /**********************************************************************//**
 Write the "deleted" flag of a record on a compressed page.  The flag must
@@ -316,7 +316,7 @@ page_zip_rec_set_deleted(
        page_zip_des_t* page_zip,/*!< in/out: compressed page */
        const byte*     rec,    /*!< in: record on the uncompressed page */
        ulint           flag)   /*!< in: the deleted flag (nonzero=TRUE) */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 
 /**********************************************************************//**
 Write the "owned" flag of a record on a compressed page.  The n_owned field
@@ -328,7 +328,7 @@ page_zip_rec_set_owned(
        page_zip_des_t* page_zip,/*!< in/out: compressed page */
        const byte*     rec,    /*!< in: record on the uncompressed page */
        ulint           flag)   /*!< in: the owned flag (nonzero=TRUE) */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 
 /**********************************************************************//**
 Insert a record to the dense page directory. */
@@ -355,7 +355,7 @@ page_zip_dir_delete(
        const ulint*            offsets,        /*!< in: rec_get_offsets(rec) */
        const byte*             free)           /*!< in: previous start of
                                                the free list */
-       __attribute__((nonnull(1,2,3,4)));
+       MY_ATTRIBUTE((nonnull(1,2,3,4)));
 
 /**********************************************************************//**
 Add a slot to the dense page directory. */
@@ -366,7 +366,7 @@ page_zip_dir_add_slot(
        page_zip_des_t* page_zip,       /*!< in/out: compressed page */
        ulint           is_clustered)   /*!< in: nonzero for clustered index,
                                        zero for others */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 
 /***********************************************************//**
 Parses a log record of writing to the header of a page.
@@ -394,7 +394,7 @@ page_zip_write_header(
        const byte*     str,    /*!< in: address on the uncompressed page */
        ulint           length, /*!< in: length of the data */
        mtr_t*          mtr)    /*!< in: mini-transaction, or NULL */
-       __attribute__((nonnull(1,2)));
+       MY_ATTRIBUTE((nonnull(1,2)));
 
 /**********************************************************************//**
 Reorganize and compress a page.  This is a low-level operation for
@@ -417,7 +417,7 @@ page_zip_reorganize(
                                m_start, m_end, m_nonempty */
        dict_index_t*   index,  /*!< in: index of the B-tree node */
        mtr_t*          mtr)    /*!< in: mini-transaction */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 #ifndef UNIV_HOTBACKUP
 /**********************************************************************//**
 Copy the records of a page byte for byte.  Do not copy the page header
@@ -436,7 +436,7 @@ page_zip_copy_recs(
        const page_t*           src,            /*!< in: page */
        dict_index_t*           index,          /*!< in: index of the B-tree */
        mtr_t*                  mtr)            /*!< in: mini-transaction */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 #endif /* !UNIV_HOTBACKUP */
 
 /**********************************************************************//**
@@ -450,7 +450,7 @@ page_zip_parse_compress(
        byte*           end_ptr,/*!< in: buffer end */
        page_t*         page,   /*!< out: uncompressed page */
        page_zip_des_t* page_zip)/*!< out: compressed page */
-       __attribute__((nonnull(1,2)));
+       MY_ATTRIBUTE((nonnull(1,2)));
 
 /**********************************************************************//**
 Calculate the compressed page checksum.
@@ -462,7 +462,7 @@ page_zip_calc_checksum(
         const void*     data,   /*!< in: compressed page */
         ulint           size,   /*!< in: size of compressed page */
        srv_checksum_algorithm_t algo) /*!< in: algorithm to use */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 
 /**********************************************************************//**
 Verify a compressed page's checksum.
@@ -496,7 +496,7 @@ page_zip_parse_compress_no_data(
        page_t*         page,           /*!< in: uncompressed page */
        page_zip_des_t* page_zip,       /*!< out: compressed page */
        dict_index_t*   index)          /*!< in: index */
-       __attribute__((nonnull(1,2)));
+       MY_ATTRIBUTE((nonnull(1,2)));
 
 /**********************************************************************//**
 Reset the counters used for filling
index 65ff753382879cff9b697cc780a23fcc12086769..73585c78a6aff024a97fa5044c90572c1883c8c1 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1996, 2012, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1996, 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
@@ -472,7 +472,7 @@ pars_complete_graph_for_exec(
                                query graph, or NULL for dummy graph */
        trx_t*          trx,    /*!< in: transaction handle */
        mem_heap_t*     heap)   /*!< in: memory heap from which allocated */
-       __attribute__((nonnull(2,3), warn_unused_result));
+       MY_ATTRIBUTE((nonnull(2,3), warn_unused_result));
 
 /****************************************************************//**
 Create parser info struct.
@@ -628,7 +628,7 @@ pars_info_bind_ull_literal(
        pars_info_t*            info,   /*!< in: info struct */
        const char*             name,   /*!< in: name */
        const ib_uint64_t*      val)    /*!< in: value */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 
 /****************************************************************//**
 Add bound id. */
index 980faddf98ecc6f1b6edfee39c2e25187ebf6fc5..ae75cfac6f5833e2be00d235c89ac6ca0d225346 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1997, 2012, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1997, 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
@@ -82,7 +82,7 @@ read_view_sees_trx_id(
 /*==================*/
        const read_view_t*      view,   /*!< in: read view */
        trx_id_t                trx_id) /*!< in: trx id */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /*********************************************************************//**
 Prints a read view to stderr. */
 UNIV_INTERN
index cb3c85ac2c8c28df71d9854afb1005469d5a246b..65116229fdce4c129b6199a217d145512b42285a 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1994, 2012, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1994, 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
@@ -174,7 +174,7 @@ cmp_dtuple_rec_with_match_low(
                                bytes within the first field not completely
                                matched; when function returns, contains the
                                value for current comparison */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 #define cmp_dtuple_rec_with_match(tuple,rec,offsets,fields,bytes)      \
        cmp_dtuple_rec_with_match_low(                                  \
                tuple,rec,offsets,dtuple_get_n_fields_cmp(tuple),fields,bytes)
@@ -218,7 +218,7 @@ cmp_rec_rec_simple(
        struct TABLE*           table)  /*!< in: MySQL table, for reporting
                                        duplicate key value if applicable,
                                        or NULL */
-       __attribute__((nonnull(1,2,3,4), warn_unused_result));
+       MY_ATTRIBUTE((nonnull(1,2,3,4), warn_unused_result));
 /*************************************************************//**
 This function is used to compare two physical records. Only the common
 first fields are compared, and if an externally stored field is
index 5dc49714669acfc3b23c82ea32e64cb969c05b19..866493c8e0f814dcdcc60bacd0fecbcfbada6ec2 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1994, 2012, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1994, 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
@@ -98,7 +98,7 @@ rec_get_next_ptr_const(
 /*===================*/
        const rec_t*    rec,    /*!< in: physical record */
        ulint           comp)   /*!< in: nonzero=compact page format */
-       __attribute__((nonnull, pure, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
 /******************************************************//**
 The following function is used to get the pointer of the next chained record
 on the same page.
@@ -109,7 +109,7 @@ rec_get_next_ptr(
 /*=============*/
        rec_t*  rec,    /*!< in: physical record */
        ulint   comp)   /*!< in: nonzero=compact page format */
-       __attribute__((nonnull, pure, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
 /******************************************************//**
 The following function is used to get the offset of the
 next chained record on the same page.
@@ -120,7 +120,7 @@ rec_get_next_offs(
 /*==============*/
        const rec_t*    rec,    /*!< in: physical record */
        ulint           comp)   /*!< in: nonzero=compact page format */
-       __attribute__((nonnull, pure, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
 /******************************************************//**
 The following function is used to set the next record offset field
 of an old-style record. */
@@ -130,7 +130,7 @@ rec_set_next_offs_old(
 /*==================*/
        rec_t*  rec,    /*!< in: old-style physical record */
        ulint   next)   /*!< in: offset of the next record */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /******************************************************//**
 The following function is used to set the next record offset field
 of a new-style record. */
@@ -140,7 +140,7 @@ rec_set_next_offs_new(
 /*==================*/
        rec_t*  rec,    /*!< in/out: new-style physical record */
        ulint   next)   /*!< in: offset of the next record */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /******************************************************//**
 The following function is used to get the number of fields
 in an old-style record.
@@ -150,7 +150,7 @@ ulint
 rec_get_n_fields_old(
 /*=================*/
        const rec_t*    rec)    /*!< in: physical record */
-       __attribute__((nonnull, pure, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
 /******************************************************//**
 The following function is used to get the number of fields
 in a record.
@@ -161,7 +161,7 @@ rec_get_n_fields(
 /*=============*/
        const rec_t*            rec,    /*!< in: physical record */
        const dict_index_t*     index)  /*!< in: record descriptor */
-       __attribute__((nonnull, pure, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
 /******************************************************//**
 The following function is used to get the number of records owned by the
 previous directory record.
@@ -171,7 +171,7 @@ ulint
 rec_get_n_owned_old(
 /*================*/
        const rec_t*    rec)    /*!< in: old-style physical record */
-       __attribute__((nonnull, pure, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
 /******************************************************//**
 The following function is used to set the number of owned records. */
 UNIV_INLINE
@@ -180,7 +180,7 @@ rec_set_n_owned_old(
 /*================*/
        rec_t*  rec,            /*!< in: old-style physical record */
        ulint   n_owned)        /*!< in: the number of owned */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /******************************************************//**
 The following function is used to get the number of records owned by the
 previous directory record.
@@ -190,7 +190,7 @@ ulint
 rec_get_n_owned_new(
 /*================*/
        const rec_t*    rec)    /*!< in: new-style physical record */
-       __attribute__((nonnull, pure, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
 /******************************************************//**
 The following function is used to set the number of owned records. */
 UNIV_INLINE
@@ -200,7 +200,7 @@ rec_set_n_owned_new(
        rec_t*          rec,    /*!< in/out: new-style physical record */
        page_zip_des_t* page_zip,/*!< in/out: compressed page, or NULL */
        ulint           n_owned)/*!< in: the number of owned */
-       __attribute__((nonnull(1)));
+       MY_ATTRIBUTE((nonnull(1)));
 /******************************************************//**
 The following function is used to retrieve the info bits of
 a record.
@@ -211,7 +211,7 @@ rec_get_info_bits(
 /*==============*/
        const rec_t*    rec,    /*!< in: physical record */
        ulint           comp)   /*!< in: nonzero=compact page format */
-       __attribute__((nonnull, pure, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
 /******************************************************//**
 The following function is used to set the info bits of a record. */
 UNIV_INLINE
@@ -220,7 +220,7 @@ rec_set_info_bits_old(
 /*==================*/
        rec_t*  rec,    /*!< in: old-style physical record */
        ulint   bits)   /*!< in: info bits */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /******************************************************//**
 The following function is used to set the info bits of a record. */
 UNIV_INLINE
@@ -229,7 +229,7 @@ rec_set_info_bits_new(
 /*==================*/
        rec_t*  rec,    /*!< in/out: new-style physical record */
        ulint   bits)   /*!< in: info bits */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /******************************************************//**
 The following function retrieves the status bits of a new-style record.
 @return        status bits */
@@ -238,7 +238,7 @@ ulint
 rec_get_status(
 /*===========*/
        const rec_t*    rec)    /*!< in: physical record */
-       __attribute__((nonnull, pure, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
 
 /******************************************************//**
 The following function is used to set the status bits of a new-style record. */
@@ -248,7 +248,7 @@ rec_set_status(
 /*===========*/
        rec_t*  rec,    /*!< in/out: physical record */
        ulint   bits)   /*!< in: info bits */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 
 /******************************************************//**
 The following function is used to retrieve the info and status
@@ -260,7 +260,7 @@ rec_get_info_and_status_bits(
 /*=========================*/
        const rec_t*    rec,    /*!< in: physical record */
        ulint           comp)   /*!< in: nonzero=compact page format */
-       __attribute__((nonnull, pure, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
 /******************************************************//**
 The following function is used to set the info and status
 bits of a record.  (Only compact records have status bits.) */
@@ -270,7 +270,7 @@ rec_set_info_and_status_bits(
 /*=========================*/
        rec_t*  rec,    /*!< in/out: compact physical record */
        ulint   bits)   /*!< in: info bits */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 
 /******************************************************//**
 The following function tells if record is delete marked.
@@ -281,7 +281,7 @@ rec_get_deleted_flag(
 /*=================*/
        const rec_t*    rec,    /*!< in: physical record */
        ulint           comp)   /*!< in: nonzero=compact page format */
-       __attribute__((nonnull, pure, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
 /******************************************************//**
 The following function is used to set the deleted bit. */
 UNIV_INLINE
@@ -290,7 +290,7 @@ rec_set_deleted_flag_old(
 /*=====================*/
        rec_t*  rec,    /*!< in: old-style physical record */
        ulint   flag)   /*!< in: nonzero if delete marked */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /******************************************************//**
 The following function is used to set the deleted bit. */
 UNIV_INLINE
@@ -300,7 +300,7 @@ rec_set_deleted_flag_new(
        rec_t*          rec,    /*!< in/out: new-style physical record */
        page_zip_des_t* page_zip,/*!< in/out: compressed page, or NULL */
        ulint           flag)   /*!< in: nonzero if delete marked */
-       __attribute__((nonnull(1)));
+       MY_ATTRIBUTE((nonnull(1)));
 /******************************************************//**
 The following function tells if a new-style record is a node pointer.
 @return        TRUE if node pointer */
@@ -309,7 +309,7 @@ ibool
 rec_get_node_ptr_flag(
 /*==================*/
        const rec_t*    rec)    /*!< in: physical record */
-       __attribute__((nonnull, pure, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
 /******************************************************//**
 The following function is used to get the order number
 of an old-style record in the heap of the index page.
@@ -319,7 +319,7 @@ ulint
 rec_get_heap_no_old(
 /*================*/
        const rec_t*    rec)    /*!< in: physical record */
-       __attribute__((nonnull, pure, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
 /******************************************************//**
 The following function is used to set the heap number
 field in an old-style record. */
@@ -329,7 +329,7 @@ rec_set_heap_no_old(
 /*================*/
        rec_t*  rec,    /*!< in: physical record */
        ulint   heap_no)/*!< in: the heap number */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /******************************************************//**
 The following function is used to get the order number
 of a new-style record in the heap of the index page.
@@ -339,7 +339,7 @@ ulint
 rec_get_heap_no_new(
 /*================*/
        const rec_t*    rec)    /*!< in: physical record */
-       __attribute__((nonnull, pure, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
 /******************************************************//**
 The following function is used to set the heap number
 field in a new-style record. */
@@ -349,7 +349,7 @@ rec_set_heap_no_new(
 /*================*/
        rec_t*  rec,    /*!< in/out: physical record */
        ulint   heap_no)/*!< in: the heap number */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /******************************************************//**
 The following function is used to test whether the data offsets
 in the record are stored in one-byte or two-byte format.
@@ -359,7 +359,7 @@ ibool
 rec_get_1byte_offs_flag(
 /*====================*/
        const rec_t*    rec)    /*!< in: physical record */
-       __attribute__((nonnull, pure, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
 
 /******************************************************//**
 The following function is used to set the 1-byte offsets flag. */
@@ -369,7 +369,7 @@ rec_set_1byte_offs_flag(
 /*====================*/
        rec_t*  rec,    /*!< in: physical record */
        ibool   flag)   /*!< in: TRUE if 1byte form */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 
 /******************************************************//**
 Returns the offset of nth field end if the record is stored in the 1-byte
@@ -382,7 +382,7 @@ rec_1_get_field_end_info(
 /*=====================*/
        const rec_t*    rec,    /*!< in: record */
        ulint           n)      /*!< in: field index */
-       __attribute__((nonnull, pure, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
 
 /******************************************************//**
 Returns the offset of nth field end if the record is stored in the 2-byte
@@ -396,7 +396,7 @@ rec_2_get_field_end_info(
 /*=====================*/
        const rec_t*    rec,    /*!< in: record */
        ulint           n)      /*!< in: field index */
-       __attribute__((nonnull, pure, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
 
 /******************************************************//**
 Returns nonzero if the field is stored off-page.
@@ -408,7 +408,7 @@ rec_2_is_field_extern(
 /*==================*/
        const rec_t*    rec,    /*!< in: record */
        ulint           n)      /*!< in: field index */
-       __attribute__((nonnull, pure, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
 
 /******************************************************//**
 Determine how many of the first n columns in a compact
@@ -421,7 +421,7 @@ rec_get_n_extern_new(
        const rec_t*            rec,    /*!< in: compact physical record */
        const dict_index_t*     index,  /*!< in: record descriptor */
        ulint                   n)      /*!< in: number of columns to scan */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 
 /******************************************************//**
 The following function determines the offsets to each field
@@ -446,9 +446,9 @@ rec_get_offsets_func(
 #endif /* UNIV_DEBUG */
        mem_heap_t**            heap)   /*!< in/out: memory heap */
 #ifdef UNIV_DEBUG
-       __attribute__((nonnull(1,2,5,7),warn_unused_result));
+       MY_ATTRIBUTE((nonnull(1,2,5,7),warn_unused_result));
 #else /* UNIV_DEBUG */
-       __attribute__((nonnull(1,2,5),warn_unused_result));
+       MY_ATTRIBUTE((nonnull(1,2,5),warn_unused_result));
 #endif /* UNIV_DEBUG */
 
 #ifdef UNIV_DEBUG
@@ -475,7 +475,7 @@ rec_get_offsets_reverse(
                                        0=leaf node */
        ulint*                  offsets)/*!< in/out: array consisting of
                                        offsets[0] allocated elements */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 #ifdef UNIV_DEBUG
 /************************************************************//**
 Validates offsets returned by rec_get_offsets().
@@ -488,7 +488,7 @@ rec_offs_validate(
        const dict_index_t*     index,  /*!< in: record descriptor or NULL */
        const ulint*            offsets)/*!< in: array returned by
                                        rec_get_offsets() */
-       __attribute__((nonnull(3), warn_unused_result));
+       MY_ATTRIBUTE((nonnull(3), warn_unused_result));
 /************************************************************//**
 Updates debug data in offsets, in order to avoid bogus
 rec_offs_validate() failures. */
@@ -500,7 +500,7 @@ rec_offs_make_valid(
        const dict_index_t*     index,  /*!< in: record descriptor */
        ulint*                  offsets)/*!< in: array returned by
                                        rec_get_offsets() */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 #else
 # define rec_offs_make_valid(rec, index, offsets) ((void) 0)
 #endif /* UNIV_DEBUG */
@@ -517,7 +517,7 @@ rec_get_nth_field_offs_old(
        ulint           n,      /*!< in: index of the field */
        ulint*          len)    /*!< out: length of the field; UNIV_SQL_NULL
                                if SQL null */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 #define rec_get_nth_field_old(rec, n, len) \
 ((rec) + rec_get_nth_field_offs_old(rec, n, len))
 /************************************************************//**
@@ -531,7 +531,7 @@ rec_get_nth_field_size(
 /*===================*/
        const rec_t*    rec,    /*!< in: record */
        ulint           n)      /*!< in: index of the field */
-       __attribute__((nonnull, pure, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
 /************************************************************//**
 The following function is used to get an offset to the nth
 data field in a record.
@@ -544,7 +544,7 @@ rec_get_nth_field_offs(
        ulint           n,      /*!< in: index of the field */
        ulint*          len)    /*!< out: length of the field; UNIV_SQL_NULL
                                if SQL null */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 #define rec_get_nth_field(rec, offsets, n, len) \
 ((rec) + rec_get_nth_field_offs(offsets, n, len))
 /******************************************************//**
@@ -556,7 +556,7 @@ ulint
 rec_offs_comp(
 /*==========*/
        const ulint*    offsets)/*!< in: array returned by rec_get_offsets() */
-       __attribute__((nonnull, pure, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
 /******************************************************//**
 Determine if the offsets are for a record containing
 externally stored columns.
@@ -566,7 +566,7 @@ ulint
 rec_offs_any_extern(
 /*================*/
        const ulint*    offsets)/*!< in: array returned by rec_get_offsets() */
-       __attribute__((nonnull, pure, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
 /******************************************************//**
 Determine if the offsets are for a record containing null BLOB pointers.
 @return        first field containing a null BLOB pointer, or NULL if none found */
@@ -576,7 +576,7 @@ rec_offs_any_null_extern(
 /*=====================*/
        const rec_t*    rec,            /*!< in: record */
        const ulint*    offsets)        /*!< in: rec_get_offsets(rec) */
-       __attribute__((nonnull, pure, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
 /******************************************************//**
 Returns nonzero if the extern bit is set in nth field of rec.
 @return        nonzero if externally stored */
@@ -586,7 +586,7 @@ rec_offs_nth_extern(
 /*================*/
        const ulint*    offsets,/*!< in: array returned by rec_get_offsets() */
        ulint           n)      /*!< in: nth field */
-       __attribute__((nonnull, pure, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
 /******************************************************//**
 Returns nonzero if the SQL NULL bit is set in nth field of rec.
 @return        nonzero if SQL NULL */
@@ -596,7 +596,7 @@ rec_offs_nth_sql_null(
 /*==================*/
        const ulint*    offsets,/*!< in: array returned by rec_get_offsets() */
        ulint           n)      /*!< in: nth field */
-       __attribute__((nonnull, pure, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
 /******************************************************//**
 Gets the physical size of a field.
 @return        length of field */
@@ -606,7 +606,7 @@ rec_offs_nth_size(
 /*==============*/
        const ulint*    offsets,/*!< in: array returned by rec_get_offsets() */
        ulint           n)      /*!< in: nth field */
-       __attribute__((nonnull, pure, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
 
 /******************************************************//**
 Returns the number of extern bits set in a record.
@@ -616,7 +616,7 @@ ulint
 rec_offs_n_extern(
 /*==============*/
        const ulint*    offsets)/*!< in: array returned by rec_get_offsets() */
-       __attribute__((nonnull, pure, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
 /***********************************************************//**
 This is used to modify the value of an already existing field in a record.
 The previous value must have exactly the same size as the new value. If len
@@ -636,7 +636,7 @@ rec_set_nth_field(
                                length as the previous value.
                                If SQL null, previous value must be
                                SQL null. */
-       __attribute__((nonnull(1,2)));
+       MY_ATTRIBUTE((nonnull(1,2)));
 /**********************************************************//**
 The following function returns the data size of an old-style physical
 record, that is the sum of field lengths. SQL null fields
@@ -648,7 +648,7 @@ ulint
 rec_get_data_size_old(
 /*==================*/
        const rec_t*    rec)    /*!< in: physical record */
-       __attribute__((nonnull, pure, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
 /**********************************************************//**
 The following function returns the number of allocated elements
 for an array of offsets.
@@ -658,7 +658,7 @@ ulint
 rec_offs_get_n_alloc(
 /*=================*/
        const ulint*    offsets)/*!< in: array for rec_get_offsets() */
-       __attribute__((nonnull, pure, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
 /**********************************************************//**
 The following function sets the number of allocated elements
 for an array of offsets. */
@@ -669,7 +669,7 @@ rec_offs_set_n_alloc(
        ulint*  offsets,        /*!< out: array for rec_get_offsets(),
                                must be allocated */
        ulint   n_alloc)        /*!< in: number of elements */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 #define rec_offs_init(offsets) \
        rec_offs_set_n_alloc(offsets, (sizeof offsets) / sizeof *offsets)
 /**********************************************************//**
@@ -680,7 +680,7 @@ ulint
 rec_offs_n_fields(
 /*==============*/
        const ulint*    offsets)/*!< in: array returned by rec_get_offsets() */
-       __attribute__((nonnull, pure, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
 /**********************************************************//**
 The following function returns the data size of a physical
 record, that is the sum of field lengths. SQL null fields
@@ -692,7 +692,7 @@ ulint
 rec_offs_data_size(
 /*===============*/
        const ulint*    offsets)/*!< in: array returned by rec_get_offsets() */
-       __attribute__((nonnull, pure, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
 /**********************************************************//**
 Returns the total size of record minus data size of record.
 The value returned by the function is the distance from record
@@ -703,7 +703,7 @@ ulint
 rec_offs_extra_size(
 /*================*/
        const ulint*    offsets)/*!< in: array returned by rec_get_offsets() */
-       __attribute__((nonnull, pure, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
 /**********************************************************//**
 Returns the total size of a physical record.
 @return        size */
@@ -712,7 +712,7 @@ ulint
 rec_offs_size(
 /*==========*/
        const ulint*    offsets)/*!< in: array returned by rec_get_offsets() */
-       __attribute__((nonnull, pure, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
 #ifdef UNIV_DEBUG
 /**********************************************************//**
 Returns a pointer to the start of the record.
@@ -723,7 +723,7 @@ rec_get_start(
 /*==========*/
        const rec_t*    rec,    /*!< in: pointer to record */
        const ulint*    offsets)/*!< in: array returned by rec_get_offsets() */
-       __attribute__((nonnull, pure, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
 /**********************************************************//**
 Returns a pointer to the end of the record.
 @return        pointer to end */
@@ -733,7 +733,7 @@ rec_get_end(
 /*========*/
        const rec_t*    rec,    /*!< in: pointer to record */
        const ulint*    offsets)/*!< in: array returned by rec_get_offsets() */
-       __attribute__((nonnull, pure, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
 #else /* UNIV_DEBUG */
 # define rec_get_start(rec, offsets) ((rec) - rec_offs_extra_size(offsets))
 # define rec_get_end(rec, offsets) ((rec) + rec_offs_data_size(offsets))
@@ -748,7 +748,7 @@ rec_copy(
        void*           buf,    /*!< in: buffer */
        const rec_t*    rec,    /*!< in: physical record */
        const ulint*    offsets)/*!< in: array returned by rec_get_offsets() */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 #ifndef UNIV_HOTBACKUP
 /**********************************************************//**
 Determines the size of a data tuple prefix in a temporary file.
@@ -761,7 +761,7 @@ rec_get_converted_size_temp(
        const dfield_t*         fields, /*!< in: array of data fields */
        ulint                   n_fields,/*!< in: number of data fields */
        ulint*                  extra)  /*!< out: extra size */
-       __attribute__((warn_unused_result, nonnull));
+       MY_ATTRIBUTE((warn_unused_result, nonnull));
 
 /******************************************************//**
 Determine the offset to each field in temporary file.
@@ -774,7 +774,7 @@ rec_init_offsets_temp(
        const dict_index_t*     index,  /*!< in: record descriptor */
        ulint*                  offsets)/*!< in/out: array of offsets;
                                        in: n=rec_offs_n_fields(offsets) */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 
 /*********************************************************//**
 Builds a temporary file record out of a data tuple.
@@ -787,7 +787,7 @@ rec_convert_dtuple_to_temp(
        const dict_index_t*     index,          /*!< in: record descriptor */
        const dfield_t*         fields,         /*!< in: array of data fields */
        ulint                   n_fields)       /*!< in: number of fields */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 
 /**************************************************************//**
 Copies the first n fields of a physical record to a new physical record in
@@ -805,7 +805,7 @@ rec_copy_prefix_to_buf(
                                                for the copied prefix,
                                                or NULL */
        ulint*                  buf_size)       /*!< in/out: buffer size */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /************************************************************//**
 Folds a prefix of a physical record to a ulint.
 @return        the folded value */
@@ -821,7 +821,7 @@ rec_fold(
        ulint           n_bytes,        /*!< in: number of bytes to fold
                                        in an incomplete last field */
        index_id_t      tree_id)        /*!< in: index tree id */
-       __attribute__((nonnull, pure, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
 #endif /* !UNIV_HOTBACKUP */
 /*********************************************************//**
 Builds a physical record out of a data tuple and
@@ -837,7 +837,7 @@ rec_convert_dtuple_to_rec(
        const dtuple_t*         dtuple, /*!< in: data tuple */
        ulint                   n_ext)  /*!< in: number of
                                        externally stored columns */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /**********************************************************//**
 Returns the extra size of an old-style physical record if we know its
 data size and number of fields.
@@ -849,7 +849,7 @@ rec_get_converted_extra_size(
        ulint   data_size,      /*!< in: data size */
        ulint   n_fields,       /*!< in: number of fields */
        ulint   n_ext)          /*!< in: number of externally stored columns */
-       __attribute__((const));
+       MY_ATTRIBUTE((const));
 /**********************************************************//**
 Determines the size of a data tuple prefix in ROW_FORMAT=COMPACT.
 @return        total size */
@@ -861,7 +861,7 @@ rec_get_converted_size_comp_prefix(
        const dfield_t*         fields, /*!< in: array of data fields */
        ulint                   n_fields,/*!< in: number of data fields */
        ulint*                  extra)  /*!< out: extra size */
-       __attribute__((warn_unused_result, nonnull(1,2)));
+       MY_ATTRIBUTE((warn_unused_result, nonnull(1,2)));
 /**********************************************************//**
 Determines the size of a data tuple in ROW_FORMAT=COMPACT.
 @return        total size */
@@ -877,7 +877,7 @@ rec_get_converted_size_comp(
        const dfield_t*         fields, /*!< in: array of data fields */
        ulint                   n_fields,/*!< in: number of data fields */
        ulint*                  extra)  /*!< out: extra size */
-       __attribute__((nonnull(1,3)));
+       MY_ATTRIBUTE((nonnull(1,3)));
 /**********************************************************//**
 The following function returns the size of a data tuple when converted to
 a physical record.
@@ -889,7 +889,7 @@ rec_get_converted_size(
        dict_index_t*   index,  /*!< in: record descriptor */
        const dtuple_t* dtuple, /*!< in: data tuple */
        ulint           n_ext)  /*!< in: number of externally stored columns */
-       __attribute__((warn_unused_result, nonnull));
+       MY_ATTRIBUTE((warn_unused_result, nonnull));
 #ifndef UNIV_HOTBACKUP
 /**************************************************************//**
 Copies the first n fields of a physical record to a data tuple.
@@ -904,7 +904,7 @@ rec_copy_prefix_to_dtuple(
        ulint                   n_fields,       /*!< in: number of fields
                                                to copy */
        mem_heap_t*             heap)           /*!< in: memory heap */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 #endif /* !UNIV_HOTBACKUP */
 /***************************************************************//**
 Validates the consistency of a physical record.
@@ -915,7 +915,7 @@ rec_validate(
 /*=========*/
        const rec_t*    rec,    /*!< in: physical record */
        const ulint*    offsets)/*!< in: array returned by rec_get_offsets() */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /***************************************************************//**
 Prints an old-style physical record. */
 UNIV_INTERN
@@ -924,7 +924,7 @@ rec_print_old(
 /*==========*/
        FILE*           file,   /*!< in: file where to print */
        const rec_t*    rec)    /*!< in: physical record */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 #ifndef UNIV_HOTBACKUP
 /***************************************************************//**
 Prints a physical record in ROW_FORMAT=COMPACT.  Ignores the
@@ -936,7 +936,7 @@ rec_print_comp(
        FILE*           file,   /*!< in: file where to print */
        const rec_t*    rec,    /*!< in: physical record */
        const ulint*    offsets)/*!< in: array returned by rec_get_offsets() */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /***************************************************************//**
 Prints a physical record. */
 UNIV_INTERN
@@ -946,7 +946,7 @@ rec_print_new(
        FILE*           file,   /*!< in: file where to print */
        const rec_t*    rec,    /*!< in: physical record */
        const ulint*    offsets)/*!< in: array returned by rec_get_offsets() */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /***************************************************************//**
 Prints a physical record. */
 UNIV_INTERN
@@ -956,7 +956,7 @@ rec_print(
        FILE*                   file,   /*!< in: file where to print */
        const rec_t*            rec,    /*!< in: physical record */
        const dict_index_t*     index)  /*!< in: record descriptor */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 
 # ifdef UNIV_DEBUG
 /************************************************************//**
@@ -968,7 +968,7 @@ rec_get_trx_id(
 /*===========*/
        const rec_t*            rec,    /*!< in: record */
        const dict_index_t*     index)  /*!< in: clustered index */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 # endif /* UNIV_DEBUG */
 #endif /* UNIV_HOTBACKUP */
 
index a539320dd2a4e7724c7492586b64cb8258b4faf3..5811a77a48b765b16d2f77162b3abc261e52aee5 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1994, 2013, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1994, 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
@@ -1540,7 +1540,8 @@ rec_copy(
        ulint   extra_len;
        ulint   data_len;
 
-       ut_ad(rec && buf);
+       ut_ad(rec != NULL);
+       ut_ad(buf != NULL);
        ut_ad(rec_offs_validate(rec, NULL, offsets));
        ut_ad(rec_validate(rec, offsets));
 
index 4e04a099140be3d7cc273f79efbc2879494f582e..e949ba302b94b2383a5e99cd535b6e6f44989065 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 2010, 2012, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2010, 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
@@ -187,7 +187,7 @@ row_fts_psort_info_init(
                                        instantiated */
        fts_psort_t**           merge)  /*!< out: parallel merge info
                                        to be instantiated */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /********************************************************************//**
 Clean up and deallocate FTS parallel sort structures, and close
 temparary merge sort files */
@@ -275,5 +275,5 @@ row_fts_merge_insert(
        fts_psort_t*    psort_info,     /*!< parallel sort info */
        ulint           id)             /* !< in: which auxiliary table's data
                                        to insert to */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 #endif /* row0ftsort_h */
index aa46fdb7c27b2874a8765517a1a48590a5005aef..a821c230a3b264e27258c56403d27f9c0b46f055 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 2012, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2012, 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
@@ -46,7 +46,7 @@ row_import_for_mysql(
        dict_table_t*   table,          /*!< in/out: table */
        row_prebuilt_t* prebuilt)       /*!< in: prebuilt struct
                                                in MySQL */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 
 /*****************************************************************//**
 Update the DICT_TF2_DISCARDED flag in SYS_TABLES.
@@ -64,7 +64,7 @@ row_import_update_discarded_flag(
        bool            dict_locked)            /*!< in: Set to true if the
                                                caller already owns the
                                                dict_sys_t:: mutex. */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 
 /*****************************************************************//**
 Update the (space, root page) of a table's indexes from the values
@@ -83,7 +83,7 @@ row_import_update_index_root(
        bool                    dict_locked)    /*!< in: Set to true if the
                                                caller already owns the
                                                dict_sys_t:: mutex. */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 #ifndef UNIV_NONINL
 #include "row0import.ic"
 #endif
index 2a892d2f5dfc8377d564edff51f7801d2e415327..71ee39070ef2d57417237cb9c8fccc8374493934 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1996, 2012, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1996, 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
@@ -53,7 +53,7 @@ row_ins_check_foreign_constraint(
                                table, else the referenced table */
        dtuple_t*       entry,  /*!< in: index entry for index */
        que_thr_t*      thr)    /*!< in: query thread */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /*********************************************************************//**
 Creates an insert node struct.
 @return        own: insert node struct */
@@ -98,7 +98,7 @@ row_ins_clust_index_entry_low(
        dtuple_t*       entry,  /*!< in/out: index entry to insert */
        ulint           n_ext,  /*!< in: number of externally stored columns */
        que_thr_t*      thr)    /*!< in: query thread or NULL */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /***************************************************************//**
 Tries to insert an entry into a secondary index. If a record with exactly the
 same fields is found, the other record is necessarily marked deleted.
@@ -123,7 +123,7 @@ row_ins_sec_index_entry_low(
        trx_id_t        trx_id, /*!< in: PAGE_MAX_TRX_ID during
                                row_log_table_apply(), or 0 */
        que_thr_t*      thr)    /*!< in: query thread */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /***************************************************************//**
 Tries to insert the externally stored fields (off-page columns)
 of a clustered index entry.
@@ -142,7 +142,7 @@ row_ins_index_entry_big_rec_func(
        const void*             thd,    /*!< in: connection, or NULL */
 #endif /* DBUG_OFF */
        ulint                   line)   /*!< in: line number of caller */
-       __attribute__((nonnull(1,2,3,4,5,6), warn_unused_result));
+       MY_ATTRIBUTE((nonnull(1,2,3,4,5,6), warn_unused_result));
 #ifdef DBUG_OFF
 # define row_ins_index_entry_big_rec(e,big,ofs,heap,index,thd,file,line) \
        row_ins_index_entry_big_rec_func(e,big,ofs,heap,index,file,line)
@@ -164,7 +164,7 @@ row_ins_clust_index_entry(
        dtuple_t*       entry,  /*!< in/out: index entry to insert */
        que_thr_t*      thr,    /*!< in: query thread */
        ulint           n_ext)  /*!< in: number of externally stored columns */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /***************************************************************//**
 Inserts an entry into a secondary index. Tries first optimistic,
 then pessimistic descent down the tree. If the entry matches enough
@@ -178,7 +178,7 @@ row_ins_sec_index_entry(
        dict_index_t*   index,  /*!< in: secondary index */
        dtuple_t*       entry,  /*!< in/out: index entry to insert */
        que_thr_t*      thr)    /*!< in: query thread */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /***********************************************************//**
 Inserts a row to a table. This is a high-level function used in
 SQL execution graphs.
index 5eed390acedbc382b8b7f7fb2c4e997b25c07f62..ec14556588b859e738ba7f93e9471190557e4fee 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 2011, 2015, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2011, 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
@@ -54,7 +54,7 @@ row_log_allocate(
        const ulint*    col_map,/*!< in: mapping of old column
                                numbers to new ones, or NULL if !table */
        const char*     path)   /*!< in: where to create temporary file */
-       __attribute__((nonnull(1), warn_unused_result));
+       MY_ATTRIBUTE((nonnull(1), warn_unused_result));
 
 /******************************************************//**
 Free the row log for an index that was being created online. */
@@ -63,7 +63,7 @@ void
 row_log_free(
 /*=========*/
        row_log_t*&     log)    /*!< in,own: row log */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 
 /******************************************************//**
 Free the row log for an index on which online creation was aborted. */
@@ -72,7 +72,7 @@ void
 row_log_abort_sec(
 /*==============*/
        dict_index_t*   index)  /*!< in/out: index (x-latched) */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 
 /******************************************************//**
 Try to log an operation to a secondary index that is
@@ -87,7 +87,7 @@ row_log_online_op_try(
        const dtuple_t* tuple,  /*!< in: index tuple */
        trx_id_t        trx_id) /*!< in: transaction ID for insert,
                                or 0 for delete */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /******************************************************//**
 Logs an operation to a secondary index that is (or was) being created. */
 UNIV_INTERN
@@ -98,7 +98,7 @@ row_log_online_op(
        const dtuple_t* tuple,  /*!< in: index tuple */
        trx_id_t        trx_id) /*!< in: transaction ID for insert,
                                or 0 for delete */
-       UNIV_COLD __attribute__((nonnull));
+       UNIV_COLD MY_ATTRIBUTE((nonnull));
 
 /******************************************************//**
 Gets the error status of the online index rebuild log.
@@ -109,7 +109,7 @@ row_log_table_get_error(
 /*====================*/
        const dict_index_t*     index)  /*!< in: clustered index of a table
                                        that is being rebuilt online */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 
 /******************************************************//**
 Logs a delete operation to a table that is being rebuilt.
@@ -125,7 +125,7 @@ row_log_table_delete(
        const ulint*    offsets,/*!< in: rec_get_offsets(rec,index) */
        const byte*     sys)    /*!< in: DB_TRX_ID,DB_ROLL_PTR that should
                                be logged, or NULL to use those in rec */
-       UNIV_COLD __attribute__((nonnull(1,2,3)));
+       UNIV_COLD MY_ATTRIBUTE((nonnull(1,2,3)));
 
 /******************************************************//**
 Logs an update operation to a table that is being rebuilt.
@@ -141,7 +141,7 @@ row_log_table_update(
        const ulint*    offsets,/*!< in: rec_get_offsets(rec,index) */
        const dtuple_t* old_pk) /*!< in: row_log_table_get_pk()
                                before the update */
-       UNIV_COLD __attribute__((nonnull(1,2,3)));
+       UNIV_COLD MY_ATTRIBUTE((nonnull(1,2,3)));
 
 /******************************************************//**
 Constructs the old PRIMARY KEY and DB_TRX_ID,DB_ROLL_PTR
@@ -161,7 +161,7 @@ row_log_table_get_pk(
        byte*           sys,    /*!< out: DB_TRX_ID,DB_ROLL_PTR for
                                row_log_table_delete(), or NULL */
        mem_heap_t**    heap)   /*!< in/out: memory heap where allocated */
-       UNIV_COLD __attribute__((nonnull(1,2,5), warn_unused_result));
+       UNIV_COLD MY_ATTRIBUTE((nonnull(1,2,5), warn_unused_result));
 
 /******************************************************//**
 Logs an insert to a table that is being rebuilt.
@@ -175,7 +175,7 @@ row_log_table_insert(
        dict_index_t*   index,  /*!< in/out: clustered index, S-latched
                                or X-latched */
        const ulint*    offsets)/*!< in: rec_get_offsets(rec,index) */
-       UNIV_COLD __attribute__((nonnull));
+       UNIV_COLD MY_ATTRIBUTE((nonnull));
 /******************************************************//**
 Notes that a BLOB is being freed during online ALTER TABLE. */
 UNIV_INTERN
@@ -184,7 +184,7 @@ row_log_table_blob_free(
 /*====================*/
        dict_index_t*   index,  /*!< in/out: clustered index, X-latched */
        ulint           page_no)/*!< in: starting page number of the BLOB */
-       UNIV_COLD __attribute__((nonnull));
+       UNIV_COLD MY_ATTRIBUTE((nonnull));
 /******************************************************//**
 Notes that a BLOB is being allocated during online ALTER TABLE. */
 UNIV_INTERN
@@ -193,7 +193,7 @@ row_log_table_blob_alloc(
 /*=====================*/
        dict_index_t*   index,  /*!< in/out: clustered index, X-latched */
        ulint           page_no)/*!< in: starting page number of the BLOB */
-       UNIV_COLD __attribute__((nonnull));
+       UNIV_COLD MY_ATTRIBUTE((nonnull));
 /******************************************************//**
 Apply the row_log_table log to a table upon completing rebuild.
 @return DB_SUCCESS, or error code on failure */
@@ -206,7 +206,7 @@ row_log_table_apply(
                                /*!< in: old table */
        struct TABLE*   table)  /*!< in/out: MySQL table
                                (for reporting duplicates) */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 
 /******************************************************//**
 Get the latest transaction ID that has invoked row_log_online_op()
@@ -217,7 +217,7 @@ trx_id_t
 row_log_get_max_trx(
 /*================*/
        dict_index_t*   index)  /*!< in: index, must be locked */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 
 /******************************************************//**
 Merge the row log to the index upon completing index creation.
@@ -231,7 +231,7 @@ row_log_apply(
        dict_index_t*   index,  /*!< in/out: secondary index */
        struct TABLE*   table)  /*!< in/out: MySQL table
                                (for reporting duplicates) */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 
 #ifndef UNIV_NONINL
 #include "row0log.ic"
index 06e9fec544b59459cf4f41ee908b0e9d740ecfd1..9d3395f3734567983cee4aadb3948f57db3fa6a0 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 2005, 2015, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2005, 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
@@ -127,7 +127,7 @@ row_merge_dup_report(
 /*=================*/
        row_merge_dup_t*        dup,    /*!< in/out: for reporting duplicates */
        const dfield_t*         entry)  /*!< in: duplicate index entry */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /*********************************************************************//**
 Sets an exclusive lock on a table, for the duration of creating indexes.
 @return        error code or DB_SUCCESS */
@@ -138,7 +138,7 @@ row_merge_lock_table(
        trx_t*          trx,            /*!< in/out: transaction */
        dict_table_t*   table,          /*!< in: table to lock */
        enum lock_mode  mode)           /*!< in: LOCK_X or LOCK_S */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /*********************************************************************//**
 Drop indexes that were created before an error occurred.
 The data dictionary must have been locked exclusively by the caller,
@@ -149,7 +149,7 @@ row_merge_drop_indexes_dict(
 /*========================*/
        trx_t*          trx,    /*!< in/out: dictionary transaction */
        table_id_t      table_id)/*!< in: table identifier */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /*********************************************************************//**
 Drop those indexes which were created before an error occurred.
 The data dictionary must have been locked exclusively by the caller,
@@ -162,7 +162,7 @@ row_merge_drop_indexes(
        dict_table_t*   table,  /*!< in/out: table containing the indexes */
        ibool           locked) /*!< in: TRUE=table locked,
                                FALSE=may need to do a lazy drop */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /*********************************************************************//**
 Drop all partially created indexes during crash recovery. */
 UNIV_INTERN
@@ -178,7 +178,7 @@ UNIV_INTERN
 int
 row_merge_file_create_low(
        const char*     path)
-       __attribute__((warn_unused_result));
+       MY_ATTRIBUTE((warn_unused_result));
 /*********************************************************************//**
 Destroy a merge file. And de-register the file from Performance Schema
 if UNIV_PFS_IO is defined. */
@@ -214,7 +214,7 @@ row_merge_rename_tables_dict(
                                        old_table->name */
        const char*     tmp_name,       /*!< in: new name for old_table */
        trx_t*          trx)            /*!< in/out: dictionary transaction */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 
 /*********************************************************************//**
 Rename an index in the dictionary that was created. The data
@@ -228,7 +228,7 @@ row_merge_rename_index_to_add(
        trx_t*          trx,            /*!< in/out: transaction */
        table_id_t      table_id,       /*!< in: table identifier */
        index_id_t      index_id)       /*!< in: index identifier */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /*********************************************************************//**
 Rename an index in the dictionary that is to be dropped. The data
 dictionary must have been locked exclusively by the caller, because
@@ -241,7 +241,7 @@ row_merge_rename_index_to_drop(
        trx_t*          trx,            /*!< in/out: transaction */
        table_id_t      table_id,       /*!< in: table identifier */
        index_id_t      index_id)       /*!< in: index identifier */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /*********************************************************************//**
 Create the index and load in to the dictionary.
 @return        index, or NULL on error */
@@ -274,7 +274,7 @@ row_merge_drop_table(
 /*=================*/
        trx_t*          trx,            /*!< in: transaction */
        dict_table_t*   table)          /*!< in: table instance to drop */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /*********************************************************************//**
 Build indexes on a table by reading a clustered index,
 creating a temporary file containing index entries, merge sorting
@@ -307,7 +307,7 @@ row_merge_build_indexes(
                                        AUTO_INCREMENT column, or
                                        ULINT_UNDEFINED if none is added */
        ib_sequence_t&  sequence)       /*!< in/out: autoinc sequence */
-       __attribute__((nonnull(1,2,3,5,6,8), warn_unused_result));
+       MY_ATTRIBUTE((nonnull(1,2,3,5,6,8), warn_unused_result));
 /********************************************************************//**
 Write a buffer to a block. */
 UNIV_INTERN
@@ -317,7 +317,7 @@ row_merge_buf_write(
        const row_merge_buf_t*  buf,    /*!< in: sorted buffer */
        const merge_file_t*     of,     /*!< in: output file */
        row_merge_block_t*      block)  /*!< out: buffer for writing to file */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /********************************************************************//**
 Sort a buffer. */
 UNIV_INTERN
@@ -327,7 +327,7 @@ row_merge_buf_sort(
        row_merge_buf_t*        buf,    /*!< in/out: sort buffer */
        row_merge_dup_t*        dup)    /*!< in/out: reporter of duplicates
                                        (NULL if non-unique index) */
-       __attribute__((nonnull(1)));
+       MY_ATTRIBUTE((nonnull(1)));
 /********************************************************************//**
 Write a merge block to the file system.
 @return TRUE if request was successful, FALSE if fail */
@@ -347,7 +347,7 @@ row_merge_buf_t*
 row_merge_buf_empty(
 /*================*/
        row_merge_buf_t*        buf)    /*!< in,own: sort buffer */
-       __attribute__((warn_unused_result, nonnull));
+       MY_ATTRIBUTE((warn_unused_result, nonnull));
 
 /** Create a merge file in the given location.
 @param[out]    merge_file      merge file structure
@@ -373,7 +373,7 @@ row_merge_sort(
                                        index entries */
        row_merge_block_t*      block,  /*!< in/out: 3 buffers */
        int*                    tmpfd)  /*!< in/out: temporary file handle */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /*********************************************************************//**
 Allocate a sort buffer.
 @return own: sort buffer */
@@ -382,7 +382,7 @@ row_merge_buf_t*
 row_merge_buf_create(
 /*=================*/
        dict_index_t*   index)  /*!< in: secondary index */
-       __attribute__((warn_unused_result, nonnull, malloc));
+       MY_ATTRIBUTE((warn_unused_result, nonnull, malloc));
 /*********************************************************************//**
 Deallocate a sort buffer. */
 UNIV_INTERN
@@ -390,7 +390,7 @@ void
 row_merge_buf_free(
 /*===============*/
        row_merge_buf_t*        buf)    /*!< in,own: sort buffer to be freed */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /*********************************************************************//**
 Destroy a merge file. */
 UNIV_INTERN
@@ -398,7 +398,7 @@ void
 row_merge_file_destroy(
 /*===================*/
        merge_file_t*   merge_file)     /*!< in/out: merge file structure */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /********************************************************************//**
 Read a merge block from the file system.
 @return TRUE if request was successful, FALSE if fail */
@@ -428,5 +428,5 @@ row_merge_read_rec(
                                        or NULL on end of list
                                        (non-NULL on I/O error) */
        ulint*                  offsets)/*!< out: offsets of mrec */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 #endif /* row0merge.h */
index 06c07002c2b59486114d2c3f5cb1b0e8aac5f233..fc1846b76f31226fa1b1769623a4c1f6f6d7b7a9 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 2000, 2012, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2000, 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
@@ -167,7 +167,7 @@ row_mysql_handle_errors(
        trx_t*          trx,    /*!< in: transaction */
        que_thr_t*      thr,    /*!< in: query thread, or NULL */
        trx_savept_t*   savept) /*!< in: savepoint, or NULL */
-       __attribute__((nonnull(1,2)));
+       MY_ATTRIBUTE((nonnull(1,2)));
 /********************************************************************//**
 Create a prebuilt struct for a MySQL table handle.
 @return        own: a prebuilt struct */
@@ -209,7 +209,7 @@ row_lock_table_autoinc_for_mysql(
 /*=============================*/
        row_prebuilt_t* prebuilt)       /*!< in: prebuilt struct in the MySQL
                                        table handle */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /*********************************************************************//**
 Sets a table lock on the table mentioned in prebuilt.
 @return        error code or DB_SUCCESS */
@@ -225,7 +225,7 @@ row_lock_table_for_mysql(
                                        prebuilt->select_lock_type */
        ulint           mode)           /*!< in: lock mode of table
                                        (ignored if table==NULL) */
-       __attribute__((nonnull(1)));
+       MY_ATTRIBUTE((nonnull(1)));
 /*********************************************************************//**
 Does an insert for MySQL.
 @return        error code or DB_SUCCESS */
@@ -236,7 +236,7 @@ row_insert_for_mysql(
        byte*           mysql_rec,      /*!< in: row in the MySQL format */
        row_prebuilt_t* prebuilt)       /*!< in: prebuilt struct in MySQL
                                        handle */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /*********************************************************************//**
 Builds a dummy query graph used in selects. */
 UNIV_INTERN
@@ -276,7 +276,7 @@ row_update_for_mysql(
                                        the MySQL format */
        row_prebuilt_t* prebuilt)       /*!< in: prebuilt struct in MySQL
                                        handle */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /*********************************************************************//**
 This can only be used when srv_locks_unsafe_for_binlog is TRUE or this
 session is using a READ COMMITTED or READ UNCOMMITTED isolation level.
@@ -297,7 +297,7 @@ row_unlock_for_mysql(
                                        the records under pcur and
                                        clust_pcur, and we do not need
                                        to reposition the cursors. */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /*********************************************************************//**
 Checks if a table name contains the string "/#sql" which denotes temporary
 tables in MySQL.
@@ -306,7 +306,7 @@ UNIV_INTERN
 bool
 row_is_mysql_tmp_table_name(
 /*========================*/
-       const char*     name) __attribute__((warn_unused_result));
+       const char*     name) MY_ATTRIBUTE((warn_unused_result));
                                /*!< in: table name in the form
                                'database/tablename' */
 
@@ -331,7 +331,7 @@ row_update_cascade_for_mysql(
        upd_node_t*     node,   /*!< in: update node used in the cascade
                                or set null operation */
        dict_table_t*   table)  /*!< in: table where we do the operation */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /*********************************************************************//**
 Locks the data dictionary exclusively for performing a table create or other
 data dictionary modification operation. */
@@ -387,7 +387,7 @@ row_create_table_for_mysql(
                                added to the data dictionary cache) */
        trx_t*          trx,    /*!< in/out: transaction */
        bool            commit) /*!< in: if true, commit the transaction */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /*********************************************************************//**
 Does an index creation operation for MySQL. TODO: currently failure
 to create an index results in dropping the whole table! This is no problem
@@ -406,7 +406,7 @@ row_create_index_for_mysql(
                                        index columns, which are
                                        then checked for not being too
                                        large. */
-       __attribute__((nonnull(1,2), warn_unused_result));
+       MY_ATTRIBUTE((nonnull(1,2), warn_unused_result));
 /*********************************************************************//**
 Scans a table create SQL string and adds to the data dictionary
 the foreign key constraints declared in the string. This function
@@ -432,7 +432,7 @@ row_table_add_foreign_constraints(
        ibool           reject_fks)     /*!< in: if TRUE, fail with error
                                        code DB_CANNOT_ADD_CONSTRAINT if
                                        any foreign keys are found. */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /*********************************************************************//**
 The master thread in srv0srv.cc calls this regularly to drop tables which
 we must drop in background after queries to them have ended. Such lazy
@@ -461,7 +461,7 @@ row_mysql_lock_table(
        dict_table_t*   table,          /*!< in: table to lock */
        enum lock_mode  mode,           /*!< in: LOCK_X or LOCK_S */
        const char*     op_info)        /*!< in: string for trx->op_info */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 
 /*********************************************************************//**
 Truncates a table for MySQL.
@@ -472,7 +472,7 @@ row_truncate_table_for_mysql(
 /*=========================*/
        dict_table_t*   table,  /*!< in: table handle */
        trx_t*          trx)    /*!< in: transaction handle */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /*********************************************************************//**
 Drops a table for MySQL.  If the name of the dropped table ends in
 one of "innodb_monitor", "innodb_lock_monitor", "innodb_tablespace_monitor",
@@ -491,7 +491,7 @@ row_drop_table_for_mysql(
        bool            nonatomic = true)
                                /*!< in: whether it is permitted
                                to release and reacquire dict_operation_lock */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /*********************************************************************//**
 Drop all temporary tables during crash recovery. */
 UNIV_INTERN
@@ -510,7 +510,7 @@ row_discard_tablespace_for_mysql(
 /*=============================*/
        const char*     name,   /*!< in: table name */
        trx_t*          trx)    /*!< in: transaction handle */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /*****************************************************************//**
 Imports a tablespace. The space id in the .ibd file must match the space id
 of the table in the data dictionary.
@@ -521,7 +521,7 @@ row_import_tablespace_for_mysql(
 /*============================*/
        dict_table_t*   table,          /*!< in/out: table */
        row_prebuilt_t* prebuilt)       /*!< in: prebuilt struct in MySQL */
-        __attribute__((nonnull, warn_unused_result));
+        MY_ATTRIBUTE((nonnull, warn_unused_result));
 /*********************************************************************//**
 Drops a database for MySQL.
 @return        error code or DB_SUCCESS */
@@ -531,7 +531,7 @@ row_drop_database_for_mysql(
 /*========================*/
        const char*     name,   /*!< in: database name which ends to '/' */
        trx_t*          trx)    /*!< in: transaction handle */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /*********************************************************************//**
 Renames a table for MySQL.
 @return        error code or DB_SUCCESS */
@@ -543,7 +543,7 @@ row_rename_table_for_mysql(
        const char*     new_name,       /*!< in: new table name */
        trx_t*          trx,            /*!< in/out: transaction */
        bool            commit)         /*!< in: whether to commit trx */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /*********************************************************************//**
 Checks that the index contains entries in an ascending order, unique
 constraint is not broken, and calculates the number of index entries
@@ -558,7 +558,7 @@ row_check_index_for_mysql(
        const dict_index_t*     index,          /*!< in: index */
        ulint*                  n_rows)         /*!< out: number of entries
                                                seen in the consistent read */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /*********************************************************************//**
 Determines if a table is a magic monitor table.
 @return        true if monitor table */
@@ -568,7 +568,7 @@ row_is_magic_monitor_table(
 /*=======================*/
        const char*     table_name)     /*!< in: name of the table, in the
                                        form database/table_name */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /*********************************************************************//**
 Initialize this module */
 UNIV_INTERN
@@ -593,7 +593,7 @@ row_mysql_table_id_reassign(
        dict_table_t*   table,  /*!< in/out: table */
        trx_t*          trx,    /*!< in/out: transaction */
        table_id_t*     new_id) /*!< out: new table id */
-        __attribute__((nonnull, warn_unused_result));
+        MY_ATTRIBUTE((nonnull, warn_unused_result));
 
 /* A struct describing a place for an individual column in the MySQL
 row format which is presented to the table handler in ha_innobase.
index 888289a6c79bb8e98fa459aeed1db87b3ed93f9e..5df899bc39937e64248efb0d8c49fc9b90e75123 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1997, 2015, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1997, 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
@@ -47,7 +47,7 @@ row_purge_node_create(
        que_thr_t*      parent,         /*!< in: parent node, i.e., a
                                        thr node */
        mem_heap_t*     heap)           /*!< in: memory heap where created */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /***********************************************************//**
 Determines if it is possible to remove a secondary index entry.
 Removal is possible if the secondary index entry does not refer to any
@@ -70,7 +70,7 @@ row_purge_poss_sec(
        purge_node_t*   node,   /*!< in/out: row purge node */
        dict_index_t*   index,  /*!< in: secondary index */
        const dtuple_t* entry)  /*!< in: secondary index entry */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /***************************************************************
 Does the purge operation for a single undo log record. This is a high-level
 function used in an SQL execution graph.
@@ -80,7 +80,7 @@ que_thr_t*
 row_purge_step(
 /*===========*/
        que_thr_t*      thr)    /*!< in: query thread */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 
 /* Purge node structure */
 
index 1d6d11291b831e5e6deb75b4a0b8684859f89c89..35d8184d33c1cbb3e2b2db0f5bcc9db220ff1071 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 2012, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2012, 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
@@ -43,7 +43,7 @@ row_quiesce_table_start(
 /*====================*/
        dict_table_t*   table,          /*!< in: quiesce this table */
        trx_t*          trx)            /*!< in/out: transaction/session */
-        __attribute__((nonnull));
+        MY_ATTRIBUTE((nonnull));
 
 /*********************************************************************//**
 Set a table's quiesce state.
@@ -55,7 +55,7 @@ row_quiesce_set_state(
        dict_table_t*   table,          /*!< in: quiesce this table */
        ib_quiesce_t    state,          /*!< in: quiesce state to set */
        trx_t*          trx)            /*!< in/out: transaction */
-        __attribute__((nonnull, warn_unused_result));
+        MY_ATTRIBUTE((nonnull, warn_unused_result));
 
 /*********************************************************************//**
 Cleanup after table quiesce. */
@@ -65,7 +65,7 @@ row_quiesce_table_complete(
 /*=======================*/
        dict_table_t*   table,          /*!< in: quiesce this table */
        trx_t*          trx)            /*!< in/out: transaction/session */
-        __attribute__((nonnull));
+        MY_ATTRIBUTE((nonnull));
 
 #ifndef UNIV_NONINL
 #include "row0quiesce.ic"
index a4e5e0dd2fa2e8ec3ce88601a0d2a5d0bb7972c0..b04068c5a5d0bce32311afdba091ee9e3a8f3767 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1996, 2012, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1996, 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
@@ -47,7 +47,7 @@ row_get_trx_id_offset(
 /*==================*/
        const dict_index_t*     index,  /*!< in: clustered index */
        const ulint*            offsets)/*!< in: record offsets */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /*********************************************************************//**
 Reads the trx id field from a clustered index record.
 @return        value of the field */
@@ -58,7 +58,7 @@ row_get_rec_trx_id(
        const rec_t*            rec,    /*!< in: record */
        const dict_index_t*     index,  /*!< in: clustered index */
        const ulint*            offsets)/*!< in: rec_get_offsets(rec, index) */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /*********************************************************************//**
 Reads the roll pointer field from a clustered index record.
 @return        value of the field */
@@ -69,7 +69,7 @@ row_get_rec_roll_ptr(
        const rec_t*            rec,    /*!< in: record */
        const dict_index_t*     index,  /*!< in: clustered index */
        const ulint*            offsets)/*!< in: rec_get_offsets(rec, index) */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /*****************************************************************//**
 When an insert or purge to a table is performed, this function builds
 the entry to be inserted into or purged from an index on the table.
@@ -88,7 +88,7 @@ row_build_index_entry_low(
        mem_heap_t*             heap)   /*!< in: memory heap from which
                                        the memory for the index entry
                                        is allocated */
-       __attribute__((warn_unused_result, nonnull(1,3,4)));
+       MY_ATTRIBUTE((warn_unused_result, nonnull(1,3,4)));
 /*****************************************************************//**
 When an insert or purge to a table is performed, this function builds
 the entry to be inserted into or purged from an index on the table.
@@ -107,7 +107,7 @@ row_build_index_entry(
        mem_heap_t*             heap)   /*!< in: memory heap from which
                                        the memory for the index entry
                                        is allocated */
-       __attribute__((warn_unused_result, nonnull(1,3,4)));
+       MY_ATTRIBUTE((warn_unused_result, nonnull(1,3,4)));
 /*******************************************************************//**
 An inverse function to row_build_index_entry. Builds a row from a
 record in a clustered index.
@@ -155,7 +155,7 @@ row_build(
                                        prefixes, or NULL */
        mem_heap_t*             heap)   /*!< in: memory heap from which
                                        the memory needed is allocated */
-       __attribute__((nonnull(2,3,9)));
+       MY_ATTRIBUTE((nonnull(2,3,9)));
 /*******************************************************************//**
 Converts an index record to a typed data tuple.
 @return index entry built; does not set info_bits, and the data fields
@@ -171,7 +171,7 @@ row_rec_to_index_entry_low(
                                        stored columns */
        mem_heap_t*             heap)   /*!< in: memory heap from which
                                        the memory needed is allocated */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /*******************************************************************//**
 Converts an index record to a typed data tuple. NOTE that externally
 stored (often big) fields are NOT copied to heap.
@@ -187,7 +187,7 @@ row_rec_to_index_entry(
                                        stored columns */
        mem_heap_t*             heap)   /*!< in: memory heap from which
                                        the memory needed is allocated */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /*******************************************************************//**
 Builds from a secondary index record a row reference with which we can
 search the clustered index record.
@@ -210,7 +210,7 @@ row_build_row_ref(
                                as long as the row reference is used! */
        mem_heap_t*     heap)   /*!< in: memory heap from which the memory
                                needed is allocated */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /*******************************************************************//**
 Builds from a secondary index record a row reference with which we can
 search the clustered index record. */
@@ -232,7 +232,7 @@ row_build_row_ref_in_tuple(
        ulint*                  offsets,/*!< in: rec_get_offsets(rec, index)
                                        or NULL */
        trx_t*                  trx)    /*!< in: transaction or NULL */
-       __attribute__((nonnull(1,2,3)));
+       MY_ATTRIBUTE((nonnull(1,2,3)));
 /*******************************************************************//**
 Builds from a secondary index record a row reference with which we can
 search the clustered index record. */
@@ -263,7 +263,7 @@ row_search_on_row_ref(
        const dict_table_t*     table,  /*!< in: table */
        const dtuple_t*         ref,    /*!< in: row reference */
        mtr_t*                  mtr)    /*!< in/out: mtr */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /*********************************************************************//**
 Fetches the clustered index record for a secondary index record. The latches
 on the secondary index record are preserved.
@@ -277,7 +277,7 @@ row_get_clust_rec(
        dict_index_t*   index,  /*!< in: secondary index */
        dict_index_t**  clust_index,/*!< out: clustered index */
        mtr_t*          mtr)    /*!< in: mtr */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 
 /** Result of row_search_index_entry */
 enum row_search_result {
@@ -305,7 +305,7 @@ row_search_index_entry(
        btr_pcur_t*     pcur,   /*!< in/out: persistent cursor, which must
                                be closed by the caller */
        mtr_t*          mtr)    /*!< in: mtr */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 
 #define ROW_COPY_DATA          1
 #define ROW_COPY_POINTERS      2
@@ -334,7 +334,7 @@ row_raw_format(
        char*                   buf,            /*!< out: output buffer */
        ulint                   buf_size)       /*!< in: output buffer size
                                                in bytes */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 
 #ifndef UNIV_NONINL
 #include "row0row.ic"
index c8be80f89d9cb71ee4185def82aa6e942c475eab..fd5bc755a22a14b2748252103dcb1b4c8fd2355b 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1997, 2012, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1997, 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
@@ -168,7 +168,7 @@ row_search_for_mysql(
                                        then prebuilt must have a pcur
                                        with stored position! In opening of a
                                        cursor 'direction' should be 0. */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /*******************************************************************//**
 Checks if MySQL at the moment is allowed for this table to retrieve a
 consistent read result, or store it to the query cache.
@@ -190,7 +190,7 @@ row_search_max_autoinc(
        dict_index_t*   index,          /*!< in: index to search */
        const char*     col_name,       /*!< in: autoinc column name */
        ib_uint64_t*    value)          /*!< out: AUTOINC value read */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 
 /** A structure for caching column values for prefetched rows */
 struct sel_buf_t{
index ebf4881208a4ebbdde85755f7fa532ec755cedaa..89e334e5433df80a1d3c3202d5ba521a8d462daa 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1997, 2012, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1997, 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
@@ -46,7 +46,7 @@ dberr_t
 row_undo_ins(
 /*=========*/
        undo_node_t*    node)   /*!< in: row undo node */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 #ifndef UNIV_NONINL
 #include "row0uins.ic"
 #endif
index f89d5a334fc310c4f65e07a6afd30f603bb047d2..4f1d8e1f66c53f974b4a5c7f3c3ac02883d15d58 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1997, 2012, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1997, 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
@@ -43,7 +43,7 @@ row_undo_mod(
 /*=========*/
        undo_node_t*    node,   /*!< in: row undo node */
        que_thr_t*      thr)    /*!< in: query thread */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 
 #ifndef UNIV_NONINL
 #include "row0umod.ic"
index 27dedeb65a7f6df7ca83fc6c88bdd6a630bebd93..e59ec58b63c1b82ce3c108119813b8068bd17719 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1996, 2012, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1996, 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
@@ -91,7 +91,7 @@ upd_get_field_by_field_no(
 /*======================*/
        const upd_t*    update, /*!< in: update vector */
        ulint           no)     /*!< in: field_no */
-       __attribute__((nonnull, pure));
+       MY_ATTRIBUTE((nonnull, pure));
 /*********************************************************************//**
 Writes into the redo log the values of trx id and roll ptr and enough info
 to determine their positions within a clustered index record.
@@ -174,7 +174,7 @@ bool
 row_upd_changes_disowned_external(
 /*==============================*/
        const upd_t*    update) /*!< in: update vector */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 #endif /* !UNIV_HOTBACKUP */
 /***********************************************************//**
 Replaces the new column values stored in the update vector to the
@@ -207,7 +207,7 @@ row_upd_build_sec_rec_difference_binary(
        const ulint*    offsets,/*!< in: rec_get_offsets(rec, index) */
        const dtuple_t* entry,  /*!< in: entry to insert */
        mem_heap_t*     heap)   /*!< in: memory heap from which allocated */
-       __attribute__((warn_unused_result, nonnull));
+       MY_ATTRIBUTE((warn_unused_result, nonnull));
 /***************************************************************//**
 Builds an update vector from those fields, excluding the roll ptr and
 trx id fields, which in an index entry differ from a record that has
@@ -227,7 +227,7 @@ row_upd_build_difference_binary(
        trx_t*          trx,    /*!< in: transaction (for diagnostics),
                                or NULL */
        mem_heap_t*     heap)   /*!< in: memory heap from which allocated */
-       __attribute__((nonnull(1,2,3,7), warn_unused_result));
+       MY_ATTRIBUTE((nonnull(1,2,3,7), warn_unused_result));
 /***********************************************************//**
 Replaces the new column values stored in the update vector to the index entry
 given. */
@@ -250,7 +250,7 @@ row_upd_index_replace_new_col_vals_index_pos(
                                does not work for non-clustered indexes. */
        mem_heap_t*     heap)   /*!< in: memory heap for allocating and
                                copying the new values */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /***********************************************************//**
 Replaces the new column values stored in the update vector to the index entry
 given. */
@@ -269,7 +269,7 @@ row_upd_index_replace_new_col_vals(
                                an upd_field is the clustered index position */
        mem_heap_t*     heap)   /*!< in: memory heap for allocating and
                                copying the new values */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /***********************************************************//**
 Replaces the new column values stored in the update vector. */
 UNIV_INTERN
@@ -311,7 +311,7 @@ row_upd_changes_ord_field_binary_func(
                                compile time */
        const row_ext_t*ext)    /*!< NULL, or prefixes of the externally
                                stored columns in the old row */
-       __attribute__((nonnull(1,2), warn_unused_result));
+       MY_ATTRIBUTE((nonnull(1,2), warn_unused_result));
 #ifdef UNIV_DEBUG
 # define row_upd_changes_ord_field_binary(index,update,thr,row,ext)    \
        row_upd_changes_ord_field_binary_func(index,update,thr,row,ext)
@@ -338,7 +338,7 @@ row_upd_changes_doc_id(
 /*===================*/
        dict_table_t*   table,          /*!< in: table */
        upd_field_t*    upd_field)      /*!< in: field to check */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /***********************************************************//**
 Checks if an update vector changes an ordering field of an index record.
 This function is fast if the update vector is short or the number of ordering
index 1df5b4d3e989b43ca88bb51987914e3a4c834bd5..7b850215701c382c3c691a3921ea398e38761ebb 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1997, 2012, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1997, 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
@@ -110,7 +110,7 @@ row_vers_build_for_consistent_read(
                                if the history is missing or the record
                                does not exist in the view, that is,
                                it was freshly inserted afterwards */
-       __attribute__((nonnull(1,2,3,4,5,6,7)));
+       MY_ATTRIBUTE((nonnull(1,2,3,4,5,6,7)));
 
 /*****************************************************************//**
 Constructs the last committed version of a clustered index record,
@@ -136,7 +136,7 @@ row_vers_build_for_semi_consistent_read(
        const rec_t**   old_vers)/*!< out: rec, old version, or NULL if the
                                record does not exist in the view, that is,
                                it was freshly inserted afterwards */
-       __attribute__((nonnull(1,2,3,4,5)));
+       MY_ATTRIBUTE((nonnull(1,2,3,4,5)));
 
 
 #ifndef UNIV_NONINL
index e2c0ca686647e771b47c5a3ff35de8677bac374d..29557a1b8916abfe1de2a9355b3f4c5881adcdb0 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1995, 2015, Oracle and/or its affiliates. All rights reserved.
+Copyright (c) 1995, 2016, Oracle and/or its affiliates. All rights reserved.
 Copyright (c) 2008, 2009, Google Inc.
 Copyright (c) 2009, Percona Inc.
 
@@ -351,6 +351,7 @@ extern unsigned long long   srv_stats_transient_sample_pages;
 extern my_bool                 srv_stats_persistent;
 extern unsigned long long      srv_stats_persistent_sample_pages;
 extern my_bool                 srv_stats_auto_recalc;
+extern my_bool                 srv_stats_include_delete_marked;
 
 extern ibool   srv_use_doublewrite_buf;
 extern ulong   srv_doublewrite_batch_size;
@@ -738,7 +739,7 @@ UNIV_INTERN
 os_thread_ret_t
 DECLARE_THREAD(srv_purge_coordinator_thread)(
 /*=========================================*/
-       void*   arg __attribute__((unused)));   /*!< in: a dummy parameter
+       void*   arg MY_ATTRIBUTE((unused)));    /*!< in: a dummy parameter
                                                required by os_thread_create */
 
 /*********************************************************************//**
@@ -748,7 +749,7 @@ UNIV_INTERN
 os_thread_ret_t
 DECLARE_THREAD(srv_worker_thread)(
 /*==============================*/
-       void*   arg __attribute__((unused)));   /*!< in: a dummy parameter
+       void*   arg MY_ATTRIBUTE((unused)));    /*!< in: a dummy parameter
                                                required by os_thread_create */
 } /* extern "C" */
 
index 40d502f4459ac225324b962713801e8e1101c137..963b767f0fb5b7db93251efca8b5d67eef0c8c9c 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1995, 2012, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1995, 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
@@ -105,7 +105,7 @@ srv_path_copy(
        ulint           dest_len,       /*!< in: max bytes to copy */
        const char*     basedir,        /*!< in: base directory */
        const char*     table_name)     /*!< in: source table name */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 
 /*****************************************************************//**
 Get the meta-data filename from the table name. */
@@ -116,7 +116,7 @@ srv_get_meta_data_filename(
        dict_table_t*   table,          /*!< in: table */
        char*                   filename,       /*!< out: filename */
        ulint                   max_len)        /*!< in: filename max length */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 
 /** Log sequence number at shutdown */
 extern lsn_t   srv_shutdown_lsn;
index 15dbdcb540d4fc117923438aba22c76d43792adc..a9e66f261c6b0fee1bdf04d055a97f1522f8dc8a 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1995, 2013, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1995, 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
@@ -110,7 +110,7 @@ sync_array_print_long_waits(
 /*========================*/
        os_thread_id_t* waiter, /*!< out: longest waiting thread */
        const void**    sema)   /*!< out: longest-waited-for semaphore */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /********************************************************************//**
 Validates the integrity of the wait array. Checks
 that the number of reserved cells equals the count variable. */
index fdcbb1b6fa54b07bd064e9586aa1be112f701e49..6b1e99bbbeec81a204a633b899b6d1a2ac8b82fb 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1995, 2014, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved.
 Copyright (c) 2008, Google Inc.
 
 Portions of this file contain modifications contributed and copyrighted by
@@ -333,7 +333,7 @@ ibool
 rw_lock_s_lock_low(
 /*===============*/
        rw_lock_t*      lock,   /*!< in: pointer to rw-lock */
-       ulint           pass __attribute__((unused)),
+       ulint           pass MY_ATTRIBUTE((unused)),
                                /*!< in: pass value; != 0, if the lock will be
                                passed to another thread to unlock */
        const char*     file_name, /*!< in: file name where lock requested */
@@ -501,7 +501,7 @@ rw_lock_own(
        rw_lock_t*      lock,           /*!< in: rw-lock */
        ulint           lock_type)      /*!< in: lock type: RW_LOCK_SHARED,
                                        RW_LOCK_EX */
-       __attribute__((warn_unused_result));
+       MY_ATTRIBUTE((warn_unused_result));
 #endif /* UNIV_SYNC_DEBUG */
 /******************************************************************//**
 Checks if somebody has locked the rw-lock in the specified mode. */
index bb05ae7daf122cf0a99389280c0e2bfa2b185d8d..f2d4215a0511e73997fd89e8b9c4cb93dd5b7989 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1995, 2011, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved.
 Copyright (c) 2008, Google Inc.
 
 Portions of this file contain modifications contributed and copyrighted by
@@ -306,7 +306,7 @@ ibool
 rw_lock_s_lock_low(
 /*===============*/
        rw_lock_t*      lock,   /*!< in: pointer to rw-lock */
-       ulint           pass __attribute__((unused)),
+       ulint           pass MY_ATTRIBUTE((unused)),
                                /*!< in: pass value; != 0, if the lock will be
                                passed to another thread to unlock */
        const char*     file_name, /*!< in: file name where lock requested */
index d6f8d8f5e4ccb81f27be781ce79ce43cf3f1bc77..95d9ef664987eb48252affc448471e35eb69b973 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1995, 2015, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved.
 Copyright (c) 2008, Google Inc.
 Copyright (c) 2012, Facebook Inc.
 
@@ -400,7 +400,7 @@ ibool
 mutex_own(
 /*======*/
        const ib_mutex_t*       mutex)  /*!< in: mutex */
-       __attribute__((warn_unused_result));
+       MY_ATTRIBUTE((warn_unused_result));
 #endif /* UNIV_DEBUG */
 #ifdef UNIV_SYNC_DEBUG
 /******************************************************************//**
@@ -415,7 +415,7 @@ sync_thread_add_level(
        ulint   level,  /*!< in: level in the latching order; if
                        SYNC_LEVEL_VARYING, nothing is done */
        ibool   relock) /*!< in: TRUE if re-entering an x-lock */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /******************************************************************//**
 Removes a latch from the thread level array if it is found there.
 @return TRUE if found in the array; it is no error if the latch is
@@ -445,7 +445,7 @@ sync_thread_levels_nonempty_gen(
 /*============================*/
        ibool   dict_mutex_allowed)     /*!< in: TRUE if dictionary mutex is
                                        allowed to be owned by the thread */
-       __attribute__((warn_unused_result));
+       MY_ATTRIBUTE((warn_unused_result));
 /******************************************************************//**
 Checks if the level array for the current thread is empty,
 except for data dictionary latches. */
@@ -462,7 +462,7 @@ sync_thread_levels_nonempty_trx(
        ibool   has_search_latch)
                                /*!< in: TRUE if and only if the thread
                                is supposed to hold btr_search_latch */
-       __attribute__((warn_unused_result));
+       MY_ATTRIBUTE((warn_unused_result));
 
 /******************************************************************//**
 Gets the debug information for a reserved mutex. */
index 50da55d2ea388858c0f4f8f0df467193d41a7e3a..359937e3583922f8478c52863d3dcc942459a335 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1996, 2013, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1996, 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
@@ -86,7 +86,7 @@ ulint
 trx_undo_rec_get_offset(
 /*====================*/
        undo_no_t       undo_no)        /*!< in: undo no read from node */
-       __attribute__((const));
+       MY_ATTRIBUTE((const));
 
 /**********************************************************************//**
 Returns the start of the undo record data area. */
@@ -109,7 +109,7 @@ trx_undo_rec_get_pars(
                                        externally stored fild */
        undo_no_t*      undo_no,        /*!< out: undo log record number */
        table_id_t*     table_id)       /*!< out: table id */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /*******************************************************************//**
 Builds a row reference from an undo log record.
 @return        pointer to remaining part of undo record */
@@ -201,7 +201,7 @@ trx_undo_rec_get_partial_row(
                                only in the assertion. */
        mem_heap_t*     heap)   /*!< in: memory heap from which the memory
                                needed is allocated */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /***********************************************************************//**
 Writes information to an undo log about an insert, update, or a delete marking
 of a clustered index record. This information is used in a rollback of the
@@ -233,7 +233,7 @@ trx_undo_report_row_operation(
                                        inserted undo log record,
                                        0 if BTR_NO_UNDO_LOG
                                        flag was specified */
-       __attribute__((nonnull(3,4,10), warn_unused_result));
+       MY_ATTRIBUTE((nonnull(3,4,10), warn_unused_result));
 /******************************************************************//**
 Copies an undo record to heap. This function can be called if we know that
 the undo log record exists.
@@ -244,7 +244,7 @@ trx_undo_get_undo_rec_low(
 /*======================*/
        roll_ptr_t      roll_ptr,       /*!< in: roll pointer to record */
        mem_heap_t*     heap)           /*!< in: memory heap where copied */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /*******************************************************************//**
 Build a previous version of a clustered index record. The caller must
 hold a latch on the index page of the clustered index record.
@@ -268,7 +268,7 @@ trx_undo_prev_version_build(
        rec_t**         old_vers)/*!< out, own: previous version, or NULL if
                                rec is the first inserted version, or if
                                history data has been deleted */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 #endif /* !UNIV_HOTBACKUP */
 /***********************************************************//**
 Parses a redo log record of adding an undo log record.
index d5ab83d77671b398d7dc108f868f870326409a30..98a667b2ec1042ef75125b48badd427d35a7fcbe 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1996, 2014, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1996, 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
@@ -125,7 +125,7 @@ extern "C" UNIV_INTERN
 os_thread_ret_t
 DECLARE_THREAD(trx_rollback_or_clean_all_recovered)(
 /*================================================*/
-       void*   arg __attribute__((unused)));
+       void*   arg MY_ATTRIBUTE((unused)));
                        /*!< in: a dummy parameter required by
                        os_thread_create */
 /*********************************************************************//**
@@ -152,7 +152,7 @@ dberr_t
 trx_rollback_for_mysql(
 /*===================*/
        trx_t*  trx)    /*!< in/out: transaction */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /*******************************************************************//**
 Rollback the latest SQL statement for MySQL.
 @return        error code or DB_SUCCESS */
@@ -161,7 +161,7 @@ dberr_t
 trx_rollback_last_sql_stat_for_mysql(
 /*=================================*/
        trx_t*  trx)    /*!< in/out: transaction */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /*******************************************************************//**
 Rollback a transaction to a given savepoint or do a complete rollback.
 @return        error code or DB_SUCCESS */
@@ -173,7 +173,7 @@ trx_rollback_to_savepoint(
        trx_savept_t*   savept) /*!< in: pointer to savepoint undo number, if
                                partial rollback requested, or NULL for
                                complete rollback */
-       __attribute__((nonnull(1)));
+       MY_ATTRIBUTE((nonnull(1)));
 /*******************************************************************//**
 Rolls back a transaction back to a named savepoint. Modifications after the
 savepoint are undone but InnoDB does NOT release the corresponding locks
@@ -195,7 +195,7 @@ trx_rollback_to_savepoint_for_mysql(
                                                information to remove the
                                                binlog entries of the queries
                                                executed after the savepoint */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /*******************************************************************//**
 Creates a named savepoint. If the transaction is not yet started, starts it.
 If there is already a savepoint of the same name, this call erases that old
@@ -212,7 +212,7 @@ trx_savepoint_for_mysql(
                                                position corresponding to this
                                                connection at the time of the
                                                savepoint */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /*******************************************************************//**
 Releases a named savepoint. Savepoints which
 were set after this savepoint are deleted.
@@ -224,7 +224,7 @@ trx_release_savepoint_for_mysql(
 /*============================*/
        trx_t*          trx,                    /*!< in: transaction handle */
        const char*     savepoint_name)         /*!< in: savepoint name */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /*******************************************************************//**
 Frees savepoint structs starting from savep. */
 UNIV_INTERN
index 28ed5bfa105e6b7a1ad34ec2d19a22065b96366e..534a04c0f961f3129294de2ce0f3848176592b21 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1996, 2012, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1996, 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
@@ -270,7 +270,7 @@ ibool
 trx_in_trx_list(
 /*============*/
        const trx_t*    in_trx)         /*!< in: transaction */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 #endif /* UNIV_DEBUG */
 #if defined UNIV_DEBUG || defined UNIV_BLOB_LIGHT_DEBUG
 /***********************************************************//**
@@ -281,7 +281,7 @@ ibool
 trx_assert_recovered(
 /*=================*/
        trx_id_t        trx_id)         /*!< in: transaction identifier */
-       __attribute__((warn_unused_result));
+       MY_ATTRIBUTE((warn_unused_result));
 #endif /* UNIV_DEBUG || UNIV_BLOB_LIGHT_DEBUG */
 /*****************************************************************//**
 Updates the offset information about the end of the MySQL binlog entry
index 6adbe2c98c156c68076917bc378139e2ca52f31a..fa1fa415f6a5ecdca6179e14b923bd5120bdbe74 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1996, 2013, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1996, 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
@@ -103,7 +103,7 @@ void
 trx_free_prepared(
 /*==============*/
        trx_t*  trx)    /*!< in, own: trx object */
-       UNIV_COLD __attribute__((nonnull));
+       UNIV_COLD MY_ATTRIBUTE((nonnull));
 /********************************************************************//**
 Frees a transaction object for MySQL. */
 UNIV_INTERN
@@ -169,7 +169,7 @@ trx_start_for_ddl_low(
 /*==================*/
        trx_t*          trx,    /*!< in/out: transaction */
        trx_dict_op_t   op)     /*!< in: dictionary operation type */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 
 #ifdef UNIV_DEBUG
 #define trx_start_for_ddl(t, o)                                        \
@@ -191,7 +191,7 @@ void
 trx_commit(
 /*=======*/
        trx_t*  trx)    /*!< in/out: transaction */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /****************************************************************//**
 Commits a transaction and a mini-transaction. */
 UNIV_INTERN
@@ -201,7 +201,7 @@ trx_commit_low(
        trx_t*  trx,    /*!< in/out: transaction */
        mtr_t*  mtr)    /*!< in/out: mini-transaction (will be committed),
                        or NULL if trx made no modifications */
-       __attribute__((nonnull(1)));
+       MY_ATTRIBUTE((nonnull(1)));
 /****************************************************************//**
 Cleans up a transaction at database startup. The cleanup is needed if
 the transaction already got to the middle of a commit when the database
@@ -255,7 +255,7 @@ void
 trx_commit_complete_for_mysql(
 /*==========================*/
        trx_t*  trx)    /*!< in/out: transaction */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 /**********************************************************************//**
 Marks the latest SQL statement ended. */
 UNIV_INTERN
@@ -317,7 +317,7 @@ trx_print_low(
                        /*!< in: length of trx->lock.trx_locks */
        ulint           heap_size)
                        /*!< in: mem_heap_get_size(trx->lock.lock_heap) */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 
 /**********************************************************************//**
 Prints info about a transaction.
@@ -331,8 +331,25 @@ trx_print_latched(
        const trx_t*    trx,            /*!< in: transaction */
        ulint           max_query_len)  /*!< in: max query length to print,
                                        or 0 to use the default max length */
-       __attribute__((nonnull));
+       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. */
@@ -344,7 +361,7 @@ trx_print(
        const trx_t*    trx,            /*!< in: transaction */
        ulint           max_query_len)  /*!< in: max query length to print,
                                        or 0 to use the default max length */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 
 /**********************************************************************//**
 Determine if a transaction is a dictionary operation.
@@ -354,7 +371,7 @@ enum trx_dict_op_t
 trx_get_dict_operation(
 /*===================*/
        const trx_t*    trx)    /*!< in: transaction */
-       __attribute__((pure));
+       MY_ATTRIBUTE((pure));
 /**********************************************************************//**
 Flag a transaction a dictionary operation. */
 UNIV_INLINE
@@ -383,7 +400,7 @@ trx_state_eq(
                                if state != TRX_STATE_NOT_STARTED
                                asserts that
                                trx->state != TRX_STATE_NOT_STARTED */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 # ifdef UNIV_DEBUG
 /**********************************************************************//**
 Asserts that a transaction has been started.
@@ -394,7 +411,7 @@ ibool
 trx_assert_started(
 /*===============*/
        const trx_t*    trx)    /*!< in: transaction */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 # endif /* UNIV_DEBUG */
 
 /**********************************************************************//**
index 61b0dabb1e69be7467dee86227e5149ef55c8c9e..0148cc61579360a9f311e580604804be88a5c559 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1996, 2013, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1996, 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
@@ -73,7 +73,7 @@ bool
 trx_undo_trx_id_is_insert(
 /*======================*/
        const byte*     trx_id) /*!< in: DB_TRX_ID, followed by DB_ROLL_PTR */
-       __attribute__((nonnull, pure, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
 #endif /* !UNIV_HOTBACKUP */
 /*****************************************************************//**
 Writes a roll ptr to an index page. In case that the size changes in
@@ -214,7 +214,7 @@ trx_undo_add_page(
        mtr_t*          mtr)    /*!< in: mtr which does not have a latch to any
                                undo log page; the caller must have reserved
                                the rollback segment mutex */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /********************************************************************//**
 Frees the last undo log page.
 The caller must hold the rollback segment mutex. */
@@ -229,7 +229,7 @@ trx_undo_free_last_page_func(
        mtr_t*          mtr)    /*!< in/out: mini-transaction which does not
                                have a latch to any undo log page or which
                                has allocated the undo log page */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 #ifdef UNIV_DEBUG
 # define trx_undo_free_last_page(trx,undo,mtr) \
        trx_undo_free_last_page_func(trx,undo,mtr)
@@ -251,7 +251,7 @@ trx_undo_truncate_end_func(
        trx_undo_t*     undo,   /*!< in/out: undo log */
        undo_no_t       limit)  /*!< in: all undo records with undo number
                                >= this value should be truncated */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 #ifdef UNIV_DEBUG
 # define trx_undo_truncate_end(trx,undo,limit)         \
        trx_undo_truncate_end_func(trx,undo,limit)
@@ -300,7 +300,7 @@ trx_undo_assign_undo(
 /*=================*/
        trx_t*          trx,    /*!< in: transaction */
        ulint           type)   /*!< in: TRX_UNDO_INSERT or TRX_UNDO_UPDATE */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 /******************************************************************//**
 Sets the state of the undo log segment at a transaction finish.
 @return        undo log segment header page, x-latched */
@@ -350,7 +350,7 @@ void
 trx_undo_free_prepared(
 /*===================*/
        trx_t*  trx)    /*!< in/out: PREPARED transaction */
-       UNIV_COLD __attribute__((nonnull));
+       UNIV_COLD MY_ATTRIBUTE((nonnull));
 #endif /* !UNIV_HOTBACKUP */
 /***********************************************************//**
 Parses the redo log entry of an undo log page initialization.
index 8c325ecc88cd07cfa874305b9b80caa4fa5e57a7..dfb59673f0be2d8d6c43f5b646e2fbbe60a7c9f4 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1994, 2013, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved.
 Copyright (c) 2008, Google Inc.
 
 Portions of this file contain modifications contributed and copyrighted by
@@ -249,7 +249,7 @@ that are only referenced from within InnoDB, not from MySQL. We disable the
 GCC visibility directive on all Sun operating systems because there is no
 easy way to get it to work. See http://bugs.mysql.com/bug.php?id=52263. */
 #if defined(__GNUC__) && (__GNUC__ >= 4) && !defined(sun) || defined(__INTEL_COMPILER)
-# define UNIV_INTERN __attribute__((visibility ("hidden")))
+# define UNIV_INTERN MY_ATTRIBUTE((visibility ("hidden")))
 #else
 # define UNIV_INTERN
 #endif
@@ -264,7 +264,7 @@ appears close together improving code locality of non-cold parts of
 program.  The paths leading to call of cold functions within code are
 marked as unlikely by the branch prediction mechanism.  optimize a
 rarely invoked function for size instead for speed. */
-# define UNIV_COLD __attribute__((cold))
+# define UNIV_COLD MY_ATTRIBUTE((cold))
 #else
 # define UNIV_COLD /* empty */
 #endif
@@ -528,7 +528,7 @@ contains the sum of the following flag and the locally stored len. */
 #if defined(__GNUC__) && (__GNUC__ > 2) && ! defined(__INTEL_COMPILER)
 #define HAVE_GCC_GT_2
 /* Tell the compiler that variable/function is unused. */
-# define UNIV_UNUSED    __attribute__ ((unused))
+# define UNIV_UNUSED    MY_ATTRIBUTE ((unused))
 #else
 # define UNIV_UNUSED
 #endif /* CHECK FOR GCC VER_GT_2 */
index 5bdd553ca802c06090d92a75d52aba48b120b1e6..4893ab9f9af20df27594a4eab3c4ff778900991e 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1994, 2009, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1994, 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
@@ -39,7 +39,7 @@ ut_ull_create(
 /*==========*/
        ulint   high,   /*!< in: high-order 32 bits */
        ulint   low)    /*!< in: low-order 32 bits */
-       __attribute__((const));
+       MY_ATTRIBUTE((const));
 
 /********************************************************//**
 Rounds a 64-bit integer downward to a multiple of a power of 2.
@@ -80,7 +80,7 @@ ut_align_down(
 /*==========*/
        const void*     ptr,            /*!< in: pointer */
        ulint           align_no)       /*!< in: align by this number */
-               __attribute__((const));
+               MY_ATTRIBUTE((const));
 /*********************************************************//**
 The following function computes the offset of a pointer from the nearest
 aligned address.
@@ -91,7 +91,7 @@ ut_align_offset(
 /*============*/
        const void*     ptr,            /*!< in: pointer */
        ulint           align_no)       /*!< in: align by this number */
-                       __attribute__((const));
+                       MY_ATTRIBUTE((const));
 /*****************************************************************//**
 Gets the nth bit of a ulint.
 @return        TRUE if nth bit is 1; 0th bit is defined to be the least significant */
index 6a4afe99597694a4d6e1451d532c90169bb224fb..3f5baef0a3c988d798ab6650dd61665f03ad0075 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1994, 2009, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1994, 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
@@ -59,7 +59,7 @@ ut_dbg_assertion_failed(
        const char*     expr,   /*!< in: the failed assertion */
        const char*     file,   /*!< in: source file containing the assertion */
        ulint           line)   /*!< in: line number of the assertion */
-       UNIV_COLD __attribute__((nonnull(2)));
+       UNIV_COLD MY_ATTRIBUTE((nonnull(2)));
 
 /** Abort the execution. */
 # define UT_DBG_PANIC abort()
index af7eb4e9b1d300b12079f8d973fe2033844496cf..81470358f2fc98b0adfd8e7eefaf343567a8a48e 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1994, 2011, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1994, 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
@@ -87,7 +87,7 @@ ut_malloc_low(
        ulint   n,                      /*!< in: number of bytes to allocate */
        ibool   assert_on_error)        /*!< in: if TRUE, we crash mysqld if
                                        the memory cannot be allocated */
-       __attribute__((malloc));
+       MY_ATTRIBUTE((malloc));
 /**********************************************************************//**
 Allocates memory. */
 #define ut_malloc(n) ut_malloc_low(n, TRUE)
index 53b769849a5c1b8f7a757e56af0dc406db59d5d5..6ed3ee3b2e5dc113fa464f4c2b55878679802137 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1994, 2009, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1994, 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
@@ -96,7 +96,7 @@ ulint
 ut_fold_ull(
 /*========*/
        ib_uint64_t     d)      /*!< in: 64-bit integer */
-       __attribute__((const));
+       MY_ATTRIBUTE((const));
 /*************************************************************//**
 Folds a character string ending in the null character.
 @return        folded value */
@@ -105,7 +105,7 @@ ulint
 ut_fold_string(
 /*===========*/
        const char*     str)    /*!< in: null-terminated string */
-       __attribute__((pure));
+       MY_ATTRIBUTE((pure));
 /***********************************************************//**
 Looks for a prime number slightly greater than the given argument.
 The prime is chosen so that it is not near any power of 2.
@@ -115,7 +115,7 @@ ulint
 ut_find_prime(
 /*==========*/
        ulint   n)      /*!< in: positive number > 100 */
-       __attribute__((const));
+       MY_ATTRIBUTE((const));
 
 #endif /* !UNIV_INNOCHECKSUM */
 
@@ -128,7 +128,7 @@ ut_fold_ulint_pair(
 /*===============*/
        ulint   n1,     /*!< in: ulint */
        ulint   n2)     /*!< in: ulint */
-       __attribute__((const));
+       MY_ATTRIBUTE((const));
 /*************************************************************//**
 Folds a binary string.
 @return        folded value */
@@ -138,7 +138,7 @@ ut_fold_binary(
 /*===========*/
        const byte*     str,    /*!< in: string of bytes */
        ulint           len)    /*!< in: length */
-       __attribute__((pure));
+       MY_ATTRIBUTE((pure));
 
 
 #ifndef UNIV_NONINL
index 0caf379d8fac16d82b8145f07fd5599af621dfc1..ef887ed5e5845b2842a5d3ad1c0253f84faa421f 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1994, 2014, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1994, 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
@@ -217,7 +217,7 @@ ulint
 ut_2_power_up(
 /*==========*/
        ulint   n)      /*!< in: number != 0 */
-       __attribute__((const));
+       MY_ATTRIBUTE((const));
 
 /** Determine how many bytes (groups of 8 bits) are needed to
 store the given number of bits.
@@ -297,7 +297,7 @@ void
 ut_print_timestamp(
 /*===============*/
        FILE*   file)   /*!< in: file where to print */
-       UNIV_COLD __attribute__((nonnull));
+       UNIV_COLD MY_ATTRIBUTE((nonnull));
 
 #ifndef UNIV_INNOCHECKSUM
 
@@ -485,7 +485,7 @@ ut_ulint_sort(
        ulint*  aux_arr,        /*!< in/out: aux array to use in sort */
        ulint   low,            /*!< in: lower bound */
        ulint   high)           /*!< in: upper bound */
-       __attribute__((nonnull));
+       MY_ATTRIBUTE((nonnull));
 
 #ifndef UNIV_NONINL
 #include "ut0ut.ic"
index 5bf096340314837ef1f22ec96b04cdf9612f90a0..c7d05090e8d78deb8231f70b073a9186e33c1630 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1996, 2015, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1996, 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
@@ -413,7 +413,7 @@ ibool
 lock_rec_validate_page(
 /*===================*/
        const buf_block_t*      block)  /*!< in: buffer block */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 #endif /* UNIV_DEBUG */
 
 /* The lock system */
@@ -497,7 +497,7 @@ Checks that a transaction id is sensible, i.e., not in the future.
 #ifdef UNIV_DEBUG
 UNIV_INTERN
 #else
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 #endif
 bool
 lock_check_trx_id_sanity(
@@ -1635,6 +1635,10 @@ static void
 wsrep_kill_victim(const trx_t * const trx, const lock_t *lock) {
         ut_ad(lock_mutex_own());
         ut_ad(trx_mutex_own(lock->trx));
+
+       /* quit for native mysql */
+       if (!wsrep_on(trx->mysql_thd)) return;
+
        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);
 
@@ -1649,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", 
@@ -1664,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);
 
@@ -1712,9 +1714,11 @@ lock_rec_other_has_conflicting(
 
 #ifdef WITH_WSREP
                if (lock_rec_has_to_wait(TRUE, trx, mode, lock, is_supremum)) {
-                       trx_mutex_enter(lock->trx);
-                       wsrep_kill_victim(trx, lock);
-                       trx_mutex_exit(lock->trx);
+                       if (wsrep_on(trx->mysql_thd)) {
+                               trx_mutex_enter(lock->trx);
+                               wsrep_kill_victim(trx, lock);
+                               trx_mutex_exit(lock->trx);
+                        }
 #else
                if (lock_rec_has_to_wait(trx, mode, lock, is_supremum)) {
 #endif /* WITH_WSREP */
@@ -2006,7 +2010,9 @@ lock_rec_create(
 
 #ifdef WITH_WSREP
        
-       if (c_lock && wsrep_thd_is_BF(trx->mysql_thd, FALSE)) {
+       if (c_lock                      &&
+           wsrep_on(trx->mysql_thd)    &&
+           wsrep_thd_is_BF(trx->mysql_thd, FALSE)) {
                lock_t *hash    = (lock_t *)c_lock->hash;
                lock_t *prev    = NULL;
 
@@ -3901,7 +3907,7 @@ lock_get_next_lock(
                        ut_ad(heap_no == ULINT_UNDEFINED);
                        ut_ad(lock_get_type_low(lock) == LOCK_TABLE);
 
-                       lock = UT_LIST_GET_PREV(un_member.tab_lock.locks, lock);
+                       lock = UT_LIST_GET_NEXT(un_member.tab_lock.locks, lock);
                }
        } while (lock != NULL
                 && lock->trx->lock.deadlock_mark > ctx->mark_start);
@@ -3951,7 +3957,8 @@ lock_get_first_lock(
        } else {
                *heap_no = ULINT_UNDEFINED;
                ut_ad(lock_get_type_low(lock) == LOCK_TABLE);
-               lock = UT_LIST_GET_PREV(un_member.tab_lock.locks, lock);
+               dict_table_t*   table = lock->un_member.tab_lock.table;
+               lock = UT_LIST_GET_FIRST(table->locks);
        }
 
        ut_a(lock != NULL);
@@ -4412,44 +4419,50 @@ lock_table_create(
 
        UT_LIST_ADD_LAST(trx_locks, trx->lock.trx_locks, lock);
 #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(wsrep_on(trx->mysql_thd)) {
+               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) trx_mutex_enter(c_lock->trx);
-       if (c_lock && c_lock->trx->lock.que_state == TRX_QUE_LOCK_WAIT) {
+               if (c_lock) trx_mutex_enter(c_lock->trx);
+               if (c_lock && c_lock->trx->lock.que_state == TRX_QUE_LOCK_WAIT) {
 
-               c_lock->trx->lock.was_chosen_as_deadlock_victim = TRUE;
+                       c_lock->trx->lock.was_chosen_as_deadlock_victim = TRUE;
 
-               if (wsrep_debug) wsrep_print_wait_locks(c_lock);
+                       if (wsrep_debug) wsrep_print_wait_locks(c_lock);
 
-               /* have to release trx mutex for the duration of
-                  victim lock release. This will eventually call
-                  lock_grant, which wants to grant trx mutex again
-               */
-               /* caller has trx_mutex, have to release for lock cancel */
-               trx_mutex_exit(trx);
-               lock_cancel_waiting_and_release(c_lock->trx->lock.wait_lock);
-               trx_mutex_enter(trx);
+                       /* have to release trx mutex for the duration of
+                          victim lock release. This will eventually call
+                          lock_grant, which wants to grant trx mutex again
+                       */
+                       /* caller has trx_mutex, have to release for lock cancel */
+                       trx_mutex_exit(trx);
+                       lock_cancel_waiting_and_release(
+                               c_lock->trx->lock.wait_lock);
+                       trx_mutex_enter(trx);
 
-               /* trx might not wait for c_lock, but some other lock
-               does not matter if wait_lock was released above
-               */
-               if (c_lock->trx->lock.wait_lock == c_lock) {
-                       lock_reset_lock_and_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->lock.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);
+                       if (wsrep_debug) {
+                               fprintf(stderr, "WSREP: c_lock canceled %llu\n",
+                                       (ulonglong) c_lock->trx->id);
+                       }
                }
-       }
-       if (c_lock) trx_mutex_exit(c_lock->trx);
-#else
+               if (c_lock) trx_mutex_exit(c_lock->trx);
+       } else {
+#endif /* WITH_WSREP */
        UT_LIST_ADD_LAST(un_member.tab_lock.locks, table->locks, lock);
+#ifdef WITH_WSREP
+       }
 #endif /* WITH_WSREP */
 
        if (UNIV_UNLIKELY(type_mode & LOCK_WAIT)) {
@@ -4734,11 +4747,14 @@ lock_table_other_has_incompatible(
                    && (wait || !lock_get_wait(lock))) {
 
 #ifdef WITH_WSREP
-                       if (wsrep_debug) 
-                               fprintf(stderr, "WSREP: table lock abort");
-                       trx_mutex_enter(lock->trx);
-                       wsrep_kill_victim((trx_t *)trx, (lock_t *)lock);
-                       trx_mutex_exit(lock->trx);
+                       if (wsrep_on(trx->mysql_thd)) {
+                               if (wsrep_debug)
+                                       fprintf(stderr,
+                                       "WSREP: table lock abort");
+                               trx_mutex_enter(lock->trx);
+                               wsrep_kill_victim((trx_t *)trx, (lock_t *)lock);
+                               trx_mutex_exit(lock->trx);
+                       }
 #endif
                        return(lock);
                }
@@ -4766,7 +4782,8 @@ lock_table(
        dberr_t         err;
        const lock_t*   wait_for;
 
-       ut_ad(table && thr);
+       ut_ad(table != NULL);
+       ut_ad(thr != NULL);
 
        if (flags & BTR_NO_LOCKING_FLAG) {
 
@@ -6168,7 +6185,7 @@ lock_validate_table_locks(
 /*********************************************************************//**
 Validate record locks up to a limit.
 @return lock at limit or NULL if no more locks in the hash bucket */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 const lock_t*
 lock_rec_validate(
 /*==============*/
index 9b8daf857bb5b0f61b27701b30c5cc4f4e8f887f..4d2b52dbef4aeca8253a17eb5825d50651121f4f 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1996, 2013, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1996, 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
@@ -515,7 +515,7 @@ extern "C" UNIV_INTERN
 os_thread_ret_t
 DECLARE_THREAD(lock_wait_timeout_thread)(
 /*=====================================*/
-       void*   arg __attribute__((unused)))
+       void*   arg MY_ATTRIBUTE((unused)))
                        /* in: a dummy parameter required by
                        os_thread_create */
 {
index 3ff4a9d7d1ed4131e8205f124a03b883d8f1dd79..8ff8e39d352bb2ec1366e07120e6399bc24f6a0b 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1995, 2015, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved.
 Copyright (c) 2009, Google Inc.
 
 Portions of this file contain modifications contributed and copyrighted by
@@ -975,7 +975,7 @@ log_group_init(
        ulint   space_id,               /*!< in: space id of the file space
                                        which contains the log files of this
                                        group */
-       ulint   archive_space_id __attribute__((unused)))
+       ulint   archive_space_id MY_ATTRIBUTE((unused)))
                                        /*!< in: space id of the file space
                                        which contains some archived log
                                        files for this group; currently, only
@@ -2352,7 +2352,7 @@ void
 log_archived_file_name_gen(
 /*=======================*/
        char*   buf,    /*!< in: buffer where to write */
-       ulint   id __attribute__((unused)),
+       ulint   id MY_ATTRIBUTE((unused)),
                        /*!< in: group id;
                        currently we only archive the first group */
        ulint   file_no)/*!< in: file number */
index ca07f89890f9d6bd0d49b1bdfd0bdde9b7fac614..85f4f6ea6715d66bff3491f5566af6ff2fcb259b 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1997, 2015, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1997, 2016, Oracle and/or its affiliates. All Rights Reserved.
 Copyright (c) 2012, Facebook Inc.
 
 This program is free software; you can redistribute it and/or modify it under
@@ -328,7 +328,7 @@ extern "C" UNIV_INTERN
 os_thread_ret_t
 DECLARE_THREAD(recv_writer_thread)(
 /*===============================*/
-       void*   arg __attribute__((unused)))
+       void*   arg MY_ATTRIBUTE((unused)))
                        /*!< in: a dummy parameter required by
                        os_thread_create */
 {
@@ -742,7 +742,7 @@ recv_check_cp_is_consistent(
 /********************************************************//**
 Looks for the maximum consistent checkpoint from the log groups.
 @return        error code or DB_SUCCESS */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 recv_find_max_checkpoint(
 /*=====================*/
index df68aab8a187410208e80dfb46486a663c8b42c6..feeedb01609480df367944474cc503565c09b811 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1995, 2009, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1995, 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
@@ -55,8 +55,22 @@ mach_parse_compressed(
        if (flag < 0x80UL) {
                *val = flag;
                return(ptr + 1);
+       }
+
+       /* Workaround GCC bug
+       https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77673:
+       the compiler moves mach_read_from_4 right to the beginning of the
+       function, causing and out-of-bounds read if we are reading a short
+       integer close to the end of buffer. */
+#if defined(__GNUC__) && (__GNUC__ >= 5) && !defined(__clang__)
+#define DEPLOY_FENCE
+#endif
+
+#ifdef DEPLOY_FENCE
+       __atomic_thread_fence(__ATOMIC_ACQUIRE);
+#endif
 
-       } else if (flag < 0xC0UL) {
+       if (flag < 0xC0UL) {
                if (end_ptr < ptr + 2) {
                        return(NULL);
                }
@@ -64,8 +78,13 @@ mach_parse_compressed(
                *val = mach_read_from_2(ptr) & 0x7FFFUL;
 
                return(ptr + 2);
+       }
+
+#ifdef DEPLOY_FENCE
+       __atomic_thread_fence(__ATOMIC_ACQUIRE);
+#endif
 
-       } else if (flag < 0xE0UL) {
+       if (flag < 0xE0UL) {
                if (end_ptr < ptr + 3) {
                        return(NULL);
                }
@@ -73,7 +92,13 @@ mach_parse_compressed(
                *val = mach_read_from_3(ptr) & 0x3FFFFFUL;
 
                return(ptr + 3);
-       } else if (flag < 0xF0UL) {
+       }
+
+#ifdef DEPLOY_FENCE
+       __atomic_thread_fence(__ATOMIC_ACQUIRE);
+#endif
+
+       if (flag < 0xF0UL) {
                if (end_ptr < ptr + 4) {
                        return(NULL);
                }
@@ -81,14 +106,20 @@ mach_parse_compressed(
                *val = mach_read_from_4(ptr) & 0x1FFFFFFFUL;
 
                return(ptr + 4);
-       } else {
-               ut_ad(flag == 0xF0UL);
+       }
 
-               if (end_ptr < ptr + 5) {
-                       return(NULL);
-               }
+#ifdef DEPLOY_FENCE
+       __atomic_thread_fence(__ATOMIC_ACQUIRE);
+#endif
+
+#undef DEPLOY_FENCE
+
+       ut_ad(flag == 0xF0UL);
 
-               *val = mach_read_from_4(ptr + 1);
-               return(ptr + 5);
+       if (end_ptr < ptr + 5) {
+               return(NULL);
        }
+
+       *val = mach_read_from_4(ptr + 1);
+       return(ptr + 5);
 }
index 308c29795515533387db1915467eca34c07d2543..a77785a369ade125c0e3742f67719cf65dec810e 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1994, 2011, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1994, 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
@@ -248,7 +248,7 @@ void
 mem_field_erase(
 /*============*/
        byte*   buf,    /*!< in: memory field */
-       ulint   n __attribute__((unused)))
+       ulint   n MY_ATTRIBUTE((unused)))
                        /*!< in: how many bytes the user requested */
 {
        byte*   usr_buf;
@@ -450,7 +450,7 @@ void
 mem_heap_validate_or_print(
 /*=======================*/
        mem_heap_t*     heap,   /*!< in: memory heap */
-       byte*           top __attribute__((unused)),
+       byte*           top MY_ATTRIBUTE((unused)),
                                /*!< in: calculate and validate only until
                                this top pointer in the heap is reached,
                                if this pointer is NULL, ignored */
index 869586bcd90fe141b4be0de8b0d2c3d0019ddd4f..f60ec648ba129af9d6777c972a4580bf902c8310 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1995, 2013, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1995, 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
@@ -58,7 +58,7 @@ mtr_block_dirtied(
 
 /*****************************************************************//**
 Releases the item in the slot given. */
-static __attribute__((nonnull))
+static MY_ATTRIBUTE((nonnull))
 void
 mtr_memo_slot_release_func(
 /*=======================*/
@@ -105,7 +105,7 @@ mtr_memo_slot_release_func(
 Releases the mlocks and other objects stored in an mtr memo.
 They are released in the order opposite to which they were pushed
 to the memo. */
-static __attribute__((nonnull))
+static MY_ATTRIBUTE((nonnull))
 void
 mtr_memo_pop_all(
 /*=============*/
@@ -395,7 +395,7 @@ mtr_read_ulint(
 /*===========*/
        const byte*     ptr,    /*!< in: pointer from where to read */
        ulint           type,   /*!< in: MLOG_1BYTE, MLOG_2BYTES, MLOG_4BYTES */
-       mtr_t*          mtr __attribute__((unused)))
+       mtr_t*          mtr MY_ATTRIBUTE((unused)))
                                /*!< in: mini-transaction handle */
 {
        ut_ad(mtr->state == MTR_ACTIVE);
index 5212ce3bfbbe51283ec1ddb6810904c348be6540..1219716d381c94f4e329e5e70f37db7dd8ce4d24 100644 (file)
@@ -1,6 +1,6 @@
 /***********************************************************************
 
-Copyright (c) 1995, 2015, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved.
 Copyright (c) 2009, Percona Inc.
 
 Portions of this file contain modifications contributed and copyrighted
@@ -1481,11 +1481,11 @@ void
 os_file_set_nocache(
 /*================*/
        int             fd              /*!< in: file descriptor to alter */
-                                       __attribute__((unused)),
+                                       MY_ATTRIBUTE((unused)),
        const char*     file_name       /*!< in: used in the diagnostic
                                        message */
-                                       __attribute__((unused)),
-       const char*     operation_name __attribute__((unused)))
+                                       MY_ATTRIBUTE((unused)),
+       const char*     operation_name MY_ATTRIBUTE((unused)))
                                        /*!< in: "open" or "create"; used
                                        in the diagnostic message */
 {
@@ -2372,7 +2372,7 @@ os_file_flush_func(
 /*******************************************************************//**
 Does a synchronous read operation in Posix.
 @return        number of bytes read, -1 if error */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 ssize_t
 os_file_pread(
 /*==========*/
@@ -2483,7 +2483,7 @@ os_file_pread(
 /*******************************************************************//**
 Does a synchronous write operation in Posix.
 @return        number of bytes written, -1 if error */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 ssize_t
 os_file_pwrite(
 /*===========*/
index 772336215c9ed86e65b418f1b37c064f57127646..d6f897ca46addd1c13e302b79d51cc033d8f189d 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1995, 2013, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1995, 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
@@ -191,14 +191,38 @@ os_thread_create_func(
 #endif
 }
 
+/** Waits until the specified thread completes and joins it.
+Its return value is ignored.
+@param[in,out] thread  thread to join */
+UNIV_INTERN
+void
+os_thread_join(
+       os_thread_t     thread)
+{
+#ifdef __WIN__
+       /* Do nothing. */
+#else
+#ifdef UNIV_DEBUG
+       const int       ret =
+#endif /* UNIV_DEBUG */
+       pthread_join(thread, NULL);
+
+       /* Waiting on already-quit threads is allowed. */
+       ut_ad(ret == 0 || ret == ESRCH);
+#endif /* __WIN__ */
+}
+
 /*****************************************************************//**
 Exits the current thread. */
 UNIV_INTERN
 void
 os_thread_exit(
 /*===========*/
-       void*   exit_value)     /*!< in: exit value; in Windows this void*
+       void*   exit_value,     /*!< in: exit value; in Windows this void*
                                is cast as a DWORD */
+       bool    detach)         /*!< in: if true, the thread will be detached
+                               right before exiting. If false, another thread
+                               is responsible for joining this thread. */
 {
 #ifdef UNIV_DEBUG_THREAD_CREATION
        fprintf(stderr, "Thread exits, id %lu\n",
@@ -216,7 +240,9 @@ os_thread_exit(
 #ifdef __WIN__
        ExitThread((DWORD) exit_value);
 #else
-       pthread_detach(pthread_self());
+       if (detach) {
+               pthread_detach(pthread_self());
+       }
        pthread_exit(exit_value);
 #endif
 }
index cb2381df48c3a61f17c635ffd2e0566c29117c1c..95b8db0ccc86b61d45275536a9f30e869461ee70 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1994, 2015, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved.
 Copyright (c) 2012, Facebook Inc.
 
 This program is free software; you can redistribute it and/or modify it under
@@ -304,7 +304,7 @@ byte*
 page_parse_create(
 /*==============*/
        byte*           ptr,    /*!< in: buffer */
-       byte*           end_ptr __attribute__((unused)), /*!< in: buffer end */
+       byte*           end_ptr MY_ATTRIBUTE((unused)), /*!< in: buffer end */
        ulint           comp,   /*!< in: nonzero=compact page format */
        buf_block_t*    block,  /*!< in: block or NULL */
        mtr_t*          mtr)    /*!< in: mtr or NULL */
index e5176148edd7af8054b30e8e6bae8ea73d3787de..4da11e5d6881111b2e1a152a95351f4029bfef4e 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 2005, 2015, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2005, 2016, Oracle and/or its affiliates. All Rights Reserved.
 Copyright (c) 2012, Facebook Inc.
 
 This program is free software; you can redistribute it and/or modify it under
@@ -119,7 +119,7 @@ Compare at most sizeof(field_ref_zero) bytes.
 independently of any UNIV_ debugging conditions. */
 #if defined UNIV_DEBUG || defined UNIV_ZIP_DEBUG
 # include <stdarg.h>
-__attribute__((format (printf, 1, 2)))
+MY_ATTRIBUTE((format (printf, 1, 2)))
 /**********************************************************************//**
 Report a failure to decompress or compress.
 @return        number of characters printed */
@@ -738,8 +738,8 @@ static
 void
 page_zip_free(
 /*==========*/
-       void*   opaque __attribute__((unused)), /*!< in: memory heap */
-       void*   address __attribute__((unused)))/*!< in: object to free */
+       void*   opaque MY_ATTRIBUTE((unused)),  /*!< in: memory heap */
+       void*   address MY_ATTRIBUTE((unused)))/*!< in: object to free */
 {
 }
 
@@ -4769,7 +4769,8 @@ page_zip_parse_compress(
        ulint   size;
        ulint   trailer_size;
 
-       ut_ad(ptr && end_ptr);
+       ut_ad(ptr != NULL);
+       ut_ad(end_ptr != NULL);
        ut_ad(!page == !page_zip);
 
        if (UNIV_UNLIKELY(ptr + (2 + 2) > end_ptr)) {
index 1c01becd9edf820e9b44ae732789cd7954a696c8..bfa8e2ea9506ece3db783d41771a604716302245 100644 (file)
@@ -295,7 +295,7 @@ static int yy_start = 0;    /* start state number */
 static int yy_did_buffer_switch_on_eof;
 
 void yyrestart (FILE *input_file  );
-__attribute__((unused)) static void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer  );
+MY_ATTRIBUTE((unused)) static void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer  );
 static YY_BUFFER_STATE yy_create_buffer (FILE *file,int size  );
 void yy_delete_buffer (YY_BUFFER_STATE b  );
 void yy_flush_buffer (YY_BUFFER_STATE b  );
@@ -916,7 +916,7 @@ char *yytext;
 #line 1 "pars0lex.l"
 /*****************************************************************************
 
-Copyright (c) 1997, 2011, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1997, 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
@@ -1027,7 +1027,7 @@ static int yy_init_globals (void );
 /* Accessor methods to globals.
    These are made visible to non-reentrant scanners for convenience. */
 
-__attribute__((unused)) static int yylex_destroy (void );
+MY_ATTRIBUTE((unused)) static int yylex_destroy (void );
 
 int yyget_debug (void );
 
@@ -2664,7 +2664,7 @@ static int yy_get_next_buffer (void)
  * @param new_buffer The new input buffer.
  *
  */
-    __attribute__((unused)) static void yy_switch_to_buffer  (YY_BUFFER_STATE  new_buffer )
+    MY_ATTRIBUTE((unused)) static void yy_switch_to_buffer  (YY_BUFFER_STATE  new_buffer )
 {
 
        /* TODO. We should be able to replace this entire function body
@@ -3042,7 +3042,7 @@ static int yy_init_globals (void)
 }
 
 /* yylex_destroy is for both reentrant and non-reentrant scanners. */
-__attribute__((unused)) static int yylex_destroy  (void)
+MY_ATTRIBUTE((unused)) static int yylex_destroy  (void)
 {
 
     /* Pop the buffer stack, destroying each element. */
index 581fc2342aa77348b68160fd2b2a7cccea37b2a4..c3db8aea29838b5bbebe986126615d3b98a496d8 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/bash
 #
-# Copyright (c) 1994, 2011, Oracle and/or its affiliates. All Rights Reserved.
+# Copyright (c) 1994, 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
@@ -33,15 +33,15 @@ sed -e '
 s/'"$TMPFILE"'/'"$OUTFILE"'/;
 s/\(int offset = \)\((yy_c_buf_p) - (yytext_ptr)\);/\1(int)(\2);/;
 s/\(void yy\(restart\|_\(delete\|flush\)_buffer\)\)/static \1/;
-s/\(void yy_switch_to_buffer\)/__attribute__((unused)) static \1/;
-s/\(void yy\(push\|pop\)_buffer_state\)/__attribute__((unused)) static \1/;
+s/\(void yy_switch_to_buffer\)/MY_ATTRIBUTE((unused)) static \1/;
+s/\(void yy\(push\|pop\)_buffer_state\)/MY_ATTRIBUTE((unused)) static \1/;
 s/\(YY_BUFFER_STATE yy_create_buffer\)/static \1/;
-s/\(\(int\|void\) yy[gs]et_\)/__attribute__((unused)) static \1/;
+s/\(\(int\|void\) yy[gs]et_\)/MY_ATTRIBUTE((unused)) static \1/;
 s/\(void \*\?yy\(\(re\)\?alloc\|free\)\)/static \1/;
 s/\(extern \)\?\(int yy\(leng\|lineno\|_flex_debug\)\)/static \2/;
-s/\(int yylex_destroy\)/__attribute__((unused)) static \1/;
+s/\(int yylex_destroy\)/MY_ATTRIBUTE((unused)) static \1/;
 s/\(extern \)\?\(int yylex \)/UNIV_INTERN \2/;
-s/^\(\(FILE\|char\) *\* *yyget\)/__attribute__((unused)) static \1/;
+s/^\(\(FILE\|char\) *\* *yyget\)/MY_ATTRIBUTE((unused)) static \1/;
 s/^\(extern \)\?\(\(FILE\|char\) *\* *yy\)/static \2/;
 ' < $TMPFILE >> $OUTFILE
 
index 655e5ba1324cff6da2d75fd42ebcfb1261673671..b116357c5b989bb43037f2fb7cfd90823675c536 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1996, 2013, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1996, 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
@@ -1925,7 +1925,7 @@ pars_create_table(
        sym_node_t*     column_defs,    /*!< in: list of column names */
        sym_node_t*     compact,        /* in: non-NULL if COMPACT table. */
        sym_node_t*     block_size,     /* in: block size (can be NULL) */
-       void*           not_fit_in_memory __attribute__((unused)))
+       void*           not_fit_in_memory MY_ATTRIBUTE((unused)))
                                        /*!< in: a non-NULL pointer means that
                                        this is a table which in simulations
                                        should be simulated as not fitting
@@ -2141,7 +2141,7 @@ UNIV_INTERN
 que_fork_t*
 pars_stored_procedure_call(
 /*=======================*/
-       sym_node_t*     sym_node __attribute__((unused)))
+       sym_node_t*     sym_node MY_ATTRIBUTE((unused)))
                                        /*!< in: stored procedure name */
 {
        ut_error;
@@ -2201,7 +2201,7 @@ UNIV_INTERN
 void
 yyerror(
 /*====*/
-       const char*     s __attribute__((unused)))
+       const char*     s MY_ATTRIBUTE((unused)))
                                /*!< in: error message string */
 {
        ut_ad(s);
index 426cf9e3ac553cdfcf60ba1092d467d3882d107c..616ef322fb52bb4b11b761a4a90eff25bb90526b 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1994, 2012, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1994, 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
@@ -75,7 +75,7 @@ cmp_debug_dtuple_rec_with_match(
                                completely  matched fields; when function
                                returns, contains the value for current
                                comparison */
-       __attribute__((nonnull, warn_unused_result));
+       MY_ATTRIBUTE((nonnull, warn_unused_result));
 #endif /* UNIV_DEBUG */
 /*************************************************************//**
 This function is used to compare two data fields for which the data type
@@ -659,7 +659,10 @@ cmp_dtuple_rec_with_match_low(
                                        in current field */
        int             ret;            /* return value */
 
-       ut_ad(dtuple && rec && matched_fields && matched_bytes);
+       ut_ad(dtuple != NULL);
+       ut_ad(rec != NULL);
+       ut_ad(matched_fields != NULL);
+       ut_ad(matched_bytes != NULL);
        ut_ad(dtuple_check_typed(dtuple));
        ut_ad(rec_offs_validate(rec, NULL, offsets));
 
@@ -920,7 +923,7 @@ Compare two physical record fields.
 @retval 1 if rec1 field is greater than rec2
 @retval -1 if rec1 field is less than rec2
 @retval 0 if rec1 field equals to rec2 */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 int
 cmp_rec_rec_simple_field(
 /*=====================*/
@@ -1139,7 +1142,9 @@ cmp_rec_rec_with_match(
        int             ret = 0;        /* return value */
        ulint           comp;
 
-       ut_ad(rec1 && rec2 && index);
+       ut_ad(rec1 != NULL);
+       ut_ad(rec2 != NULL);
+       ut_ad(index != NULL);
        ut_ad(rec_offs_validate(rec1, index, offsets1));
        ut_ad(rec_offs_validate(rec2, index, offsets2));
        ut_ad(rec_offs_comp(offsets1) == rec_offs_comp(offsets2));
@@ -1375,7 +1380,9 @@ cmp_debug_dtuple_rec_with_match(
        int             ret;            /* return value */
        ulint           cur_field;      /* current field number */
 
-       ut_ad(dtuple && rec && matched_fields);
+       ut_ad(dtuple != NULL);
+       ut_ad(rec != NULL);
+       ut_ad(matched_fields != NULL);
        ut_ad(dtuple_check_typed(dtuple));
        ut_ad(rec_offs_validate(rec, NULL, offsets));
 
index 9540211629c476d966476dac556d818dcb23b3dc..1164a2a762ae25befa45bc0ea77e6d7e7141cf7c 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1994, 2013, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1994, 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
@@ -244,7 +244,7 @@ rec_get_n_extern_new(
 Determine the offset to each field in a leaf-page record
 in ROW_FORMAT=COMPACT.  This is a special case of
 rec_init_offsets() and rec_get_offsets_func(). */
-UNIV_INLINE __attribute__((nonnull))
+UNIV_INLINE MY_ATTRIBUTE((nonnull))
 void
 rec_init_offsets_comp_ordinary(
 /*===========================*/
@@ -788,7 +788,7 @@ rec_get_nth_field_offs_old(
 /**********************************************************//**
 Determines the size of a data tuple prefix in ROW_FORMAT=COMPACT.
 @return        total size */
-UNIV_INLINE __attribute__((warn_unused_result, nonnull(1,2)))
+UNIV_INLINE MY_ATTRIBUTE((warn_unused_result, nonnull(1,2)))
 ulint
 rec_get_converted_size_comp_prefix_low(
 /*===================================*/
@@ -1133,7 +1133,7 @@ rec_convert_dtuple_to_rec_old(
 
 /*********************************************************//**
 Builds a ROW_FORMAT=COMPACT record out of a data tuple. */
-UNIV_INLINE __attribute__((nonnull))
+UNIV_INLINE MY_ATTRIBUTE((nonnull))
 void
 rec_convert_dtuple_to_rec_comp(
 /*===========================*/
@@ -1341,7 +1341,9 @@ rec_convert_dtuple_to_rec(
 {
        rec_t*  rec;
 
-       ut_ad(buf && index && dtuple);
+       ut_ad(buf != NULL);
+       ut_ad(index != NULL);
+       ut_ad(dtuple != NULL);
        ut_ad(dtuple_validate(dtuple));
        ut_ad(dtuple_check_typed(dtuple));
 
index 1fc72bdeade9b173d4929ee72f24c9ed85cdb498..7d3fcf675ece2861487d73cd74f0760acca64551 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 2010, 2015, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2010, 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
@@ -512,8 +512,18 @@ row_merge_fts_doc_tokenize(
                dfield_dup(field, buf->heap);
 
                /* One variable length column, word with its lenght less than
-               fts_max_token_size, add one extra size and one extra byte */
-               cur_len += 2;
+               fts_max_token_size, add one extra size and one extra byte.
+
+               Since the max length for FTS token now is larger than 255,
+               so we will need to signify length byte itself, so only 1 to 128
+               bytes can be used for 1 bytes, larger than that 2 bytes. */
+               if (t_str.f_len < 128) {
+                       /* Extra size is one byte. */
+                       cur_len += 2;
+               } else {
+                       /* Extra size is two bytes. */
+                       cur_len += 3;
+               }
 
                /* Reserve one byte for the end marker of row_merge_block_t. */
                if (buf->total_size + data_size[idx] + cur_len
@@ -947,7 +957,7 @@ fts_parallel_merge(
        CloseHandle(psort_info->thread_hdl);
 #endif /*__WIN__ */
 
-       os_thread_exit(NULL);
+       os_thread_exit(NULL, false);
 
        OS_THREAD_DUMMY_RETURN;
 }
@@ -976,7 +986,7 @@ row_fts_start_parallel_merge(
 /********************************************************************//**
 Insert processed FTS data to auxillary index tables.
 @return        DB_SUCCESS if insertion runs fine */
-static __attribute__((nonnull))
+static MY_ATTRIBUTE((nonnull))
 dberr_t
 row_merge_write_fts_word(
 /*=====================*/
index 89496b4176b11f2e62c138f5b13ad796476064b6..eda89951c3f28a8b40750cc76e7ff0458e0b7700 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 2012, 2015, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2012, 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
@@ -2179,7 +2179,7 @@ PageConverter::operator() (
 Clean up after import tablespace failure, this function will acquire
 the dictionary latches on behalf of the transaction if the transaction
 hasn't already acquired them. */
-static __attribute__((nonnull))
+static MY_ATTRIBUTE((nonnull))
 void
 row_import_discard_changes(
 /*=======================*/
@@ -2230,7 +2230,7 @@ row_import_discard_changes(
 
 /*****************************************************************//**
 Clean up after import tablespace. */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 row_import_cleanup(
 /*===============*/
@@ -2265,7 +2265,7 @@ row_import_cleanup(
 
 /*****************************************************************//**
 Report error during tablespace import. */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 row_import_error(
 /*=============*/
@@ -2293,7 +2293,7 @@ row_import_error(
 Adjust the root page index node and leaf node segment headers, update
 with the new space id. For all the table's secondary indexes.
 @return error code */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 row_import_adjust_root_pages_of_secondary_indexes(
 /*==============================================*/
@@ -2409,7 +2409,7 @@ row_import_adjust_root_pages_of_secondary_indexes(
 /*****************************************************************//**
 Ensure that dict_sys->row_id exceeds SELECT MAX(DB_ROW_ID).
 @return error code */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 row_import_set_sys_max_row_id(
 /*==========================*/
@@ -2559,7 +2559,7 @@ row_import_cfg_read_string(
 /*********************************************************************//**
 Write the meta data (index user fields) config file.
 @return DB_SUCCESS or error code. */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 row_import_cfg_read_index_fields(
 /*=============================*/
@@ -2642,7 +2642,7 @@ row_import_cfg_read_index_fields(
 Read the index names and root page numbers of the indexes and set the values.
 Row format [root_page_no, len of str, str ... ]
 @return DB_SUCCESS or error code. */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 row_import_read_index_data(
 /*=======================*/
@@ -2837,7 +2837,7 @@ row_import_read_indexes(
 /*********************************************************************//**
 Read the meta data (table columns) config file. Deserialise the contents of
 dict_col_t structure, along with the column name. */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 row_import_read_columns(
 /*====================*/
@@ -2962,7 +2962,7 @@ row_import_read_columns(
 /*****************************************************************//**
 Read the contents of the <tablespace>.cfg file.
 @return DB_SUCCESS or error code. */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 row_import_read_v1(
 /*===============*/
@@ -3128,7 +3128,7 @@ row_import_read_v1(
 /**
 Read the contents of the <tablespace>.cfg file.
 @return DB_SUCCESS or error code. */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 row_import_read_meta_data(
 /*======================*/
@@ -3171,7 +3171,7 @@ row_import_read_meta_data(
 /**
 Read the contents of the <tablename>.cfg file.
 @return DB_SUCCESS or error code. */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 row_import_read_cfg(
 /*================*/
index 37eac2494f1bcbb7b6323cc60c2e1504e299f6ce..12ca0a328f23ca19697641c632ea91bc99d35746 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1996, 2015, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1996, 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
@@ -224,7 +224,7 @@ Does an insert operation by updating a delete-marked existing record
 in the index. This situation can occur if the delete-marked record is
 kept in the index for consistent reads.
 @return        DB_SUCCESS or error code */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 row_ins_sec_index_entry_by_modify(
 /*==============================*/
@@ -319,7 +319,7 @@ Does an insert operation by delete unmarking and updating a delete marked
 existing record in the index. This situation can occur if the delete marked
 record is kept in the index for consistent reads.
 @return        DB_SUCCESS, DB_FAIL, or error code */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 row_ins_clust_index_entry_by_modify(
 /*================================*/
@@ -427,7 +427,7 @@ row_ins_cascade_ancestor_updates_table(
 Returns the number of ancestor UPDATE or DELETE nodes of a
 cascaded update/delete node.
 @return        number of ancestors */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 ulint
 row_ins_cascade_n_ancestors(
 /*========================*/
@@ -453,7 +453,7 @@ a cascaded update.
 can also be 0 if no foreign key fields changed; the returned value is
 ULINT_UNDEFINED if the column type in the child table is too short to
 fit the new value in the parent table: that means the update fails */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 ulint
 row_ins_cascade_calc_update_vec(
 /*============================*/
@@ -934,7 +934,7 @@ Perform referential actions or checks when a parent row is deleted or updated
 and the constraint had an ON DELETE or ON UPDATE condition which was not
 RESTRICT.
 @return        DB_SUCCESS, DB_LOCK_WAIT, or error code */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 row_ins_foreign_check_on_constraint(
 /*================================*/
@@ -1774,7 +1774,7 @@ Otherwise does searches to the indexes of referenced tables and
 sets shared locks which lock either the success or the failure of
 a constraint.
 @return        DB_SUCCESS or error code */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 row_ins_check_foreign_constraints(
 /*==============================*/
@@ -1915,7 +1915,7 @@ Scans a unique non-clustered index at a given index entry to determine
 whether a uniqueness violation has occurred for the key value of the entry.
 Set shared locks on possible duplicate records.
 @return        DB_SUCCESS, DB_DUPLICATE_KEY, or DB_LOCK_WAIT */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 row_ins_scan_sec_index_for_duplicate(
 /*=================================*/
@@ -2057,7 +2057,7 @@ end_scan:
 @retval DB_SUCCESS_LOCKED_REC  when rec is an exact match of entry or
 a newer version of entry (the entry should not be inserted)
 @retval DB_DUPLICATE_KEY       when entry is a duplicate of rec */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 row_ins_duplicate_online(
 /*=====================*/
@@ -2098,7 +2098,7 @@ row_ins_duplicate_online(
 @retval DB_SUCCESS_LOCKED_REC  when rec is an exact match of entry or
 a newer version of entry (the entry should not be inserted)
 @retval DB_DUPLICATE_KEY       when entry is a duplicate of rec */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 row_ins_duplicate_error_in_clust_online(
 /*====================================*/
@@ -2141,7 +2141,7 @@ for a clustered index!
 record
 @retval DB_SUCCESS_LOCKED_REC if an exact match of the record was found
 in online table rebuild (flags & (BTR_KEEP_SYS_FLAG | BTR_NO_LOCKING_FLAG)) */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 row_ins_duplicate_error_in_clust(
 /*=============================*/
@@ -2559,7 +2559,7 @@ func_exit:
 /***************************************************************//**
 Starts a mini-transaction and checks if the index will be dropped.
 @return true if the index is to be dropped */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 bool
 row_ins_sec_mtr_start_and_check_if_aborted(
 /*=======================================*/
@@ -3000,7 +3000,7 @@ row_ins_index_entry(
 /***********************************************************//**
 Sets the values of the dtuple fields in entry from the values of appropriate
 columns in row. */
-static __attribute__((nonnull))
+static MY_ATTRIBUTE((nonnull))
 void
 row_ins_index_entry_set_vals(
 /*=========================*/
@@ -3053,7 +3053,7 @@ row_ins_index_entry_set_vals(
 Inserts a single index entry to the table.
 @return DB_SUCCESS if operation successfully completed, else error
 code or DB_LOCK_WAIT */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 row_ins_index_entry_step(
 /*=====================*/
@@ -3176,7 +3176,7 @@ row_ins_get_row_from_select(
 Inserts a row to a table.
 @return DB_SUCCESS if operation successfully completed, else error
 code or DB_LOCK_WAIT */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 row_ins(
 /*====*/
index bb473ca92cf3b51edfe1656620fc53588ef2b1eb..54183759e8d31e7a10e85a70fd63b908e459ab4f 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 2011, 2015, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2011, 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
@@ -201,7 +201,7 @@ struct row_log_t {
 /** Create the file or online log if it does not exist.
 @param[in,out] log     online rebuild log
 @return file descriptor. */
-static __attribute__((warn_unused_result))
+static MY_ATTRIBUTE((warn_unused_result))
 int
 row_log_tmpfile(
        row_log_t*      log)
@@ -217,7 +217,7 @@ row_log_tmpfile(
 /** Allocate the memory for the log buffer.
 @param[in,out] log_buf Buffer used for log operation
 @return TRUE if success, false if not */
-static __attribute__((warn_unused_result))
+static MY_ATTRIBUTE((warn_unused_result))
 bool
 row_log_block_allocate(
        row_log_buf_t&  log_buf)
@@ -407,7 +407,7 @@ row_log_table_get_error(
 /******************************************************//**
 Starts logging an operation to a table that is being rebuilt.
 @return pointer to log, or NULL if no logging is necessary */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 byte*
 row_log_table_open(
 /*===============*/
@@ -442,7 +442,7 @@ err_exit:
 
 /******************************************************//**
 Stops logging an operation to a table that is being rebuilt. */
-static __attribute__((nonnull))
+static MY_ATTRIBUTE((nonnull))
 void
 row_log_table_close_func(
 /*=====================*/
@@ -613,7 +613,7 @@ row_log_table_delete(
                &old_pk_extra_size);
        ut_ad(old_pk_extra_size < 0x100);
 
-       mrec_size = 4 + old_pk_size;
+       mrec_size = 6 + old_pk_size;
 
        /* Log enough prefix of the BLOB unless both the
        old and new table are in COMPACT or REDUNDANT format,
@@ -643,8 +643,8 @@ row_log_table_delete(
                *b++ = static_cast<byte>(old_pk_extra_size);
 
                /* Log the size of external prefix we saved */
-               mach_write_to_2(b, ext_size);
-               b += 2;
+               mach_write_to_4(b, ext_size);
+               b += 4;
 
                rec_convert_dtuple_to_temp(
                        b + old_pk_extra_size, new_index,
@@ -812,7 +812,7 @@ row_log_table_low_redundant(
 
 /******************************************************//**
 Logs an insert or update to a table that is being rebuilt. */
-static __attribute__((nonnull(1,2,3)))
+static MY_ATTRIBUTE((nonnull(1,2,3)))
 void
 row_log_table_low(
 /*==============*/
@@ -1312,7 +1312,7 @@ row_log_table_blob_alloc(
 /******************************************************//**
 Converts a log record to a table row.
 @return converted row, or NULL if the conversion fails */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 const dtuple_t*
 row_log_table_apply_convert_mrec(
 /*=============================*/
@@ -1466,7 +1466,7 @@ blob_done:
 /******************************************************//**
 Replays an insert operation on a table that was rebuilt.
 @return DB_SUCCESS or error code */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 row_log_table_apply_insert_low(
 /*===========================*/
@@ -1548,7 +1548,7 @@ row_log_table_apply_insert_low(
 /******************************************************//**
 Replays an insert operation on a table that was rebuilt.
 @return DB_SUCCESS or error code */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 row_log_table_apply_insert(
 /*=======================*/
@@ -1600,7 +1600,7 @@ row_log_table_apply_insert(
 /******************************************************//**
 Deletes a record from a table that is being rebuilt.
 @return DB_SUCCESS or error code */
-static __attribute__((nonnull(1, 2, 4, 5), warn_unused_result))
+static MY_ATTRIBUTE((nonnull(1, 2, 4, 5), warn_unused_result))
 dberr_t
 row_log_table_apply_delete_low(
 /*===========================*/
@@ -1698,7 +1698,7 @@ flag_ok:
 /******************************************************//**
 Replays a delete operation on a table that was rebuilt.
 @return DB_SUCCESS or error code */
-static __attribute__((nonnull(1, 3, 4, 5, 6, 7), warn_unused_result))
+static MY_ATTRIBUTE((nonnull(1, 3, 4, 5, 6, 7), warn_unused_result))
 dberr_t
 row_log_table_apply_delete(
 /*=======================*/
@@ -1820,7 +1820,7 @@ all_done:
 /******************************************************//**
 Replays an update operation on a table that was rebuilt.
 @return DB_SUCCESS or error code */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 row_log_table_apply_update(
 /*=======================*/
@@ -2183,7 +2183,7 @@ func_exit_committed:
 Applies an operation to a table that was rebuilt.
 @return NULL on failure (mrec corruption) or when out of data;
 pointer to next record on success */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 const mrec_t*
 row_log_table_apply_op(
 /*===================*/
@@ -2268,14 +2268,14 @@ row_log_table_apply_op(
                break;
 
        case ROW_T_DELETE:
-               /* 1 (extra_size) + 2 (ext_size) + at least 1 (payload) */
-               if (mrec + 4 >= mrec_end) {
+               /* 1 (extra_size) + 4 (ext_size) + at least 1 (payload) */
+               if (mrec + 6 >= mrec_end) {
                        return(NULL);
                }
 
                extra_size = *mrec++;
-               ext_size = mach_read_from_2(mrec);
-               mrec += 2;
+               ext_size = mach_read_from_4(mrec);
+               mrec += 4;
                ut_ad(mrec < mrec_end);
 
                /* We assume extra_size < 0x100 for the PRIMARY KEY prefix.
@@ -2474,7 +2474,7 @@ row_log_table_apply_op(
 /******************************************************//**
 Applies operations to a table was rebuilt.
 @return DB_SUCCESS, or error code on failure */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 row_log_table_apply_ops(
 /*====================*/
@@ -2971,7 +2971,7 @@ row_log_get_max_trx(
 
 /******************************************************//**
 Applies an operation to a secondary index that was being created. */
-static __attribute__((nonnull))
+static MY_ATTRIBUTE((nonnull))
 void
 row_log_apply_op_low(
 /*=================*/
@@ -3198,7 +3198,7 @@ func_exit:
 Applies an operation to a secondary index that was being created.
 @return NULL on failure (mrec corruption) or when out of data;
 pointer to next record on success */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 const mrec_t*
 row_log_apply_op(
 /*=============*/
@@ -3323,7 +3323,7 @@ corrupted:
 /******************************************************//**
 Applies operations to a secondary index that was being created.
 @return DB_SUCCESS, or error code on failure */
-static __attribute__((nonnull))
+static MY_ATTRIBUTE((nonnull))
 dberr_t
 row_log_apply_ops(
 /*==============*/
index 20a73a9ba33d6faf4bb0b811567b64d50873d741..f8bea67906c3f35797c63810007a50b5f83efab3 100644 (file)
@@ -70,7 +70,7 @@ UNIV_INTERN char      srv_disable_sort_file_cache;
 #ifdef UNIV_DEBUG
 /******************************************************//**
 Display a merge tuple. */
-static __attribute__((nonnull))
+static MY_ATTRIBUTE((nonnull))
 void
 row_merge_tuple_print(
 /*==================*/
@@ -105,7 +105,7 @@ row_merge_tuple_print(
 
 /******************************************************//**
 Encode an index record. */
-static __attribute__((nonnull))
+static MY_ATTRIBUTE((nonnull))
 void
 row_merge_buf_encode(
 /*=================*/
@@ -142,7 +142,7 @@ row_merge_buf_encode(
 /******************************************************//**
 Allocate a sort buffer.
 @return        own: sort buffer */
-static __attribute__((malloc, nonnull))
+static MY_ATTRIBUTE((malloc, nonnull))
 row_merge_buf_t*
 row_merge_buf_create_low(
 /*=====================*/
@@ -642,7 +642,7 @@ row_merge_dup_report(
 /*************************************************************//**
 Compare two tuples.
 @return        1, 0, -1 if a is greater, equal, less, respectively, than b */
-static __attribute__((warn_unused_result))
+static MY_ATTRIBUTE((warn_unused_result))
 int
 row_merge_tuple_cmp(
 /*================*/
@@ -721,7 +721,7 @@ UT_SORT_FUNCTION_BODY().
 
 /**********************************************************************//**
 Merge sort the tuple buffer in main memory. */
-static __attribute__((nonnull(4,5)))
+static MY_ATTRIBUTE((nonnull(4,5)))
 void
 row_merge_tuple_sort(
 /*=================*/
@@ -1245,7 +1245,7 @@ row_merge_write_eof(
 @param[in,out] tmpfd   temporary file handle
 @param[in]     path    path to create temporary file
 @return file descriptor, or -1 on failure */
-static __attribute__((warn_unused_result))
+static MY_ATTRIBUTE((warn_unused_result))
 int
 row_merge_tmpfile_if_needed(
        int*            tmpfd,
@@ -1264,7 +1264,7 @@ row_merge_tmpfile_if_needed(
 @param[in]     nrec    number of records in the file
 @param[in]     path    path to create temporary files
 @return file descriptor, or -1 on failure */
-static __attribute__((warn_unused_result))
+static MY_ATTRIBUTE((warn_unused_result))
 int
 row_merge_file_create_if_needed(
        merge_file_t*   file,
@@ -1310,7 +1310,7 @@ containing the index entries for the indexes to be built.
 @param[in,out] block           file buffer
 @param[in,out] tmpfd           temporary file handle
 return DB_SUCCESS or error */
-static __attribute__((nonnull(1,2,3,4,6,9,10,16), warn_unused_result))
+static MY_ATTRIBUTE((nonnull(1,2,3,4,6,9,10,16), warn_unused_result))
 dberr_t
 row_merge_read_clustered_index(
        trx_t*                  trx,
@@ -1987,7 +1987,7 @@ wait_again:
                /* Sync fts cache for other fts indexes to keep all
                fts indexes consistent in sync_doc_id. */
                err = fts_sync_table(const_cast<dict_table_t*>(new_table),
-                                    false, true);
+                                    false, true, false);
 
                if (err == DB_SUCCESS) {
                        fts_update_next_doc_id(
@@ -2028,7 +2028,7 @@ wait_again:
 /*************************************************************//**
 Merge two blocks of records on disk and write a bigger block.
 @return        DB_SUCCESS or error code */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 row_merge_blocks(
 /*=============*/
@@ -2139,7 +2139,7 @@ done1:
 /*************************************************************//**
 Copy a block of index entries.
 @return        TRUE on success, FALSE on failure */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 ibool
 row_merge_blocks_copy(
 /*==================*/
@@ -2212,7 +2212,7 @@ done0:
 /*************************************************************//**
 Merge disk files.
 @return        DB_SUCCESS or error code */
-static __attribute__((nonnull))
+static MY_ATTRIBUTE((nonnull))
 dberr_t
 row_merge(
 /*======*/
@@ -2398,7 +2398,7 @@ row_merge_sort(
 
 /*************************************************************//**
 Copy externally stored columns to the data tuple. */
-static __attribute__((nonnull))
+static MY_ATTRIBUTE((nonnull))
 void
 row_merge_copy_blobs(
 /*=================*/
@@ -2443,7 +2443,7 @@ row_merge_copy_blobs(
 Read sorted file containing index data tuples and insert these data
 tuples to the index
 @return        DB_SUCCESS or error number */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 row_merge_insert_index_tuples(
 /*==========================*/
@@ -3456,7 +3456,7 @@ row_merge_rename_tables_dict(
 /*********************************************************************//**
 Create and execute a query graph for creating an index.
 @return        DB_SUCCESS or error code */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 row_merge_create_index_graph(
 /*=========================*/
@@ -3774,6 +3774,13 @@ wait_again:
                                                " exited when creating FTS"
                                                " index '%s'",
                                                indexes[i]->name);
+                               } else {
+                                       for (j = 0; j < FTS_NUM_AUX_INDEX;
+                                            j++) {
+
+                                               os_thread_join(merge_info[j]
+                                                              .thread_hdl);
+                                       }
                                }
                        } else {
                                /* This cannot report duplicates; an
index 3140e18a0b1a7b56d0af3ca4ed4abaf6bc315096..09c20911ec9e377690189f059385cdb446842062 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 2000, 2015, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2000, 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
@@ -1362,6 +1362,8 @@ run_again:
 
        row_ins_step(thr);
 
+       DEBUG_SYNC_C("ib_after_row_insert_step");
+
        err = trx->error_state;
 
        if (err != DB_SUCCESS) {
@@ -1419,9 +1421,12 @@ error_exit:
                        }
 
                        /* Difference between Doc IDs are restricted within
-                       4 bytes integer. See fts_get_encoded_len() */
+                       4 bytes integer. See fts_get_encoded_len(). Consecutive
+                       doc_ids difference should not exceed
+                       FTS_DOC_ID_MAX_STEP value. */
 
-                       if (doc_id - next_doc_id >= FTS_DOC_ID_MAX_STEP) {
+                       if (next_doc_id > 1
+                           && doc_id - next_doc_id >= FTS_DOC_ID_MAX_STEP) {
                                fprintf(stderr,
                                        "InnoDB: Doc ID " UINT64PF " is too"
                                        " big. Its difference with largest"
@@ -1678,7 +1683,8 @@ row_update_for_mysql(
        trx_t*          trx             = prebuilt->trx;
        ulint           fk_depth        = 0;
 
-       ut_ad(prebuilt && trx);
+       ut_ad(prebuilt != NULL);
+       ut_ad(trx != NULL);
        UT_NOT_USED(mysql_rec);
 
        if (prebuilt->table->ibd_file_missing) {
@@ -1871,7 +1877,8 @@ row_unlock_for_mysql(
        btr_pcur_t*     clust_pcur      = &prebuilt->clust_pcur;
        trx_t*          trx             = prebuilt->trx;
 
-       ut_ad(prebuilt && trx);
+       ut_ad(prebuilt != NULL);
+       ut_ad(trx != NULL);
 
        if (UNIV_UNLIKELY
            (!srv_locks_unsafe_for_binlog
@@ -2671,6 +2678,10 @@ loop:
                return(n_tables + n_tables_dropped);
        }
 
+       DBUG_EXECUTE_IF("row_drop_tables_in_background_sleep",
+               os_thread_sleep(5000000);
+       );
+
        table = dict_table_open_on_name(drop->table_name, FALSE, FALSE,
                                        DICT_ERR_IGNORE_NONE);
 
@@ -2681,6 +2692,16 @@ loop:
                goto already_dropped;
        }
 
+       if (!table->to_be_dropped) {
+               /* There is a scenario: the old table is dropped
+               just after it's added into drop list, and new
+               table with the same name is created, then we try
+               to drop the new table in background. */
+               dict_table_close(table, FALSE, FALSE);
+
+               goto already_dropped;
+       }
+
        ut_a(!table->can_be_evicted);
 
        dict_table_close(table, FALSE, FALSE);
@@ -3940,6 +3961,13 @@ row_drop_table_for_mysql(
                }
        }
 
+
+       DBUG_EXECUTE_IF("row_drop_table_add_to_background",
+               row_add_table_to_background_drop_list(table->name);
+               err = DB_SUCCESS;
+               goto funct_exit;
+       );
+
        /* TODO: could we replace the counter n_foreign_key_checks_running
        with lock checks on the table? Acquire here an exclusive lock on the
        table, and rewrite lock0lock.cc and the lock wait in srv0srv.cc so that
@@ -4473,7 +4501,7 @@ row_mysql_drop_temp_tables(void)
 Drop all foreign keys in a database, see Bug#18942.
 Called at the end of row_drop_database_for_mysql().
 @return        error code or DB_SUCCESS */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 drop_all_foreign_keys_in_db(
 /*========================*/
@@ -4556,6 +4584,19 @@ loop:
        row_mysql_lock_data_dictionary(trx);
 
        while ((table_name = dict_get_first_table_name_in_db(name))) {
+               /* Drop parent table if it is a fts aux table, to
+               avoid accessing dropped fts aux tables in information
+               scheam when parent table still exists.
+               Note: Drop parent table will drop fts aux tables. */
+               char*   parent_table_name;
+               parent_table_name = fts_get_parent_table_name(
+                               table_name, strlen(table_name));
+
+               if (parent_table_name != NULL) {
+                       mem_free(table_name);
+                       table_name = parent_table_name;
+               }
+
                ut_a(memcmp(table_name, name, namelen) == 0);
 
                table = dict_table_open_on_name(
@@ -4665,7 +4706,7 @@ loop:
 Checks if a table name contains the string "/#sql" which denotes temporary
 tables in MySQL.
 @return        true if temporary table */
-UNIV_INTERN __attribute__((warn_unused_result))
+UNIV_INTERN MY_ATTRIBUTE((warn_unused_result))
 bool
 row_is_mysql_tmp_table_name(
 /*========================*/
@@ -4679,7 +4720,7 @@ row_is_mysql_tmp_table_name(
 /****************************************************************//**
 Delete a single constraint.
 @return        error code or DB_SUCCESS */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 row_delete_constraint_low(
 /*======================*/
@@ -4702,7 +4743,7 @@ row_delete_constraint_low(
 /****************************************************************//**
 Delete a single constraint.
 @return        error code or DB_SUCCESS */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 row_delete_constraint(
 /*==================*/
index b26ba971a95383a3af41b20f19aca402235e61d0..bc2e0b0e1cb1f15ea6b4adf766eb5614ed03eb94 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1997, 2015, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1997, 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
@@ -69,7 +69,8 @@ row_purge_node_create(
 {
        purge_node_t*   node;
 
-       ut_ad(parent && heap);
+       ut_ad(parent != NULL);
+       ut_ad(heap != NULL);
 
        node = static_cast<purge_node_t*>(
                mem_heap_zalloc(heap, sizeof(*node)));
@@ -120,7 +121,7 @@ row_purge_reposition_pcur(
 Removes a delete marked clustered index record if possible.
 @retval true if the row was not found, or it was successfully removed
 @retval false if the row was modified after the delete marking */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 bool
 row_purge_remove_clust_if_poss_low(
 /*===============================*/
@@ -202,7 +203,7 @@ marking.
 @retval true if the row was not found, or it was successfully removed
 @retval false the purge needs to be suspended because of running out
 of file space. */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 bool
 row_purge_remove_clust_if_poss(
 /*===========================*/
@@ -274,7 +275,7 @@ row_purge_poss_sec(
 Removes a secondary index entry if possible, by modifying the
 index tree.  Does not try to buffer the delete.
 @return        TRUE if success or if not found */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 ibool
 row_purge_remove_sec_if_poss_tree(
 /*==============================*/
@@ -396,7 +397,7 @@ Removes a secondary index entry without modifying the index tree,
 if possible.
 @retval        true if success or if not found
 @retval        false if row_purge_remove_sec_if_poss_tree() should be invoked */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 bool
 row_purge_remove_sec_if_poss_leaf(
 /*==============================*/
@@ -507,7 +508,7 @@ row_purge_remove_sec_if_poss_leaf(
 
 /***********************************************************//**
 Removes a secondary index entry if possible. */
-UNIV_INLINE __attribute__((nonnull(1,2)))
+UNIV_INLINE MY_ATTRIBUTE((nonnull(1,2)))
 void
 row_purge_remove_sec_if_poss(
 /*=========================*/
@@ -554,7 +555,7 @@ Purges a delete marking of a record.
 @retval true if the row was not found, or it was successfully removed
 @retval false the purge needs to be suspended because of
 running out of file space */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 bool
 row_purge_del_mark(
 /*===============*/
@@ -745,7 +746,8 @@ row_purge_parse_undo_rec(
        ulint           info_bits;
        ulint           type;
 
-       ut_ad(node && thr);
+       ut_ad(node != NULL);
+       ut_ad(thr != NULL);
 
        ptr = trx_undo_rec_get_pars(
                undo_rec, &type, &node->cmpl_info,
@@ -830,7 +832,7 @@ err_exit:
 /***********************************************************//**
 Purges the parsed record.
 @return true if purged, false if skipped */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 bool
 row_purge_record_func(
 /*==================*/
@@ -895,7 +897,7 @@ row_purge_record_func(
 Fetches an undo log record and does the purge for the recorded operation.
 If none left, or the current purge completed, returns the control to the
 parent node, which is always a query thread node. */
-static __attribute__((nonnull))
+static MY_ATTRIBUTE((nonnull))
 void
 row_purge(
 /*======*/
index ecd6f47947b232ffff92b17036eccf5b50a81d21..583fbe60fb34b4ccb60c4e8772b6553aa00789d4 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 2012, 2014, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2012, 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
@@ -37,7 +37,7 @@ Created 2012-02-08 by Sunny Bains.
 /*********************************************************************//**
 Write the meta data (index user fields) config file.
 @return DB_SUCCESS or error code. */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 row_quiesce_write_index_fields(
 /*===========================*/
@@ -97,7 +97,7 @@ row_quiesce_write_index_fields(
 /*********************************************************************//**
 Write the meta data config file index information.
 @return DB_SUCCESS or error code. */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 row_quiesce_write_indexes(
 /*======================*/
@@ -210,7 +210,7 @@ Write the meta data (table columns) config file. Serialise the contents of
 dict_col_t structure, along with the column name. All fields are serialized
 as ib_uint32_t.
 @return DB_SUCCESS or error code. */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 row_quiesce_write_table(
 /*====================*/
@@ -293,7 +293,7 @@ row_quiesce_write_table(
 /*********************************************************************//**
 Write the meta data config file header.
 @return DB_SUCCESS or error code. */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 row_quiesce_write_header(
 /*=====================*/
@@ -415,7 +415,7 @@ row_quiesce_write_header(
 /*********************************************************************//**
 Write the table meta data after quiesce.
 @return DB_SUCCESS or error code */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 row_quiesce_write_cfg(
 /*==================*/
@@ -530,10 +530,8 @@ row_quiesce_table_start(
                trx_purge_stop();
        }
 
-       ut_a(table->id > 0);
-
        for (ulint count = 0;
-            ibuf_contract_in_background(table->id, TRUE) != 0
+            ibuf_merge_space(table->space) != 0
             && !trx_is_interrupted(trx);
             ++count) {
                if (!(count % 20)) {
index be786f954fb9f8084b13aabbb26d79f3ed3f2549..96d25e15777dbcb848c64c224857f5f1d6175446 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1996, 2012, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1996, 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
@@ -240,7 +240,9 @@ row_build(
        ulint                   offsets_[REC_OFFS_NORMAL_SIZE];
        rec_offs_init(offsets_);
 
-       ut_ad(index && rec && heap);
+       ut_ad(index != NULL);
+       ut_ad(rec != NULL);
+       ut_ad(heap != NULL);
        ut_ad(dict_index_is_clust(index));
        ut_ad(!mutex_own(&trx_sys->mutex));
        ut_ad(!col_map || col_table);
@@ -409,7 +411,9 @@ row_rec_to_index_entry_low(
        ulint           len;
        ulint           rec_len;
 
-       ut_ad(rec && heap && index);
+       ut_ad(rec != NULL);
+       ut_ad(heap != NULL);
+       ut_ad(index != NULL);
        /* Because this function may be invoked by row0merge.cc
        on a record whose header is in different format, the check
        rec_offs_validate(rec, index, offsets) must be avoided here. */
@@ -464,7 +468,9 @@ row_rec_to_index_entry(
        byte*           buf;
        const rec_t*    copy_rec;
 
-       ut_ad(rec && heap && index);
+       ut_ad(rec != NULL);
+       ut_ad(heap != NULL);
+       ut_ad(index != NULL);
        ut_ad(rec_offs_validate(rec, index, offsets));
 
        /* Take a copy of rec to heap */
@@ -523,7 +529,9 @@ row_build_row_ref(
        ulint*          offsets         = offsets_;
        rec_offs_init(offsets_);
 
-       ut_ad(index && rec && heap);
+       ut_ad(index != NULL);
+       ut_ad(rec != NULL);
+       ut_ad(heap != NULL);
        ut_ad(!dict_index_is_clust(index));
 
        offsets = rec_get_offsets(rec, index, offsets,
index b7bc3cff64535c9ca69694c0d4e94f199f554089..42b1ab5763012dc52f7329d7a85445d9efeaa82e 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1997, 2015, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1997, 2016, Oracle and/or its affiliates. All Rights Reserved.
 Copyright (c) 2008, Google Inc.
 
 Portions of this file contain modifications contributed and copyrighted by
@@ -675,7 +675,7 @@ sel_enqueue_prefetched_row(
 /*********************************************************************//**
 Builds a previous version of a clustered index record for a consistent read
 @return        DB_SUCCESS or error code */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 row_sel_build_prev_vers(
 /*====================*/
@@ -710,7 +710,7 @@ row_sel_build_prev_vers(
 /*********************************************************************//**
 Builds the last committed version of a clustered index record for a
 semi-consistent read. */
-static __attribute__((nonnull))
+static MY_ATTRIBUTE((nonnull))
 void
 row_sel_build_committed_vers_for_mysql(
 /*===================================*/
@@ -808,7 +808,7 @@ row_sel_test_other_conds(
 Retrieves the clustered index record corresponding to a record in a
 non-clustered index. Does the necessary locking.
 @return        DB_SUCCESS or error code */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 row_sel_get_clust_rec(
 /*==================*/
@@ -1312,7 +1312,7 @@ func_exit:
 /*********************************************************************//**
 Performs a select step.
 @return        DB_SUCCESS or error code */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 row_sel(
 /*====*/
@@ -2563,7 +2563,7 @@ row_sel_store_row_id_to_prebuilt(
 /**************************************************************//**
 Stores a non-SQL-NULL field in the MySQL format. The counterpart of this
 function is row_mysql_store_col_in_innobase_format() in row0mysql.cc. */
-static __attribute__((nonnull))
+static MY_ATTRIBUTE((nonnull))
 void
 row_sel_field_store_in_mysql_format_func(
 /*=====================================*/
@@ -2752,7 +2752,7 @@ row_sel_field_store_in_mysql_format_func(
 #endif /* UNIV_DEBUG */
 /**************************************************************//**
 Convert a field in the Innobase format to a field in the MySQL format. */
-static __attribute__((warn_unused_result))
+static MY_ATTRIBUTE((warn_unused_result))
 ibool
 row_sel_store_mysql_field_func(
 /*===========================*/
@@ -2902,7 +2902,7 @@ Note that the template in prebuilt may advise us to copy only a few
 columns to mysql_rec, other columns are left blank. All columns may not
 be needed in the query.
 @return TRUE on success, FALSE if not all columns could be retrieved */
-static __attribute__((warn_unused_result))
+static MY_ATTRIBUTE((warn_unused_result))
 ibool
 row_sel_store_mysql_rec(
 /*====================*/
@@ -2964,7 +2964,7 @@ row_sel_store_mysql_rec(
 /*********************************************************************//**
 Builds a previous version of a clustered index record for a consistent read
 @return        DB_SUCCESS or error code */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 row_sel_build_prev_vers_for_mysql(
 /*==============================*/
@@ -3001,7 +3001,7 @@ Retrieves the clustered index record corresponding to a record in a
 non-clustered index. Does the necessary locking. Used in the MySQL
 interface.
 @return        DB_SUCCESS, DB_SUCCESS_LOCKED_REC, or error code */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 row_sel_get_clust_rec_for_mysql(
 /*============================*/
index 849bf09649259cc6e3b86319733d3d5291b141aa..651042fb820dfc2a78dc1926aa8ad3a1696c0270 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1997, 2014, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1997, 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
@@ -61,7 +61,7 @@ introduced where a call to log_free_check() is bypassed. */
 Removes a clustered index record. The pcur in node was positioned on the
 record, now it is detached.
 @return        DB_SUCCESS or DB_OUT_OF_FILE_SPACE */
-static  __attribute__((nonnull, warn_unused_result))
+static  MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 row_undo_ins_remove_clust_rec(
 /*==========================*/
@@ -176,7 +176,7 @@ func_exit:
 /***************************************************************//**
 Removes a secondary index entry if found.
 @return        DB_SUCCESS, DB_FAIL, or DB_OUT_OF_FILE_SPACE */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 row_undo_ins_remove_sec_low(
 /*========================*/
@@ -251,7 +251,7 @@ func_exit_no_pcur:
 Removes a secondary index entry from the index if found. Tries first
 optimistic, then pessimistic descent down the tree.
 @return        DB_SUCCESS or DB_OUT_OF_FILE_SPACE */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 row_undo_ins_remove_sec(
 /*====================*/
@@ -350,7 +350,7 @@ close_table:
 /***************************************************************//**
 Removes secondary index records.
 @return        DB_SUCCESS or DB_OUT_OF_FILE_SPACE */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 row_undo_ins_remove_sec_rec(
 /*========================*/
index 29252c7834a870e88cb8910507421ec39c2b0e1a..4b44245bd96d6f1ff6b5ce0de8e62dea34ae1432 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1997, 2014, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1997, 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
@@ -72,7 +72,7 @@ introduced where a call to log_free_check() is bypassed. */
 /***********************************************************//**
 Undoes a modify in a clustered index record.
 @return        DB_SUCCESS, DB_FAIL, or error code: we may run out of file space */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 row_undo_mod_clust_low(
 /*===================*/
@@ -154,7 +154,7 @@ This is attempted when the record was inserted by updating a
 delete-marked record and there no longer exist transactions
 that would see the delete-marked record.
 @return        DB_SUCCESS, DB_FAIL, or error code: we may run out of file space */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 row_undo_mod_remove_clust_low(
 /*==========================*/
@@ -243,7 +243,7 @@ row_undo_mod_remove_clust_low(
 Undoes a modify in a clustered index record. Sets also the node state for the
 next round of undo.
 @return        DB_SUCCESS or error code: we may run out of file space */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 row_undo_mod_clust(
 /*===============*/
@@ -380,7 +380,7 @@ row_undo_mod_clust(
 /***********************************************************//**
 Delete marks or removes a secondary index entry if found.
 @return        DB_SUCCESS, DB_FAIL, or DB_OUT_OF_FILE_SPACE */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 row_undo_mod_del_mark_or_remove_sec_low(
 /*====================================*/
@@ -516,7 +516,7 @@ not cause problems because in row0sel.cc, in queries we always retrieve the
 clustered index record or an earlier version of it, if the secondary index
 record through which we do the search is delete-marked.
 @return        DB_SUCCESS or DB_OUT_OF_FILE_SPACE */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 row_undo_mod_del_mark_or_remove_sec(
 /*================================*/
@@ -549,7 +549,7 @@ fields but alphabetically they stayed the same, e.g., 'abc' -> 'aBc'.
 @retval        DB_OUT_OF_FILE_SPACE when running out of tablespace
 @retval        DB_DUPLICATE_KEY if the value was missing
        and an insert would lead to a duplicate exists */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 row_undo_mod_del_unmark_sec_and_undo_update(
 /*========================================*/
@@ -745,7 +745,7 @@ func_exit_no_pcur:
 
 /***********************************************************//**
 Flags a secondary index corrupted. */
-static __attribute__((nonnull))
+static MY_ATTRIBUTE((nonnull))
 void
 row_undo_mod_sec_flag_corrupted(
 /*============================*/
@@ -777,7 +777,7 @@ row_undo_mod_sec_flag_corrupted(
 /***********************************************************//**
 Undoes a modify in secondary indexes when undo record type is UPD_DEL.
 @return        DB_SUCCESS or DB_OUT_OF_FILE_SPACE */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 row_undo_mod_upd_del_sec(
 /*=====================*/
@@ -844,7 +844,7 @@ row_undo_mod_upd_del_sec(
 /***********************************************************//**
 Undoes a modify in secondary indexes when undo record type is DEL_MARK.
 @return        DB_SUCCESS or DB_OUT_OF_FILE_SPACE */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 row_undo_mod_del_mark_sec(
 /*======================*/
@@ -912,7 +912,7 @@ row_undo_mod_del_mark_sec(
 /***********************************************************//**
 Undoes a modify in secondary indexes when undo record type is UPD_EXIST.
 @return        DB_SUCCESS or DB_OUT_OF_FILE_SPACE */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 row_undo_mod_upd_exist_sec(
 /*=======================*/
@@ -1028,7 +1028,7 @@ row_undo_mod_upd_exist_sec(
 
 /***********************************************************//**
 Parses the row reference and other info in a modify undo log record. */
-static __attribute__((nonnull))
+static MY_ATTRIBUTE((nonnull))
 void
 row_undo_mod_parse_undo_rec(
 /*========================*/
@@ -1105,7 +1105,8 @@ row_undo_mod(
        dberr_t err;
        ibool   dict_locked;
 
-       ut_ad(node && thr);
+       ut_ad(node != NULL);
+       ut_ad(thr != NULL);
        ut_ad(node->state == UNDO_NODE_MODIFY);
 
        dict_locked = thr_get_trx(thr)->dict_operation_lock_mode == RW_X_LATCH;
index 9977a1e8f0424a46e0c2fe5775352ec774abf469..149dc6719301edb55fa2cf95f94061fd06fff204 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1997, 2012, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1997, 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
@@ -245,7 +245,7 @@ Fetches an undo log record and does the undo for the recorded operation.
 If none left, or a partial rollback completed, returns control to the
 parent node, which is always a query thread node.
 @return        DB_SUCCESS if operation successfully completed, else error code */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 row_undo(
 /*=====*/
@@ -257,7 +257,8 @@ row_undo(
        roll_ptr_t      roll_ptr;
        ibool           locked_data_dict;
 
-       ut_ad(node && thr);
+       ut_ad(node != NULL);
+       ut_ad(thr != NULL);
 
        trx = node->trx;
 
index 5a8987a802972985a57213559929738639c59f32..6a79b1ecbd1a2cd3b39a3c2930db4b96ac4b5eab 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1996, 2014, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1996, 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
@@ -209,7 +209,7 @@ NOTE that this function will temporarily commit mtr and lose the
 pcur position!
 
 @return        DB_SUCCESS or an error code */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 row_upd_check_references_constraints(
 /*=================================*/
@@ -404,7 +404,7 @@ run_again:
                                        dict_table_open_on_name(
                                          foreign->referenced_table_name_lookup,
                                          FALSE, FALSE, DICT_ERR_IGNORE_NONE);
-                               opened = TRUE;
+                               opened = (foreign->referenced_table) ? TRUE : FALSE;
                        }
 
                        if (foreign->referenced_table) {
@@ -427,7 +427,7 @@ run_again:
                                               ->n_foreign_key_checks_running);
 
                                if (opened == TRUE) {
-                                       dict_table_close(foreign->referenced_table, TRUE, FALSE);
+                                       dict_table_close(foreign->referenced_table, FALSE, FALSE);
                                        opened = FALSE;
                                }
                        }
@@ -766,7 +766,7 @@ row_upd_write_sys_vals_to_log(
        roll_ptr_t      roll_ptr,/*!< in: roll ptr of the undo log record */
        byte*           log_ptr,/*!< pointer to a buffer of size > 20 opened
                                in mlog */
-       mtr_t*          mtr __attribute__((unused))) /*!< in: mtr */
+       mtr_t*          mtr MY_ATTRIBUTE((unused))) /*!< in: mtr */
 {
        ut_ad(dict_index_is_clust(index));
        ut_ad(mtr);
@@ -1801,7 +1801,7 @@ row_upd_store_row(
 Updates a secondary index entry of a row.
 @return DB_SUCCESS if operation successfully completed, else error
 code or DB_LOCK_WAIT */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 row_upd_sec_index_entry(
 /*====================*/
@@ -2040,7 +2040,7 @@ Updates the secondary index record if it is changed in the row update or
 deletes it if this is a delete.
 @return DB_SUCCESS if operation successfully completed, else error
 code or DB_LOCK_WAIT */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 row_upd_sec_step(
 /*=============*/
@@ -2073,7 +2073,7 @@ updated. We must mark them as inherited in entry, so that they are not
 freed in a rollback. A limited version of this function used to be
 called btr_cur_mark_dtuple_inherited_extern().
 @return TRUE if any columns were inherited */
-static __attribute__((warn_unused_result))
+static MY_ATTRIBUTE((warn_unused_result))
 ibool
 row_upd_clust_rec_by_insert_inherit_func(
 /*=====================================*/
@@ -2152,7 +2152,7 @@ fields of the clustered index record change. This should be quite rare in
 database applications.
 @return DB_SUCCESS if operation successfully completed, else error
 code or DB_LOCK_WAIT */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 row_upd_clust_rec_by_insert(
 /*========================*/
@@ -2311,7 +2311,7 @@ Updates a clustered index record of a row when the ordering fields do
 not change.
 @return DB_SUCCESS if operation successfully completed, else error
 code or DB_LOCK_WAIT */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 row_upd_clust_rec(
 /*==============*/
@@ -2470,7 +2470,7 @@ func_exit:
 /***********************************************************//**
 Delete marks a clustered index record.
 @return        DB_SUCCESS if operation successfully completed, else error code */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 row_upd_del_mark_clust_rec(
 /*=======================*/
@@ -2563,7 +2563,7 @@ row_upd_del_mark_clust_rec(
 Updates the clustered index record.
 @return DB_SUCCESS if operation successfully completed, DB_LOCK_WAIT
 in case of a lock wait, else error code */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 row_upd_clust_step(
 /*===============*/
@@ -2771,7 +2771,7 @@ to this node, we assume that we have a persistent cursor which was on a
 record, and the position of the cursor is stored in the cursor.
 @return DB_SUCCESS if operation successfully completed, else error
 code or DB_LOCK_WAIT */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 row_upd(
 /*====*/
@@ -2780,7 +2780,8 @@ row_upd(
 {
        dberr_t         err     = DB_SUCCESS;
 
-       ut_ad(node && thr);
+       ut_ad(node != NULL);
+       ut_ad(thr != NULL);
 
        if (UNIV_LIKELY(node->in_mysql_interface)) {
 
index 80c8f7fadbceb1b65b2f2478eb67a7e559500e32..1aab9495644637bafa131a79b9daa5347a242e8a 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 2010, 2014, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2010, 2016, Oracle and/or its affiliates. All Rights Reserved.
 Copyright (c) 2012, Facebook Inc.
 
 This program is free software; you can redistribute it and/or modify it under
@@ -1347,7 +1347,10 @@ srv_mon_set_module_control(
                                module */
                                set_current_module = FALSE;
                        } else if (module_id == MONITOR_ALL_COUNTER) {
-                               continue;
+                               if (!(innodb_counter_info[ix].monitor_type
+                                     & MONITOR_GROUP_MODULE)) {
+                                       continue;
+                               }
                        } else {
                                /* Hitting the next module, stop */
                                break;
index 5e5a4029e14f6a5b6f9981defb9147bfdf7fd333..7a7588d12af08aa7b09ef6813c5385e4c3e27d2c 100644 (file)
@@ -348,6 +348,7 @@ this many index pages, there are 2 ways to calculate statistics:
   table/index are not found in the innodb database */
 UNIV_INTERN unsigned long long srv_stats_transient_sample_pages = 8;
 UNIV_INTERN my_bool            srv_stats_persistent = TRUE;
+UNIV_INTERN my_bool            srv_stats_include_delete_marked = FALSE;
 UNIV_INTERN unsigned long long srv_stats_persistent_sample_pages = 20;
 UNIV_INTERN my_bool            srv_stats_auto_recalc = TRUE;
 
@@ -1513,7 +1514,7 @@ extern "C" UNIV_INTERN
 os_thread_ret_t
 DECLARE_THREAD(srv_monitor_thread)(
 /*===============================*/
-       void*   arg __attribute__((unused)))
+       void*   arg MY_ATTRIBUTE((unused)))
                        /*!< in: a dummy parameter required by
                        os_thread_create */
 {
@@ -1690,7 +1691,7 @@ extern "C" UNIV_INTERN
 os_thread_ret_t
 DECLARE_THREAD(srv_error_monitor_thread)(
 /*=====================================*/
-       void*   arg __attribute__((unused)))
+       void*   arg MY_ATTRIBUTE((unused)))
                        /*!< in: a dummy parameter required by
                        os_thread_create */
 {
@@ -2131,7 +2132,7 @@ srv_master_do_active_tasks(void)
        /* Do an ibuf merge */
        srv_main_thread_op_info = "doing insert buffer merge";
        counter_time = ut_time_us(NULL);
-       ibuf_contract_in_background(0, FALSE);
+       ibuf_merge_in_background(false);
        MONITOR_INC_TIME_IN_MICRO_SECS(
                MONITOR_SRV_IBUF_MERGE_MICROSECOND, counter_time);
 
@@ -2223,7 +2224,7 @@ srv_master_do_idle_tasks(void)
        /* Do an ibuf merge */
        counter_time = ut_time_us(NULL);
        srv_main_thread_op_info = "doing insert buffer merge";
-       ibuf_contract_in_background(0, TRUE);
+       ibuf_merge_in_background(true);
        MONITOR_INC_TIME_IN_MICRO_SECS(
                MONITOR_SRV_IBUF_MERGE_MICROSECOND, counter_time);
 
@@ -2299,7 +2300,7 @@ srv_master_do_shutdown_tasks(
 
        /* Do an ibuf merge */
        srv_main_thread_op_info = "doing insert buffer merge";
-       n_bytes_merged = ibuf_contract_in_background(0, TRUE);
+       n_bytes_merged = ibuf_merge_in_background(true);
 
        /* Flush logs if needed */
        srv_sync_log_buffer_in_background();
@@ -2339,7 +2340,7 @@ extern "C" UNIV_INTERN
 os_thread_ret_t
 DECLARE_THREAD(srv_master_thread)(
 /*==============================*/
-       void*   arg __attribute__((unused)))
+       void*   arg MY_ATTRIBUTE((unused)))
                        /*!< in: a dummy parameter required by
                        os_thread_create */
 {
@@ -2483,7 +2484,7 @@ extern "C" UNIV_INTERN
 os_thread_ret_t
 DECLARE_THREAD(srv_worker_thread)(
 /*==============================*/
-       void*   arg __attribute__((unused)))    /*!< in: a dummy parameter
+       void*   arg MY_ATTRIBUTE((unused)))     /*!< in: a dummy parameter
                                                required by os_thread_create */
 {
        srv_slot_t*     slot;
@@ -2741,7 +2742,7 @@ extern "C" UNIV_INTERN
 os_thread_ret_t
 DECLARE_THREAD(srv_purge_coordinator_thread)(
 /*=========================================*/
-       void*   arg __attribute__((unused)))    /*!< in: a dummy parameter
+       void*   arg MY_ATTRIBUTE((unused)))     /*!< in: a dummy parameter
                                                required by os_thread_create */
 {
        srv_slot_t*     slot;
index 5a9aeb75e85711012d7f3fdc9b0e5b8d6e5456d6..697107a1e0d3993c0f3710ac25ce9a14805dff62 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1996, 2015, Oracle and/or its affiliates. All rights reserved.
+Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved.
 Copyright (c) 2008, Google Inc.
 Copyright (c) 2009, Percona Inc.
 
@@ -509,7 +509,7 @@ UNIV_INTERN
 void
 srv_normalize_path_for_win(
 /*=======================*/
-       char*   str __attribute__((unused)))    /*!< in/out: null-terminated
+       char*   str MY_ATTRIBUTE((unused)))     /*!< in/out: null-terminated
                                                character string */
 {
 #ifdef __WIN__
@@ -526,7 +526,7 @@ srv_normalize_path_for_win(
 /*********************************************************************//**
 Creates a log file.
 @return        DB_SUCCESS or error code */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 create_log_file(
 /*============*/
@@ -733,7 +733,7 @@ create_log_files_rename(
 /*********************************************************************//**
 Opens a log file.
 @return        DB_SUCCESS or error code */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 open_log_file(
 /*==========*/
@@ -761,7 +761,7 @@ open_log_file(
 /*********************************************************************//**
 Creates or opens database data files and closes them.
 @return        DB_SUCCESS or error code */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 open_or_create_data_files(
 /*======================*/
index 3ca495aaa8c72da4d5fabe0a3208808c5d8fd5b3..4df35053d0d5318a0dd9ca0996dc45aaaf86936d 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1995, 2015, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved.
 Copyright (c) 2008, Google Inc.
 
 Portions of this file contain modifications contributed and copyrighted by
@@ -387,10 +387,10 @@ ulint
 mutex_enter_nowait_func(
 /*====================*/
        ib_mutex_t*     mutex,          /*!< in: pointer to mutex */
-       const char*     file_name __attribute__((unused)),
+       const char*     file_name MY_ATTRIBUTE((unused)),
                                        /*!< in: file name where mutex
                                        requested */
-       ulint           line __attribute__((unused)))
+       ulint           line MY_ATTRIBUTE((unused)))
                                        /*!< in: line where requested */
 {
        ut_ad(mutex_validate(mutex));
index 56d46311f62d99f85e19b6e00ebb7ff4ce888fc2..efc600d16b1cc49f9a21760fcc315f766a6f428f 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1996, 2012, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1996, 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
@@ -913,7 +913,7 @@ Fetches the next undo log record from the history list to purge. It must be
 released with the corresponding release function.
 @return copy of an undo log record or pointer to trx_purge_dummy_rec,
 if the whole undo log can skipped in purge; NULL if none left */
-static __attribute__((warn_unused_result, nonnull))
+static MY_ATTRIBUTE((warn_unused_result, nonnull))
 trx_undo_rec_t*
 trx_purge_fetch_next_rec(
 /*=====================*/
index a698b37c2a6f7552c4ec6c0009e45caa55472028..868a8a6c0b6878b6a3b62fb4672a28a4a32cbc51 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1996, 2012, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1996, 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
@@ -1132,7 +1132,7 @@ trx_undo_rec_get_partial_row(
 /***********************************************************************//**
 Erases the unused undo log page end.
 @return TRUE if the page contained something, FALSE if it was empty */
-static __attribute__((nonnull))
+static MY_ATTRIBUTE((nonnull))
 ibool
 trx_undo_erase_page_end(
 /*====================*/
@@ -1158,7 +1158,7 @@ byte*
 trx_undo_parse_erase_page_end(
 /*==========================*/
        byte*   ptr,    /*!< in: buffer */
-       byte*   end_ptr __attribute__((unused)), /*!< in: buffer end */
+       byte*   end_ptr MY_ATTRIBUTE((unused)), /*!< in: buffer end */
        page_t* page,   /*!< in: page or NULL */
        mtr_t*  mtr)    /*!< in: mtr or NULL */
 {
@@ -1441,7 +1441,7 @@ NOTE: the caller must have latches on the clustered index page.
 @retval true if the undo log has been
 truncated and we cannot fetch the old version
 @retval false if the undo log record is available  */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 bool
 trx_undo_get_undo_rec(
 /*==================*/
@@ -1469,7 +1469,7 @@ trx_undo_get_undo_rec(
 #ifdef UNIV_DEBUG
 #define ATTRIB_USED_ONLY_IN_DEBUG
 #else /* UNIV_DEBUG */
-#define ATTRIB_USED_ONLY_IN_DEBUG      __attribute__((unused))
+#define ATTRIB_USED_ONLY_IN_DEBUG      MY_ATTRIBUTE((unused))
 #endif /* UNIV_DEBUG */
 
 /*******************************************************************//**
index ae9095d1ddc24011d75d98f023e53bf4be50f75b..306b982b6e3d3b2955ac4cd75df2f7cf2d92b964 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1996, 2014, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1996, 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
@@ -339,7 +339,7 @@ the row, these locks are naturally released in the rollback. Savepoints which
 were set after this savepoint are deleted.
 @return if no savepoint of the name found then DB_NO_SAVEPOINT,
 otherwise DB_SUCCESS */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 trx_rollback_to_savepoint_for_mysql_low(
 /*====================================*/
@@ -804,7 +804,7 @@ extern "C" UNIV_INTERN
 os_thread_ret_t
 DECLARE_THREAD(trx_rollback_or_clean_all_recovered)(
 /*================================================*/
-       void*   arg __attribute__((unused)))
+       void*   arg MY_ATTRIBUTE((unused)))
                        /*!< in: a dummy parameter required by
                        os_thread_create */
 {
index 5390f6dcf9114aa5cc4068bbd379da4c86db4df2..e3a131b5f0f29cc7d27fa5af395d80f187f4d5d0 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1996, 2015, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1996, 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
@@ -967,7 +967,7 @@ trx_serialisation_number_get(
 /****************************************************************//**
 Assign the transaction its history serialisation number and write the
 update UNDO log record to the assigned rollback segment. */
-static __attribute__((nonnull))
+static MY_ATTRIBUTE((nonnull))
 void
 trx_write_serialisation_history(
 /*============================*/
@@ -1054,7 +1054,7 @@ trx_write_serialisation_history(
 
 /********************************************************************
 Finalize a transaction containing updates for a FTS table. */
-static __attribute__((nonnull))
+static MY_ATTRIBUTE((nonnull))
 void
 trx_finalize_for_fts_table(
 /*=======================*/
@@ -1087,7 +1087,7 @@ trx_finalize_for_fts_table(
 
 /******************************************************************//**
 Finalize a transaction containing updates to FTS tables. */
-static __attribute__((nonnull))
+static MY_ATTRIBUTE((nonnull))
 void
 trx_finalize_for_fts(
 /*=================*/
@@ -1154,7 +1154,7 @@ trx_flush_log_if_needed_low(
 /**********************************************************************//**
 If required, flushes the log to disk based on the value of
 innodb_flush_log_at_trx_commit. */
-static __attribute__((nonnull))
+static MY_ATTRIBUTE((nonnull))
 void
 trx_flush_log_if_needed(
 /*====================*/
@@ -1169,7 +1169,7 @@ trx_flush_log_if_needed(
 
 /****************************************************************//**
 Commits a transaction in memory. */
-static __attribute__((nonnull))
+static MY_ATTRIBUTE((nonnull))
 void
 trx_commit_in_memory(
 /*=================*/
@@ -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<uint>(max_query_len));
+       }
+}
+#endif /* WITH_WSREP */
 /**********************************************************************//**
 Prints info about a transaction.
 Acquires and releases lock_sys->mutex and trx_sys->mutex. */
@@ -2169,7 +2281,7 @@ which is in the prepared state
 @return        trx on match, the trx->xid will be invalidated;
 note that the trx may have been committed, unless the caller is
 holding lock_sys->mutex */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 trx_t*
 trx_get_trx_by_xid_low(
 /*===================*/
index 290271c6cab2e63eb161cc5285f6ee3ebdfe86f3..2ddb35d5ad08e6bb95b7f5b42bcb23c2b5e2412b 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1996, 2013, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1996, 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
@@ -419,11 +419,11 @@ trx_undo_page_init(
 Creates a new undo log segment in file.
 @return DB_SUCCESS if page creation OK possible error codes are:
 DB_TOO_MANY_CONCURRENT_TRXS DB_OUT_OF_FILE_SPACE */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 trx_undo_seg_create(
 /*================*/
-       trx_rseg_t*     rseg __attribute__((unused)),/*!< in: rollback segment */
+       trx_rseg_t*     rseg MY_ATTRIBUTE((unused)),/*!< in: rollback segment */
        trx_rsegf_t*    rseg_hdr,/*!< in: rollback segment header, page
                                x-latched */
        ulint           type,   /*!< in: type of the segment: TRX_UNDO_INSERT or
@@ -443,7 +443,9 @@ trx_undo_seg_create(
        ibool           success;
        dberr_t         err = DB_SUCCESS;
 
-       ut_ad(mtr && id && rseg_hdr);
+       ut_ad(mtr != NULL);
+       ut_ad(id != NULL);
+       ut_ad(rseg_hdr != NULL);
        ut_ad(mutex_own(&(rseg->mutex)));
 
        /*      fputs(type == TRX_UNDO_INSERT
@@ -827,7 +829,7 @@ byte*
 trx_undo_parse_discard_latest(
 /*==========================*/
        byte*   ptr,    /*!< in: buffer */
-       byte*   end_ptr __attribute__((unused)), /*!< in: buffer end */
+       byte*   end_ptr MY_ATTRIBUTE((unused)), /*!< in: buffer end */
        page_t* page,   /*!< in: page or NULL */
        mtr_t*  mtr)    /*!< in: mtr or NULL */
 {
@@ -1557,7 +1559,7 @@ Creates a new undo log.
 @return DB_SUCCESS if successful in creating the new undo lob object,
 possible error codes are: DB_TOO_MANY_CONCURRENT_TRXS
 DB_OUT_OF_FILE_SPACE DB_OUT_OF_MEMORY */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 trx_undo_create(
 /*============*/
index bf30ec379aa8cbb4aad3e4aa3f8b450ea1095834..661917a708c3292e6333759ddca828fbb680b77e 100644 (file)
@@ -332,7 +332,7 @@ static int _ftb_parse_query(FTB *ftb, uchar *query, uint len,
 }
 
 
-static int _ftb_no_dupes_cmp(const void* not_used __attribute__((unused)),
+static int _ftb_no_dupes_cmp(const void* not_used MY_ATTRIBUTE((unused)),
                              const void *a,const void *b)
 {
   return CMP_NUM((*((my_off_t*)a)), (*((my_off_t*)b)));
@@ -643,7 +643,7 @@ typedef struct st_my_ftb_phrase_param
 
 static int ftb_phrase_add_word(MYSQL_FTPARSER_PARAM *param,
                                char *word, int word_len,
-    MYSQL_FTPARSER_BOOLEAN_INFO *boolean_info __attribute__((unused)))
+    MYSQL_FTPARSER_BOOLEAN_INFO *boolean_info MY_ATTRIBUTE((unused)))
 {
   MY_FTB_PHRASE_PARAM *phrase_param= param->mysql_ftparam;
   FT_WORD *w= (FT_WORD *)phrase_param->document->data;
@@ -901,7 +901,7 @@ typedef struct st_my_ftb_find_param
 
 static int ftb_find_relevance_add_word(MYSQL_FTPARSER_PARAM *param,
                                        char *word, int len,
-             MYSQL_FTPARSER_BOOLEAN_INFO *boolean_info __attribute__((unused)))
+             MYSQL_FTPARSER_BOOLEAN_INFO *boolean_info MY_ATTRIBUTE((unused)))
 {
   MY_FTB_FIND_PARAM *ftb_param= param->mysql_ftparam;
   FT_INFO *ftb= ftb_param->ftb;
index 67a7fae1ad6ff47ae72b6ec6de3391ae927fd965..1503a8892c661df835affeb6fd5d482248f0121c 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2001, 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
@@ -51,7 +51,7 @@ typedef struct st_ft_superdoc
     double   tmp_weight;
 } FT_SUPERDOC;
 
-static int FT_SUPERDOC_cmp(void* cmp_arg __attribute__((unused)),
+static int FT_SUPERDOC_cmp(void* cmp_arg MY_ATTRIBUTE((unused)),
                           FT_SUPERDOC *p1, FT_SUPERDOC *p2)
 {
   if (p1->doc.dpos < p2->doc.dpos)
@@ -189,7 +189,7 @@ do_skip:
 
 
 static int walk_and_copy(FT_SUPERDOC *from,
-                        uint32 count __attribute__((unused)), FT_DOC **to)
+                        uint32 count MY_ATTRIBUTE((unused)), FT_DOC **to)
 {
   DBUG_ENTER("walk_and_copy");
   from->doc.weight+=from->tmp_weight*from->word_ptr->weight;
@@ -200,7 +200,7 @@ static int walk_and_copy(FT_SUPERDOC *from,
 }
 
 static int walk_and_push(FT_SUPERDOC *from,
-                        uint32 count __attribute__((unused)), QUEUE *best)
+                        uint32 count MY_ATTRIBUTE((unused)), QUEUE *best)
 {
   DBUG_ENTER("walk_and_copy");
   from->doc.weight+=from->tmp_weight*from->word_ptr->weight;
@@ -210,7 +210,7 @@ static int walk_and_push(FT_SUPERDOC *from,
 }
 
 
-static int FT_DOC_cmp(void *unused __attribute__((unused)),
+static int FT_DOC_cmp(void *unused MY_ATTRIBUTE((unused)),
                       FT_DOC *a, FT_DOC *b)
 {
   double c= b->weight - a->weight;
@@ -345,8 +345,8 @@ int ft_nlq_read_next(FT_INFO *handler, char *record)
 
 
 float ft_nlq_find_relevance(FT_INFO *handler,
-                           uchar *record __attribute__((unused)),
-                           uint length __attribute__((unused)))
+                           uchar *record MY_ATTRIBUTE((unused)),
+                           uint length MY_ATTRIBUTE((unused)))
 {
   int a,b,c;
   FT_DOC  *docs=handler->doc;
index 2ef63c8af2e99e0d1d7f1a41c6f8edc1be0c22b5..564d6aa2cf45cd263ec59df52a305eb808434df4 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights
+/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights
    reserved.
 
    This program is free software; you can redistribute it and/or modify
@@ -259,7 +259,7 @@ void ft_parse_init(TREE *wtree, const CHARSET_INFO *cs)
 
 static int ft_add_word(MYSQL_FTPARSER_PARAM *param,
                        char *word, int word_len,
-             MYSQL_FTPARSER_BOOLEAN_INFO *boolean_info __attribute__((unused)))
+             MYSQL_FTPARSER_BOOLEAN_INFO *boolean_info MY_ATTRIBUTE((unused)))
 {
   TREE *wtree;
   FT_WORD w;
index 4f290e787cf646f716d0928a2fab3d5fe4bd725d..bee8f279930dfe8604ba77edeae9fd4e47303110 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 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
@@ -30,7 +30,7 @@ typedef struct st_ft_stopwords
 
 static TREE *stopwords3=NULL;
 
-static int FT_STOPWORD_cmp(void* cmp_arg __attribute__((unused)),
+static int FT_STOPWORD_cmp(void* cmp_arg MY_ATTRIBUTE((unused)),
                           FT_STOPWORD *w1, FT_STOPWORD *w2)
 {
   return ha_compare_text(ft_stopword_cs,
@@ -39,7 +39,7 @@ static int FT_STOPWORD_cmp(void* cmp_arg __attribute__((unused)),
 }
 
 static void FT_STOPWORD_free(FT_STOPWORD *w, TREE_FREE action,
-                             void *arg __attribute__((unused)))
+                             void *arg MY_ATTRIBUTE((unused)))
 {
   if (action == free_free)
     my_free((void*)w->pos);
index 5ae923aeb2c3530c0f4a76d84e21f54aeb282e07..80d20ace92b61a3942612360cea693422b9130e8 100644 (file)
@@ -1,5 +1,5 @@
 /*
-   Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+   Copyright (c) 2000, 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
@@ -1089,24 +1089,36 @@ int ha_myisam::repair(THD *thd, MI_CHECK &param, bool do_optimize)
         /* TODO: respect myisam_repair_threads variable */
         my_snprintf(buf, 40, "Repair with %d threads", my_count_bits(key_map));
         thd_proc_info(thd, buf);
+        /*
+          The new file is created with the right stats, so we can skip
+          copying file stats from old to new.
+        */
         error = mi_repair_parallel(&param, file, fixed_name,
-            param.testflag & T_QUICK);
+                                   param.testflag & T_QUICK, TRUE);
         thd_proc_info(thd, "Repair done"); // to reset proc_info, as
                                       // it was pointing to local buffer
       }
       else
       {
         thd_proc_info(thd, "Repair by sorting");
+        /*
+          The new file is created with the right stats, so we can skip
+          copying file stats from old to new.
+        */
         error = mi_repair_by_sort(&param, file, fixed_name,
-            param.testflag & T_QUICK);
+                                  param.testflag & T_QUICK, TRUE);
       }
     }
     else
     {
       thd_proc_info(thd, "Repair with keycache");
       param.testflag &= ~T_REP_BY_SORT;
+      /*
+        The new file is created with the right stats, so we can skip
+        copying file stats from old to new.
+      */
       error=  mi_repair(&param, file, fixed_name,
-                       param.testflag & T_QUICK);
+                       param.testflag & T_QUICK, TRUE);
     }
 #ifdef HAVE_MMAP
     if (remap)
@@ -1122,7 +1134,11 @@ int ha_myisam::repair(THD *thd, MI_CHECK &param, bool do_optimize)
     {
       optimize_done=1;
       thd_proc_info(thd, "Sorting index");
-      error=mi_sort_index(&param,file,fixed_name);
+      /*
+        The new file is created with the right stats, so we can skip
+        copying file stats from old to new.
+      */
+      error=mi_sort_index(&param,file,fixed_name, TRUE);
     }
     if (!statistics_done && (local_testflag & T_STATISTICS))
     {
@@ -1725,8 +1741,8 @@ int ha_myisam::index_last(uchar *buf)
 }
 
 int ha_myisam::index_next_same(uchar *buf,
-                              const uchar *key __attribute__((unused)),
-                              uint length __attribute__((unused)))
+                              const uchar *key MY_ATTRIBUTE((unused)),
+                              uint length MY_ATTRIBUTE((unused)))
 {
   int error;
   DBUG_ASSERT(inited==INDEX);
index 5b40a120c4bf7b612ed6b3984a32e6427eb9950f..fa93d0e8745a2fd37b4dd8a1ca9563d2cd2dcac5 100644 (file)
@@ -1,5 +1,5 @@
 /*
-   Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
+   Copyright (c) 2000, 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
@@ -1512,7 +1512,7 @@ static int mi_drop_all_indexes(MI_CHECK *param, MI_INFO *info, my_bool force)
        /* Save new datafile-name in temp_filename */
 
 int mi_repair(MI_CHECK *param, register MI_INFO *info,
-             char * name, int rep_quick)
+             char * name, int rep_quick, my_bool no_copy_stat)
 {
   int error,got_error;
   ha_rows start_records,new_header_length;
@@ -1726,6 +1726,11 @@ err:
     /* Replace the actual file with the temporary file */
     if (new_file >= 0)
     {
+      myf flags= 0;
+      if (param->testflag & T_BACKUP_DATA)
+        flags |= MY_REDEL_MAKE_BACKUP;
+      if (no_copy_stat)
+        flags |= MY_REDEL_NO_COPY_STAT;
       mysql_file_close(new_file, MYF(0));
       info->dfile=new_file= -1;
       /*
@@ -1744,8 +1749,7 @@ err:
         info->s->file_map= NULL;
       }
       if (change_to_newfile(share->data_file_name, MI_NAME_DEXT, DATA_TMP_EXT,
-                           (param->testflag & T_BACKUP_DATA ?
-                            MYF(MY_REDEL_MAKE_BACKUP): MYF(0))) ||
+                            flags) ||
          mi_open_datafile(info,share,name,-1))
        got_error=1;
 
@@ -1902,7 +1906,7 @@ int movepoint(register MI_INFO *info, uchar *record, my_off_t oldpos,
 
        /* Tell system that we want all memory for our cache */
 
-void lock_memory(MI_CHECK *param __attribute__((unused)))
+void lock_memory(MI_CHECK *param MY_ATTRIBUTE((unused)))
 {
 #ifdef SUN_OS                          /* Key-cacheing thrases on sun 4.1 */
   if (param->opt_lock_memory)
@@ -1933,7 +1937,8 @@ int flush_blocks(MI_CHECK *param, KEY_CACHE *key_cache, File file)
 
        /* Sort index for more efficent reads */
 
-int mi_sort_index(MI_CHECK *param, register MI_INFO *info, char * name)
+int mi_sort_index(MI_CHECK *param, register MI_INFO *info, char * name,
+                  my_bool no_copy_stat)
 {
   reg2 uint key;
   reg1 MI_KEYDEF *keyinfo;
@@ -2010,7 +2015,7 @@ int mi_sort_index(MI_CHECK *param, register MI_INFO *info, char * name)
   share->kfile = -1;
   (void) mysql_file_close(new_file, MYF(MY_WME));
   if (change_to_newfile(share->index_file_name, MI_NAME_IEXT, INDEX_TMP_EXT,
-                       MYF(0)) ||
+                       no_copy_stat ? MYF(MY_REDEL_NO_COPY_STAT) : MYF(0)) ||
       mi_open_keyfile(share))
     goto err2;
   info->lock_type= F_UNLCK;                    /* Force mi_readinfo to lock */
@@ -2215,6 +2220,8 @@ err:
     info               MyISAM handler to repair
     name               Name of table (for warnings)
     rep_quick          set to <> 0 if we should not change data file
+    no_copy_stat        Don't copy file stats from old to new file,
+                        assume that new file was created with correct stats
 
   RESULT
     0  ok
@@ -2222,7 +2229,7 @@ err:
 */
 
 int mi_repair_by_sort(MI_CHECK *param, register MI_INFO *info,
-                     const char * name, int rep_quick)
+                     const char * name, int rep_quick, my_bool no_copy_stat)
 {
   int got_error;
   uint i;
@@ -2549,11 +2556,15 @@ err:
     /* Replace the actual file with the temporary file */
     if (new_file >= 0)
     {
+      myf flags= 0;
+      if (param->testflag & T_BACKUP_DATA)
+        flags |= MY_REDEL_MAKE_BACKUP;
+      if (no_copy_stat)
+        flags |= MY_REDEL_NO_COPY_STAT;
       mysql_file_close(new_file, MYF(0));
       info->dfile=new_file= -1;
       if (change_to_newfile(share->data_file_name,MI_NAME_DEXT, DATA_TMP_EXT,
-                           (param->testflag & T_BACKUP_DATA ?
-                            MYF(MY_REDEL_MAKE_BACKUP): MYF(0))) ||
+                            flags) ||
          mi_open_datafile(info,share,name,-1))
        got_error=1;
     }
@@ -2601,6 +2612,8 @@ err:
     info               MyISAM handler to repair
     name               Name of table (for warnings)
     rep_quick          set to <> 0 if we should not change data file
+    no_copy_stat        Don't copy file stats from old to new file,
+                        assume that new file was created with correct stats
 
   DESCRIPTION
     Same as mi_repair_by_sort but do it multithreaded
@@ -2635,7 +2648,7 @@ err:
 */
 
 int mi_repair_parallel(MI_CHECK *param, register MI_INFO *info,
-                       const char * name, int rep_quick)
+                       const char * name, int rep_quick, my_bool no_copy_stat)
 {
   int got_error;
   uint i,key, total_key_length, istep;
@@ -3082,11 +3095,15 @@ err:
     /* Replace the actual file with the temporary file */
     if (new_file >= 0)
     {
+      myf flags= 0;
+      if (param->testflag & T_BACKUP_DATA)
+        flags |= MY_REDEL_MAKE_BACKUP;
+      if (no_copy_stat)
+        flags |= MY_REDEL_NO_COPY_STAT;
       mysql_file_close(new_file, MYF(0));
       info->dfile=new_file= -1;
       if (change_to_newfile(share->data_file_name, MI_NAME_DEXT, DATA_TMP_EXT,
-                           (param->testflag & T_BACKUP_DATA ?
-                            MYF(MY_REDEL_MAKE_BACKUP): MYF(0))) ||
+                           flags) ||
          mi_open_datafile(info,share,name,-1))
        got_error=1;
     }
index 2109796763dc3c6322137d10cb1eb79e0b312028..4ae7fa93dfbcc0436a99de0a0332a9b4ceab7099 100644 (file)
@@ -1,5 +1,4 @@
-/* Copyright (c) 2000-2006 MySQL AB, 2009 Sun Microsystems, Inc.
-   Use is subject to license terms.
+/* Copyright (c) 2000, 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,9 +13,9 @@
    along with this program; if not, write to the Free Software
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA */
 
-void _mi_report_crashed(MI_INFO *file __attribute__((unused)),
-                        const char *message __attribute__((unused)),
-                        const char *sfile __attribute__((unused)),
-                        uint sline __attribute__((unused)))
+void _mi_report_crashed(MI_INFO *file MY_ATTRIBUTE((unused)),
+                        const char *message MY_ATTRIBUTE((unused)),
+                        const char *sfile MY_ATTRIBUTE((unused)),
+                        uint sline MY_ATTRIBUTE((unused)))
 {
 }
index d5de98651c08397131019babe8545ccd2ab9affa..7d910dfbf6709217a59d47cc551da0a569bf731c 100644 (file)
@@ -1,5 +1,4 @@
-/* Copyright (c) 2003-2008 MySQL AB, 2009 Sun Microsystems, Inc.
-   Use is subject to license terms.
+/* Copyright (c) 2003, 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
@@ -48,7 +47,7 @@
 */
 
 int mi_assign_to_key_cache(MI_INFO *info,
-                          ulonglong key_map __attribute__((unused)),
+                          ulonglong key_map MY_ATTRIBUTE((unused)),
                           KEY_CACHE *key_cache)
 {
   int error= 0;
index ccb32115ccde8e51460ff3aa1350c7344f60c6fd..ac25be905d9ebde67cc5d09cabc0efce6d4d926d 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 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
@@ -1229,7 +1229,7 @@ exist a dup()-like call that would give us two different file descriptors.
 *************************************************************************/
 
 int mi_open_datafile(MI_INFO *info, MYISAM_SHARE *share, const char *org_name,
-                     File file_to_dup __attribute__((unused)))
+                     File file_to_dup MY_ATTRIBUTE((unused)))
 {
   char *data_name= share->data_file_name;
   char real_data_name[FN_REFLEN];
index 8770720d40783b4889b404d833dcebf35bda282f..11615810a6d59a08fa6950a09cf6806757d8b100 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 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
@@ -1009,7 +1009,7 @@ static void uf_zerofill_normal(MI_COLUMNDEF *rec, MI_BIT_BUFF *bit_buff, uchar *
 }
 
 static void uf_constant(MI_COLUMNDEF *rec,
-                       MI_BIT_BUFF *bit_buff __attribute__((unused)),
+                       MI_BIT_BUFF *bit_buff MY_ATTRIBUTE((unused)),
                        uchar *to,
                        uchar *end)
 {
@@ -1027,8 +1027,8 @@ static void uf_intervall(MI_COLUMNDEF *rec, MI_BIT_BUFF *bit_buff, uchar *to,
 
 
 /*ARGSUSED*/
-static void uf_zero(MI_COLUMNDEF *rec __attribute__((unused)),
-                   MI_BIT_BUFF *bit_buff __attribute__((unused)),
+static void uf_zero(MI_COLUMNDEF *rec MY_ATTRIBUTE((unused)),
+                   MI_BIT_BUFF *bit_buff MY_ATTRIBUTE((unused)),
                    uchar *to, uchar *end)
 {
   memset(to, 0, (end-to));
@@ -1058,7 +1058,7 @@ static void uf_blob(MI_COLUMNDEF *rec, MI_BIT_BUFF *bit_buff,
 
 
 static void uf_varchar1(MI_COLUMNDEF *rec, MI_BIT_BUFF *bit_buff,
-                      uchar *to, uchar *end __attribute__((unused)))
+                      uchar *to, uchar *end MY_ATTRIBUTE((unused)))
 {
   if (get_bit(bit_buff))
     to[0]= 0;                          /* Zero lengths */
@@ -1072,7 +1072,7 @@ static void uf_varchar1(MI_COLUMNDEF *rec, MI_BIT_BUFF *bit_buff,
 
 
 static void uf_varchar2(MI_COLUMNDEF *rec, MI_BIT_BUFF *bit_buff,
-                      uchar *to, uchar *end __attribute__((unused)))
+                      uchar *to, uchar *end MY_ATTRIBUTE((unused)))
 {
   if (get_bit(bit_buff))
     to[0]=to[1]=0;                             /* Zero lengths */
@@ -1607,7 +1607,7 @@ static int _mi_read_mempack_record(MI_INFO *info, my_off_t filepos, uchar *buf)
 static int _mi_read_rnd_mempack_record(MI_INFO *info, uchar *buf,
                                       register my_off_t filepos,
                                       my_bool skip_deleted_blocks
-                                      __attribute__((unused)))
+                                      MY_ATTRIBUTE((unused)))
 {
   MI_BLOCK_INFO block_info;
   MYISAM_SHARE *share=info->s;
index 7978f73d828c6625e2ee51864152582e97f1857e..b13c421b5ccc9ecf5eb6fe5a93451d9ccbdf37dc 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 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
@@ -180,7 +180,7 @@ err:
 
 int _mi_bin_search(MI_INFO *info, register MI_KEYDEF *keyinfo, uchar *page,
                    uchar *key, uint key_len, uint comp_flag, uchar **ret_pos,
-                   uchar *buff __attribute__((unused)), my_bool *last_key)
+                   uchar *buff MY_ATTRIBUTE((unused)), my_bool *last_key)
 {
   reg4 int start,mid,end,save_end;
   int flag;
@@ -1420,9 +1420,9 @@ int _mi_search_last(register MI_INFO *info, register MI_KEYDEF *keyinfo,
 
 int
 _mi_calc_static_key_length(MI_KEYDEF *keyinfo,uint nod_flag,
-                           uchar *next_pos  __attribute__((unused)),
-                           uchar *org_key  __attribute__((unused)),
-                           uchar *prev_key __attribute__((unused)),
+                           uchar *next_pos  MY_ATTRIBUTE((unused)),
+                           uchar *org_key  MY_ATTRIBUTE((unused)),
+                           uchar *prev_key MY_ATTRIBUTE((unused)),
                            uchar *key, MI_KEY_PARAM *s_temp)
 {
   s_temp->key=key;
@@ -1433,9 +1433,9 @@ _mi_calc_static_key_length(MI_KEYDEF *keyinfo,uint nod_flag,
 
 int
 _mi_calc_var_key_length(MI_KEYDEF *keyinfo,uint nod_flag,
-                        uchar *next_pos  __attribute__((unused)),
-                        uchar *org_key  __attribute__((unused)),
-                        uchar *prev_key __attribute__((unused)),
+                        uchar *next_pos  MY_ATTRIBUTE((unused)),
+                        uchar *org_key  MY_ATTRIBUTE((unused)),
+                        uchar *prev_key MY_ATTRIBUTE((unused)),
                         uchar *key, MI_KEY_PARAM *s_temp)
 {
   s_temp->key=key;
@@ -1825,7 +1825,7 @@ _mi_calc_bin_pack_key_length(MI_KEYDEF *keyinfo,uint nod_flag,uchar *next_key,
 
 /* store key without compression */
 
-void _mi_store_static_key(MI_KEYDEF *keyinfo __attribute__((unused)),
+void _mi_store_static_key(MI_KEYDEF *keyinfo MY_ATTRIBUTE((unused)),
                           register uchar *key_pos,
                           register MI_KEY_PARAM *s_temp)
 {
@@ -1840,7 +1840,7 @@ void _mi_store_static_key(MI_KEYDEF *keyinfo __attribute__((unused)),
   { *((pos)++) = (uchar) ((length) >> 8); *((pos)++) = (uchar) (length);  } }
 
 
-void _mi_store_var_pack_key(MI_KEYDEF *keyinfo  __attribute__((unused)),
+void _mi_store_var_pack_key(MI_KEYDEF *keyinfo  MY_ATTRIBUTE((unused)),
                             register uchar *key_pos,
                             register MI_KEY_PARAM *s_temp)
 {
@@ -1903,7 +1903,7 @@ void _mi_store_var_pack_key(MI_KEYDEF *keyinfo  __attribute__((unused)),
 
 /* variable length key with prefix compression */
 
-void _mi_store_bin_pack_key(MI_KEYDEF *keyinfo  __attribute__((unused)),
+void _mi_store_bin_pack_key(MI_KEYDEF *keyinfo  MY_ATTRIBUTE((unused)),
                             register uchar *key_pos,
                             register MI_KEY_PARAM *s_temp)
 {
index f6cc6536b729efff1d705b610ba54e80afb3a2f8..899d08af08730bf1238b13cd4c04d5ba07be84ec 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 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
@@ -41,7 +41,7 @@ ulonglong myisam_max_temp_length= MAX_FILE_SIZE;
 ulong    myisam_data_pointer_size=4;
 ulonglong    myisam_mmap_size= SIZE_T_MAX, myisam_mmap_used= 0;
 
-static int always_valid(const char *filename __attribute__((unused)))
+static int always_valid(const char *filename MY_ATTRIBUTE((unused)))
 {
   return 0;
 }
index 17888f7df22dfa68198633de441b2b717a765336..7db493da00410e2280d04f8a8795a2373a84d55e 100644 (file)
@@ -1,5 +1,5 @@
 /*
-   Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+   Copyright (c) 2000, 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
@@ -586,8 +586,8 @@ static struct my_option my_long_options[] =
 
 
 static my_bool
-get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
-              char *argument __attribute__((unused)))
+get_one_option(int optid, const struct my_option *opt MY_ATTRIBUTE((unused)),
+              char *argument MY_ATTRIBUTE((unused)))
 {
   switch(optid) {
   case 'a':
index 01737c54d1a034382a77e321c14739d009691fa8..5d00b5adf321500d568cd444b1d29c3e9cc11fe9 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2001, 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
@@ -226,8 +226,8 @@ err:
 
 
 static my_bool
-get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
-              char *argument __attribute__((unused)))
+get_one_option(int optid, const struct my_option *opt MY_ATTRIBUTE((unused)),
+              char *argument MY_ATTRIBUTE((unused)))
 {
   switch(optid) {
   case 'd':
index d6fab482cd98a5dba1cddfca7a99840d36c495ce..f32d830eb8c406a7031fe551c412aff0575d683d 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 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
@@ -466,7 +466,7 @@ TYPELIB myisam_stats_method_typelib= {
 
 static my_bool
 get_one_option(int optid,
-              const struct my_option *opt __attribute__((unused)),
+              const struct my_option *opt MY_ATTRIBUTE((unused)),
               char *argument)
 {
   switch (optid) {
@@ -994,14 +994,18 @@ static int myisamchk(MI_CHECK *param, char * filename)
                                info->s->state.key_map,
                                param->force_sort))
        {
+          /*
+            The new file might not be created with the right stats depending
+            on how myisamchk is run, so we must copy file stats from old to new.
+          */
           if (param->testflag & T_REP_BY_SORT)
-            error=mi_repair_by_sort(param,info,filename,rep_quick);
+            error= mi_repair_by_sort(param, info, filename, rep_quick, FALSE);
           else
-            error=mi_repair_parallel(param,info,filename,rep_quick);
+            error= mi_repair_parallel(param, info, filename, rep_quick, FALSE);
          state_updated=1;
        }
        else if (param->testflag & T_REP_ANY)
-         error=mi_repair(param, info,filename,rep_quick);
+         error= mi_repair(param, info, filename, rep_quick, FALSE);
       }
       if (!error && param->testflag & T_SORT_RECORDS)
       {
@@ -1041,12 +1045,12 @@ static int myisamchk(MI_CHECK *param, char * filename)
          {
            if (param->verbose)
              puts("Table had a compressed index;  We must now recreate the index");
-           error=mi_repair_by_sort(param,info,filename,1);
+           error= mi_repair_by_sort(param, info, filename, 1, FALSE);
          }
        }
       }
       if (!error && param->testflag & T_SORT_INDEX)
-       error=mi_sort_index(param,info,filename);
+       error= mi_sort_index(param, info, filename, FALSE);
       if (!error)
        share->state.changed&= ~(STATE_CHANGED | STATE_CRASHED |
                                 STATE_CRASHED_ON_REPAIR);
@@ -1711,7 +1715,7 @@ err:
 
 static int not_killed= 0;
 
-volatile int *killed_ptr(MI_CHECK *param __attribute__((unused)))
+volatile int *killed_ptr(MI_CHECK *param MY_ATTRIBUTE((unused)))
 {
   return &not_killed;                  /* always NULL */
 }
@@ -1719,7 +1723,7 @@ volatile int *killed_ptr(MI_CHECK *param __attribute__((unused)))
        /* print warnings and errors */
        /* VARARGS */
 
-void mi_check_print_info(MI_CHECK *param __attribute__((unused)),
+void mi_check_print_info(MI_CHECK *param MY_ATTRIBUTE((unused)),
                         const char *fmt,...)
 {
   va_list args;
index 157d10fc87adf78af4cc69059f8f5f58871db854..fc37b2221fd0f00199c95170030d78d927ec8f3f 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 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
@@ -695,7 +695,7 @@ static int read_string(IO_CACHE *file, register uchar* *to, register uint length
 }                              /* read_string */
 
 
-static int file_info_compare(void* cmp_arg __attribute__((unused)),
+static int file_info_compare(void* cmp_arg MY_ATTRIBUTE((unused)),
                             void *a, void *b)
 {
   long lint;
@@ -709,7 +709,7 @@ static int file_info_compare(void* cmp_arg __attribute__((unused)),
        /* ARGSUSED */
 
 static int test_if_open (struct file_info *key,
-                        element_count count __attribute__((unused)),
+                        element_count count MY_ATTRIBUTE((unused)),
                         struct test_if_open_param *param)
 {
   if (!strcmp(key->name,param->name) && key->id > param->max_id)
@@ -737,7 +737,7 @@ static void fix_blob_pointers(MI_INFO *info, uchar *record)
        /* ARGSUSED */
 
 static int test_when_accessed (struct file_info *key,
-                              element_count count __attribute__((unused)),
+                              element_count count MY_ATTRIBUTE((unused)),
                               struct st_access_param *access_param)
 {
   if (key->accessed < access_param->min_accessed && ! key->closed)
index 327aa6cbfda802b69f12930b5c09dfe4070f90dc..48ced2062f9cd00ef0808014b234c5da81af73e9 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 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
@@ -29,6 +29,7 @@
 #endif
 #include <my_getopt.h>
 #include <assert.h>
+#include <welcome_copyright_notice.h> // ORACLE_WELCOME_COPYRIGHT_NOTICE
 
 #if SIZEOF_LONG_LONG > 4
 #define BITS_SAVED 64
@@ -130,7 +131,7 @@ static void free_counts_and_tree_and_queue(HUFF_TREE *huff_trees,
                                           uint trees,
                                           HUFF_COUNTS *huff_counts,
                                           uint fields);
-static int compare_tree(void* cmp_arg __attribute__((unused)),
+static int compare_tree(void* cmp_arg MY_ATTRIBUTE((unused)),
                        const uchar *s,const uchar *t);
 static int get_statistic(PACK_MRG_INFO *mrg,HUFF_COUNTS *huff_counts);
 static void check_counts(HUFF_COUNTS *huff_counts,uint trees,
@@ -300,9 +301,7 @@ static void print_version(void)
 static void usage(void)
 {
   print_version();
-  puts("Copyright 2002-2008 MySQL AB, 2008 Sun Microsystems, Inc.");
-  puts("This software comes with ABSOLUTELY NO WARRANTY. This is free software,");
-  puts("and you are welcome to modify and redistribute it under the GPL license\n");
+  puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2002"));
 
   puts("Pack a MyISAM-table to take much less space.");
   puts("Keys are not updated, you must run myisamchk -rq on the datafile");
@@ -317,7 +316,7 @@ static void usage(void)
 
 
 static my_bool
-get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
+get_one_option(int optid, const struct my_option *opt MY_ATTRIBUTE((unused)),
               char *argument)
 {
   uint length;
@@ -1176,7 +1175,7 @@ static int get_statistic(PACK_MRG_INFO *mrg,HUFF_COUNTS *huff_counts)
   DBUG_RETURN(error != HA_ERR_END_OF_FILE);
 }
 
-static int compare_huff_elements(void *not_used __attribute__((unused)),
+static int compare_huff_elements(void *not_used MY_ATTRIBUTE((unused)),
                                 uchar *a, uchar *b)
 {
   return *((my_off_t*) a) < *((my_off_t*) b) ? -1 :
@@ -1693,7 +1692,7 @@ static int make_huff_tree(HUFF_TREE *huff_tree, HUFF_COUNTS *huff_counts)
   return 0;
 }
 
-static int compare_tree(void* cmp_arg __attribute__((unused)),
+static int compare_tree(void* cmp_arg MY_ATTRIBUTE((unused)),
                        register const uchar *s, register const uchar *t)
 {
   uint length;
index 45c42a2558b1e7f73f495a7d103aa67eb54e3418..6481229566fab9f91eeaef9df2dadbeb3b0ccade 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2002, 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
@@ -79,7 +79,7 @@ static double rt_data[]=
   -1
 };
 
-int main(int argc __attribute__((unused)),char *argv[] __attribute__((unused)))
+int main(int argc MY_ATTRIBUTE((unused)),char *argv[] MY_ATTRIBUTE((unused)))
 {
   MY_INIT(argv[0]);
   exit(run_test("rt_test"));
@@ -367,7 +367,7 @@ static int read_with_pos (MI_INFO * file,int silent)
 
 
 static void print_record(uchar * record,
-                        my_off_t offs __attribute__((unused)),
+                        my_off_t offs MY_ATTRIBUTE((unused)),
                         const char * tail)
 {
   int i;
@@ -420,7 +420,7 @@ static void create_record(uchar *record,uint rownr)
 }
 
 #else
-int main(int argc __attribute__((unused)),char *argv[] __attribute__((unused)))
+int main(int argc MY_ATTRIBUTE((unused)),char *argv[] MY_ATTRIBUTE((unused)))
 {
   exit(0);
 }
index 7ce22e85426a799bd7fe625a442378a92860cc4a..f28e7802847ec0cda64ff3ecff466f7132d95f66 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 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
@@ -886,7 +886,7 @@ static int write_merge_key_varlen(MI_SORT_PARAM *info,
 }
 
 
-static int write_merge_key(MI_SORT_PARAM *info __attribute__((unused)),
+static int write_merge_key(MI_SORT_PARAM *info MY_ATTRIBUTE((unused)),
                            IO_CACHE *to_file, uchar *key,
                            uint sort_length, uint count)
 {
index d42f27bbea350bc1e46c242967afaf8693e2154e..4a6cd8d8ea4a11a345e43c750e38a4fcee8f6cdd 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 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
@@ -118,7 +118,7 @@ static int sp_mbr_from_wkb(uchar *wkb, uint size, uint n_dims, double *mbr)
 */
 
 static int sp_add_point_to_mbr(uchar *(*wkb), uchar *end, uint n_dims, 
-                              uchar byte_order __attribute__((unused)),
+                              uchar byte_order MY_ATTRIBUTE((unused)),
                               double *mbr)
 {
   double ord;
index 04b4f88e68cf516dc83135740a82732cbfae235b..8c61f2c985b7e51adb6289e84ddace9ee0d7fa01 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2002, 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
@@ -40,7 +40,7 @@ static  void rtree_PrintWKB(uchar *wkb, uint n_dims);
 static char blob_key[MAX_REC_LENGTH];
 
 
-int main(int argc  __attribute__((unused)),char *argv[])
+int main(int argc  MY_ATTRIBUTE((unused)),char *argv[])
 {
   MY_INIT(argv[0]);
   exit(run_test("sp_test"));
@@ -487,7 +487,7 @@ static void rtree_PrintWKB(uchar *wkb, uint n_dims)
 }
 
 #else
-int main(int argc __attribute__((unused)),char *argv[] __attribute__((unused)))
+int main(int argc MY_ATTRIBUTE((unused)),char *argv[] MY_ATTRIBUTE((unused)))
 {
   exit(0);
 }
index 354f232930627c2ea5fb1e78609b6817e1084c97..4bb33b8c773bc7c19977cbea132ba145994aa3c2 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 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
@@ -347,7 +347,7 @@ CPP_UNNAMED_NS_END
   and adds a child list of TABLE_LIST to the parent handler.
 */
 
-int ha_myisammrg::open(const char *name, int mode __attribute__((unused)),
+int ha_myisammrg::open(const char *name, int mode MY_ATTRIBUTE((unused)),
                        uint test_if_locked_arg)
 {
   DBUG_ENTER("ha_myisammrg::open");
@@ -1183,8 +1183,8 @@ int ha_myisammrg::index_last(uchar * buf)
 }
 
 int ha_myisammrg::index_next_same(uchar * buf,
-                                  const uchar *key __attribute__((unused)),
-                                  uint length __attribute__((unused)))
+                                  const uchar *key MY_ATTRIBUTE((unused)),
+                                  uint length MY_ATTRIBUTE((unused)))
 {
   int error;
   DBUG_ASSERT(this->file->children_attached);
index bd930915ad5be1fe5573ce9a44645fcf491cda29..02a852380fd1f8ff92308c21f2d1381334d4240e 100644 (file)
@@ -1,5 +1,5 @@
 /*
-   Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
+   Copyright (c) 2004, 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
@@ -251,19 +251,19 @@ extern "C" {
 #endif
 
 /**
- *  __attribute__((noreturn)) was introduce in gcc 2.5
+ *  MY_ATTRIBUTE((noreturn)) was introduce in gcc 2.5
  */
 #if (GCC_VERSION >= 2005)
-#define ATTRIBUTE_NORETURN __attribute__((noreturn))
+#define ATTRIBUTE_NORETURN MY_ATTRIBUTE((noreturn))
 #else
 #define ATTRIBUTE_NORETURN
 #endif
 
 /**
- *  __attribute__((noinline)) was introduce in gcc 3.1
+ *  MY_ATTRIBUTE((noinline)) was introduce in gcc 3.1
  */
 #if (GCC_VERSION >= 3001)
-#define ATTRIBUTE_NOINLINE __attribute__((noinline))
+#define ATTRIBUTE_NOINLINE MY_ATTRIBUTE((noinline))
 #else
 #define ATTRIBUTE_NOINLINE
 #endif
index 060e97fc9a71d02e7cea584c7ff5d6de828306c6..f443f1e6be0e462fb6bcaf5c4c1e11f819706e2f 100644 (file)
@@ -1,5 +1,5 @@
 /*
-   Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
+   Copyright (c) 2004, 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
@@ -123,7 +123,7 @@ void ndb_opt_set_usage_funcs(void (*short_usage)(void),
                              void (*usage)(void));
 my_bool
 ndb_std_get_one_option(int optid,
-                      const struct my_option *opt __attribute__((unused)),
+                      const struct my_option *opt MY_ATTRIBUTE((unused)),
                        char *argument);
 
 void ndb_usage(void (*usagefunc)(void), const char *load_default_groups[],
index 37276a92be41d592e752265d14d4bea1dd61a47f..eaf5fc03444705ef61e80eb4b998b27b386a1ec6 100644 (file)
@@ -1,5 +1,5 @@
 /*
-   Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
+   Copyright (c) 2008, 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
@@ -82,8 +82,8 @@ void ndb_usage(void (*usagefunc)(void), const char *load_default_groups[],
 
 my_bool
 ndb_std_get_one_option(int optid,
-                       const struct my_option *opt __attribute__((unused)),
-                       char *argument __attribute__((unused)))
+                       const struct my_option *opt MY_ATTRIBUTE((unused)),
+                       char *argument MY_ATTRIBUTE((unused)))
 {
   switch (optid) {
 #ifndef DBUG_OFF
index 0c253fbe110dec1027a976118da8a96e52652a1e..777ffcbe1131257d6882fc6375b8e4b028629525 100644 (file)
@@ -1,5 +1,5 @@
 /*
-   Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+   Copyright (c) 2003, 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
@@ -63,7 +63,7 @@ static struct my_option my_long_options[] =
 };
 
 static my_bool
-get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
+get_one_option(int optid, const struct my_option *opt MY_ATTRIBUTE((unused)),
               char *argument)
 {
   return 0;
index a464fadc6a607a794a5e7d954141cfe25b2217c1..02f8369573c0d9efd2ef48c9172794213588085b 100644 (file)
@@ -1,5 +1,5 @@
 /*
-   Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+   Copyright (c) 2003, 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
@@ -415,7 +415,7 @@ static void usage()
 }
 
 static my_bool
-get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
+get_one_option(int optid, const struct my_option *opt MY_ATTRIBUTE((unused)),
               char *argument)
 {
 #ifndef DBUG_OFF
index cf0fa82ba3f86b87d31d63f531ca009a2cf37f7f..3bbc0a4602e8545535a66bf6428b44cd6f18facd 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2008, 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
@@ -2560,10 +2560,7 @@ start_table_io_wait_v1(PSI_table_locker_state *state,
   if (! pfs_table->m_io_enabled)
     return NULL;
 
-  PFS_thread *pfs_thread= pfs_table->m_thread_owner;
-
-  DBUG_ASSERT(pfs_thread ==
-              my_pthread_getspecific_ptr(PFS_thread*, THR_PFS));
+  PFS_thread *pfs_thread= my_pthread_getspecific_ptr(PFS_thread*, THR_PFS);
 
   register uint flags;
   ulonglong timer_start= 0;
@@ -2666,7 +2663,7 @@ start_table_lock_wait_v1(PSI_table_locker_state *state,
   if (! pfs_table->m_lock_enabled)
     return NULL;
 
-  PFS_thread *pfs_thread= pfs_table->m_thread_owner;
+  PFS_thread *pfs_thread= my_pthread_getspecific_ptr(PFS_thread*, THR_PFS);
 
   PFS_TL_LOCK_TYPE lock_type;
 
@@ -3068,7 +3065,12 @@ start_socket_wait_v1(PSI_socket_locker_state *state,
 
   if (flag_thread_instrumentation)
   {
-    PFS_thread *pfs_thread= pfs_socket->m_thread_owner;
+    /*
+       Do not use pfs_socket->m_thread_owner here,
+       as different threads may use concurrently the same socket,
+       for example during a KILL.
+    */
+    PFS_thread *pfs_thread= my_pthread_getspecific_ptr(PFS_thread*, THR_PFS);
 
     if (unlikely(pfs_thread == NULL))
       return NULL;
@@ -3436,6 +3438,8 @@ static void end_idle_wait_v1(PSI_idle_locker* locker)
       if (flag_events_waits_history_long)
         insert_events_waits_history_long(wait);
       thread->m_events_waits_current--;
+
+      DBUG_ASSERT(wait == thread->m_events_waits_current);
     }
   }
 
@@ -3517,6 +3521,8 @@ static void end_mutex_wait_v1(PSI_mutex_locker* locker, int rc)
       if (flag_events_waits_history_long)
         insert_events_waits_history_long(wait);
       thread->m_events_waits_current--;
+
+      DBUG_ASSERT(wait == thread->m_events_waits_current);
     }
   }
 }
@@ -3596,6 +3602,8 @@ static void end_rwlock_rdwait_v1(PSI_rwlock_locker* locker, int rc)
       if (flag_events_waits_history_long)
         insert_events_waits_history_long(wait);
       thread->m_events_waits_current--;
+
+      DBUG_ASSERT(wait == thread->m_events_waits_current);
     }
   }
 }
@@ -3668,6 +3676,8 @@ static void end_rwlock_wrwait_v1(PSI_rwlock_locker* locker, int rc)
       if (flag_events_waits_history_long)
         insert_events_waits_history_long(wait);
       thread->m_events_waits_current--;
+
+      DBUG_ASSERT(wait == thread->m_events_waits_current);
     }
   }
 }
@@ -3732,6 +3742,8 @@ static void end_cond_wait_v1(PSI_cond_locker* locker, int rc)
       if (flag_events_waits_history_long)
         insert_events_waits_history_long(wait);
       thread->m_events_waits_current--;
+
+      DBUG_ASSERT(wait == thread->m_events_waits_current);
     }
   }
 }
@@ -3826,6 +3838,8 @@ static void end_table_io_wait_v1(PSI_table_locker* locker)
       if (flag_events_waits_history_long)
         insert_events_waits_history_long(wait);
       thread->m_events_waits_current--;
+
+      DBUG_ASSERT(wait == thread->m_events_waits_current);
     }
   }
 
@@ -3895,6 +3909,8 @@ static void end_table_lock_wait_v1(PSI_table_locker* locker)
       if (flag_events_waits_history_long)
         insert_events_waits_history_long(wait);
       thread->m_events_waits_current--;
+
+      DBUG_ASSERT(wait == thread->m_events_waits_current);
     }
   }
 
@@ -4143,6 +4159,8 @@ static void end_file_wait_v1(PSI_file_locker *locker,
       if (flag_events_waits_history_long)
         insert_events_waits_history_long(wait);
       thread->m_events_waits_current--;
+
+      DBUG_ASSERT(wait == thread->m_events_waits_current);
     }
   }
 }
@@ -5070,6 +5088,8 @@ static void end_socket_wait_v1(PSI_socket_locker *locker, size_t byte_count)
     if (flag_events_waits_history_long)
       insert_events_waits_history_long(wait);
     thread->m_events_waits_current--;
+
+    DBUG_ASSERT(wait == thread->m_events_waits_current);
   }
 }
 
index 1053bd59571c2053e06b2f6d8cc62c84a9c07517..5886c379b2f491cfba5fa14d75745e645d96cc78 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2008, 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
@@ -45,7 +45,7 @@ bool flag_statements_digest= true;
   Current index in Stat array where new record is to be inserted.
   index 0 is reserved for "all else" case when entire array is full.
 */
-volatile uint32 digest_index;
+volatile uint32 PFS_ALIGNED digest_monotonic_index;
 bool digest_full= false;
 
 LF_HASH digest_hash;
@@ -63,7 +63,7 @@ int init_digest(const PFS_global_param *param)
   */
   digest_max= param->m_digest_sizing;
   digest_lost= 0;
-  digest_index= 1;
+  PFS_atomic::store_u32(& digest_monotonic_index, 1);
   digest_full= false;
 
   if (digest_max == 0)
@@ -105,6 +105,9 @@ int init_digest(const PFS_global_param *param)
                                                    + index * pfs_max_digest_length, pfs_max_digest_length);
   }
 
+  /* Set record[0] as allocated. */
+  statements_digest_stat_array[0].m_lock.set_allocated();
+
   return 0;
 }
 
@@ -207,9 +210,10 @@ find_or_create_digest(PFS_thread *thread,
     memcpy(hash_key.m_schema_name, schema_name, schema_name_length);
 
   int res;
-  ulong safe_index;
   uint retry_count= 0;
   const uint retry_max= 3;
+  size_t safe_index;
+  size_t attempts= 0;
   PFS_statements_digest_stat **entry;
   PFS_statements_digest_stat *pfs= NULL;
 
@@ -245,55 +249,70 @@ search:
     return & pfs->m_stat;
   }
 
-  safe_index= PFS_atomic::add_u32(& digest_index, 1);
-  if (safe_index >= digest_max)
+  while (++attempts <= digest_max)
   {
-    /* The digest array is now full. */
-    digest_full= true;
-    pfs= &statements_digest_stat_array[0];
-
-    if (pfs->m_first_seen == 0)
-      pfs->m_first_seen= now;
-    pfs->m_last_seen= now;
-    return & pfs->m_stat;
-  }
-
-  /* Add a new record in digest stat array. */
-  pfs= &statements_digest_stat_array[safe_index];
-
-  /* Copy digest hash/LF Hash search key. */
-  memcpy(& pfs->m_digest_key, &hash_key, sizeof(PFS_digest_key));
-
-  /*
-    Copy digest storage to statement_digest_stat_array so that it could be
-    used later to generate digest text.
-  */
-  pfs->m_digest_storage.copy(digest_storage);
-
-  pfs->m_first_seen= now;
-  pfs->m_last_seen= now;
+    safe_index= PFS_atomic::add_u32(& digest_monotonic_index, 1) % digest_max;
+    if (safe_index == 0)
+    {
+      /* Record [0] is reserved. */
+      safe_index= 1;
+    }
 
-  res= lf_hash_insert(&digest_hash, pins, &pfs);
-  if (likely(res == 0))
-  {
-    return & pfs->m_stat;
-  }
+    /* Add a new record in digest stat array. */
+    pfs= &statements_digest_stat_array[safe_index];
 
-  if (res > 0)
-  {
-    /* Duplicate insert by another thread */
-    if (++retry_count > retry_max)
+    if (pfs->m_lock.is_free())
     {
-      /* Avoid infinite loops */
-      digest_lost++;
-      return NULL;
+      if (pfs->m_lock.free_to_dirty())
+      {
+        /* Copy digest hash/LF Hash search key. */
+        memcpy(& pfs->m_digest_key, &hash_key, sizeof(PFS_digest_key));
+
+        /*
+          Copy digest storage to statement_digest_stat_array so that it could be
+          used later to generate digest text.
+        */
+        pfs->m_digest_storage.copy(digest_storage);
+
+        pfs->m_first_seen= now;
+        pfs->m_last_seen= now;
+
+        res= lf_hash_insert(&digest_hash, pins, &pfs);
+        if (likely(res == 0))
+        {
+          pfs->m_lock.dirty_to_allocated();
+          return & pfs->m_stat;
+        }
+
+        pfs->m_lock.dirty_to_free();
+
+        if (res > 0)
+        {
+          /* Duplicate insert by another thread */
+          if (++retry_count > retry_max)
+          {
+            /* Avoid infinite loops */
+            digest_lost++;
+            return NULL;
+          }
+          goto search;
+        }
+
+        /* OOM in lf_hash_insert */
+        digest_lost++;
+        return NULL;
+      }
     }
-    goto search;
   }
 
-  /* OOM in lf_hash_insert */
-  digest_lost++;
-  return NULL;
+  /* The digest array is now full. */
+  digest_full= true;
+  pfs= &statements_digest_stat_array[0];
+
+  if (pfs->m_first_seen == 0)
+    pfs->m_first_seen= now;
+  pfs->m_last_seen= now;
+  return & pfs->m_stat;
 }
 
 void purge_digest(PFS_thread* thread, PFS_digest_key *hash_key)
@@ -320,10 +339,12 @@ void purge_digest(PFS_thread* thread, PFS_digest_key *hash_key)
 
 void PFS_statements_digest_stat::reset_data(unsigned char *token_array, uint length)
 {
+  m_lock.set_dirty();
   m_digest_storage.reset(token_array, length);
   m_stat.reset();
   m_first_seen= 0;
   m_last_seen= 0;
+  m_lock.dirty_to_free();
 }
 
 void PFS_statements_digest_stat::reset_index(PFS_thread *thread)
@@ -351,11 +372,14 @@ void reset_esms_by_digest()
     statements_digest_stat_array[index].reset_data(statements_digest_token_array + index * pfs_max_digest_length, pfs_max_digest_length);
   }
 
+  /* Mark record[0] as allocated again. */
+  statements_digest_stat_array[0].m_lock.set_allocated();
+
   /*
     Reset index which indicates where the next calculated digest information
     to be inserted in statements_digest_stat_array.
   */
-  digest_index= 1;
+  PFS_atomic::store_u32(& digest_monotonic_index, 1);
   digest_full= false;
 }
 
index 76d6c33d984fbbbbba816f518198835389ceffa0..429a9f4250a5b3075bc76934a9686832f79d29af 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2011, 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
@@ -44,6 +44,9 @@ struct PFS_digest_key
 /** A statement digest stat record. */
 struct PFS_ALIGNED PFS_statements_digest_stat
 {
+  /** Internal lock. */
+  pfs_lock m_lock;
+
   /** Digest Schema + MD5 Hash. */
   PFS_digest_key m_digest_key;
 
index c429d9347029cdbb2042b95629747231da7e9cc8..339a893c83370706dff39effd1223282ef771bdf 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2009, 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
@@ -155,6 +155,18 @@ struct pfs_lock
     PFS_atomic::store_u32(&m_version_state, new_val);
   }
 
+  /**
+    Initialize a lock to dirty.
+  */
+  void set_dirty(void)
+  {
+    /* Do not set the version to 0, read the previous value. */
+    uint32 copy= PFS_atomic::load_u32(&m_version_state);
+    /* Increment the version, set the DIRTY state */
+    uint32 new_val= (copy & VERSION_MASK) + VERSION_INC + PFS_LOCK_DIRTY;
+    PFS_atomic::store_u32(&m_version_state, new_val);
+  }
+
   /**
     Execute a dirty to free transition.
     This transition should be executed by the writer that owns the record.
index 99e24316cbb9d794bba3ebeb85ddd842e2a8ac23..002a7f0104b2d16297a8d2de401ed1c42d2f170d 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2010, 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
@@ -238,11 +238,14 @@ int table_esms_by_digest::rnd_next(void)
        m_pos.next())
   {
     digest_stat= &statements_digest_stat_array[m_pos.m_index];
-    if (digest_stat->m_first_seen != 0)
+    if (digest_stat->m_lock.is_populated())
     {
-      make_row(digest_stat);
-      m_next_pos.set_after(&m_pos);
-      return 0;
+      if (digest_stat->m_first_seen != 0)
+      {
+        make_row(digest_stat);
+        m_next_pos.set_after(&m_pos);
+        return 0;
+      }
     }
   }
 
@@ -260,10 +263,13 @@ table_esms_by_digest::rnd_pos(const void *pos)
   set_position(pos);
   digest_stat= &statements_digest_stat_array[m_pos.m_index];
 
-  if (digest_stat->m_first_seen != 0)
+  if (digest_stat->m_lock.is_populated())
   {
-    make_row(digest_stat);
-    return 0;
+    if (digest_stat->m_first_seen != 0)
+    {
+      make_row(digest_stat);
+      return 0;
+    }
   }
 
   return HA_ERR_RECORD_DELETED;
index 6931584895fb034d4587e145649884d00303614d..233994dc9c171c5a87fab1ee7b6d0b489088656f 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2010, 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
@@ -340,11 +340,17 @@ void table_events_statements_common::make_row_part_1(PFS_events_statements *stat
   CHARSET_INFO *cs= get_charset(statement->m_sqltext_cs_number, MYF(0));
   size_t valid_length= statement->m_sqltext_length;
 
-  if (cs->mbmaxlen > 1)
+  if (cs != NULL)
   {
-    int well_formed_error;
-    valid_length= cs->cset->well_formed_len(cs, statement->m_sqltext, statement->m_sqltext + valid_length,
-                                            valid_length, &well_formed_error);
+    if (cs->mbmaxlen > 1)
+    {
+      int well_formed_error;
+      valid_length= cs->cset->well_formed_len(cs,
+                                              statement->m_sqltext,
+                                              statement->m_sqltext + valid_length,
+                                              valid_length,
+                                              &well_formed_error);
+    }
   }
 
   m_row.m_sqltext.set_charset(cs);
index 102febcac59590459d1ec1dd58f98b46c3ae95ae..25b1ff22481ca0a3bc65c46820d4b80d8013883e 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 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
@@ -145,8 +145,8 @@ static int add_collation(CHARSET_INFO *cs)
 
 
 static void
-default_reporter(enum loglevel level  __attribute__ ((unused)),
-                 const char *format  __attribute__ ((unused)),
+default_reporter(enum loglevel level  MY_ATTRIBUTE ((unused)),
+                 const char *format  MY_ATTRIBUTE ((unused)),
                  ...)
 {
 }
@@ -271,7 +271,7 @@ static void
 fprint_copyright(FILE *file)
 {
   fprintf(file,
-"/* Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.\n"
+"/* Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.\n"
 "\n"
 "   This program is free software; you can redistribute it and/or modify\n"
 "   it under the terms of the GNU General Public License as published by\n"
@@ -290,7 +290,7 @@ fprint_copyright(FILE *file)
 
 
 int
-main(int argc, char **argv  __attribute__((unused)))
+main(int argc, char **argv  MY_ATTRIBUTE((unused)))
 {
   CHARSET_INFO  ncs;
   CHARSET_INFO  *cs;
index e2206d11b60eba988e86ce0c83d70dfe0fcb4681..8838aa7e4f4d5975fadec5228057aeb9b01f60a7 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 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
@@ -872,7 +872,7 @@ static int my_strnncoll_big5_internal(const uchar **a_res,
 
 /* Compare strings */
 
-static int my_strnncoll_big5(const CHARSET_INFO *cs __attribute__((unused)), 
+static int my_strnncoll_big5(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), 
                             const uchar *a, size_t a_length,
                              const uchar *b, size_t b_length,
                              my_bool b_is_prefix)
@@ -885,7 +885,7 @@ static int my_strnncoll_big5(const CHARSET_INFO *cs __attribute__((unused)),
 
 /* compare strings, ignore end space */
 
-static int my_strnncollsp_big5(const CHARSET_INFO* cs __attribute__((unused)),
+static int my_strnncollsp_big5(const CHARSET_INFO* cs MY_ATTRIBUTE((unused)),
                               const uchar *a, size_t a_length, 
                               const uchar *b, size_t b_length,
                                my_bool diff_if_only_endspace_difference)
@@ -957,14 +957,14 @@ my_strnxfrm_big5(const CHARSET_INFO *cs,
 }
 
 
-static uint ismbchar_big5(const CHARSET_INFO *cs __attribute__((unused)),
+static uint ismbchar_big5(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
                          const char* p, const char *e)
 {
   return (isbig5head(*(p)) && (e)-(p)>1 && isbig5tail(*((p)+1))? 2: 0);
 }
 
 
-static uint mbcharlen_big5(const CHARSET_INFO *cs __attribute__((unused)),
+static uint mbcharlen_big5(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
                            uint c)
 {
   return (isbig5head(c)? 2 : 1);
@@ -6742,7 +6742,7 @@ static int func_uni_big5_onechar(int code){
 
 
 static int
-my_wc_mb_big5(const CHARSET_INFO *cs __attribute__((unused)),
+my_wc_mb_big5(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
              my_wc_t wc, uchar *s, uchar *e)
 {
 
@@ -6771,7 +6771,7 @@ my_wc_mb_big5(const CHARSET_INFO *cs __attribute__((unused)),
 
 
 static int 
-my_mb_wc_big5(const CHARSET_INFO *cs __attribute__((unused)),
+my_mb_wc_big5(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
              my_wc_t *pwc,const uchar *s,const uchar *e)
 {
 
@@ -6801,7 +6801,7 @@ my_mb_wc_big5(const CHARSET_INFO *cs __attribute__((unused)),
   CP950 and HKSCS additional characters are also accepted.
 */
 static
-size_t my_well_formed_len_big5(const CHARSET_INFO *cs __attribute__((unused)),
+size_t my_well_formed_len_big5(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
                                const char *b, const char *e,
                                size_t pos, int *error)
 {
index dd681ed5139f5346e02bbf7db3a30b32e92d6adf..cea6db2f0a02702d491d5ae49b17a9c59e4b1cf7 100644 (file)
@@ -1,5 +1,5 @@
 /* Copyright (c) 2002 MySQL AB & tommy@valley.ne.jp
-   Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
+   Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved.
    
    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Library General Public
@@ -69,13 +69,13 @@ static uchar bin_char_array[] =
 
 static my_bool 
 my_coll_init_8bit_bin(CHARSET_INFO *cs,
-                      MY_CHARSET_LOADER *loader __attribute__((unused)))
+                      MY_CHARSET_LOADER *loader MY_ATTRIBUTE((unused)))
 {
   cs->max_sort_char=255; 
   return FALSE;
 }
 
-static int my_strnncoll_binary(const CHARSET_INFO *cs __attribute__((unused)),
+static int my_strnncoll_binary(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
                                const uchar *s, size_t slen,
                                const uchar *t, size_t tlen,
                                my_bool t_is_prefix)
@@ -86,8 +86,8 @@ static int my_strnncoll_binary(const CHARSET_INFO *cs __attribute__((unused)),
 }
 
 
-size_t my_lengthsp_binary(const CHARSET_INFO *cs __attribute__((unused)),
-                          const char *ptr __attribute__((unused)),
+size_t my_lengthsp_binary(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
+                          const char *ptr MY_ATTRIBUTE((unused)),
                           size_t length)
 {
   return length;
@@ -117,18 +117,18 @@ size_t my_lengthsp_binary(const CHARSET_INFO *cs __attribute__((unused)),
 */
 
 static int my_strnncollsp_binary(const CHARSET_INFO *cs
-                                 __attribute__((unused)),
+                                 MY_ATTRIBUTE((unused)),
                                  const uchar *s, size_t slen,
                                  const uchar *t, size_t tlen,
                                  my_bool diff_if_only_endspace_difference
-                                 __attribute__((unused)))
+                                 MY_ATTRIBUTE((unused)))
 {
   return my_strnncoll_binary(cs,s,slen,t,tlen,0);
 }
 
 
 static int my_strnncoll_8bit_bin(const CHARSET_INFO *cs
-                                 __attribute__((unused)),
+                                 MY_ATTRIBUTE((unused)),
                                  const uchar *s, size_t slen,
                                  const uchar *t, size_t tlen,
                                  my_bool t_is_prefix)
@@ -165,7 +165,7 @@ static int my_strnncoll_8bit_bin(const CHARSET_INFO *cs
 */
 
 static int my_strnncollsp_8bit_bin(const CHARSET_INFO *cs
-                                   __attribute__((unused)),
+                                   MY_ATTRIBUTE((unused)),
                                    const uchar *a, size_t a_length, 
                                    const uchar *b, size_t b_length,
                                    my_bool diff_if_only_endspace_difference)
@@ -214,41 +214,41 @@ static int my_strnncollsp_8bit_bin(const CHARSET_INFO *cs
 
 /* This function is used for all conversion functions */
 
-static size_t my_case_str_bin(const CHARSET_INFO *cs __attribute__((unused)),
-                              char *str __attribute__((unused)))
+static size_t my_case_str_bin(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
+                              char *str MY_ATTRIBUTE((unused)))
 {
   return 0;
 }
 
 
-static size_t my_case_bin(const CHARSET_INFO *cs __attribute__((unused)),
-                          char *src __attribute__((unused)),
+static size_t my_case_bin(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
+                          char *src MY_ATTRIBUTE((unused)),
                           size_t srclen,
-                          char *dst __attribute__((unused)),
-                          size_t dstlen __attribute__((unused)))
+                          char *dst MY_ATTRIBUTE((unused)),
+                          size_t dstlen MY_ATTRIBUTE((unused)))
 {
   return srclen;
 }
 
 
-static int my_strcasecmp_bin(const CHARSET_INFO *cs __attribute__((unused)),
+static int my_strcasecmp_bin(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
                             const char *s, const char *t)
 {
   return strcmp(s,t);
 }
 
 
-uint my_mbcharlen_8bit(const CHARSET_INFO *cs __attribute__((unused)),
-                      uint c __attribute__((unused)))
+uint my_mbcharlen_8bit(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
+                      uint c MY_ATTRIBUTE((unused)))
 {
   return 1;
 }
 
 
-static int my_mb_wc_bin(const CHARSET_INFO *cs __attribute__((unused)),
+static int my_mb_wc_bin(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
                        my_wc_t *wc,
                        const uchar *str,
-                       const uchar *end __attribute__((unused)))
+                       const uchar *end MY_ATTRIBUTE((unused)))
 {
   if (str >= end)
     return MY_CS_TOOSMALL;
@@ -258,10 +258,10 @@ static int my_mb_wc_bin(const CHARSET_INFO *cs __attribute__((unused)),
 }
 
 
-static int my_wc_mb_bin(const CHARSET_INFO *cs __attribute__((unused)),
+static int my_wc_mb_bin(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
                        my_wc_t wc,
                        uchar *s,
-                       uchar *e __attribute__((unused)))
+                       uchar *e MY_ATTRIBUTE((unused)))
 {
   if (s >= e)
     return MY_CS_TOOSMALL;
@@ -275,7 +275,7 @@ static int my_wc_mb_bin(const CHARSET_INFO *cs __attribute__((unused)),
 }
 
 
-void my_hash_sort_8bit_bin(const CHARSET_INFO *cs __attribute__((unused)),
+void my_hash_sort_8bit_bin(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
                            const uchar *key, size_t len,
                            ulong *nr1, ulong *nr2)
 {
@@ -296,7 +296,7 @@ void my_hash_sort_8bit_bin(const CHARSET_INFO *cs __attribute__((unused)),
 }
 
 
-void my_hash_sort_bin(const CHARSET_INFO *cs __attribute__((unused)),
+void my_hash_sort_bin(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
                      const uchar *key, size_t len,ulong *nr1, ulong *nr2)
 {
   const uchar *pos = key;
@@ -428,7 +428,7 @@ my_strnxfrm_8bit_bin(const CHARSET_INFO *cs,
 
 
 static
-uint my_instr_bin(const CHARSET_INFO *cs __attribute__((unused)),
+uint my_instr_bin(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
                  const char *b, size_t b_length,
                  const char *s, size_t s_length,
                  my_match_t *match, uint nmatch)
index a366fbb6d90b1e20ed448591f0b457ab42dfb448..4909d2059ee4f7e31554c259ff36d9819f1c4ac9 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2005, 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
@@ -182,13 +182,13 @@ static uchar sort_order_cp932[]=
                        (0x80<=(c) && (c)<=0xfc))
 
 
-static uint ismbchar_cp932(const CHARSET_INFO *cs __attribute__((unused)),
+static uint ismbchar_cp932(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
                         const char* p, const char *e)
 {
   return (iscp932head((uchar) *p) && (e-p)>1 && iscp932tail((uchar)p[1]) ? 2: 0);
 }
 
-static uint mbcharlen_cp932(const CHARSET_INFO *cs __attribute__((unused)),
+static uint mbcharlen_cp932(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
                             uint c)
 {
   return (iscp932head((uchar) c) ? 2 : 1);
@@ -1742,7 +1742,7 @@ static int my_strnncoll_cp932_internal(const CHARSET_INFO *cs,
 }
 
 
-static int my_strnncoll_cp932(const CHARSET_INFO *cs __attribute__((unused)),
+static int my_strnncoll_cp932(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
                              const uchar *a, size_t a_length, 
                              const uchar *b, size_t b_length,
                               my_bool b_is_prefix)
@@ -1755,11 +1755,11 @@ static int my_strnncoll_cp932(const CHARSET_INFO *cs __attribute__((unused)),
 
 
 static int my_strnncollsp_cp932(const CHARSET_INFO *cs
-                                __attribute__((unused)),
+                                MY_ATTRIBUTE((unused)),
                                 const uchar *a, size_t a_length, 
                                 const uchar *b, size_t b_length,
                                 my_bool diff_if_only_endspace_difference
-                                __attribute__((unused)))
+                                MY_ATTRIBUTE((unused)))
 {
   const uchar *a_end= a + a_length;
   const uchar *b_end= b + b_length;
@@ -34601,7 +34601,7 @@ static uint16 unicode_to_cp932[65536]=
 */
 
 static int
-my_mb_wc_cp932(const CHARSET_INFO *cs  __attribute__((unused)),
+my_mb_wc_cp932(const CHARSET_INFO *cs  MY_ATTRIBUTE((unused)),
               my_wc_t *pwc, const uchar *s, const uchar *e){
   int hi;
 
@@ -34645,7 +34645,7 @@ my_mb_wc_cp932(const CHARSET_INFO *cs  __attribute__((unused)),
   @retval   MY_CS_ILUNI    If the Unicode character does not exist in CP932
 */
 static int
-my_wc_mb_cp932(const CHARSET_INFO *cs __attribute__((unused)),
+my_wc_mb_cp932(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
               my_wc_t wc, uchar *s, uchar *e)
 {
   int code;
@@ -34685,7 +34685,7 @@ my_wc_mb_cp932(const CHARSET_INFO *cs __attribute__((unused)),
 
 
 static
-size_t my_numcells_cp932(const CHARSET_INFO *cs __attribute__((unused)),
+size_t my_numcells_cp932(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
                       const char *str, const char *str_end)
 {
   size_t clen= 0;
@@ -34720,7 +34720,7 @@ size_t my_numcells_cp932(const CHARSET_INFO *cs __attribute__((unused)),
 
 static
 size_t my_well_formed_len_cp932(const CHARSET_INFO *cs
-                                __attribute__((unused)),
+                                MY_ATTRIBUTE((unused)),
                                 const char *b, const char *e,
                                 size_t pos, int *error)
 {
index ad5df8b056c438fc715f9fe9c8973fbff252b639..74b371fa8c873632b74a27be2a5a873070be1098 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 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
@@ -228,7 +228,7 @@ while (1)                                           \
   the length of the strings being specified
 */
 
-static int my_strnncoll_czech(const CHARSET_INFO *cs __attribute__((unused)),
+static int my_strnncoll_czech(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
                              const uchar *s1, size_t len1, 
                              const uchar *s2, size_t len2,
                               my_bool s2_is_prefix)
@@ -266,7 +266,7 @@ int my_strnncollsp_czech(const CHARSET_INFO *cs,
                          const uchar *s, size_t slen, 
                          const uchar *t, size_t tlen,
                          my_bool diff_if_only_endspace_difference
-                         __attribute__((unused)))
+                         MY_ATTRIBUTE((unused)))
 {
   for ( ; slen && s[slen-1] == ' ' ; slen--);
   for ( ; tlen && t[tlen-1] == ' ' ; tlen--);
@@ -279,7 +279,7 @@ int my_strnncollsp_czech(const CHARSET_INFO *cs,
 */
 static size_t
 my_strnxfrmlen_czech(const CHARSET_INFO *cs
-                     __attribute__((unused)), size_t len)
+                     MY_ATTRIBUTE((unused)), size_t len)
 {
   return len * 4 + 4;
 }
@@ -291,9 +291,9 @@ my_strnxfrmlen_czech(const CHARSET_INFO *cs
 */
 
 static size_t
-my_strnxfrm_czech(const CHARSET_INFO *cs __attribute__((unused)), 
+my_strnxfrm_czech(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), 
                   uchar *dest, size_t len,
-                  uint nweights_arg __attribute__((unused)),
+                  uint nweights_arg MY_ATTRIBUTE((unused)),
                   const uchar *src, size_t srclen, uint flags)
 {
   int value;
@@ -369,7 +369,7 @@ my_strnxfrm_czech(const CHARSET_INFO *cs __attribute__((unused)),
 
 
 static my_bool my_like_range_czech(const CHARSET_INFO *cs
-                                   __attribute__((unused)),
+                                   MY_ATTRIBUTE((unused)),
                                   const char *ptr,size_t ptr_length,
                                   pbool escape, pbool w_one, pbool w_many,
                                   size_t res_length, char *min_str,
index 1fa941c8925ed92ae5d957ffbf123144562ac0d4..a1ff2fe6ecb2d401335db8496d97a2225ec7e912 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 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
@@ -202,7 +202,7 @@ static uchar sort_order_euc_kr[]=
                               iseuc_kr_tail3(c))
 
 
-static uint ismbchar_euc_kr(const CHARSET_INFO *cs __attribute__((unused)),
+static uint ismbchar_euc_kr(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
                             const char* p, const char *e)
 {
   return ((*(uchar*)(p)<0x80)? 0:\
@@ -210,7 +210,7 @@ static uint ismbchar_euc_kr(const CHARSET_INFO *cs __attribute__((unused)),
           0);
 }
 
-static uint mbcharlen_euc_kr(const CHARSET_INFO *cs __attribute__((unused)),
+static uint mbcharlen_euc_kr(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
                              uint c)
 {
   return (iseuc_kr_head(c) ? 2 : 1);
@@ -9877,7 +9877,7 @@ static int func_uni_ksc5601_onechar(int code){
 
 
 static int
-my_wc_mb_euc_kr(const CHARSET_INFO *cs __attribute__((unused)),
+my_wc_mb_euc_kr(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
                 my_wc_t wc, uchar *s, uchar *e)
 {
   int code;
@@ -9905,7 +9905,7 @@ my_wc_mb_euc_kr(const CHARSET_INFO *cs __attribute__((unused)),
 
 
 static int 
-my_mb_wc_euc_kr(const CHARSET_INFO *cs __attribute__((unused)),
+my_mb_wc_euc_kr(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
                 my_wc_t *pwc, const uchar *s, const uchar *e)
 {
   
@@ -9934,7 +9934,7 @@ my_mb_wc_euc_kr(const CHARSET_INFO *cs __attribute__((unused)),
   Returns well formed length of a EUC-KR string.
 */
 static size_t
-my_well_formed_len_euckr(const CHARSET_INFO *cs __attribute__((unused)),
+my_well_formed_len_euckr(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
                          const char *b, const char *e,
                          size_t pos, int *error)
 {
index dc9cc5b2107035d94f7aea108101801d7f9f6533..a2009700f5a6f0c8540fa24cf90b9a7bf0ab5574 100644 (file)
@@ -1,5 +1,5 @@
 /* Copyright (c) 2002 MySQL AB & tommy@valley.ne.jp
-   Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
+   Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved.
    
    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Library General Public
@@ -185,7 +185,7 @@ static uchar sort_order_eucjpms[]=
 #define iseucjpms_ss3(c) (((c)&0xff) == 0x8f)
 
 
-static uint ismbchar_eucjpms(const CHARSET_INFO *cs __attribute__((unused)),
+static uint ismbchar_eucjpms(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
                  const char* p, const char *e)
 {
   return ((*(uchar*)(p)<0x80)? 0:\
@@ -195,7 +195,7 @@ static uint ismbchar_eucjpms(const CHARSET_INFO *cs __attribute__((unused)),
     0);
 }
 
-static uint mbcharlen_eucjpms(const CHARSET_INFO *cs __attribute__((unused)),
+static uint mbcharlen_eucjpms(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
                               uint c)
 {
   return (iseucjpms(c)? 2: iseucjpms_ss2(c)? 2: iseucjpms_ss3(c)? 3: 1);
@@ -67311,7 +67311,7 @@ static uint16 unicode_to_jisx0212_eucjpms[65536]=
   @retval   MY_CS_ILSEQ    If a wrong byte sequence was found
 */
 static int
-my_mb_wc_eucjpms(const CHARSET_INFO *cs __attribute__((unused)),
+my_mb_wc_eucjpms(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
                  my_wc_t *pwc, const uchar *s, const uchar *e)
 {
   int hi;
@@ -67371,7 +67371,7 @@ my_mb_wc_eucjpms(const CHARSET_INFO *cs __attribute__((unused)),
   @retval   MY_CS_ILUNI    If the Unicode character does not exist in EUCJPMS
 */
 static int
-my_wc_mb_eucjpms(const CHARSET_INFO *cs __attribute__((unused)),
+my_wc_mb_eucjpms(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
                  my_wc_t wc, uchar *s, uchar *e)
 {
   int jp;
@@ -67427,7 +67427,7 @@ my_wc_mb_eucjpms(const CHARSET_INFO *cs __attribute__((unused)),
 
 static
 size_t my_well_formed_len_eucjpms(const CHARSET_INFO *cs
-                                  __attribute__((unused)),
+                                  MY_ATTRIBUTE((unused)),
                                   const char *beg, const char *end, size_t pos,
                                   int *error)
 {
@@ -67475,7 +67475,7 @@ size_t my_well_formed_len_eucjpms(const CHARSET_INFO *cs
 
 
 static
-size_t my_numcells_eucjpms(const CHARSET_INFO *cs __attribute__((unused)),
+size_t my_numcells_eucjpms(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
                            const char *str, const char *str_end)
 {
   size_t clen;
index 173e078393f7d0b89b55e56f938459097b24081e..36bd5de656fc39b7cfd8afdd822e3868bef001ae 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 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
@@ -165,13 +165,13 @@ static uchar sort_order_gb2312[]=
 #define isgb2312tail(c) (0xa1<=(uchar)(c) && (uchar)(c)<=0xfe)
 
 
-static uint ismbchar_gb2312(const CHARSET_INFO *cs __attribute__((unused)),
+static uint ismbchar_gb2312(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
                    const char* p, const char *e)
 {
   return (isgb2312head(*(p)) && (e)-(p)>1 && isgb2312tail(*((p)+1))? 2: 0);
 }
 
-static uint mbcharlen_gb2312(const CHARSET_INFO *cs __attribute__((unused)),
+static uint mbcharlen_gb2312(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
                              uint c)
 {
   return (isgb2312head(c)? 2 : 1);
@@ -6282,7 +6282,7 @@ static int func_uni_gb2312_onechar(int code){
 
 
 static int
-my_wc_mb_gb2312(const CHARSET_INFO *cs  __attribute__((unused)),
+my_wc_mb_gb2312(const CHARSET_INFO *cs  MY_ATTRIBUTE((unused)),
                my_wc_t wc, uchar *s, uchar *e)
 {
   int code;
@@ -6310,7 +6310,7 @@ my_wc_mb_gb2312(const CHARSET_INFO *cs  __attribute__((unused)),
 
 
 static int 
-my_mb_wc_gb2312(const CHARSET_INFO *cs  __attribute__((unused)),
+my_mb_wc_gb2312(const CHARSET_INFO *cs  MY_ATTRIBUTE((unused)),
                my_wc_t *pwc, const uchar *s, const uchar *e){
   int hi;
   
@@ -6337,7 +6337,7 @@ my_mb_wc_gb2312(const CHARSET_INFO *cs  __attribute__((unused)),
   Returns well formed length of a EUC-KR string.
 */
 static size_t
-my_well_formed_len_gb2312(const CHARSET_INFO *cs __attribute__((unused)),
+my_well_formed_len_gb2312(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
                           const char *b, const char *e,
                           size_t pos, int *error)
 {
index 222154de0668ce8d70a9c93d152e85bc67b2de59..52c14c4935e16b0a7987e96404ae33aac5ed67ba 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 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
@@ -3475,7 +3475,7 @@ int my_strnncoll_gbk_internal(const uchar **a_res, const uchar **b_res,
 
 
 
-int my_strnncoll_gbk(const CHARSET_INFO *cs __attribute__((unused)),
+int my_strnncoll_gbk(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
                     const uchar *a, size_t a_length,
                      const uchar *b, size_t b_length,
                      my_bool b_is_prefix)
@@ -3486,7 +3486,7 @@ int my_strnncoll_gbk(const CHARSET_INFO *cs __attribute__((unused)),
 }
 
 
-static int my_strnncollsp_gbk(const CHARSET_INFO * cs __attribute__((unused)),
+static int my_strnncollsp_gbk(const CHARSET_INFO * cs MY_ATTRIBUTE((unused)),
                              const uchar *a, size_t a_length, 
                              const uchar *b, size_t b_length,
                               my_bool diff_if_only_endspace_difference)
@@ -3558,13 +3558,13 @@ my_strnxfrm_gbk(const CHARSET_INFO *cs,
 }
 
 
-static uint ismbchar_gbk(const CHARSET_INFO *cs __attribute__((unused)),
+static uint ismbchar_gbk(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
                 const char* p, const char *e)
 {
   return (isgbkhead(*(p)) && (e)-(p)>1 && isgbktail(*((p)+1))? 2: 0);
 }
 
-static uint mbcharlen_gbk(const CHARSET_INFO *cs __attribute__((unused)),
+static uint mbcharlen_gbk(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
                           uint c)
 {
   return (isgbkhead(c)? 2 : 1);
@@ -10675,7 +10675,7 @@ static int func_uni_gbk_onechar(int code){
 }
 
 static int
-my_wc_mb_gbk(const CHARSET_INFO *cs  __attribute__((unused)),
+my_wc_mb_gbk(const CHARSET_INFO *cs  MY_ATTRIBUTE((unused)),
              my_wc_t wc, uchar *s, uchar *e)
 {
   int code;
@@ -10701,7 +10701,7 @@ my_wc_mb_gbk(const CHARSET_INFO *cs  __attribute__((unused)),
 }
 
 static int
-my_mb_wc_gbk(const CHARSET_INFO *cs __attribute__((unused)),
+my_mb_wc_gbk(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
              my_wc_t *pwc, const uchar *s, const uchar *e)
 {
   int hi;
@@ -10732,7 +10732,7 @@ my_mb_wc_gbk(const CHARSET_INFO *cs __attribute__((unused)),
   Returns well formed length of a GBK string.
 */
 static
-size_t my_well_formed_len_gbk(const CHARSET_INFO *cs __attribute__((unused)),
+size_t my_well_formed_len_gbk(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
                               const char *b, const char *e,
                               size_t pos, int *error)
 {
index 2ba6ffb8082459104e01ad8e2eac69e136f2c984..d053fcf42a410484736c1fcc67b3fade3bc11e8f 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 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
@@ -356,10 +356,10 @@ NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL
 };
 
 static
-int my_mb_wc_latin1(const CHARSET_INFO *cs  __attribute__((unused)),
+int my_mb_wc_latin1(const CHARSET_INFO *cs  MY_ATTRIBUTE((unused)),
                    my_wc_t *wc,
                    const uchar *str,
-                   const uchar *end __attribute__((unused)))
+                   const uchar *end MY_ATTRIBUTE((unused)))
 {
   if (str >= end)
     return MY_CS_TOOSMALL;
@@ -369,10 +369,10 @@ int my_mb_wc_latin1(const CHARSET_INFO *cs  __attribute__((unused)),
 }
 
 static
-int my_wc_mb_latin1(const CHARSET_INFO *cs  __attribute__((unused)),
+int my_wc_mb_latin1(const CHARSET_INFO *cs  MY_ATTRIBUTE((unused)),
                    my_wc_t wc,
                    uchar *str,
-                   uchar *end __attribute__((unused)))
+                   uchar *end MY_ATTRIBUTE((unused)))
 {
   uchar *pl;
   
@@ -547,7 +547,7 @@ uchar combo2map[]={
 
 
 static int my_strnncoll_latin1_de(const CHARSET_INFO *cs
-                                  __attribute__((unused)),
+                                  MY_ATTRIBUTE((unused)),
                                  const uchar *a, size_t a_length,
                                  const uchar *b, size_t b_length,
                                   my_bool b_is_prefix)
@@ -589,7 +589,7 @@ static int my_strnncoll_latin1_de(const CHARSET_INFO *cs
 
 
 static int my_strnncollsp_latin1_de(const CHARSET_INFO *cs
-                                    __attribute__((unused)),
+                                    MY_ATTRIBUTE((unused)),
                                    const uchar *a, size_t a_length,
                                    const uchar *b, size_t b_length,
                                     my_bool diff_if_only_endspace_difference)
@@ -683,7 +683,7 @@ my_strnxfrm_latin1_de(const CHARSET_INFO *cs,
 }
 
 
-void my_hash_sort_latin1_de(const CHARSET_INFO *cs __attribute__((unused)),
+void my_hash_sort_latin1_de(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
                            const uchar *key, size_t len,
                            ulong *nr1, ulong *nr2)
 {
index afb180e4c6a64f5794dac2620754f42bb63f7afa..faac2c94335ce74e53b4dbfee6173c5ce3794d8f 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2002, 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
@@ -74,8 +74,8 @@ get_case_info_for_ch(const CHARSET_INFO *cs, uint page, uint offs)
   For character sets which don't change octet length in case conversion.
 */
 size_t my_caseup_mb(const CHARSET_INFO *cs, char *src, size_t srclen,
-                    char *dst __attribute__((unused)),
-                    size_t dstlen __attribute__((unused)))
+                    char *dst MY_ATTRIBUTE((unused)),
+                    size_t dstlen MY_ATTRIBUTE((unused)))
 {
   register uint32 l;
   register char *srcend= src + srclen;
@@ -109,8 +109,8 @@ size_t my_caseup_mb(const CHARSET_INFO *cs, char *src, size_t srclen,
 
 
 size_t my_casedn_mb(const CHARSET_INFO *cs, char *src, size_t srclen,
-                    char *dst __attribute__((unused)),
-                    size_t dstlen __attribute__((unused)))
+                    char *dst MY_ATTRIBUTE((unused)),
+                    size_t dstlen MY_ATTRIBUTE((unused)))
 {
   register uint32 l;
   register char *srcend= src + srclen;
@@ -155,7 +155,7 @@ size_t my_casedn_mb(const CHARSET_INFO *cs, char *src, size_t srclen,
 static size_t
 my_casefold_mb_varlen(const CHARSET_INFO *cs,
                       char *src, size_t srclen,
-                      char *dst, size_t dstlen __attribute__((unused)),
+                      char *dst, size_t dstlen MY_ATTRIBUTE((unused)),
                       uchar *map,
                       size_t is_upper)
 {
@@ -373,7 +373,7 @@ int my_wildcmp_mb(const CHARSET_INFO *cs,
 }
 
 
-size_t my_numchars_mb(const CHARSET_INFO *cs __attribute__((unused)),
+size_t my_numchars_mb(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
                      const char *pos, const char *end)
 {
   register size_t count= 0;
@@ -387,7 +387,7 @@ size_t my_numchars_mb(const CHARSET_INFO *cs __attribute__((unused)),
 }
 
 
-size_t my_charpos_mb(const CHARSET_INFO *cs __attribute__((unused)),
+size_t my_charpos_mb(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
                     const char *pos, const char *end, size_t length)
 {
   const char *start= pos;
@@ -482,7 +482,7 @@ uint my_instr_mb(const CHARSET_INFO *cs,
 /* BINARY collations handlers for MB charsets */
 
 int
-my_strnncoll_mb_bin(const CHARSET_INFO *cs __attribute__((unused)),
+my_strnncoll_mb_bin(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
                     const uchar *s, size_t slen,
                     const uchar *t, size_t tlen,
                     my_bool t_is_prefix)
@@ -519,7 +519,7 @@ my_strnncoll_mb_bin(const CHARSET_INFO *cs __attribute__((unused)),
 */
 
 int
-my_strnncollsp_mb_bin(const CHARSET_INFO *cs __attribute__((unused)),
+my_strnncollsp_mb_bin(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
                       const uchar *a, size_t a_length, 
                       const uchar *b, size_t b_length,
                       my_bool diff_if_only_endspace_difference)
@@ -670,7 +670,7 @@ pad:
 
 
 int
-my_strcasecmp_mb_bin(const CHARSET_INFO *cs __attribute__((unused)),
+my_strcasecmp_mb_bin(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
                      const char *s, const char *t)
 {
   return strcmp(s,t);
@@ -678,7 +678,7 @@ my_strcasecmp_mb_bin(const CHARSET_INFO *cs __attribute__((unused)),
 
 
 void
-my_hash_sort_mb_bin(const CHARSET_INFO *cs __attribute__((unused)),
+my_hash_sort_mb_bin(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
                     const uchar *key, size_t len,ulong *nr1, ulong *nr2)
 {
   const uchar *pos = key;
index ae1c99f457368892f62d7e0f469083a97dadf36d..5a5c363bbfbe313714fb6106ac6c4cb662fb9f96 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2002, 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
@@ -216,8 +216,8 @@ size_t my_casedn_str_8bit(const CHARSET_INFO *cs,char *str)
 
 
 size_t my_caseup_8bit(const CHARSET_INFO *cs, char *src, size_t srclen,
-                      char *dst __attribute__((unused)),
-                      size_t dstlen __attribute__((unused)))
+                      char *dst MY_ATTRIBUTE((unused)),
+                      size_t dstlen MY_ATTRIBUTE((unused)))
 {
   char *end= src + srclen;
   register uchar *map= cs->to_upper;
@@ -229,8 +229,8 @@ size_t my_caseup_8bit(const CHARSET_INFO *cs, char *src, size_t srclen,
 
 
 size_t my_casedn_8bit(const CHARSET_INFO *cs, char *src, size_t srclen,
-                      char *dst __attribute__((unused)),
-                      size_t dstlen __attribute__((unused)))
+                      char *dst MY_ATTRIBUTE((unused)),
+                      size_t dstlen MY_ATTRIBUTE((unused)))
 {
   char *end= src + srclen;
   register uchar *map=cs->to_lower;
@@ -251,7 +251,7 @@ int my_strcasecmp_8bit(const CHARSET_INFO *cs,const char *s, const char *t)
 
 int my_mb_wc_8bit(const CHARSET_INFO *cs,my_wc_t *wc,
                  const uchar *str,
-                 const uchar *end __attribute__((unused)))
+                 const uchar *end MY_ATTRIBUTE((unused)))
 {
   if (str >= end)
     return MY_CS_TOOSMALL;
@@ -288,8 +288,8 @@ int my_wc_mb_8bit(const CHARSET_INFO *cs,my_wc_t wc,
    end buffer must be checked.
 */
 
-size_t my_snprintf_8bit(const CHARSET_INFO *cs  __attribute__((unused)),
-                        char* to, size_t n  __attribute__((unused)),
+size_t my_snprintf_8bit(const CHARSET_INFO *cs  MY_ATTRIBUTE((unused)),
+                        char* to, size_t n  MY_ATTRIBUTE((unused)),
                     const char* fmt, ...)
 {
   va_list args;
@@ -506,7 +506,7 @@ noconv:
 }
 
 
-longlong my_strntoll_8bit(const CHARSET_INFO *cs __attribute__((unused)),
+longlong my_strntoll_8bit(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
                          const char *nptr, size_t l, int base,
                          char **endptr,int *err)
 {
@@ -714,7 +714,7 @@ noconv:
 */
 
 
-double my_strntod_8bit(const CHARSET_INFO *cs __attribute__((unused)),
+double my_strntod_8bit(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
                       char *str, size_t length,
                       char **end, int *err)
 {
@@ -731,7 +731,7 @@ double my_strntod_8bit(const CHARSET_INFO *cs __attribute__((unused)),
   Assume len >= 1
 */
 
-size_t my_long10_to_str_8bit(const CHARSET_INFO *cs __attribute__((unused)),
+size_t my_long10_to_str_8bit(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
                              char *dst, size_t len, int radix, long int val)
 {
   char buffer[66];
@@ -773,7 +773,7 @@ size_t my_long10_to_str_8bit(const CHARSET_INFO *cs __attribute__((unused)),
 
 
 size_t my_longlong10_to_str_8bit(const CHARSET_INFO *cs
-                                 __attribute__((unused)),
+                                 MY_ATTRIBUTE((unused)),
                                  char *dst, size_t len, int radix,
                                  longlong val)
 {
@@ -1030,37 +1030,37 @@ size_t my_scan_8bit(const CHARSET_INFO *cs, const char *str, const char *end,
 }
 
 
-void my_fill_8bit(const CHARSET_INFO *cs __attribute__((unused)),
+void my_fill_8bit(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
                   char *s, size_t l, int fill)
 {
   memset(s, fill, l);
 }
 
 
-size_t my_numchars_8bit(const CHARSET_INFO *cs __attribute__((unused)),
+size_t my_numchars_8bit(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
                      const char *b, const char *e)
 {
   return (size_t) (e - b);
 }
 
 
-size_t my_numcells_8bit(const CHARSET_INFO *cs __attribute__((unused)),
+size_t my_numcells_8bit(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
                         const char *b, const char *e)
 {
   return (size_t) (e - b);
 }
 
 
-size_t my_charpos_8bit(const CHARSET_INFO *cs __attribute__((unused)),
-                       const char *b  __attribute__((unused)),
-                       const char *e  __attribute__((unused)),
+size_t my_charpos_8bit(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
+                       const char *b  MY_ATTRIBUTE((unused)),
+                       const char *e  MY_ATTRIBUTE((unused)),
                        size_t pos)
 {
   return pos;
 }
 
 
-size_t my_well_formed_len_8bit(const CHARSET_INFO *cs __attribute__((unused)),
+size_t my_well_formed_len_8bit(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
                                const char *start, const char *end,
                                size_t nchars, int *error)
 {
@@ -1070,7 +1070,7 @@ size_t my_well_formed_len_8bit(const CHARSET_INFO *cs __attribute__((unused)),
 }
 
 
-size_t my_lengthsp_8bit(const CHARSET_INFO *cs __attribute__((unused)),
+size_t my_lengthsp_8bit(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
                         const char *ptr, size_t length)
 {
   const char *end;
@@ -1274,14 +1274,14 @@ static void set_max_sort_char(CHARSET_INFO *cs)
 
 static my_bool
 my_coll_init_simple(CHARSET_INFO *cs,
-                    MY_CHARSET_LOADER *loader __attribute__((unused)))
+                    MY_CHARSET_LOADER *loader MY_ATTRIBUTE((unused)))
 {
   set_max_sort_char(cs);
   return FALSE;
 }
 
 
-longlong my_strtoll10_8bit(const CHARSET_INFO *cs __attribute__((unused)),
+longlong my_strtoll10_8bit(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
                            const char *nptr, char **endptr, int *error)
 {
   return my_strtoll10(nptr, endptr, error);
@@ -1387,7 +1387,7 @@ static ulonglong d10[DIGITS_IN_ULONGLONG]=
 */
 
 ulonglong
-my_strntoull10rnd_8bit(const CHARSET_INFO *cs __attribute__((unused)),
+my_strntoull10rnd_8bit(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
                        const char *str, size_t length, int unsigned_flag,
                        char **endptr, int *error)
 {
@@ -1665,17 +1665,17 @@ ret_too_big:
 
 
 
-my_bool my_propagate_simple(const CHARSET_INFO *cs __attribute__((unused)),
-                            const uchar *str __attribute__((unused)),
-                            size_t length __attribute__((unused)))
+my_bool my_propagate_simple(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
+                            const uchar *str MY_ATTRIBUTE((unused)),
+                            size_t length MY_ATTRIBUTE((unused)))
 {
   return 1;
 }
 
 
-my_bool my_propagate_complex(const CHARSET_INFO *cs __attribute__((unused)),
-                             const uchar *str __attribute__((unused)),
-                             size_t length __attribute__((unused)))
+my_bool my_propagate_complex(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
+                             const uchar *str MY_ATTRIBUTE((unused)),
+                             size_t length MY_ATTRIBUTE((unused)))
 {
   return 0;
 }
index a2e57aa2f6d1e1e0b8b5f0c6610a1cfbf3486b60..bba397bb993e156f8a00710835262032116bb651 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 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
@@ -182,13 +182,13 @@ static uchar sort_order_sjis[]=
                        (0x80<=(c) && (c)<=0xfc))
 
 
-static uint ismbchar_sjis(const CHARSET_INFO *cs __attribute__((unused)),
+static uint ismbchar_sjis(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
                         const char* p, const char *e)
 {
   return (issjishead((uchar) *p) && (e-p)>1 && issjistail((uchar)p[1]) ? 2: 0);
 }
 
-static uint mbcharlen_sjis(const CHARSET_INFO *cs __attribute__((unused)),
+static uint mbcharlen_sjis(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
                            uint c)
 {
   return (issjishead((uchar) c) ? 2 : 1);
@@ -1112,7 +1112,7 @@ static int my_strnncoll_sjis_internal(const CHARSET_INFO *cs,
 }
 
 
-static int my_strnncoll_sjis(const CHARSET_INFO *cs __attribute__((unused)),
+static int my_strnncoll_sjis(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
                              const uchar *a, size_t a_length, 
                              const uchar *b, size_t b_length,
                              my_bool b_is_prefix)
@@ -1124,7 +1124,7 @@ static int my_strnncoll_sjis(const CHARSET_INFO *cs __attribute__((unused)),
 }
 
 
-static int my_strnncollsp_sjis(const CHARSET_INFO *cs __attribute__((unused)),
+static int my_strnncollsp_sjis(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
                               const uchar *a, size_t a_length, 
                               const uchar *b, size_t b_length,
                                my_bool diff_if_only_endspace_difference)
@@ -33968,7 +33968,7 @@ static uint16 unicode_to_sjis[65536]=
   @retval   MY_CS_ILSEQ    If a wrong byte sequence was found
 */
 static int
-my_mb_wc_sjis(const CHARSET_INFO *cs  __attribute__((unused)),
+my_mb_wc_sjis(const CHARSET_INFO *cs  MY_ATTRIBUTE((unused)),
              my_wc_t *pwc, const uchar *s, const uchar *e){
   int hi;
 
@@ -34012,7 +34012,7 @@ my_mb_wc_sjis(const CHARSET_INFO *cs  __attribute__((unused)),
   @retval   MY_CS_ILUNI    If the Unicode character does not exist in SJIS
 */
 static int
-my_wc_mb_sjis(const CHARSET_INFO *cs __attribute__((unused)),
+my_wc_mb_sjis(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
              my_wc_t wc, uchar *s, uchar *e)
 {
   int code;
@@ -34061,7 +34061,7 @@ mb:
 
 
 static
-size_t my_numcells_sjis(const CHARSET_INFO *cs __attribute__((unused)),
+size_t my_numcells_sjis(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
                       const char *str, const char *str_end)
 {
   size_t clen;
@@ -34094,7 +34094,7 @@ size_t my_numcells_sjis(const CHARSET_INFO *cs __attribute__((unused)),
   CP932 additional characters are also accepted.
 */
 static
-size_t my_well_formed_len_sjis(const CHARSET_INFO *cs __attribute__((unused)),
+size_t my_well_formed_len_sjis(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
                                const char *b, const char *e,
                                size_t pos, int *error)
 {
index dd575d3c6da38c639fda8070a03cf16ee51cd616..7c7eff9bb02c13f8fe4e125c222ef357a9f80e12 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 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
@@ -526,7 +526,7 @@ static size_t thai2sortable(uchar *tstr, size_t len)
 */
 
 static
-int my_strnncoll_tis620(const CHARSET_INFO *cs __attribute__((unused)),
+int my_strnncoll_tis620(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
                         const uchar *s1, size_t len1, 
                         const uchar *s2, size_t len2,
                         my_bool s2_is_prefix)
@@ -556,7 +556,7 @@ int my_strnncoll_tis620(const CHARSET_INFO *cs __attribute__((unused)),
 
 
 static
-int my_strnncollsp_tis620(const CHARSET_INFO * cs __attribute__((unused)),
+int my_strnncollsp_tis620(const CHARSET_INFO * cs MY_ATTRIBUTE((unused)),
                          const uchar *a0, size_t a_length, 
                          const uchar *b0, size_t b_length,
                           my_bool diff_if_only_endspace_difference)
@@ -841,10 +841,10 @@ NULL,NULL,NULL,NULL,NULL,NULL,NULL,plFF
 
 
 static
-int my_mb_wc_tis620(const CHARSET_INFO *cs  __attribute__((unused)),
+int my_mb_wc_tis620(const CHARSET_INFO *cs  MY_ATTRIBUTE((unused)),
                  my_wc_t *wc,
                  const uchar *str,
-                 const uchar *end __attribute__((unused)))
+                 const uchar *end MY_ATTRIBUTE((unused)))
 {
   if (str >= end)
     return MY_CS_TOOSMALL;
@@ -854,10 +854,10 @@ int my_mb_wc_tis620(const CHARSET_INFO *cs  __attribute__((unused)),
 }
 
 static
-int my_wc_mb_tis620(const CHARSET_INFO *cs  __attribute__((unused)),
+int my_wc_mb_tis620(const CHARSET_INFO *cs  MY_ATTRIBUTE((unused)),
                  my_wc_t wc,
                  uchar *str,
-                 uchar *end __attribute__((unused)))
+                 uchar *end MY_ATTRIBUTE((unused)))
 {
   uchar *pl;
   
index 48709100357f0b837aa0969a0ab83f1caef2b0c3..e27ff74ce99f7957cf9facf5d55704ab9f03d254 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
    
    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Library General Public
@@ -64,8 +64,8 @@ my_bincmp(const uchar *s, const uchar *se,
 
 
 static size_t
-my_caseup_str_mb2_or_mb4(const CHARSET_INFO * cs  __attribute__((unused)), 
-                         char * s __attribute__((unused)))
+my_caseup_str_mb2_or_mb4(const CHARSET_INFO * cs  MY_ATTRIBUTE((unused)), 
+                         char * s MY_ATTRIBUTE((unused)))
 {
   DBUG_ASSERT(0);
   return 0;
@@ -73,8 +73,8 @@ my_caseup_str_mb2_or_mb4(const CHARSET_INFO * cs  __attribute__((unused)),
 
 
 static size_t
-my_casedn_str_mb2_or_mb4(const CHARSET_INFO *cs __attribute__((unused)), 
-                         char * s __attribute__((unused)))
+my_casedn_str_mb2_or_mb4(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), 
+                         char * s MY_ATTRIBUTE((unused)))
 {
   DBUG_ASSERT(0);
   return 0;
@@ -82,9 +82,9 @@ my_casedn_str_mb2_or_mb4(const CHARSET_INFO *cs __attribute__((unused)),
 
 
 static int
-my_strcasecmp_mb2_or_mb4(const CHARSET_INFO *cs __attribute__((unused)),
-                         const char *s __attribute__((unused)),
-                         const char *t __attribute__((unused)))
+my_strcasecmp_mb2_or_mb4(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
+                         const char *s MY_ATTRIBUTE((unused)),
+                         const char *t MY_ATTRIBUTE((unused)))
 {
   DBUG_ASSERT(0);
   return 0;
@@ -1047,7 +1047,7 @@ my_vsnprintf_mb2(char *dst, size_t n, const char* fmt, va_list ap)
 
 
 static size_t
-my_snprintf_mb2(const CHARSET_INFO *cs __attribute__((unused)),
+my_snprintf_mb2(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
                 char* to, size_t n, const char* fmt, ...)
 {
   size_t retval;
@@ -1060,7 +1060,7 @@ my_snprintf_mb2(const CHARSET_INFO *cs __attribute__((unused)),
 
 
 static size_t
-my_lengthsp_mb2(const CHARSET_INFO *cs __attribute__((unused)),
+my_lengthsp_mb2(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
                 const char *ptr, size_t length)
 {
   const char *end= ptr + length;
@@ -1102,7 +1102,7 @@ my_lengthsp_mb2(const CHARSET_INFO *cs __attribute__((unused)),
                                   ((c & 3) << 8) + d + 0x10000)
 
 static int
-my_utf16_uni(const CHARSET_INFO *cs __attribute__((unused)),
+my_utf16_uni(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
              my_wc_t *pwc, const uchar *s, const uchar *e)
 {
   if (s + 2 > e)
@@ -1135,7 +1135,7 @@ my_utf16_uni(const CHARSET_INFO *cs __attribute__((unused)),
 
 
 static int
-my_uni_utf16(const CHARSET_INFO *cs __attribute__((unused)),
+my_uni_utf16(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
              my_wc_t wc, uchar *s, uchar *e)
 {
   if (wc <= 0xFFFF)
@@ -1201,8 +1201,8 @@ my_tosort_utf16(MY_UNICASE_INFO *uni_plane, my_wc_t *wc)
 
 static size_t
 my_caseup_utf16(const CHARSET_INFO *cs, char *src, size_t srclen,
-                char *dst __attribute__((unused)),
-                size_t dstlen __attribute__((unused)))
+                char *dst MY_ATTRIBUTE((unused)),
+                size_t dstlen MY_ATTRIBUTE((unused)))
 {
   my_wc_t wc;
   int res;
@@ -1246,8 +1246,8 @@ my_hash_sort_utf16(const CHARSET_INFO *cs, const uchar *s, size_t slen,
 
 static size_t
 my_casedn_utf16(const CHARSET_INFO *cs, char *src, size_t srclen,
-                char *dst __attribute__((unused)),
-                size_t dstlen __attribute__((unused)))
+                char *dst MY_ATTRIBUTE((unused)),
+                size_t dstlen MY_ATTRIBUTE((unused)))
 {
   my_wc_t wc;
   int res;
@@ -1415,8 +1415,8 @@ my_ismbchar_utf16(const CHARSET_INFO *cs, const char *b, const char *e)
 
 
 static uint
-my_mbcharlen_utf16(const CHARSET_INFO *cs  __attribute__((unused)),
-                   uint c __attribute__((unused)))
+my_mbcharlen_utf16(const CHARSET_INFO *cs  MY_ATTRIBUTE((unused)),
+                   uint c MY_ATTRIBUTE((unused)))
 {
   DBUG_ASSERT(0);
   return MY_UTF16_HIGH_HEAD(c) ? 4 : 2;
@@ -1749,7 +1749,7 @@ CHARSET_INFO my_charset_utf16_bin=
 
 
 static int
-my_utf16le_uni(const CHARSET_INFO *cs __attribute__((unused)),
+my_utf16le_uni(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
                my_wc_t *pwc, const uchar *s, const uchar *e)
 {
   my_wc_t lo;
@@ -1779,7 +1779,7 @@ my_utf16le_uni(const CHARSET_INFO *cs __attribute__((unused)),
 
 
 static int
-my_uni_utf16le(const CHARSET_INFO *cs __attribute__((unused)),
+my_uni_utf16le(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
                my_wc_t wc, uchar *s, uchar *e)
 {
   if (wc < MY_UTF16_SURROGATE_HIGH_FIRST ||
@@ -1806,7 +1806,7 @@ my_uni_utf16le(const CHARSET_INFO *cs __attribute__((unused)),
 
 
 static size_t
-my_lengthsp_utf16le(const CHARSET_INFO *cs __attribute__((unused)),
+my_lengthsp_utf16le(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
                     const char *ptr, size_t length)
 {
   const char *end= ptr + length;
@@ -1922,7 +1922,7 @@ CHARSET_INFO my_charset_utf16le_bin=
 #ifdef HAVE_CHARSET_utf32
 
 static int
-my_utf32_uni(const CHARSET_INFO *cs __attribute__((unused)),
+my_utf32_uni(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
              my_wc_t *pwc, const uchar *s, const uchar *e)
 {
   if (s + 4 > e)
@@ -1933,7 +1933,7 @@ my_utf32_uni(const CHARSET_INFO *cs __attribute__((unused)),
 
 
 static int
-my_uni_utf32(const CHARSET_INFO *cs __attribute__((unused)),
+my_uni_utf32(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
              my_wc_t wc, uchar *s, uchar *e)
 {
   if (s + 4 > e) 
@@ -1983,8 +1983,8 @@ my_tosort_utf32(MY_UNICASE_INFO *uni_plane, my_wc_t *wc)
 
 static size_t
 my_caseup_utf32(const CHARSET_INFO *cs, char *src, size_t srclen,
-                char *dst __attribute__((unused)),
-                size_t dstlen __attribute__((unused)))
+                char *dst MY_ATTRIBUTE((unused)),
+                size_t dstlen MY_ATTRIBUTE((unused)))
 {
   my_wc_t wc;
   int res;
@@ -2039,8 +2039,8 @@ my_hash_sort_utf32(const CHARSET_INFO *cs, const uchar *s, size_t slen,
 
 static size_t
 my_casedn_utf32(const CHARSET_INFO *cs, char *src, size_t srclen,
-                char *dst __attribute__((unused)),
-                size_t dstlen __attribute__((unused)))
+                char *dst MY_ATTRIBUTE((unused)),
+                size_t dstlen MY_ATTRIBUTE((unused)))
 {
   my_wc_t wc;
   int res;
@@ -2198,7 +2198,7 @@ my_strnncollsp_utf32(const CHARSET_INFO *cs,
 
 
 static size_t
-my_strnxfrmlen_utf32(const CHARSET_INFO *cs __attribute__((unused)),
+my_strnxfrmlen_utf32(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
                      size_t len)
 {
   return len / 2;
@@ -2206,17 +2206,17 @@ my_strnxfrmlen_utf32(const CHARSET_INFO *cs __attribute__((unused)),
 
 
 static uint
-my_ismbchar_utf32(const CHARSET_INFO *cs __attribute__((unused)),
-                  const char *b __attribute__((unused)),
-                  const char *e __attribute__((unused)))
+my_ismbchar_utf32(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
+                  const char *b MY_ATTRIBUTE((unused)),
+                  const char *e MY_ATTRIBUTE((unused)))
 {
   return 4;
 }
 
 
 static uint
-my_mbcharlen_utf32(const CHARSET_INFO *cs  __attribute__((unused)) , 
-                   uint c __attribute__((unused)))
+my_mbcharlen_utf32(const CHARSET_INFO *cs  MY_ATTRIBUTE((unused)) , 
+                   uint c MY_ATTRIBUTE((unused)))
 {
   return 4;
 }
@@ -2312,7 +2312,7 @@ my_vsnprintf_utf32(char *dst, size_t n, const char* fmt, va_list ap)
 
 
 static size_t
-my_snprintf_utf32(const CHARSET_INFO *cs __attribute__((unused)),
+my_snprintf_utf32(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
                   char* to, size_t n, const char* fmt, ...)
 {
   size_t retval;
@@ -2325,7 +2325,7 @@ my_snprintf_utf32(const CHARSET_INFO *cs __attribute__((unused)),
 
 
 static longlong
-my_strtoll10_utf32(const CHARSET_INFO *cs __attribute__((unused)),
+my_strtoll10_utf32(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
                    const char *nptr, char **endptr, int *error)
 {
   const char *s, *end, *start, *n_end, *true_end;
@@ -2495,7 +2495,7 @@ no_conv:
 
 
 static size_t
-my_numchars_utf32(const CHARSET_INFO *cs __attribute__((unused)),
+my_numchars_utf32(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
                   const char *b, const char *e)
 {
   return (size_t) (e - b) / 4;
@@ -2503,7 +2503,7 @@ my_numchars_utf32(const CHARSET_INFO *cs __attribute__((unused)),
 
 
 static size_t
-my_charpos_utf32(const CHARSET_INFO *cs __attribute__((unused)),
+my_charpos_utf32(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
                  const char *b, const char *e, size_t pos)
 {
   size_t string_length= (size_t) (e - b);
@@ -2512,7 +2512,7 @@ my_charpos_utf32(const CHARSET_INFO *cs __attribute__((unused)),
 
 
 static size_t
-my_well_formed_len_utf32(const CHARSET_INFO *cs __attribute__((unused)),
+my_well_formed_len_utf32(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
                          const char *b, const char *e,
                          size_t nchars, int *error)
 {
@@ -2565,7 +2565,7 @@ void my_fill_utf32(const CHARSET_INFO *cs,
 
 
 static size_t
-my_lengthsp_utf32(const CHARSET_INFO *cs __attribute__((unused)),
+my_lengthsp_utf32(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
                   const char *ptr, size_t length)
 {
   const char *end= ptr + length;
@@ -2643,11 +2643,11 @@ my_utf32_get(const uchar *s)
 
 
 static int
-my_strnncollsp_utf32_bin(const CHARSET_INFO *cs __attribute__((unused)), 
+my_strnncollsp_utf32_bin(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), 
                          const uchar *s, size_t slen, 
                          const uchar *t, size_t tlen,
                          my_bool diff_if_only_endspace_difference
-                         __attribute__((unused)))
+                         MY_ATTRIBUTE((unused)))
 {
   const uchar *se, *te;
   size_t minlen;
@@ -2910,7 +2910,7 @@ static uchar to_upper_ucs2[] = {
 };
 
 
-static int my_ucs2_uni(const CHARSET_INFO *cs __attribute__((unused)),
+static int my_ucs2_uni(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
                       my_wc_t * pwc, const uchar *s, const uchar *e)
 {
   if (s+2 > e) /* Need 2 characters */
@@ -2920,7 +2920,7 @@ static int my_ucs2_uni(const CHARSET_INFO *cs __attribute__((unused)),
   return 2;
 }
 
-static int my_uni_ucs2(const CHARSET_INFO *cs __attribute__((unused)) ,
+static int my_uni_ucs2(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)) ,
                       my_wc_t wc, uchar *r, uchar *e)
 {
   if ( r+2 > e ) 
@@ -2963,8 +2963,8 @@ my_tosort_ucs2(MY_UNICASE_INFO *uni_plane, my_wc_t *wc)
 
 
 static size_t my_caseup_ucs2(const CHARSET_INFO *cs, char *src, size_t srclen,
-                           char *dst __attribute__((unused)),
-                           size_t dstlen __attribute__((unused)))
+                           char *dst MY_ATTRIBUTE((unused)),
+                           size_t dstlen MY_ATTRIBUTE((unused)))
 {
   my_wc_t wc;
   int res;
@@ -3008,8 +3008,8 @@ static void my_hash_sort_ucs2(const CHARSET_INFO *cs, const uchar *s,
 
 
 static size_t my_casedn_ucs2(const CHARSET_INFO *cs, char *src, size_t srclen,
-                           char *dst __attribute__((unused)),
-                           size_t dstlen __attribute__((unused)))
+                           char *dst MY_ATTRIBUTE((unused)),
+                           size_t dstlen MY_ATTRIBUTE((unused)))
 {
   my_wc_t wc;
   int res;
@@ -3030,7 +3030,7 @@ static size_t my_casedn_ucs2(const CHARSET_INFO *cs, char *src, size_t srclen,
 
 
 static void
-my_fill_ucs2(const CHARSET_INFO *cs __attribute__((unused)), 
+my_fill_ucs2(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), 
              char *s, size_t l, int fill)
 {
   DBUG_ASSERT(fill <= 0xFFFF);
@@ -3101,11 +3101,11 @@ static int my_strnncoll_ucs2(const CHARSET_INFO *cs,
     > 0  a > b
 */
 
-static int my_strnncollsp_ucs2(const CHARSET_INFO *cs __attribute__((unused)),
+static int my_strnncollsp_ucs2(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
                                const uchar *s, size_t slen,
                                const uchar *t, size_t tlen,
                                my_bool diff_if_only_endspace_difference
-                              __attribute__((unused)))
+                              MY_ATTRIBUTE((unused)))
 {
   const uchar *se, *te;
   size_t minlen;
@@ -3152,23 +3152,23 @@ static int my_strnncollsp_ucs2(const CHARSET_INFO *cs __attribute__((unused)),
 }
 
 
-static uint my_ismbchar_ucs2(const CHARSET_INFO *cs __attribute__((unused)),
-                             const char *b __attribute__((unused)),
-                             const char *e __attribute__((unused)))
+static uint my_ismbchar_ucs2(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
+                             const char *b MY_ATTRIBUTE((unused)),
+                             const char *e MY_ATTRIBUTE((unused)))
 {
   return 2;
 }
 
 
-static uint my_mbcharlen_ucs2(const CHARSET_INFO *cs __attribute__((unused)) ,
-                              uint c __attribute__((unused)))
+static uint my_mbcharlen_ucs2(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)) ,
+                              uint c MY_ATTRIBUTE((unused)))
 {
   return 2;
 }
 
 
 static
-size_t my_numchars_ucs2(const CHARSET_INFO *cs __attribute__((unused)),
+size_t my_numchars_ucs2(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
                         const char *b, const char *e)
 {
   return (size_t) (e-b)/2;
@@ -3176,9 +3176,9 @@ size_t my_numchars_ucs2(const CHARSET_INFO *cs __attribute__((unused)),
 
 
 static
-size_t my_charpos_ucs2(const CHARSET_INFO *cs __attribute__((unused)),
-                       const char *b  __attribute__((unused)),
-                       const char *e  __attribute__((unused)),
+size_t my_charpos_ucs2(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
+                       const char *b  MY_ATTRIBUTE((unused)),
+                       const char *e  MY_ATTRIBUTE((unused)),
                        size_t pos)
 {
   size_t string_length= (size_t) (e - b);
@@ -3187,7 +3187,7 @@ size_t my_charpos_ucs2(const CHARSET_INFO *cs __attribute__((unused)),
 
 
 static
-size_t my_well_formed_len_ucs2(const CHARSET_INFO *cs __attribute__((unused)),
+size_t my_well_formed_len_ucs2(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
                                const char *b, const char *e,
                                size_t nchars, int *error)
 {
@@ -3255,11 +3255,11 @@ int my_strnncoll_ucs2_bin(const CHARSET_INFO *cs,
 }
 
 static int my_strnncollsp_ucs2_bin(const CHARSET_INFO *cs
-                                   __attribute__((unused)),
+                                   MY_ATTRIBUTE((unused)),
                                    const uchar *s, size_t slen, 
                                    const uchar *t, size_t tlen,
                                    my_bool diff_if_only_endspace_difference
-                                   __attribute__((unused)))
+                                   MY_ATTRIBUTE((unused)))
 {
   const uchar *se, *te;
   size_t minlen;
@@ -3303,7 +3303,7 @@ static int my_strnncollsp_ucs2_bin(const CHARSET_INFO *cs
 
 
 static
-void my_hash_sort_ucs2_bin(const CHARSET_INFO *cs __attribute__((unused)),
+void my_hash_sort_ucs2_bin(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
                           const uchar *key, size_t len,ulong *nr1, ulong *nr2)
 {
   const uchar *pos = key;
index 5f7c36e6f1009958e79f6d9d2674738c008071e8..6b8443fafa51623f293243990b48084f56351dae 100644 (file)
@@ -1,5 +1,5 @@
 /* Copyright (c) 2002 MySQL AB & tommy@valley.ne.jp
-   Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
+   Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved.
    
    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Library General Public
@@ -184,7 +184,7 @@ static uchar sort_order_ujis[]=
 #define isujis_ss3(c) (((c)&0xff) == 0x8f)
 
 
-static uint ismbchar_ujis(const CHARSET_INFO *cs __attribute__((unused)),
+static uint ismbchar_ujis(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
                  const char* p, const char *e)
 {
   return ((*(uchar*)(p)<0x80)? 0:\
@@ -194,7 +194,7 @@ static uint ismbchar_ujis(const CHARSET_INFO *cs __attribute__((unused)),
     0);
 }
 
-static uint mbcharlen_ujis(const CHARSET_INFO *cs __attribute__((unused)),
+static uint mbcharlen_ujis(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
                            uint c)
 {
   return (isujis(c)? 2: isujis_ss2(c)? 2: isujis_ss3(c)? 3: 1);
@@ -210,7 +210,7 @@ static uint mbcharlen_ujis(const CHARSET_INFO *cs __attribute__((unused)),
 */
 
 static
-size_t my_well_formed_len_ujis(const CHARSET_INFO *cs __attribute__((unused)),
+size_t my_well_formed_len_ujis(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
                                const char *beg, const char *end,
                                size_t pos, int *error)
 {
@@ -260,7 +260,7 @@ size_t my_well_formed_len_ujis(const CHARSET_INFO *cs __attribute__((unused)),
 
 
 static
-size_t my_numcells_eucjp(const CHARSET_INFO *cs __attribute__((unused)),
+size_t my_numcells_eucjp(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
                        const char *str, const char *str_end)
 {
   size_t clen;
@@ -65880,7 +65880,7 @@ static uint16 unicode_to_jisx0212_eucjp[65536]=
   @retval   MY_CS_ILSEQ    If a wrong byte sequence was found
 */
 static int
-my_mb_wc_euc_jp(const CHARSET_INFO *cs __attribute__((unused)),
+my_mb_wc_euc_jp(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
                 my_wc_t *pwc, const uchar *s, const uchar *e)
 {
   int hi;
@@ -65940,7 +65940,7 @@ my_mb_wc_euc_jp(const CHARSET_INFO *cs __attribute__((unused)),
   @retval   MY_CS_ILUNI    If the Unicode character does not exist in UJIS
 */
 static int
-my_wc_mb_euc_jp(const CHARSET_INFO *cs __attribute__((unused)),
+my_wc_mb_euc_jp(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
                 my_wc_t wc, uchar *s, uchar *e)
 {
   int jp;
@@ -67181,7 +67181,7 @@ get_case_info_for_ch(const CHARSET_INFO *cs, uint plane, uint page, uint offs)
 static size_t
 my_casefold_ujis(const CHARSET_INFO *cs,
                  char *src, size_t srclen,
-                 char *dst, size_t dstlen __attribute__((unused)),
+                 char *dst, size_t dstlen MY_ATTRIBUTE((unused)),
                  uchar *map,
                  size_t is_upper)
 {
index 563109eec7bbe111379b2fdabb989a44f0c19087..e4d1faa2a8f46a19afb0152d7c3e05b4eb8add62 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
 
    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Library General Public
@@ -5327,7 +5327,7 @@ static inline int bincmp(const uchar *s, const uchar *se,
 }
 
 
-static int my_utf8_uni(const CHARSET_INFO *cs __attribute__((unused)),
+static int my_utf8_uni(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
                        my_wc_t * pwc, const uchar *s, const uchar *e)
 {
   uchar c;
@@ -5438,7 +5438,7 @@ static int my_utf8_uni(const CHARSET_INFO *cs __attribute__((unused)),
   for example, for a null-terminated string
 */
 static int my_utf8_uni_no_range(const CHARSET_INFO *cs
-                                __attribute__((unused)),
+                                MY_ATTRIBUTE((unused)),
                                 my_wc_t * pwc, const uchar *s)
 {
   uchar c;
@@ -5479,7 +5479,7 @@ static int my_utf8_uni_no_range(const CHARSET_INFO *cs
 }
 
 
-static int my_uni_utf8 (const CHARSET_INFO *cs __attribute__((unused)),
+static int my_uni_utf8 (const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
                         my_wc_t wc, uchar *r, uchar *e)
 {
   int count;
@@ -5529,7 +5529,7 @@ static int my_uni_utf8 (const CHARSET_INFO *cs __attribute__((unused)),
   The same as above, but without range check.
 */
 static int my_uni_utf8_no_range(const CHARSET_INFO *cs
-                                __attribute__((unused)),
+                                MY_ATTRIBUTE((unused)),
                                 my_wc_t wc, uchar *r)
 {
   int count;
@@ -5955,7 +5955,7 @@ int my_wildcmp_utf8(const CHARSET_INFO *cs,
 
 
 static
-size_t my_strnxfrmlen_utf8(const CHARSET_INFO *cs __attribute__((unused)),
+size_t my_strnxfrmlen_utf8(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
                            size_t len)
 {
   return (len * 2 + 2) / 3;
@@ -5963,7 +5963,7 @@ size_t my_strnxfrmlen_utf8(const CHARSET_INFO *cs __attribute__((unused)),
 
 
 static
-int my_valid_mbcharlen_utf8(const CHARSET_INFO *cs __attribute__((unused)),
+int my_valid_mbcharlen_utf8(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
                             const uchar *s, const uchar *e)
 {
   uchar c;
@@ -6050,7 +6050,7 @@ static uint my_ismbchar_utf8(const CHARSET_INFO *cs,const char *b,
   return (res>1) ? res : 0;
 }
 
-static uint my_mbcharlen_utf8(const CHARSET_INFO *cs  __attribute__((unused)),
+static uint my_mbcharlen_utf8(const CHARSET_INFO *cs  MY_ATTRIBUTE((unused)),
                               uint c)
 {
   if (c < 0x80)
@@ -7575,7 +7575,7 @@ static char filename_safe_char[128]=
 #define MY_FILENAME_ESCAPE '@'
 
 static int
-my_mb_wc_filename(const CHARSET_INFO *cs __attribute__((unused)),
+my_mb_wc_filename(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
                   my_wc_t *pwc, const uchar *s, const uchar *e)
 {
   int byte1, byte2;
@@ -7635,7 +7635,7 @@ my_mb_wc_filename(const CHARSET_INFO *cs __attribute__((unused)),
 
 
 static int
-my_wc_mb_filename(const CHARSET_INFO *cs __attribute__((unused)),
+my_wc_mb_filename(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
                   my_wc_t wc, uchar *s, uchar *e)
 {
   int code;
@@ -7898,7 +7898,7 @@ bincmp_utf8mb4(const uchar *s, const uchar *se,
 
 
 static int
-my_mb_wc_utf8mb4(const CHARSET_INFO *cs __attribute__((unused)),
+my_mb_wc_utf8mb4(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
                  my_wc_t * pwc, const uchar *s, const uchar *e)
 {
   uchar c;
@@ -7984,7 +7984,7 @@ my_mb_wc_utf8mb4(const CHARSET_INFO *cs __attribute__((unused)),
   for example, for a null-terminated string
 */
 static int
-my_mb_wc_utf8mb4_no_range(const CHARSET_INFO *cs __attribute__((unused)),
+my_mb_wc_utf8mb4_no_range(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
                           my_wc_t *pwc, const uchar *s)
 {
   uchar c;
@@ -8039,7 +8039,7 @@ my_mb_wc_utf8mb4_no_range(const CHARSET_INFO *cs __attribute__((unused)),
 
 
 static int
-my_wc_mb_utf8mb4(const CHARSET_INFO *cs __attribute__((unused)),
+my_wc_mb_utf8mb4(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
                  my_wc_t wc, uchar *r, uchar *e)
 {
   int count;
@@ -8075,7 +8075,7 @@ my_wc_mb_utf8mb4(const CHARSET_INFO *cs __attribute__((unused)),
   The same as above, but without range check.
 */
 static int
-my_wc_mb_utf8mb4_no_range(const CHARSET_INFO *cs __attribute__((unused)),
+my_wc_mb_utf8mb4_no_range(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
                           my_wc_t wc, uchar *r)
 {
   int count;
@@ -8514,7 +8514,7 @@ my_wildcmp_utf8mb4(const CHARSET_INFO *cs,
 
 
 static size_t
-my_strnxfrmlen_utf8mb4(const CHARSET_INFO *cs __attribute__((unused)),
+my_strnxfrmlen_utf8mb4(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
                        size_t len)
 {
   /* TODO: fix when working on WL "Unicode new version" */
@@ -8523,7 +8523,7 @@ my_strnxfrmlen_utf8mb4(const CHARSET_INFO *cs __attribute__((unused)),
 
 
 static int
-my_valid_mbcharlen_utf8mb4(const CHARSET_INFO *cs __attribute__((unused)),
+my_valid_mbcharlen_utf8mb4(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
                            const uchar *s, const uchar *e)
 {
   uchar c;
@@ -8605,7 +8605,7 @@ my_ismbchar_utf8mb4(const CHARSET_INFO *cs, const char *b, const char *e)
 
 
 static uint
-my_mbcharlen_utf8mb4(const CHARSET_INFO *cs __attribute__((unused)), uint c)
+my_mbcharlen_utf8mb4(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)), uint c)
 {
   if (c < 0x80)
     return 1;
index 8c563bbc7f0706c8a64f732bf0264944c31d86e9..5753a49684133af58f0832e4a3e1f707b8ca28a1 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2002, 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
@@ -436,7 +436,7 @@ static struct wordvalue doubles[] = {
 #define IS_END(p, src, len)    (((char *)p - (char *)src) >= (len))
 
 static int my_strnncoll_win1250ch(const CHARSET_INFO *cs
-                                  __attribute__((unused)),
+                                  MY_ATTRIBUTE((unused)),
                                  const uchar *s1, size_t len1,
                                   const uchar *s2, size_t len2,
                                   my_bool s2_is_prefix)
@@ -471,7 +471,7 @@ int my_strnncollsp_win1250ch(const CHARSET_INFO *cs,
                             const uchar *s, size_t slen, 
                             const uchar *t, size_t tlen,
                              my_bool diff_if_only_endspace_difference
-                             __attribute__((unused)))
+                             MY_ATTRIBUTE((unused)))
 {
   for ( ; slen && s[slen-1] == ' ' ; slen--);
   for ( ; tlen && t[tlen-1] == ' ' ; tlen--);
@@ -480,9 +480,9 @@ int my_strnncollsp_win1250ch(const CHARSET_INFO *cs,
 
 
 static size_t
-my_strnxfrm_win1250ch(const CHARSET_INFO *cs  __attribute__((unused)),
+my_strnxfrm_win1250ch(const CHARSET_INFO *cs  MY_ATTRIBUTE((unused)),
                       uchar *dest, size_t len,
-                      uint nweights_arg __attribute__((unused)),
+                      uint nweights_arg MY_ATTRIBUTE((unused)),
                       const uchar *src, size_t srclen, uint flags)
 {
   int value;
@@ -614,7 +614,7 @@ static uchar like_range_prefix_max_win1250ch[]=
 */
 
 static my_bool
-my_like_range_win1250ch(const CHARSET_INFO *cs __attribute__((unused)),
+my_like_range_win1250ch(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
                        const char *ptr, size_t ptr_length,
                        pbool escape, pbool w_one, pbool w_many,
                        size_t res_length,
index 41013fe28ed90337d35967bb335d84b81f01f31d..3f9ca946fa204c778211ab429dad7f832bcef797 100644 (file)
@@ -289,7 +289,7 @@ case "$mode" in
     then
       # Give extra arguments to mysqld with the my.cnf file. This script
       # may be overwritten at next upgrade.
-      $bindir/mysqld_safe --datadir="$datadir" --pid-file="$mysqld_pid_file_path" $other_args >/dev/null 2>&1 &
+      $bindir/mysqld_safe --datadir="$datadir" --pid-file="$mysqld_pid_file_path" $other_args >/dev/null &
       wait_for_pid created "$!" "$mysqld_pid_file_path"; return_value=$?
 
       # Make lock for RedHat / SuSE
index ccc8cacab93034415d9a44786077291cd9c1f85b..4d193eda3769530d48354b936447138d45404db7 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2000, 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
@@ -199,9 +199,9 @@ BuildRequires: gperf procps time
 %global compatch              mysql-5173-charset-dir.patch
 %endif
 
-# mysql-wsrep-5.5 has libmysqlclient.so.18, as have 5.6 and 5.7; 
+# mysql-wsrep-5.5 has libmysqlclient.so.18, as has 5.6;
 # 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.
+# This becomes relevant with a MySQL 5.7 (or higher) that has a libmysqlclient.so.20 or higher.
 #
 # %%if 0%%{?rhel} == 7
 # %%global compatver             5.5.45
@@ -330,12 +330,12 @@ Obsoletes:      MySQL-server
 Obsoletes:      MySQL-server-advanced
 %endif
 Obsoletes:      mysql-server < %{version}-%{release}
-Obsoletes:      mysql-server-advanced
+Obsoletes:      mysql-server-advanced mysql-community-server
 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
+Obsoletes:      mysql-common mysql-community-common
 %endif
 Provides:       mysql-server = %{version}-%{release}
 Provides:       mysql-server%{?_isa} = %{version}-%{release}
@@ -381,6 +381,7 @@ Obsoletes:      MySQL-client-advanced
 %endif
 Obsoletes:      mysql < %{version}-%{release}
 Obsoletes:      mysql-advanced < %{version}-%{release}
+Obsoletes:      mysql-community-client
 Obsoletes:      MySQL-client-classic MySQL-client-community MySQL-client-enterprise
 Obsoletes:      MySQL-client-advanced-gpl MySQL-client-enterprise-gpl
 Provides:       mysql = %{version}-%{release} 
@@ -409,10 +410,10 @@ Requires:       MySQL-client perl
 Obsoletes:      MySQL-test-advanced
 %endif
 Obsoletes:      mysql-test < %{version}-%{release}
-Obsoletes:      mysql-test-advanced
+Obsoletes:      mysql-test-advanced mysql-community-test
 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 mysql-community-bench
 Obsoletes:      MySQL-bench
 Provides:       mysql-test = %{version}-%{release}
 Provides:       mysql-test%{?_isa} = %{version}-%{release}
@@ -438,6 +439,7 @@ Obsoletes:      MySQL-devel-advanced
 %endif
 Obsoletes:      mysql-devel < %{version}-%{release}
 Obsoletes:      mysql-embedded-devel mysql-devel-advanced mysql-embedded-devel-advanced
+Obsoletes:      mysql-community-devel
 Obsoletes:      MySQL-devel-classic MySQL-devel-community MySQL-devel-enterprise
 Obsoletes:      MySQL-devel-advanced-gpl MySQL-devel-enterprise-gpl
 Provides:       mysql-devel = %{version}-%{release}
@@ -468,7 +470,7 @@ 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
+Obsoletes:      mysql-libs mysql-community-libs
 # Necessary on RHEL 7, no harm on other platforms:
 Obsoletes:      mariadb-libs
 
@@ -488,6 +490,7 @@ Obsoletes:      mysql-wsrep-libs-compat%{previous_suffix}
 Provides:       mysql-libs-compat = %{version}
 Provides:       mysql-libs-compat%{?_isa} = %{version}
 Obsoletes:      mysql-libs-compat < %{version}
+Obsoletes:      mysql-community-libs-compat
 Provides:       MySQL-shared-compat%{?_isa} = %{version}
 Obsoletes:      MySQL-shared-compat < %{version}
 
@@ -495,6 +498,7 @@ Obsoletes:      MySQL-shared-compat < %{version}
 # Directly, we replace "libs" only; but RedHat "client" and "server" need files from "libs"
 Provides:       mysql-libs = %{compatver}
 Obsoletes:      mysql-libs < %{version}
+Obsoletes:      mysql-community-libs
 
 %if 0%{?rhel} > 6
 # Dealing with RHEL 7 and upwards (and compatible ...)
@@ -529,7 +533,7 @@ Requires:       MySQL-devel
 Obsoletes:      MySQL-embedded-advanced
 %endif
 Obsoletes:      mysql-embedded < %{version}-%{release}
-Obsoletes:      mysql-embedded-advanced
+Obsoletes:      mysql-embedded-advanced mysql-community-embedded
 Obsoletes:      MySQL-embedded-pro
 Obsoletes:      MySQL-embedded-classic MySQL-embedded-community MySQL-embedded-enterprise
 Obsoletes:      MySQL-embedded-advanced-gpl MySQL-embedded-enterprise-gpl
@@ -790,6 +794,7 @@ install -d $RBR%{_includedir}
 install -d $RBR%{_libdir}
 install -d $RBR%{_mandir}
 install -d $RBR%{_sbindir}
+install -d $RBR/var/lib/mysql-files
 
 mkdir -p $RBR%{_sysconfdir}/my.cnf.d
 
@@ -1387,6 +1392,7 @@ echo "====="                                     >> $STATUS_HISTORY
 %attr(755, root, root) %{_sysconfdir}/init.d/mysql
 # %%attr(755, root, root) %%{_datadir}/mysql/  ## Contained in "plugins.files", see "%%install" code
 %dir %attr(755, mysql, mysql) /var/lib/mysql
+%dir %attr(750, mysql, mysql) /var/lib/mysql-files
 
 # ----------------------------------------------------------------------------
 %files -n mysql-wsrep-client%{product_suffix}
@@ -1500,6 +1506,11 @@ echo "====="                                     >> $STATUS_HISTORY
 # merging BK trees)
 ##############################################################################
 %changelog
+* Fri Jun 10 2016 Joerg Bruehe <joerg.bruehe@fromdual.com>
+- Add missing "obsoletes" directives to handle Oracle's yum repository.
+- Fix comment about SO version of libmysqlclient.so.
+- Modify some changelog dates to match Oracle's (reduce differences).
+
 * Fri Oct 30 2015 Joerg Bruehe <joerg.bruehe@fromdual.com>
 - 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.
@@ -1646,7 +1657,7 @@ echo "====="                                     >> $STATUS_HISTORY
   not in an RPM upgrade.
   This affects both the "mkdir" and the call of "mysql_install_db".
 
-* Thu Feb 10 2011 Joerg Bruehe <joerg.bruehe@oracle.com>
+* Wed Feb 09 2011 Joerg Bruehe <joerg.bruehe@oracle.com>
 
 - 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)
@@ -1767,7 +1778,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).
 
-* Fri Oct 09 2009 Magnus Blaudd <mvensson@mysql.com>
+* Tue Oct 06 2009 Magnus Blaudd <mvensson@mysql.com>
 
 - Removed mysql_fix_privilege_tables
 
@@ -1964,7 +1975,7 @@ echo "====="                                     >> $STATUS_HISTORY
 
 - Set $LDFLAGS from $MYSQL_BUILD_LDFLAGS
 
-* Wed Mar 08 2006 Kent Boortz <kent@mysql.com>
+* Tue Mar 07 2006 Kent Boortz <kent@mysql.com>
 
 - Changed product name from "Community Edition" to "Community Server"
 
@@ -2212,7 +2223,7 @@ echo "====="                                     >> $STATUS_HISTORY
 
 - marked /etc/logrotate.d/mysql as a config file (BUG 2156)
 
-* Fri Dec 12 2003 Lenz Grimmer <lenz@mysql.com>
+* Sat Dec 13 2003 Lenz Grimmer <lenz@mysql.com>
 
 - fixed file permissions (BUG 1672)
 
@@ -2354,7 +2365,7 @@ echo "====="                                     >> $STATUS_HISTORY
 - Added separate libmysql_r directory; now both a threaded
   and non-threaded library is shipped.
 
-* Wed Sep 29 1999 David Axmark <davida@mysql.com>
+* Tue Sep 28 1999 David Axmark <davida@mysql.com>
 
 - Added the support-files/my-example.cnf to the docs directory.
 
index 0dd83ae5a121827356e62d09d6490958b0ddc17e..d478ccb94d887991cb84cc804a94e10d477a84e8 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights
+/* Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights
  * reserved.
 
    This program is free software; you can redistribute it and/or modify
@@ -1265,7 +1265,7 @@ static struct my_tests_st *get_my_tests();  /* To be defined in main .c file */
 static struct my_tests_st *my_testlist= 0;
 
 static my_bool
-get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
+get_one_option(int optid, const struct my_option *opt MY_ATTRIBUTE((unused)),
 char *argument)
 {
  switch (optid) {
index e21b9f28fe5f9a822b9a78870892052c9cc276b1..04ba0138731d90cdde71358165ad0c3cad2e15f7 100644 (file)
@@ -19488,6 +19488,77 @@ static void test_bug17883203()
 }
 
 
+/*
+  Bug#22559575: "the statement (1) has no open cursor" pops
+                sometimes with prepared+query_cache
+*/
+
+static void bug22559575_base(unsigned long type)
+{
+  MYSQL_STMT *stmt;
+  int rc;
+  const char stmt_text[] ="SELECT a FROM t22559575";
+  MYSQL_RES *prepare_meta = NULL;
+  MYSQL_BIND bind[1];
+  short data;
+  unsigned long length;
+
+  stmt = mysql_stmt_init(mysql);
+  check_stmt(stmt);
+  if (type == CURSOR_TYPE_READ_ONLY)
+  {
+    rc = mysql_stmt_attr_set(stmt, STMT_ATTR_CURSOR_TYPE, (const void*)&type);
+    check_execute(stmt, rc);
+  }
+  rc = mysql_stmt_prepare(stmt, stmt_text, strlen(stmt_text));
+  check_execute(stmt, rc);
+  prepare_meta = mysql_stmt_result_metadata(stmt);
+  DIE_UNLESS(prepare_meta != NULL);
+  rc= mysql_stmt_execute(stmt);
+  check_execute(stmt, rc);
+
+  memset(bind, 0, sizeof(bind));
+  bind[0].buffer_type= MYSQL_TYPE_SHORT;
+  bind[0].buffer= (void *)&data;
+  bind[0].length= &length;
+  rc= mysql_stmt_bind_result(stmt, bind);
+  check_execute(stmt, rc);
+
+  rc= mysql_stmt_store_result(stmt);
+  check_execute(stmt, rc);
+
+  rc= mysql_stmt_fetch(stmt);
+  check_execute(stmt, rc);
+  DIE_UNLESS(data == 1);
+
+  mysql_free_result(prepare_meta);
+  rc= mysql_stmt_close(stmt);
+  check_execute(stmt, rc);
+}
+
+static void test_bug22559575()
+{
+  int rc;
+
+  rc= mysql_query(mysql, "CREATE TABLE t22559575(a SMALLINT)");
+  myquery(rc);
+  rc= mysql_query(mysql, "INSERT INTO t22559575 VALUES (1)");
+  myquery(rc);
+
+  /* Should not cache */
+  bug22559575_base(CURSOR_TYPE_READ_ONLY);
+  bug22559575_base(CURSOR_TYPE_READ_ONLY);
+  /* Should save to cache */
+  bug22559575_base(CURSOR_TYPE_NO_CURSOR);
+  /* Should use cache */
+  bug22559575_base(CURSOR_TYPE_NO_CURSOR);
+  /* should not use cache */
+  bug22559575_base(CURSOR_TYPE_READ_ONLY);
+
+  rc= mysql_query(mysql, "DROP TABLE t22559575");
+  myquery(rc);
+}
+
 static struct my_tests_st my_tests[]= {
   { "disable_query_logs", disable_query_logs },
   { "test_view_sp_list_fields", test_view_sp_list_fields },
@@ -19765,6 +19836,7 @@ static struct my_tests_st my_tests[]= {
   { "test_bug17512527", test_bug17512527},
   { "test_bug20810928", test_bug20810928 },
   { "test_bug17883203", test_bug17883203 },
+  { "test_bug22559575", test_bug22559575 },
   { 0, 0 }
 };
 
index 5d79fb17c08008aa66e32258fe92b19bfde3f995..3fb2fc5b61f4a6889d86815d41e65e344c8577dc 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 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
@@ -29,9 +29,9 @@ static char *database,*host,*user,*password,*unix_socket,*query;
 uint tcp_port;
 
 #ifndef __WIN__
-void *test_thread(void *arg __attribute__((unused)))
+void *test_thread(void *arg MY_ATTRIBUTE((unused)))
 #else
-unsigned __stdcall test_thread(void *arg __attribute__((unused)))
+unsigned __stdcall test_thread(void *arg MY_ATTRIBUTE((unused)))
 #endif
 {
   MYSQL *mysql;
@@ -134,7 +134,7 @@ static void usage()
 
 
 static my_bool
-get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
+get_one_option(int optid, const struct my_option *opt MY_ATTRIBUTE((unused)),
               char *argument)
 {
   switch (optid) {
index f3aa8dab3ba00012d48edcf0a90ad34679f7b6c8..678e020f2bdd2e11d2dfcf77f6dabba2782075b4 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. 
+# Copyright (c) 2010, 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
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA 
 
+ADD_SUBDIRECTORY(gunit)
+
 ADD_CUSTOM_TARGET(
   test-unit
-  COMMAND perl ${CMAKE_CURRENT_SOURCE_DIR}/unit.pl run .
+  COMMAND ctest
   WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
 )
index db53c655022fa9f68285e708d7dce4316ae869e2..a77080cac74418a00aed22760079489e13ccc797 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2010, 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
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
-# We want gmock-1.6.0.zip in order to build these unit tests.
+# We want release-1.8.0.zip in order to build these unit tests.
 # If you have already downloaded it,
-# invoke cmake with -DWITH_GMOCK=/path/to/gmock-1.6.0.zip
+# invoke cmake with -DWITH_GMOCK=/path/to/release-1.8.0.zip
 #                or -DWITH_GMOCK=/path/to
 #
 # Alternatively, set an environment variable
-# export WITH_GMOCK=/path/to/gmock-1.6.0.zip
+# export WITH_GMOCK=/path/to/release-1.8.0.zip
 #
 # You can also do cmake -DENABLE_DOWNLOADS=1 
-# and we will download it from http://googlemock.googlecode.com
+# and we will download it from https://github.com/google/googletest/archive/
 #
 # Either way: we will unpack the zip, compile gmock-all.cc and gtest-all.cc
 # and link them into the executables.
 
-# Where to download and build gmock/gtest.
+# Disable googletest for Solaris Studio < 12.4 since it doesn't compile.
+IF(CMAKE_C_COMPILER_ID MATCHES "SunPro")
+  IF(${CC_MINOR_VERSION} LESS 13)
+    MESSAGE(WARNING "Googletest requires Solaris Studio 12.4 or newer.")
+    UNSET(GMOCK_FOUND)
+    UNSET(GMOCK_FOUND CACHE)
+    RETURN()
+  ENDIF()
+ENDIF()
+
+# Default location for where to download and build gmock/gtest.
 IF(NOT DOWNLOAD_ROOT)
   SET(DOWNLOAD_ROOT ${CMAKE_SOURCE_DIR}/source_downloads)
 ENDIF()
-IF(NOT EXISTS DOWNLOAD_ROOT)
-  MAKE_DIRECTORY(${DOWNLOAD_ROOT})
-ENDIF()
 
-# We want googlemock version 1.6, which also contains googletest.
-SET(GMOCK_PACKAGE_NAME "gmock-1.6.0")
-SET(GMOCK_SOURCE_DIR ${DOWNLOAD_ROOT}/${GMOCK_PACKAGE_NAME})
-SET(GTEST_SOURCE_DIR ${DOWNLOAD_ROOT}/${GMOCK_PACKAGE_NAME}/gtest)
+# We want googletest version 1.8, which also contains googlemock.
+SET(GMOCK_PACKAGE_NAME "release-1.8.0")
 
 IF (DEFINED ENV{WITH_GMOCK} AND NOT DEFINED WITH_GMOCK)
-  SET(WITH_GMOCK "$ENV{WITH_GMOCK}")
+  FILE(TO_CMAKE_PATH "$ENV{WITH_GMOCK}" WITH_GMOCK)
+ENDIF()
+
+IF(LOCAL_GMOCK_ZIP
+   AND NOT ${LOCAL_GMOCK_ZIP} MATCHES ".*${GMOCK_PACKAGE_NAME}\\.zip")
+ SET(LOCAL_GMOCK_ZIP 0)
 ENDIF()
 
 IF (WITH_GMOCK)
@@ -54,21 +64,37 @@ IF (WITH_GMOCK)
               PATHS ${GMOCK_DIR}
               NO_DEFAULT_PATH
              )
+  ELSE()
+    ## Did we get a path name to the directory of the .zip file?
+    ## Check for both release-x.y.z.zip and googletest-release-x.y.z.zip
+    FIND_FILE(LOCAL_GMOCK_ZIP
+              NAMES "${GMOCK_PACKAGE_NAME}.zip" "googletest-${GMOCK_PACKAGE_NAME}.zip"
+              PATHS ${WITH_GMOCK}
+              NO_DEFAULT_PATH
+              )
+    ## If WITH_GMOCK is a directory, use it for download.
+    SET(DOWNLOAD_ROOT ${WITH_GMOCK})
   ENDIF()
-  ## Did we get a path name to the directory of the .zip file?
-  FIND_FILE(LOCAL_GMOCK_ZIP
-            NAMES "${GMOCK_PACKAGE_NAME}.zip"
-            PATHS ${WITH_GMOCK}
-            NO_DEFAULT_PATH
-           )
   MESSAGE(STATUS "Local gmock zip ${LOCAL_GMOCK_ZIP}")
 ENDIF()
 
+IF(NOT EXISTS DOWNLOAD_ROOT)
+  MAKE_DIRECTORY(${DOWNLOAD_ROOT})
+ENDIF()
+SET(GMOCK_SOURCE_DIR ${DOWNLOAD_ROOT}/googletest-${GMOCK_PACKAGE_NAME}/googlemock)
+SET(GTEST_SOURCE_DIR ${DOWNLOAD_ROOT}/googletest-${GMOCK_PACKAGE_NAME}/googletest)
+
 # We may have downloaded gmock/gtest already, building in a different directory.
-IF(EXISTS ${GMOCK_SOURCE_DIR})
+IF(EXISTS ${GMOCK_SOURCE_DIR} OR EXISTS ${LOCAL_GMOCK_ZIP})
   MESSAGE(STATUS "GMOCK_SOURCE_DIR:${GMOCK_SOURCE_DIR}")
   SET(GMOCK_DOWNLOADED 1 CACHE INTERNAL "")
   SET(GMOCK_FOUND 1 CACHE INTERNAL "")
+# If source dir does not exist, reset dependent variables (might be set from before).
+ELSE()
+  SET(LOCAL_GMOCK_ZIP 0 CACHE INTERNAL "")
+  SET(GMOCK_DOWNLOADED 0 CACHE INTERNAL "")
+  SET(GMOCK_FOUND 0 CACHE INTERNAL "")
+  SET(GMOCK_INCLUDE_DIRS 0 CACHE INTERNAL "")
 ENDIF()
 
 
@@ -86,37 +112,34 @@ ENDIF()
 
 
 OPTION(ENABLE_DOWNLOADS
-  "Download and build 3rd party source code components, e.g. google mock"
+  "Download and build 3rd party source code components, e.g. googletest"
   OFF)
 
 # While experimenting, use local URL rather than google.
-SET(GMOCK_TARBALL "${GMOCK_PACKAGE_NAME}.zip")
+SET(GMOCK_TARBALL "googletest-${GMOCK_PACKAGE_NAME}.zip")
 SET(GMOCK_DOWNLOAD_URL 
-  "http://googlemock.googlecode.com/files/${GMOCK_TARBALL}"
+  "https://github.com/google/googletest/archive/${GMOCK_PACKAGE_NAME}.zip"
   )
   
 MACRO(HTTP_PROXY_HINT)
   MESSAGE(STATUS
-    "If you are inside a firewall, you may need to use an http proxy: "
-    "export http_proxy=http://example.com:80")
+    "If you are inside a firewall, you may need to use an https proxy: "
+    "export https_proxy=http://example.com:80")
 ENDMACRO()
 
 
 IF(NOT GMOCK_FOUND)
   IF(NOT ENABLE_DOWNLOADS)
-    # Give one-time warning
-    IF(NOT ONETIME_GTEST_WARNING)
-      MESSAGE(STATUS 
-        "Googlemock was not found. gtest-based unit tests will be disabled. "
-        "You can run cmake . -DENABLE_DOWNLOADS=1 to automatically download "
-        "and build required components from source.")
-      HTTP_PROXY_HINT()
-      SET(ONETIME_GTEST_WARNING 1 CACHE INTERNAL "")
-    ENDIF()
+    # Give warning
+    MESSAGE(STATUS
+      "Googletest was not found. gtest-based unit tests will be disabled. "
+      "You can run cmake . -DENABLE_DOWNLOADS=1 to automatically download "
+      "and build required components from source.")
+    HTTP_PROXY_HINT()
     RETURN()
   ENDIF()
   
-  # Download gmock source
+  # Download googletest source
   IF(NOT EXISTS ${GMOCK_SOURCE_DIR})
     IF(NOT EXISTS ${DOWNLOAD_ROOT}/${GMOCK_TARBALL})
       # Download the tarball
@@ -136,7 +159,7 @@ IF(NOT GMOCK_FOUND)
           "Successfully downloaded ${GMOCK_DOWNLOAD_URL} to ${DOWNLOAD_ROOT}")
       ELSE()
         MESSAGE(STATUS 
-          "To enable google test, please download ${GMOCK_DOWNLOAD_URL} "
+          "To enable googletest, please download ${GMOCK_DOWNLOAD_URL} "
           "to the directory ${DOWNLOAD_ROOT}")
         HTTP_PROXY_HINT()
         RETURN()
index 81ad1b828e5ccedc9499eb19cc4935b65b6a2ffe..c56211ef21efd692593f5e0b1ee9849ffee8c889 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2011, 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
@@ -472,9 +472,9 @@ TEST_F(GroupTest, Group_containers)
   push_errtext();                                                       \
   for (int method_i= 0, combination_i= 0; method_i < MAX_METHOD; method_i++) { \
     for (int sid_map_i= 0; sid_map_i < MAX_SID_MAP; sid_map_i++, combination_i++) { \
-      Gtid_set &gtid_set __attribute__((unused))=                       \
+      Gtid_set &gtid_set MY_ATTRIBUTE((unused))=                       \
         containers[combination_i]->gtid_set;                            \
-      Sid_map *&sid_map __attribute__((unused))=                        \
+      Sid_map *&sid_map MY_ATTRIBUTE((unused))=                        \
         sid_maps[sid_map_i];                                            \
       append_errtext(__LINE__,                                          \
                      "sid_map_i=%d method_i=%d combination_i=%d",       \
@@ -489,13 +489,13 @@ TEST_F(GroupTest, Group_containers)
     for (int end_i= 0; end_i < MAX_END; end_i++) {                      \
       for (int empty_i= 0; empty_i < MAX_EMPTY; empty_i++) {            \
         for (int anon_i= 0; anon_i < MAX_ANON; anon_i++, combination_i++) { \
-          Gtid_set &gtid_set __attribute__((unused))=                   \
+          Gtid_set &gtid_set MY_ATTRIBUTE((unused))=                   \
             containers[combination_i]->gtid_set;                        \
-          Group_cache &stmt_cache __attribute__((unused))=              \
+          Group_cache &stmt_cache MY_ATTRIBUTE((unused))=              \
             containers[combination_i]->stmt_cache;                      \
-          Group_cache &trx_cache __attribute__((unused))=               \
+          Group_cache &trx_cache MY_ATTRIBUTE((unused))=               \
             containers[combination_i]->trx_cache;                       \
-          Group_log_state &group_log_state __attribute__((unused))=     \
+          Group_log_state &group_log_state MY_ATTRIBUTE((unused))=     \
             containers[combination_i]->group_log_state;                 \
           append_errtext(__LINE__,                                      \
                          "type_i=%d end_i=%d empty_i=%d "               \
index d1400787c02925f3cf733ae189bf12893fcc1696..f3aeb910007904fb478a8002c7eca8bf628b5b3a 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2011, 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
@@ -46,8 +46,9 @@ void setup_server_for_unit_tests()
                    const_cast<char*>("--log_syslog=0"),
                    const_cast<char*>("--explicit_defaults_for_timestamp"),
                    const_cast<char*>("--datadir=" DATA_DIR),
+                   const_cast<char*>("--secure-file-priv=NULL"),
                    const_cast<char*>("--lc-messages-dir=" ERRMSG_DIR), 0 };
-  set_remaining_args(5, argv);
+  set_remaining_args(6, argv);
   mysql_mutex_init(key_LOCK_error_log, &LOCK_error_log, MY_MUTEX_INIT_FAST);
   system_charset_info= &my_charset_utf8_general_ci;
   sys_var_init();
index fc5464bd64f5aa931b3eff5f26b0a04affc1f843..674ede557ee2b7cd4e02eb2f4666571829b80138 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2012, 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
@@ -30,3 +30,4 @@ STRING(REGEX REPLACE "-Werror( |$)" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
 ADD_EXECUTABLE(yassl-t yassl-t.cc)
 TARGET_LINK_LIBRARIES(yassl-t gunit_small sqlgunitlib strings dbug regex)
 TARGET_LINK_LIBRARIES(yassl-t ${LIBSOCKET})
+ADD_TEST(yassl yassl-t)
index 506c4fe03f79564ad1b380dac1c97f5543964eff..979479bad62784be25ea3ee048e63963d3020c5b 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved. 
+/* Copyright (c) 2006, 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
@@ -126,7 +126,7 @@ void plan(int const count);
 */
 
 void ok(int const pass, char const *fmt, ...)
-  __attribute__((format(printf,2,3)));
+  MY_ATTRIBUTE((format(printf,2,3)));
 
 
 /**
@@ -169,7 +169,7 @@ void ok1(int const pass);
  */
 
 void skip(int how_many, char const *reason, ...)
-    __attribute__((format(printf,2,3)));
+    MY_ATTRIBUTE((format(printf,2,3)));
 
 
 /**
@@ -218,7 +218,7 @@ void skip(int how_many, char const *reason, ...)
  */
 
 void diag(char const *fmt, ...)
-  __attribute__((format(printf,1,2)));
+  MY_ATTRIBUTE((format(printf,1,2)));
 
 
 /**
@@ -240,7 +240,7 @@ void diag(char const *fmt, ...)
 */
 
 void BAIL_OUT(char const *fmt, ...)
-  __attribute__((noreturn, format(printf,1,2)));
+  MY_ATTRIBUTE((noreturn, format(printf,1,2)));
 
 
 /**
@@ -271,7 +271,7 @@ int exit_status(void);
  */
 
 void skip_all(char const *reason, ...)
-  __attribute__((noreturn, format(printf, 1, 2)));
+  MY_ATTRIBUTE((noreturn, format(printf, 1, 2)));
 
 
 /**
@@ -296,7 +296,7 @@ void skip_all(char const *reason, ...)
 */
 
 void todo_start(char const *message, ...)
-  __attribute__((format(printf, 1, 2)));
+  MY_ATTRIBUTE((format(printf, 1, 2)));
 
 
 /**
index 93fdb06375466906f6c2ef61e4e080688eab77ca..bb67723c13c963744425f102928faa2d896d90ff 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 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
@@ -40,7 +40,7 @@ fatal_error(  const char*     r)
 }
 
 int
-main(  int     argc __attribute__((unused)),
+main(  int     argc MY_ATTRIBUTE((unused)),
        char**  argv)
 {
        char    client_key[] = "../SSL/client-key.pem", client_cert[] = "../SSL/client-cert.pem";
index c81dc03dc58065fc4e2c5e484521628409970a49..62e4e4c3868cbd90b6fbf6b7df17c117374e357e 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 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
@@ -75,7 +75,7 @@ client_thread(        void*   arg)
 }
 
 int
-main(int argc __attribute__((unused)), char** argv)
+main(int argc MY_ATTRIBUTE((unused)), char** argv)
 {
        char    server_key[] = "../SSL/server-key.pem",
                server_cert[] = "../SSL/server-cert.pem";
index 206d94e9438ec7e3e9e3a7f4118f2e09aee96885..1381b30b1138e54c955b0a48aa3d20a4a1b2727d 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 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
   @retval 1       The requested I/O event has occurred.
 */
 
-static int no_io_wait(Vio *vio __attribute__((unused)),
-                      enum enum_vio_io_event event __attribute__((unused)),
-                      int timeout __attribute__((unused)))
+static int no_io_wait(Vio *vio MY_ATTRIBUTE((unused)),
+                      enum enum_vio_io_event event MY_ATTRIBUTE((unused)),
+                      int timeout MY_ATTRIBUTE((unused)))
 {
   return 1;
 }
 
 #endif
 
-static my_bool has_no_data(Vio *vio __attribute__((unused)))
+static my_bool has_no_data(Vio *vio MY_ATTRIBUTE((unused)))
 {
   return FALSE;
 }
@@ -177,7 +177,7 @@ static void vio_init(Vio *vio, enum enum_vio_type type,
 */
 
 my_bool vio_reset(Vio* vio, enum enum_vio_type type,
-                  my_socket sd, void *ssl __attribute__((unused)), uint flags)
+                  my_socket sd, void *ssl MY_ATTRIBUTE((unused)), uint flags)
 {
   int ret= FALSE;
   Vio new_vio;
index 744a8fe32f068d9674f24ba578d31bd0bcc4d48c..48998fab53b2867ff573aba062a6d1ed22d72e0d 100644 (file)
@@ -1,5 +1,5 @@
 /*
-   Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved.
+   Copyright (c) 2001, 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
@@ -29,7 +29,7 @@
 # include <sys/filio.h>
 #endif
 
-int vio_errno(Vio *vio __attribute__((unused)))
+int vio_errno(Vio *vio MY_ATTRIBUTE((unused)))
 {
   /* These transport types are not Winsock based. */
 #ifdef _WIN32
@@ -247,8 +247,8 @@ static int vio_set_blocking(Vio *vio, my_bool status)
 
 
 int vio_socket_timeout(Vio *vio,
-                       uint which __attribute__((unused)),
-                       my_bool old_mode __attribute__((unused)))
+                       uint which MY_ATTRIBUTE((unused)),
+                       my_bool old_mode MY_ATTRIBUTE((unused)))
 {
   int ret= 0;
   DBUG_ENTER("vio_socket_timeout");
@@ -314,7 +314,7 @@ int vio_socket_timeout(Vio *vio,
 }
 
 
-int vio_fastsend(Vio * vio __attribute__((unused)))
+int vio_fastsend(Vio * vio MY_ATTRIBUTE((unused)))
 {
   int r=0;
   DBUG_ENTER("vio_fastsend");
@@ -735,7 +735,7 @@ static my_bool socket_peek_read(Vio *vio, uint *bytes)
 int vio_io_wait(Vio *vio, enum enum_vio_io_event event, int timeout)
 {
   int ret;
-  short revents __attribute__((unused)) = 0;
+  short revents MY_ATTRIBUTE((unused)) = 0;
   struct pollfd pfd;
   my_socket sd= mysql_socket_getfd(vio->mysql_socket);
   MYSQL_SOCKET_WAIT_VARIABLES(locker, state) /* no ';' */
index aef870032bea81a499c50cdc3bb282d8f631be07..46087f476f35a14b43f2e097c74615574472b3f1 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 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
@@ -253,7 +253,7 @@ new_VioSSLFd(const char *key_file, const char *cert_file,
   }
 
   /* Load certs from the trusted ca */
-  if (SSL_CTX_load_verify_locations(ssl_fd->ssl_context, ca_file, ca_path) == 0)
+  if (SSL_CTX_load_verify_locations(ssl_fd->ssl_context, ca_file, ca_path) <= 0)
   {
     DBUG_PRINT("warning", ("SSL_CTX_load_verify_locations failed"));
     if (ca_file || ca_path)
index bab5329dc028d3b0f0d5d3c7de285f64b7463b19..5f1ea63cc4037160e5a655b3e819ffd9e10add66 100644 (file)
@@ -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(
index c330c77718f4e6690a665e0c85e8c01d7741edd7..904f9a1c4775cf8902375478f7108e2ac03ee9c8 100644 (file)
@@ -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));