]> review.fuel-infra Code Review - packages/trusty/mysql-wsrep-5.6.git/commitdiff
mysql 5.6.41 + wsrep v25 42/39242/2
authorDenis V. Meltsaykin <dmeltsaykin@mirantis.com>
Mon, 10 Sep 2018 10:13:17 +0000 (12:13 +0200)
committerDenis V. Meltsaykin <dmeltsaykin@mirantis.com>
Mon, 10 Sep 2018 10:56:11 +0000 (12:56 +0200)
  * Import mysql-wsrep 5.6.41 from codership
    https://github.com/codership/mysql-wsrep/
  * Import wsrep-API v25 since it's now a submodule
    https://github.com/codership/wsrep-API/tree/v25

Change-Id: I0b017a3836e542e60bf2e019f3e3fe4675a00b34
Closes-Bug: #1778751

244 files changed:
debian/changelog
mysql-wsrep-5.6/Docs/ChangeLog
mysql-wsrep-5.6/VERSION
mysql-wsrep-5.6/client/mysqldump.c
mysql-wsrep-5.6/client/mysqltest.cc
mysql-wsrep-5.6/cmake/bison.cmake
mysql-wsrep-5.6/cmake/plugin.cmake
mysql-wsrep-5.6/cmake/wsrep.cmake
mysql-wsrep-5.6/include/mysql_com.h
mysql-wsrep-5.6/include/sql_common.h
mysql-wsrep-5.6/libmysqld/CMakeLists.txt
mysql-wsrep-5.6/libmysqld/libmysqld.c
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 [deleted file]
mysql-wsrep-5.6/man/mysql-test-run.pl.1 [deleted file]
mysql-wsrep-5.6/man/mysql.1
mysql-wsrep-5.6/man/mysql.server.1
mysql-wsrep-5.6/man/mysql_client_test.1 [deleted file]
mysql-wsrep-5.6/man/mysql_client_test_embedded.1 [deleted file]
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 [deleted file]
mysql-wsrep-5.6/man/mysqltest_embedded.1 [deleted file]
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/collections/default.experimental
mysql-wsrep-5.6/mysql-test/extra/rpl_tests/rpl_binlog_max_cache_size.test
mysql-wsrep-5.6/mysql-test/extra/rpl_tests/rpl_db_stmts_ignored.inc [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/extra/rpl_tests/rpl_row_idempotency.test
mysql-wsrep-5.6/mysql-test/extra/rpl_tests/rpl_start_stop_slave.test
mysql-wsrep-5.6/mysql-test/include/check_openssl_version.inc [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/include/have_openssl_support.inc [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/include/mtr_check.sql
mysql-wsrep-5.6/mysql-test/include/mtr_warnings.sql
mysql-wsrep-5.6/mysql-test/include/wait_for_slave_param.inc
mysql-wsrep-5.6/mysql-test/include/wait_for_slave_sql_to_start.inc
mysql-wsrep-5.6/mysql-test/mysql-test-run.pl
mysql-wsrep-5.6/mysql-test/r/grant.result
mysql-wsrep-5.6/mysql-test/r/import_schema_mismatch.result [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/r/limit.result
mysql-wsrep-5.6/mysql-test/r/mysqld--help-notwin.result
mysql-wsrep-5.6/mysql-test/r/sp_debug.result [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/r/ssl_verify_identity.result [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/r/union.result
mysql-wsrep-5.6/mysql-test/std_data/ca-cert-verify-san.pem [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/std_data/client-cert-verify-san.pem [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/std_data/client-key-verify-san.pem [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/std_data/server-cert-verify-san.pem [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/std_data/server-key-verify-san.pem [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/binlog/r/binlog_cache_write_failure.result [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/binlog/t/binlog_cache_write_failure-master.opt [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/binlog/t/binlog_cache_write_failure.test [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/binlog/t/disabled.def
mysql-wsrep-5.6/mysql-test/suite/galera/galera_2nodes_as_master_slave.cnf [deleted file]
mysql-wsrep-5.6/mysql-test/suite/galera/galera_2nodes_as_master_with_repl_filter.cnf [deleted file]
mysql-wsrep-5.6/mysql-test/suite/galera/r/MW-369.result
mysql-wsrep-5.6/mysql-test/suite/galera/r/galera#500.result [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/galera/r/galera#505.result [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/galera/r/galera_defaults.result
mysql-wsrep-5.6/mysql-test/suite/galera/r/lp1376747-4.result
mysql-wsrep-5.6/mysql-test/suite/galera/r/mysql-wsrep#332.result [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/galera/t/MW-369.test
mysql-wsrep-5.6/mysql-test/suite/galera/t/disabled.def
mysql-wsrep-5.6/mysql-test/suite/galera/t/galera#500.test [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/galera/t/galera#505.test [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_gcache_recover_manytrx.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_wan_restart_ist.test
mysql-wsrep-5.6/mysql-test/suite/galera/t/galera_wan_restart_sst.test
mysql-wsrep-5.6/mysql-test/suite/galera/t/lp1376747-4.test
mysql-wsrep-5.6/mysql-test/suite/galera/t/mysql-wsrep#332.test [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/galera_3nodes/r/galera_evs_suspect_timeout.result
mysql-wsrep-5.6/mysql-test/suite/galera_3nodes/r/galera_pc_weight.result
mysql-wsrep-5.6/mysql-test/suite/galera_3nodes/t/disabled.def [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/galera_3nodes/t/galera_evs_suspect_timeout.test
mysql-wsrep-5.6/mysql-test/suite/galera_3nodes/t/galera_pc_weight.test
mysql-wsrep-5.6/mysql-test/suite/innodb/r/bulk_create_index_online.result [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/innodb/r/innodb-alter.result
mysql-wsrep-5.6/mysql-test/suite/innodb/r/innodb-wl5522.result
mysql-wsrep-5.6/mysql-test/suite/innodb/t/bulk_create_index_online.test [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/innodb/t/disabled.def
mysql-wsrep-5.6/mysql-test/suite/innodb/t/innodb-alter.test
mysql-wsrep-5.6/mysql-test/suite/innodb_fts/r/innodb-fts-basic.result
mysql-wsrep-5.6/mysql-test/suite/innodb_fts/t/innodb-fts-basic.test
mysql-wsrep-5.6/mysql-test/suite/parts/t/disabled.def
mysql-wsrep-5.6/mysql-test/suite/perfschema/t/disabled.def
mysql-wsrep-5.6/mysql-test/suite/rpl/r/rpl_connection.result
mysql-wsrep-5.6/mysql-test/suite/rpl/r/rpl_db_stmts_ignored.result [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/rpl/r/rpl_heartbeat_basic.result
mysql-wsrep-5.6/mysql-test/suite/rpl/r/rpl_master_connection.result
mysql-wsrep-5.6/mysql-test/suite/rpl/r/rpl_mixed_binlog_max_cache_size.result
mysql-wsrep-5.6/mysql-test/suite/rpl/r/rpl_mts_stop_slave_report_pos.result [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/rpl/r/rpl_row_binlog_max_cache_size.result
mysql-wsrep-5.6/mysql-test/suite/rpl/r/rpl_row_corruption.result
mysql-wsrep-5.6/mysql-test/suite/rpl/r/rpl_slave_load_tmpdir_not_exist.result
mysql-wsrep-5.6/mysql-test/suite/rpl/r/rpl_ssl1.result
mysql-wsrep-5.6/mysql-test/suite/rpl/r/rpl_stm_binlog_max_cache_size.result
mysql-wsrep-5.6/mysql-test/suite/rpl/t/disabled.def
mysql-wsrep-5.6/mysql-test/suite/rpl/t/rpl_apply_binlog_with_gtid_when_gtid_mode_off.test
mysql-wsrep-5.6/mysql-test/suite/rpl/t/rpl_change_master_dbug.test
mysql-wsrep-5.6/mysql-test/suite/rpl/t/rpl_connection.test
mysql-wsrep-5.6/mysql-test/suite/rpl/t/rpl_db_stmts_ignored.test [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/rpl/t/rpl_heartbeat_basic.test
mysql-wsrep-5.6/mysql-test/suite/rpl/t/rpl_master_connection.test
mysql-wsrep-5.6/mysql-test/suite/rpl/t/rpl_mts_stop_slave_report_pos-slave.opt [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/rpl/t/rpl_mts_stop_slave_report_pos.test [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/suite/rpl/t/rpl_parallel_start_stop.test
mysql-wsrep-5.6/mysql-test/suite/rpl/t/rpl_rotate_row_trans.test
mysql-wsrep-5.6/mysql-test/suite/rpl/t/rpl_row_corruption.test
mysql-wsrep-5.6/mysql-test/suite/rpl/t/rpl_slave_grp_exec.test
mysql-wsrep-5.6/mysql-test/suite/rpl/t/rpl_slave_load_tmpdir_not_exist.test
mysql-wsrep-5.6/mysql-test/suite/rpl/t/rpl_slave_status.test
mysql-wsrep-5.6/mysql-test/suite/rpl/t/rpl_sql_thread_error.test
mysql-wsrep-5.6/mysql-test/suite/rpl/t/rpl_ssl1.test
mysql-wsrep-5.6/mysql-test/t/disabled.def
mysql-wsrep-5.6/mysql-test/t/import_schema_mismatch.test [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/t/limit.test
mysql-wsrep-5.6/mysql-test/t/mysqld--defaults-file.test
mysql-wsrep-5.6/mysql-test/t/sp_debug.test [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/t/ssl_verify_identity-master.opt [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/t/ssl_verify_identity.test [new file with mode: 0644]
mysql-wsrep-5.6/mysql-test/t/union.test
mysql-wsrep-5.6/mysys/lf_hash.c
mysql-wsrep-5.6/packaging/WiX/AdminBackground.jpg
mysql-wsrep-5.6/packaging/WiX/AdminHeader.jpg
mysql-wsrep-5.6/packaging/WiX/CMakeLists.txt
mysql-wsrep-5.6/packaging/WiX/MySQLServer.ico
mysql-wsrep-5.6/packaging/WiX/ca/CMakeLists.txt [deleted file]
mysql-wsrep-5.6/packaging/WiX/ca/CustomAction.cpp [deleted file]
mysql-wsrep-5.6/packaging/WiX/ca/CustomAction.def [deleted file]
mysql-wsrep-5.6/packaging/WiX/create_msi.cmake.in
mysql-wsrep-5.6/packaging/WiX/mysql_server.wxs.in
mysql-wsrep-5.6/packaging/deb-in/CMakeLists.txt
mysql-wsrep-5.6/packaging/deb-in/copyright.com.in
mysql-wsrep-5.6/packaging/deb-in/copyright.gpl.in
mysql-wsrep-5.6/packaging/deb-in/mysql-packagesource-test-SERIES.install.in
mysql-wsrep-5.6/packaging/deb-in/rules.in
mysql-wsrep-5.6/packaging/rpm-fedora/mysql.spec.in
mysql-wsrep-5.6/packaging/rpm-oel/mysql.spec.in
mysql-wsrep-5.6/packaging/rpm-sles/mysql.spec.in
mysql-wsrep-5.6/plugin/connection_control/connection_delay.cc
mysql-wsrep-5.6/plugin/innodb_memcached/innodb_memcache/src/innodb_engine.c
mysql-wsrep-5.6/scripts/wsrep_sst_rsync.sh
mysql-wsrep-5.6/sql-common/client.c
mysql-wsrep-5.6/sql-common/my_path_permissions.cc [new file with mode: 0644]
mysql-wsrep-5.6/sql-common/pack.c
mysql-wsrep-5.6/sql/CMakeLists.txt
mysql-wsrep-5.6/sql/binlog.cc
mysql-wsrep-5.6/sql/event_db_repository.cc
mysql-wsrep-5.6/sql/gcalc_slicescan.h
mysql-wsrep-5.6/sql/gcalc_tools.cc
mysql-wsrep-5.6/sql/ha_partition.cc
mysql-wsrep-5.6/sql/item.cc
mysql-wsrep-5.6/sql/item_strfunc.cc
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/mysqld.cc
mysql-wsrep-5.6/sql/rpl_slave.cc
mysql-wsrep-5.6/sql/share/errmsg-utf8.txt
mysql-wsrep-5.6/sql/sp.cc
mysql-wsrep-5.6/sql/sp_instr.cc
mysql-wsrep-5.6/sql/sql_acl.cc
mysql-wsrep-5.6/sql/sql_alter.cc
mysql-wsrep-5.6/sql/sql_audit.cc
mysql-wsrep-5.6/sql/sql_audit.h
mysql-wsrep-5.6/sql/sql_class.h
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_plugin.cc
mysql-wsrep-5.6/sql/sql_prepare.cc
mysql-wsrep-5.6/sql/sql_priv.h
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/wsrep_applier.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_priv.h
mysql-wsrep-5.6/sql/wsrep_sst.cc
mysql-wsrep-5.6/sql/wsrep_xid.h
mysql-wsrep-5.6/storage/innobase/dict/dict0dict.cc
mysql-wsrep-5.6/storage/innobase/fts/fts0fts.cc
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/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/row0mysql.cc
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_locking.c
mysql-wsrep-5.6/storage/perfschema/unittest/pfs-t.cc
mysql-wsrep-5.6/support-files/mysql.server.sh
mysql-wsrep-5.6/support-files/mysql.spec.sh
mysql-wsrep-5.6/wsrep/CMakeLists.txt
mysql-wsrep-5.6/wsrep/Makefile.am [deleted file]
mysql-wsrep-5.6/wsrep/src/CMakeLists.txt [new file with mode: 0644]
mysql-wsrep-5.6/wsrep/src/COPYING [new file with mode: 0644]
mysql-wsrep-5.6/wsrep/src/README.md [new file with mode: 0644]
mysql-wsrep-5.6/wsrep/src/wsrep.xcf [new file with mode: 0644]
mysql-wsrep-5.6/wsrep/src/wsrep_api.h [moved from mysql-wsrep-5.6/wsrep/wsrep_api.h with 100% similarity]
mysql-wsrep-5.6/wsrep/src/wsrep_dummy.c [moved from mysql-wsrep-5.6/wsrep/wsrep_dummy.c with 100% similarity]
mysql-wsrep-5.6/wsrep/src/wsrep_gtid.c [moved from mysql-wsrep-5.6/wsrep/wsrep_gtid.c with 100% similarity]
mysql-wsrep-5.6/wsrep/src/wsrep_listener.c [new file with mode: 0644]
mysql-wsrep-5.6/wsrep/src/wsrep_loader.c [moved from mysql-wsrep-5.6/wsrep/wsrep_loader.c with 98% similarity]
mysql-wsrep-5.6/wsrep/src/wsrep_uuid.c [moved from mysql-wsrep-5.6/wsrep/wsrep_uuid.c with 100% similarity]

index 62dc0e70adae20010c6d29233831553b31dc3846..5b87e53773653d2b2a0304640837b44b3694219f 100644 (file)
@@ -1,3 +1,12 @@
+mysql-wsrep-5.6 (5.6.41-0~u14.04+mos0) mos; urgency=medium
+
+  * Import mysql-wsrep 5.6.41 from codership
+    https://github.com/codership/mysql-wsrep/
+  * Import wsrep-API v25 since it's now a submodule
+    https://github.com/codership/wsrep-API/tree/v25
+
+ -- Denis Meltsaykin <dmeltsaykin@mirantis.com> Mon, 10 Sep 2018 12:12:00 +0200
+
 mysql-wsrep-5.6 (5.6.39-0~u14.04+mos1) mos; urgency=medium
 
   * Add percona-xtrabackup (>= 2.3.7) as a run-time dependency
index e1775d5f3b3ba7f1afa91246207922179ba1a7df..b38dfbc5cf6bf6ebf9cf9d96bbc514ac42ea87f9 100644 (file)
@@ -1,2 +1,2 @@
-Placeholder
-
+You can find a detailed list of changes at
+  to https://github.com/mysql/mysql-server/commits/5.6
index 0afdda619192eaab81a4c34d667c72e0e6413fe1..5733cb3f2fb69987c854c9d2a5cb74224bf8c2e7 100644 (file)
@@ -1,4 +1,4 @@
 MYSQL_VERSION_MAJOR=5
 MYSQL_VERSION_MINOR=6
-MYSQL_VERSION_PATCH=39
+MYSQL_VERSION_PATCH=41
 MYSQL_VERSION_EXTRA=
index ff25a110f1cb981f92bea89ff25b86491f03cd2a..6b6b212ceae6f5d2f7f9547b5e00b0de213c4f96 100644 (file)
@@ -1,5 +1,5 @@
 /*
-   Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
+   Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -582,7 +582,8 @@ static int dump_tablespaces_for_databases(char** databases);
 static int dump_tablespaces(char* ts_where);
 static void print_comment(FILE *sql_file, my_bool is_error, const char *format,
                           ...);
-static const char* fix_identifier_with_newline(char*);
+static char const* fix_identifier_with_newline(char const* object_name,
+                                               my_bool* freemem);
 
 
 /*
@@ -677,13 +678,19 @@ static void write_header(FILE *sql_file, char *db_name)
   }
   else if (!opt_compact)
   {
+    my_bool freemem= FALSE;
+    char const* text= fix_identifier_with_newline(db_name, &freemem);
+
     print_comment(sql_file, 0,
                   "-- MySQL dump %s  Distrib %s, for %s (%s)\n--\n",
                   DUMP_VERSION, MYSQL_SERVER_VERSION, SYSTEM_TYPE,
                   MACHINE_TYPE);
     print_comment(sql_file, 0, "-- Host: %s    Database: %s\n",
                   current_host ? current_host : "localhost",
-                  db_name ? fix_identifier_with_newline(db_name) : "");
+                  text);
+    if (freemem)
+      my_free((void*)text);
+
     print_comment(sql_file, 0,
                   "-- ------------------------------------------------------\n"
                  );
@@ -2037,31 +2044,84 @@ static void print_comment(FILE *sql_file, my_bool is_error, const char *format,
   print_xml_comment(sql_file, strlen(comment_buff), comment_buff);
 }
 
-/*
- This function accepts object names and prefixes -- wherever \n
- character is found.
 
- @param[in]     object_name
+/**
+  @brief Accepts object names and prefixes them with "-- " wherever
+         end-of-line character ('\n') is found.
 
- @return
-    @retval fixed object name.
-*/
+  @param[in]  object_name   object name list (concatenated string)
+  @param[out] freemem       should buffer be released after usage
 
-static const char* fix_identifier_with_newline(char* object_name)
+  @return
+    @retval                 pointer to a string with prefixed objects
+*/
+static char const* fix_identifier_with_newline(char const* object_name, my_bool* freemem)
 {
-  static char buff[COMMENT_LENGTH]= {0};
-  char *ptr= buff;
-  memset(buff, 0, 255);
-  while(*object_name)
+  const size_t PREFIX_LENGTH= 3; // strlen ("-- ")
+
+  // static buffer for replacement procedure
+  static char storage[NAME_LEN + 1];
+  static char* buffer= storage;
+  static size_t buffer_size= sizeof(storage) - 1;
+  size_t index= 0;
+  size_t required_size= 0;
+
+  // we presume memory allocation won't be needed
+  *freemem= FALSE;
+
+  // traverse and reformat objects
+  while (object_name && *object_name)
   {
-    *ptr++ = *object_name;
+    ++required_size;
     if (*object_name == '\n')
-      ptr= strmov(ptr, "-- ");
-    object_name++;
+      required_size+= PREFIX_LENGTH;
+
+    // do we need dynamic (re)allocation
+    if (required_size > buffer_size)
+    {
+      // new alloc size increased in COMMENT_LENGTH multiple
+      buffer_size= COMMENT_LENGTH * (1 + required_size/COMMENT_LENGTH);
+
+      // is our buffer already dynamically allocated
+      if (*freemem)
+      {
+        // just realloc
+        buffer= (char*)my_realloc(buffer, buffer_size + 1, MYF(MY_WME));
+        if (!buffer)
+          exit(1);
+      }
+      else
+      {
+        // dynamic allocation + copy from static buffer
+        buffer= (char*)my_malloc(buffer_size + 1, MYF(MY_WME));
+        if (!buffer)
+          exit(1);
+
+        strncpy(buffer, storage, index);
+        *freemem= TRUE;
+      }
+    }
+
+    // copy a character
+    buffer[index]= *object_name;
+    ++index;
+
+    // prefix new lines with double dash
+    if (*object_name == '\n')
+    {
+      strcpy(buffer + index, "-- ");
+      index += PREFIX_LENGTH;
+    }
+
+    ++object_name;
   }
-  return buff;
+
+  // don't forget null termination
+  buffer[index]= '\0';
+  return buffer;
 }
 
+
 /*
  create_delimiter
  Generate a new (null-terminated) string that does not exist in  query 
@@ -2121,6 +2181,8 @@ static uint dump_events_for_db(char *db)
 
   char       db_cl_name[MY_CS_NAME_SIZE];
   int        db_cl_altered= FALSE;
+  my_bool    freemem= FALSE;
+  char const *text= fix_identifier_with_newline(db, &freemem);
 
   DBUG_ENTER("dump_events_for_db");
   DBUG_PRINT("enter", ("db: '%s'", db));
@@ -2130,7 +2192,9 @@ static uint dump_events_for_db(char *db)
   /* nice comments */
   print_comment(sql_file, 0,
                 "\n--\n-- Dumping events for database '%s'\n--\n",
-                fix_identifier_with_newline(db));
+                text);
+  if (freemem)
+    my_free((void*)text);
 
   /*
     not using "mysql_query_with_error_report" because we may have not
@@ -2339,6 +2403,8 @@ static uint dump_routines_for_db(char *db)
 
   char       db_cl_name[MY_CS_NAME_SIZE];
   int        db_cl_altered= FALSE;
+  my_bool    freemem= FALSE;
+  char const *text= fix_identifier_with_newline(db, &freemem);
 
   DBUG_ENTER("dump_routines_for_db");
   DBUG_PRINT("enter", ("db: '%s'", db));
@@ -2347,8 +2413,10 @@ static uint dump_routines_for_db(char *db)
 
   /* nice comments */
   print_comment(sql_file, 0,
-                "\n--\n-- Dumping routines for database '%s'\n--\n",
-                fix_identifier_with_newline(db));
+                "\n--\n-- Dumping routines for database '%s'\n--\n", text);
+
+  if (freemem)
+    my_free((void*)text);
 
   /*
     not using "mysql_query_with_error_report" because we may have not
@@ -2403,11 +2471,17 @@ static uint dump_routines_for_db(char *db)
                              row[2] ? strlen(row[2]) : 0));
           if (row[2] == NULL)
           {
+            my_bool freemem= FALSE;
+            char const* text= fix_identifier_with_newline(current_user, &freemem);
+
             print_comment(sql_file, 1, "\n-- insufficient privileges to %s\n",
                           query_buff);
             print_comment(sql_file, 1,
                           "-- does %s have permissions on mysql.proc?\n\n",
-                          fix_identifier_with_newline(current_user));
+                          text);
+            if (freemem)
+              my_free((void*)text);
+
             maybe_die(EX_MYSQLERR,"%s has insufficent privileges to %s!", current_user, query_buff);
           }
           else if (strlen(row[2]))
@@ -2602,6 +2676,8 @@ static uint get_table_structure(char *table, char *db, char *table_type,
       /* Make an sql-file, if path was given iow. option -T was given */
       char buff[20+FN_REFLEN];
       MYSQL_FIELD *field;
+      my_bool freemem= FALSE;
+      char const *text;
 
       my_snprintf(buff, sizeof(buff), "show create table %s", result_table);
 
@@ -2618,14 +2694,17 @@ static uint get_table_structure(char *table, char *db, char *table_type,
         write_header(sql_file, db);
       }
 
+      text= fix_identifier_with_newline(result_table, &freemem);
       if (strcmp (table_type, "VIEW") == 0)         /* view */
         print_comment(sql_file, 0,
                       "\n--\n-- Temporary table structure for view %s\n--\n\n",
-                      fix_identifier_with_newline(result_table));
+                      text);
       else
         print_comment(sql_file, 0,
-                      "\n--\n-- Table structure for table %s\n--\n\n",
-                      fix_identifier_with_newline(result_table));
+                      "\n--\n-- Table structure for table %s\n--\n\n", text);
+
+      if (freemem)
+        my_free((void*)text);
 
       if (opt_drop)
       {
@@ -2851,6 +2930,9 @@ static uint get_table_structure(char *table, char *db, char *table_type,
     /* Make an sql-file, if path was given iow. option -T was given */
     if (!opt_no_create_info)
     {
+      my_bool freemem= FALSE;
+      char const *text;
+
       if (path)
       {
         if (!(sql_file= open_sql_file_for_table(table, O_WRONLY)))
@@ -2858,9 +2940,13 @@ static uint get_table_structure(char *table, char *db, char *table_type,
         write_header(sql_file, db);
       }
 
+      text= fix_identifier_with_newline(result_table, &freemem);
       print_comment(sql_file, 0,
                     "\n--\n-- Table structure for table %s\n--\n\n",
-                    fix_identifier_with_newline(result_table));
+                    text);
+      if (freemem)
+        my_free((void*)text);
+
       if (opt_drop)
         fprintf(sql_file, "DROP TABLE IF EXISTS %s;\n", result_table);
       if (!opt_xml)
@@ -3556,25 +3642,34 @@ static void dump_table(char *table, char *db)
   }
   else
   {
-    print_comment(md_result_file, 0,
-                  "\n--\n-- Dumping data for table %s\n--\n",
-                  fix_identifier_with_newline(result_table));
-    
+    my_bool freemem= FALSE;
+    char const* text= fix_identifier_with_newline(result_table, &freemem);
+    print_comment(md_result_file, 0, "\n--\n-- Dumping data for table %s\n--\n",
+                  text);
+    if (freemem)
+      my_free((void*)text);
+
     dynstr_append_checked(&query_string, "SELECT /*!40001 SQL_NO_CACHE */ * FROM ");
     dynstr_append_checked(&query_string, result_table);
 
     if (where)
     {
-      print_comment(md_result_file, 0, "-- WHERE:  %s\n",
-        fix_identifier_with_newline(where));
+      freemem= FALSE;
+      text= fix_identifier_with_newline(where, &freemem);
+      print_comment(md_result_file, 0, "-- WHERE:  %s\n", text);
+      if (freemem)
+        my_free((void*)text);
 
       dynstr_append_checked(&query_string, " WHERE ");
       dynstr_append_checked(&query_string, where);
     }
     if (order_by)
     {
-      print_comment(md_result_file, 0, "-- ORDER BY:  %s\n",
-        fix_identifier_with_newline(order_by));
+      freemem= FALSE;
+      text= fix_identifier_with_newline(order_by, &freemem);
+      print_comment(md_result_file, 0, "-- ORDER BY:  %s\n", text);
+      if (freemem)
+        my_free((void*)text);
 
       dynstr_append_checked(&query_string, " ORDER BY ");
       dynstr_append_checked(&query_string, order_by);
@@ -4398,10 +4493,13 @@ static int init_dumping(char *database, int init_func(char*))
       */
       char quoted_database_buf[NAME_LEN*2+3];
       char *qdatabase= quote_name(database,quoted_database_buf,opt_quoted);
+      my_bool freemem= FALSE;
+      char const* text= fix_identifier_with_newline(qdatabase, &freemem);
 
-      print_comment(md_result_file, 0,
-                    "\n--\n-- Current Database: %s\n--\n",
-                    fix_identifier_with_newline(qdatabase));
+      print_comment(md_result_file, 0, "\n--\n-- Current Database: %s\n--\n",
+                    text);
+      if (freemem)
+        my_free((void*)text);
 
       /* Call the view or table specific function */
       init_func(qdatabase);
@@ -5581,6 +5679,8 @@ static my_bool get_view_structure(char *table, char* db)
   char       table_buff2[NAME_LEN*2+3];
   char       query[QUERY_LENGTH];
   FILE       *sql_file= md_result_file;
+  my_bool    freemem= FALSE;
+  char const *text;
   DBUG_ENTER("get_view_structure");
 
   if (opt_no_create_info) /* Don't write table creation info */
@@ -5628,9 +5728,11 @@ static my_bool get_view_structure(char *table, char* db)
     write_header(sql_file, db);
   }
 
+  text= fix_identifier_with_newline(result_table, &freemem);
   print_comment(sql_file, 0,
-                "\n--\n-- Final view structure for view %s\n--\n\n",
-                fix_identifier_with_newline(result_table));
+                "\n--\n-- Final view structure for view %s\n--\n\n", text);
+  if (freemem)
+    my_free((void*)text);
 
   verbose_msg("-- Dropping the temporary view structure created\n");
   fprintf(sql_file, "/*!50001 DROP VIEW IF EXISTS %s*/;\n", opt_quoted_table);
index 23f21288f132273af0348dcd73d951fcec223cde..25b7c1b18c690052e800a1b385ae398cb96b7aad 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -50,6 +50,7 @@
 #include <welcome_copyright_notice.h> // ORACLE_WELCOME_COPYRIGHT_NOTICE
 
 #include <algorithm>
+#include <sstream>
 
 using std::min;
 using std::max;
@@ -768,12 +769,6 @@ public:
     while ((bytes= fread(buf, 1, sizeof(buf), m_file)) > 0)
       fwrite(buf, 1, bytes, stderr);
 
-    if (!lines)
-    {
-      fprintf(stderr,
-              "\nMore results from queries before failure can be found in %s\n",
-              m_file_name);
-    }
     fflush(stderr);
 
     DBUG_VOID_RETURN;
@@ -7713,8 +7708,8 @@ void run_query_stmt(MYSQL *mysql, struct st_command *command,
   /* Init dynamic strings for warnings */
   if (!disable_warnings)
   {
-    init_dynamic_string(&ds_prepare_warnings, NULL, 0, 256);
-    init_dynamic_string(&ds_execute_warnings, NULL, 0, 256);
+    init_dynamic_string(&ds_prepare_warnings, "", 0, 256);
+    init_dynamic_string(&ds_execute_warnings, "", 0, 256);
   }
 
   /*
@@ -7818,13 +7813,6 @@ void run_query_stmt(MYSQL *mysql, struct st_command *command,
       append_stmt_result(ds, stmt, fields, num_fields);
 
       mysql_free_result(res);     /* Free normal result set with meta data */
-
-      /*
-        Clear prepare warnings if there are execute warnings,
-        since they are probably duplicated.
-      */
-      if (ds_execute_warnings.length || mysql->warning_count)
-        dynstr_set(&ds_prepare_warnings, NULL);
     }
     else
     {
@@ -7856,8 +7844,26 @@ void run_query_stmt(MYSQL *mysql, struct st_command *command,
           dynstr_append_mem(ds, ds_warnings->str,
                             ds_warnings->length);
         if (ds_prepare_warnings.length)
-          dynstr_append_mem(ds, ds_prepare_warnings.str,
-                            ds_prepare_warnings.length);
+        {
+          /* Split the string to get each warning */
+          std::stringstream prepare_warnings(ds_prepare_warnings.str);
+          std::string prepare_warning;
+          /*
+            If the warning is already present in the execute phase,
+            do not append it
+          */
+          while (std::getline(prepare_warnings, prepare_warning))
+          {
+            std::string execute_warnings(ds_execute_warnings.str);
+            if ((execute_warnings + "\n").find(prepare_warning + "\n") ==
+                std::string::npos)
+            {
+              dynstr_append_mem(ds, prepare_warning.c_str(),
+                                prepare_warning.length());
+              dynstr_append_mem(ds, "\n", 1);
+            }
+          }
+        }
         if (ds_execute_warnings.length)
           dynstr_append_mem(ds, ds_execute_warnings.str,
                             ds_execute_warnings.length);
index d5c725fbbdea60f68afd45a4cbb7619815c0d0fe..d716ef4c713a79f6101ab5bab0a8626eb6df3f72 100644 (file)
@@ -1,5 +1,4 @@
-# Copyright (c) 2009 Sun Microsystems, Inc.
-# Use is subject to license terms.
+# Copyright (c) 2009, 2018, Oracle and/or its affiliates. All rights reserved.
 # 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 #
 # 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 
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA 
 
-IF(CMAKE_SYSTEM_NAME MATCHES "SunOS")
- # On Solaris, /opt/csw often contains a newer bison 
- IF(NOT BISON_EXECUTABLE AND EXISTS /opt/csw/bin/bison)
-   SET(BISON_EXECUTABLE /opt/csw/bin/bison)
- ENDIF()
-ENDIF()
 FIND_PROGRAM(BISON_EXECUTABLE bison DOC "path to the bison executable")
 MARK_AS_ADVANCED(BISON_EXECUTABLE "")
+
 IF(NOT BISON_EXECUTABLE)
-  MESSAGE("Warning: Bison executable not found in PATH")
+  MESSAGE(WARNING "Bison executable not found in PATH")
 ELSEIF(BISON_EXECUTABLE AND NOT BISON_USABLE)
   # Check version as well
   EXEC_PROGRAM(${BISON_EXECUTABLE} ARGS --version OUTPUT_VARIABLE BISON_VERSION_STR)
@@ -33,19 +27,26 @@ ELSEIF(BISON_EXECUTABLE AND NOT BISON_USABLE)
    STRING(REGEX REPLACE ".* ([0-9]+)\\.([0-9]+)" "\\1" BISON_VERSION_MAJOR "${FIRST_LINE}")
    STRING(REGEX REPLACE ".* ([0-9]+)\\.([0-9]+)" "\\2" BISON_VERSION_MINOR "${FIRST_LINE}")
    IF (BISON_VERSION_MAJOR LESS 2)
-     MESSAGE("Warning: bison version is old. please update to version 2")
+     MESSAGE(WARNING "Bison version is old. please update to version 2")
    ELSE()
      SET(BISON_USABLE 1 CACHE INTERNAL "Bison version 2 or higher")
    ENDIF()
 ENDIF()
 
+
+# Handle out-of-source build from source package with possibly broken 
+# bison. Copy bison output to from source to build directory, if not already 
+# there
+MACRO(COPY_BISON_OUTPUT input_cc input_h output_cc output_h)
+  IF(EXISTS ${input_cc} AND NOT EXISTS ${output_cc})
+    CONFIGURE_FILE(${input_cc} ${output_cc} COPYONLY)
+    CONFIGURE_FILE(${input_h}  ${output_h}  COPYONLY)
+  ENDIF()
+ENDMACRO()
+
+
 # Use bison to generate C++ and header file
 MACRO (RUN_BISON input_yy output_cc output_h)
-  IF(BISON_TOO_OLD)
-    IF(EXISTS ${output_cc} AND EXISTS ${output_h})
-      SET(BISON_USABLE FALSE)
-    ENDIF()
-  ENDIF()
   IF(BISON_USABLE)
     ADD_CUSTOM_COMMAND(
       OUTPUT ${output_cc}
@@ -61,7 +62,7 @@ MACRO (RUN_BISON input_yy output_cc output_h)
     IF(EXISTS  ${output_cc} AND EXISTS ${output_h})
       IF(${input_yy} IS_NEWER_THAN ${output_cc}  OR  ${input_yy} IS_NEWER_THAN ${output_h})
         # Possibly timestamps are messed up in source distribution.
-        MESSAGE("Warning: no usable bison found, ${input_yy} will not be rebuilt.")
+        MESSAGE(WARNING "No usable bison found, ${input_yy} will not be rebuilt.")
       ENDIF()
     ELSE()
       # Output files are missing, bail out.
index 51e8610850d637d8f846c97b2059eb3cbc1e453e..024b4e6d59a7480e0f9dfe9cabefe40113e43402 100644 (file)
@@ -58,6 +58,10 @@ MACRO(MYSQL_ADD_PLUGIN)
                     ${SSL_INCLUDE_DIRS}
                     ${ZLIB_INCLUDE_DIR})
 
+  IF(WITH_WSREP)
+    INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/wsrep/src)
+  ENDIF()
+
   LIST(GET ARG_DEFAULT_ARGS 0 plugin) 
   SET(SOURCES ${ARG_DEFAULT_ARGS})
   LIST(REMOVE_AT SOURCES 0)
index 87ba3d000d7f33801a7a71b7d6d2cbe99845d55c..a84ebc8d6c816771572e6dfbd12009646bdade39 100644 (file)
@@ -17,7 +17,7 @@
 # so WSREP_VERSION is produced regardless
 
 # Set the patch version
-SET(WSREP_PATCH_VERSION "22")
+SET(WSREP_PATCH_VERSION "23")
 
 # Obtain patch revision number
 SET(WSREP_REVISION $ENV{WSREP_REV})
@@ -28,7 +28,7 @@ ENDIF()
 
 # Obtain wsrep API version
 EXECUTE_PROCESS(
-  COMMAND sh -c "grep WSREP_INTERFACE_VERSION ${MySQL_SOURCE_DIR}/wsrep/wsrep_api.h | cut -d '\"' -f 2"
+  COMMAND sh -c "grep WSREP_INTERFACE_VERSION ${MySQL_SOURCE_DIR}/wsrep/src/wsrep_api.h | cut -d '\"' -f 2"
   OUTPUT_VARIABLE WSREP_API_VERSION
   RESULT_VARIABLE RESULT
 )
index 2c964398347f88d2454f375389c6b401feef9673..917e605e8551a24f0bf7c6c117de2d20591d865c 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
 
    This 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,6 +587,7 @@ void my_thread_end(void);
 
 #ifdef MY_GLOBAL_INCLUDED
 ulong STDCALL net_field_length(uchar **packet);
+ulong STDCALL net_field_length_checked(uchar **packet, ulong max_length);
 my_ulonglong net_field_length_ll(uchar **packet);
 uchar *net_store_length(uchar *pkg, ulonglong length);
 #endif
index 2cc6d658887035a8295adc377c7dce5a215e43e6..0b8e811dc1a7e6c5da153ba1017fec64ccc9d4bb 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef SQL_COMMON_INCLUDED
 #define SQL_COMMON_INCLUDED
 
-/* Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
    
    This 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,6 +102,9 @@ void set_stmt_error(MYSQL_STMT *stmt, int errcode, const char *sqlstate,
 void set_mysql_error(MYSQL *mysql, int errcode, const char *sqlstate);
 void set_mysql_extended_error(MYSQL *mysql, int errcode, const char *sqlstate,
                               const char *format, ...);
+#ifdef EMBEDDED_LIBRARY
+int embedded_ssl_check(MYSQL *mysql);
+#endif
 
 /* client side of the pluggable authentication */
 struct st_plugin_vio_info;
@@ -114,6 +117,7 @@ struct st_mysql_client_plugin;
 extern struct st_mysql_client_plugin *mysql_client_builtins[];
 uchar * send_client_connect_attrs(MYSQL *mysql, uchar *buf);
 extern my_bool libmysql_cleartext_plugin_enabled;
+int is_file_or_dir_world_writable(const char *filepath);
 
 #ifdef __cplusplus
 }
index a9244d9f3437866886c1c5ffde0a07f2ab0d10cb..d7431e6911671702a6a197fade9505c01d58d7da 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2006, 2018, Oracle and/or its affiliates. All rights reserved.
 # 
 # This 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,14 +29,26 @@ INCLUDE_DIRECTORIES(
   ${CMAKE_SOURCE_DIR}/sql/backup
 )
 
+# We should generate these separately for libmysqld to avoid
+# compiling them for libmysqld while they are generated for sql.
+SET(GEN_YACC_SOURCES
+  ${CMAKE_CURRENT_BINARY_DIR}/sql_yacc.h 
+  ${CMAKE_CURRENT_BINARY_DIR}/sql_yacc.cc
+)
+
 SET(GEN_SOURCES
-  ${CMAKE_BINARY_DIR}/sql/sql_yacc.h 
-  ${CMAKE_BINARY_DIR}/sql/sql_yacc.cc
   ${CMAKE_BINARY_DIR}/sql/sql_builtin.cc
-  ${CMAKE_BINARY_DIR}/sql/lex_hash.h 
 )
 
-SET_SOURCE_FILES_PROPERTIES(${GEN_SOURCES} PROPERTIES GENERATED TRUE)
+ADD_CUSTOM_COMMAND(
+  OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/lex_hash.h
+  COMMAND gen_lex_hash > lex_hash.h
+  DEPENDS gen_lex_hash
+)
+
+SET_SOURCE_FILES_PROPERTIES(${GEN_YACC_SOURCES}
+                            ${GEN_SOURCES}
+                            PROPERTIES GENERATED TRUE)
 
 FOREACH(file ${SQL_EXPORTED_SOURCES})
   LIST(APPEND IMPORTED_SOURCES "../sql/${file}")
@@ -48,6 +60,7 @@ SET(SQL_EMBEDDED_SOURCES
   libmysqld.c
   ${GEN_SOURCES}
   ${MYSYS_LIBWRAP_SOURCE}
+  ${GEN_YACC_SOURCES}
   ../client/get_password.c
   ../libmysql/errmsg.c
   ../libmysql/libmysql.c
@@ -79,9 +92,45 @@ SET(SQL_EMBEDDED_SOURCES
 )
 
 
+
+# Handle out-of-source build from source package with possibly broken 
+# bison. Copy bison output to from source to build directory, if not already 
+# there
+INCLUDE(${CMAKE_SOURCE_DIR}/cmake/bison.cmake)
+COPY_BISON_OUTPUT(
+  ${CMAKE_SOURCE_DIR}/sql/sql_yacc.cc
+  ${CMAKE_SOURCE_DIR}/sql/sql_yacc.h
+  ${CMAKE_CURRENT_BINARY_DIR}/sql_yacc.cc
+  ${CMAKE_CURRENT_BINARY_DIR}/sql_yacc.h
+)
+
+RUN_BISON(
+  ${CMAKE_SOURCE_DIR}/sql/sql_yacc.yy 
+  ${CMAKE_CURRENT_BINARY_DIR}/sql_yacc.cc
+  ${CMAKE_CURRENT_BINARY_DIR}/sql_yacc.h
+)
+
+ADD_CUSTOM_COMMAND(
+  OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/lex_token.h
+  COMMAND gen_lex_token > lex_token.h
+  DEPENDS gen_lex_token
+)
+
+SET_SOURCE_FILES_PROPERTIES(
+  ${CMAKE_CURRENT_BINARY_DIR}/sql/lex_token.h
+  PROPERTIES GENERATED 1)
+
+SET_SOURCE_FILES_PROPERTIES(
+  ${CMAKE_CURRENT_BINARY_DIR}/sql_yacc.cc
+  ${CMAKE_SOURCE_DIR}/sql/sql_digest.cc
+  PROPERTIES OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/lex_token.h
+)
+
+ADD_CUSTOM_TARGET(GenYaccEmbeddedSource DEPENDS ${GEN_YACC_SOURCES})
+
 ADD_CONVENIENCE_LIBRARY(sql_embedded ${SQL_EMBEDDED_SOURCES})
 DTRACE_INSTRUMENT(sql_embedded)
-ADD_DEPENDENCIES(sql_embedded GenError GenServerSource)
+ADD_DEPENDENCIES(sql_embedded GenError GenServerSource GenYaccEmbeddedSource)
 
 # On Windows, static embedded server library is called mysqlserver.lib
 # On Unix, it is libmysqld.a
@@ -93,8 +142,8 @@ ENDIF()
 
 
 SET(LIBS 
-  dbug strings regex mysys mysys_ssl vio 
-  ${ZLIB_LIBRARY} ${SSL_LIBRARIES} 
+  dbug strings regex mysys mysys_ssl vio
+  ${ZLIB_LIBRARY} ${SSL_LIBRARIES}
   ${LIBWRAP} ${LIBCRYPT} ${LIBDL}
   ${MYSQLD_STATIC_PLUGIN_LIBS}
   sql_embedded
@@ -112,6 +161,8 @@ FOREACH(LIB ${LIBS})
   ENDIF()
 ENDFOREACH()
 
+LIST(REMOVE_DUPLICATES EMBEDDED_LIBS)
+
 MERGE_LIBRARIES(mysqlserver STATIC ${EMBEDDED_LIBS} 
   OUTPUT_NAME ${MYSQLSERVER_OUTPUT_NAME} COMPONENT Embedded)
 
@@ -145,7 +196,7 @@ IF(WITH_EMBEDDED_SHARED_LIBRARY)
     )
 
   GET_TARGET_PROPERTY(libmysqld_link_flags libmysqld LINK_FLAGS)
-  IF(NOT libmysqld_link_flag)
+  IF(NOT libmysqld_link_flags)
     SET(libmysqld_link_flags)
   ENDIF()
   SET(libmysqld_link_flags
index 397e7e5a507bd2e02fea599b393df9987065dde0..2dab1339436357260bc79da952cc27ecaf2e08cf 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -169,6 +169,9 @@ mysql_real_connect(MYSQL *mysql,const char *host, const char *user,
   if (db)
     client_flag|=CLIENT_CONNECT_WITH_DB;
 
+  if (embedded_ssl_check(mysql))
+    goto error;
+
   mysql->info_buffer= my_malloc(MYSQL_ERRMSG_SIZE, MYF(0));
   mysql->thd= create_embedded_thd(client_flag);
 
index 66bfce5c32fc981c656cde93ed4ef180b8e0a871..73cb6cff555c877eaeddfb474fed8363d3888b36 100644 (file)
@@ -2,12 +2,12 @@
 .\"     Title: \fBcomp_err\fR
 .\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
 .\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
-.\"      Date: 06/02/2017
+.\"      Date: 06/15/2018
 .\"    Manual: MySQL Database System
 .\"    Source: MySQL 5.6
 .\"  Language: English
 .\"
-.TH "\FBCOMP_ERR\FR" "1" "06/02/2017" "MySQL 5\&.6" "MySQL Database System"
+.TH "\FBCOMP_ERR\FR" "1" "06/15/2018" "MySQL 5\&.6" "MySQL Database System"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -241,7 +241,7 @@ Display version information and exit\&.
 .SH "COPYRIGHT"
 .br
 .PP
-Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved.
+Copyright \(co 1997, 2018, Oracle and/or its affiliates. All rights reserved.
 .PP
 This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
 .PP
index b4e296bfb0d39f3d075b0318bfaa7f9b942c4a8f..ae31cbfd2cec5328a742cd59e8b7d435216eb6bd 100644 (file)
@@ -2,12 +2,12 @@
 .\"     Title: \fBinnochecksum\fR
 .\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
 .\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
-.\"      Date: 06/02/2017
+.\"      Date: 06/15/2018
 .\"    Manual: MySQL Database System
 .\"    Source: MySQL 5.6
 .\"  Language: English
 .\"
-.TH "\FBINNOCHECKSUM\FR" "1" "06/02/2017" "MySQL 5\&.6" "MySQL Database System"
+.TH "\FBINNOCHECKSUM\FR" "1" "06/15/2018" "MySQL 5\&.6" "MySQL Database System"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -156,7 +156,7 @@ Verbose mode; print a progress indicator every five seconds\&.
 .SH "COPYRIGHT"
 .br
 .PP
-Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved.
+Copyright \(co 1997, 2018, Oracle and/or its affiliates. All rights reserved.
 .PP
 This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
 .PP
index 2f0205cab6956f0ee07aeac4935613d58a357bbb..e4545c256a9f3b666d337b1f42060cc581a356d6 100644 (file)
@@ -2,12 +2,12 @@
 .\"     Title: \fBmsql2mysql\fR
 .\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
 .\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
-.\"      Date: 06/02/2017
+.\"      Date: 06/15/2018
 .\"    Manual: MySQL Database System
 .\"    Source: MySQL 5.6
 .\"  Language: English
 .\"
-.TH "\FBMSQL2MYSQL\FR" "1" "06/02/2017" "MySQL 5\&.6" "MySQL Database System"
+.TH "\FBMSQL2MYSQL\FR" "1" "06/15/2018" "MySQL 5\&.6" "MySQL Database System"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -84,7 +84,7 @@ utility to make the function name substitutions\&. See
 .SH "COPYRIGHT"
 .br
 .PP
-Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved.
+Copyright \(co 1997, 2018, Oracle and/or its affiliates. All rights reserved.
 .PP
 This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
 .PP
index b06c268a40cfae553c0c52e5bbe834c76e16c494..1e87c3ed3909d988b4e0ed5ec108159c8a13df8c 100644 (file)
@@ -2,12 +2,12 @@
 .\"     Title: \fBmy_print_defaults\fR
 .\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
 .\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
-.\"      Date: 06/02/2017
+.\"      Date: 06/15/2018
 .\"    Manual: MySQL Database System
 .\"    Source: MySQL 5.6
 .\"  Language: English
 .\"
-.TH "\FBMY_PRINT_DEFAULTS" "1" "06/02/2017" "MySQL 5\&.6" "MySQL Database System"
+.TH "\FBMY_PRINT_DEFAULTS\FR" "1" "06/15/2018" "MySQL 5\&.6" "MySQL Database System"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -51,7 +51,7 @@ like this:
 .nf
 shell> \fBmy_print_defaults mysqlcheck client\fR
 \-\-user=myusername
-\-\-password=secret
+\-\-password=\fIpassword\fR
 \-\-host=localhost
 .fi
 .if n \{\
@@ -220,7 +220,7 @@ Display version information and exit\&.
 .SH "COPYRIGHT"
 .br
 .PP
-Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved.
+Copyright \(co 1997, 2018, Oracle and/or its affiliates. All rights reserved.
 .PP
 This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
 .PP
index 5aa4c4166fdceb44fe9b452f38491fe42ddbd723..c24f73f4bfda3cb632e078a8dda7b6aa4c0ddda6 100644 (file)
@@ -2,12 +2,12 @@
 .\"     Title: \fBmyisam_ftdump\fR
 .\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
 .\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
-.\"      Date: 06/02/2017
+.\"      Date: 06/15/2018
 .\"    Manual: MySQL Database System
 .\"    Source: MySQL 5.6
 .\"  Language: English
 .\"
-.TH "\FBMYISAM_FTDUMP\FR" "1" "06/02/2017" "MySQL 5\&.6" "MySQL Database System"
+.TH "\FBMYISAM_FTDUMP\FR" "1" "06/15/2018" "MySQL 5\&.6" "MySQL Database System"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -136,7 +136,7 @@ shell> \fBmyisam_ftdump /usr/local/mysql/data/test/mytexttable 1\fR
 .PP
 You can use
 \fBmyisam_ftdump\fR
-to generate a list of index entries in order of frequency of occurrence like this:
+to generate a list of index entries in order of frequency of occurrence like this on Unix\-like systems:
 .sp
 .if n \{\
 .RS 4
@@ -148,6 +148,18 @@ shell> \fBmyisam_ftdump \-c mytexttable 1 | sort \-r\fR
 .RE
 .\}
 .PP
+On Windows, use:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+shell> \fBmyisam_ftdump \-c mytexttable 1 | sort /R\fR
+.fi
+.if n \{\
+.RE
+.\}
+.PP
 \fBmyisam_ftdump\fR
 supports the following options:
 .sp
@@ -238,7 +250,7 @@ Verbose mode\&. Print more output about what the program does\&.
 .SH "COPYRIGHT"
 .br
 .PP
-Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved.
+Copyright \(co 1997, 2018, Oracle and/or its affiliates. All rights reserved.
 .PP
 This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
 .PP
index 26cf522a1872d9cd07c44b0343ad5461021af7c4..7d33394ae02375283e11e5377447a6756d6a6493 100644 (file)
@@ -2,12 +2,12 @@
 .\"     Title: \fBmyisamchk\fR
 .\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
 .\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
-.\"      Date: 06/02/2017
+.\"      Date: 06/15/2018
 .\"    Manual: MySQL Database System
 .\"    Source: MySQL 5.6
 .\"  Language: English
 .\"
-.TH "\FBMYISAMCHK\FR" "1" "06/02/2017" "MySQL 5\&.6" "MySQL Database System"
+.TH "\FBMYISAMCHK\FR" "1" "06/15/2018" "MySQL 5\&.6" "MySQL Database System"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -495,7 +495,7 @@ T}
 T{
 ft_max_word_len
 T}:T{
-version\-dependent
+version-dependent
 T}
 T{
 ft_min_word_len
@@ -505,7 +505,7 @@ T}
 T{
 ft_stopword_file
 T}:T{
-built\-in list
+built-in list
 T}
 T{
 key_buffer_size
@@ -627,7 +627,7 @@ myisam_stats_method
 system variable\&. For more information, see the description of
 myisam_stats_method
 in
-Section\ \&5.1.5, \(lqServer System Variables\(rq, and
+Section\ \&5.1.7, \(lqServer System Variables\(rq, and
 Section\ \&8.3.7, \(lqInnoDB and MyISAM Index Statistics Collection\(rq\&.
 .PP
 ft_min_word_len
@@ -898,7 +898,7 @@ file as
 \fB\-\-character\-sets\-dir=\fR\fB\fIdir_name\fR\fR
 .sp
 The directory where character sets are installed\&. See
-Section\ \&10.5, \(lqCharacter Set Configuration\(rq\&.
+Section\ \&10.14, \(lqCharacter Set Configuration\(rq\&.
 .RE
 .sp
 .RS 4
@@ -2463,7 +2463,7 @@ instead of
 .SH "COPYRIGHT"
 .br
 .PP
-Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved.
+Copyright \(co 1997, 2018, Oracle and/or its affiliates. All rights reserved.
 .PP
 This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
 .PP
index 9d80561efd828bdb7e5fa8765a1d3ce6197caa45..b464a2b07f1153faaf435f3953a6fcfba922d828 100644 (file)
@@ -2,12 +2,12 @@
 .\"     Title: \fBmyisamlog\fR
 .\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
 .\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
-.\"      Date: 06/02/2017
+.\"      Date: 06/15/2018
 .\"    Manual: MySQL Database System
 .\"    Source: MySQL 5.6
 .\"  Language: English
 .\"
-.TH "\FBMYISAMLOG\FR" "1" "06/02/2017" "MySQL 5\&.6" "MySQL Database System"
+.TH "\FBMYISAMLOG\FR" "1" "06/15/2018" "MySQL 5\&.6" "MySQL Database System"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -114,6 +114,19 @@ Specify the maximum number of open files\&.
 .sp -1
 .IP \(bu 2.3
 .\}
+\fB\-F \fR\fB\fIfilepath/\fR\fR
+.sp
+Specify the file path with a trailing slash\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
 \fB\-i\fR
 .sp
 Display extra information before exiting\&.
@@ -227,7 +240,7 @@ Display version information\&.
 .SH "COPYRIGHT"
 .br
 .PP
-Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved.
+Copyright \(co 1997, 2018, Oracle and/or its affiliates. All rights reserved.
 .PP
 This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
 .PP
index 925b1b6e361562a2766b1487d8323c2cc7232308..03bdeb2af6f1fbddbf1d9acdfb3b4d4a13264b4d 100644 (file)
@@ -2,12 +2,12 @@
 .\"     Title: \fBmyisampack\fR
 .\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
 .\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
-.\"      Date: 06/02/2017
+.\"      Date: 06/15/2018
 .\"    Manual: MySQL Database System
 .\"    Source: MySQL 5.6
 .\"  Language: English
 .\"
-.TH "\FBMYISAMPACK\FR" "1" "06/02/2017" "MySQL 5\&.6" "MySQL Database System"
+.TH "\FBMYISAMPACK\FR" "1" "06/15/2018" "MySQL 5\&.6" "MySQL Database System"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -160,7 +160,7 @@ Make a backup of each table\*(Aqs data file using the name
 \fB\-\-character\-sets\-dir=\fR\fB\fIdir_name\fR\fR
 .sp
 The directory where character sets are installed\&. See
-Section\ \&10.5, \(lqCharacter Set Configuration\(rq\&.
+Section\ \&10.14, \(lqCharacter Set Configuration\(rq\&.
 .RE
 .sp
 .RS 4
@@ -825,7 +825,7 @@ option to
 .SH "COPYRIGHT"
 .br
 .PP
-Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved.
+Copyright \(co 1997, 2018, Oracle and/or its affiliates. All rights reserved.
 .PP
 This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
 .PP
diff --git a/mysql-wsrep-5.6/man/mysql-stress-test.pl.1 b/mysql-wsrep-5.6/man/mysql-stress-test.pl.1
deleted file mode 100644 (file)
index 736826a..0000000
+++ /dev/null
@@ -1,461 +0,0 @@
-'\" t
-.\"     Title: \fBmysql-stress-test.pl\fR
-.\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
-.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
-.\"      Date: 06/01/2017
-.\"    Manual: MySQL Database System
-.\"    Source: MySQL
-.\"  Language: English
-.\"
-.TH "\FBMYSQL\-STRESS\-TE" "1" "06/01/2017" "MySQL" "MySQL Database System"
-.\" -----------------------------------------------------------------
-.\" * Define some portability stuff
-.\" -----------------------------------------------------------------
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-.\" http://bugs.debian.org/507673
-.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-.ie \n(.g .ds Aq \(aq
-.el       .ds Aq '
-.\" -----------------------------------------------------------------
-.\" * set default formatting
-.\" -----------------------------------------------------------------
-.\" disable hyphenation
-.nh
-.\" disable justification (adjust text to left margin only)
-.ad l
-.\" -----------------------------------------------------------------
-.\" * MAIN CONTENT STARTS HERE *
-.\" -----------------------------------------------------------------
-.SH "NAME"
-mysql-stress-test.pl \- server stress test program
-.SH "SYNOPSIS"
-.HP \w'\fBmysql\-stress\-test\&.pl\ [\fR\fB\fIoptions\fR\fR\fB]\fR\ 'u
-\fBmysql\-stress\-test\&.pl [\fR\fB\fIoptions\fR\fR\fB]\fR
-.SH "DESCRIPTION"
-.PP
-The
-\fBmysql\-stress\-test\&.pl\fR
-Perl script performs stress\-testing of the MySQL server\&.
-.PP
-\fBmysql\-stress\-test\&.pl\fR
-requires a version of Perl that has been built with threads support\&.
-.PP
-Invoke
-\fBmysql\-stress\-test\&.pl\fR
-like this:
-.sp
-.if n \{\
-.RS 4
-.\}
-.nf
-shell> \fBmysql\-stress\-test\&.pl [\fR\fB\fIoptions\fR\fR\fB]\fR
-.fi
-.if n \{\
-.RE
-.\}
-.PP
-\fBmysql\-stress\-test\&.pl\fR
-supports the following options:
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-help\fR
-.sp
-Display a help message and exit\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-abort\-on\-error=\fR\fB\fIN\fR\fR
-.sp
-Causes the program to abort if an error with severity less than or equal to N was encountered\&. Set to 1 to abort on any error\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-check\-tests\-file\fR
-.sp
-Periodically check the file that lists the tests to be run\&. If it has been modified, reread the file\&. This can be useful if you update the list of tests to be run during a stress test\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-cleanup\fR
-.sp
-Force cleanup of the working directory\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-log\-error\-details\fR
-.sp
-Log error details in the global error log file\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-loop\-count=\fR\fB\fIN\fR\fR
-.sp
-In sequential test mode, the number of loops to execute before exiting\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-mysqltest=\fR\fB\fIpath\fR\fR
-.sp
-The path name to the
-\fBmysqltest\fR
-program\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-server\-database=\fR\fB\fIdb_name\fR\fR
-.sp
-The database to use for the tests\&. The default is
-test\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-server\-host=\fR\fB\fIhost_name\fR\fR
-.sp
-The host name of the local host to use for making a TCP/IP connection to the local server\&. By default, the connection is made to
-localhost
-using a Unix socket file\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-server\-logs\-dir=\fR\fB\fIpath\fR\fR
-.sp
-This option is required\&.
-\fIpath\fR
-is the directory where all client session logs will be stored\&. Usually this is the shared directory that is associated with the server used for testing\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-server\-password=\fR\fB\fIpassword\fR\fR
-.sp
-The password to use when connecting to the server\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-server\-port=\fR\fB\fIport_num\fR\fR
-.sp
-The TCP/IP port number to use for connecting to the server\&. The default is 3306\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-server\-socket=\fR\fB\fIfile_name\fR\fR
-.sp
-For connections to
-localhost, the Unix socket file to use, or, on Windows, the name of the named pipe to use\&. The default if
-/tmp/mysql\&.sock\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-server\-user=\fR\fB\fIuser_name\fR\fR
-.sp
-The MySQL user name to use when connecting to the server\&. The default is
-root\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-sleep\-time=\fR\fB\fIN\fR\fR
-.sp
-The delay in seconds between test executions\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-stress\-basedir=\fR\fB\fIpath\fR\fR
-.sp
-This option is required\&.
-\fIpath\fR
-is the working directory for the test run\&. It is used as the temporary location for result tracking during testing\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-stress\-datadir=\fR\fB\fIpath\fR\fR
-.sp
-The directory of data files to be used during testing\&. The default location is the
-data
-directory under the location given by the
-\fB\-\-stress\-suite\-basedir\fR
-option\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-stress\-init\-file[=\fR\fB\fIpath\fR\fR\fB]\fR
-.sp
-\fIfile_name\fR
-is the location of the file that contains the list of tests to be run once to initialize the database for the testing\&. If missing, the default file is
-stress_init\&.txt
-in the test suite directory\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-stress\-mode=\fR\fB\fImode\fR\fR
-.sp
-This option indicates the test order in stress\-test mode\&. The
-\fImode\fR
-value is either
-random
-to select tests in random order or
-seq
-to run tests in each thread in the order specified in the test list file\&. The default mode is
-random\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-stress\-suite\-basedir=\fR\fB\fIpath\fR\fR
-.sp
-This option is required\&.
-\fIpath\fR
-is the directory that has the
-t
-and
-\fIr\fR
-subdirectories containing the test case and result files\&. This directory is also the default location of the
-stress\-test\&.txt
-file that contains the list of tests\&. (A different location can be specified with the
-\fB\-\-stress\-tests\-file\fR
-option\&.)
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-stress\-tests\-file[=\fR\fB\fIfile_name\fR\fR\fB]\fR
-.sp
-Use this option to run the stress tests\&.
-\fIfile_name\fR
-is the location of the file that contains the list of tests\&. If
-\fIfile_name\fR
-is omitted, the default file is
-stress\-test\&.txt
-in the stress suite directory\&. (See
-\fB\-\-stress\-suite\-basedir\fR\&.)
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-suite=\fR\fB\fIsuite_name\fR\fR
-.sp
-Run the named test suite\&. The default name is
-main
-(the regular test suite located in the
-mysql\-test
-directory)\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-test\-count=\fR\fB\fIN\fR\fR
-.sp
-The number of tests to execute before exiting\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-test\-duration=\fR\fB\fIN\fR\fR
-.sp
-The duration of stress testing in seconds\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-threads=\fR\fB\fIN\fR\fR
-.sp
-The number of threads\&. The default is 1\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-verbose\fR
-.sp
-Verbose mode\&. Print more information about what the program does\&.
-.RE
-.SH "COPYRIGHT"
-.br
-.PP
-Copyright \(co 2006, 2017, Oracle and/or its affiliates. All rights reserved.
-.PP
-This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
-.PP
-This documentation is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-.PP
-You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/.
-.sp
-.SH "SEE ALSO"
-For more information, please refer to the MySQL Reference Manual,
-which may already be installed locally and which is also available
-online at http://dev.mysql.com/doc/.
-.SH AUTHOR
-Oracle Corporation (http://dev.mysql.com/).
diff --git a/mysql-wsrep-5.6/man/mysql-test-run.pl.1 b/mysql-wsrep-5.6/man/mysql-test-run.pl.1
deleted file mode 100644 (file)
index 3203d79..0000000
+++ /dev/null
@@ -1,2723 +0,0 @@
-'\" t
-.\"     Title: \fBmysql-test-run.pl\fR
-.\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
-.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
-.\"      Date: 06/01/2017
-.\"    Manual: MySQL Database System
-.\"    Source: MySQL
-.\"  Language: English
-.\"
-.TH "\FBMYSQL\-TEST\-RUN\" "1" "06/01/2017" "MySQL" "MySQL Database System"
-.\" -----------------------------------------------------------------
-.\" * Define some portability stuff
-.\" -----------------------------------------------------------------
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-.\" http://bugs.debian.org/507673
-.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-.ie \n(.g .ds Aq \(aq
-.el       .ds Aq '
-.\" -----------------------------------------------------------------
-.\" * set default formatting
-.\" -----------------------------------------------------------------
-.\" disable hyphenation
-.nh
-.\" disable justification (adjust text to left margin only)
-.ad l
-.\" -----------------------------------------------------------------
-.\" * MAIN CONTENT STARTS HERE *
-.\" -----------------------------------------------------------------
-.SH "NAME"
-mysql-test-run.pl \- run MySQL test suite
-.SH "SYNOPSIS"
-.HP \w'\fBmysql\-test\-run\&.pl\ [\fR\fB\fIoptions\fR\fR\fB]\fR\ 'u
-\fBmysql\-test\-run\&.pl [\fR\fB\fIoptions\fR\fR\fB]\fR
-.SH "DESCRIPTION"
-.if n \{\
-.sp
-.\}
-.RS 4
-.it 1 an-trap
-.nr an-no-space-flag 1
-.nr an-break-flag 1
-.br
-.ps +1
-\fBNote\fR
-.ps -1
-.br
-.PP
-\fIThis content is no longer updated\&.\fR
-Any further updates to test framework documention take place in the MySQL Source Code documentation and can be accessed at
-\m[blue]\fBThe MySQL Test Framework, Version 2\&.0\fR\m[]\&\s-2\u[1]\d\s+2\&.
-.sp .5v
-.RE
-.PP
-The
-\fBmysql\-test\-run\&.pl\fR
-Perl script is the main application used to run the MySQL test suite\&. It invokes
-\fBmysqltest\fR
-to run individual test cases\&.
-.PP
-Invoke
-\fBmysql\-test\-run\&.pl\fR
-in the
-mysql\-test
-directory like this:
-.sp
-.if n \{\
-.RS 4
-.\}
-.nf
-shell> \fBmysql\-test\-run\&.pl [\fR\fB\fIoptions\fR\fR\fB] [\fR\fB\fItest_name\fR\fR\fB] \&.\&.\&.\fR
-.fi
-.if n \{\
-.RE
-.\}
-.PP
-Each
-\fItest_name\fR
-argument names a test case\&. The test case file that corresponds to the test name is
-t/\fItest_name\fR\&.test\&.
-.PP
-For each
-\fItest_name\fR
-argument,
-\fBmysql\-test\-run\&.pl\fR
-runs the named test case\&. With no
-\fItest_name\fR
-arguments,
-\fBmysql\-test\-run\&.pl\fR
-runs all
-\&.test
-files in the
-t
-subdirectory\&.
-.PP
-If no suffix is given for the test name, a suffix of
-\&.test
-is assumed\&. Any leading path name is ignored\&. These commands are equivalent:
-.sp
-.if n \{\
-.RS 4
-.\}
-.nf
-shell> \fBmysql\-test\-run\&.pl mytest\fR
-shell> \fBmysql\-test\-run\&.pl mytest\&.test\fR
-shell> \fBmysql\-test\-run\&.pl t/mytest\&.test\fR
-.fi
-.if n \{\
-.RE
-.\}
-.PP
-A suite name can be given as part of the test name\&. That is, the syntax for naming a test is:
-.sp
-.if n \{\
-.RS 4
-.\}
-.nf
-[\fIsuite_name\fR\&.]\fItest_name\fR[\&.\fIsuffix\fR]
-.fi
-.if n \{\
-.RE
-.\}
-.PP
-If a suite name is given,
-\fBmysql\-test\-run\&.pl\fR
-looks in that suite for the test\&. The test file corresponding to a test named
-\fIsuite_name\&.test_name\fR
-is found in
-suite/\fIsuite_name\fR/t/\fItest_name\fR\&.test\&. There is also an implicit suite name
-main
-for the tests in the top
-t
-directory\&. With no suite name,
-\fBmysql\-test\-run\&.pl\fR
-looks in the default list of suites for a match and runs the test in any suites where it finds the test\&. Suppose that the default suite list is
-main,
-binlog,
-rpl, and that a test
-mytest\&.test
-exists in the
-main
-and
-rpl
-suites\&. With an argument of
-mytest
-or
-mytest\&.test,
-\fBmysql\-test\-run\&.pl\fR
-will run
-mytest\&.test
-from the
-main
-and
-rpl
-suites\&.
-.PP
-To run a family of test cases for which the names share a common prefix, use the
-\fB\-\-do\-test=\fR\fB\fIprefix\fR\fR
-option\&. For example,
-\fB\-\-do\-test=rpl\fR
-runs the replication tests (test cases that have names beginning with
-rpl)\&.
-\fB\-\-skip\-test\fR
-has the opposite effect of skipping test cases for which the names share a common prefix\&.
-.PP
-The argument for the
-\fB\-\-do\-test\fR
-and
-\fB\-\-skip\-test\fR
-options also allows more flexible specification of which tests to perform or skip\&. If the argument contains a pattern metacharacter other than a lone period, it is interpreted as a Perl regular expression and applies to test names that match the pattern\&. If the argument contains a lone period or does not contain any pattern metacharacters, it is interpreted the same way as previously and matches test names that begin with the argument value\&. For example,
-\fB\-\-do\-test=testa\fR
-matches tests that begin with
-testa,
-\fB\-\-do\-test=main\&.testa\fR
-matches tests in the
-main
-test suite that begin with
-testa, and
-\fB\-\-do\-test=main\&.*testa\fR
-matches test names that contain
-main
-followed by
-testa
-with anything in between\&. In the latter case, the pattern match is not anchored to the beginning of the test name, so it also matches names such as
-xmainytesta\&.
-.PP
-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
-\fIsuite\fR\&.\fItest\fR\&. A space may be used in place of the period\&. A line beginning with
-#
-indicates a comment and is ignored\&.
-.PP
-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
-\fBmysqld\fR
-with the
-\fB\-\-bootstrap\fR
-and
-\fB\-\-skip\-grant\-tables\fR
-options\&. If MySQL was built with the compiler flag
-\fB\-DDISABLE_GRANT_OPTIONS\fR, then
-\fB\-\-bootstrap\fR,
-\fB\-\-skip\-grant\-tables\fR, and
-\fB\-\-init\-file\fR
-will be disabled\&. To handle this, set the
-MYSQLD_BOOTSTRAP
-environment variable to the full path name of a server that has all options enabled\&.
-\fBmysql\-test\-run\&.pl\fR
-will use that server to perform setup; it is not used to run the tests\&.
-.PP
-The
-init_file
-test will fail if
-\fB\-\-init\-file\fR
-is disabled\&. This is an expected failure in this case\&.
-.PP
-To run
-\fBmysql\-test\-run\&.pl\fR
-on Windows, you\*(Aqll need either Cygwin or ActiveState Perl to run it\&. You may also need to install the modules required by the script\&. To run the test script, change location into the
-mysql\-test
-directory, set the
-MTR_VS_CONFIG
-environment variable to the configuration you selected earlier (or use the
-\fB\-\-vs\-config\fR
-option), and invoke
-\fBmysql\-test\-run\&.pl\fR\&. For example (using Cygwin and the
-\fBbash\fR
-shell):
-.sp
-.if n \{\
-.RS 4
-.\}
-.nf
-shell> \fBcd mysql\-test\fR
-shell> \fBexport MTR_VS_CONFIG=debug\fR
-shell> \fB\&./mysqltest\-run\&.pl \-\-force \-\-timer\fR
-shell> \fB\&./mysqltest\-run\&.pl \-\-force \-\-timer \-\-ps\-protocol\fR
-.fi
-.if n \{\
-.RE
-.\}
-.PP
-\fBmysql\-test\-run\&.pl\fR
-uses several environment variables\&. Some of them are listed in the following table\&. Some of these are set from the outside and used by
-\fBmysql\-test\-run\&.pl\fR, others are set by
-\fBmysql\-test\-run\&.pl\fR
-instead, and may be referred to in tests\&.
-.TS
-allbox tab(:);
-lB lB.
-T{
-Variable
-T}:T{
-Description
-T}
-.T&
-l l
-l l
-l l
-l l
-l l
-l l
-l l
-l l
-l l
-l l
-l l
-l l
-l l
-l l
-l l
-l l
-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
-                ramdisk\&. Not available on Windows\&. Same as
-                \fB\-\-mem\fR option
-T}
-T{
-MTR_MAX_PARALLEL
-T}:T{
-If set, defines maximum number of parallel threads if
-                \fB\-\-parallel=auto\fR is given
-T}
-T{
-MTR_\fINAME\fR_TIMEOUT
-T}:T{
-Setting of a timeout in minutes or seconds, corresponding to command
-                line option
-                \fB\-\-\fR\fB\fIname\fR\fR\fB\-timeout\fR\&.
-                Avaliable timeout names are TESTCASE,
-                SUITE (both in minutes) and
-                START, SHUTDOWN,
-                CTEST (all in seconds)\&.
-                MTR_CTEST_TIMEOUT is for
-                \fBctest\fR unit tests; it was added in
-                MySQL 8\&.0\&.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
-                of MySQL 5\&.6\&.6\&.
-T}
-T{
-MYSQL_TEST
-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\&.
-                If not set, the default is
-                $HOME/\&.mylogin\&.cnf, or
-                %APPDATA%\eMySQL\e\&.mylogin\&.cnf on
-                Windows\&. Supported as of MySQL 5\&.6\&.6\&.
-T}
-T{
-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
-T}
-T{
-MYSQLD_BOOTSTRAP_CMD
-T}:T{
-Full command line used for initial database setup for this test batch
-T}
-T{
-MYSQLD_CMD
-T}:T{
-Command line for starting server as used in tests, with the minimum set
-                of required arguments\&. Supported as of MySQL 5\&.5\&.17\&.
-T}
-T{
-MYSQLTEST_VARDIR
-T}:T{
-Path name to the var directory that is used for
-                logs, temporary files, and so forth
-T}
-T{
-TSAN_OPTIONS
-T}:T{
-Path name to a file containing ThreadSanitizer suppressions\&. Supported
-                as of MySQL 8\&.0\&.1\&.
-T}
-.TE
-.sp 1
-.PP
-The variable
-MTR_PORT_BASE
-is a more logical replacement for the original variable
-MTR_BUILD_THREAD\&. It gives the actual port number directly (will be rounded down to a multiple of 10)\&. If you use
-MTR_BUILD_THREAD, the port number is found by multiplying this by 10 and adding 10000\&.
-.PP
-Tests sometimes rely on certain environment variables being defined\&. For example, certain tests assume that
-MYSQL_TEST
-is defined so that
-\fBmysqltest\fR
-can invoke itself with
-exec $MYSQL_TEST\&.
-.PP
-Other tests may refer to the last three variables listed in the preceding table, to locate files to read or write\&. For example, tests that need to create files will typically put them in
-$MYSQL_TMP_DIR/\fIfile_name\fR\&.
-.PP
-The variable
-$MYSQLD_CMD
-will include any server options added with the
-\fB\-\-mysqld\fR
-option to
-\fBmysql\-test\-run\&.pl\fR, but will not include server options added specifically for the currently running test\&.
-.PP
-\fBmysql\-test\-run\&.pl\fR
-supports the options in the following list\&. An argument of
-\fB\-\-\fR
-tells
-\fBmysql\-test\-run\&.pl\fR
-not to process any following arguments as options\&.
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-help\fR,
-\fB\-h\fR
-.sp
-Display a help message and exit\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-big\-test\fR
-.sp
-Allow tests marked as "big" to run\&. Tests can be thus marked by including the line
-\-\-source include/big_test\&.inc, and they will only be run if this option is given, or if the environment variable
-BIG_TEST
-is set to 1\&.
-.sp
-This is typically done for tests that take very long to run, or that use very much resources, so that they are not suitable for running as part of a normal test suite run\&.
-.sp
-If both
-\fB\-\-big\-test\fR
-and
-\fB\-\-only\-big\-tests\fR
-are given,
-\fB\-\-only\-big\-tests\fR
-is ignored\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-boot\-dbx\fR
-.sp
-Run the
-\fBmysqld\fR
-server used for bootstrapping the database through the
-\fBdbx\fR
-debugger\&. This option is available from MySQL 5\&.5\&.17\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-boot\-ddd\fR
-.sp
-Run the
-\fBmysqld\fR
-server used for bootstrapping the database through the
-\fBddd\fR
-debugger\&. This option is available from MySQL 5\&.5\&.17\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-boot\-gdb\fR
-.sp
-Run the
-\fBmysqld\fR
-server used for bootstrapping the database through the
-\fBgdb\fR
-debugger\&. This option is available from MySQL 5\&.5\&.17\&.
-.sp
-See also the
-\fB\-\-manual\-boot\-gdb\fR
-option\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-build\-thread=\fR\fB\fInumber\fR\fR
-.sp
-Specify a number to calculate port numbers from\&. The formula is 10 *
-\fIbuild_thread\fR
-+ 10000\&. Instead of a number, it can be set to
-auto, which is also the default value, in which case
-\fBmysql\-test\-run\&.pl\fR
-will allocate a number unique to this host\&.
-.sp
-The value (number or
-auto) can also be set with the
-MTR_BUILD_THREAD
-environment variable\&.
-.sp
-This option is kept for backward compatibility\&. The more logical
-\fB\-\-port\-base\fR
-is recommended instead\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-callgrind\fR
-.sp
-Instructs
-\fBvalgrind\fR
-to use
-\fBcallgrind\fR\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-charset\-for\-testdb=\fR\fB\fIcharset_name\fR\fR
-.sp
-Specify the default character set for the
-test
-database\&. The default value is
-latin1\&.
-.sp
-This option was added in MySQL 8\&.0\&.1\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-check\-testcases\fR
-.sp
-Check test cases for side effects\&. This is done by checking the system state before and after each test case; if there is any difference, a warning to that effect is written, but the test case is not marked as failed because of it\&. This check is enabled by default\&. To disable it, use the
-\fB\-\-nocheck\-testcases\fR
-option\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-clean\-vardir\fR
-.sp
-Clean up the
-var
-directory with logs and test results etc\&. after the test run, but only if there were no test failures\&. This option only has effect if also running with option
-\fB\-\-mem\fR\&. The intent is to alleviate the problem of using up memory for test results, in cases where many different test runs are being done on the same host\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-client\-bindir=\fR\fB\fIpath\fR\fR
-.sp
-The path to the directory where client binaries are located\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-client\-dbx\fR
-.sp
-Start
-\fBmysqltest\fR
-in the
-\fBdbx\fR
-debugger\&. Support for dbx is available from MySQL 5\&.5\&.12\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-client\-ddd\fR
-.sp
-Start
-\fBmysqltest\fR
-in the
-\fBddd\fR
-debugger\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-client\-debugger=\fR\fB\fIdebugger\fR\fR
-.sp
-Start
-\fBmysqltest\fR
-in the named debugger\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-client\-gdb\fR
-.sp
-Start
-\fBmysqltest\fR
-in the
-\fBgdb\fR
-debugger\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-client\-libdir=\fR\fB\fIpath\fR\fR
-.sp
-The path to the directory where client libraries are located\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-combination=\fR\fB\fIvalue\fR\fR
-.sp
-Extra option to pass to
-\fBmysqld\fR\&. The value should consist of a single
-\fBmysqld\fR
-option including dashes\&. This option is similar to
-\fB\-\-mysqld\fR
-but has a different effect\&.
-\fBmysql\-test\-run\&.pl\fR
-executes multiple test runs, using the options for each instance of
-\fB\-\-combination\fR
-in successive runs\&. If
-\fB\-\-combination\fR
-is given only once, it has no effect\&. For test runs specific to a given test suite, an alternative to the use of
-\fB\-\-combination\fR
-is to create a
-combinations
-file in the suite directory\&. The file should contain a section of options for each test run\&. See
-Section\ \&4.9, \(lqPassing Options from mysql-test-run.pl to mysqld or mysqltest\(rq\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-comment=\fR\fB\fIstr\fR\fR
-.sp
-Write
-\fIstr\fR
-to the output within lines filled with
-#, as a form of banner\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-compress\fR
-.sp
-Compress all information sent between the client and the server if both support compression\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-cursor\-protocol\fR
-.sp
-Pass the
-\fB\-\-cursor\-protocol\fR
-option to
-\fBmysqltest\fR
-(implies
-\fB\-\-ps\-protocol\fR)\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-dbx\fR
-.sp
-Start
-\fBmysqld\fR
-in the
-\fBdbx\fR
-debugger\&. Support for dbx is available from MySQL 5\&.5\&.12\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-ddd\fR
-.sp
-Start
-\fBmysqld\fR
-in the
-\fBddd\fR
-debugger\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-debug\fR
-.sp
-Dump trace output for all clients and servers\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-debugger=\fR\fB\fIdebugger\fR\fR
-.sp
-Start
-\fBmysqld\fR
-using the named debugger\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-debug\-common\fR
-.sp
-This option works similar to
-\-\-debug
-but turns on debug only for the debug macro keywords
-query, info, error, enter, exit
-which are considered the most commonly used\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-debug\-server\fR
-.sp
-Runs
-mysqld\&.debug
-(if available) instead of
-mysqld
-as server\&. If it does find
-mysqld\&.debug, it will search for plugin libraries in a subdirectory
-debug
-under the directory where it\*(Aqs normally located\&. This option does not turn on trace output and is independent of the
-\fBdebug\fR
-option\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-debug\-sync\-timeout=\fR\fB\fIseconds\fR\fR
-.sp
-Controls whether the Debug Sync facility for testing and debugging is enabled\&. The option value is a timeout in seconds\&. The default value is 300\&. A value of 0 disables Debug Sync\&. The value of this option also becomes the default timeout for individual synchronization points\&.
-.sp
-\fBmysql\-test\-run\&.pl\fR
-passes
-\fB\-\-loose\-debug\-sync\-timeout=\fR\fB\fIseconds\fR\fR
-to
-\fBmysqld\fR\&. The
-\fB\-\-loose\fR
-prefix is used so that
-\fBmysqld\fR
-does not fail if Debug Sync is not compiled in\&.
-.sp
-For information about using the Debug Sync facility for testing, see
-Section\ \&4.15, \(lqThread Synchronization in Test Cases\(rq\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-default\-myisam\fR
-.sp
-Use
-MyISAM
-as the default storage engine for all except
-InnoDB\-specific tests\&. This option is on by default in MySQL 5\&.5 and 5\&.6, but is off by default as of MySQL 5\&.7\&. See also
-\fB\-\-nodefault\-myisam\fR\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-defaults\-file=\fR\fB\fIfile_name\fR\fR
-.sp
-Use the named file as fixed config file template for all tests\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-defaults_extra_file=\fR\fB\fIfile_name\fR\fR
-.sp
-Add setting from the named file to all generated configs\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-discover\fR
-.sp
-Attempt to preload
-discover, the Developer Studio Memory Error Discovery Tool when starting
-\fBmysqld\fR\&. Reports from
-discover
-may be found in
-log/mysqld\&.%p\&.txt
-under the directory given by
-\fB\-\-vardir\fR\&. This option was added in MySQL 8\&.0\&.1\&. It is supported only on SPARC\-M7 systems\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-do\-suite=\fR\fB\fIprefix or regex\fR\fR
-.sp
-Run all test cases from suites having a name that begins with the given
-\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 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 allows more flexible specification of which tests to perform\&. If the argument contains a pattern metacharacter other than a lone period, it is interpreted as a Perl regular expression and applies to test names that match the pattern\&. If the argument contains a lone period or does not contain any pattern metacharacters, it is interpreted the same way as previously and matches test names that begin with the argument value\&. For example,
-\fB\-\-do\-test=testa\fR
-matches tests that begin with
-testa,
-\fB\-\-do\-test=main\&.testa\fR
-matches tests in the
-main
-test suite that begin with
-testa, and
-\fB\-\-do\-test=main\&.*testa\fR
-matches test names that contain
-main
-followed by
-testa
-with anything in between\&. In the latter case, the pattern match is not anchored to the beginning of the test name, so it also matches names such as
-xmainytestz\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-do\-testlist=\fR\fB\fIfile\fR\fR
-.sp
-Run all tests listed in the file
-\fIfile\fR\&. In this file, tests should be listed one per line in the form
-\fIsuite\fR\&.\fItest\fR
-or alternatively, with a space instead of the period\&. A line beginning with
-#
-will be ignored and can be used for comments\&.
-.sp
-The
-\fB\-\-do\-test\-list\fR
-option is available from MySQL 5\&.7\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-embedded\-server\fR
-.sp
-Use a version of
-\fBmysqltest\fR
-built with the embedded server\&. This option was removed in MySQL 8\&.0\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-enable\-disabled\fR
-.sp
-Ignore any
-disabled\&.def
-file, and run also tests marked as disbaled\&. Success or failure of those tests will be reported the same way as other tests\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-experimental=\fR\fB\fIfile_name\fR\fR
-.sp
-Specify a file that contains a list of test cases that should be displayed with the
-[ exp\-fail ]
-code rather than
-[ fail ]
-if they fail\&.
-.sp
-For an example of a file that might be specified using this option, see
-mysql\-test/collections/default\&.experimental\&.
-.sp
-It is also possible to supply more than one
-\fB\-\-experimental\fR, test cases listed in all the files will be treated as experimental\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-explain\-protocol\fR,
-.sp
-Run
-EXPLAIN EXTENDED
-on all
-SELECT,
-INSERT,
-REPLACE,
-UPDATE, and
-DELETE
-statements\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-extern\fR
-\fIoption\fR=\fIvalue\fR
-.sp
-Use an already running server\&. The option/value pair is what is needed by the
-\fBmysql\fR
-client to connect to the server\&. Each
-\fB\-\-extern\fR
-can only take one option/value pair as argument, so it you need more you need to repeat
-\fB\-\-extern\fR
-for each of them\&. Example:
-.sp
-.if n \{\
-.RS 4
-.\}
-.nf
-      \&./mysql\-test\-run\&.pl \-\-extern socket=var/tmp/mysqld\&.1\&.sock alias
-.fi
-.if n \{\
-.RE
-.\}
-.sp
-Note: If a test case has an
-\&.opt
-file that requires the server to be restarted with specific options, the file will not be used\&. The test case likely will fail as a result\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-fast\fR
-.sp
-Do not perform controlled shutdown when servers need to be restarted or at the end of the test run\&. This is equivalent to using
-\-\-shutdown\-timeout=0\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-fail\-check\-testcases\fR
-.sp
-Enabling this option when a test is run, causes it to fail if MTR\*(Aqs internal check of the test case fails\&. If this option is disabled, only a warning is generated while the test passes\&. This option is enabled by default\&. For additional information, see the description of the
-\fB\-\-check\-testcases\fR
-option\&.
-.sp
-The
-\fB\-\-fail\-check\-testcases\fR
-option was added in MySQL 8\&.0\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-force\fR
-.sp
-Normally,
-\fBmysql\-test\-run\&.pl\fR
-exits if a test case fails\&.
-\fB\-\-force\fR
-causes execution to continue regardless of test case failure\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\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\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-gcov\fR
-.sp
-Run tests with the
-\fBgcov\fR
-test coverage tool\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-gdb\fR
-.sp
-Start
-\fBmysqld\fR
-in the
-\fBgdb\fR
-debugger\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-gprof\fR
-.sp
-Run tests with the
-\fBgprof\fR
-profiling tool\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-include\-ndbcluster\fR,
-\fB\-\-include\-ndb\fR
-.sp
-Run also tests that need Cluster\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-json\-explain\-protocol\fR,
-.sp
-Run
-EXPLAIN FORMAT=JSON
-on all SELECT, INSERT, REPLACE, UPDATE and DELETE queries\&. The
-json\-explain\-protocol
-option is available from MySQL 5\&.6\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\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
-\fBdbx\fR
-debugger\&. Support for dbx is available from MySQL 5\&.5\&.12\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-manual\-ddd\fR
-.sp
-Use a server that has already been started by the user in the
-\fBddd\fR
-debugger\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-manual\-debug\fR
-.sp
-Use a server that has already been started by the user in a debugger\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-manual\-gdb\fR
-.sp
-Use a server that has already been started by the user in the
-\fBgdb\fR
-debugger\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-mark\-progress\fR
-.sp
-Marks progress with timing (in milliseconds) and line number in
-var/log/\fItestname\fR\&.progress\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-max\-connections=\fR\fB\fInum\fR\fR
-.sp
-The maximum number of simultaneous server connections that may be used per test\&. If not set, the maximum is 128\&. Minimum allowed limit is 8, maximum is 5120\&. Corresponds to the same option for
-\fBmysqltest\fR\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-max\-save\-core=\fR\fB\fIN\fR\fR
-.sp
-Limit the number of core files saved, to avoid filling up disks in case of a frequently crashing server\&. Defaults to 5, set to 0 for no limit\&. May also be set with the environment variable
-MTR_MAX_SAVE_CORE
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-max\-save\-datadir=\fR\fB\fIN\fR\fR
-.sp
-Limit the number of data directories saved after failed tests, to avoid filling up disks in case of frequent failures\&. Defaults to 20, set to 0 for no limit\&. May also be set with the environment variable
-MTR_MAX_SAVE_DATADIR
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-max\-test\-fail=\fR\fB\fIN\fR\fR
-.sp
-Stop execution after the specified number of tests have failed, to avoid using up resources (and time) in case of massive failures\&. retries are noe counted, nor are failures of tests marked experimental\&. Defaults to 10, set to 0 for no limit\&. May also be set with the environment variable
-MTR_MAX_TEST_FAIL
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-mem\fR
-.sp
-This option is not supported on Windows\&.
-.sp
-Run the test suite in memory, using tmpfs or ramdisk\&. This can decrease test times significantly, in particular if you would otherwise be running over a remote file system\&.
-\fBmysql\-test\-run\&.pl\fR
-attempts to find a suitable location using a built\-in list of standard locations for tmpfs and puts the
-var
-directory there\&. This option also affects placement of temporary files, which are created in
-var/tmp\&.
-.sp
-The default list includes
-/dev/shm\&. You can also enable this option by setting the environment variable
-MTR_MEM[=\fIdir_name\fR]\&. If
-\fIdir_name\fR
-is given, it is added to the beginning of the list of locations to search, so it takes precedence over any built\-in locations\&.
-.sp
-Once you have run tests with
-\fB\-\-mem\fR
-within a
-mysql\-testdirectory, a soflink
-var
-will have been set up to the temporary directory, and this will be re\-used the next time, until the soflink is deleted\&. Thus, you do not have to repeat the
-\fB\-\-mem\fR
-option next time\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-mysqld=\fR\fB\fIvalue\fR\fR
-.sp
-Extra option to pass to
-\fBmysqld\fR\&. Only one option may be specified in
-\fIvalue\fR; to specify more than one, use additional
-\fB\-\-mysqld\fR
-options\&. See
-Section\ \&4.9, \(lqPassing Options from mysql-test-run.pl to mysqld or mysqltest\(rq\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-mysqld\-env=\fR\fB\fIvariable\fR\fR\fB=\fR\fB\fIvalue\fR\fR
-.sp
-Sets (or changes) an environment variable before starting
-\fBmysqld\fR\&. Varibles set in the environment from which you run
-\fBmysql\-test\-run\&.pl\fR
-will normally also be propagated to
-\fBmysqld\fR, but there may be cases where you want a setting just for a single run, or you may not want the setting to affect other programs\&. You may use additional
-\fB\-\-mysqld\-env\fR
-options to set more than one variable\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-mysqltest=\fR\fB\fIoptions\fR\fR
-.sp
-Extra options to pass to
-\fBmysqltest\fR\&.
-.sp
-This option was added in MySQL 8\&.0\&.0\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-ndb\-connectstring=\fR\fB\fIstr\fR\fR
-.sp
-Pass
-\fB\-\-ndb\-connectstring=\fR\fB\fIstr\fR\fR
-to the master MySQL server\&. This option also prevents
-\fBmysql\-test\-run\&.pl\fR
-from starting a cluster\&. It is assumed that there is already a cluster running to which the server can connect with the given connectstring\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-nocheck\-testcases\fR
-.sp
-Disable the check for test case side effects\&. For additional information, see the description of the
-\fB\-\-check\-testcases\fR
-option\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\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\&.
-.sp
-From MySQL 5\&.7, the default engine for tests has been changed to InnoDB and this option will have no effect\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-noreorder\fR
-.sp
-Do not reorder tests to reduce number of restarts, but run them in exactly the order given\&. If a whole suite is to be run, the tests are run in alphabetic order, though similiar combinations will be grouped together\&. If more than one suite is listed, the tests are run one suite at a time, in the order listed\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-no\-skip\fR
-.sp
-This option forces all tests to run, ignoring any
-\fB\-\-skip\fR
-commands used in the test\&. This ensures that all tests are run\&. An excluded list (excludenoskip\&.list) is maintained to track which tests should continue to be skipped\&. The
-\fB\-\-no\-skip\fR
-option continues to skip the tests that are named in the excluded list\&. The default value of
-\fB\-\-no\-skip\fR
-introduced variable is OFF, which implies users are not forced to run all tests unless the
-\fB\-\-no\-skip\fR
-is explicitly used\&.
-.sp
-.if n \{\
-.RS 4
-.\}
-.nf
-shell> \fBmysql\-test\-run\&.pl\fR
-          \fB\-\-suite=innodb\fR
-          \fB\-\-no\-skip\fR
-.fi
-.if n \{\
-.RE
-.\}
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-notimer\fR
-.sp
-Cause
-\fBmysqltest\fR
-not to generate a timing file\&. The effect of this is that the report from each test case does not include the timing in milliseconds as it normally does\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-nounit\-tests\fR
-.sp
-Do not run unit tests, overriding default behavior or setting of the
-MTR_UNIT_TESTS
-variable\&.
-.sp
-Running of unit tests was enabled from MySQL 5\&.5\&.11\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-nowarnings\fR
-.sp
-Do not look for and report errors and warning in the server logs\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-only\-big\-tests\fR
-.sp
-This option causes only big tests to run\&. Normal (non\-big) tests are skipped\&. If both
-\fB\-\-big\-test\fR
-and
-\fB\-\-only\-big\-tests\fR
-are given,
-\fB\-\-only\-big\-tests\fR
-is ignored\&.
-.sp
-\fB\-\-only\-big\-tests\fR
-was added in MySQL 8\&.0\&.1\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-parallel={\fR\fB\fIN\fR\fR\fB|auto}\fR
-.sp
-Run tests using
-\fIN\fR
-parallel threads\&. By default, 1 thread is used\&. Use
-\fB\-\-parallel=auto\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
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-port\-base=\fR\fB\fIP\fR\fR
-.sp
-Specify base of port numbers to be used; a block of 10 will be allocated\&.
-\fIP\fR
-should be divisible by 10; if it is not, it will be rounded down\&. If running with more than one parallel test thread, thread 2 will use the next block of 10 and so on\&.
-.sp
-If the port number is given as
-auto, which is also the default,
-\fBmysql\-test\-run\&.pl\fRwill allocate a number unique to this host\&. The value may also be given with the environment variable
-MTR_PORT_BASE\&.
-.sp
-\fB\-\-port\-base\fR
-was added in MySQL 5\&.1\&.45 as a more logical alternative to
-\fB\-\-build\-thread\fR\&. If both are used,
-\fB\-\-port\-base\fR
-takes precedence\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-print\-testcases\fR
-.sp
-Do not run any tests, but print details about all tests, in the order they would have been run\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-ps\-protocol\fR
-.sp
-Pass the
-\fB\-\-ps\-protocol\fR
-option to
-\fBmysqltest\fR\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-record\fR
-.sp
-Pass the
-\fB\-\-record\fR
-option to
-\fBmysqltest\fR\&. This option requires a specific test case to be named on the command line\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-reorder\fR
-.sp
-Reorder tests to minimize the number of server restarts needed\&. This is the default behavior\&. There is no guarantee that a particular set of tests will always end up in the same order\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-repeat=\fR\fB\fIN\fR\fR
-.sp
-Run each test
-\fIN\fR
-number of times\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-report\-features\fR
-.sp
-Display the output of
-SHOW ENGINES
-and
-SHOW VARIABLES\&. This can be used to verify that binaries are built with all required features\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-report\-times\fR
-.sp
-At the end of the test run, write a summary of how much time was spent in various phases of execution\&. If you run with
-\fB\-\-parallel\fR, the total will exceed the wall clock time passed, since it will be summed over all threads\&.
-.sp
-The times reported should only be treated as approximations, and the exact points where the time is taken may also change between releases\&. If the test run is aborted, including if a test fails and
-\fB\-\-force\fR
-is not in use, the time report will not be produced\&.
-.sp
-The
-\fB\-\-report\-times\fR
-is available from MySQL 5\&.5\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-retry=\fR\fB\fIN\fR\fR
-.sp
-If a test fails, it is retried up to a maximum of
-\fIN\fR
-runs, but will terminate after 2 failures\&. Default is 3, set to 1 or 0 for no retries\&. This option has no effect unless
-\fB\-\-force\fR
-is also used; without it, test execution will terminate after the first failure\&.
-.sp
-The
-\fB\-\-retry\fR
-and
-\fB\-\-retry\-failure\fR
-options do not affect how many times a test repeated with
-\fB\-\-repeat\fR
-may fail in total, as each repetition is considered a new test case, which may in turn be retried if it fails\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-retry\-failure=\fR\fB\fIN\fR\fR
-.sp
-Allow a failed and retried test to fail more than the default 2 times before giving it up\&. Setting it to 0 or 1 effectively turns off retries
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-sanitize\fR
-.sp
-Scan the server log files for warnings from various sanitizers\&. Use of this option assumes that MySQL was configured with
-\fB\-DWITH_ASAN\fR
-or
-\fB\-DWITH_UBSAN\fR\&.
-.sp
-This option was added in MySQL 8\&.0\&.0\&. As of MySQL 8\&.0\&.1, the
-TSAN_OPTIONS
-environment variable can be set to specify the path name of a file containing ThreadSanitizer suppressions\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-shutdown\-timeout=\fR\fB\fIseconds\fR\fR
-.sp
-Max number of seconds to wait for servers to do controlled shutdown before killing them\&. Default is 10\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-skip\-combinations\fR
-.sp
-Do not apply combinations; ignore combinations file or option\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-skip\-ndbcluster\fR,
-\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\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-skip\-ndbcluster\-slave\fR,
-\fB\-\-skip\-ndb\-slave\fR
-.sp
-Do not start an NDB Cluster slave\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-skip\-rpl\fR
-.sp
-Skip replication test cases\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-skip\-ssl\fR
-.sp
-Do not start
-\fBmysqld\fR
-with support for SSL connections\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-skip\-test=\fR\fB\fIregex\fR\fR
-.sp
-Specify a regular expression to be applied to test case names\&. Cases with names that match the expression are skipped\&. tests to skip\&.
-.sp
-The argument for the
-\fB\-\-skip\-test\fR
-option allows more flexible specification of which tests to skip\&. If the argument contains a pattern metacharacter other than a lone period, it is interpreted as a Perl regular expression and applies to test names that match the pattern\&. See the description of the
-\fB\-\-do\-test\fR
-option for details\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-skip\-test\-list=\fR\fB\fIfile\fR\fR
-.sp
-Specify a file listing tests that should be skipped (disabled)\&.
-.sp
-The file has the same format as the
-disabled\&.def
-file listing disabled tests\&. With this option, disabling can be done on a case by case basis\&. The
-\fB\-\-skip\-test\-list\fR
-option is supported from MySQL 5\&.5\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-skip\-*\fR
-.sp
-\fB\-\-skip\-*\fR
-options not otherwise recognized by
-\fBmysql\-test\-run\&.pl\fR
-are passed to the master server\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-sleep=\fR\fB\fIN\fR\fR
-.sp
-Pass
-\fB\-\-sleep=\fR\fB\fIN\fR\fR
-to
-\fBmysqltest\fR\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-sp\-protocol\fR
-.sp
-Pass the
-\fB\-\-sp\-protocol\fR
-option to
-\fBmysqltest\fR\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-ssl\fR
-.sp
-If
-\fBmysql\-test\-run\&.pl\fR
-is started with the
-\fB\-\-ssl\fR
-option, it sets up a secure connection for all test cases\&. In this case, if
-\fBmysqld\fR
-does not support SSL,
-\fBmysql\-test\-run\&.pl\fR
-exits with an error message:
-Couldn\*(Aqt find support for SSL
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-start\fR
-.sp
-Initialize and start servers with the startup settings for the specified test case\&. You can use this option to start a server to which you can connect later\&. For example, after building a source distribution you can start a server and connect to it with the
-\fBmysql\fR
-client like this:
-.sp
-.if n \{\
-.RS 4
-.\}
-.nf
-shell> \fBcd mysql\-test\fR
-shell> \fB\&./mysql\-test\-run\&.pl \-\-start alias &\fR
-shell> \fB\&.\&./mysql \-S \&./var/tmp/master\&.sock \-h localhost \-u root\fR
-.fi
-.if n \{\
-.RE
-.\}
-.sp
-If no tests are named on the command line, the server(s) will be started with settings for the first test that would have been run without the
-\fB\-\-start\fR
-option\&.
-.sp
-\fBmysql\-test\-run\&.pl\fR
-will stop once the server has been started, but will terminate if the server dies\&. If killed, it will also shut down the server\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-start\-and\-exit\fR
-.sp
-This is similar to
-\fB\-\-start\fR, but
-\fBmysql\-test\-run\&.pl\fR
-terminates once the server has been started, leaving just the server process running\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-start\-dirty\fR
-.sp
-This is similar to
-\fB\-\-start\fR, but will skip the database initialization phase and assume that database files are already available\&. Usually this means you must have run another test first\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-start\-from=\fR\fB\fItest_name\fR\fR
-.sp
-\fBmysql\-test\-run\&.pl\fR
-sorts the list of names of the test cases to be run, and then begins with
-\fItest_name\fR\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-strace\-client\fR
-.sp
-Create
-\fBstrace\fR
-output for
-\fBmysqltest\fR\&. Will produce default
-\fBstrace\fR
-output as
-mysqltest\&.strace\&. Note that this will be overwritten for each new test case, so it\*(Aqs most useful for running only one test\&.
-.sp
-The
-\fBstrace\-client\fR
-option is functional from MySQL 5\&.5\&.20, and only supported on Linux\&. The option was available in earlier versions too, but was not working properly\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-strace\-server\fR
-.sp
-Create
-\fBstrace\fR
-output for the server\&. Will produce default
-\fBstrace\fR
-output as
-mysqld\&.1\&.strace\&. Note that this will be overwritten each time the server is restarted, so it\*(Aqs most useful for running a single test, or if you want trace from the first test that fails\&.
-.sp
-The
-\fBstrace\-server\fR
-option is available from MySQL 5\&.5\&.20, on Linux only\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-stress=\fR\fB\fIstress options\fR\fR
-.sp
-Start a server, but instead of running a test, run
-\fBmysql\-stress\-test\&.pl\fR
-with the supplied arguments\&. Arguments needed to communicate with the server will be automatically provided, the rest should be given as arguments to this option\&. Command line options for
-\fBmysql\-stress\-test\&.pl\fR
-should be separeted by a comma\&.
-.sp
-The
-\fBstress\fR
-option was added in MySQL 5\&.5\&.17, it is not a direct replacement for the option of the same name that exists in version 1 of
-\fBmysql\-test\-run\&.pl\fR\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-suite=\fR\fB\fIsuite_name\fR\fR
-.sp
-Run the named test suite\&. The default name is
-main
-(the regular test suite located in the
-mysql\-test
-directory)\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-suite\-timeout=\fR\fB\fIminutes\fR\fR
-.sp
-Specify the maximum test suite runtime in minutes\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-summary\-report=\fR\fB\fIfile_name\fR\fR
-.sp
-Generate a plain text version of the test summary only and write it to the file named as the option argument\&. The file is suitable for sending by email\&. This option was added in MySQL 8\&.0\&.1\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-test\-progress\fR
-.sp
-Display the percentage of tests remaining\&. This option was added in MySQL 5\&.7\&.19\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-testcase\-timeout=\fR\fB\fIminutes\fR\fR
-.sp
-Specify the maximum test case runtime in minutes\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-timediff\fR
-.sp
-Adds to each test report for a test case, the total time in sconds and milliseconds passed since the preceding test ended\&. This option can only be used together with
-\fB\-\-timestamp\fR, and has no effect without it\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-timer\fR
-.sp
-Cause
-\fBmysqltest\fR
-to generate a timing file\&. The default file is named
-\&./var/log/timer\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-timestamp\fR
-.sp
-Prints a timestamp before the test case name in each test report line, showing when the test ended\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-tmpdir=\fR\fB\fIpath\fR\fR
-.sp
-The directory where temporary file are stored\&. The default location is
-\&./var/tmp\&. The environment variable
-MYSQL_TMP_DIR
-will be set to the path for this directory, whether it has the default value or has been set explicitly\&. This may be referred to in tests\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-unit\-tests\fR
-.sp
-Force running of unit tests, overriding default behavior or setting of the
-MTR_UNIT_TESTS
-variable\&.
-.sp
-Running of unit tests was enabled from MySQL 5\&.5\&.11\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-unit\-tests\-report\fR
-.sp
-Extend the unit test run by also outputting the log from the test run, independently of whether it succeeded or not\&. This option implies
-\fB\-\-unit\-tests\fR
-so it is not necessary to specify both\&. The
-\fB\-\-unit\-tests\-report\fR
-option is available in MySQL 5\&.5 from version 5\&.5\&.44, in 5\&.6 from version 5\&.6\&.25 as well as in MySQL 5\&.7\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-user=\fR\fB\fIuser_name\fR\fR
-.sp
-The MySQL user name to use when connecting to the server\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-user\-args\fR
-.sp
-Drops all non\-essential command line arguments to the
-\fBmysqld\fR
-server, except those supplied with
-\fB\-\-mysqld\fR
-arguemnts, if any\&. Only works in combination with
-\fB\-\-start\fR,
-\fB\-\-start\-and\-exit\fR
-or
-\fB\-\-start\-dirty\fR, and only if no test name is given\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-valgrind\fR
-.sp
-Run
-\fBmysqltest\fR
-and
-\fBmysqld\fR
-with
-\fBvalgrind\fR\&. This and the following
-\fB\-\-valgrind\fR
-options require that the executables have been build with
-\fBvalgrind\fR
-support\&.
-.sp
-When the server is run with valgrind, an extra pass over the server log file(s) will be performed after all tests are run, and any report with problems that have been reported at server shutdown will be extracted and printed\&. The most common warnings are memory leaks\&. With each report will also be listed all tests that were run since previous server restart; one of these is likely to have caused the problem\&.
-.sp
-From MySQL 5\&.5\&.13, a final "pseudo" test named
-valgrind_report
-is added to the list of tests when the server is run in valgrind\&. This test is reported as failed if any such shutdown warnings were produced by valgrind\&. Pass or failure of this test is also added to the total test count reported\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-valgrind\-clients\fR
-.sp
-Run all clients started by
-\&.test
-files with
-\fBvalgrind\fR\&. This option requires
-\fBvalgrind\fR
-3\&.9 or later\&.
-.sp
-\fB\-\-valgrind\-clients\fR
-was added in MySQL 5\&.7\&.9\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-valgrind\-mysqld\fR
-.sp
-Run the
-\fBmysqld\fR
-server with
-\fBvalgrind\fR\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-valgrind\-mysqltest\fR
-.sp
-Run
-\fBmysqltest\fR
-with
-\fBvalgrind\fR\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-valgrind\-option=\fR\fB\fIstr\fR\fR
-.sp
-Extra options to pass to
-\fBvalgrind\fR\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-valgrind\-path=\fR\fB\fIpath\fR\fR
-.sp
-Specify the path name to the
-\fBvalgrind\fR
-executable\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-vardir=\fR\fB\fIpath\fR\fR
-.sp
-Specify the path where files generated during the test run are stored\&. The default location is
-\&./var\&. The environment variable
-MYSQLTEST_VARDIR
-will be set to the path for this directory, whether it has the default value or has been set explicitly\&. This may be referred to in tests\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-verbose\fR
-.sp
-Give more verbose output regarding test execution\&. Use the option twice to get even more output\&. Note that the output generated within each test case is not affected\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-verbose\-restart\fR
-.sp
-Write when and why servers are restarted between test cases\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-view\-protocol\fR
-.sp
-Pass the
-\fB\-\-view\-protocol\fR
-option to
-\fBmysqltest\fR\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-vs\-config=\fR\fB\fIconfig_val\fR\fR
-.sp
-Specify the configuration used to build MySQL (for example,
-\fB\-\-vs\-config=debug\fR
-\fB\-\-vs\-config=release\fR)\&. This option is for Windows only\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-wait\-all\fR
-.sp
-If
-\fB\-\-start\fR
-or
-\fB\-\-start\-dirty\fR
-is used, wait for all servers to exit before termination\&. Otherise, it will terminate if one (of several) servers is restarted\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-warnings\fR
-.sp
-Search the server log for errors or warning after each test and report any suspicious ones; if any are found, the test will be marked as failed\&. This is the default behavior, it may be turned off with
-\fB\-\-nowarnings\fR\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-with\-ndbcluster\-only\fR
-.sp
-Run only test cases that have
-ndb
-in their name\&.
-.RE
-.if n \{\
-.sp
-.\}
-.RS 4
-.it 1 an-trap
-.nr an-no-space-flag 1
-.nr an-break-flag 1
-.br
-.ps +1
-\fBNote\fR
-.ps -1
-.br
-.PP
-The hostname resolves to 127\&.0\&.0\&.1 and not to the actual IP address\&.
-.sp .5v
-.RE
-.SH "COPYRIGHT"
-.br
-.PP
-Copyright \(co 2006, 2017, Oracle and/or its affiliates. All rights reserved.
-.PP
-This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
-.PP
-This documentation is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-.PP
-You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/.
-.sp
-.SH "NOTES"
-.IP " 1." 4
-The MySQL Test Framework, Version 2.0
-.RS 4
-\%http://dev.mysql.com/doc/dev/mysql-server/latest/PAGE_MYSQL_TEST_RUN.html
-.RE
-.SH "SEE ALSO"
-For more information, please refer to the MySQL Reference Manual,
-which may already be installed locally and which is also available
-online at http://dev.mysql.com/doc/.
-.SH AUTHOR
-Oracle Corporation (http://dev.mysql.com/).
index 7cb8fb915af441770644b77cb3622fab40bbf020..2ca5036d6202e9208f9da057bc0fc7182ef00dcc 100644 (file)
@@ -2,12 +2,12 @@
 .\"     Title: \fBmysql\fR
 .\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
 .\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
-.\"      Date: 06/02/2017
+.\"      Date: 06/15/2018
 .\"    Manual: MySQL Database System
 .\"    Source: MySQL 5.6
 .\"  Language: English
 .\"
-.TH "\FBMYSQL\FR" "1" "06/02/2017" "MySQL 5\&.6" "MySQL Database System"
+.TH "\FBMYSQL\FR" "1" "06/15/2018" "MySQL 5\&.6" "MySQL Database System"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -292,7 +292,7 @@ This option is supported beginning with MySQL 5\&.6\&.1\&.
 \fB\-\-character\-sets\-dir=\fR\fB\fIdir_name\fR\fR
 .sp
 The directory where character sets are installed\&. See
-Section\ \&10.5, \(lqCharacter Set Configuration\(rq\&.
+Section\ \&10.14, \(lqCharacter Set Configuration\(rq\&.
 .RE
 .sp
 .RS 4
@@ -332,9 +332,9 @@ Display result set metadata\&.
 \fB\-\-comments\fR,
 \fB\-c\fR
 .sp
-Whether to preserve comments in statements sent to the server\&. The default is
+Whether to strip or preserve comments in statements sent to the server\&. The default is
 \fB\-\-skip\-comments\fR
-(discard comments), enable with
+(strip comments), enable with
 \fB\-\-comments\fR
 (preserve comments)\&.
 .RE
@@ -466,8 +466,8 @@ This option can be useful if the operating system uses one character set and the
 client by default uses another\&. In this case, output may be formatted incorrectly\&. You can usually fix such issues by using this option to force the client to use the system character set instead\&.
 .sp
 For more information, see
-Section\ \&10.1.4, \(lqConnection Character Sets and Collations\(rq, and
-Section\ \&10.5, \(lqCharacter Set Configuration\(rq\&.
+Section\ \&10.4, \(lqConnection Character Sets and Collations\(rq, and
+Section\ \&10.14, \(lqCharacter Set Configuration\(rq\&.
 .RE
 .sp
 .RS 4
@@ -669,7 +669,7 @@ Produce HTML output\&.
 Ignore spaces after function names\&. The effect of this is described in the discussion for the
 IGNORE_SPACE
 SQL mode (see
-Section\ \&5.1.8, \(lqServer SQL Modes\(rq)\&.
+Section\ \&5.1.10, \(lqServer SQL Modes\(rq)\&.
 .RE
 .sp
 .RS 4
@@ -719,7 +719,7 @@ LOCAL\&. The option may be given as
 or
 \fB\-\-local\-infile=1\fR
 to explicitly disable or enable
-LOCAL\&. Enabling local data loading has no effect if the server does not also support it; see
+LOCAL\&. Enabling local data loading also requires that the server permits it; see
 Section\ \&6.1.6, \(lqSecurity Issues with LOAD DATA LOCAL\(rq
 .RE
 .sp
@@ -1217,20 +1217,18 @@ This option is deprecated and will be removed in a future release\&. As of MySQL
 .sp -1
 .IP \(bu 2.3
 .\}
-\fB\-\-server\-public\-key\-path=\fR\fBfile_name\fR
+\fB\-\-server\-public\-key\-path=\fR\fB\fIfile_name\fR\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
+The path name to a file containing a client\-side copy of the public key required by the server for RSA key pair\-based password exchange\&. The file must be in PEM format\&. This option applies to clients that connect to the server using an account that authenticates with the
 sha256_password
-plugin\&. This option is ignored for client accounts that do not authenticate with that plugin\&. It is also ignored if password encryption is not needed, as is the case when the client connects to the server using an SSL connection\&.
+authentication plugin\&. This option is ignored for accounts that do not authenticate with one of those plugins\&. It is also ignored if RSA\-based password exchange is not used, as is the case when the client connects to the server using a secure connection\&.
 .sp
-The server sends the public key to the client as needed, so it is not necessary to use this option for RSA password encryption to occur\&. It is more efficient to do so because then the server need not send the key\&.
+This option is available only if MySQL was built using OpenSSL\&.
 .sp
-For additional discussion regarding use of the
+For information about the
 sha256_password
-plugin, including how to get the RSA public key, see
+plugin, see
 Section\ \&6.5.1.4, \(lqSHA-256 Pluggable Authentication\(rq\&.
-.sp
-This option is available only if MySQL was built using OpenSSL\&.
 .RE
 .sp
 .RS 4
@@ -1244,7 +1242,7 @@ This option is available only if MySQL was built using OpenSSL\&.
 \fB\-\-shared\-memory\-base\-name=\fR\fB\fIname\fR\fR
 .sp
 On Windows, the shared\-memory name to use, for connections made using shared memory to a local server\&. The default value is
-MYSQL\&. The shared\-memory name is case sensitive\&.
+MYSQL\&. The shared\-memory name is case\-sensitive\&.
 .sp
 The server must be started with the
 \fB\-\-shared\-memory\fR
@@ -1354,7 +1352,7 @@ localhost, the Unix socket file to use, or, on Windows, the name of the named pi
 Options that begin with
 \fB\-\-ssl\fR
 specify whether to connect to the server using SSL and indicate where to find SSL keys and certificates\&. See
-Section\ \&6.4.5, \(lqCommand Options for Secure Connections\(rq\&.
+Section\ \&6.4.2, \(lqCommand Options for Encrypted Connections\(rq\&.
 .RE
 .sp
 .RS 4
@@ -1500,9 +1498,9 @@ The output when
 is used with
 \fBmysql\fR
 matches that of
-\fBmysqldump \fR\fB\fB\-\-xml\fR\fR\&. See
-\fBmysqldump\fR(1)
-for details\&.
+\fBmysqldump\fR
+\fB\-\-xml\fR\&. See
+\fBmysqldump\fR(1), for details\&.
 .sp
 The XML output also uses an XML namespace, as shown here:
 .sp
@@ -1678,7 +1676,7 @@ or loaded using the
 source
 command)\&.
 .PP
-Each command has both a long and short form\&. The long form is not case sensitive; the short form is\&. The long form can be followed by an optional semicolon terminator, but the short form should not\&.
+Each command has both a long and short form\&. The long form is not case\-sensitive; the short form is\&. The long form can be followed by an optional semicolon terminator, but the short form should not\&.
 .PP
 The use of short\-form commands within multiple\-line
 /* \&.\&.\&. */
@@ -1791,7 +1789,7 @@ is set to something other than the default of
 ;, instances of that character are sent to the server without interpretation\&. However, the server itself still interprets
 ;
 as a statement delimiter and processes statements accordingly\&. This behavior on the server side comes into play for multiple\-statement execution (see
-Section\ \&23.8.17, \(lqC API Support for Multiple Statement Execution\(rq), and for parsing the body of stored procedures and functions, triggers, and events (see
+Section\ \&23.8.16, \(lqC API Multiple Statement Execution Support\(rq), and for parsing the body of stored procedures and functions, triggers, and events (see
 Section\ \&20.1, \(lqDefining Stored Programs\(rq)\&.
 .RE
 .sp
@@ -2334,87 +2332,87 @@ l l
 l l
 l l.
 T{
-\ec
+\c
 T}:T{
 A counter that increments for each statement you issue
 T}
 T{
-\eD
+\D
 T}:T{
 The full current date
 T}
 T{
-\ed
+\d
 T}:T{
 The default database
 T}
 T{
-\eh
+\h
 T}:T{
 The server host
 T}
 T{
-\el
+\l
 T}:T{
 The current delimiter
 T}
 T{
-\em
+\m
 T}:T{
 Minutes of the current time
 T}
 T{
-\en
+\n
 T}:T{
 A newline character
 T}
 T{
-\eO
+\O
 T}:T{
-The current month in three\-letter format (Jan, Feb, \&...)
+The current month in three-letter format (Jan, Feb, \&...)
 T}
 T{
-\eo
+\o
 T}:T{
 The current month in numeric format
 T}
 T{
-\eP
+\P
 T}:T{
 am/pm
 T}
 T{
-\ep
+\p
 T}:T{
 The current TCP/IP port or socket file
 T}
 T{
-\eR
+\R
 T}:T{
-The current time, in 24\-hour military time (0\(en23)
+The current time, in 24-hour military time (0\(en23)
 T}
 T{
-\er
+\r
 T}:T{
-The current time, standard 12\-hour time (1\(en12)
+The current time, standard 12-hour time (1\(en12)
 T}
 T{
-\eS
+\S
 T}:T{
 Semicolon
 T}
 T{
-\es
+\s
 T}:T{
 Seconds of the current time
 T}
 T{
-\et
+\t
 T}:T{
 A tab character
 T}
 T{
-\eU
+\U
 T}:T{
 .PP
 Your full
@@ -2422,57 +2420,57 @@ Your full
 account name
 T}
 T{
-\eu
+\u
 T}:T{
 Your user name
 T}
 T{
-\ev
+\v
 T}:T{
 The server version
 T}
 T{
-\ew
+\w
 T}:T{
-The current day of the week in three\-letter format (Mon, Tue, \&...)
+The current day of the week in three-letter format (Mon, Tue, \&...)
 T}
 T{
-\eY
+\Y
 T}:T{
 The current year, four digits
 T}
 T{
-\ey
+\y
 T}:T{
 The current year, two digits
 T}
 T{
-\e_
+\_
 T}:T{
 A space
 T}
 T{
-\e\ \&
+\\ \&
 T}:T{
 A space (a space follows the backslash)
 T}
 T{
-\e\*(Aq
+\'
 T}:T{
 Single quote
 T}
 T{
-\e"
+\"
 T}:T{
 Double quote
 T}
 T{
-\e\e
+\\
 T}:T{
-A literal \e backslash character
+A literal \ backslash character
 T}
 T{
-\e\fIx\fR
+\\fIx\fR
 T}:T{
 .PP
 \fIx\fR, for any
@@ -2844,7 +2842,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.13, \(lqServer-Side Help\(rq)\&.
 .PP
 If there is no match for the search string, the search fails:
 .sp
@@ -3284,7 +3282,7 @@ SET sql_safe_updates=1, sql_select_limit=1000, max_join_size=1000000;
 .\}
 .PP
 See
-Section\ \&5.1.5, \(lqServer System Variables\(rq\&.
+Section\ \&5.1.7, \(lqServer System Variables\(rq\&.
 .PP
 The
 SET
@@ -3406,11 +3404,11 @@ client with the
 option\&.
 .PP
 For more information about auto\-reconnect and its effect on state information when a reconnection occurs, see
-Section\ \&23.8.16, \(lqControlling Automatic Reconnection Behavior\(rq\&.
+Section\ \&23.8.20, \(lqC API Automatic Reconnection Control\(rq\&.
 .SH "COPYRIGHT"
 .br
 .PP
-Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved.
+Copyright \(co 1997, 2018, Oracle and/or its affiliates. All rights reserved.
 .PP
 This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
 .PP
index fd61f6e014570cecde27e9cfed70b6e974e9aec3..f2663c9a216ab415b7e798177d59d39c8ab530eb 100644 (file)
@@ -2,12 +2,12 @@
 .\"     Title: \fBmysql.server\fR
 .\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
 .\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
-.\"      Date: 06/02/2017
+.\"      Date: 06/15/2018
 .\"    Manual: MySQL Database System
 .\"    Source: MySQL 5.6
 .\"  Language: English
 .\"
-.TH "\FBMYSQL\&.SERVER\FR" "1" "06/02/2017" "MySQL 5\&.6" "MySQL Database System"
+.TH "\FBMYSQL\&.SERVER\FR" "1" "06/15/2018" "MySQL 5\&.6" "MySQL Database System"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -301,14 +301,14 @@ T}:T{
 directory name
 T}
 T{
-pid\-file
+pid-file
 T}:T{
 File in which server should write its process ID
 T}:T{
 file name
 T}
 T{
-service\-startup\-timeout
+service-startup-timeout
 T}:T{
 How long to wait for server startup
 T}:T{
@@ -398,7 +398,7 @@ exits with an error\&. The default value is 900\&. A value of 0 means not to wai
 .SH "COPYRIGHT"
 .br
 .PP
-Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved.
+Copyright \(co 1997, 2018, Oracle and/or its affiliates. All rights reserved.
 .PP
 This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
 .PP
diff --git a/mysql-wsrep-5.6/man/mysql_client_test.1 b/mysql-wsrep-5.6/man/mysql_client_test.1
deleted file mode 100644 (file)
index 49cf9fc..0000000
+++ /dev/null
@@ -1,322 +0,0 @@
-'\" t
-.\"     Title: \fBmysql_client_test\fR
-.\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
-.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
-.\"      Date: 06/01/2017
-.\"    Manual: MySQL Database System
-.\"    Source: MySQL
-.\"  Language: English
-.\"
-.TH "\FBMYSQL_CLIENT_TEST" "1" "06/01/2017" "MySQL" "MySQL Database System"
-.\" -----------------------------------------------------------------
-.\" * Define some portability stuff
-.\" -----------------------------------------------------------------
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-.\" http://bugs.debian.org/507673
-.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-.ie \n(.g .ds Aq \(aq
-.el       .ds Aq '
-.\" -----------------------------------------------------------------
-.\" * set default formatting
-.\" -----------------------------------------------------------------
-.\" disable hyphenation
-.nh
-.\" disable justification (adjust text to left margin only)
-.ad l
-.\" -----------------------------------------------------------------
-.\" * MAIN CONTENT STARTS HERE *
-.\" -----------------------------------------------------------------
-.SH "NAME"
-mysql_client_test \- test client API
-.br
-mysql_client_test_embedded \- test client API for embedded server
-.SH "SYNOPSIS"
-.HP \w'\fBmysql_client_test\ [\fR\fB\fIoptions\fR\fR\fB]\ [\fR\fB\fItest_name\fR\fR\fB]\ \&.\&.\&.\fR\ 'u
-\fBmysql_client_test [\fR\fB\fIoptions\fR\fR\fB] [\fR\fB\fItest_name\fR\fR\fB] \&.\&.\&.\fR
-.HP \w'\fBmysql_client_test_embedded\ [\fR\fB\fIoptions\fR\fR\fB]\ [\fR\fB\fItest_name\fR\fR\fB]\ \&.\&.\&.\fR\ 'u
-\fBmysql_client_test_embedded [\fR\fB\fIoptions\fR\fR\fB] [\fR\fB\fItest_name\fR\fR\fB] \&.\&.\&.\fR
-.SH "DESCRIPTION"
-.PP
-The
-\fBmysql_client_test\fR
-program is used for testing aspects of the MySQL client API that cannot be tested using
-\fBmysqltest\fR
-and its test language\&.
-\fBmysql_client_test\fR
-is run as part of the test suite\&.
-.PP
-\fBmysql_client_test_embedded\fR
-is similar but is used for testing the embedded server\&. This program is available only prior to MySQL 8\&.0\&.
-.PP
-The source code for the programs can be found in in
-tests/mysql_client_test\&.c
-in a source distribution\&. The program serves as a good source of examples illustrating how to use various features of the client API\&.
-.PP
-\fBmysql_client_test\fR
-is used in a test by the same name in the main tests suite of
-\fBmysql\-test\-run\&.pl\fR
-but may also be run directly\&. Unlike the other programs listed here, it does not read an external description of what tests to run\&. Instead, all tests are coded into the program, which is written to cover all aspects of the C language API\&.
-.PP
-\fBmysql_client_test\fR
-supports the following options:
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-help\fR,
-\fB\-?\fR
-.sp
-Display a help message and exit\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-basedir=\fR\fB\fIdir_name\fR\fR,
-\fB\-b \fR\fB\fIdir_name\fR\fR
-.sp
-The base directory for the tests\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-count=\fR\fB\fIcount\fR\fR,
-\fB\-t \fR\fB\fIcount\fR\fR
-.sp
-The number of times to execute the tests\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-database=\fR\fB\fIdb_name\fR\fR,
-\fB\-D \fR\fB\fIdb_name\fR\fR
-.sp
-The database to use\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-debug[=\fR\fB\fIdebug_options\fR\fR\fB]\fR,
-\fB\-#[\fR\fB\fIdebug_options\fR\fR\fB]\fR
-.sp
-Write a debugging log if MySQL is built with debugging support\&. The default
-\fIdebug_options\fR
-value is
-\*(Aqd:t:o,/tmp/mysql_client_test\&.trace\*(Aq\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-getopt\-ll\-test=\fR\fB\fIoption\fR\fR,
-\fB\-g \fR\fB\fIoption\fR\fR
-.sp
-Option to use for testing bugs in the
-getopt
-library\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-host=\fR\fB\fIhost_name\fR\fR,
-\fB\-h \fR\fB\fIhost_name\fR\fR
-.sp
-Connect to the MySQL server on the given host\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-password[=\fR\fB\fIpassword\fR\fR\fB]\fR,
-\fB\-p[\fR\fB\fIpassword\fR\fR\fB]\fR
-.sp
-The password to use when connecting to the server\&. If you use the short option form (\fB\-p\fR), you
-\fIcannot\fR
-have a space between the option and the password\&. If you omit the
-\fIpassword\fR
-value following the
-\fB\-\-password\fR
-or
-\fB\-p\fR
-option on the command line, you are prompted for one\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-port=\fR\fB\fIport_num\fR\fR,
-\fB\-P \fR\fB\fIport_num\fR\fR
-.sp
-The TCP/IP port number to use for the connection\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-server\-arg=\fR\fB\fIarg\fR\fR,
-\fB\-A \fR\fB\fIarg\fR\fR
-.sp
-Argument to send to the embedded server\&. This option was removed in MySQL 8\&.0\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-show\-tests\fR,
-\fB\-T\fR
-.sp
-Show all test names\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-silent\fR,
-\fB\-s\fR
-.sp
-Be more silent\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-socket=\fR\fB\fIpath\fR\fR,
-\fB\-S \fR\fB\fIpath\fR\fR
-.sp
-The socket file to use when connecting to
-localhost
-(which is the default host)\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-testcase\fR,
-\fB\-c\fR
-.sp
-The option is used when called from
-\fBmysql\-test\-run\&.pl\fR, so that
-\fBmysql_client_test\fR
-may optionally behave in a different way than if called manually, for example by skipping some tests\&. Currently, there is no difference in behavior but the option is included to make this possible\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-user=\fR\fB\fIuser_name\fR\fR,
-\fB\-u \fR\fB\fIuser_name\fR\fR
-.sp
-The MySQL user name to use when connecting to the server\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-v \fR\fB\fIdir_name\fR\fR,
-\fB\-\-vardir=\fR\fB\fIdir_name\fR\fR
-.sp
-The data directory for tests\&. The default is
-mysql\-test/var\&.
-.RE
-.SH "COPYRIGHT"
-.br
-.PP
-Copyright \(co 2006, 2017, Oracle and/or its affiliates. All rights reserved.
-.PP
-This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
-.PP
-This documentation is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-.PP
-You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/.
-.sp
-.SH "SEE ALSO"
-For more information, please refer to the MySQL Reference Manual,
-which may already be installed locally and which is also available
-online at http://dev.mysql.com/doc/.
-.SH AUTHOR
-Oracle Corporation (http://dev.mysql.com/).
diff --git a/mysql-wsrep-5.6/man/mysql_client_test_embedded.1 b/mysql-wsrep-5.6/man/mysql_client_test_embedded.1
deleted file mode 100644 (file)
index 44fb517..0000000
+++ /dev/null
@@ -1 +0,0 @@
-.so mysql_client_test.1
index 6c9172d5f816e1cb972a2be9ea08b3592e238551..5cb84138ccf9c27830f58d6ef70a340204b3396e 100644 (file)
@@ -2,12 +2,12 @@
 .\"     Title: \fBmysql_config\fR
 .\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
 .\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
-.\"      Date: 06/02/2017
+.\"      Date: 06/15/2018
 .\"    Manual: MySQL Database System
 .\"    Source: MySQL 5.6
 .\"  Language: English
 .\"
-.TH "\FBMYSQL_CONFIG\FR" "1" "06/02/2017" "MySQL 5\&.6" "MySQL Database System"
+.TH "\FBMYSQL_CONFIG\FR" "1" "06/15/2018" "MySQL 5\&.6" "MySQL Database System"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -253,7 +253,7 @@ gcc \-o progname progname\&.o `mysql_config \-\-libs`
 .SH "COPYRIGHT"
 .br
 .PP
-Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved.
+Copyright \(co 1997, 2018, Oracle and/or its affiliates. All rights reserved.
 .PP
 This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
 .PP
index e2d08f00d0f307b201227450ce676887b8d6fd0f..09de78dbfdb02bf5957d7f834d073743e69afcb2 100644 (file)
@@ -2,12 +2,12 @@
 .\"     Title: \fBmysql_config_editor\fR
 .\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
 .\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
-.\"      Date: 06/02/2017
+.\"      Date: 06/15/2018
 .\"    Manual: MySQL Database System
 .\"    Source: MySQL 5.6
 .\"  Language: English
 .\"
-.TH "\FBMYSQL_CONFIG_EDIT" "1" "06/02/2017" "MySQL 5\&.6" "MySQL Database System"
+.TH "\FBMYSQL_CONFIG_EDITOR\FR" "1" "06/15/2018" "MySQL 5\&.6" "MySQL Database System"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -463,7 +463,18 @@ shell> \fBmysql\fR
 Options read from the login path file take precedence over options read from other option files\&. Options read from login path groups appearing later in the login path file take precedence over options read from groups appearing earlier in the file\&.
 .PP
 \fBmysql_config_editor\fR
-adds login paths to the login path file in the order you create them, so you should create more general login paths first and more specific paths later\&. If you need to move a login path within the file, you can remove it, then recreate it to add it to the end\&.
+adds login paths to the login path file in the order you create them, so you should create more general login paths first and more specific paths later\&. If you need to move a login path within the file, you can remove it, then recreate it to add it to the end\&. For example, a
+client
+login path is more general because it is read by all client programs, whereas a
+mysqldump
+login path is read only by
+\fBmysqldump\fR\&. Options specified later override options specified earlier, so putting the login paths in the order
+client,
+mysqldump
+enables
+\fBmysqldump\fR\-specific options to override
+client
+options\&.
 .PP
 When you use the
 set
@@ -1064,7 +1075,7 @@ to disable it\&.
 .SH "COPYRIGHT"
 .br
 .PP
-Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved.
+Copyright \(co 1997, 2018, Oracle and/or its affiliates. All rights reserved.
 .PP
 This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
 .PP
index a2372ad674a17d0cd738180a976ebcbc67417faf..225d46d8945e113f66f806cdfbc6ad0d820ed277 100644 (file)
@@ -2,12 +2,12 @@
 .\"     Title: \fBmysql_convert_table_format\fR
 .\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
 .\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
-.\"      Date: 06/02/2017
+.\"      Date: 06/15/2018
 .\"    Manual: MySQL Database System
 .\"    Source: MySQL 5.6
 .\"  Language: English
 .\"
-.TH "\FBMYSQL_CONVERT_TAB" "1" "06/02/2017" "MySQL 5\&.6" "MySQL Database System"
+.TH "\FBMYSQL_CONVERT_TABLE_FORMAT\FR" "1" "06/15/2018" "MySQL 5\&.6" "MySQL Database System"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -220,7 +220,7 @@ Display version information and exit\&.
 .SH "COPYRIGHT"
 .br
 .PP
-Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved.
+Copyright \(co 1997, 2018, Oracle and/or its affiliates. All rights reserved.
 .PP
 This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
 .PP
index 3b081dcac5201b7296ff9baeed48d0881cab7991..892870700b2f116a5bdc9685e0c0b26a6d98e0e8 100644 (file)
@@ -2,12 +2,12 @@
 .\"     Title: \fBmysql_find_rows\fR
 .\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
 .\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
-.\"      Date: 06/02/2017
+.\"      Date: 06/15/2018
 .\"    Manual: MySQL Database System
 .\"    Source: MySQL 5.6
 .\"  Language: English
 .\"
-.TH "\FBMYSQL_FIND_ROWS\F" "1" "06/02/2017" "MySQL 5\&.6" "MySQL Database System"
+.TH "\FBMYSQL_FIND_ROWS\FR" "1" "06/15/2018" "MySQL 5\&.6" "MySQL Database System"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -165,7 +165,7 @@ Start output from this row\&.
 .SH "COPYRIGHT"
 .br
 .PP
-Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved.
+Copyright \(co 1997, 2018, Oracle and/or its affiliates. All rights reserved.
 .PP
 This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
 .PP
index 9d5c4a0083ff73b8f9221f8e04b1aaf1c984062b..a52743bd443f29fb2d54b221e8bd0b895fcb50a9 100644 (file)
@@ -2,12 +2,12 @@
 .\"     Title: \fBmysql_fix_extensions\fR
 .\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
 .\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
-.\"      Date: 06/02/2017
+.\"      Date: 06/15/2018
 .\"    Manual: MySQL Database System
 .\"    Source: MySQL 5.6
 .\"  Language: English
 .\"
-.TH "\FBMYSQL_FIX_EXTENSI" "1" "06/02/2017" "MySQL 5\&.6" "MySQL Database System"
+.TH "\FBMYSQL_FIX_EXTENSIONS\FR" "1" "06/15/2018" "MySQL 5\&.6" "MySQL Database System"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -85,7 +85,7 @@ shell> \fBmysql_fix_extensions \fR\fB\fIdata_dir\fR\fR
 .SH "COPYRIGHT"
 .br
 .PP
-Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved.
+Copyright \(co 1997, 2018, Oracle and/or its affiliates. All rights reserved.
 .PP
 This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
 .PP
index 5385d00c6b426d7a0add4efafe3fd81cf3ed4edb..70242da8d2e30c4048152d16b8b97b5c5b136584 100644 (file)
@@ -2,12 +2,12 @@
 .\"     Title: \fBmysql_install_db\fR
 .\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
 .\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
-.\"      Date: 06/02/2017
+.\"      Date: 06/15/2018
 .\"    Manual: MySQL Database System
 .\"    Source: MySQL 5.6
 .\"  Language: English
 .\"
-.TH "\FBMYSQL_INSTALL_DB\" "1" "06/02/2017" "MySQL 5\&.6" "MySQL Database System"
+.TH "\FBMYSQL_INSTALL_DB\FR" "1" "06/15/2018" "MySQL 5\&.6" "MySQL Database System"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -63,7 +63,7 @@ With one exception, the settings in the default option file are commented and ha
 sql_mode
 system variable to
 NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES\&. This setting produces a server configuration that results in errors rather than warnings for bad data in operations that modify transactional tables\&. See
-Section\ \&5.1.8, \(lqServer SQL Modes\(rq\&.
+Section\ \&5.1.10, \(lqServer SQL Modes\(rq\&.
 .PP
 To invoke
 \fBmysql_install_db\fR, use the following syntax:
@@ -549,7 +549,7 @@ For internal use\&. This option is used for creating Windows distributions\&.
 .SH "COPYRIGHT"
 .br
 .PP
-Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved.
+Copyright \(co 1997, 2018, Oracle and/or its affiliates. All rights reserved.
 .PP
 This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
 .PP
index 33b7d22c507267176ad677ae140f2b79fa5cdbe4..773f9a4ecf92042ce9d1b0c61f719d5f36e96b64 100644 (file)
@@ -2,12 +2,12 @@
 .\"     Title: \fBmysql_plugin\fR
 .\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
 .\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
-.\"      Date: 06/02/2017
+.\"      Date: 06/15/2018
 .\"    Manual: MySQL Database System
 .\"    Source: MySQL 5.6
 .\"  Language: English
 .\"
-.TH "\FBMYSQL_PLUGIN\FR" "1" "06/02/2017" "MySQL 5\&.6" "MySQL Database System"
+.TH "\FBMYSQL_PLUGIN\FR" "1" "06/15/2018" "MySQL 5\&.6" "MySQL Database System"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -57,7 +57,7 @@ mysql\&.plugin
 automatically\&. For additional control over plugin activation, use
 \fB\-\-\fR\fB\fIplugin_name\fR\fR
 options named for specific plugins, as described in
-Section\ \&5.5.2, \(lqInstalling and Uninstalling Plugins\(rq\&.
+Section\ \&5.5.1, \(lqInstalling and Uninstalling Plugins\(rq\&.
 .PP
 Each invocation of
 \fBmysql_plugin\fR
@@ -79,7 +79,7 @@ is the name of the plugin to configure\&.
 ENABLE
 or
 DISABLE
-(not case sensitive) specify whether to enable or disable components of the plugin library named in the configuration file\&. The order of the
+(not case\-sensitive) specify whether to enable or disable components of the plugin library named in the configuration file\&. The order of the
 \fIplugin\fR
 and
 ENABLE
@@ -347,7 +347,7 @@ Display version information and exit\&.
 .SH "COPYRIGHT"
 .br
 .PP
-Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved.
+Copyright \(co 1997, 2018, Oracle and/or its affiliates. All rights reserved.
 .PP
 This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
 .PP
index bf6309547762432044e565c42c3e955dc9d02006..ba3229e9df66541b15a6a31e2401f0813df40af0 100644 (file)
@@ -2,12 +2,12 @@
 .\"     Title: \fBmysql_secure_installation\fR
 .\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
 .\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
-.\"      Date: 06/02/2017
+.\"      Date: 06/15/2018
 .\"    Manual: MySQL Database System
 .\"    Source: MySQL 5.6
 .\"  Language: English
 .\"
-.TH "\FBMYSQL_SECURE_INST" "1" "06/02/2017" "MySQL 5\&.6" "MySQL Database System"
+.TH "\FBMYSQL_SECURE_INSTALLATION\FR" "1" "06/15/2018" "MySQL 5\&.6" "MySQL Database System"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -109,7 +109,7 @@ When executed, the script prompts you to determine which actions to perform\&.
 .SH "COPYRIGHT"
 .br
 .PP
-Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved.
+Copyright \(co 1997, 2018, Oracle and/or its affiliates. All rights reserved.
 .PP
 This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
 .PP
index 50ce03a97dce7294ddd8d636209a613ac503a60f..b994772a49e90dd7a04d432117e96e7e199d9986 100644 (file)
@@ -2,12 +2,12 @@
 .\"     Title: \fBmysql_setpermission\fR
 .\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
 .\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
-.\"      Date: 06/02/2017
+.\"      Date: 06/15/2018
 .\"    Manual: MySQL Database System
 .\"    Source: MySQL 5.6
 .\"  Language: English
 .\"
-.TH "\FBMYSQL_SETPERMISSI" "1" "06/02/2017" "MySQL 5\&.6" "MySQL Database System"
+.TH "\FBMYSQL_SETPERMISSION\FR" "1" "06/15/2018" "MySQL 5\&.6" "MySQL Database System"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -175,7 +175,7 @@ The MySQL user name to use when connecting to the server\&.
 .SH "COPYRIGHT"
 .br
 .PP
-Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved.
+Copyright \(co 1997, 2018, Oracle and/or its affiliates. All rights reserved.
 .PP
 This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
 .PP
index fd32cf5c1111d2c0cbbfae8cf9722b271d3d6532..f120c2dec5f4b23231592de9276bfca12df2131d 100644 (file)
@@ -2,12 +2,12 @@
 .\"     Title: \fBmysql_tzinfo_to_sql\fR
 .\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
 .\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
-.\"      Date: 06/02/2017
+.\"      Date: 06/15/2018
 .\"    Manual: MySQL Database System
 .\"    Source: MySQL 5.6
 .\"  Language: English
 .\"
-.TH "\FBMYSQL_TZINFO_TO_S" "1" "06/02/2017" "MySQL 5\&.6" "MySQL Database System"
+.TH "\FBMYSQL_TZINFO_TO_SQL\FR" "1" "06/15/2018" "MySQL 5\&.6" "MySQL Database System"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -44,7 +44,7 @@ database (the set of files describing time zones)\&. Examples of such systems ar
 /usr/share/zoneinfo
 directory (/usr/share/lib/zoneinfo
 on Solaris)\&. If your system does not have a zoneinfo database, you can use the downloadable package described in
-Section\ \&10.6, \(lqMySQL Server Time Zone Support\(rq\&.
+Section\ \&5.1.12, \(lqMySQL Server Time Zone Support\(rq\&.
 .PP
 \fBmysql_tzinfo_to_sql\fR
 can be invoked several ways:
@@ -120,7 +120,7 @@ After running
 .SH "COPYRIGHT"
 .br
 .PP
-Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved.
+Copyright \(co 1997, 2018, Oracle and/or its affiliates. All rights reserved.
 .PP
 This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
 .PP
index 8f0a96e3c7f97ccd2fa8886370276ef796251776..b2a5d2a337ecdbdf13738c71eea0bc3903b3708d 100644 (file)
@@ -2,12 +2,12 @@
 .\"     Title: \fBmysql_upgrade\fR
 .\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
 .\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
-.\"      Date: 06/02/2017
+.\"      Date: 06/15/2018
 .\"    Manual: MySQL Database System
 .\"    Source: MySQL 5.6
 .\"  Language: English
 .\"
-.TH "\FBMYSQL_UPGRADE\FR" "1" "06/02/2017" "MySQL 5\&.6" "MySQL Database System"
+.TH "\FBMYSQL_UPGRADE\FR" "1" "06/15/2018" "MySQL 5\&.6" "MySQL Database System"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -241,7 +241,7 @@ option\&.
 .PP
 \fBmysql_upgrade\fR
 does not upgrade the contents of the help tables\&. For upgrade instructions, see
-Section\ \&5.1.10, \(lqServer-Side Help\(rq\&.
+Section\ \&5.1.13, \(lqServer-Side Help\(rq\&.
 .PP
 By default,
 \fBmysql_upgrade\fR
@@ -318,7 +318,7 @@ The path to the MySQL installation directory\&. This option is accepted for back
 \fB\-\-character\-sets\-dir=\fR\fB\fIdir_name\fR\fR
 .sp
 The directory where character sets are installed\&. See
-Section\ \&10.5, \(lqCharacter Set Configuration\(rq\&.
+Section\ \&10.14, \(lqCharacter Set Configuration\(rq\&.
 .RE
 .sp
 .RS 4
@@ -421,7 +421,7 @@ This option was added in MySQL 5\&.6\&.2\&.
 Use
 \fIcharset_name\fR
 as the default character set\&. See
-Section\ \&10.5, \(lqCharacter Set Configuration\(rq\&.
+Section\ \&10.14, \(lqCharacter Set Configuration\(rq\&.
 .RE
 .sp
 .RS 4
@@ -671,7 +671,7 @@ Section\ \&4.2.2, \(lqConnecting to the MySQL Server\(rq\&.
 \fB\-\-shared\-memory\-base\-name=\fR\fB\fIname\fR\fR
 .sp
 On Windows, the shared\-memory name to use, for connections made using shared memory to a local server\&. The default value is
-MYSQL\&. The shared\-memory name is case sensitive\&.
+MYSQL\&. The shared\-memory name is case\-sensitive\&.
 .sp
 The server must be started with the
 \fB\-\-shared\-memory\fR
@@ -706,7 +706,7 @@ localhost, the Unix socket file to use, or, on Windows, the name of the named pi
 Options that begin with
 \fB\-\-ssl\fR
 specify whether to connect to the server using SSL and indicate where to find SSL keys and certificates\&. See
-Section\ \&6.4.5, \(lqCommand Options for Secure Connections\(rq\&.
+Section\ \&6.4.2, \(lqCommand Options for Encrypted Connections\(rq\&.
 .RE
 .sp
 .RS 4
@@ -807,19 +807,13 @@ if you want its actions to be written to the binary log\&. (Also beginning with
 \fB\-\-skip\-write\-binlog\fR
 option effectively does nothing\&.)
 .sp
-Running
-\fBmysql_upgrade\fR
-is not recommended with a MySQL Server that is running with global transaction identifiers enabled (Bug #13833710)\&. This is because enabling GTIDs means that any updates which
-\fBmysql_upgrade\fR
-might need to perform on system tables using a nontransactional storage engine such as
-MyISAM
-to fail\&. See
-Section\ \&17.1.3.4, \(lqRestrictions on Replication with GTIDs\(rq, for more information\&.
+When the server is running with global transaction identifiers (GTIDs) enabled (gtid_mode=ON), do not enable binary logging by
+\fBmysql_upgrade\fR\&.
 .RE
 .SH "COPYRIGHT"
 .br
 .PP
-Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved.
+Copyright \(co 1997, 2018, Oracle and/or its affiliates. All rights reserved.
 .PP
 This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
 .PP
index ac55609b1930962aa30e30d17a307007ff644ea5..784509feea91ac8de960ef7db9c5185ce9c804c9 100644 (file)
@@ -2,12 +2,12 @@
 .\"     Title: \fBmysql_waitpid\fR
 .\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
 .\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
-.\"      Date: 06/02/2017
+.\"      Date: 06/15/2018
 .\"    Manual: MySQL Database System
 .\"    Source: MySQL 5.6
 .\"  Language: English
 .\"
-.TH "\FBMYSQL_WAITPID\FR" "1" "06/02/2017" "MySQL 5\&.6" "MySQL Database System"
+.TH "\FBMYSQL_WAITPID\FR" "1" "06/15/2018" "MySQL 5\&.6" "MySQL Database System"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -124,7 +124,7 @@ Display version information and exit\&.
 .SH "COPYRIGHT"
 .br
 .PP
-Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved.
+Copyright \(co 1997, 2018, Oracle and/or its affiliates. All rights reserved.
 .PP
 This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
 .PP
index 8433f441019058e61d84e0b4f72ed2a9b5919ca3..74e82441b45586045995caed10ab2bbd478d61c8 100644 (file)
@@ -2,12 +2,12 @@
 .\"     Title: \fBmysql_zap\fR
 .\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
 .\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
-.\"      Date: 06/02/2017
+.\"      Date: 06/15/2018
 .\"    Manual: MySQL Database System
 .\"    Source: MySQL 5.6
 .\"  Language: English
 .\"
-.TH "\FBMYSQL_ZAP\FR" "1" "06/02/2017" "MySQL 5\&.6" "MySQL Database System"
+.TH "\FBMYSQL_ZAP\FR" "1" "06/15/2018" "MySQL 5\&.6" "MySQL Database System"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -126,7 +126,7 @@ Test mode\&. Display information about each process but do not kill it\&.
 .SH "COPYRIGHT"
 .br
 .PP
-Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved.
+Copyright \(co 1997, 2018, Oracle and/or its affiliates. All rights reserved.
 .PP
 This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
 .PP
index d2df37febf7cc0128eeb0bcb6e533d3f088591d1..99b07210d072658aceeaafdd96222ebfd26e664b 100644 (file)
@@ -2,12 +2,12 @@
 .\"     Title: \fBmysqlaccess\fR
 .\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
 .\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
-.\"      Date: 06/02/2017
+.\"      Date: 06/15/2018
 .\"    Manual: MySQL Database System
 .\"    Source: MySQL 5.6
 .\"  Language: English
 .\"
-.TH "\FBMYSQLACCESS\FR" "1" "06/02/2017" "MySQL 5\&.6" "MySQL Database System"
+.TH "\FBMYSQLACCESS\FR" "1" "06/15/2018" "MySQL 5\&.6" "MySQL Database System"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -444,7 +444,7 @@ error will occur when you run
 .SH "COPYRIGHT"
 .br
 .PP
-Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved.
+Copyright \(co 1997, 2018, Oracle and/or its affiliates. All rights reserved.
 .PP
 This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
 .PP
index b384b339cd97713c5c5b4cc5e50a544916522fe8..dae115e625a081f55869147e8f8242bd99ebf235 100644 (file)
@@ -2,12 +2,12 @@
 .\"     Title: \fBmysqladmin\fR
 .\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
 .\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
-.\"      Date: 06/02/2017
+.\"      Date: 06/15/2018
 .\"    Manual: MySQL Database System
 .\"    Source: MySQL 5.6
 .\"  Language: English
 .\"
-.TH "\FBMYSQLADMIN\FR" "1" "06/02/2017" "MySQL 5\&.6" "MySQL Database System"
+.TH "\FBMYSQLADMIN\FR" "1" "06/15/2018" "MySQL 5\&.6" "MySQL Database System"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -78,7 +78,9 @@ Create a new database named
 .\}
 debug
 .sp
-Tell the server to write debug information to the error log\&. Format and content of this information is subject to change\&.
+Tell the server to write debug information to the error log\&. The connected user must have the
+SUPER
+privilege\&. Format and content of this information is subject to change\&.
 .sp
 This includes information about the Event Scheduler\&. See
 Section\ \&20.4.5, \(lqEvent Scheduler Status\(rq\&.
@@ -202,6 +204,10 @@ Flush the thread cache\&.
 kill \fIid\fR,\fIid\fR,\&.\&.\&.
 .sp
 Kill server threads\&. If multiple thread ID values are given, there must be no spaces in the list\&.
+.sp
+To kill threads belonging to other users, the connected user must have the
+SUPER
+privilege\&.
 .RE
 .sp
 .RS 4
@@ -237,7 +243,27 @@ for the account that you use with
 for connecting to the server\&. Thus, the next time you invoke
 \fBmysqladmin\fR
 (or any other client program) using the same account, you will need to specify the new password\&.
+.if n \{\
 .sp
+.\}
+.RS 4
+.it 1 an-trap
+.nr an-no-space-flag 1
+.nr an-break-flag 1
+.br
+.ps +1
+\fBWarning\fR
+.ps -1
+.br
+Setting a password using
+\fBmysqladmin\fR
+should be considered
+\fIinsecure\fR\&. On some systems, your password becomes visible to system status programs such as
+\fBps\fR
+that may be invoked by other users to display command lines\&. MySQL clients typically overwrite the command\-line password argument with zeros during their initialization sequence\&. However, there is still a brief interval during which the value is visible\&. Also, on some systems this overwriting strategy is ineffective and the password remains visible to
+\fBps\fR\&. (SystemV Unix systems and perhaps others are subject to this problem\&.)
+.sp .5v
+.RE
 If the
 \fInew_password\fR
 value contains spaces or other characters that are special to your command interpreter, you need to enclose it within quotation marks\&. On Windows, be sure to use double quotation marks rather than single quotation marks; single quotation marks are not stripped from the password, but rather are interpreted as part of the password\&. For example:
@@ -603,7 +629,7 @@ This option is supported beginning with MySQL 5\&.6\&.1\&.
 \fB\-\-character\-sets\-dir=\fR\fB\fIdir_name\fR\fR
 .sp
 The directory where character sets are installed\&. See
-Section\ \&10.5, \(lqCharacter Set Configuration\(rq\&.
+Section\ \&10.14, \(lqCharacter Set Configuration\(rq\&.
 .RE
 .sp
 .RS 4
@@ -707,7 +733,7 @@ Section\ \&6.3.7, \(lqPluggable Authentication\(rq\&.
 Use
 \fIcharset_name\fR
 as the default character set\&. See
-Section\ \&10.5, \(lqCharacter Set Configuration\(rq\&.
+Section\ \&10.14, \(lqCharacter Set Configuration\(rq\&.
 .RE
 .sp
 .RS 4
@@ -1052,7 +1078,7 @@ This option is deprecated and will be removed in a future release\&. As of MySQL
 \fB\-\-shared\-memory\-base\-name=\fR\fB\fIname\fR\fR
 .sp
 On Windows, the shared\-memory name to use, for connections made using shared memory to a local server\&. The default value is
-MYSQL\&. The shared\-memory name is case sensitive\&.
+MYSQL\&. The shared\-memory name is case\-sensitive\&.
 .sp
 The server must be started with the
 \fB\-\-shared\-memory\fR
@@ -1123,7 +1149,7 @@ localhost, the Unix socket file to use, or, on Windows, the name of the named pi
 Options that begin with
 \fB\-\-ssl\fR
 specify whether to connect to the server using SSL and indicate where to find SSL keys and certificates\&. See
-Section\ \&6.4.5, \(lqCommand Options for Secure Connections\(rq\&.
+Section\ \&6.4.2, \(lqCommand Options for Encrypted Connections\(rq\&.
 .RE
 .sp
 .RS 4
@@ -1230,7 +1256,7 @@ The maximum number of seconds to wait for server shutdown\&. The default value i
 .SH "COPYRIGHT"
 .br
 .PP
-Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved.
+Copyright \(co 1997, 2018, Oracle and/or its affiliates. All rights reserved.
 .PP
 This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
 .PP
index 24ff71341eb3b20a9f2bb6caaee9c4d1553fc420..c5f0a13c846cdb4922f0be5fdf0aac637ae7cd35 100644 (file)
@@ -2,12 +2,12 @@
 .\"     Title: \fBmysqlbinlog\fR
 .\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
 .\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
-.\"      Date: 06/02/2017
+.\"      Date: 06/15/2018
 .\"    Manual: MySQL Database System
 .\"    Source: MySQL 5.6
 .\"  Language: English
 .\"
-.TH "\FBMYSQLBINLOG\FR" "1" "06/02/2017" "MySQL 5\&.6" "MySQL Database System"
+.TH "\FBMYSQLBINLOG\FR" "1" "06/15/2018" "MySQL 5\&.6" "MySQL Database System"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -185,7 +185,7 @@ Display a help message and exit\&.
 .sp
 This option determines when events should be displayed encoded as base\-64 strings using
 BINLOG
-statements\&. The option has these permissible values (not case sensitive):
+statements\&. The option has these permissible values (not case\-sensitive):
 .sp
 .RS 4
 .ie n \{\
@@ -298,35 +298,40 @@ This option is supported beginning with MySQL 5\&.6\&.1\&.
 \fB\-\-binlog\-row\-event\-max\-size=\fR\fB\fIN\fR\fR
 .TS
 allbox tab(:);
-l l s s
-l l l s
-^ l l s
-^ l l s
-^ l l s.
+lB lB.
 T{
-\fBCommand\-Line Format\fR
+Property
 T}:T{
-\-\-binlog\-row\-event\-max\-size=#
+Value
 T}
+.T&
+l l
+l l
+l l
+l l
+l l.
 T{
-\fBPermitted Values\fR (64\-bit platforms)
+\fBCommand-Line Format\fR
 T}:T{
-\fBType\fR
+--binlog-row-event-max-size=#
+T}
+T{
+\fBType\fR (64-bit platforms)
 T}:T{
 numeric
 T}
-:T{
-\fBDefault\fR
+T{
+\fBDefault Value\fR (64-bit platforms)
 T}:T{
 4294967040
 T}
-:T{
-\fBMin Value\fR
+T{
+\fBMinimum Value\fR (64-bit platforms)
 T}:T{
 256
 T}
-:T{
-\fBMax Value\fR
+T{
+\fBMaximum Value\fR (64-bit platforms)
 T}:T{
 18446744073709547520
 T}
@@ -346,7 +351,7 @@ Specify the maximum size of a row\-based binary log event, in bytes\&. Rows are
 \fB\-\-character\-sets\-dir=\fR\fB\fIdir_name\fR\fR
 .sp
 The directory where character sets are installed\&. See
-Section\ \&10.5, \(lqCharacter Set Configuration\(rq\&.
+Section\ \&10.14, \(lqCharacter Set Configuration\(rq\&.
 .RE
 .sp
 .RS 4
@@ -1167,7 +1172,7 @@ statement to the output to specify the character set to be used for processing l
 \fB\-\-shared\-memory\-base\-name=\fR\fB\fIname\fR\fR
 .sp
 On Windows, the shared\-memory name to use, for connections made using shared memory to a local server\&. The default value is
-MYSQL\&. The shared\-memory name is case sensitive\&.
+MYSQL\&. The shared\-memory name is case\-sensitive\&.
 .sp
 The server must be started with the
 \fB\-\-shared\-memory\fR
@@ -1245,7 +1250,7 @@ localhost, the Unix socket file to use, or, on Windows, the name of the named pi
 Options that begin with
 \fB\-\-ssl\fR
 specify whether to connect to the server using SSL and indicate where to find SSL keys and certificates\&. See
-Section\ \&6.4.5, \(lqCommand Options for Secure Connections\(rq\&.
+Section\ \&6.4.2, \(lqCommand Options for Encrypted Connections\(rq\&.
 .RE
 .sp
 .RS 4
@@ -1783,36 +1788,36 @@ T{
 T}:T{
 UNKNOWN_EVENT
 T}:T{
-This event should never be present in the log\&.
+This event should never be present in the log.
 T}
 T{
 01
 T}:T{
 START_EVENT_V3
 T}:T{
-This indicates the start of a log file written by MySQL 4 or earlier\&.
+This indicates the start of a log file written by MySQL 4 or earlier.
 T}
 T{
 02
 T}:T{
 QUERY_EVENT
 T}:T{
-The most common type of events\&. These contain statements executed on the
-                    master\&.
+The most common type of events. These contain statements executed on the
+                  master.
 T}
 T{
 03
 T}:T{
 STOP_EVENT
 T}:T{
-Indicates that master has stopped\&.
+Indicates that master has stopped.
 T}
 T{
 04
 T}:T{
 ROTATE_EVENT
 T}:T{
-Written when the master switches to a new log file\&.
+Written when the master switches to a new log file.
 T}
 T{
 05
@@ -1820,8 +1825,8 @@ T}:T{
 INTVAR_EVENT
 T}:T{
 Used for AUTO_INCREMENT values or when the
-                    LAST_INSERT_ID()
-                    function is used in the statement\&.
+                  LAST_INSERT_ID()
+                  function is used in the statement.
 T}
 T{
 06
@@ -1829,14 +1834,14 @@ T}:T{
 LOAD_EVENT
 T}:T{
 Used for LOAD DATA
-                    INFILE in MySQL 3\&.23\&.
+                  INFILE in MySQL 3.23.
 T}
 T{
 07
 T}:T{
 SLAVE_EVENT
 T}:T{
-Reserved for future use\&.
+Reserved for future use.
 T}
 T{
 08
@@ -1844,9 +1849,9 @@ T}:T{
 CREATE_FILE_EVENT
 T}:T{
 Used for LOAD DATA
-                    INFILE statements\&. This indicates the
-                    start of execution of such a statement\&. A temporary
-                    file is created on the slave\&. Used in MySQL 4 only\&.
+                  INFILE statements. This indicates the start
+                  of execution of such a statement. A temporary file is
+                  created on the slave. Used in MySQL 4 only.
 T}
 T{
 09
@@ -1854,9 +1859,9 @@ T}:T{
 APPEND_BLOCK_EVENT
 T}:T{
 Contains data for use in a
-                    LOAD DATA
-                    INFILE statement\&. The data is stored in
-                    the temporary file on the slave\&.
+                  LOAD DATA
+                  INFILE statement. The data is stored in the
+                  temporary file on the slave.
 T}
 T{
 0a
@@ -1864,9 +1869,9 @@ T}:T{
 EXEC_LOAD_EVENT
 T}:T{
 Used for LOAD DATA
-                    INFILE statements\&. The contents of the
-                    temporary file is stored in the table on the slave\&.
-                    Used in MySQL 4 only\&.
+                  INFILE statements. The contents of the
+                  temporary file is stored in the table on the slave.
+                  Used in MySQL 4 only.
 T}
 T{
 0b
@@ -1874,8 +1879,8 @@ T}:T{
 DELETE_FILE_EVENT
 T}:T{
 Rollback of a LOAD DATA
-                    INFILE statement\&. The temporary file
-                    should be deleted on the slave\&.
+                  INFILE statement. The temporary file should
+                  be deleted on the slave.
 T}
 T{
 0c
@@ -1883,7 +1888,7 @@ T}:T{
 NEW_LOAD_EVENT
 T}:T{
 Used for LOAD DATA
-                    INFILE in MySQL 4 and earlier\&.
+                  INFILE in MySQL 4 and earlier.
 T}
 T{
 0d
@@ -1891,29 +1896,29 @@ T}:T{
 RAND_EVENT
 T}:T{
 Used to send information about random values if the
-                    RAND() function is
-                    used in the statement\&.
+                  RAND() function is used
+                  in the statement.
 T}
 T{
 0e
 T}:T{
 USER_VAR_EVENT
 T}:T{
-Used to replicate user variables\&.
+Used to replicate user variables.
 T}
 T{
 0f
 T}:T{
 FORMAT_DESCRIPTION_EVENT
 T}:T{
-This indicates the start of a log file written by MySQL 5 or later\&.
+This indicates the start of a log file written by MySQL 5 or later.
 T}
 T{
 10
 T}:T{
 XID_EVENT
 T}:T{
-Event indicating commit of an XA transaction\&.
+Event indicating commit of an XA transaction.
 T}
 T{
 11
@@ -1921,7 +1926,7 @@ T}:T{
 BEGIN_LOAD_QUERY_EVENT
 T}:T{
 Used for LOAD DATA
-                    INFILE statements in MySQL 5 and later\&.
+                  INFILE statements in MySQL 5 and later.
 T}
 T{
 12
@@ -1929,69 +1934,69 @@ T}:T{
 EXECUTE_LOAD_QUERY_EVENT
 T}:T{
 Used for LOAD DATA
-                    INFILE statements in MySQL 5 and later\&.
+                  INFILE statements in MySQL 5 and later.
 T}
 T{
 13
 T}:T{
 TABLE_MAP_EVENT
 T}:T{
-Information about a table definition\&. Used in MySQL 5\&.1\&.5 and later\&.
+Information about a table definition. Used in MySQL 5.1.5 and later.
 T}
 T{
 14
 T}:T{
 PRE_GA_WRITE_ROWS_EVENT
 T}:T{
-Row data for a single table that should be created\&. Used in MySQL 5\&.1\&.5
-                    to 5\&.1\&.17\&.
+Row data for a single table that should be created. Used in MySQL 5.1.5
+                  to 5.1.17.
 T}
 T{
 15
 T}:T{
 PRE_GA_UPDATE_ROWS_EVENT
 T}:T{
-Row data for a single table that needs to be updated\&. Used in MySQL
-                    5\&.1\&.5 to 5\&.1\&.17\&.
+Row data for a single table that needs to be updated. Used in MySQL
+                  5.1.5 to 5.1.17.
 T}
 T{
 16
 T}:T{
 PRE_GA_DELETE_ROWS_EVENT
 T}:T{
-Row data for a single table that should be deleted\&. Used in MySQL 5\&.1\&.5
-                    to 5\&.1\&.17\&.
+Row data for a single table that should be deleted. Used in MySQL 5.1.5
+                  to 5.1.17.
 T}
 T{
 17
 T}:T{
 WRITE_ROWS_EVENT
 T}:T{
-Row data for a single table that should be created\&. Used in MySQL 5\&.1\&.18
-                    and later\&.
+Row data for a single table that should be created. Used in MySQL 5.1.18
+                  and later.
 T}
 T{
 18
 T}:T{
 UPDATE_ROWS_EVENT
 T}:T{
-Row data for a single table that needs to be updated\&. Used in MySQL
-                    5\&.1\&.18 and later\&.
+Row data for a single table that needs to be updated. Used in MySQL
+                  5.1.18 and later.
 T}
 T{
 19
 T}:T{
 DELETE_ROWS_EVENT
 T}:T{
-Row data for a single table that should be deleted\&. Used in MySQL 5\&.1\&.18
-                    and later\&.
+Row data for a single table that should be deleted. Used in MySQL 5.1.18
+                  and later.
 T}
 T{
 1a
 T}:T{
 INCIDENT_EVENT
 T}:T{
-Something out of the ordinary happened\&. Added in MySQL 5\&.1\&.18\&.
+Something out of the ordinary happened. Added in MySQL 5.1.18.
 T}
 .TE
 .sp 1
@@ -2059,21 +2064,20 @@ T{
 T}:T{
 LOG_EVENT_BINLOG_IN_USE_F
 T}:T{
-Log file correctly closed\&. (Used only in
-                    FORMAT_DESCRIPTION_EVENT\&.) If
-                    this flag is set (if the flags are, for example,
-                    \*(Aq01 00\*(Aq) in a
-                    FORMAT_DESCRIPTION_EVENT, the log
-                    file has not been properly closed\&. Most probably
-                    this is because of a master crash (for example, due
-                    to power failure)\&.
+Log file correctly closed. (Used only in
+                  FORMAT_DESCRIPTION_EVENT.) If this
+                  flag is set (if the flags are, for example,
+                  '01 00') in a
+                  FORMAT_DESCRIPTION_EVENT, the log
+                  file has not been properly closed. Most probably this
+                  is because of a master crash (for example, due to
+                  power failure).
 T}
 T{
 02
 T}:T{
-\ \&
 T}:T{
-Reserved for future use\&.
+Reserved for future use.
 T}
 T{
 04
@@ -2081,8 +2085,8 @@ T}:T{
 LOG_EVENT_THREAD_SPECIFIC_F
 T}:T{
 Set if the event is dependent on the connection it was executed in (for
-                    example, \*(Aq04 00\*(Aq), for example,
-                    if the event uses temporary tables\&.
+                  example, '04 00'), for example, if
+                  the event uses temporary tables.
 T}
 T{
 08
@@ -2090,7 +2094,7 @@ T}:T{
 LOG_EVENT_SUPPRESS_USE_F
 T}:T{
 Set in some circumstances when the event is not dependent on the default
-                    database\&.
+                  database.
 T}
 .TE
 .sp 1
@@ -2704,7 +2708,7 @@ value consists only of a directory name, the value must end with the pathname se
 allbox tab(:);
 lB lB.
 T{
-\fB\-\-result\-file\fR Option
+\fB--result-file\fR Option
 T}:T{
 Output File Names
 T}
@@ -2713,19 +2717,19 @@ l l
 l l
 l l.
 T{
-\fB\-\-result\-file=x\fR
+\fB--result-file=x\fR
 T}:T{
-xbinlog\&.000999 and up
+xbinlog.000999 and up
 T}
 T{
-\fB\-\-result\-file=/tmp/\fR
+\fB--result-file=/tmp/\fR
 T}:T{
-/tmp/binlog\&.000999 and up
+/tmp/binlog.000999 and up
 T}
 T{
-\fB\-\-result\-file=/tmp/x\fR
+\fB--result-file=/tmp/x\fR
 T}:T{
-/tmp/xbinlog\&.000999 and up
+/tmp/xbinlog.000999 and up
 T}
 .TE
 .sp 1
@@ -2902,7 +2906,7 @@ specifies a nonzero server ID\&.
 .SH "COPYRIGHT"
 .br
 .PP
-Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved.
+Copyright \(co 1997, 2018, Oracle and/or its affiliates. All rights reserved.
 .PP
 This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
 .PP
index b62abf10f3736c438fbf3c3ecf354f5a3fdd8ef5..6ba8824eb660a9d0791beeebcde8a7658e3518d4 100644 (file)
@@ -2,12 +2,12 @@
 .\"     Title: \fBmysqlbug\fR
 .\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
 .\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
-.\"      Date: 06/02/2017
+.\"      Date: 06/15/2018
 .\"    Manual: MySQL Database System
 .\"    Source: MySQL 5.6
 .\"  Language: English
 .\"
-.TH "\FBMYSQLBUG\FR" "1" "06/02/2017" "MySQL 5\&.6" "MySQL Database System"
+.TH "\FBMYSQLBUG\FR" "1" "06/15/2018" "MySQL 5\&.6" "MySQL Database System"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -41,7 +41,7 @@ The normal way to report bugs is to visit
 .SH "COPYRIGHT"
 .br
 .PP
-Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved.
+Copyright \(co 1997, 2018, Oracle and/or its affiliates. All rights reserved.
 .PP
 This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
 .PP
index 0b1332ea5bae2b389b4a4ab53770cdd22d13ac2b..cf64f2c062b00db576943eda9520a969231186a7 100644 (file)
@@ -2,12 +2,12 @@
 .\"     Title: \fBmysqlcheck\fR
 .\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
 .\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
-.\"      Date: 06/02/2017
+.\"      Date: 06/15/2018
 .\"    Manual: MySQL Database System
 .\"    Source: MySQL 5.6
 .\"  Language: English
 .\"
-.TH "\FBMYSQLCHECK\FR" "1" "06/02/2017" "MySQL 5\&.6" "MySQL Database System"
+.TH "\FBMYSQLCHECK\FR" "1" "06/15/2018" "MySQL 5\&.6" "MySQL Database System"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -179,17 +179,17 @@ l l.
 T{
 \fBmysqlrepair\fR
 T}:T{
-The default option is \fB\-\-repair\fR
+The default option is \fB--repair\fR
 T}
 T{
 \fBmysqlanalyze\fR
 T}:T{
-The default option is \fB\-\-analyze\fR
+The default option is \fB--analyze\fR
 T}
 T{
 \fBmysqloptimize\fR
 T}:T{
-The default option is \fB\-\-optimize\fR
+The default option is \fB--optimize\fR
 T}
 .TE
 .sp 1
@@ -305,7 +305,7 @@ This option is supported beginning with MySQL 5\&.6\&.1\&.
 \fB\-\-character\-sets\-dir=\fR\fB\fIdir_name\fR\fR
 .sp
 The directory where character sets are installed\&. See
-Section\ \&10.5, \(lqCharacter Set Configuration\(rq\&.
+Section\ \&10.14, \(lqCharacter Set Configuration\(rq\&.
 .RE
 .sp
 .RS 4
@@ -444,7 +444,7 @@ Print debugging information and memory and CPU usage statistics when the program
 Use
 \fIcharset_name\fR
 as the default character set\&. See
-Section\ \&10.5, \(lqCharacter Set Configuration\(rq\&.
+Section\ \&10.14, \(lqCharacter Set Configuration\(rq\&.
 .RE
 .sp
 .RS 4
@@ -891,7 +891,7 @@ This option is deprecated and will be removed in a future release\&. As of MySQL
 \fB\-\-shared\-memory\-base\-name=\fR\fB\fIname\fR\fR
 .sp
 On Windows, the shared\-memory name to use, for connections made using shared memory to a local server\&. The default value is
-MYSQL\&. The shared\-memory name is case sensitive\&.
+MYSQL\&. The shared\-memory name is case\-sensitive\&.
 .sp
 The server must be started with the
 \fB\-\-shared\-memory\fR
@@ -922,7 +922,7 @@ Silent mode\&. Print only error messages\&.
 .\}
 \fB\-\-skip\-database=\fR\fB\fIdb_name\fR\fR
 .sp
-Do not include the named database (case sensitive) in the operations performed by
+Do not include the named database (case\-sensitive) in the operations performed by
 \fBmysqlcheck\fR\&. This option was added in MySQL 5\&.6\&.11\&.
 .RE
 .sp
@@ -954,7 +954,7 @@ localhost, the Unix socket file to use, or, on Windows, the name of the named pi
 Options that begin with
 \fB\-\-ssl\fR
 specify whether to connect to the server using SSL and indicate where to find SSL keys and certificates\&. See
-Section\ \&6.4.5, \(lqCommand Options for Secure Connections\(rq\&.
+Section\ \&6.4.2, \(lqCommand Options for Encrypted Connections\(rq\&.
 .RE
 .sp
 .RS 4
@@ -1062,7 +1062,7 @@ when these statements should not be sent to replication slaves or run when using
 .SH "COPYRIGHT"
 .br
 .PP
-Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved.
+Copyright \(co 1997, 2018, Oracle and/or its affiliates. All rights reserved.
 .PP
 This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
 .PP
index b491a96098626c9ef25c6e24691cf6a1df681e3e..389e26b0a38509dbd7fc1a573ed7b2354c858a4a 100644 (file)
@@ -2,12 +2,12 @@
 .\"     Title: \fBmysqld\fR
 .\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
 .\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
-.\"      Date: 06/02/2017
+.\"      Date: 06/15/2018
 .\"    Manual: MySQL Database System
 .\"    Source: MySQL 5.6
 .\"  Language: English
 .\"
-.TH "\FBMYSQLD\FR" "8" "06/02/2017" "MySQL 5\&.6" "MySQL Database System"
+.TH "\FBMYSQLD\FR" "8" "06/15/2018" "MySQL 5\&.6" "MySQL Database System"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -35,6 +35,26 @@ mysqld \- the MySQL server
 .SH "DESCRIPTION"
 .PP
 \fBmysqld\fR, also known as MySQL Server, is the main program that does most of the work in a MySQL installation\&. MySQL Server manages access to the MySQL data directory that contains databases and tables\&. The data directory is also the default location for other information such as log files and status files\&.
+.if n \{\
+.sp
+.\}
+.RS 4
+.it 1 an-trap
+.nr an-no-space-flag 1
+.nr an-break-flag 1
+.br
+.ps +1
+\fBNote\fR
+.ps -1
+.br
+.PP
+Some installation packages contain a debugging version of the server named
+\fBmysqld\-debug\fR\&. Invoke this version instead of
+\fBmysqld\fR
+for debugging support, memory allocation checking, and trace file support (see
+Section\ \&24.5.1.2, \(lqCreating Trace Files\(rq)\&.
+.sp .5v
+.RE
 .PP
 When MySQL server starts, it listens for network connections from client programs and manages access to databases on behalf of those clients\&.
 .PP
@@ -60,7 +80,7 @@ Chapter\ \&2, Installing and Upgrading MySQL\&.
 .SH "COPYRIGHT"
 .br
 .PP
-Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved.
+Copyright \(co 1997, 2018, Oracle and/or its affiliates. All rights reserved.
 .PP
 This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
 .PP
index f491a450a305ce881e1977bbdf55343816653507..30fc19325fee2e77d146213d6f5ec0206a7923eb 100644 (file)
@@ -2,12 +2,12 @@
 .\"     Title: \fBmysqld_multi\fR
 .\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
 .\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
-.\"      Date: 06/02/2017
+.\"      Date: 06/15/2018
 .\"    Manual: MySQL Database System
 .\"    Source: MySQL 5.6
 .\"  Language: English
 .\"
-.TH "\FBMYSQLD_MULTI\FR" "1" "06/02/2017" "MySQL 5\&.6" "MySQL Database System"
+.TH "\FBMYSQLD_MULTI\FR" "1" "06/15/2018" "MySQL 5\&.6" "MySQL Database System"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -542,31 +542,7 @@ monitors its
 \fBmysqld\fR
 process and restarts it if the process terminates due to a signal sent using
 kill \-9
-or for other reasons, such as a segmentation fault\&. The
-\fBmysqld_safe\fR
-script might require that you start it from a certain place\&. This means that you might have to change location to a certain directory before running
-\fBmysqld_multi\fR\&. If you have problems starting, please see the
-\fBmysqld_safe\fR
-script\&. Check especially the lines:
-.sp
-.if n \{\
-.RS 4
-.\}
-.nf
-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
-MY_PWD=`pwd`
-# Check if we are starting this relative (for the binary release)
-if test \-d $MY_PWD/data/mysql \-a \e
-   \-f \&./share/mysql/english/errmsg\&.sys \-a \e
-   \-x \&./bin/mysqld
-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
-.fi
-.if n \{\
-.RE
-.\}
-.sp
-The test performed by these lines should be successful, or you might encounter problems\&. See
-\fBmysqld_safe\fR(1)\&.
+or for other reasons, such as a segmentation fault\&.
 .RE
 .sp
 .RS 4
@@ -648,7 +624,7 @@ Section\ \&4.2.6, \(lqUsing Option Files\(rq\&.
 .SH "COPYRIGHT"
 .br
 .PP
-Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved.
+Copyright \(co 1997, 2018, Oracle and/or its affiliates. All rights reserved.
 .PP
 This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
 .PP
index 6fdf0d349e3843b0250ae59fa3fbaaf5df247e0b..455f6efc4841c4a246c2eb11a695ed857e58e49c 100644 (file)
@@ -2,12 +2,12 @@
 .\"     Title: \fBmysqld_safe\fR
 .\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
 .\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
-.\"      Date: 06/02/2017
+.\"      Date: 06/15/2018
 .\"    Manual: MySQL Database System
 .\"    Source: MySQL 5.6
 .\"  Language: English
 .\"
-.TH "\FBMYSQLD_SAFE\FR" "1" "06/02/2017" "MySQL 5\&.6" "MySQL Database System"
+.TH "\FBMYSQLD_SAFE\FR" "1" "06/15/2018" "MySQL 5\&.6" "MySQL Database System"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -39,7 +39,7 @@ is the recommended way to start a
 \fBmysqld\fR
 server on Unix\&.
 \fBmysqld_safe\fR
-adds some safety features such as restarting the server when an error occurs and logging runtime information to an error log file\&. A description of error logging is given later in this section\&.
+adds some safety features such as restarting the server when an error occurs and logging runtime information to an error log\&. A description of error logging is given later in this section\&.
 .PP
 \fBmysqld_safe\fR
 tries to start an executable named
@@ -58,7 +58,7 @@ Many of the options to
 \fBmysqld_safe\fR
 are the same as the options to
 \fBmysqld\fR\&. See
-Section\ \&5.1.4, \(lqServer Command Options\(rq\&.
+Section\ \&5.1.6, \(lqServer Command Options\(rq\&.
 .PP
 Options unknown to
 \fBmysqld_safe\fR
@@ -599,6 +599,13 @@ syslog
 is used, the
 daemon\&.err
 syslog facility/severity is used for all log messages\&.
+.sp
+\fBmysqld_safe\fR
+ignores
+\fB\-\-syslog\fR
+if
+\fB\-\-log\-error\fR
+is also given\&.
 .RE
 .sp
 .RS 4
@@ -847,7 +854,7 @@ stderr\&.
 .SH "COPYRIGHT"
 .br
 .PP
-Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved.
+Copyright \(co 1997, 2018, Oracle and/or its affiliates. All rights reserved.
 .PP
 This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
 .PP
index d4055a7c4435d4586d303eade6376e93f4af29be..890de050da6b6bf18da37dc3f2f817ed676dec2a 100644 (file)
@@ -2,12 +2,12 @@
 .\"     Title: \fBmysqldump\fR
 .\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
 .\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
-.\"      Date: 06/02/2017
+.\"      Date: 06/15/2018
 .\"    Manual: MySQL Database System
 .\"    Source: MySQL 5.6
 .\"  Language: English
 .\"
-.TH "\FBMYSQLDUMP\FR" "1" "06/02/2017" "MySQL 5\&.6" "MySQL Database System"
+.TH "\FBMYSQLDUMP\FR" "1" "06/15/2018" "MySQL 5\&.6" "MySQL Database System"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -277,7 +277,7 @@ shell> \fBmysqldump [options] > dump\&.sql\fR
 .\}
 .PP
 However, UTF\-16 is not permitted as a connection character set (see
-Section\ \&10.1.4, \(lqConnection Character Sets and Collations\(rq), so the dump file will not load correctly\&. To work around this issue, use the
+Section\ \&10.4, \(lqConnection Character Sets and Collations\(rq), so the dump file will not load correctly\&. To work around this issue, use the
 \fB\-\-result\-file\fR
 option, which creates the output in ASCII format:
 .sp
@@ -663,7 +663,7 @@ localhost, the Unix socket file to use, or, on Windows, the name of the named pi
 Options that begin with
 \fB\-\-ssl\fR
 specify whether to connect to the server using SSL and indicate where to find SSL keys and certificates\&. See
-Section\ \&6.4.5, \(lqCommand Options for Secure Connections\(rq\&.
+Section\ \&6.4.2, \(lqCommand Options for Encrypted Connections\(rq\&.
 .RE
 .sp
 .RS 4
@@ -1219,7 +1219,7 @@ command represents character data with national language settings\&.
 \fB\-\-character\-sets\-dir=\fR\fB\fIdir_name\fR\fR
 .sp
 The directory where character sets are installed\&. See
-Section\ \&10.5, \(lqCharacter Set Configuration\(rq\&.
+Section\ \&10.14, \(lqCharacter Set Configuration\(rq\&.
 .RE
 .sp
 .RS 4
@@ -1235,7 +1235,7 @@ Section\ \&10.5, \(lqCharacter Set Configuration\(rq\&.
 Use
 \fIcharset_name\fR
 as the default character set\&. See
-Section\ \&10.5, \(lqCharacter Set Configuration\(rq\&. If no character set is specified,
+Section\ \&10.14, \(lqCharacter Set Configuration\(rq\&. If no character set is specified,
 \fBmysqldump\fR
 uses
 utf8\&.
@@ -1453,19 +1453,19 @@ l l.
 T{
 OFF
 T}:T{
-Add no SET statement to the output\&.
+Add no SET statement to the output.
 T}
 T{
 ON
 T}:T{
-Add a SET statement to the output\&. An error occurs if
-                    GTIDs are not enabled on the server\&.
+Add a SET statement to the output. An error occurs if
+                  GTIDs are not enabled on the server.
 T}
 T{
 AUTO
 T}:T{
 Add a SET statement to the output if GTIDs are
-                    enabled on the server\&.
+                  enabled on the server.
 T}
 .TE
 .sp 1
@@ -1515,6 +1515,23 @@ evaluates to
 ON)\&.
 .RE
 .sp
+.if n \{\
+.sp
+.\}
+.RS 4
+.it 1 an-trap
+.nr an-no-space-flag 1
+.nr an-break-flag 1
+.br
+.ps +1
+\fBNote\fR
+.ps -1
+.br
+It is not recommended to load a dump file when GTIDs are enabled on the server (gtid_mode=ON), if your dump file includes system tables\&.
+\fBmysqldump\fR
+issues DML instructions for the system tables which use the non\-transactional MyISAM storage engine, and this combination is not permitted when GTIDs are enabled\&. Also be aware that loading a dump file from a server with GTIDs enabled, into another server with GTIDs enabled, causes different transaction identifiers to be generated\&.
+.sp .5v
+.RE
 This option was added in MySQL 5\&.6\&.9\&.
 .RE
 Format Options.PP
@@ -1563,13 +1580,11 @@ maxdb,
 no_key_options,
 no_table_options, or
 no_field_options\&. To use several values, separate them by commas\&. These values have the same meaning as the corresponding options for setting the server SQL mode\&. See
-Section\ \&5.1.8, \(lqServer SQL Modes\(rq\&.
+Section\ \&5.1.10, \(lqServer SQL Modes\(rq\&.
 .sp
 This option does not guarantee compatibility with other servers\&. It only enables those SQL mode values that are currently available for making dump output more compatible\&. For example,
 \fB\-\-compatible=oracle\fR
 does not map data types to Oracle types or use Oracle comment syntax\&.
-.sp
-\fIThis option requires a server version of 4\&.1\&.0 or higher\fR\&. With older servers, it does nothing\&.
 .RE
 .sp
 .RS 4
@@ -1829,16 +1844,19 @@ l l.
 T{
 NULL (\fIunknown value\fR)
 T}:T{
+.PP
 <field name="\fIcolumn_name\fR" xsi:nil="true" />
 T}
 T{
-\*(Aq\*(Aq (\fIempty string\fR)
+'' (\fIempty string\fR)
 T}:T{
+.PP
 <field name="\fIcolumn_name\fR"></field>
 T}
 T{
-\*(AqNULL\*(Aq (\fIstring value\fR)
+'NULL' (\fIstring value\fR)
 T}:T{
+.PP
 <field name="\fIcolumn_name\fR">NULL</field>
 T}
 .TE
@@ -2442,7 +2460,7 @@ table, but makes the dump operation take considerably longer\&.
 \fB\-\-shared\-memory\-base\-name=\fR\fB\fIname\fR\fR
 .sp
 On Windows, the shared\-memory name to use, for connections made using shared memory to a local server\&. The default value is
-MYSQL\&. The shared\-memory name is case sensitive\&.
+MYSQL\&. The shared\-memory name is case\-sensitive\&.
 .sp
 The server must be started with the
 \fB\-\-shared\-memory\fR
@@ -2752,7 +2770,7 @@ for a workaround\&.
 .SH "COPYRIGHT"
 .br
 .PP
-Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved.
+Copyright \(co 1997, 2018, Oracle and/or its affiliates. All rights reserved.
 .PP
 This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
 .PP
index 51babb5e819241d00086b86cd4785d015c745c67..0ae296d0bcd2f51f1ab85e3a7093b2dcfc2d10bc 100644 (file)
@@ -2,12 +2,12 @@
 .\"     Title: \fBmysqldumpslow\fR
 .\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
 .\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
-.\"      Date: 06/02/2017
+.\"      Date: 06/15/2018
 .\"    Manual: MySQL Database System
 .\"    Source: MySQL 5.6
 .\"  Language: English
 .\"
-.TH "\FBMYSQLDUMPSLOW\FR" "1" "06/02/2017" "MySQL 5\&.6" "MySQL Database System"
+.TH "\FBMYSQLDUMPSLOW\FR" "1" "06/15/2018" "MySQL 5\&.6" "MySQL Database System"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -316,7 +316,7 @@ Count: 3  Time=2\&.13s (6s)  Lock=0\&.00s (0s)  Rows=0\&.0 (0), root[root]@local
 .SH "COPYRIGHT"
 .br
 .PP
-Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved.
+Copyright \(co 1997, 2018, Oracle and/or its affiliates. All rights reserved.
 .PP
 This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
 .PP
index 669ed8a9681cc38e66122472a30a361759b647f2..29a45ea6527d0e29951c40f4e1c5c32f19409c7a 100644 (file)
@@ -2,12 +2,12 @@
 .\"     Title: \fBmysqlhotcopy\fR
 .\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
 .\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
-.\"      Date: 06/02/2017
+.\"      Date: 06/15/2018
 .\"    Manual: MySQL Database System
 .\"    Source: MySQL 5.6
 .\"  Language: English
 .\"
-.TH "\FBMYSQLHOTCOPY\FR" "1" "06/02/2017" "MySQL 5\&.6" "MySQL Database System"
+.TH "\FBMYSQLHOTCOPY\FR" "1" "06/15/2018" "MySQL 5\&.6" "MySQL Database System"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -505,7 +505,7 @@ shell> \fBperldoc mysqlhotcopy\fR
 .SH "COPYRIGHT"
 .br
 .PP
-Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved.
+Copyright \(co 1997, 2018, Oracle and/or its affiliates. All rights reserved.
 .PP
 This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
 .PP
index 664eaff1737d238fa30e4087b7729251243407b3..ea870f72db74d6e2766f9efd100a1869da5482b4 100644 (file)
@@ -2,12 +2,12 @@
 .\"     Title: \fBmysqlimport\fR
 .\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
 .\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
-.\"      Date: 06/02/2017
+.\"      Date: 06/15/2018
 .\"    Manual: MySQL Database System
 .\"    Source: MySQL 5.6
 .\"  Language: English
 .\"
-.TH "\FBMYSQLIMPORT\FR" "1" "06/02/2017" "MySQL 5\&.6" "MySQL Database System"
+.TH "\FBMYSQLIMPORT\FR" "1" "06/15/2018" "MySQL 5\&.6" "MySQL Database System"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -116,7 +116,7 @@ This option is supported beginning with MySQL 5\&.6\&.1\&.
 \fB\-\-character\-sets\-dir=\fR\fB\fIdir_name\fR\fR
 .sp
 The directory where character sets are installed\&. See
-Section\ \&10.5, \(lqCharacter Set Configuration\(rq\&.
+Section\ \&10.14, \(lqCharacter Set Configuration\(rq\&.
 .RE
 .sp
 .RS 4
@@ -204,7 +204,7 @@ Print debugging information and memory and CPU usage statistics when the program
 Use
 \fIcharset_name\fR
 as the default character set\&. See
-Section\ \&10.5, \(lqCharacter Set Configuration\(rq\&.
+Section\ \&10.14, \(lqCharacter Set Configuration\(rq\&.
 .RE
 .sp
 .RS 4
@@ -427,7 +427,7 @@ Section\ \&13.2.6, \(lqLOAD DATA INFILE Syntax\(rq\&.
 .sp
 By default, files are read by the server on the server host\&. With this option,
 \fBmysqlimport\fR
-reads input files locally on the client host\&. Enabling local data loading has no effect if the server does not also support it; see
+reads input files locally on the client host\&. Enabling local data loading also requires that the server permits it; see
 Section\ \&6.1.6, \(lqSecurity Issues with LOAD DATA LOCAL\(rq
 .RE
 .sp
@@ -689,7 +689,7 @@ This option is deprecated and will be removed in a future release\&. As of MySQL
 \fB\-\-shared\-memory\-base\-name=\fR\fB\fIname\fR\fR
 .sp
 On Windows, the shared\-memory name to use, for connections made using shared memory to a local server\&. The default value is
-MYSQL\&. The shared\-memory name is case sensitive\&.
+MYSQL\&. The shared\-memory name is case\-sensitive\&.
 .sp
 The server must be started with the
 \fB\-\-shared\-memory\fR
@@ -738,7 +738,7 @@ localhost, the Unix socket file to use, or, on Windows, the name of the named pi
 Options that begin with
 \fB\-\-ssl\fR
 specify whether to connect to the server using SSL and indicate where to find SSL keys and certificates\&. See
-Section\ \&6.4.5, \(lqCommand Options for Secure Connections\(rq\&.
+Section\ \&6.4.2, \(lqCommand Options for Encrypted Connections\(rq\&.
 .RE
 .sp
 .RS 4
@@ -834,7 +834,7 @@ shell> \fBmysql \-e \*(AqSELECT * FROM imptest\*(Aq test\fR
 .SH "COPYRIGHT"
 .br
 .PP
-Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved.
+Copyright \(co 1997, 2018, Oracle and/or its affiliates. All rights reserved.
 .PP
 This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
 .PP
index 45f0ee7502dc05694ed742d04e7d55c8d1ae67f5..d162af7a21ed8b8658c03c314e36410c236e44f0 100644 (file)
@@ -2,12 +2,12 @@
 .\"     Title: \fBmysqlshow\fR
 .\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
 .\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
-.\"      Date: 06/02/2017
+.\"      Date: 06/15/2018
 .\"    Manual: MySQL Database System
 .\"    Source: MySQL 5.6
 .\"  Language: English
 .\"
-.TH "\FBMYSQLSHOW\FR" "1" "06/02/2017" "MySQL 5\&.6" "MySQL Database System"
+.TH "\FBMYSQLSHOW\FR" "1" "06/15/2018" "MySQL 5\&.6" "MySQL Database System"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -162,7 +162,7 @@ This option is supported beginning with MySQL 5\&.6\&.1\&.
 \fB\-\-character\-sets\-dir=\fR\fB\fIdir_name\fR\fR
 .sp
 The directory where character sets are installed\&. See
-Section\ \&10.5, \(lqCharacter Set Configuration\(rq\&.
+Section\ \&10.14, \(lqCharacter Set Configuration\(rq\&.
 .RE
 .sp
 .RS 4
@@ -250,7 +250,7 @@ Print debugging information and memory and CPU usage statistics when the program
 Use
 \fIcharset_name\fR
 as the default character set\&. See
-Section\ \&10.5, \(lqCharacter Set Configuration\(rq\&.
+Section\ \&10.14, \(lqCharacter Set Configuration\(rq\&.
 .RE
 .sp
 .RS 4
@@ -581,7 +581,7 @@ This option is deprecated and will be removed in a future release\&. As of MySQL
 \fB\-\-shared\-memory\-base\-name=\fR\fB\fIname\fR\fR
 .sp
 On Windows, the shared\-memory name to use, for connections made using shared memory to a local server\&. The default value is
-MYSQL\&. The shared\-memory name is case sensitive\&.
+MYSQL\&. The shared\-memory name is case\-sensitive\&.
 .sp
 The server must be started with the
 \fB\-\-shared\-memory\fR
@@ -634,7 +634,7 @@ localhost, the Unix socket file to use, or, on Windows, the name of the named pi
 Options that begin with
 \fB\-\-ssl\fR
 specify whether to connect to the server using SSL and indicate where to find SSL keys and certificates\&. See
-Section\ \&6.4.5, \(lqCommand Options for Secure Connections\(rq\&.
+Section\ \&6.4.2, \(lqCommand Options for Encrypted Connections\(rq\&.
 .RE
 .sp
 .RS 4
@@ -695,7 +695,7 @@ Display version information and exit\&.
 .SH "COPYRIGHT"
 .br
 .PP
-Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved.
+Copyright \(co 1997, 2018, Oracle and/or its affiliates. All rights reserved.
 .PP
 This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
 .PP
index 66bfc74c1a5f4458099d1e545570ed052fb48abc..b3379ae0736563c941d9727db2350d88cbbeae47 100644 (file)
@@ -2,12 +2,12 @@
 .\"     Title: \fBmysqlslap\fR
 .\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
 .\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
-.\"      Date: 06/02/2017
+.\"      Date: 06/15/2018
 .\"    Manual: MySQL Database System
 .\"    Source: MySQL 5.6
 .\"  Language: English
 .\"
-.TH "\FBMYSQLSLAP\FR" "1" "06/02/2017" "MySQL 5\&.6" "MySQL Database System"
+.TH "\FBMYSQLSLAP\FR" "1" "06/15/2018" "MySQL 5\&.6" "MySQL Database System"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -1036,7 +1036,7 @@ localhost, the Unix socket file to use, or, on Windows, the name of the named pi
 Options that begin with
 \fB\-\-ssl\fR
 specify whether to connect to the server using SSL and indicate where to find SSL keys and certificates\&. See
-Section\ \&6.4.5, \(lqCommand Options for Secure Connections\(rq\&.
+Section\ \&6.4.2, \(lqCommand Options for Encrypted Connections\(rq\&.
 .RE
 .sp
 .RS 4
@@ -1083,7 +1083,7 @@ Display version information and exit\&.
 .SH "COPYRIGHT"
 .br
 .PP
-Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved.
+Copyright \(co 1997, 2018, Oracle and/or its affiliates. All rights reserved.
 .PP
 This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
 .PP
diff --git a/mysql-wsrep-5.6/man/mysqltest.1 b/mysql-wsrep-5.6/man/mysqltest.1
deleted file mode 100644 (file)
index 9e395d8..0000000
+++ /dev/null
@@ -1,910 +0,0 @@
-'\" t
-.\"     Title: \fBmysqltest\fR
-.\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
-.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
-.\"      Date: 06/01/2017
-.\"    Manual: MySQL Database System
-.\"    Source: MySQL
-.\"  Language: English
-.\"
-.TH "\FBMYSQLTEST\FR" "1" "06/01/2017" "MySQL" "MySQL Database System"
-.\" -----------------------------------------------------------------
-.\" * Define some portability stuff
-.\" -----------------------------------------------------------------
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-.\" http://bugs.debian.org/507673
-.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-.ie \n(.g .ds Aq \(aq
-.el       .ds Aq '
-.\" -----------------------------------------------------------------
-.\" * set default formatting
-.\" -----------------------------------------------------------------
-.\" disable hyphenation
-.nh
-.\" disable justification (adjust text to left margin only)
-.ad l
-.\" -----------------------------------------------------------------
-.\" * MAIN CONTENT STARTS HERE *
-.\" -----------------------------------------------------------------
-.SH "NAME"
-mysqltest \- program to run test cases
-.br
-mysqltest_embedded \- program to run embedded test cases
-.SH "SYNOPSIS"
-.HP \w'\fBmysqltest\ [\fR\fB\fIoptions\fR\fR\fB]\ [\fR\fB\fIdb_name\fR\fR\fB]\fR\ 'u
-\fBmysqltest [\fR\fB\fIoptions\fR\fR\fB] [\fR\fB\fIdb_name\fR\fR\fB]\fR
-.HP \w'\fBmysqltest_embedded\ [\fR\fB\fIoptions\fR\fR\fB]\ [\fR\fB\fIdb_name\fR\fR\fB]\fR\ 'u
-\fBmysqltest_embedded [\fR\fB\fIoptions\fR\fR\fB] [\fR\fB\fIdb_name\fR\fR\fB]\fR
-.SH "DESCRIPTION"
-.PP
-The
-\fBmysqltest\fR
-program runs a test case against a MySQL server and optionally compares the output with a result file\&. This program reads input written in a special test language\&. Typically, you invoke
-\fBmysqltest\fR
-using
-\fBmysql\-test\-run\&.pl\fR
-rather than invoking it directly\&.
-.PP
-\fBmysqltest_embedded\fR
-is similar but is built with support for the
-libmysqld
-embedded server\&. This program is available only prior to MySQL 8\&.0\&.
-.PP
-Features of
-\fBmysqltest\fR:
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-Can send SQL statements to MySQL servers for execution
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-Can execute external shell commands
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-Can test whether the result from an SQL statement or shell command is as expected
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-Can connect to one or more standalone
-\fBmysqld\fR
-servers and switch between connections
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-Can connect to an embedded server (libmysqld), if MySQL is compiled with support for
-libmysqld\&. (In this case, the executable is named
-\fBmysqltest_embedded\fR
-rather than
-\fBmysqltest\fR\&.)
-.RE
-.PP
-By default,
-\fBmysqltest\fR
-reads the test case on the standard input\&. To run
-\fBmysqltest\fR
-this way, you normally invoke it like this:
-.sp
-.if n \{\
-.RS 4
-.\}
-.nf
-shell> \fBmysqltest [\fR\fB\fIoptions\fR\fR\fB] [\fR\fB\fIdb_name\fR\fR\fB] < \fR\fB\fItest_file\fR\fR
-.fi
-.if n \{\
-.RE
-.\}
-.PP
-You can also name the test case file with a
-\fB\-\-test\-file=\fR\fB\fIfile_name\fR\fR
-option\&.
-.PP
-The exit value from
-\fBmysqltest\fR
-is 0 for success, 1 for failure, and 62 if it skips the test case (for example, if after checking some preconditions it decides not to run the test)\&.
-.PP
-\fBmysqltest\fR
-supports the following options:
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-help\fR,
-\fB\-?\fR
-.sp
-Display a help message and exit\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-basedir=\fR\fB\fIdir_name\fR\fR,
-\fB\-b \fR\fB\fIdir_name\fR\fR
-.sp
-The base directory for tests\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-character\-sets\-dir=\fR\fB\fIpath\fR\fR
-.sp
-The directory where character sets are installed\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-compress\fR,
-\fB\-C\fR
-.sp
-Compress all information sent between the client and the server if both support compression\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-cursor\-protocol\fR
-.sp
-Use cursors for prepared statements\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-database=\fR\fB\fIdb_name\fR\fR,
-\fB\-D \fR\fB\fIdb_name\fR\fR
-.sp
-The default database to use\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-debug[=\fR\fB\fIdebug_options\fR\fR\fB]\fR,
-\fB\-#[\fR\fB\fIdebug_options\fR\fR\fB]\fR
-.sp
-Write a debugging log if MySQL is built with debugging support\&. The default
-\fIdebug_options\fR
-value is
-\*(Aqd:t:S:i:O,/tmp/mysqltest\&.trace\*(Aq\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-debug\-check\fR
-.sp
-Print some debugging information when the program exits\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-debug\-info\fR
-.sp
-Print debugging information and memory and CPU usage statistics when the program exits\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-explain\-protocol\fR,
-.sp
-Run
-EXPLAIN EXTENDED
-on all SELECT, INSERT, REPLACE, UPDATE and DELETE queries\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-host=\fR\fB\fIhost_name\fR\fR,
-\fB\-h \fR\fB\fIhost_name\fR\fR
-.sp
-Connect to the MySQL server on the given host\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-include=\fR\fB\fIfile_name\fR\fR,
-\fB\-i \fR\fB\fIfile_name\fR\fR
-.sp
-Include the contents of the given file before processing the contents of the test file\&. The included file should have the same format as other
-\fBmysqltest\fR
-test files\&. This option has the same effect as putting a
-\-\-source \fIfile_name\fR
-command as the first line of the test file\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-json\-explain\-protocol\fR,
-.sp
-Run
-EXPLAIN FORMAT=JSON
-on all SELECT, INSERT, REPLACE, UPDATE and DELETE queries\&. The
-json\-explain\-protocol
-option is available from MySQL 5\&.6\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-logdir=\fR\fB\fIdir_name\fR\fR
-.sp
-The directory to use for log files\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-mark\-progress\fR
-.sp
-Write the line number and elapsed time to
-\fItest_file\fR\&.progress\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-max\-connect\-retries=\fR\fB\fInum\fR\fR
-.sp
-The maximum number of connection attempts when connecting to server\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\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\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-no\-defaults\fR
-.sp
-Do not read default options from any option files\&. If used, this must be the first option\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-plugin\-dir=\fR\fB\fIpath\fR\fR
-.sp
-The directory in which to look for plugins\&. It may be necessary to specify this option if the
-\fIdefault_auth\fR
-argument is used for the
-connect()
-command to specify an authentication plugin but
-\fBmysqltest\fR
-does not find it\&. This option was added in MySQL 5\&.5\&.7\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-password[=\fR\fB\fIpassword\fR\fR\fB]\fR,
-\fB\-p[\fR\fB\fIpassword\fR\fR\fB]\fR
-.sp
-The password to use when connecting to the server\&. If you use the short option form (\fB\-p\fR), you
-\fIcannot\fR
-have a space between the option and the password\&. If you omit the
-\fIpassword\fR
-value following the
-\fB\-\-password\fR
-or
-\fB\-p\fR
-option on the command line, you are prompted for one\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-port=\fR\fB\fIport_num\fR\fR,
-\fB\-P \fR\fB\fIport_num\fR\fR
-.sp
-The TCP/IP port number to use for the connection\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-protocol=\fR\fB{TCP|SOCKET|PIPE|MEMORY}\fR
-.sp
-Choose the protocol for communication with the server\&.
-SOCKET
-is default\&.
-.sp
-The
-\fB\-\-protocol\fR
-option is ignored if running with the embedded server\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-ps\-protocol\fR
-.sp
-Use the prepared\-statement protocol for communication\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-quiet\fR
-.sp
-Suppress all normal output\&. This is a synonym for
-\fB\-\-silent\fR\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-record\fR,
-\fB\-r\fR
-.sp
-Record the output that results from running the test file into the file named by the
-\fB\-\-result\-file\fR
-option, if that option is given\&. It is an error to use this option without also using
-\fB\-\-result\-file\fR\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-result\-file=\fR\fB\fIfile_name\fR\fR,
-\fB\-R \fR\fB\fIfile_name\fR\fR
-.sp
-This option specifies the file for test case expected results\&.
-\fB\-\-result\-file\fR, together with
-\fB\-\-record\fR, determines how
-\fBmysqltest\fR
-treats the test actual and expected results for a test case:
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-If the test produces no results,
-\fBmysqltest\fR
-exits with an error message to that effect, unless
-\fB\-\-result\-file\fR
-is given and the named file is an empty file\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-Otherwise, if
-\fB\-\-result\-file\fR
-is not given,
-\fBmysqltest\fR
-sends test results to the standard output\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-With
-\fB\-\-result\-file\fR
-but not
-\fB\-\-record\fR,
-\fBmysqltest\fR
-reads the expected results from the given file and compares them with the actual results\&. If the results do not match,
-\fBmysqltest\fR
-writes a
-\&.reject
-file in the same directory as the result file, outputs a diff of the two files, and exits with an error\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-With both
-\fB\-\-result\-file\fR
-and
-\fB\-\-record\fR,
-\fBmysqltest\fR
-updates the given file by writing the actual test results to it\&.
-.RE
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-server\-arg=\fR\fB\fIvalue\fR\fR,
-\fB\-A \fR\fB\fIvalue\fR\fR
-.sp
-Pass the argument as an argument to the embedded server\&. For example,
-\fB\-\-server\-arg=\-\-tmpdir=/tmp\fR
-or
-\fB\-\-server\-arg=\-\-core\fR\&. Up to 64 arguments can be given\&. This option was removed in MySQL 8\&.0\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-server\-file=\fR\fB\fIfile_name\fR\fR,
-\fB\-F \fR\fB\fIfile_name\fR\fR
-.sp
-Read arguments for the embedded server from the given file\&. The file should contain one argument per line\&. This option was removed in MySQL 8\&.0\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-server\-public\-key\-path=\fR\fBfile_name\fR
-.sp
-The path name to a file containing the server RSA public key\&. The file must be in PEM format\&. The public key is used for RSA encryption of the client password for connections to the server made using accounts that authenticate with the
-sha256_password
-plugin\&. This option is ignored for client accounts that do not authenticate with that plugin\&. It is also ignored if password encryption is not needed, as is the case when the client connects to the server using an SSL connection\&.
-.sp
-The server sends the public key to the client as needed, so it is not necessary to use this option for RSA password encryption to occur\&. It is more efficient to do so because then the server need not send the key\&.
-.sp
-For additional discussion regarding use of the
-sha256_password
-plugin, including how to get the RSA public key, see
-\m[blue]\fBSHA\-256 Pluggable Authentication\fR\m[]\&\s-2\u[1]\d\s+2\&.
-.sp
-This option is available only if MySQL was built using OpenSSL\&. It was added in MySQL 5\&.6\&.6 under the name
-\fB\-\-server\-public\-key\fR
-and renamed in 5\&.6\&.7 to
-\fB\-\-server\-public\-key\-path\fR\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-silent\fR,
-\fB\-s\fR
-.sp
-Suppress all normal output\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-skip\-safemalloc\fR
-.sp
-Do not use memory allocation checking\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-sleep=\fR\fB\fInum\fR\fR,
-\fB\-T \fR\fB\fInum\fR\fR
-.sp
-Cause all
-sleep
-commands in the test case file to sleep
-\fInum\fR
-seconds\&. This option does not affect
-real_sleep
-commands\&.
-.sp
-An option value of 0 can also be used, which effectively disables
-sleep
-commands in the test case\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-socket=\fR\fB\fIpath\fR\fR,
-\fB\-S \fR\fB\fIpath\fR\fR
-.sp
-The socket file to use when connecting to
-localhost
-(which is the default host)\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-sp\-protocol\fR
-.sp
-Execute DML statements within a stored procedure\&. For every DML statement,
-\fBmysqltest\fR
-creates and invokes a stored procedure that executes the statement rather than executing the statement directly\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-tail\-lines=\fR\fB\fInn\fR\fR
-.sp
-Specify how many lines of the result to include in the output if the test fails because an SQL statement fails\&. The default is 0, meaning no lines of result printed\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-test\-file=\fR\fB\fIfile_name\fR\fR,
-\fB\-x \fR\fB\fIfile_name\fR\fR
-.sp
-Read test input from this file\&. The default is to read from the standard input\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-timer\-file=\fR\fB\fIfile_name\fR\fR,
-\fB\-m \fR\fB\fIfile_name\fR\fR
-.sp
-If given, the number of millisecond spent running the test will be written to this file\&. This is used by
-\fBmysql\-test\-run\&.pl\fR
-for its reporting\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-tls\-version=\fR\fB\fIprotocol_list\fR\fR
-.sp
-The protocols permitted by the client for encrypted connections\&. The value is a comma\-separated list containing one or more of these protocols: TLSv1, TLSv1\&.1, TLSv1\&.2\&. (TLSv1\&.2 is supported only if MySQL was compiled using OpenSSL 1\&.0\&.1 or higher\&. It is not supported if MySQL was compiled using yaSSL\&.)
-.sp
-This option was added in MySQL 5\&.7\&.10\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-tmpdir=\fR\fB\fIdir_name\fR\fR,
-\fB\-t \fR\fB\fIdir_name\fR\fR
-.sp
-The temporary directory where socket files are created\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-trace\-exec\fR
-.sp
-If enabled, this option causes
-\fBmysqltest\fR
-to immediately display the output from executed programs to
-stdout\&.
-.sp
-This option was added in MySQL 8\&.0\&.0\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-user=\fR\fB\fIuser_name\fR\fR,
-\fB\-u \fR\fB\fIuser_name\fR\fR
-.sp
-The MySQL user name to use when connecting to the server\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-verbose\fR,
-\fB\-v\fR
-.sp
-Verbose mode\&. Print out more information about what the program does\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-version\fR,
-\fB\-V\fR
-.sp
-Display version information and exit\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-\fB\-\-view\-protocol\fR
-.sp
-Every
-SELECT
-statement is wrapped inside a view\&.
-.RE
-.SH "COPYRIGHT"
-.br
-.PP
-Copyright \(co 2006, 2017, Oracle and/or its affiliates. All rights reserved.
-.PP
-This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
-.PP
-This documentation is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-.PP
-You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/.
-.sp
-.SH "NOTES"
-.IP " 1." 4
-SHA-256 Pluggable Authentication
-.RS 4
-\%http://dev.mysql.com/doc/refman/8.0/en/sha256-pluggable-authentication.html
-.RE
-.SH "SEE ALSO"
-For more information, please refer to the MySQL Reference Manual,
-which may already be installed locally and which is also available
-online at http://dev.mysql.com/doc/.
-.SH AUTHOR
-Oracle Corporation (http://dev.mysql.com/).
diff --git a/mysql-wsrep-5.6/man/mysqltest_embedded.1 b/mysql-wsrep-5.6/man/mysqltest_embedded.1
deleted file mode 100644 (file)
index 22c9131..0000000
+++ /dev/null
@@ -1 +0,0 @@
-.so mysqltest.1
index 0e9475cc1c97ef315a663c686def80d20073cbff..87d4130475ecaecb4c25b980822714573c648fc2 100644 (file)
@@ -2,12 +2,12 @@
 .\"     Title: \fBperror\fR
 .\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
 .\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
-.\"      Date: 06/02/2017
+.\"      Date: 06/15/2018
 .\"    Manual: MySQL Database System
 .\"    Source: MySQL 5.6
 .\"  Language: English
 .\"
-.TH "\FBPERROR\FR" "1" "06/02/2017" "MySQL 5\&.6" "MySQL Database System"
+.TH "\FBPERROR\FR" "1" "06/15/2018" "MySQL 5\&.6" "MySQL Database System"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -176,7 +176,7 @@ Display version information and exit\&.
 .SH "COPYRIGHT"
 .br
 .PP
-Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved.
+Copyright \(co 1997, 2018, Oracle and/or its affiliates. All rights reserved.
 .PP
 This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
 .PP
index 4115be50fdd1441b76b93221458c54804061d1a8..e082a2cea011b20d7c2ab72b2b82908a9630f0d7 100644 (file)
@@ -2,12 +2,12 @@
 .\"     Title: \fBreplace\fR
 .\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
 .\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
-.\"      Date: 06/02/2017
+.\"      Date: 06/15/2018
 .\"    Manual: MySQL Database System
 .\"    Source: MySQL 5.6
 .\"  Language: English
 .\"
-.TH "\FBREPLACE\FR" "1" "06/02/2017" "MySQL 5\&.6" "MySQL Database System"
+.TH "\FBREPLACE\FR" "1" "06/15/2018" "MySQL 5\&.6" "MySQL Database System"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -167,7 +167,7 @@ Display version information and exit\&.
 .SH "COPYRIGHT"
 .br
 .PP
-Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved.
+Copyright \(co 1997, 2018, Oracle and/or its affiliates. All rights reserved.
 .PP
 This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
 .PP
index f53361e299e5a9a9dd4a164107203fed232352b6..9f13ad2bcfa674bcd55439086469bf96f1226b62 100644 (file)
@@ -2,12 +2,12 @@
 .\"     Title: \fBresolve_stack_dump\fR
 .\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
 .\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
-.\"      Date: 06/02/2017
+.\"      Date: 06/15/2018
 .\"    Manual: MySQL Database System
 .\"    Source: MySQL 5.6
 .\"  Language: English
 .\"
-.TH "\FBRESOLVE_STACK_DUM" "1" "06/02/2017" "MySQL 5\&.6" "MySQL Database System"
+.TH "\FBRESOLVE_STACK_DUMP\FR" "1" "06/15/2018" "MySQL 5\&.6" "MySQL Database System"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -120,7 +120,7 @@ Section\ \&24.5.1.5, \(lqUsing a Stack Trace\(rq\&.
 .SH "COPYRIGHT"
 .br
 .PP
-Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved.
+Copyright \(co 1997, 2018, Oracle and/or its affiliates. All rights reserved.
 .PP
 This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
 .PP
index 9e0f17709a20a17d6b7a5d70ace589bb4cbb4aa9..40b8625b653fd435bc4032c56ad8089130e25427 100644 (file)
@@ -2,12 +2,12 @@
 .\"     Title: \fBresolveip\fR
 .\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
 .\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
-.\"      Date: 06/02/2017
+.\"      Date: 06/15/2018
 .\"    Manual: MySQL Database System
 .\"    Source: MySQL 5.6
 .\"  Language: English
 .\"
-.TH "\FBRESOLVEIP\FR" "1" "06/02/2017" "MySQL 5\&.6" "MySQL Database System"
+.TH "\FBRESOLVEIP\FR" "1" "06/15/2018" "MySQL 5\&.6" "MySQL Database System"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -101,7 +101,7 @@ Display version information and exit\&.
 .SH "COPYRIGHT"
 .br
 .PP
-Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved.
+Copyright \(co 1997, 2018, Oracle and/or its affiliates. All rights reserved.
 .PP
 This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
 .PP
index 1cfa4c5d0de2a7a54d3db0ef7e5aa4c5b7e9498a..c7ddc33b7ccda9905f693fd4567fbaf00bf9bc52 100644 (file)
@@ -6,7 +6,6 @@ binlog.binlog_multi_engine               # joro : NDB tests marked as experiment
 funcs_1.charset_collation_1              # depends on compile-time decisions
 
 main.func_math @freebsd                  # Bug#11751977 2010-05-04 alik main.func_math fails on FreeBSD in PB2
-main.mysqlslap @windows                  # Bug#11761520 2010-08-10 alik mysqlslap fails sporadically starting from Dahlia
 
 main.index_merge_innodb                  # BUG#11754168 2012-05-08 jorgen Doing an attempt at reenabling tests disabled by bug. EXPLAIN's row estimates varies for innodb so marked experimental for a while
 
index 1d0554af2f022dfd024a2c9f748d73aba954d522..7acb07edea18ac33a76fb3f3d1839c3374390cb3 100644 (file)
@@ -358,7 +358,54 @@ COMMIT;
 --let $diff_tables= master:t1,slave:t1
 --source include/diff_tables.inc
 
---echo ######### 8 - Bug#55375(Regression Bug) Transaction bigger than  ##########
+--echo ####### 8 - LOAD DATA INFILE INTO TABLE #######
+
+#
+# This scenario verifies that load data infile fails when
+# binlog cache exceeds max_binlog_cache_size
+#
+--source include/rpl_connection_master.inc
+CREATE TABLE t6 (a varchar(20)) ENGINE=Innodb;
+
+# Save the current binary log position
+--let $pos_before= query_get_value(show master status,Position,1)
+
+--disable_query_log
+--let $write_var =`SELECT REPEAT('Testing\n', 1000)`
+--let $write_to_file = GENERATE
+--source include/write_var_to_file.inc
+--enable_query_log
+
+# Below transaction generates transaction cache more than
+# the max_binlog_cache_size i.e 4096. Hence results in error.
+--replace_result $write_to_file temp_file
+--error ER_TRANS_CACHE_FULL
+eval LOAD DATA INFILE '$write_to_file' INTO TABLE t6;
+
+--exec rm $write_to_file
+
+# Check that the above transaction has not been logged in the binary log
+--let $assert_text= assert that the above Event has not been added to binlog
+--let $assert_cond= [SHOW MASTER STATUS, Position,1] = $pos_before
+--source include/assert.inc
+
+# Check that the table is empty on master
+--let $assert_text = Check that the LOAD DATA didn't add any data into the table
+--let $assert_cond = [SELECT COUNT(*) FROM t6] = 0
+--source include/assert.inc
+
+--source include/sync_slave_sql_with_master.inc
+
+# Check that the table is empty on slave
+--let $assert_text = Check that the LOAD DATA didn't add any data into the table
+--let $assert_cond = [SELECT COUNT(*) FROM t6] = 0
+--source include/assert.inc
+
+--source include/rpl_connection_master.inc
+DROP TABLE t6;
+--source include/sync_slave_sql_with_master.inc
+
+--echo ######### 9 - Bug#55375(Regression Bug) Transaction bigger than  ##########
 --echo #########     max_binlog_cache_size crashes slave                ##########
 
 --echo # [ On Slave ]
diff --git a/mysql-wsrep-5.6/mysql-test/extra/rpl_tests/rpl_db_stmts_ignored.inc b/mysql-wsrep-5.6/mysql-test/extra/rpl_tests/rpl_db_stmts_ignored.inc
new file mode 100644 (file)
index 0000000..1d98c44
--- /dev/null
@@ -0,0 +1,51 @@
+###############################################################################
+# This .inc file is to check that filtering rules on
+# CREATE DATABASE/ALTER DATABASE/DROP DATABASE statements
+# works properly.
+# NOTE: Filter rules should be set in such a way that 'db1'
+# is filtered out on Slave. Setting the filtering rule
+# should be done in the test that includes this .inc file.
+# For eg:
+#    --replicate-ignore-db=db1
+#    --source ../extra/rpl_tests/rpl_db_stmts_ignored.inc
+#  (OR)
+#    --replicate-do-db=db2
+#    --source ../extra/rpl_tests/rpl_db_stmts_ignored.inc
+#  (OR)
+#    --replicate-wild-ignore-table=db1.%
+#    --source ../extra/rpl_tests/rpl_db_stmts_ignored.inc
+###############################################################################
+--source include/rpl_connection_master.inc
+--echo #
+--echo # Execute 'CREATE DATABASE db1' on Master.
+--echo #
+CREATE DATABASE db1;
+
+--echo #
+--echo # Sync with Slave (using gtid values)
+--echo #
+--let $use_gtids=1
+--source include/sync_slave_sql_with_master.inc
+
+--echo #
+--echo # Check that even after sync is completed 'db1' does not exists
+--echo # on Slave which implies that 'CREATE DATABASE db1' is filtered
+--echo # out.
+--echo #
+--error ER_BAD_DB_ERROR
+USE db1;
+
+--echo #
+--echo # Execute other database commands (ALTER/DROP) on Master.
+--echo #
+--source include/rpl_connection_master.inc
+ALTER DATABASE db1 CHARACTER SET latin1;
+DROP DATABASE db1;
+
+--echo #
+--echo # Check that we are able to sync with slave successfully
+--echo # which implies that those commands are filtered out.
+--echo # If they were executed by Slave, that will break replication
+--echo # as we do not have 'db1' database on Slave.
+--let $use_gtids=1
+--source include/sync_slave_sql_with_master.inc
index 85b674c78503959856ac0bff9ed27ba55c85b0bd..2680562cde5cb6a084e3a4624ea3583ffb48620d 100644 (file)
@@ -121,6 +121,7 @@ select * from ti1 order by b /* must be (2),(3) */;
 
 --echo *** slave must stop (Trying to delete a referenced foreing key)
 connection slave;
+--let $slave_sql_errno= convert_error(ER_ROW_IS_REFERENCED_2)
 source include/wait_for_slave_sql_to_stop.inc;
 
 let $last_error = query_get_value("SHOW SLAVE STATUS", Last_SQL_Errno, 1);
@@ -155,6 +156,7 @@ insert into ti2 set a=3, b=3 /* offending write event */;
 
 --echo *** slave must stop (Trying to insert an invalid foreign key)
 connection slave;
+--let $slave_sql_errno= convert_error(ER_NO_REFERENCED_ROW_2)
 source include/wait_for_slave_sql_to_stop.inc;
 
 let $last_error = query_get_value("SHOW SLAVE STATUS", Last_SQL_Errno, 1);
@@ -194,6 +196,7 @@ insert into ti1 set b=1 /* offending write event */;
 
 --echo *** slave must stop (Trying to insert a dupliacte key)
 connection slave;
+--let $slave_sql_errno= convert_error(ER_DUP_ENTRY)
 source include/wait_for_slave_sql_to_stop.inc;
 
 let $last_error = query_get_value("SHOW SLAVE STATUS", Last_SQL_Errno, 1);
@@ -229,6 +232,7 @@ DELETE FROM t1 WHERE a = -2;
 
 --echo *** slave must stop (Key was not found)
 connection slave;
+--let $slave_sql_errno= convert_error(ER_KEY_NOT_FOUND)
 source include/wait_for_slave_sql_to_stop.inc;
 
 let $last_error = query_get_value("SHOW SLAVE STATUS", Last_SQL_Errno, 1);
index cf370a6a78fef5cd875bd15657ae9edcaff695b6..87081ab7c3f8393c45f79e2a166fd5599fc964fd 100644 (file)
@@ -204,6 +204,7 @@ START SLAVE;
 --let $status_items= Last_IO_Errno, Last_IO_Error
 --source include/show_slave_status.inc
 
+--let $slave_io_errno= convert_error(ER_MASTER_FATAL_ERROR_READING_BINLOG)
 --source include/stop_slave.inc
 RESET SLAVE;
 
diff --git a/mysql-wsrep-5.6/mysql-test/include/check_openssl_version.inc b/mysql-wsrep-5.6/mysql-test/include/check_openssl_version.inc
new file mode 100644 (file)
index 0000000..0e4bafa
--- /dev/null
@@ -0,0 +1,55 @@
+--disable_query_log
+--disable_result_log
+
+let OPENSSL_VERSION_INFO= $MYSQLTEST_VARDIR/log/openssl_version_info.txt;
+let OPENSSL_CONFIG_INC= $MYSQLTEST_VARDIR/log/openssl_binary_config.inc;
+
+--error 0,1
+--remove_file $OPENSSL_VERSION_INFO
+--error 0,1
+--remove_file $OPENSSL_CONFIG_INC
+
+--error 0,1, 127
+--exec openssl version > $OPENSSL_VERSION_INFO
+
+perl;
+ use strict;
+ my $search_file= $ENV{'OPENSSL_VERSION_INFO'};
+ my $search_pattern_1= "0.9.*";
+ my $search_pattern_2= "1.0.0.*";
+ my $search_pattern_3= "1.0.1.*";
+ my $content= "";
+ my $dir= $ENV{'MYSQLTEST_VARDIR'};
+ open(CONFIG_INC, ">$dir/log/openssl_binary_config.inc");
+ open(FILE, "$search_file") or die("Unable to open '$search_file' : $!\n");
+ read(FILE, $content, 100, 0);
+ close(FILE);
+
+ if ( ($content =~ m{$search_pattern_1}) || ($content =~ m{$search_pattern_2}) ||
+      ($content =~ m{$search_pattern_3}) ) {
+    print CONFIG_INC "let \$STATUS_VAR = 1;\n";
+ }
+ else {
+    print CONFIG_INC "let \$STATUS_VAR = 0;\n";
+ }
+ close(CONFIG_INC);
+EOF
+
+--source $OPENSSL_CONFIG_INC
+
+if ($STATUS_VAR)
+{
+ --error 0,1
+ --remove_file $OPENSSL_VERSION_INFO
+ --error 0,1
+ --remove_file $OPENSSL_CONFIG_INC
+ --skip Test requires openssl version to be 1.0.2+
+}
+
+--error 0,1
+--remove_file $OPENSSL_VERSION_INFO
+--error 0,1
+--remove_file $OPENSSL_CONFIG_INC
+
+--enable_query_log
+--enable_result_log
diff --git a/mysql-wsrep-5.6/mysql-test/include/have_openssl_support.inc b/mysql-wsrep-5.6/mysql-test/include/have_openssl_support.inc
new file mode 100644 (file)
index 0000000..1c28312
--- /dev/null
@@ -0,0 +1,5 @@
+# Only run this test if OpenSSL is supported
+let $shavars= query_get_value("SHOW STATUS LIKE 'Rsa_public_key'", Variable_name, 1);
+if ($shavars != 'Rsa_public_key'){
+  skip Need OpenSSL support;
+}
index c08a32bb6c4ace69919a2d81b7b75b18712f1461..ff179c480ba273fe533d64209f91bf284bc54a4a 100644 (file)
@@ -107,6 +107,9 @@ BEGIN
 
   SHOW STATUS LIKE 'slave_open_temp_tables';
 
+  -- Show open connections/transactions in wsrep provider
+  SHOW STATUS LIKE 'wsrep_open%';
+
   -- Checksum system tables to make sure they have been properly
   -- restored after test
   checksum table
index 6bb2c9af52cdb0c3385cb6b350b773c18562303e..642602bd107f9f70d599407392d16c65cead5428 100644 (file)
@@ -1,4 +1,4 @@
--- Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.
+-- Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights reserved.
 --
 -- This program is free software; you can redistribute it and/or modify
 -- it under the terms of the GNU General Public License as published by
@@ -252,7 +252,7 @@ INSERT INTO global_suppressions VALUES
  ("Insecure configuration for --secure-file-priv:*"),
 
  /*
-   Galera suppressions 
+   Galera suppressions
  */
  ("WSREP:*down context*"),
  ("WSREP: Failed to send state UUID:*"),
@@ -301,6 +301,12 @@ INSERT INTO global_suppressions VALUES
  ("install timer expired"),
  ("Last Applied Action message in non-primary configuration from member"),
 
+ /*
+  Bug#26585560, warning related to --pid-file
+ */
+ ("Insecure configuration for --pid-file:*"),
+ ("Few location(s) are inaccessible while checking PID filepath"),
+
  ("THE_LAST_SUPPRESSION")||
 
 
index d181f955e2e0bb611588705d90326e56853a09a4..edb3b8bd190895febf69e8ba5672d6813f8ccc1e 100644 (file)
 # --let $slave_param_value= No
 # [--let $slave_param_comparison= [ < | <= | >= | > | = | != ]]
 # [--let $slave_timeout= NUMBER]
+# [--let $slave_error_param= [Last_SQL_Errno | Last_IO_Errno]]
 # [--let $slave_error_param= [Slave_SQL_Errno | Slave_IO_Errno]]
 # [--let $rpl_debug= 1]
+# [--let $slave_io_errno= NUMBER [, NUMBER ...] [# comment]]
+# [--let $slave_sql_errno= NUMBER [, NUMBER ...] [# comment]]
 # --source include/wait_for_slave_param.inc
 #
 # Parameters:
 #   setting $slave_timeout. The unit is one second.
 #
 # $slave_error_param
-#   If set, this script will check if the column of the output from
-#   SHOW SLAVE STATUS named $slave_error_param is nonzero.  If it is,
-#   this script will faile immediately.  Typically, this should be set
+#   If set, this script will check for errors in the column of the
+#   output from SHOW SLAVE STATUS named $slave_error_param while
+#   waiting for the parameter. Once finding an error that is not
+#   expected (see $slave_io_errno and $slave_sql_errno parameters)
+#   this script will fail immediately. Typically, this should be set
 #   to Last_IO_Errno or Last_SQL_Errno.
 #
 # $rpl_debug
 #   See include/rpl_init.inc
+#
+# $slave_io_errno
+#   See include/wait_for_slave_io_error.inc
+#
+# $slave_sql_errno
+#   See include/wait_for_slave_sql_error.inc
 
 
 --let $include_filename= wait_for_slave_param.inc [$slave_param]
@@ -57,9 +68,16 @@ if (!$_slave_timeout)
   let $_slave_timeout= `select $default_timeout * $sleep_freq`;
 }
 
-if ($slave_error_param == '')
+if ($slave_error_param)
 {
-  --let $slave_error_param= 1
+  if ($slave_error_param != "Last_SQL_Errno")
+  {
+    if ($slave_error_param != "Last_IO_Errno")
+    {
+      --echo *** slave_error_param = $slave_error_param
+      --die slave_error_param must be null, Last_SQL_Errno or Last_IO_Errno
+    }
+  }
 }
 
 let $_slave_param_comparison= $slave_param_comparison;
@@ -82,6 +100,11 @@ if ($_slave_check_configured == 'No such row')
   --die SHOW SLAVE STATUS returned empty result set. Slave not configured.
 }
 
+
+# Strip away comments on $slave_io_errno and $slave_sql_errno parameters
+--let $_slave_io_errno= `SELECT IF(LOCATE('#', '$slave_io_errno') != 0, SUBSTR('$slave_io_errno', 1, LOCATE('#', '$slave_io_errno') - 1), '$slave_io_errno')`
+--let $_slave_sql_errno= `SELECT IF(LOCATE('#', '$slave_sql_errno') != 0, SUBSTR('$slave_sql_errno', 1, LOCATE('#', '$slave_sql_errno') - 1), '$slave_sql_errno')`
+
 --let $_slave_timeout_counter= `select $_slave_timeout * $sleep_freq`
 --let $_slave_continue= 1
 while ($_slave_continue)
@@ -89,9 +112,29 @@ while ($_slave_continue)
   --let $_show_slave_status_value= query_get_value("SHOW SLAVE STATUS", $slave_param, 1)
 
   # Check if an error condition is reached.
-  if (!$slave_error_param)
+  if ($slave_error_param)
   {
     --let $_show_slave_status_error_value= query_get_value("SHOW SLAVE STATUS", $slave_error_param, 1)
+
+    # Check if the error condition was expected
+    if ($_show_slave_status_error_value)
+    {
+      --let $_expected_error=
+      if ($slave_error_param == "Last_IO_Errno")
+      {
+        --let $_expected_error=`SELECT FIND_IN_SET('$_show_slave_status_error_value','$_slave_io_errno')`
+      }
+      if ($slave_error_param == "Last_SQL_Errno")
+      {
+        --let $_expected_error=`SELECT FIND_IN_SET('$_show_slave_status_error_value','$_slave_sql_errno')`
+      }
+      # If the error is an expected error, just ignore it
+      if ($_expected_error)
+      {
+        --let $_show_slave_status_error_value=
+      }
+    }
+
     if ($_show_slave_status_error_value)
     {
       --echo **** ERROR: $slave_error_param = '$_show_slave_status_error_value' while waiting for slave parameter $slave_param $_slave_param_comparison $slave_param_value ****
index 4aea9fba5699f8481fe33a52cf452babf309acd1..b4dff6475a18ae52fb9737eb3d803e8cf5fd0a26 100644 (file)
@@ -28,7 +28,7 @@ let $slave_param_value= Yes;
 # *before* it clears Last_SQL_Errno.  So we have to allow errors in
 # the SQL thread here.
 
-#--let $slave_error_param= Last_SQL_Errno
+--let $slave_error_param=
 source include/wait_for_slave_param.inc;
 #--let $slave_error_param=
 
index 44e3a0fd0e53314e87af0d90895dd19ebbaff72d..6fa319b047adff5be85406f2f028b8e260095c14 100755 (executable)
@@ -1,7 +1,7 @@
 #!/usr/bin/perl
 # -*- cperl -*-
 
-# Copyright (c) 2004, 2017, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2004, 2018, Oracle and/or its affiliates. All rights reserved.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -631,9 +631,16 @@ sub run_test_server ($$$) {
              mtr_report(" - skipping '$worker_savedir/'");
              rmtree($worker_savedir);
            }
-           else {
-             mtr_report(" - saving '$worker_savedir/' to '$savedir/'");
-             rename($worker_savedir, $savedir);
+            else
+            {
+              rename($worker_savedir, $savedir) if $worker_savedir ne $savedir;
+
+              # Look for the test log file and put that in savedir location
+              my $logfile= "$result->{shortname}" . ".log";
+              my $logfilepath= dirname($worker_savedir) . "/" . $logfile;
+              move($logfilepath, $savedir);
+              mtr_report(" - the logfile can be found in '$savedir/$logfile'");
+
              # Move any core files from e.g. mysqltest
              foreach my $coref (glob("core*"), glob("*.dmp"))
              {
@@ -702,21 +709,17 @@ sub run_test_server ($$$) {
            # too many times already
            my $tname= $result->{name};
            my $failures= $result->{failures};
-           if ($opt_retry > 1 and $failures >= $opt_retry_failure){
+           if ($opt_retry > 1 and $failures >= $opt_retry_failure)
+            {
              mtr_report("\nTest $tname has failed $failures times,",
                         "no more retries!\n");
            }
-           else {
+           else
+            {
              mtr_report("\nRetrying test $tname, ".
                         "attempt($retries/$opt_retry)...\n");
-              #saving the log file as filename.failed in case of retry
-              if ( $result->is_failed() ) {
-                my $worker_logdir= $result->{savedir};
-                my $log_file_name=dirname($worker_logdir)."/".$result->{shortname}.".log";
-                rename $log_file_name,$log_file_name.".failed";
-              }
              delete($result->{result});
-             $result->{retries}= $retries+1;
+             $result->{retries}= $retries + 1;
              $result->write_test($sock, 'TESTCASE');
              next;
            }
@@ -2389,6 +2392,7 @@ sub environment_setup {
   $ENV{'DEFAULT_MASTER_PORT'}= $mysqld_variables{'port'};
   $ENV{'MYSQL_TMP_DIR'}=      $opt_tmpdir;
   $ENV{'MYSQLTEST_VARDIR'}=   $opt_vardir;
+  $ENV{'MYSQL_TEST_DIR_ABS'}= getcwd();
   $ENV{'MYSQL_BINDIR'}=       "$bindir";
   $ENV{'MYSQL_SHAREDIR'}=     $path_language;
   $ENV{'MYSQL_CHARSETSDIR'}=  $path_charsetsdir;
@@ -3350,6 +3354,12 @@ sub have_wsrep() {
   return defined $wsrep_on
 }
 
+sub wsrep_is_bootstrap_server($) {
+  my $mysqld= shift;
+  return $mysqld->if_exist('wsrep_cluster_address') &&
+    ($mysqld->value('wsrep_cluster_address') eq "gcomm://" ||
+     $mysqld->value('wsrep_cluster_address') eq "'gcomm://'");
+}
 
 sub check_wsrep_support() {
   if (have_wsrep())
@@ -3848,13 +3858,8 @@ sub wait_wsrep_ready($$) {
 
   for (my $loop= 1; $loop <= $loops; $loop++)
   {
-    if (run_query_output($mysqld, $query, $outfile) != 0)
-    {
-      $tinfo->{logfile}= "WSREP error while trying to determine node state";
-      return 0;
-    }
-
-    if (mtr_grab_file($outfile) =~ /^ON/)
+    if (run_query_output($mysqld, $query, $outfile) == 0 &&
+        mtr_grab_file($outfile) =~ /^ON/)
     {
       unlink($outfile);
       return 1;
@@ -5871,6 +5876,17 @@ sub start_servers($) {
       sleep_until_file_created("$datadir/auto.cnf", $opt_start_timeout,
                                $mysqld->{'proc'});
 
+      # If wsrep is on, we need to wait until the first
+      # server starts and bootstraps the cluster before
+      # starting other servers.
+      if (have_wsrep() && wsrep_is_bootstrap_server($mysqld))
+      {
+        mtr_verbose("WSREP waiting for first server to bootstrap cluster");
+        if (!wait_wsrep_ready($tinfo, $mysqld))
+        {
+          return 1;
+        }
+      }
     }
 
   }
index 25a094b99329b970515ba83238b705496dd98697..3836208d7d8b79c92fb8bb8f6197d4f95d55882f 100644 (file)
@@ -1786,8 +1786,6 @@ BEGIN
 SET @x = 0;
 REPEAT SET @x = @x + 1; UNTIL @x > p1 END REPEAT;
 END ;||
-Warnings:
-Warning        1404    Failed to grant EXECUTE and ALTER ROUTINE privileges
 SHOW GRANTS FOR 'user1'@'localhost';
 Grants for user1@localhost
 GRANT USAGE ON *.* TO 'user1'@'localhost'
@@ -1797,6 +1795,7 @@ SHOW GRANTS FOR 'user2';
 Grants for user2@%
 GRANT USAGE ON *.* TO 'user2'@'%'
 GRANT CREATE, CREATE ROUTINE ON `db1`.* TO 'user2'@'%'
+GRANT EXECUTE, ALTER ROUTINE ON PROCEDURE `db1`.`proc2` TO 'user2'@'%'
 DROP PROCEDURE db1.proc1;
 DROP PROCEDURE db1.proc2;
 REVOKE ALL ON db1.* FROM 'user1'@'localhost';
diff --git a/mysql-wsrep-5.6/mysql-test/r/import_schema_mismatch.result b/mysql-wsrep-5.6/mysql-test/r/import_schema_mismatch.result
new file mode 100644 (file)
index 0000000..d3cbb40
--- /dev/null
@@ -0,0 +1,12 @@
+CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB ROW_FORMAT=COMPACT;
+FLUSH TABLES t1 FOR EXPORT;
+UNLOCK TABLES;
+DROP TABLE t1;
+SET GLOBAL innodb_file_format=`Barracuda`;
+SET GLOBAL innodb_file_per_table= ON;
+CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
+ALTER TABLE t1 DISCARD TABLESPACE;
+ALTER TABLE t1 IMPORT TABLESPACE;
+ERROR HY000: Schema mismatch (Table flags don't match,server table has ROW_TYPE_DYNAMIC and the meta-data file has ROW_TYPE_COMPACT)
+DROP TABLE t1;
+SET GLOBAL innodb_file_format=`Antelope`;
index 990e0a64dc7213b0355a856f93e474fe417d413e..800b8ca4152b254585d2ff06a21e82c3d351b5fa 100644 (file)
@@ -114,3 +114,62 @@ End of 5.0 tests
 select 1 as a limit 4294967296,10;
 a
 End of 5.1 tests
+CREATE TABLE t1 (id INT NOT NULL AUTO_INCREMENT,
+k INT,
+payload CHAR(100),
+PRIMARY KEY(id),
+KEY idx_k (k));
+INSERT INTO t1(k) VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
+ANALYZE TABLE t1;
+Table  Op      Msg_type        Msg_text
+test.t1        analyze status  OK
+EXPLAIN SELECT * FROM t1 FORCE INDEX (idx_k)
+WHERE k BETWEEN 2 AND 5
+GROUP BY id
+ORDER BY id LIMIT 0,1;
+id     select_type     table   type    possible_keys   key     key_len ref     rows    Extra
+1      SIMPLE  t1      range   PRIMARY,idx_k   idx_k   5       NULL    3       Using index condition; Using filesort
+EXPLAIN SELECT * FROM t1 FORCE INDEX (idx_k)
+WHERE k BETWEEN 2 AND 5
+GROUP BY id
+LIMIT 0,1;
+id     select_type     table   type    possible_keys   key     key_len ref     rows    Extra
+1      SIMPLE  t1      range   PRIMARY,idx_k   idx_k   5       NULL    3       Using index condition; Using filesort
+EXPLAIN SELECT * FROM t1 FORCE INDEX (idx_k)
+WHERE k BETWEEN 2 AND 5
+ORDER BY id LIMIT 0,1;
+id     select_type     table   type    possible_keys   key     key_len ref     rows    Extra
+1      SIMPLE  t1      range   idx_k   idx_k   5       NULL    3       Using index condition; Using filesort
+EXPLAIN SELECT * FROM t1 FORCE INDEX (idx_k)
+WHERE k BETWEEN 2 AND 5
+GROUP BY id
+ORDER BY id;
+id     select_type     table   type    possible_keys   key     key_len ref     rows    Extra
+1      SIMPLE  t1      range   PRIMARY,idx_k   idx_k   5       NULL    3       Using index condition; Using filesort
+SELECT * FROM t1 FORCE INDEX (idx_k)
+WHERE k BETWEEN 2 AND 5
+GROUP BY id
+ORDER BY id LIMIT 0,1;
+id     k       payload
+2      2       NULL
+SELECT * FROM t1 FORCE INDEX (idx_k)
+WHERE k BETWEEN 2 AND 5
+GROUP BY id
+LIMIT 0,1;
+id     k       payload
+2      2       NULL
+SELECT * FROM t1 FORCE INDEX (idx_k)
+WHERE k BETWEEN 2 AND 5
+ORDER BY id LIMIT 0,1;
+id     k       payload
+2      2       NULL
+SELECT * FROM t1 FORCE INDEX (idx_k)
+WHERE k BETWEEN 2 AND 5
+GROUP BY id
+ORDER BY id;
+id     k       payload
+2      2       NULL
+3      3       NULL
+4      4       NULL
+5      5       NULL
+DROP TABLE t1;
index 09b4c5f934a1288336f46160dece66166db1f21d..e695d3b5ed473224dc1da79b793ec4bf1472b85d 100644 (file)
@@ -1038,6 +1038,12 @@ The following options may be given as the first argument:
  --wsrep-causal-reads 
  (DEPRECATED) setting this variable is equivalent to
  setting wsrep_sync_wait READ flag
+ --wsrep-certification-rules=name 
+ Certification rules to use in the cluster. Possible
+ values are: "strict": stricter rules that could result in
+ more certification failures. "optimized": relaxed rules
+ that allow more concurrency and cause less certification
+ failures.
  --wsrep-certify-nonPK 
  Certify tables with no primary key
  (Defaults to on; use --skip-wsrep-certify-nonPK to disable.)
@@ -1415,6 +1421,7 @@ wait-timeout 28800
 wsrep-OSU-method TOI
 wsrep-auto-increment-control TRUE
 wsrep-causal-reads FALSE
+wsrep-certification-rules strict
 wsrep-certify-nonPK TRUE
 wsrep-cluster-address 
 wsrep-cluster-name my_wsrep_cluster
diff --git a/mysql-wsrep-5.6/mysql-test/r/sp_debug.result b/mysql-wsrep-5.6/mysql-test/r/sp_debug.result
new file mode 100644 (file)
index 0000000..89dd34f
--- /dev/null
@@ -0,0 +1,23 @@
+#
+# Bug#26040870 - ASSERT ON KILL'ING A STORED ROUTINE INVOCATION.
+#
+CREATE TABLE t1 (a INT);
+CREATE FUNCTION f1() RETURNS INT
+BEGIN
+INSERT INTO t1 VALUES (1);
+RETURN 1;
+END|
+SET DEBUG_SYNC= "sp_lex_instr_before_exec_core SIGNAL sp_ready WAIT_FOR sp_finish";
+SELECT f1();
+SET DEBUG_SYNC="now WAIT_FOR sp_ready";
+KILL QUERY sp_con_id;
+SET DEBUG_SYNC="now SIGNAL sp_finish";
+# Diagnostics area is not set if routine statement execution is
+# interrupted by the KILL operation. Accessing diagnostics area in such
+# case results in the issue reported.
+# Patch for the bug25586773, checks if diagnostics area is set before
+# accessing it.
+ERROR 70100: Query execution was interrupted
+SET DEBUG_SYNC='RESET';
+DROP TABLE t1;
+DROP FUNCTION f1;
diff --git a/mysql-wsrep-5.6/mysql-test/r/ssl_verify_identity.result b/mysql-wsrep-5.6/mysql-test/r/ssl_verify_identity.result
new file mode 100644 (file)
index 0000000..dac3d04
--- /dev/null
@@ -0,0 +1,17 @@
+### Trying to connect without ssl. This should establish an unencrypted connection.
+Variable_name  Value
+Ssl_cipher     
+### Trying to connect with ssl-mode as REQUIRED. This should establish an encrypted connection.
+Variable_name  Value
+Ssl_cipher     SSL_CIPHER
+### Trying to connect with ssl-verify-server-cert option. This should establish an encrypted connection.
+Variable_name  Value
+Ssl_cipher     SSL_CIPHER
+### Trying to connect with ssl-verify-server-cert option and hostname as nonexistent. This should fail.
+#Search for the error in the file
+### Trying to connect with ssl-verify-server-cert option and hostname as localhost. This should establish an encrypted connection as localhost is present in Alternative Subject Name in the certificate.
+Variable_name  Value
+Ssl_cipher     SSL_CIPHER
+### Trying to connect with ssl-verify-server-cert option and hostname as 127.0.0.1. This should establish an encrypted connection as localhost is present in Alternative Subject Name in the certificate.
+Variable_name  Value
+Ssl_cipher     SSL_CIPHER
index 3f07795286bfed3347056c9214c0004286ba8e53..662e61615267134fcc2abfb7b6a255f4ffb9ac26 100644 (file)
@@ -1860,3 +1860,19 @@ DROP TABLE t17059925, t2, t3;
 SET @@long_query_time= @old_long_query_time;
 SET @@global.log_output= @old_log_output;
 SET @@global.slow_query_log= @old_slow_query_log;
+#
+# Bug#27197235 USER VARIABLE + UINON + DECIMAL COLUMN RETURNS
+#              WRONG VALUES
+#
+SET NAMES utf8;
+SET @advertAcctId = 1000003;
+select @advertAcctId as a from dual union all select 1.0 from dual;
+a
+1000003.0
+1.0
+SET NAMES latin1;
+SET @advertAcctId = 1000003;
+select @advertAcctId as a from dual union all select 1.0 from dual;
+a
+1000003.0
+1.0
diff --git a/mysql-wsrep-5.6/mysql-test/std_data/ca-cert-verify-san.pem b/mysql-wsrep-5.6/mysql-test/std_data/ca-cert-verify-san.pem
new file mode 100644 (file)
index 0000000..04457ed
--- /dev/null
@@ -0,0 +1,22 @@
+-----BEGIN CERTIFICATE-----
+MIIDmTCCAoGgAwIBAgIJAO9Te7BEDh7eMA0GCSqGSIb3DQEBCwUAMGMxCzAJBgNV
+BAYTAklOMRIwEAYDVQQIDAlLYXJuYXRha2ExEjAQBgNVBAcMCUJhbmdhbG9yZTEP
+MA0GA1UECgwGT3JhY2xlMQ4wDAYDVQQLDAVNeVNRTDELMAkGA1UEAwwCQ0EwHhcN
+MTgwNDExMTAyMzM0WhcNMjgwMjE4MTAyMzM0WjBjMQswCQYDVQQGEwJJTjESMBAG
+A1UECAwJS2FybmF0YWthMRIwEAYDVQQHDAlCYW5nYWxvcmUxDzANBgNVBAoMBk9y
+YWNsZTEOMAwGA1UECwwFTXlTUUwxCzAJBgNVBAMMAkNBMIIBIjANBgkqhkiG9w0B
+AQEFAAOCAQ8AMIIBCgKCAQEAzmDykfk/Wd1aGE3IjAZkgd/dAP8rWF3Lnw7F9Ufo
+pTJaPRW50F1ZjqKSf83jLHYseZrvoVB9SsKQx35cLOnYUO6qKfHdHlrJ3it6chk+
+1+xsPhygXWA6qKXn7QEJTL3xQybGvO6b2hyOOmkYCNOpV5W8kfLTpUR2RbeISu7f
+9pw7EJo0uJQdhs2pzzKDVKLh7Pn7cGZGD6ByjzyOSArvpXDieErp1XOJs9qZ3llt
+2xFncpZGyCrIYADUkbqZtoITj9DemdHHoEYJon55U/u2XDFS1hELeFRYI6p6dZtk
+mGX8+FOjv7fg0sdqPPZgC84abxnfHloKrpv3BlBuHCGyewIDAQABo1AwTjAdBgNV
+HQ4EFgQU7Q3134XYDQ00T4qITT5rvnXK0gAwHwYDVR0jBBgwFoAU7Q3134XYDQ00
+T4qITT5rvnXK0gAwDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQsFAAOCAQEAk2mi
+j0DKq5V8ac8MPk5giCnAfVtAcFHRgYl2bBHU7k/Onu4I4dIZTGV7LfMekM/NjgZ3
+c70/fZGD0aHPaDVV7OQu1+jZelJ/8YuXrOgFyJYnGPsksBhBXLgETmai2OW1xayv
+4D0RALZYye5HqbL2IaPdJhyuo/gF6hzuMGt1k8sDfvb014zbX2mwe10ns50+BCT0
+5V3NXHdMrVS5Z8uUzntu7G0jJxq3P6Mkb5dnOLirZP+8SAlC/mLaz+pEA5tLQldN
+Dx4AhaSr4PCUPy0QBh1Uo1NahCEcdrrQ46DIQES1kxjOTAa1KItmYkkcod8TCB37
+H6uaikrzrywKXoba+Q==
+-----END CERTIFICATE-----
diff --git a/mysql-wsrep-5.6/mysql-test/std_data/client-cert-verify-san.pem b/mysql-wsrep-5.6/mysql-test/std_data/client-cert-verify-san.pem
new file mode 100644 (file)
index 0000000..d8e0d55
--- /dev/null
@@ -0,0 +1,20 @@
+-----BEGIN CERTIFICATE-----
+MIIDPjCCAiYCAQEwDQYJKoZIhvcNAQELBQAwYzELMAkGA1UEBhMCSU4xEjAQBgNV
+BAgMCUthcm5hdGFrYTESMBAGA1UEBwwJQmFuZ2Fsb3JlMQ8wDQYDVQQKDAZPcmFj
+bGUxDjAMBgNVBAsMBU15U1FMMQswCQYDVQQDDAJDQTAeFw0xODA0MTExMDI3MDha
+Fw0yODAyMTgxMDI3MDhaMGcxCzAJBgNVBAYTAklOMRIwEAYDVQQIDAlLYXJuYXRh
+a2ExEjAQBgNVBAcMCUJhbmdhbG9yZTEPMA0GA1UECgwGT3JhY2xlMQ4wDAYDVQQL
+DAVNeVNRTDEPMA0GA1UEAwwGQ2xpZW50MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A
+MIIBCgKCAQEAv+FDomsx3sLX/yFM+g94YvbiO50jqf7fOC1gnzT2dsgcMxCtjlm+
+RdKpJDHaSfQ8hc76dp8hWwsahNtY2fSHvv61l6dO5NRZTn26eLpM1pDbVWz17wp0
+1zYICWtIEMrA7mxGPH+Lwy8YiSWa9/pmv0gk9BB1d6o5mBo/c0jA/n1iYujPiRHy
+6QTjZuWqZZwYK4pXF9jGuw0xwFMVjN+6/BMkoz/Pa46PpcQ/t2sblZympqN2n86Q
+cSlDlPu/sx0Y2PxHL0lkzxw1HDycLAX5cM7vg1AOpeq/3y55pmGPIZh3kOBcQVvF
+GjkMs2I3O8N3ztwb0iE/iLk0mcWHKVCFyQIDAQABMA0GCSqGSIb3DQEBCwUAA4IB
+AQA64dUgzwuBeugtTGD22YYsnZD6h1bZXxFdkUU06GJ9kqojJmUS5KEsY+42mmDG
+JRDovhGNr6wazwDNUUhnDqLtGTarb+E3G/0X+J38CcGgicMML0Atof5/yk6SSHa5
+K27QMfX4VtCwefB7H/g/0/cDpoaEaeZ1pCdkyEk1fsX3dQEx7RS+fPcNmH233Xxu
+No604ChGlV3Ik0VXZVjss1lwDt7D6o90O4GpIY9ngnUWMAy2JZYqMZo1Od5WBs8L
+QBT8TYePJy/jcQVf+cB1DnJIDil7Pqa+owkM+DEVLsXjVdXgT9TcTC6uxteEKKY9
+PPBRX1wsgtb2b/I4ZehqH81g
+-----END CERTIFICATE-----
diff --git a/mysql-wsrep-5.6/mysql-test/std_data/client-key-verify-san.pem b/mysql-wsrep-5.6/mysql-test/std_data/client-key-verify-san.pem
new file mode 100644 (file)
index 0000000..fdffdab
--- /dev/null
@@ -0,0 +1,27 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIIEowIBAAKCAQEAv+FDomsx3sLX/yFM+g94YvbiO50jqf7fOC1gnzT2dsgcMxCt
+jlm+RdKpJDHaSfQ8hc76dp8hWwsahNtY2fSHvv61l6dO5NRZTn26eLpM1pDbVWz1
+7wp01zYICWtIEMrA7mxGPH+Lwy8YiSWa9/pmv0gk9BB1d6o5mBo/c0jA/n1iYujP
+iRHy6QTjZuWqZZwYK4pXF9jGuw0xwFMVjN+6/BMkoz/Pa46PpcQ/t2sblZympqN2
+n86QcSlDlPu/sx0Y2PxHL0lkzxw1HDycLAX5cM7vg1AOpeq/3y55pmGPIZh3kOBc
+QVvFGjkMs2I3O8N3ztwb0iE/iLk0mcWHKVCFyQIDAQABAoIBAD116jQcId04i/cs
+s3tleSo56j0uGD5bZSSZZFmanVduwZmZvf3awRecYpE1ZrZJhRlXMuLMFeMTq2ri
+15L4wIJtE71/2cVyPyjlHNWO1w3jWF4EiMIIl2RX6jsaIfs+9o1oIRc/w4TBkRpc
+8UZ87mxWr399xiKOY+RUg/5pT2g0Mxj/ZstseJy9Z69jnV2Oa/2nXhiCBxn8b89m
+lunkePcBvqjoLtZPXr0S/zQlsaUAdR0KKl+5TRD/V8rjKtW7P7VCStpdEaqa8fic
+b2uCW24jsGvmwmbtrTINYQ959M6m3/Dwxl4t8QpR9rUc+WC4I0F/KvXLgINuGCxd
+0DhnSAECgYEA6pXytFGOONQF7NbqxsFWoHW+lBaGWvIJoAGwvNbqmu+rbI7wqx1z
+biWPAn6vc2nFvNnOk+jhMH/guxXlmjE9ZlmnucV2KoaPGy4uGo6NC+kOKhuSjvGG
+GCPeMK5EFUzy9fMZcIBgVsq7Jm1kdN48+CecPRQ4Tf4rpwBDO1xYOHMCgYEA0WVS
+NNdHlIGbAbk1RTA5pNTHhVkgFZcFAsViqOZnborooCUBlX6EoVlbh0fkj9h/Lh+S
+dCeptOPdG+JFGeL4aVIJn8uuAf6kKty10rBgpeoa71yH3Gpw5cil59Y5hW7Yc0bw
+ZIwNMk6st1ua2c7fbP/OKD4GuGIt/zppXLNRRdMCgYBzrFTtTXnP09zIGIHUV+mb
+XfQHmcPOfKL6X1sDAwbUN3JUKXfLKM6Odb67ADULuBBlOxF+JctE2wm5tuZszfL0
+0Si/lfrapVdTk8XwGnK6eMUfRlFSYw44QReC8atoxXTYinL04pies4DtRevPJPbz
+drS3+Yx6COcFhj+gubxWuQKBgQCRc+RKuFAMpIrcA58xVHJ2QSfnRSW4WZMtfZcu
+4/1tGCjHNW2IPr46piuiKRpnoWeWzm+ZKAQGl1H8EI0XkkYkQsxUp9NTp2K6M15J
+4CMCnT/gjVIClh2eQGaeSHzkZz8LtHdAINj53RS0uXkzWzRwLrEx2wQoCGsTI6wU
+rKsD6QKBgBktQAc7Q+1RC94tLjteK3KYE9POvd9Q0OrCrORgiyybYnk4zfXvbafa
+cPFYZwmhsN8L3KyOm5S0SsWP+vPbm6qmoryuz/MtDwCJozgtoz7fNGxcWbILF/1S
+UQDuGs1mG14od7IKu/RqLpUK5vYTOObm+9TH4zsO7qDBaG1HNMY+
+-----END RSA PRIVATE KEY-----
diff --git a/mysql-wsrep-5.6/mysql-test/std_data/server-cert-verify-san.pem b/mysql-wsrep-5.6/mysql-test/std_data/server-cert-verify-san.pem
new file mode 100644 (file)
index 0000000..fb65b76
--- /dev/null
@@ -0,0 +1,23 @@
+-----BEGIN CERTIFICATE-----
+MIID5zCCAs+gAwIBAgIBATANBgkqhkiG9w0BAQsFADBjMQswCQYDVQQGEwJJTjES
+MBAGA1UECAwJS2FybmF0YWthMRIwEAYDVQQHDAlCYW5nYWxvcmUxDzANBgNVBAoM
+Bk9yYWNsZTEOMAwGA1UECwwFTXlTUUwxCzAJBgNVBAMMAkNBMB4XDTE4MDQxMTEw
+MjUyNFoXDTI4MDIxODEwMjUyNFowcDELMAkGA1UEBhMCSU4xEjAQBgNVBAgMCUth
+cm5hdGFrYTESMBAGA1UEBwwJQmFuZ2Fsb3JlMQ8wDQYDVQQKDAZPcmFjbGUxDjAM
+BgNVBAsMBU15U1FMMRgwFgYDVQQDDA9ub25leGlzdGVudC5jb20wggEiMA0GCSqG
+SIb3DQEBAQUAA4IBDwAwggEKAoIBAQC/sSYMr3chNWCyoHGc5EZmhINxGrWwnyQW
+5+kcOWgwpGgTNy3Ruvt2k26iMrBRFtFq6pR8SHzrJAAGhECY12+rWRh8uD6sQS4l
+P5+F5l8bXgtoMvqpX4Bkgxj880dqBJurOpXl1VVql69uWfBsxOHSRkeMZOJNIMTY
+VKljEjGaDcGAFXTJoKxe+Df63XPgwYyhH7OpUZdTkCfedU1M+C3Sw5782luW5L+E
+JiwulblHBGnTDN/6G9aXS4+l0gs3z4h2aElKmVjy0tKaXTv81zkYnClUhVFEnvzN
+G//gGsZm9Sn+Cv/V+BGEnS2gsK7FziCPJbitS03/rhS9xYcEDZcNAgMBAAGjgZgw
+gZUwCQYDVR0TBAIwADAsBglghkgBhvhCAQ0EHxYdT3BlblNTTCBHZW5lcmF0ZWQg
+Q2VydGlmaWNhdGUwHQYDVR0OBBYEFI3O1OuzzKnpmZkAKgYEz2q9uRFDMB8GA1Ud
+IwQYMBaAFO0N9d+F2A0NNE+KiE0+a751ytIAMBoGA1UdEQQTMBGCCWxvY2FsaG9z
+dIcEfwAAATANBgkqhkiG9w0BAQsFAAOCAQEAZCgA6kj6hvo+X3TUa7kZx90KHlsH
+kxSHEiEw1wjxZVwW9GzSzX/qLnK4EZjH9V5BC2k1nbBGmUJE8i5VSzIG6unRhncX
+H1+bcEvlKIESWGQ1Hk+vFW8jEhoLGsuF62TTcE5urnvWix8k/VgLZ8GbkihSVPiM
+98syw007eHUfauBj2QTYxnZuZFlW8p5BIWclDbSMQ8iuKQqLPzmipmWEVaxgI5XI
+o/k5704aW6An7LsgPNKunXT7Ykbz4HvmH4/OVIYJSWTtuVYy3tYLyKwAFtGaCe9U
+wMe/YuA2/74ir2CxbiYtVAuDa9o4Hq8oCbTfE9gQReEmHPWsw4tcwuPVZA==
+-----END CERTIFICATE-----
diff --git a/mysql-wsrep-5.6/mysql-test/std_data/server-key-verify-san.pem b/mysql-wsrep-5.6/mysql-test/std_data/server-key-verify-san.pem
new file mode 100644 (file)
index 0000000..7143d8a
--- /dev/null
@@ -0,0 +1,27 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIIEpQIBAAKCAQEAv7EmDK93ITVgsqBxnORGZoSDcRq1sJ8kFufpHDloMKRoEzct
+0br7dpNuojKwURbRauqUfEh86yQABoRAmNdvq1kYfLg+rEEuJT+fheZfG14LaDL6
+qV+AZIMY/PNHagSbqzqV5dVVapevblnwbMTh0kZHjGTiTSDE2FSpYxIxmg3BgBV0
+yaCsXvg3+t1z4MGMoR+zqVGXU5An3nVNTPgt0sOe/NpbluS/hCYsLpW5RwRp0wzf
++hvWl0uPpdILN8+IdmhJSplY8tLSml07/Nc5GJwpVIVRRJ78zRv/4BrGZvUp/gr/
+1fgRhJ0toLCuxc4gjyW4rUtN/64UvcWHBA2XDQIDAQABAoIBAQCivOwGnPhQMxay
+z09k2M+DvUAxx3E0Twa+g4f9tCbmFM1ectvtUAan9iZYgRv625pSYHBKyudyYQ+8
+eI62sz9UgsEtMOXUK0nXyZnOfXOEsmSQw6bWIAPKURnntUmNkffueEBF7MUlRz1i
+O+zHCqaEc7HOWN9eh1FWLxnWx91gYJEHXPkv8lITgsMO2eMqS7EMjmRNt0zpy+4M
+gGQpZvO+wyXQqjnxqSi+lwlLF18dXHZtCzatRgjUY7armU9AMSD21Hl1p9LBcP1A
+1wllqwz8xTf9iTZjlThdymZTDhlpDfNC8yBMA/vUaUc9IDSWzPpRUqUg4ViIArxA
+pfqJ3DiBAoGBAOK++/X2b5IVRc8ZD+s5FlAvGBIqBiT2qV/klBmuO5/XiTD9jd7C
+W9D1leubksn2yPtVSgrM/YXZuLOkazGCZlfFdvNoOPH2MQu4FME4AoYnHGysORtS
+uC+MuCQlKxXwCyMtTawY3U0rvCV5BgyAHuUtnsTb2ts/igbONxhSAql9AoGBANhs
+ZFqcCQRlcoPkiBfE2tMPHcubTvfkn3treK2pmXFAwc19p+2yjgTWQDFAdEUafg67
+40NYLp8YthAMQrfWTF9R1HKv4J3dIiyLAbsZZfkvh/EiiT2y53SStfFUpB4WM1Jj
+3WaWyz20tEE+kt/utxOPoGBcqMmmt9fGCyV0a5jRAoGAb6UUEMa3ptk8lz1C3lIs
+j2yw0HjKr7aYLTQyS/bDOu/4iBvAmBdg+CGEIQ9oFnOiAEa9f1Xx2s8aJ7HkaetI
+Ex2SdUUzDMho29lWttCqRX3KfCPMtoxjTl5eaMW4UkPwZ/CtlvhjNtU6/cR6WvtW
+uwdcbpfGSkAd6T3uWNZAo00CgYEAyTFy1Z0q8NBSdfR05AvYFc9+tnJKJj9+V2Eg
+jekVwWgfAqZm/503U53NjTvLGxa2y4G1kzyeEr8JOb/8IiTxWMecxYVlPbx+cYRE
+dqf02YNrUCr4BMiVTRS6WYCDFYkz6sr13tIeXN3pmKHQLqcfwOqLgCmDq/r1+3yb
+jhU9lZECgYEAr/rWaeKuJlE5U64kxZO+TcseDSSeUt+f8mLYf/KLBoh5xcGq1qPv
+4d9ljOLciJJZo1XBW9LZa5ryrIQ18wdZcj6B38GyjW4vgz5SZ+/H+KjuIdxbKNGa
+93Jar7+ZhdkdV2KBN6ucYNJJJ7R+H39Av6Vv91OBGs3jss8+rfMvlv8=
+-----END RSA PRIVATE KEY-----
diff --git a/mysql-wsrep-5.6/mysql-test/suite/binlog/r/binlog_cache_write_failure.result b/mysql-wsrep-5.6/mysql-test/suite/binlog/r/binlog_cache_write_failure.result
new file mode 100644 (file)
index 0000000..0aafa2f
--- /dev/null
@@ -0,0 +1,64 @@
+call mtr.add_suppression("An error occurred during flush stage of the commit");
+call mtr.add_suppression("Attempting backtrace. You can use the following information to find out*");
+RESET MASTER;
+CREATE TABLE t1(i INT);
+
+# Case 1 (binlog_error_action = ABORT_SERVER)
+
+SET GLOBAL binlog_error_action = ABORT_SERVER;
+
+# Case 1.1  CLIENT DISCONNECTION
+BEGIN;
+INSERT INTO t1 VALUES (1);
+SET SESSION debug= "+d,simulate_tmpdir_partition_full";
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+ERROR HY000: Error writing file <tmp_file_name> (Errcode: ##)
+SET SESSION debug= "-d,simulate_tmpdir_partition_full";
+
+# Case 1.2 ROLLBACK
+BEGIN;
+INSERT INTO t1 VALUES (1);
+SET SESSION debug= "+d,simulate_tmpdir_partition_full";
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+ERROR HY000: Error writing file <tmp_file_name> (Errcode: ##)
+ROLLBACK;
+SET SESSION debug= "-d,simulate_tmpdir_partition_full";
+
+# Case 1.3 COMMIT
+BEGIN;
+INSERT INTO t1 VALUES (1);
+SET SESSION debug= "+d,simulate_tmpdir_partition_full";
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+ERROR HY000: Error writing file <tmp_file_name> (Errcode: ##)
+COMMIT;
+ERROR HY000: Binary logging not possible. Message: An error occurred during flush stage of the commit. 'binlog_error_action' is set to 'ABORT_SERVER'. Hence aborting the server.
+include/assert_grep.inc [An error occurred during flush stage of the commit. 'binlog_error_action' is set to 'ABORT_SERVER'.]
+include/assert.inc [Count of elements in t1 should be 0.]
+include/assert.inc [Query is not binlogged as expected.]
+TRUNCATE TABLE t1;
+
+# Case 2 (binlog_error_action = IGNORE_ERROR)
+
+RESET MASTER;
+SET GLOBAL binlog_error_action= IGNORE_ERROR;
+BEGIN;
+INSERT INTO t1 VALUES (1);
+SET SESSION debug= "+d,simulate_tmpdir_partition_full";
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+ERROR HY000: Error writing file <tmp_file_name> (Errcode: ##)
+COMMIT;
+Warnings:
+Error  3       Error writing file MYSQLTEST_VARDIR/tmp/temp_file (Errcode: ##)
+Error  1026    Error writing file MYSQLTEST_VARDIR/tmp/temp_file (Errcode: ##)
+SET SESSION debug= "-d,simulate_tmpdir_partition_full";
+include/assert.inc [Count of elements in t1 should be 2.]
+SHOW BINARY LOGS;
+ERROR HY000: You are not using binary logging
+include/assert_grep.inc [An error occurred during flush stage of the commit. 'binlog_error_action' is set to 'IGNORE_ERROR'.]
+include/assert.inc [Count of elements in t1 should be 2.]
+DROP TABLE t1;
+RESET MASTER;
diff --git a/mysql-wsrep-5.6/mysql-test/suite/binlog/t/binlog_cache_write_failure-master.opt b/mysql-wsrep-5.6/mysql-test/suite/binlog/t/binlog_cache_write_failure-master.opt
new file mode 100644 (file)
index 0000000..f546e12
--- /dev/null
@@ -0,0 +1 @@
+--default-storage-engine=InnoDB --gtid-mode=on --enforce-gtid-consistency=on --log-slave-updates
diff --git a/mysql-wsrep-5.6/mysql-test/suite/binlog/t/binlog_cache_write_failure.test b/mysql-wsrep-5.6/mysql-test/suite/binlog/t/binlog_cache_write_failure.test
new file mode 100644 (file)
index 0000000..1f79388
--- /dev/null
@@ -0,0 +1,157 @@
+# === Purpose ===
+#
+# Verify that disk full/out of space errors generated during the flush
+# stage of binlog commit are properly handled by the server.
+#
+# === Implementation ===
+#
+# 1) Simulate the disk full scenario using dbug simulations so that
+#    every alternate statement fails with 'No Space Error'.
+# 2) With binlog_error_action= ABORT_SERVER, prepare a transaction
+#    and perform the following operations.
+#    2.1) Disconnect
+#    2.2) Rollback
+#    2.3) Commit
+# 3) Repeat step 2 with binlog_error_action= IGNORE_ERROR.
+#
+# === References ===
+#
+# Bug #27399620 BINLOG AND ENGINE BECOME INCONSISTENT WHEN BINLOG CACHE FILE
+# GETS OUT OF SPACE
+
+--source include/have_gtid.inc
+--source include/have_binlog_format_row.inc
+--source include/have_log_bin.inc
+--source include/have_debug.inc
+# Don't test this under valgrind, memory leaks will occur
+--source include/not_valgrind.inc
+# Avoid CrashReporter popup on Mac
+--source include/not_crashrep.inc
+
+call mtr.add_suppression("An error occurred during flush stage of the commit");
+call mtr.add_suppression("Attempting backtrace. You can use the following information to find out*");
+
+RESET MASTER;
+CREATE TABLE t1(i INT);
+
+--echo
+--echo # Case 1 (binlog_error_action = ABORT_SERVER)
+--echo
+--let $log_pos_before = query_get_value("SHOW BINARY LOGS", File_size, 1)
+SET GLOBAL binlog_error_action = ABORT_SERVER;
+--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+
+--echo
+--echo # Case 1.1  CLIENT DISCONNECTION
+connect(con1,localhost,root,,);
+--connection con1
+BEGIN;
+INSERT INTO t1 VALUES (1);
+SET SESSION debug= "+d,simulate_tmpdir_partition_full";
+INSERT INTO t1 VALUES (2);
+--replace_regex /.*Error writing file.*/Error writing file <tmp_file_name> (Errcode: ##)/
+--error ER_ERROR_ON_WRITE,
+INSERT INTO t1 VALUES (3);
+SET SESSION debug= "-d,simulate_tmpdir_partition_full";
+--disconnect con1
+
+--echo
+--echo # Case 1.2 ROLLBACK
+--connection default
+BEGIN;
+INSERT INTO t1 VALUES (1);
+SET SESSION debug= "+d,simulate_tmpdir_partition_full";
+INSERT INTO t1 VALUES (2);
+--replace_regex /.*Error writing file.*/Error writing file <tmp_file_name> (Errcode: ##)/
+--error ER_ERROR_ON_WRITE,
+INSERT INTO t1 VALUES (3);
+ROLLBACK;
+SET SESSION debug= "-d,simulate_tmpdir_partition_full";
+
+--echo
+--echo # Case 1.3 COMMIT
+BEGIN;
+INSERT INTO t1 VALUES (1);
+SET SESSION debug= "+d,simulate_tmpdir_partition_full";
+INSERT INTO t1 VALUES (2);
+--replace_regex /.*Error writing file.*/Error writing file <tmp_file_name> (Errcode: ##)/
+--error ER_ERROR_ON_WRITE,
+INSERT INTO t1 VALUES (3);
+
+# Check that flush error causing server to abort and client gets
+# ER_BINLOG_LOGGING_IMPOSSIBLE when binlog_error_action= 'ABORT_SERVER'.
+--replace_result $MYSQLTEST_VARDIR/ MYSQLTEST_VARDIR/
+--error ER_BINLOG_LOGGING_IMPOSSIBLE
+COMMIT;
+
+--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+--enable_reconnect
+--source include/wait_until_connected_again.inc
+
+# Check that error is present in error log
+--let $assert_file= $MYSQLTEST_VARDIR/log/mysqld.1.err
+--let $assert_only_after = CURRENT_TEST: binlog.binlog_cache_write_failure
+--let $assert_count = 1
+--let $assert_select = An error occurred during flush stage of the commit. 'binlog_error_action' is set to 'ABORT_SERVER'.
+--let $assert_text = An error occurred during flush stage of the commit. 'binlog_error_action' is set to 'ABORT_SERVER'.
+--source include/assert_grep.inc
+
+# Check that transaction is not committed
+--let $assert_cond= COUNT(*) = 0 FROM t1;
+--let $assert_text= Count of elements in t1 should be 0.
+--source include/assert.inc
+
+# Check that transaction is not binlogged as well
+--let $log_pos_after = query_get_value("SHOW BINARY LOGS", File_size, 1)
+--let $assert_cond = $log_pos_before = $log_pos_after
+--let $assert_text = Query is not binlogged as expected.
+--source include/assert.inc
+TRUNCATE TABLE t1;
+
+--echo
+--echo # Case 2 (binlog_error_action = IGNORE_ERROR)
+--echo
+RESET MASTER;
+SET GLOBAL binlog_error_action= IGNORE_ERROR;
+
+BEGIN;
+INSERT INTO t1 VALUES (1);
+SET SESSION debug= "+d,simulate_tmpdir_partition_full";
+INSERT INTO t1 VALUES (2);
+--replace_regex /.*Error writing file.*/Error writing file <tmp_file_name> (Errcode: ##)/
+--error ER_ERROR_ON_WRITE,
+INSERT INTO t1 VALUES (3);
+--replace_regex /.*Error writing file.*/Error writing file MYSQLTEST_VARDIR\/tmp\/temp_file (Errcode: ##)/
+COMMIT;
+SET SESSION debug= "-d,simulate_tmpdir_partition_full";
+
+# Check that transaction is committed
+--let $assert_cond = COUNT(*) = 2 FROM t1;
+--let $assert_text = Count of elements in t1 should be 2.
+--source include/assert.inc
+
+# Test to prove that binary log is disabled
+--error ER_NO_BINARY_LOGGING
+SHOW BINARY LOGS;
+
+# Check that error is present in error log
+--let $assert_file= $MYSQLTEST_VARDIR/log/mysqld.1.err
+--let $assert_only_after = CURRENT_TEST: binlog.binlog_cache_write_failure
+--let $assert_count = 1
+--let $assert_select = An error occurred during flush stage of the commit. 'binlog_error_action' is set to 'IGNORE_ERROR'.
+--let $assert_text = An error occurred during flush stage of the commit. 'binlog_error_action' is set to 'IGNORE_ERROR'.
+--source include/assert_grep.inc
+
+# Restart so that binary log is enabled again and we can do the below test
+--source include/restart_mysqld.inc
+
+# Check that transaction is committed (binlog position check cannot be done
+# as we would have written STOP_EVENT in the binlog while closing
+# it)
+--let $assert_cond = COUNT(*) = 2 FROM t1;
+--let $assert_text = Count of elements in t1 should be 2.
+--source include/assert.inc
+
+# Cleanup
+DROP TABLE t1;
+RESET MASTER;
index b74382895d2ceae497f3e9fa70a5d609835b1e3a..5b37012367248857e06c0d0c599aea1cc4535e65 100644 (file)
@@ -9,5 +9,8 @@
 #  Do not use any TAB characters for whitespace.
 #
 ##############################################################################
-
-binlog_index : codership/mysql-wsrep##71 Regression: Duplicate "file was not purged because it is the active log file" warning
+# Codership disabled tests begin here
+# Tests that have disabler=CODERSHIP will be forcefully run with "./mtr --enable-disabled" by Jenkins
+binlog_drop_if_exists : Issue#330 2018-05-16 CODERSHIP https://github.com/codership/mysql-wsrep/issues/330
+binlog_index : codership/mysql-wsrep##71 0000-00-00 CODERSHIP Regression: Duplicate "file was not purged because it is the active log file" warning
+# Codership disabled tests end here
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
deleted file mode 100644 (file)
index f68fe52..0000000
+++ /dev/null
@@ -1,83 +0,0 @@
-
-#
-# 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 = 15
-
-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 = 15
-
-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
deleted file mode 100644 (file)
index d549028..0000000
+++ /dev/null
@@ -1,87 +0,0 @@
-#
-# 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 = 15
-
-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 = 15
-
-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
index 516904d1b2aa6618ab5833174118d3c07e7e6311..9bba3ab353582d1fbf81ffd42381a092d79b0324 100644 (file)
@@ -153,3 +153,75 @@ f1 p_id    f2
 1      1       1
 DROP TABLE c;
 DROP TABLE p;
+SET GLOBAL wsrep_certification_rules='strict';
+SET GLOBAL wsrep_certification_rules='strict';
+CREATE TABLE p (f1 INTEGER PRIMARY KEY) ENGINE=INNODB;
+CREATE TABLE c (
+f1 INTEGER PRIMARY KEY,
+p_id INTEGER,
+CONSTRAINT fk_1 FOREIGN KEY (p_id) REFERENCES p (f1)
+);
+INSERT INTO p VALUES (1);
+SET AUTOCOMMIT=ON;
+START TRANSACTION;
+INSERT INTO c (f1, p_id) VALUES (10, 1);
+SET SESSION wsrep_sync_wait = 0;
+SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
+INSERT INTO c (f1, p_id) VALUES (20, 1);
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_enter_sync';
+COMMIT;
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
+SET GLOBAL wsrep_provider_options = 'signal=local_monitor_enter_sync';
+SET GLOBAL wsrep_provider_options = 'dbug=';
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+SELECT * FROM p;
+f1
+1
+SELECT * FROM c;
+f1     p_id
+20     1
+SET GLOBAL wsrep_certification_rules=default;
+SET GLOBAL wsrep_certification_rules=default;
+DROP TABLE c;
+DROP TABLE p;
+SET GLOBAL wsrep_certification_rules='optimized';
+SET GLOBAL wsrep_certification_rules='optimized';
+CREATE TABLE p (f1 INTEGER PRIMARY KEY) ENGINE=INNODB;
+CREATE TABLE c (
+f1 INTEGER PRIMARY KEY,
+p_id INTEGER,
+CONSTRAINT fk_1 FOREIGN KEY (p_id) REFERENCES p (f1)
+);
+INSERT INTO p VALUES (1);
+SET AUTOCOMMIT=ON;
+START TRANSACTION;
+INSERT INTO c (f1, p_id) VALUES (10, 1);
+SET SESSION wsrep_sync_wait = 0;
+SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
+INSERT INTO c (f1, p_id) VALUES (20, 1);
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_enter_sync';
+COMMIT;
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
+SET GLOBAL wsrep_provider_options = 'signal=local_monitor_enter_sync';
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SELECT * FROM p;
+f1
+1
+SELECT * FROM c;
+f1     p_id
+10     1
+20     1
+SET GLOBAL wsrep_certification_rules=default;
+SET GLOBAL wsrep_certification_rules=default;
+DROP TABLE c;
+DROP TABLE p;
diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/r/galera#500.result b/mysql-wsrep-5.6/mysql-test/suite/galera/r/galera#500.result
new file mode 100644 (file)
index 0000000..6a07d03
--- /dev/null
@@ -0,0 +1,10 @@
+SET SESSION wsrep_sync_wait = 0;
+SET GLOBAL wsrep_provider_options="gmcast.isolate=2";
+SET SESSION wsrep_sync_wait = 0;
+SHOW STATUS LIKE 'wsrep_cluster_status';
+Variable_name  Value
+wsrep_cluster_status   non-Primary
+SET SESSION wsrep_sync_wait = default;
+SET GLOBAL wsrep_provider_options="pc.bootstrap=1";
+SET SESSION wsrep_on=0;
+CALL mtr.add_suppression("WSREP: exception from gcomm, backend must be restarted: Gcomm backend termination was requested by setting gmcast.isolate=2.");
diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/r/galera#505.result b/mysql-wsrep-5.6/mysql-test/suite/galera/r/galera#505.result
new file mode 100644 (file)
index 0000000..9ae09ca
--- /dev/null
@@ -0,0 +1,5 @@
+SET GLOBAL wsrep_provider_options = 'pc.weight=3';
+SHOW GLOBAL VARIABLES LIKE 'wsrep_provider_options';
+Variable_name  Value
+wsrep_provider_options pc.weight = 3
+SET GLOBAL wsrep_provider_options = 'pc.weight=1';
index ce9cd65df9fabbef7df716926425e899c451350d..8c3228cb6ab18b59561faec87767f4cb7725de54 100644 (file)
@@ -15,6 +15,7 @@ ORDER BY VARIABLE_NAME;
 VARIABLE_NAME  VARIABLE_VALUE
 WSREP_AUTO_INCREMENT_CONTROL   ON
 WSREP_CAUSAL_READS     ON
+WSREP_CERTIFICATION_RULES      strict
 WSREP_CERTIFY_NONPK    ON
 WSREP_CLUSTER_ADDRESS  gcomm://
 WSREP_CLUSTER_NAME     my_wsrep_cluster
@@ -52,7 +53,7 @@ SELECT COUNT(*) FROM INFORMATION_SCHEMA.GLOBAL_STATUS
 WHERE VARIABLE_NAME LIKE 'wsrep_%'
 AND VARIABLE_NAME != 'wsrep_debug_sync_waiters';
 COUNT(*)
-57
+60
 SELECT VARIABLE_NAME FROM INFORMATION_SCHEMA.GLOBAL_STATUS
 WHERE VARIABLE_NAME LIKE 'wsrep_%'
 AND VARIABLE_NAME != 'wsrep_debug_sync_waiters'
@@ -69,6 +70,7 @@ WSREP_CLUSTER_CONF_ID
 WSREP_CLUSTER_SIZE
 WSREP_CLUSTER_STATE_UUID
 WSREP_CLUSTER_STATUS
+WSREP_CLUSTER_WEIGHT
 WSREP_COMMIT_OOOE
 WSREP_COMMIT_OOOL
 WSREP_COMMIT_WINDOW
@@ -102,6 +104,8 @@ WSREP_LOCAL_SEND_QUEUE_MIN
 WSREP_LOCAL_STATE
 WSREP_LOCAL_STATE_COMMENT
 WSREP_LOCAL_STATE_UUID
+WSREP_OPEN_CONNECTIONS
+WSREP_OPEN_TRANSACTIONS
 WSREP_PROTOCOL_VERSION
 WSREP_PROVIDER_NAME
 WSREP_PROVIDER_VENDOR
index b0ae2b7fc9266d5ab8828fe00013558a18874b05..92b40414f91f3752255dcca580307d3be7259bf0 100644 (file)
@@ -22,6 +22,7 @@ t1    CREATE TABLE `t1` (
   PRIMARY KEY (`id`)
 ) ENGINE=InnoDB DEFAULT CHARSET=latin1
 UNLOCK TABLES;
+SET SESSION wsrep_sync_wait = DEFAULT;
 SHOW CREATE TABLE t1;
 Table  Create Table
 t1     CREATE TABLE `t1` (
diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/r/mysql-wsrep#332.result b/mysql-wsrep-5.6/mysql-test/suite/galera/r/mysql-wsrep#332.result
new file mode 100644 (file)
index 0000000..8667f5e
--- /dev/null
@@ -0,0 +1,111 @@
+CREATE TABLE p (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB;
+CREATE TABLE c (f1 INTEGER PRIMARY KEY, p_id INTEGER) ENGINE=INNODB;
+INSERT INTO p VALUES (1, 0);
+INSERT INTO p VALUES (2, 0);
+INSERT INTO c VALUES (1, 1);
+INSERT INTO c VALUES (2, 2);
+SET AUTOCOMMIT=ON;
+START TRANSACTION;
+UPDATE p SET f1 = f1 + 100;
+SET SESSION wsrep_sync_wait = 0;
+SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
+ALTER TABLE c ADD FOREIGN KEY (p_id) REFERENCES p(f1);
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_enter_sync';
+COMMIT;
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
+SET GLOBAL wsrep_provider_options = 'signal=local_monitor_enter_sync';
+SET GLOBAL wsrep_provider_options = 'dbug=';
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+SELECT * FROM p;
+f1     f2
+1      0
+2      0
+SELECT * FROM c;
+f1     p_id
+1      1
+2      2
+DROP TABLE c;
+DROP TABLE p;
+CREATE TABLE p1 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB;
+CREATE TABLE p2 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB;
+CREATE TABLE c (f1 INTEGER PRIMARY KEY, p_id1 INTEGER, p_id2 INTEGER) ENGINE=INNODB;
+INSERT INTO p1 VALUES (1, 0), (2, 0);
+INSERT INTO p2 VALUES (1, 0), (2, 0);
+INSERT INTO c VALUES (1, 1, 1);
+INSERT INTO c VALUES (2, 2, 2);
+SET AUTOCOMMIT=ON;
+START TRANSACTION;
+UPDATE p1 SET f1 = f1 + 100;
+SET SESSION wsrep_sync_wait = 0;
+SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
+ALTER TABLE c ADD FOREIGN KEY (p_id1) REFERENCES p1(f1), ADD FOREIGN KEY (p_id2) REFERENCES p2(f1);
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_enter_sync';
+COMMIT;
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
+SET GLOBAL wsrep_provider_options = 'signal=local_monitor_enter_sync';
+SET GLOBAL wsrep_provider_options = 'dbug=';
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+SELECT * FROM p1;
+f1     f2
+1      0
+2      0
+SELECT * FROM p2;
+f1     f2
+1      0
+2      0
+SELECT * FROM c;
+f1     p_id1   p_id2
+1      1       1
+2      2       2
+DROP TABLE c;
+DROP TABLE p1;
+DROP TABLE p2;
+CREATE TABLE p1 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB;
+CREATE TABLE p2 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB;
+CREATE TABLE c (f1 INTEGER PRIMARY KEY, p_id1 INTEGER, p_id2 INTEGER) ENGINE=INNODB;
+INSERT INTO p1 VALUES (1, 0), (2, 0);
+INSERT INTO p2 VALUES (1, 0), (2, 0);
+INSERT INTO c VALUES (1, 1, 1);
+INSERT INTO c VALUES (2, 2, 2);
+SET AUTOCOMMIT=ON;
+START TRANSACTION;
+UPDATE p2 SET f1 = f1 + 100;
+SET SESSION wsrep_sync_wait = 0;
+SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
+ALTER TABLE c ADD FOREIGN KEY (p_id1) REFERENCES p1(f1), ADD FOREIGN KEY (p_id2) REFERENCES p2(f1);
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_enter_sync';
+COMMIT;
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
+SET GLOBAL wsrep_provider_options = 'signal=local_monitor_enter_sync';
+SET GLOBAL wsrep_provider_options = 'dbug=';
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+SELECT * FROM p1;
+f1     f2
+1      0
+2      0
+SELECT * FROM p2;
+f1     f2
+1      0
+2      0
+SELECT * FROM c;
+f1     p_id1   p_id2
+1      1       1
+2      2       2
+DROP TABLE c;
+DROP TABLE p1;
+DROP TABLE p2;
index 720d6daf518c2274cd7b79987855823293498320..1071d4715e341fa2e6a1d7c33ecd77e85ac0e10b 100644 (file)
@@ -244,3 +244,132 @@ SELECT * FROM c;
 DROP TABLE c;
 DROP TABLE p;
 
+#
+# Test F1 Outline:
+# ================
+#
+# Test two concurrent INSERTs on the child table.
+# (with wsrep_certification_rules=strict)
+#
+# The p table will originally have row (1)
+# The c table will originally be empty
+#
+# A new row (10, 1) pointing to parent row (1) is inserted from
+# connection node_2. A transaction which tries to INSERT another child
+# row (20, 1), pointing to the same parent, is run from connection node_1.
+#
+# Expected Outcome:
+# =================
+# A certification failure because both INSERTs try to append conflicting
+# certification keys to the writeset:
+# node_1:
+# (db=test, table=c, table index=PK f1=10, type=exclusive) (ok)
+# (db=test, table=p, table index=FK f1=1, type=exclusive) (conflict with below)
+# node_2:
+# (db=test, table=c, table index=PK f1=20, type=exclusive) (ok)
+# (db=test, table=p, table index=FK f1=1, type=exclusive) (conflict with above)
+#
+# At the end of the test:
+#    parent table should have row (1)
+#    child table should have row (20, 1)
+
+--connection node_1
+SET GLOBAL wsrep_certification_rules='strict';
+
+--connection node_2
+SET GLOBAL wsrep_certification_rules='strict';
+
+CREATE TABLE p (f1 INTEGER PRIMARY KEY) ENGINE=INNODB;
+CREATE TABLE c (
+  f1 INTEGER PRIMARY KEY,
+  p_id INTEGER,
+  CONSTRAINT fk_1 FOREIGN KEY (p_id) REFERENCES p (f1)
+);
+
+INSERT INTO p VALUES (1);
+
+# This is run on node1:
+--let $mw_369_parent_query = INSERT INTO c (f1, p_id) VALUES (10, 1)
+# This is run on node2:
+--let $mw_369_child_query = INSERT INTO c (f1, p_id) VALUES (20, 1)
+--source MW-369.inc
+
+# Commit fails
+--connection node_1
+--error ER_LOCK_DEADLOCK
+--reap
+
+--connection node_2
+SELECT * FROM p;
+SELECT * FROM c;
+
+--connection node_1
+SET GLOBAL wsrep_certification_rules=default;
+
+--connection node_2
+SET GLOBAL wsrep_certification_rules=default;
+
+DROP TABLE c;
+DROP TABLE p;
+
+#
+# Test F2 Outline:
+# ================
+#
+# Test two concurrent INSERTs on the child table.
+# (with wsrep_certification_rules=optimized)
+#
+# The p table will originally have row (1)
+# The c table will originally be empty
+#
+# A new row (10, 1) pointing to parent row (1) is inserted from
+# connection node_2. A transaction which tries to INSERT another child
+# row (20, 1), pointing to the same parent, is run from connection node_1.
+#
+# Expected Outcome:
+# =================
+# Both INSERTs should succeed since they don't modify the common parent
+# key.
+#
+# At the end of the test:
+#    parent table should have row (1)
+#    child table should have rows (10, 1), (20, 1)
+
+--connection node_1
+SET GLOBAL wsrep_certification_rules='optimized';
+
+--connection node_2
+SET GLOBAL wsrep_certification_rules='optimized';
+
+--connection node_1
+
+CREATE TABLE p (f1 INTEGER PRIMARY KEY) ENGINE=INNODB;
+CREATE TABLE c (
+  f1 INTEGER PRIMARY KEY,
+  p_id INTEGER,
+  CONSTRAINT fk_1 FOREIGN KEY (p_id) REFERENCES p (f1)
+);
+
+INSERT INTO p VALUES (1);
+
+# This is run on node1:
+--let $mw_369_parent_query = INSERT INTO c (f1, p_id) VALUES (10, 1)
+# This is run on node2:
+--let $mw_369_child_query = INSERT INTO c (f1, p_id) VALUES (20, 1)
+--source MW-369.inc
+
+--connection node_1
+--reap
+
+--connection node_2
+SELECT * FROM p;
+SELECT * FROM c;
+
+--connection node_1
+SET GLOBAL wsrep_certification_rules=default;
+
+--connection node_2
+SET GLOBAL wsrep_certification_rules=default;
+
+DROP TABLE c;
+DROP TABLE p;
index 205be60a0c80a90d51f3676320d0a457cdb0b9d9..1e7f31665577ec204b46c6afc338f062d54a33d1 100644 (file)
@@ -1,4 +1,17 @@
-galera_wsrep_provider_unset_set : lp1379204 'Unsupported protocol downgrade: incremental data collection disabled. Expect abort.'
-galera_kill_nochanges : mysql-wsrep#24 Galera server does not restart properly if killed
-galera_toi_ddl_fk_insert : qa#39 galera_toi_ddl_fk_insert fails sporadically
-galera_sst_xtrabackup-v2-options : SST Encryption does not work with xtrabackup 2.4.2
+##############################################################################
+#
+#  List the test cases that are to be disabled temporarily.
+#
+#  Separate the test case name and the comment with ':'.
+#
+#    <testcasename> : BUG#<xxxx> <date disabled> <disabler> <comment>
+#
+#  Do not use any TAB characters for whitespace.
+#
+##############################################################################
+# Tests that have disabler=CODERSHIP will be forcefully run with "./mtr --enable-disabled" by Jenkins
+galera_kill_nochanges : mysql-wsrep#24 0000-00-00 CODERSHIP Galera server does not restart properly if killed
+galera_sst_xtrabackup-v2-options : N/A 0000-00-00 CODERSHIP SST Encryption does not work with xtrabackup 2.4.2
+galera_toi_ddl_fk_insert : qa#39 0000-00-00 CODERSHIP galera_toi_ddl_fk_insert fails sporadically
+galera_var_innodb_disallow_writes : Issue#330 2018-05-16 CODERSHIP https://github.com/codership/mysql-wsrep/issues/330
+galera_wsrep_provider_unset_set : lp1379204 0000-00-00 CODERSHIP 'Unsupported protocol downgrade: incremental data collection disabled. Expect abort.'
diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/t/galera#500.test b/mysql-wsrep-5.6/mysql-test/suite/galera/t/galera#500.test
new file mode 100644 (file)
index 0000000..a313d57
--- /dev/null
@@ -0,0 +1,37 @@
+#
+# The purpose of this test is to verify that if an exception is
+# thrown from gcomm background thread, the provider terminates properly
+# and wsrep_ready becomes 0.
+#
+
+--source include/have_innodb.inc
+--source include/galera_cluster.inc
+
+# Force node_2 gcomm background thread to terminate via exception.
+--connection node_2
+--let $wsrep_cluster_address = `SELECT @@wsrep_cluster_address`
+# Setting gmcast.isolate=2 will force gcomm background thread to
+# throw exception.
+SET SESSION wsrep_sync_wait = 0;
+SET GLOBAL wsrep_provider_options="gmcast.isolate=2";
+
+# Wait until wsrep_ready becomes 0.
+--let $wait_condition = SELECT VARIABLE_VALUE = 0 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME ='wsrep_ready'
+--source include/wait_condition.inc
+
+# Wait until node_1 ends up in non-prim and rebootstrap the cluster.
+--connection node_1
+SET SESSION wsrep_sync_wait = 0;
+--let $wait_condition = SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME ='wsrep_cluster_size'
+--source include/wait_condition.inc
+SHOW STATUS LIKE 'wsrep_cluster_status';
+SET SESSION wsrep_sync_wait = default;
+SET GLOBAL wsrep_provider_options="pc.bootstrap=1";
+
+# Restart node_2
+--connection node_2
+SET SESSION wsrep_on=0;
+--source include/restart_mysqld.inc
+
+--connection node_2
+CALL mtr.add_suppression("WSREP: exception from gcomm, backend must be restarted: Gcomm backend termination was requested by setting gmcast.isolate=2.");
diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/t/galera#505.test b/mysql-wsrep-5.6/mysql-test/suite/galera/t/galera#505.test
new file mode 100644 (file)
index 0000000..74aa781
--- /dev/null
@@ -0,0 +1,17 @@
+# galera#505 - Change of pc.weight wsrep param will be correctly stored in wsrep_provider_options variable
+
+--source include/galera_cluster.inc
+
+--connection node_1
+
+# Convert "... pc.weight = N; ..." to "N; ..."
+--let $s1 = `SELECT SUBSTR(@@wsrep_provider_options, LOCATE('pc.weight =', @@wsrep_provider_options) + LENGTH('pc.weight = '))`
+# Convert "N; ..." to "N"
+--let $pc_weight_value = `SELECT SUBSTR('$s1', 1, LOCATE(';', '$s1') - 1)`
+
+SET GLOBAL wsrep_provider_options = 'pc.weight=3';
+
+-- replace_regex /.*(pc\.weight = [0-9]+);.*/\1/
+SHOW GLOBAL VARIABLES LIKE 'wsrep_provider_options';
+
+--eval SET GLOBAL wsrep_provider_options = 'pc.weight=$pc_weight_value'
index 3bfcdc9f117ac15a7e30233b36b646f10e1bf6b5..08165f30f7d3d7812c13ec51c709340ccd0bc51d 100644 (file)
@@ -5,6 +5,7 @@
 
 --source include/galera_cluster.inc
 --source include/big_test.inc
+--source include/have_log_bin.inc
 
 SET SESSION wsrep_sync_wait = 0;
 CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT, f2 LONGBLOB) ENGINE=InnoDB;
@@ -93,6 +94,8 @@ END|
 
 DELIMITER ;|
 
+--let $wsrep_last_committed_before = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'`
+
 --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
@@ -124,6 +127,13 @@ DELIMITER ;|
 
 --connection node_2
 SET SESSION wsrep_sync_wait = 0;
+
+# Make sure that node_2 is not killed while TOIs are applied.
+# Otherwhise we risk that grastate file is marked unsafe, and
+# as a consequence the node cannot rejoin with IST.
+--let $wait_condition = SELECT VARIABLE_VALUE > $wsrep_last_committed_before FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'
+--source include/wait_condition.inc
+
 --source include/kill_galera.inc
 
 --sleep 10
@@ -172,9 +182,8 @@ SET SESSION wsrep_sync_wait = 0;
 --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';
+--source include/wait_condition.inc
 
 --let $diff_servers = 1 2
 --source include/diff_servers.inc
index 72c7e08bcc3b2389d876e94c30829f683e89d847..0af7160d4d888c51ec0e0bd672daf8655b1ac505 100644 (file)
@@ -16,7 +16,7 @@
 while ($count)
 {
   --disable_query_log
-  --let $ddl_var = `SELECT CONCAT("CREATE TABLE t", $count, " (f1 INTEGER AUTO_INCREMENT PRIMARY KEY) ENGINE=InnoDB")`
+  --let $ddl_var = `SELECT CONCAT("CREATE TABLE t", $count, " (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB")`
   --eval $ddl_var
   --enable_query_log
   --dec $count
@@ -37,7 +37,7 @@ START TRANSACTION;
 while ($count)
 {
   --disable_query_log
-  --let $ddl_var = `SELECT CONCAT("INSERT INTO t", $count, " VALUES (DEFAULT)")`
+  --let $ddl_var = `SELECT CONCAT("INSERT INTO t", $count, " VALUES (1)")`
   --eval $ddl_var
   --enable_query_log
   --dec $count
index 42f63df3acc6396c53f5d235e80fe0e737f4cffc..420c0f20d27c1d2c4a220ecb393d7e4e8bd07b38 100644 (file)
@@ -38,7 +38,6 @@ INSERT INTO t1 VALUES (13);
 
 --echo Shutting down server ...
 --source include/shutdown_mysqld.inc
---sleep 5
 
 --connection node_1
 INSERT INTO t1 VALUES (11);
@@ -51,8 +50,6 @@ INSERT INTO t1 VALUES (14);
 
 --connection node_3
 --source include/start_mysqld.inc
---sleep 5
---source include/wait_until_connected_again.inc
 
 INSERT INTO t1 VALUES (131);
 
@@ -65,7 +62,6 @@ INSERT INTO t1 VALUES (22);
 
 --echo Shutting down server ...
 --source include/shutdown_mysqld.inc
---sleep 5
 
 --connection node_1
 INSERT INTO t1 VALUES (21);
@@ -78,8 +74,6 @@ INSERT INTO t1 VALUES (24);
 
 --connection node_2
 --source include/start_mysqld.inc
---sleep 5
---source include/wait_until_connected_again.inc
 
 INSERT INTO t1 VALUES (221);
 
@@ -92,7 +86,6 @@ INSERT INTO t1 VALUES (34);
 
 --echo Shutting down server ...
 --source include/shutdown_mysqld.inc
---sleep 5
 
 --connection node_1
 INSERT INTO t1 VALUES (31);
@@ -105,8 +98,6 @@ INSERT INTO t1 VALUES (33);
 
 --connection node_4
 --source include/start_mysqld.inc
---sleep 5
---source include/wait_until_connected_again.inc
 
 INSERT INTO t1 VALUES (341);
 
index 9b12eeed1ac0084568104de28d51ad44dd0d9b7a..0cd3b5645da81b604fc773ae0c34d7d5f73e3aa8 100644 (file)
@@ -37,10 +37,8 @@ INSERT INTO t1 VALUES (4);
 INSERT INTO t1 VALUES (13);
 
 --source include/kill_galera.inc
---sleep 5
 
 --connection node_1
---source include/wait_until_connected_again.inc
 INSERT INTO t1 VALUES (11);
 
 --connection node_2
@@ -51,8 +49,6 @@ INSERT INTO t1 VALUES (14);
 
 --connection node_3
 --source include/start_mysqld.inc
---sleep 5
---source include/wait_until_connected_again.inc
 
 INSERT INTO t1 VALUES (131);
 
@@ -64,10 +60,8 @@ INSERT INTO t1 VALUES (131);
 INSERT INTO t1 VALUES (22);
 
 --source include/kill_galera.inc
---sleep 5
 
 --connection node_1
---source include/wait_until_connected_again.inc
 INSERT INTO t1 VALUES (21);
 
 --connection node_3
@@ -78,8 +72,6 @@ INSERT INTO t1 VALUES (24);
 
 --connection node_2
 --source include/start_mysqld.inc
---sleep 5
---source include/wait_until_connected_again.inc
 
 INSERT INTO t1 VALUES (221);
 
@@ -91,10 +83,8 @@ INSERT INTO t1 VALUES (221);
 INSERT INTO t1 VALUES (34);
 
 --source include/kill_galera.inc
---sleep 5
 
 --connection node_1
---source include/wait_until_connected_again.inc
 INSERT INTO t1 VALUES (31);
 
 --connection node_2
@@ -105,8 +95,6 @@ INSERT INTO t1 VALUES (33);
 
 --connection node_4
 --source include/start_mysqld.inc
---sleep 5
---source include/wait_until_connected_again.inc
 
 INSERT INTO t1 VALUES (341);
 
index 0c707d6d681d3e3c3f283f6f37e966e19ff8c43e..bcd6cc2bdd12d10d79448e819aebbc8969a50cf2 100644 (file)
@@ -45,7 +45,8 @@ SHOW CREATE TABLE t1;
 --connection node_2a
 --reap
 UNLOCK TABLES;
---sleep 2
+
+SET SESSION wsrep_sync_wait = DEFAULT;
 SHOW CREATE TABLE t1;
 SELECT * from t1;
 
diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera/t/mysql-wsrep#332.test b/mysql-wsrep-5.6/mysql-test/suite/galera/t/mysql-wsrep#332.test
new file mode 100644 (file)
index 0000000..2da01ba
--- /dev/null
@@ -0,0 +1,113 @@
+--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
+
+# Open connection node_1a here, MW-369.inc will use it later
+--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
+
+#
+# Test the scenario where a foreign key is added to an existing child table, and
+# concurrently UPDATE the parent table so that it violates the constraint.
+#
+# We expect that ALTER TABLE ADD FOREIGN KEY adds a table level key on both
+# parent and child table. And therefore we also expect the UPDATE to fail
+# certification.
+#
+--connection node_1
+CREATE TABLE p (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB;
+CREATE TABLE c (f1 INTEGER PRIMARY KEY, p_id INTEGER) ENGINE=INNODB;
+
+INSERT INTO p VALUES (1, 0);
+INSERT INTO p VALUES (2, 0);
+
+INSERT INTO c VALUES (1, 1);
+INSERT INTO c VALUES (2, 2);
+
+--let $mw_369_parent_query = UPDATE p SET f1 = f1 + 100
+--let $mw_369_child_query = ALTER TABLE c ADD FOREIGN KEY (p_id) REFERENCES p(f1)
+
+--source MW-369.inc
+
+# Expect certification failure
+--connection node_1
+--error ER_LOCK_DEADLOCK
+--reap
+
+--connection node_2
+SELECT * FROM p;
+SELECT * FROM c;
+
+DROP TABLE c;
+DROP TABLE p;
+
+
+#
+# Same as above, except that two foreign keys pointing to different parent
+# tables are added, p1 and p2. Concurrently UPDATE p1.
+#
+# Expect certification error on UPDATE.
+#
+--connection node_1
+CREATE TABLE p1 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB;
+CREATE TABLE p2 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB;
+CREATE TABLE c (f1 INTEGER PRIMARY KEY, p_id1 INTEGER, p_id2 INTEGER) ENGINE=INNODB;
+
+INSERT INTO p1 VALUES (1, 0), (2, 0);
+INSERT INTO p2 VALUES (1, 0), (2, 0);
+
+INSERT INTO c VALUES (1, 1, 1);
+INSERT INTO c VALUES (2, 2, 2);
+
+--let $mw_369_parent_query = UPDATE p1 SET f1 = f1 + 100
+--let $mw_369_child_query = ALTER TABLE c ADD FOREIGN KEY (p_id1) REFERENCES p1(f1), ADD FOREIGN KEY (p_id2) REFERENCES p2(f1)
+
+--source MW-369.inc
+
+# Expect certification failure
+--connection node_1
+--error ER_LOCK_DEADLOCK
+--reap
+
+--connection node_2
+SELECT * FROM p1;
+SELECT * FROM p2;
+SELECT * FROM c;
+
+DROP TABLE c;
+DROP TABLE p1;
+DROP TABLE p2;
+
+
+#
+# Same as above, except that UPDATE is on p2.
+#
+--connection node_1
+CREATE TABLE p1 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB;
+CREATE TABLE p2 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB;
+CREATE TABLE c (f1 INTEGER PRIMARY KEY, p_id1 INTEGER, p_id2 INTEGER) ENGINE=INNODB;
+
+INSERT INTO p1 VALUES (1, 0), (2, 0);
+INSERT INTO p2 VALUES (1, 0), (2, 0);
+
+INSERT INTO c VALUES (1, 1, 1);
+INSERT INTO c VALUES (2, 2, 2);
+
+--let $mw_369_parent_query = UPDATE p2 SET f1 = f1 + 100
+--let $mw_369_child_query = ALTER TABLE c ADD FOREIGN KEY (p_id1) REFERENCES p1(f1), ADD FOREIGN KEY (p_id2) REFERENCES p2(f1)
+
+--source MW-369.inc
+
+# Expect certification failure
+--connection node_1
+--error ER_LOCK_DEADLOCK
+--reap
+
+--connection node_2
+SELECT * FROM p1;
+SELECT * FROM p2;
+SELECT * FROM c;
+
+DROP TABLE c;
+DROP TABLE p1;
+DROP TABLE p2;
index 1464222a079c40cc680ad2ee74634e20b003ce2f..7e0d282ec7ff266adda5489ea5ef5f4236c87867 100644 (file)
@@ -11,6 +11,7 @@ SET SESSION wsrep_sync_wait = 0;
 SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
 VARIABLE_VALUE = 2
 1
+SET SESSION wsrep_sync_wait = DEFAULT;
 SELECT COUNT(*) = 1 FROM t1;
 COUNT(*) = 1
 1
index 0e854fa6c23050be87bd90f8c085312f8a27ebd4..572982b76be80e989e6fa507bfd57485489b4bd4 100644 (file)
@@ -1,11 +1,20 @@
+SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_weight';
+VARIABLE_VALUE = 3
+1
 SET GLOBAL wsrep_provider_options = 'pc.weight=3';
-Suspending node ...
+SELECT VARIABLE_VALUE = 5 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_weight';
+VARIABLE_VALUE = 5
+1
+SET GLOBAL wsrep_provider_options = 'gmcast.isolate=1';
 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
+SHOW STATUS LIKE 'wsrep_cluster_weight';
+Variable_name  Value
+wsrep_cluster_weight   0
 SHOW STATUS LIKE 'wsrep_cluster_status';
 Variable_name  Value
 wsrep_cluster_status   non-Primary
@@ -22,9 +31,14 @@ SHOW STATUS LIKE 'wsrep_local_state_comment';
 Variable_name  Value
 wsrep_local_state_comment      Initialized
 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
+SHOW STATUS LIKE 'wsrep_cluster_weight';
+Variable_name  Value
+wsrep_cluster_weight   0
 SHOW STATUS LIKE 'wsrep_cluster_status';
 Variable_name  Value
 wsrep_cluster_status   non-Primary
@@ -40,7 +54,9 @@ wsrep_local_state     0
 SHOW STATUS LIKE 'wsrep_local_state_comment';
 Variable_name  Value
 wsrep_local_state_comment      Initialized
-Resuming node ...
+SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_weight';
+VARIABLE_VALUE = 3
+1
 SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
 VARIABLE_VALUE = 'Primary'
 1
@@ -57,11 +73,16 @@ SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VAR
 VARIABLE_VALUE = 'Synced'
 1
 SET GLOBAL wsrep_provider_options = 'pc.weight=1';
-SET SESSION wsrep_sync_wait=0;
-SET SESSION wsrep_sync_wait=0;
+SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_weight';
+VARIABLE_VALUE = 1
+1
+SET GLOBAL wsrep_provider_options = 'gmcast.isolate=0';
 SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
 VARIABLE_VALUE = 3
 1
+SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_weight';
+VARIABLE_VALUE = 3
+1
 SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
 VARIABLE_VALUE = 'Primary'
 1
@@ -80,6 +101,9 @@ VARIABLE_VALUE = 'Synced'
 SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
 VARIABLE_VALUE = 3
 1
+SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_weight';
+VARIABLE_VALUE = 3
+1
 SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
 VARIABLE_VALUE = 'Primary'
 1
@@ -98,6 +122,9 @@ VARIABLE_VALUE = 'Synced'
 SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
 VARIABLE_VALUE = 3
 1
+SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_weight';
+VARIABLE_VALUE = 3
+1
 SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
 VARIABLE_VALUE = 'Primary'
 1
diff --git a/mysql-wsrep-5.6/mysql-test/suite/galera_3nodes/t/disabled.def b/mysql-wsrep-5.6/mysql-test/suite/galera_3nodes/t/disabled.def
new file mode 100644 (file)
index 0000000..4b326dd
--- /dev/null
@@ -0,0 +1,13 @@
+##############################################################################
+#
+#  List the test cases that are to be disabled temporarily.
+#
+#  Separate the test case name and the comment with ':'.
+#
+#    <testcasename> : BUG#<xxxx> <date disabled> <disabler> <comment>
+#
+#  Do not use any TAB characters for whitespace.
+#
+##############################################################################
+# Tests that have disabler=CODERSHIP will be forcefully run with "./mtr --enable-disabled" by Jenkins
+galera_evs_suspect_timeout : Issue#330 2018-05-16 CODERSHIP https://github.com/codership/mysql-wsrep/issues/330
index a87f19ac94ebde02e6aa2c5e89be7482fade7c28..03236a3cb9366aab2c39bd279e534e8b6efb8761 100644 (file)
@@ -50,6 +50,7 @@ SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_N
 --enable_query_log
 
 --source include/wait_until_connected_again.inc
+SET SESSION wsrep_sync_wait = DEFAULT;
 SELECT COUNT(*) = 1 FROM t1;
 DROP TABLE t1;
 
index 5228a176963fb6782c10f9b5bb44d24501c1f75b..0a94e7cd85db2c7f4e2772d7c8cc02cae37fb149 100644 (file)
@@ -8,9 +8,12 @@
 --source include/have_innodb.inc
 
 --connection node_1
+SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_weight';
 SET GLOBAL wsrep_provider_options = 'pc.weight=3';
---source include/galera_suspend.inc
---sleep 10
+SELECT VARIABLE_VALUE = 5 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_weight';
+
+# Isolate node_1 from the cluster.
+SET GLOBAL wsrep_provider_options = 'gmcast.isolate=1';
 
 --connection node_2
 # Do not wait for causality as we are no longer in the primary component
@@ -22,8 +25,9 @@ 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
-
+# and cluster weight 0
 SHOW STATUS LIKE 'wsrep_cluster_size';
+SHOW STATUS LIKE 'wsrep_cluster_weight';
 SHOW STATUS LIKE 'wsrep_cluster_status';
 SHOW STATUS LIKE 'wsrep_connected';
 SHOW STATUS LIKE 'wsrep_ready';
@@ -35,8 +39,13 @@ SHOW STATUS LIKE 'wsrep_local_state_comment';
 --source include/galera_connect.inc
 --connection node_3
 SET SESSION wsrep_sync_wait=0;
+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;
 
 SHOW STATUS LIKE 'wsrep_cluster_size';
+SHOW STATUS LIKE 'wsrep_cluster_weight';
 SHOW STATUS LIKE 'wsrep_cluster_status';
 SHOW STATUS LIKE 'wsrep_connected';
 SHOW STATUS LIKE 'wsrep_ready';
@@ -44,15 +53,13 @@ SHOW STATUS LIKE 'wsrep_local_state';
 SHOW STATUS LIKE 'wsrep_local_state_comment';
 
 --connection node_1
---source include/galera_resume.inc
---sleep 10
---source include/wait_until_connected_again.inc
 
 # For Node #1, we expect a primary component of size 1
 
 --let $wait_condition = SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
 --source include/wait_condition.inc
 
+SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_weight';
 SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
 SELECT VARIABLE_VALUE = 'ON' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_connected';
 SELECT VARIABLE_VALUE = 'ON' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_ready';
@@ -60,30 +67,27 @@ SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_N
 SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment';
 
 SET GLOBAL wsrep_provider_options = 'pc.weight=1';
+SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_weight';
 
-# Restore the cluster by resetting wsrep_cluster_address on nodes #1 and #2
+# Resume cluster connectivity on node_1
+--connection node_1
+SET GLOBAL wsrep_provider_options = 'gmcast.isolate=0';
 
---connection node_2
---disable_query_log
---eval SET GLOBAL wsrep_cluster_address = @@wsrep_cluster_address;
---enable_query_log
+--let $wait_condition = SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
+--source include/wait_condition.inc
 
-SET SESSION wsrep_sync_wait=0;
---source include/wait_until_connected_again.inc
+--connection node_2
+--source include/wait_condition.inc
 
 --connection node_3
---disable_query_log
---eval SET GLOBAL wsrep_cluster_address = @@wsrep_cluster_address;
---enable_query_log
-
-SET SESSION wsrep_sync_wait=0;
---source include/wait_until_connected_again.inc
-
-# On all nodes, we now expect a Primary component of size 3, Synced and ready
+--source include/wait_condition.inc
 
 --connection node_1
---source include/wait_until_connected_again.inc
+--source include/wait_condition.inc
+
+# On all nodes, we now expect a Primary component of size 3, weight 3, Synced and ready
 SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
+SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_weight';
 SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
 SELECT VARIABLE_VALUE = 'ON' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_connected';
 SELECT VARIABLE_VALUE = 'ON' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_ready';
@@ -92,6 +96,7 @@ SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VAR
 
 --connection node_2
 SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
+SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_weight';
 SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
 SELECT VARIABLE_VALUE = 'ON' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_connected';
 SELECT VARIABLE_VALUE = 'ON' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_ready';
@@ -100,6 +105,7 @@ SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VAR
 
 --connection node_3
 SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
+SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_weight';
 SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
 SELECT VARIABLE_VALUE = 'ON' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_connected';
 SELECT VARIABLE_VALUE = 'ON' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_ready';
diff --git a/mysql-wsrep-5.6/mysql-test/suite/innodb/r/bulk_create_index_online.result b/mysql-wsrep-5.6/mysql-test/suite/innodb/r/bulk_create_index_online.result
new file mode 100644 (file)
index 0000000..9a90d1e
--- /dev/null
@@ -0,0 +1,17 @@
+CREATE TABLE parent (a INT PRIMARY KEY, b INT NOT NULL) ENGINE = InnoDB;
+INSERT INTO parent VALUES(1,2),(2,2);
+CREATE TABLE child (a INT PRIMARY KEY, b INT NOT NULL) ENGINE = InnoDB;
+INSERT INTO child VALUES (10, 2);
+SET DEBUG_SYNC = 'innodb_inplace_alter_table_enter SIGNAL start_create
+WAIT_FOR go_ahead';
+CREATE UNIQUE INDEX idx ON parent(b);;
+SET DEBUG_SYNC = 'now WAIT_FOR start_create';
+INSERT INTO parent VALUES(4, 2);
+SET DEBUG_SYNC = 'now SIGNAL go_ahead';
+ERROR 23000: Duplicate entry '2' for key 'idx'
+SET DEBUG_SYNC = 'now SIGNAL conn_add_fk';
+SET DEBUG_SYNC = 'now WAIT_FOR conn_add_fk';
+ALTER TABLE child ADD CONSTRAINT cfx FOREIGN KEY (b) REFERENCES parent(b);
+ERROR HY000: Cannot add foreign key constraint
+DROP TABLE child;
+DROP TABLE parent;
index 47fc97206c94162933b0b13511ca227c31f4c976..5f8f72943a39993d38b85342ce47aa46727d6433 100644 (file)
@@ -860,3 +860,23 @@ DROP TABLE dest_db.t1;
 DROP TABLE source_db.t1;
 DROP DATABASE source_db;
 DROP DATABASE dest_db;
+#
+# BUG #26334149 MYSQL CRASHES WHEN FULL TEXT INDEXES IBD FILES ARE
+# ORPHANED DUE TO RENAME TABLE
+#
+CREATE DATABASE db1;
+USE db1;
+CREATE TABLE notes (
+id int(11) NOT NULL AUTO_INCREMENT,
+body text COLLATE utf8_unicode_ci,
+PRIMARY KEY (id)
+) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8
+COLLATE=utf8_unicode_ci;
+ALTER TABLE notes ADD FULLTEXT INDEX index_ft_body (body(255));
+Warnings:
+Warning        124     InnoDB rebuilding table to add column FTS_DOC_ID
+DROP INDEX index_ft_body ON notes;
+CREATE DATABASE db2;
+RENAME TABLE db1.notes TO db2.notes;
+DROP DATABASE db1;
+DROP DATABASE db2;
index d85873e31d8eef496a0fd0dd4b940ed9f437cd97..0b624d633c682113a73db1e704b0f0ba982b05b7 100644 (file)
@@ -580,7 +580,7 @@ SELECT * FROM t1;
 ERROR HY000: Tablespace has been discarded for table 't1'
 restore: t1 .ibd and .cfg files
 ALTER TABLE t1 IMPORT TABLESPACE;
-ERROR HY000: Schema mismatch (Table flags don't match, server table has 0x5 and the meta-data file has 0x0)
+ERROR HY000: Schema mismatch (Table flags don't match,server table has ROW_TYPE_COMPACT and the meta-data file has ROW_TYPE_REDUNDANT)
 unlink: t1.ibd
 unlink: t1.cfg
 DROP TABLE t1;
@@ -592,7 +592,7 @@ SELECT * FROM t1;
 ERROR HY000: Tablespace has been discarded for table 't1'
 restore: t1 .ibd and .cfg files
 ALTER TABLE t1 IMPORT TABLESPACE;
-ERROR HY000: Schema mismatch (Table flags don't match, server table has 0x5 and the meta-data file has 0x0)
+ERROR HY000: Schema mismatch (Table flags don't match,server table has ROW_TYPE_DYNAMIC and the meta-data file has ROW_TYPE_REDUNDANT)
 unlink: t1.ibd
 unlink: t1.cfg
 DROP TABLE t1;
@@ -766,7 +766,7 @@ SELECT * FROM t1;
 ERROR HY000: Tablespace has been discarded for table 't1'
 restore: t1 .ibd and .cfg files
 ALTER TABLE t1 IMPORT TABLESPACE;
-ERROR HY000: Schema mismatch (Table flags don't match, server table has 0x5 and the meta-data file has 0x1)
+ERROR HY000: Schema mismatch (Table flags don't match,server table has ROW_TYPE_REDUNDANT and the meta-data file has ROW_TYPE_COMPACT)
 unlink: t1.ibd
 unlink: t1.cfg
 DROP TABLE t1;
@@ -778,7 +778,7 @@ SELECT * FROM t1;
 ERROR HY000: Tablespace has been discarded for table 't1'
 restore: t1 .ibd and .cfg files
 ALTER TABLE t1 IMPORT TABLESPACE;
-ERROR HY000: Schema mismatch (Table flags don't match, server table has 0x5 and the meta-data file has 0x1)
+ERROR HY000: Schema mismatch (Table flags don't match,server table has ROW_TYPE_DYNAMIC and the meta-data file has ROW_TYPE_COMPACT)
 unlink: t1.ibd
 unlink: t1.cfg
 DROP TABLE t1;
@@ -955,7 +955,7 @@ SELECT * FROM t1;
 ERROR HY000: Tablespace has been discarded for table 't1'
 restore: t1 .ibd and .cfg files
 ALTER TABLE t1 IMPORT TABLESPACE;
-ERROR HY000: Schema mismatch (Table flags don't match, server table has 0x5 and the meta-data file has 0x21)
+ERROR HY000: Schema mismatch (Table flags don't match,server table has ROW_TYPE_COMPACT and the meta-data file has ROW_TYPE_DYNAMIC)
 unlink: t1.ibd
 unlink: t1.cfg
 DROP TABLE t1;
@@ -967,7 +967,7 @@ SELECT * FROM t1;
 ERROR HY000: Tablespace has been discarded for table 't1'
 restore: t1 .ibd and .cfg files
 ALTER TABLE t1 IMPORT TABLESPACE;
-ERROR HY000: Schema mismatch (Table flags don't match, server table has 0x5 and the meta-data file has 0x21)
+ERROR HY000: Schema mismatch (Table flags don't match,server table has ROW_TYPE_REDUNDANT and the meta-data file has ROW_TYPE_DYNAMIC)
 unlink: t1.ibd
 unlink: t1.cfg
 DROP TABLE t1;
diff --git a/mysql-wsrep-5.6/mysql-test/suite/innodb/t/bulk_create_index_online.test b/mysql-wsrep-5.6/mysql-test/suite/innodb/t/bulk_create_index_online.test
new file mode 100644 (file)
index 0000000..1564c9e
--- /dev/null
@@ -0,0 +1,62 @@
+#
+## Bug #26654685   INDEX->ID == BTR_PAGE_GET_INDEX_ID(PAGE)
+##                AT BTR_CUR_SEARCH_TO_NTH_LEVEL IN BTR/B
+#
+
+--source include/have_debug.inc
+--source include/have_debug_sync.inc
+--source include/count_sessions.inc
+--source include/have_innodb_16k.inc
+
+CREATE TABLE parent (a INT PRIMARY KEY, b INT NOT NULL) ENGINE = InnoDB;
+INSERT INTO parent VALUES(1,2),(2,2);
+CREATE TABLE child (a INT PRIMARY KEY, b INT NOT NULL) ENGINE = InnoDB;
+INSERT INTO child VALUES (10, 2);
+
+# This should rollback due to dup key
+SET DEBUG_SYNC = 'innodb_inplace_alter_table_enter SIGNAL start_create
+WAIT_FOR go_ahead';
+--send CREATE UNIQUE INDEX idx ON parent(b);
+
+# Make table ref_count > 1
+connect (con1,localhost,root,,);
+connection con1;
+SET DEBUG_SYNC = 'now WAIT_FOR start_create';
+# If the Galera library is loaded then the INSERT below is aborted:
+# 2018-07-31 18:10:18 53686 [Note] WSREP: TO BEGIN: -1, 0 : CREATE UNIQUE INDEX idx ON parent(b)
+# 2018-07-31 18:10:18 53686 [Note] WSREP: TO BEGIN: 5, 2
+# 2018-07-31 18:10:18 53686 [Note] WSREP: commit failed for reason: 3 5 INSERT INTO parent VALUES(4, 2)
+# 2018-07-31 18:10:18 53686 [Note] WSREP: conflict state: 0
+# 2018-07-31 18:10:18 53686 [Note] WSREP: cluster conflict due to certification failure for threads:
+# 2018-07-31 18:10:18 53686 [Note] WSREP: Victim thread:
+#    THD: 5, mode: local, state: executing, conflict: cert failure, seqno: 6
+#    SQL: INSERT INTO parent VALUES(4, 2)
+# 2018-07-31 18:10:18 53686 [Note] WSREP: cleanup transaction for LOCAL_STATE: INSERT INTO parent VALUES(4, 2)
+# 2018-07-31 18:10:18 53686 [Note] WSREP: wsrep retrying AC query: INSERT INTO parent VALUES(4, 2)
+# 2018-07-31 18:10:18 53686 [Note] WSREP: commit failed for reason: 3 5 INSERT INTO parent VALUES(4, 2)
+# 2018-07-31 18:10:18 53686 [Note] WSREP: conflict state: 0
+# 2018-07-31 18:10:18 53686 [Note] WSREP: cluster conflict due to certification failure for threads:
+# 2018-07-31 18:10:18 53686 [Note] WSREP: Victim thread:
+#    THD: 5, mode: local, state: executing, conflict: cert failure, seqno: 7
+#    SQL: INSERT INTO parent VALUES(4, 2)
+# 2018-07-31 18:10:18 53686 [Note] WSREP: cleanup transaction for LOCAL_STATE: INSERT INTO parent VALUES(4, 2)
+# 2018-07-31 18:10:18 53686 [Note] WSREP: cert failure, thd: 5 is_AC: 1, retry: 1 - 1 SQL: INSERT INTO parent VALUES(4, 2)
+# 2018-07-31 18:10:18 53686 [Note] WSREP: releasing retry_query: conf 0 sent 0 kill 0  errno 1213 SQL INSERT INTO parent VALUES(4, 2)
+--error 0,ER_LOCK_DEADLOCK
+INSERT INTO parent VALUES(4, 2);
+SET DEBUG_SYNC = 'now SIGNAL go_ahead';
+
+connection default;
+--error ER_DUP_ENTRY
+reap;
+SET DEBUG_SYNC = 'now SIGNAL conn_add_fk';
+
+connection con1;
+SET DEBUG_SYNC = 'now WAIT_FOR conn_add_fk';
+--error ER_CANNOT_ADD_FOREIGN
+ALTER TABLE child ADD CONSTRAINT cfx FOREIGN KEY (b) REFERENCES parent(b);
+
+--connection default
+DROP TABLE child;
+DROP TABLE parent;
+--disconnect con1
index 888298bbb09e2eebe1471f7dde7bdc4bff6f2b9e..ed348d4a5daa92cd208cb52e949635d8b6e65ddf 100644 (file)
@@ -9,3 +9,9 @@
 #  Do not use any TAB characters for whitespace.
 #
 ##############################################################################
+# Codership disabled tests begin here
+# Tests that have disabler=CODERSHIP will be forcefully run with "./mtr --enable-disabled" by Jenkins
+innodb_bug-13628249 : Issue#330 2018-05-16 CODERSHIP https://github.com/codership/mysql-wsrep/issues/330
+monitor : Issue#330 2018-05-16 CODERSHIP https://github.com/codership/mysql-wsrep/issues/330
+innodb_file_limit_check : BUG#89208 2018-05-31 VasilDimov https://bugs.mysql.com/bug.php?id=89208
+# Codership disabled tests end here
index ca1252fb4e475a76329bfd6f92b674f710889ee0..2208c6da86f75e544ce56a0776b750f33b099251 100644 (file)
@@ -480,5 +480,24 @@ eval DROP TABLE $source_db.t1;
 eval DROP DATABASE $source_db;
 eval DROP DATABASE $dest_db;
 
+--echo #
+--echo # BUG #26334149 MYSQL CRASHES WHEN FULL TEXT INDEXES IBD FILES ARE
+--echo # ORPHANED DUE TO RENAME TABLE
+--echo #
+CREATE DATABASE db1; USE db1;
+CREATE TABLE notes (
+   id int(11) NOT NULL AUTO_INCREMENT,
+   body text COLLATE utf8_unicode_ci,
+   PRIMARY KEY (id)
+   ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8
+COLLATE=utf8_unicode_ci;
+
+ALTER TABLE notes ADD FULLTEXT INDEX index_ft_body (body(255));
+DROP INDEX index_ft_body ON notes;
+
+CREATE DATABASE db2;
+RENAME TABLE db1.notes TO db2.notes;
+DROP DATABASE db1;
+DROP DATABASE db2;
 
 
index 435ef2c8e6ab0c98e8ff8a62445306abd20d8217..ae23b93dc847e138f570cebe423313e5ee13c680 100644 (file)
@@ -274,14 +274,20 @@ 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;
+fulltext key (f2))engine=innodb;
 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
+1
+65536
 131071
-196606
-262141
 drop table t1;
+call mtr.add_suppression("\\[ERROR\\] InnoDB: Doc ID 20030101000000 is too big. Its difference with largest used Doc ID 0 cannot exceed or equal to 65535");
+CREATE TABLE t1 (FTS_DOC_ID BIGINT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY,
+title VARCHAR(200), FULLTEXT(title)) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (NULL, NULL), (20030101000000, 20030102000000);
+ERROR HY000: Invalid InnoDB FTS Doc ID
+DROP TABLE t1;
index af1e089098d867f9f151fe6785b070c370f13548..58f36be08a52a61a989c35dc11d6768b72a7b8c5 100644 (file)
@@ -240,7 +240,7 @@ 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;
+                fulltext key (f2))engine=innodb;
 
 set auto_increment_increment = 65535;
 insert into t1(f1, f2) values(1, "This is the first record");
@@ -248,3 +248,10 @@ 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;
+
+call mtr.add_suppression("\\[ERROR\\] InnoDB: Doc ID 20030101000000 is too big. Its difference with largest used Doc ID 0 cannot exceed or equal to 65535");
+CREATE TABLE t1 (FTS_DOC_ID BIGINT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY,
+                title VARCHAR(200), FULLTEXT(title)) ENGINE=InnoDB;
+--error 182
+INSERT INTO t1 VALUES (NULL, NULL), (20030101000000, 20030102000000);
+DROP TABLE t1;
index 658c450bd1ca6c252da981d85bcf879306b89d12..45388dbc335b7813f8f71873c131c24f3f3f1ca8 100644 (file)
@@ -9,6 +9,10 @@
 #  Do not use any TAB characters for whitespace.
 #
 ##############################################################################
+# Codership disabled tests begin here
+# Tests that have disabler=CODERSHIP will be forcefully run with "./mtr --enable-disabled" by Jenkins
+partition_debug : Issue#330 2018-05-16 CODERSHIP https://github.com/codership/mysql-wsrep/issues/330
+# Codership disabled tests end here
 
 partition_max_parts_hash_innodb : Bug#17719504 2013-11-01 Horst PARTITION_MAX_PARTS ARE FAILING SPORADICLY.
 partition_max_parts_inv_innodb : Bug#17719504 2013-11-01 Horst PARTITION_MAX_PARTS ARE FAILING SPORADICLY.
index 1a6d6b5dd522d52fa87c5c568214a9b3d80f24f1..da01c7905db357df1004109d3c1856a1298b4672 100644 (file)
@@ -9,6 +9,9 @@
 #  Do not use any TAB characters for whitespace.
 #
 ##############################################################################
-
+# Codership disabled tests begin here
+# Tests that have disabler=CODERSHIP will be forcefully run with "./mtr --enable-disabled" by Jenkins
+global_read_lock : Issue#79 2018-07-26 CODERSHIP https://github.com/codership/mysql-wsrep/issues/79
 perfschema.sizing_growth : Galera LP#1370988 2014-10-28 pstoev Performance schema heuristics need to be updated
 ortho_iter : Galera mysql-wsrep#34 2014-12-19 perfschema.ortho_iter MTR test fails sporadically
+# Codership disabled tests end here
index ee216015175c2cce35550930a13219bb06928e9e..731d103a896edbc0abfaef5be9ba02c605be7c39 100644 (file)
@@ -11,7 +11,7 @@ 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.
 START SLAVE;
 include/wait_for_slave_io_error.inc [errno=1045, 1593]
-include/stop_slave.inc
+include/stop_slave_sql.inc
 CHANGE MASTER TO MASTER_USER= 'root', MASTER_PASSWORD= '';
 Warnings:
 Note   ####    Sending passwords in plain text without SSL/TLS is extremely insecure.
diff --git a/mysql-wsrep-5.6/mysql-test/suite/rpl/r/rpl_db_stmts_ignored.result b/mysql-wsrep-5.6/mysql-test/suite/rpl/r/rpl_db_stmts_ignored.result
new file mode 100644 (file)
index 0000000..f9d18c7
--- /dev/null
@@ -0,0 +1,137 @@
+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]
+#
+# Test replicate-ignore-db=db1 filter
+#
+include/rpl_restart_server.inc [server_number=2 gtids=on parameters: --replicate-ignore-db=db1 --skip_slave_start=FALSE]
+[connection master]
+#
+# Execute 'CREATE DATABASE db1' on Master.
+#
+CREATE DATABASE db1;
+#
+# Sync with Slave (using gtid values)
+#
+include/sync_slave_sql_with_master.inc
+#
+# Check that even after sync is completed 'db1' does not exists
+# on Slave which implies that 'CREATE DATABASE db1' is filtered
+# out.
+#
+USE db1;
+ERROR 42000: Unknown database 'db1'
+#
+# Execute other database commands (ALTER/DROP) on Master.
+#
+[connection master]
+ALTER DATABASE db1 CHARACTER SET latin1;
+DROP DATABASE db1;
+#
+# Check that we are able to sync with slave successfully
+# which implies that those commands are filtered out.
+# If they were executed by Slave, that will break replication
+# as we do not have 'db1' database on Slave.
+include/sync_slave_sql_with_master.inc
+#
+# Test replicate-do-db=db2 filter
+#
+include/rpl_restart_server.inc [server_number=2 gtids=on parameters: --replicate-do-db=db2 --skip_slave_start=FALSE]
+[connection master]
+#
+# Execute 'CREATE DATABASE db1' on Master.
+#
+CREATE DATABASE db1;
+#
+# Sync with Slave (using gtid values)
+#
+include/sync_slave_sql_with_master.inc
+#
+# Check that even after sync is completed 'db1' does not exists
+# on Slave which implies that 'CREATE DATABASE db1' is filtered
+# out.
+#
+USE db1;
+ERROR 42000: Unknown database 'db1'
+#
+# Execute other database commands (ALTER/DROP) on Master.
+#
+[connection master]
+ALTER DATABASE db1 CHARACTER SET latin1;
+DROP DATABASE db1;
+#
+# Check that we are able to sync with slave successfully
+# which implies that those commands are filtered out.
+# If they were executed by Slave, that will break replication
+# as we do not have 'db1' database on Slave.
+include/sync_slave_sql_with_master.inc
+#
+# Test replicate-wild-ignore-table=db1.% filter
+#
+include/rpl_restart_server.inc [server_number=2 gtids=on parameters: --replicate-wild-ignore-table=db1.% --skip_slave_start=FALSE]
+[connection master]
+#
+# Execute 'CREATE DATABASE db1' on Master.
+#
+CREATE DATABASE db1;
+#
+# Sync with Slave (using gtid values)
+#
+include/sync_slave_sql_with_master.inc
+#
+# Check that even after sync is completed 'db1' does not exists
+# on Slave which implies that 'CREATE DATABASE db1' is filtered
+# out.
+#
+USE db1;
+ERROR 42000: Unknown database 'db1'
+#
+# Execute other database commands (ALTER/DROP) on Master.
+#
+[connection master]
+ALTER DATABASE db1 CHARACTER SET latin1;
+DROP DATABASE db1;
+#
+# Check that we are able to sync with slave successfully
+# which implies that those commands are filtered out.
+# If they were executed by Slave, that will break replication
+# as we do not have 'db1' database on Slave.
+include/sync_slave_sql_with_master.inc
+#
+# Test replicate-wild-ignore-table=db1.% and --replicate-do-db=db2
+# filter combination
+include/rpl_restart_server.inc [server_number=2 gtids=on parameters: --replicate-do-db=db2 --replicate-wild-ignore-table=db1.t% --skip_slave_start=FALSE]
+[connection master]
+#
+# Execute 'CREATE DATABASE db1' on Master.
+#
+CREATE DATABASE db1;
+#
+# Sync with Slave (using gtid values)
+#
+include/sync_slave_sql_with_master.inc
+#
+# Check that even after sync is completed 'db1' does not exists
+# on Slave which implies that 'CREATE DATABASE db1' is filtered
+# out.
+#
+USE db1;
+ERROR 42000: Unknown database 'db1'
+#
+# Execute other database commands (ALTER/DROP) on Master.
+#
+[connection master]
+ALTER DATABASE db1 CHARACTER SET latin1;
+DROP DATABASE db1;
+#
+# Check that we are able to sync with slave successfully
+# which implies that those commands are filtered out.
+# If they were executed by Slave, that will break replication
+# as we do not have 'db1' database on Slave.
+include/sync_slave_sql_with_master.inc
+#
+# Cleanup
+#
+include/rpl_end.inc
index bb36646fa85bbc8f77e162c27b6cb68bae3798fe..b29efdd60e4ec86135da6c531a468fa27fb41af0 100644 (file)
@@ -281,7 +281,7 @@ INSERT INTO t1 VALUES (1, 'on master', NULL);
 call mtr.add_suppression("Slave SQL.*Duplicate entry .1. for key .PRIMARY.. on query.* Error_code: 1062");
 call mtr.add_suppression("Slave SQL.*Request to stop slave SQL Thread received while applying a group that has non-transactional changes; waiting for completion of the group");
 Heartbeat events are received while sql thread stopped (1 means 'yes'): 1
-include/stop_slave.inc
+include/stop_slave_io.inc
 DELETE FROM t1;
 include/start_slave.inc
 include/sync_slave_sql_with_master.inc
index fb4c0ad9943ae27e8fe90d258900d41e053edbef..0cd374d925f04c9f9a263242b0e9e98dd2aa4a9f 100644 (file)
@@ -233,29 +233,39 @@ include/wait_for_slave_io_error.inc [errno=1593]
 include/stop_slave.inc
 TRUNCATE mysql.general_log;
 START SLAVE USER='root' PASSWORD='secret';
-include/stop_slave.inc
+include/wait_for_slave_io_error.inc [errno=1045]
+include/stop_slave_sql.inc
 START SLAVE USER = 'root' PASSWORD = '<secret>';
-include/stop_slave.inc
+include/wait_for_slave_io_error.inc [errno=1045]
+include/stop_slave_sql.inc
 TRUNCATE mysql.general_log;
 START SLAVE IO_THREAD USER='root' PASSWORD='secret' DEFAULT_AUTH= 'auth_test_plugin' PLUGIN_DIR= 'PLUGIN_AUTH_DIR';
-include/stop_slave.inc
+include/wait_for_slave_io_error.inc [errno=1045]
+include/stop_slave_sql.inc
 START SLAVE IO_THREAD USER = 'root' PASSWORD = '<secret>' DEFAULT_AUTH = 'auth_test_plugin' PLUGIN_DIR = 'PLUGIN_AUTH_DIR';
-include/stop_slave.inc
+include/wait_for_slave_io_error.inc [errno=1045]
+include/stop_slave_sql.inc
 TRUNCATE mysql.general_log;
 START SLAVE IO_THREAD, SQL_THREAD USER='root' PASSWORD='secret' DEFAULT_AUTH= 'auth_test_plugin' PLUGIN_DIR= 'PLUGIN_AUTH_DIR';
-include/stop_slave.inc
+include/wait_for_slave_io_error.inc [errno=1045]
+include/stop_slave_sql.inc
 START SLAVE IO_THREAD, SQL_THREAD USER = 'root' PASSWORD = '<secret>' DEFAULT_AUTH = 'auth_test_plugin' PLUGIN_DIR = 'PLUGIN_AUTH_DIR';
-include/stop_slave.inc
+include/wait_for_slave_io_error.inc [errno=1045]
+include/stop_slave_sql.inc
 TRUNCATE mysql.general_log;
 START SLAVE IO_THREAD, SQL_THREAD UNTIL MASTER_LOG_FILE='dummy-log.000001', MASTER_LOG_POS=116 USER='root' PASSWORD='secret' DEFAULT_AUTH= 'auth_test_plugin' PLUGIN_DIR= 'PLUGIN_AUTH_DIR';
-include/stop_slave.inc
+include/wait_for_slave_io_error.inc [errno=1045]
+include/stop_slave_sql.inc
 START SLAVE IO_THREAD, SQL_THREAD UNTIL MASTER_LOG_FILE = 'dummy-log.000001', MASTER_LOG_POS = 116 USER = 'root' PASSWORD = '<secret>' DEFAULT_AUTH = 'auth_test_plugin' PLUGIN_DIR = 'PLUGIN_AUTH_DIR';
-include/stop_slave.inc
+include/wait_for_slave_io_error.inc [errno=1045]
+include/stop_slave_sql.inc
 TRUNCATE mysql.general_log;
 START SLAVE IO_THREAD, SQL_THREAD UNTIL RELAY_LOG_FILE='dummy-log.000001', RELAY_LOG_POS=116 USER='root' PASSWORD='secret' DEFAULT_AUTH= 'auth_test_plugin' PLUGIN_DIR= 'PLUGIN_AUTH_DIR';
-include/stop_slave.inc
+include/wait_for_slave_io_error.inc [errno=1045]
+include/stop_slave_sql.inc
 START SLAVE IO_THREAD, SQL_THREAD UNTIL RELAY_LOG_FILE = 'dummy-log.000001', RELAY_LOG_POS = 116 USER = 'root' PASSWORD = '<secret>' DEFAULT_AUTH = 'auth_test_plugin' PLUGIN_DIR = 'PLUGIN_AUTH_DIR';
-include/stop_slave.inc
+include/wait_for_slave_io_error.inc [errno=1045]
+include/stop_slave_sql.inc
 SET GLOBAL log_output= @old_log_output;
 TRUNCATE mysql.general_log;
 include/start_slave.inc
index 8bce22630432b8801fd95cbf3379d8160aa7ce5a..0f3719cd57b373fd609d510af2c1449df20fb13a 100644 (file)
@@ -111,7 +111,19 @@ BEGIN;
 Got one of the listed errors
 COMMIT;
 include/diff_tables.inc [master:t1,slave:t1]
-######### 8 - Bug#55375(Regression Bug) Transaction bigger than  ##########
+####### 8 - LOAD DATA INFILE INTO TABLE #######
+[connection master]
+CREATE TABLE t6 (a varchar(20)) ENGINE=Innodb;
+LOAD DATA INFILE 'temp_file' INTO TABLE t6;
+ERROR HY000: Multi-statement transaction required more than 'max_binlog_cache_size' bytes of storage; increase this mysqld variable and try again
+include/assert.inc [assert that the above Event has not been added to binlog]
+include/assert.inc [Check that the LOAD DATA didn't add any data into the table]
+include/sync_slave_sql_with_master.inc
+include/assert.inc [Check that the LOAD DATA didn't add any data into the table]
+[connection master]
+DROP TABLE t6;
+include/sync_slave_sql_with_master.inc
+######### 9 - Bug#55375(Regression Bug) Transaction bigger than  ##########
 #########     max_binlog_cache_size crashes slave                ##########
 # [ On Slave ]
 SET GLOBAL max_binlog_cache_size = 4096;
diff --git a/mysql-wsrep-5.6/mysql-test/suite/rpl/r/rpl_mts_stop_slave_report_pos.result b/mysql-wsrep-5.6/mysql-test/suite/rpl/r/rpl_mts_stop_slave_report_pos.result
new file mode 100644 (file)
index 0000000..efb3e19
--- /dev/null
@@ -0,0 +1,101 @@
+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 DATABASE db1;
+CREATE DATABASE db2;
+CREATE TABLE db1.t1 ( id INT(11) PRIMARY KEY ) ENGINE=INNODB;
+CREATE TABLE db2.t1 ( id INT(11) PRIMARY KEY ) ENGINE=INNODB;
+INSERT INTO db1.t1 VALUES (40);
+INSERT INTO db2.t1 VALUES (40);
+include/sync_slave_sql_with_master.inc
+SET @save_debug = @@GLOBAL.debug;
+SET @save_slave_checkpoint_group= @@GLOBAL.slave_checkpoint_group;
+SET @save_slave_checkpoint_period= @@GLOBAL.slave_checkpoint_period;
+SET GLOBAL slave_checkpoint_group=512;
+SET GLOBAL slave_checkpoint_period=3000000;
+[connection master]
+insert into db1.t1 values (30);
+insert into db2.t1 values (30);
+insert into db1.t1 values (29);
+insert into db2.t1 values (29);
+insert into db1.t1 values (28);
+insert into db2.t1 values (28);
+insert into db1.t1 values (27);
+insert into db2.t1 values (27);
+insert into db1.t1 values (26);
+insert into db2.t1 values (26);
+insert into db1.t1 values (25);
+insert into db2.t1 values (25);
+insert into db1.t1 values (24);
+insert into db2.t1 values (24);
+insert into db1.t1 values (23);
+insert into db2.t1 values (23);
+insert into db1.t1 values (22);
+insert into db2.t1 values (22);
+insert into db1.t1 values (21);
+insert into db2.t1 values (21);
+insert into db1.t1 values (20);
+insert into db2.t1 values (20);
+insert into db1.t1 values (19);
+insert into db2.t1 values (19);
+insert into db1.t1 values (18);
+insert into db2.t1 values (18);
+insert into db1.t1 values (17);
+insert into db2.t1 values (17);
+insert into db1.t1 values (16);
+insert into db2.t1 values (16);
+insert into db1.t1 values (15);
+insert into db2.t1 values (15);
+insert into db1.t1 values (14);
+insert into db2.t1 values (14);
+insert into db1.t1 values (13);
+insert into db2.t1 values (13);
+insert into db1.t1 values (12);
+insert into db2.t1 values (12);
+insert into db1.t1 values (11);
+insert into db2.t1 values (11);
+insert into db1.t1 values (10);
+insert into db2.t1 values (10);
+insert into db1.t1 values (9);
+insert into db2.t1 values (9);
+insert into db1.t1 values (8);
+insert into db2.t1 values (8);
+insert into db1.t1 values (7);
+insert into db2.t1 values (7);
+insert into db1.t1 values (6);
+insert into db2.t1 values (6);
+insert into db1.t1 values (5);
+insert into db2.t1 values (5);
+insert into db1.t1 values (4);
+insert into db2.t1 values (4);
+insert into db1.t1 values (3);
+insert into db2.t1 values (3);
+insert into db1.t1 values (2);
+insert into db2.t1 values (2);
+insert into db1.t1 values (1);
+insert into db2.t1 values (1);
+include/sync_slave_io_with_master.inc
+[connection slave]
+include/stop_slave_io.inc
+[connection master]
+BEGIN;
+INSERT INTO db1.t1 VALUES (50);
+COMMIT;
+[connection slave]
+SET global debug="d,simulate_stop_when_mts_in_group";
+include/start_slave_io.inc
+include/wait_for_slave_sql_to_stop.inc
+include/assert_grep.inc [Assert that the expected entry is in the error log during STOP SLAVE]
+SET GLOBAL debug=@save_debug;
+SET @@GLOBAL.slave_checkpoint_group= @save_slave_checkpoint_group;
+set @@GLOBAL.slave_checkpoint_period= @save_slave_checkpoint_period;
+include/start_slave.inc
+include/assert_grep.inc [Assert that the expected entry is in the error log during START SLAVE]
+[connection master]
+include/sync_slave_sql_with_master.inc
+[connection master]
+DROP DATABASE db1;
+DROP DATABASE db2;
+include/rpl_end.inc
index 670350f132203480bee134467098ce1e7152ce6a..ecd7d589c13cfd773735952fab33222f5ae0f8ec 100644 (file)
@@ -112,7 +112,19 @@ BEGIN;
 Got one of the listed errors
 COMMIT;
 include/diff_tables.inc [master:t1,slave:t1]
-######### 8 - Bug#55375(Regression Bug) Transaction bigger than  ##########
+####### 8 - LOAD DATA INFILE INTO TABLE #######
+[connection master]
+CREATE TABLE t6 (a varchar(20)) ENGINE=Innodb;
+LOAD DATA INFILE 'temp_file' INTO TABLE t6;
+ERROR HY000: Multi-statement transaction required more than 'max_binlog_cache_size' bytes of storage; increase this mysqld variable and try again
+include/assert.inc [assert that the above Event has not been added to binlog]
+include/assert.inc [Check that the LOAD DATA didn't add any data into the table]
+include/sync_slave_sql_with_master.inc
+include/assert.inc [Check that the LOAD DATA didn't add any data into the table]
+[connection master]
+DROP TABLE t6;
+include/sync_slave_sql_with_master.inc
+######### 9 - Bug#55375(Regression Bug) Transaction bigger than  ##########
 #########     max_binlog_cache_size crashes slave                ##########
 # [ On Slave ]
 SET GLOBAL max_binlog_cache_size = 4096;
index 718018434e1823f4e9391352c4011c52fbcde369..1f9a7b20871a8fa70248237752187fb12748671d 100644 (file)
@@ -16,7 +16,7 @@ SET GLOBAL debug="+d,inject_tblmap_same_id_maps_diff_table";
 include/start_slave.inc
 UPDATE t1_11753004, t2_11753004 SET t1_11753004.c1=3, t2_11753004.c1=4 WHERE t1_11753004.c1=1 OR t2_11753004.c1=2;
 include/wait_for_slave_sql_error.inc [errno=1593 ]
-include/stop_slave.inc
+include/stop_slave_io.inc
 SET GLOBAL debug="-d,inject_tblmap_same_id_maps_diff_table";
 include/start_slave.inc
 include/rpl_reset.inc
index 8d752d71d9cb03a3a333af6f4dfc1b2a8d1e53e8..30a0dab0b556f88ac407723db50a23d665376f8b 100644 (file)
@@ -6,6 +6,7 @@ Note    ####    Storing MySQL user name or password information in the master info rep
 START SLAVE;
 call mtr.add_suppression("Slave SQL.*Unable to use slave.s temporary directory.* Error_code: 12");
 include/wait_for_slave_sql_error.inc [errno=12]
+include/wait_for_slave_io_to_start.inc
 include/stop_slave_io.inc
 RESET SLAVE;
 include/rpl_end.inc
index d60e2a3686d02c44aa5a7b5b20d59519925645c0..b3ccf737ff491bf7f4638952622d3101ed046afb 100644 (file)
@@ -13,14 +13,12 @@ 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.
 start slave;
-insert into t1 values (1);
-select * from t1;
-t
-stop slave;
-include/wait_for_slave_to_stop.inc
+include/wait_for_slave_io_error.inc [errno=1045]
+include/stop_slave_sql.inc
 change master to master_ssl=1 , master_ssl_ca ='MYSQL_TEST_DIR/std_data/cacert.pem', master_ssl_cert='MYSQL_TEST_DIR/std_data/client-cert.pem', master_ssl_key='MYSQL_TEST_DIR/std_data/client-key.pem';
 start slave;
 include/wait_for_slave_to_start.inc
+insert into t1 values (1);
 include/sync_slave_sql_with_master.inc
 select * from t1;
 t
index 8bce22630432b8801fd95cbf3379d8160aa7ce5a..0f3719cd57b373fd609d510af2c1449df20fb13a 100644 (file)
@@ -111,7 +111,19 @@ BEGIN;
 Got one of the listed errors
 COMMIT;
 include/diff_tables.inc [master:t1,slave:t1]
-######### 8 - Bug#55375(Regression Bug) Transaction bigger than  ##########
+####### 8 - LOAD DATA INFILE INTO TABLE #######
+[connection master]
+CREATE TABLE t6 (a varchar(20)) ENGINE=Innodb;
+LOAD DATA INFILE 'temp_file' INTO TABLE t6;
+ERROR HY000: Multi-statement transaction required more than 'max_binlog_cache_size' bytes of storage; increase this mysqld variable and try again
+include/assert.inc [assert that the above Event has not been added to binlog]
+include/assert.inc [Check that the LOAD DATA didn't add any data into the table]
+include/sync_slave_sql_with_master.inc
+include/assert.inc [Check that the LOAD DATA didn't add any data into the table]
+[connection master]
+DROP TABLE t6;
+include/sync_slave_sql_with_master.inc
+######### 9 - Bug#55375(Regression Bug) Transaction bigger than  ##########
 #########     max_binlog_cache_size crashes slave                ##########
 # [ On Slave ]
 SET GLOBAL max_binlog_cache_size = 4096;
index e0920dd2c26fe1212a3d136d07486a88a49830e1..776f68211bb0adfcafa20742cefb7bdb7f655373 100644 (file)
@@ -9,6 +9,11 @@
 #  Do not use any TAB characters for whitespace.
 #
 ##############################################################################
+# Codership disabled tests begin here
+# Tests that have disabler=CODERSHIP will be forcefully run with "./mtr --enable-disabled" by Jenkins
+rpl_sporadic_master : Issue#330 2018-05-16 CODERSHIP https://github.com/codership/mysql-wsrep/issues/330
+rpl_sync : Issue#330 2018-05-16 CODERSHIP https://github.com/codership/mysql-wsrep/issues/330
+# Codership disabled tests end here
 
 rpl_row_create_table      : Bug#11759274 2010-02-27 andrei failed different way than earlier with bug#45576
 rpl_delayed_slave         : Bug#11764654 2010-11-09 andrei rpl_delayed_slave fails sporadically in pb
index 1d67937e5b93262ed85ec10f02bd7fa0baba8b75..40ff298886d111c48c3df26cfd15200b36a11bba 100644 (file)
@@ -58,6 +58,11 @@ call mtr.add_suppression("Slave.* @@SESSION.GTID_NEXT cannot be set to UUID:NUMB
 --source include/wait_for_slave_sql_error.inc
 
 # Reset slave.
+# On slower machines, when the SQL thread is killed due to error
+# ER_CANT_SET_GTID_NEXT_TO_GTID_WHEN_GTID_MODE_IS_OFF, it may happen that the IO
+# thread is also killed while it is still reading events from the binlog.
+--let $slave_io_errno= 2013 #CR_SERVER_LOST
+--let $rpl_allow_error= 1
 --source include/stop_slave.inc
 RESET MASTER;
 RESET SLAVE;
index b2f5bda0ff371262414eb2f8f446e703bc5f663c..9ac63fb98b9872cf2008c26d88efe29d45946ce7 100644 (file)
@@ -24,6 +24,7 @@ START SLAVE io_thread;
 # the error with the err_count exported in the retries field, we should
 # get 3 retries (one per second) when the IO thread gives up, ie, 
 # when it stops.
+--let $slave_io_errno= 2005
 -- source include/wait_for_slave_io_to_stop.inc
 -- let $error= query_get_value("SHOW SLAVE STATUS", Last_IO_Error, 1)
 if (!`SELECT "$error" LIKE "%retries: 3"`)
index b057c260f0e0f29ce230f9f9d0ea8f14dbdf91dc..8a0023f2bafe71c1310629269843b7a05b121c14 100644 (file)
@@ -17,7 +17,7 @@ CHANGE MASTER TO MASTER_USER= '', MASTER_PASSWORD= '';
 START SLAVE;
 --let $slave_io_errno= 1045, 1593
 --source include/wait_for_slave_io_error.inc
---source include/stop_slave.inc
+--source include/stop_slave_sql.inc
 
 --replace_column 2 ####
 CHANGE MASTER TO MASTER_USER= 'root', MASTER_PASSWORD= '';
diff --git a/mysql-wsrep-5.6/mysql-test/suite/rpl/t/rpl_db_stmts_ignored.test b/mysql-wsrep-5.6/mysql-test/suite/rpl/t/rpl_db_stmts_ignored.test
new file mode 100644 (file)
index 0000000..a03c9cc
--- /dev/null
@@ -0,0 +1,91 @@
+#
+# ==== Purpose ====
+#
+# This test script is created to test how filtering rules act
+# against CREATE/ALTER/DROP DATABASE commands (CAD commands)
+# Also it will check that there will be gtid empty transaction
+# created after these CAD commands are filtered out.
+#
+# ==== Implementation ====
+#
+# USE-CASE 1: Test --replication-ignore-db=db1 filter
+#
+# S1: Install --replication-ignore-db=db1 filter on slave
+# S2: Try all three CAD statements (CREATE/ALTER/DROP)
+# S3: Check that they are filtered and check that there is no gap in
+#     GTID_EXECUTED_SET.
+# USE-CASE 2: Repeat S1-S3 steps against --replicate-do-db=db2 filter rule.
+# USE-CASE 3: Repeat S1-S3 steps against --replicate-wild-ignore-table=db1.%
+#             filter rule.
+# USE-CASE 4: Repeat S1-S3 steps against --replicate-do-db=db2 and
+#             --replicate-wild-ignore-table=db1.t% filter rule.
+#
+#  ==== References ====
+#
+# Bug#27308751 FILTERED REPLICATION LEAVES GTID HOLES WITH CREATE DATABASE
+#
+--source include/have_gtid.inc
+--source include/have_binlog_format_statement.inc
+--source include/master-slave.inc
+
+--echo #
+--echo # Test replicate-ignore-db=db1 filter
+--echo #
+#
+# Test replicate-ignore-db=db1 filter rule on
+# CREATE/ALTER/DROP DATABASE 'db1' command
+# These commands should be skipped.
+#
+--let $rpl_server_number= 2
+--let $rpl_start_with_gtids= 1
+--let $rpl_server_parameters=--replicate-ignore-db=db1 --skip_slave_start=FALSE
+--source include/rpl_restart_server.inc
+--source extra/rpl_tests/rpl_db_stmts_ignored.inc
+
+--echo #
+--echo # Test replicate-do-db=db2 filter
+--echo #
+#
+# Test replicate-do-db=db2 filter rule on
+# CREATE/ALTER/DROP DATABASE 'db1' command
+# These commands should be skipped.
+#
+--let $rpl_server_number= 2
+--let $rpl_start_with_gtids= 1
+--let $rpl_server_parameters=--replicate-do-db=db2 --skip_slave_start=FALSE
+--source include/rpl_restart_server.inc
+--source extra/rpl_tests/rpl_db_stmts_ignored.inc
+
+--echo #
+--echo # Test replicate-wild-ignore-table=db1.% filter
+--echo #
+#
+# Test replicate-wild-ignore-table=db1.% filter rule on
+# CREATE/ALTER/DROP DATABASE 'db1' command.
+# These commands should be skipped.
+#
+--let $rpl_server_number= 2
+--let $rpl_start_with_gtids= 1
+--let $rpl_server_parameters=--replicate-wild-ignore-table=db1.% --skip_slave_start=FALSE
+--source include/rpl_restart_server.inc
+--source extra/rpl_tests/rpl_db_stmts_ignored.inc
+
+--echo #
+--echo # Test replicate-wild-ignore-table=db1.% and --replicate-do-db=db2
+--echo # filter combination
+#
+# Test replicate-wild-ignore-table=db1.% and --replicate-do-db=db2
+# filter combination rule on CREATE/ALTER/DROP DATABASE 'db1' command.
+# These commands should be skipped.
+#
+--let $rpl_server_number= 2
+--let $rpl_start_with_gtids= 1
+--let $rpl_server_parameters= --replicate-do-db=db2 --replicate-wild-ignore-table=db1.t% --skip_slave_start=FALSE
+--source include/rpl_restart_server.inc
+--source extra/rpl_tests/rpl_db_stmts_ignored.inc
+
+--echo #
+--echo # Cleanup
+--echo #
+--source include/force_restart.inc
+--source include/rpl_end.inc
index 91d7178f9e25c6ba91d509dad3a46f964e2d8d9f..208620c38c3f0405c90fed201a1f92cb9aab3b75 100644 (file)
@@ -389,7 +389,7 @@ sleep 2;
 let $rcvd_heartbeats_after= query_get_value(SHOW STATUS LIKE 'slave_received_heartbeats', Value, 1);
 let $result= query_get_value(SELECT ($rcvd_heartbeats_after - $rcvd_heartbeats_before) > 0 AS Result, Result, 1);
 --echo Heartbeat events are received while sql thread stopped (1 means 'yes'): $result
---source include/stop_slave.inc
+--source include/stop_slave_io.inc
 DELETE FROM t1;
 --source include/start_slave.inc
 --connection master
index 954ca729ee3cbf329cba2bb245b48a515ce30120..cfffcc72ffabcb8f3a7c1034f9532475ba3e2f11 100644 (file)
@@ -319,55 +319,76 @@ START SLAVE PASSWORD='secret';
 --let $slave_io_errno=1593
 --source include/wait_for_slave_io_error.inc
 
+--let $slave_io_errno= convert_error(ER_SLAVE_FATAL_ERROR)
 --source include/stop_slave.inc
 TRUNCATE mysql.general_log;
 START SLAVE USER='root' PASSWORD='secret';
 --let $rewritten= `SELECT argument FROM mysql.general_log WHERE argument LIKE "%PASSWORD = '<secret>'%"`
 # execute it to see if the rewrite generated a (syntatically) valid command 
---source include/stop_slave.inc
+--let $slave_io_errno= convert_error(ER_ACCESS_DENIED_ERROR)
+--source include/wait_for_slave_io_error.inc
+--source include/stop_slave_sql.inc
 --eval $rewritten
 
---source include/stop_slave.inc
+--let $slave_io_errno= convert_error(ER_ACCESS_DENIED_ERROR)
+--source include/wait_for_slave_io_error.inc
+--source include/stop_slave_sql.inc
 TRUNCATE mysql.general_log;
 --replace_result $PLUGIN_AUTH_DIR PLUGIN_AUTH_DIR
 --eval START SLAVE IO_THREAD USER='root' PASSWORD='secret' DEFAULT_AUTH= 'auth_test_plugin' PLUGIN_DIR= '$PLUGIN_AUTH_DIR'
 --let $rewritten= `SELECT argument FROM mysql.general_log WHERE argument LIKE "%PASSWORD = '<secret>'%"`
 # execute it to see if the rewrite generated a (syntatically) valid command 
---source include/stop_slave.inc
+--let $slave_io_errno= convert_error(ER_ACCESS_DENIED_ERROR)
+--source include/wait_for_slave_io_error.inc
+--source include/stop_slave_sql.inc
 --replace_result $PLUGIN_AUTH_DIR PLUGIN_AUTH_DIR
 --eval $rewritten
 
---source include/stop_slave.inc
+--let $slave_io_errno= convert_error(ER_ACCESS_DENIED_ERROR)
+--source include/wait_for_slave_io_error.inc
+--source include/stop_slave_sql.inc
 TRUNCATE mysql.general_log;
 --replace_result $PLUGIN_AUTH_DIR PLUGIN_AUTH_DIR
 --eval START SLAVE IO_THREAD, SQL_THREAD USER='root' PASSWORD='secret' DEFAULT_AUTH= 'auth_test_plugin' PLUGIN_DIR= '$PLUGIN_AUTH_DIR'
 --let $rewritten= `SELECT argument FROM mysql.general_log WHERE argument LIKE "%PASSWORD = '<secret>'%"`
 # execute it to see if the rewrite generated a (syntatically) valid command 
---source include/stop_slave.inc
+--let $slave_io_errno= convert_error(ER_ACCESS_DENIED_ERROR)
+--source include/wait_for_slave_io_error.inc
+--source include/stop_slave_sql.inc
 --replace_result $PLUGIN_AUTH_DIR PLUGIN_AUTH_DIR
 --eval $rewritten
 
---source include/stop_slave.inc
+--let $slave_io_errno= convert_error(ER_ACCESS_DENIED_ERROR)
+--source include/wait_for_slave_io_error.inc
+--source include/stop_slave_sql.inc
 TRUNCATE mysql.general_log;
 --replace_result $PLUGIN_AUTH_DIR PLUGIN_AUTH_DIR
 --eval START SLAVE IO_THREAD, SQL_THREAD UNTIL MASTER_LOG_FILE='dummy-log.000001', MASTER_LOG_POS=116 USER='root' PASSWORD='secret' DEFAULT_AUTH= 'auth_test_plugin' PLUGIN_DIR= '$PLUGIN_AUTH_DIR'
 --let $rewritten= `SELECT argument FROM mysql.general_log WHERE argument LIKE "%PASSWORD = '<secret>'%"`
 # execute it to see if the rewrite generated a (syntatically) valid command 
---source include/stop_slave.inc
+--let $slave_io_errno= convert_error(ER_ACCESS_DENIED_ERROR)
+--source include/wait_for_slave_io_error.inc
+--source include/stop_slave_sql.inc
 --replace_result $PLUGIN_AUTH_DIR PLUGIN_AUTH_DIR
 --eval $rewritten
 
---source include/stop_slave.inc
+--let $slave_io_errno= convert_error(ER_ACCESS_DENIED_ERROR)
+--source include/wait_for_slave_io_error.inc
+--source include/stop_slave_sql.inc
 TRUNCATE mysql.general_log;
 --replace_result $PLUGIN_AUTH_DIR PLUGIN_AUTH_DIR
 --eval START SLAVE IO_THREAD, SQL_THREAD UNTIL RELAY_LOG_FILE='dummy-log.000001', RELAY_LOG_POS=116 USER='root' PASSWORD='secret' DEFAULT_AUTH= 'auth_test_plugin' PLUGIN_DIR= '$PLUGIN_AUTH_DIR'
 --let $rewritten= `SELECT argument FROM mysql.general_log WHERE argument LIKE "%PASSWORD = '<secret>'%"`
 # execute it to see if the rewrite generated a (syntatically) valid command 
---source include/stop_slave.inc
+--let $slave_io_errno= convert_error(ER_ACCESS_DENIED_ERROR)
+--source include/wait_for_slave_io_error.inc
+--source include/stop_slave_sql.inc
 --replace_result $PLUGIN_AUTH_DIR PLUGIN_AUTH_DIR
 --eval $rewritten
 
---source include/stop_slave.inc
+--let $slave_io_errno= convert_error(ER_ACCESS_DENIED_ERROR)
+--source include/wait_for_slave_io_error.inc
+--source include/stop_slave_sql.inc
 
 --enable_warnings
 
diff --git a/mysql-wsrep-5.6/mysql-test/suite/rpl/t/rpl_mts_stop_slave_report_pos-slave.opt b/mysql-wsrep-5.6/mysql-test/suite/rpl/t/rpl_mts_stop_slave_report_pos-slave.opt
new file mode 100644 (file)
index 0000000..b424c90
--- /dev/null
@@ -0,0 +1 @@
+--relay-log-info-repository=TABLE --master-info-repository=TABLE --slave_transaction_retries=0 --sync-master-info=1
diff --git a/mysql-wsrep-5.6/mysql-test/suite/rpl/t/rpl_mts_stop_slave_report_pos.test b/mysql-wsrep-5.6/mysql-test/suite/rpl/t/rpl_mts_stop_slave_report_pos.test
new file mode 100644 (file)
index 0000000..d764c47
--- /dev/null
@@ -0,0 +1,131 @@
+# ==== Purpose ====
+#
+# Verify that the positions that are reported by the applier thread during
+# STOP SLAVE are the same as that of the most recent checkpoint in case of
+# Multi Threaded Slave.
+#
+# ==== Implementation ====
+#
+# 1) Create two databases and do some DML operations on these databases.
+# 2) Sync the slave applier with master to insure that a checkpoint is done.
+# 3) Set bigger values for slave_checkpoint_period/group so that no further
+#    checkpoints are done on slave server.
+# 4) Execute few more DMLS on master and wait till they are applied on slave.
+# 5) This is to prove that applier thread has few more committed transactions
+#    after the checkpoint done at step 2.
+# 6) Execute STOP SLAVE command.
+# 7) Assert that the positions that are reported in error log are as per the
+#    latest checkpoint.
+#
+# ==== References ====
+#
+# Bug#27300658: IN MTS SQL THREAD EXITING AND INITIALIZING
+# MESSAGE WITH DIFFERENT POSITION
+
+# This test case is binary log format agnostic
+--source include/have_binlog_format_row.inc
+--source include/have_debug.inc
+--source include/only_mts_slave_parallel_workers.inc
+--source include/master-slave.inc
+
+# Do some DMLs on master and sync with slave to make sure that one checkpoint
+# is done.
+CREATE DATABASE db1;
+CREATE DATABASE db2;
+CREATE TABLE db1.t1 ( id INT(11) PRIMARY KEY ) ENGINE=INNODB;
+CREATE TABLE db2.t1 ( id INT(11) PRIMARY KEY ) ENGINE=INNODB;
+INSERT INTO db1.t1 VALUES (40);
+INSERT INTO db2.t1 VALUES (40);
+--source include/sync_slave_sql_with_master.inc
+
+# Save the global variables that are being modified. Set bigger values for
+# slave_checkpoint_group/period so that no further checkpoints are done
+# automatically.
+SET @save_debug = @@GLOBAL.debug;
+SET @save_slave_checkpoint_group= @@GLOBAL.slave_checkpoint_group;
+SET @save_slave_checkpoint_period= @@GLOBAL.slave_checkpoint_period;
+SET GLOBAL slave_checkpoint_group=512;
+SET GLOBAL slave_checkpoint_period=3000000;
+
+# Do some DMLs on master.
+--source include/rpl_connection_master.inc
+--let $i=30
+while ($i)
+{
+  --eval insert into db1.t1 values ($i)
+  --eval insert into db2.t1 values ($i)
+  dec $i;
+}
+--source include/sync_slave_io_with_master.inc
+
+# Wait till all the transactions are applied on slave. This will ensure that
+# at the time of STOP SLAVE few more committited transactions are present
+# above the recent LWM.
+--source include/rpl_connection_slave.inc
+--let $table=db1.t1
+--let $count=31
+--source include/wait_until_rows_count.inc
+
+--let $table=db2.t1
+--let $count=31
+--source include/wait_until_rows_count.inc
+--source include/stop_slave_io.inc
+
+# 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
+
+
+# Initiate one more DML on master. While the DML is being processed by slave
+# applier it will receive a STOP SLAVE due to debug simulation. Applier will
+# execute gracefully after completing the current group in progress and print
+# appropriate exit positions.
+--source include/rpl_connection_master.inc
+BEGIN;
+INSERT INTO db1.t1 VALUES (50);
+COMMIT;
+
+--source include/rpl_connection_slave.inc
+# Debug simulation which will ensure that SLAVE STOPS as a regular exit
+# without an error. This ensures we have the same scenario as that of the bug
+# report.
+SET global debug="d,simulate_stop_when_mts_in_group";
+--source include/start_slave_io.inc
+
+--source include/wait_for_slave_sql_to_stop.inc
+--let $exec_master_log_pos= query_get_value(SHOW SLAVE STATUS, Exec_Master_Log_Pos, 1)
+--let $exec_master_log_file= query_get_value(SHOW SLAVE STATUS, Relay_Master_Log_File, 1)
+
+# Assert that the positions that are reported by the applier thread during
+# STOP SLAVE are the same as that of the most recent checkpoint in case of
+# Multi Threaded Slave.
+--let $assert_text= Assert that the expected entry is in the error log during STOP SLAVE
+--let $assert_file=$MYSQLTEST_VARDIR/log/mysqld.2.err
+--let $assert_only_after = Coordinator thread of multi-threaded slave is being stopped in the middle of assigning a group of events
+--let $assert_select= Slave SQL thread exiting, replication stopped in log '$exec_master_log_file' at position $exec_master_log_pos
+--let $assert_count= 1
+--source include/assert_grep.inc
+
+SET GLOBAL debug=@save_debug;
+SET @@GLOBAL.slave_checkpoint_group= @save_slave_checkpoint_group;
+set @@GLOBAL.slave_checkpoint_period= @save_slave_checkpoint_period;
+--source include/start_slave.inc
+
+# Assert that the positions that are reported by the applier thread during
+# START SLAVE are the same as the positions reported during STOP SLAVE.
+--let $assert_text= Assert that the expected entry is in the error log during START SLAVE
+--let $assert_file=$MYSQLTEST_VARDIR/log/mysqld.2.err
+--let $assert_only_after = Slave SQL thread exiting, replication stopped in log
+--let $assert_select= Slave SQL thread initialized, starting replication in log '$exec_master_log_file' at position $exec_master_log_pos
+--let $assert_count= 1
+--source include/assert_grep.inc
+
+--source include/rpl_connection_master.inc
+--source include/sync_slave_sql_with_master.inc
+
+--source include/rpl_connection_master.inc
+DROP DATABASE db1;
+DROP DATABASE db2;
+--source include/rpl_end.inc
index e04e91e7dc104004b8aeae2163e807e6a71371b5..2de2a37fe313421116535092e640010f03ae3aeb 100644 (file)
@@ -43,6 +43,7 @@ let $count= 0;
 let $table= worker_proc_list;
 source include/wait_until_rows_count.inc;
 
+--let $slave_sql_errno= convert_error(ER_MTS_INCONSISTENT_DATA)
 source include/wait_for_slave_sql_to_stop.inc;
 
 #
@@ -109,6 +110,7 @@ let $count= 0;
 let $table= worker_proc_list;
 source include/wait_until_rows_count.inc;
 
+--let $slave_sql_errno= convert_error(ER_DUP_ENTRY)
 source include/wait_for_slave_sql_to_stop.inc;
 delete from t1 where a=3;
 
index fd240a8d626190d32da326345f847f499e8a7e35..1c92891ff738cabf76eeefb4c041f134ffc29411 100644 (file)
@@ -72,6 +72,7 @@ while ($restarts)
 }
 
 --echo # Stop the SQL thread (it should be in the middle of the transaction/group)
+--let $slave_sql_errno= convert_error(ER_MTS_INCONSISTENT_DATA)
 --source include/stop_slave_sql.inc
 
 --echo # Remove the debug point and restart the both threads
index e370e950f9c171874301442a0bbca993a96e94c0..176903abccce3ddae55db40852cb8fa1602890ee 100644 (file)
@@ -40,7 +40,7 @@ SET GLOBAL debug="+d,inject_tblmap_same_id_maps_diff_table";
 # wait for error 1593 (ER_SLAVE_FATAL_ERROR)
 --let $slave_sql_errno=1593 
 --source include/wait_for_slave_sql_error.inc
---source include/stop_slave.inc
+--source include/stop_slave_io.inc
 
 # clean up
 SET GLOBAL debug="-d,inject_tblmap_same_id_maps_diff_table";
index 042d57a94d15cf8b9d4d92c848fd6d5264df0ce1..af3cbb0b23006346a754517a4985ab5e9a8a1091 100644 (file)
@@ -66,7 +66,7 @@ call mtr.add_suppression("Slave SQL.*Table .test.t3. doesn.t exist.* Error_code:
 call mtr.add_suppression("The slave coordinator and worker threads are stopped, possibly leaving data in inconsistent state");
 
 # in MTS case error is either of two:
-#--let $slave_sql_errno= 1146,1593
+--let $slave_sql_errno= 1146,1593
 # whereas in the single-threaded case:
 # 1146 = ER_NO_SUCH_TABLE
 #--let $slave_sql_errno= 1146
index b99c71b1ca03ce23222c0daffcae75826be97292..5ed80685b223d510ad39a88ec428dcaafa2e6a96 100644 (file)
@@ -14,7 +14,7 @@ START SLAVE;
 call mtr.add_suppression("Slave SQL.*Unable to use slave.s temporary directory.* Error_code: 12");
 --let $slave_sql_errno= 12
 source include/wait_for_slave_sql_error.inc;
-
+--source include/wait_for_slave_io_to_start.inc
 --source include/stop_slave_io.inc
 RESET SLAVE;
 
index 4f7c3d6b7769756631c04c49f548adde7ad222ed..db3f192ee4cc7ada2326ce2ae01f2c078026e003 100644 (file)
@@ -55,6 +55,7 @@ FLUSH PRIVILEGES;
 source include/stop_slave.inc;
 START SLAVE;
 source include/wait_for_slave_sql_to_start.inc;
+--let $slave_io_errno= convert_error(ER_ACCESS_DENIED_ERROR)
 source include/wait_for_slave_io_to_stop.inc;
 
 --echo ==== Verify that Slave IO thread stopped with error ====
index 7f0845da49372c7e9f71bd2d1dbb0a742ea08f98..5e537538481fc5138a04345a9ec66090191fd7a8 100644 (file)
@@ -37,6 +37,7 @@ 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.
+--let $slave_sql_errno= convert_error(ER_SLAVE_RELAY_LOG_READ_FAILURE)
 --source include/wait_for_slave_sql_to_stop.inc
 
 # Step 3) Before fix, when SQL thread is trying to acquire
index 006acc376f42b6f7da140a10061b6900a6ae1138..8de19292365a11e9575b98e753476c0276bf422e 100644 (file)
@@ -20,17 +20,11 @@ change master to master_user='replssl',master_password='';
 start slave;
 
 #showing that replication don't work
-connection master;
-insert into t1 values (1);
-#reasonable timeout for changes to propagate to slave
-let $wait_condition= SELECT COUNT(*) = 1 FROM t1;
-source include/wait_condition.inc;
-connection slave;
-select * from t1;
+--let $slave_io_errno= convert_error(ER_ACCESS_DENIED_ERROR)
+--source include/wait_for_slave_io_error.inc
+--source include/stop_slave_sql.inc
 
 #showing that replication could work with ssl params
-stop slave;
---source include/wait_for_slave_to_stop.inc
 --replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
 --replace_column 2 ####
 eval change master to master_ssl=1 , master_ssl_ca ='$MYSQL_TEST_DIR/std_data/cacert.pem', master_ssl_cert='$MYSQL_TEST_DIR/std_data/client-cert.pem', master_ssl_key='$MYSQL_TEST_DIR/std_data/client-key.pem';
@@ -39,6 +33,7 @@ start slave;
 
 #avoiding unneeded sleeps
 connection master;
+insert into t1 values (1);
 --source include/sync_slave_sql_with_master.inc
 
 #checking that replication is ok
index 794d8c8b1a22c86954e1552b012efcf30fb805e6..4580c0af929c94a6298cfa86ffb40c388a30b9e1 100644 (file)
@@ -9,6 +9,12 @@
 #  Do not use any TAB characters for whitespace.
 #
 ##############################################################################
+# Codership disabled tests begin here
+# Tests that have disabler=CODERSHIP will be forcefully run with "./mtr --enable-disabled" by Jenkins
+bootstrap : Issue#19 2014-11-21 CODERSHIP https://github.com/codership/mysql-wsrep/issues/19
+file_contents : Issue#4 2014-10-28 CODERSHIP https://github.com/codership/mysql-wsrep/issues/4
+range_none : Issue#330 2018-05-16 CODERSHIP https://github.com/codership/mysql-wsrep/issues/330
+# Codership disabled tests end here
 lowercase_table3         : Bug#11762269 2010-06-30 alik main.lowercase_table3 on Mac OSX
 read_many_rows_innodb    : Bug#11748886 2010-11-15 mattiasj report already exists
 sum_distinct-big         : Bug#11764126 2010-11-15 mattiasj was not tested
@@ -16,7 +22,5 @@ archive-big              : Bug#11817185 2011-03-10 Anitha Disabled since this le
 ds_mrr-big @solaris      : Bug#14168107 2012-04-03 Hemant disabled new test added by Olav SandstÃ¥,since this leads to timeout on Solaris on slow sparc servers
 mysql_embedded_client_test      : Bug#13964673 2012-04-16 amitbha since most of the test cases are failing
 mysql_client_test_embedded : Bug#16084066 2013-01-08 Disabled since this test is failing
-file_contents : Galera mysql-wsrep#4 2014-10-28 pstoev main.file_contents MTR test fails in mysql-wsrep 
-bootstrap : Galera mysql-wsrep#19 2014-11-21 pstoev Crash in LOGGER::error_log_print when printing a WSREP message 
 mysqlhotcopy_archive @solaris : DBD-mysql perl module not available on Solaris
 mysqlhotcopy_myisam @solaris  : DBD-mysql perl module not available on Solaris
diff --git a/mysql-wsrep-5.6/mysql-test/t/import_schema_mismatch.test b/mysql-wsrep-5.6/mysql-test/t/import_schema_mismatch.test
new file mode 100644 (file)
index 0000000..9957aa7
--- /dev/null
@@ -0,0 +1,34 @@
+#
+#Bug #27542720 SCHEMA MISMATCH - TABLE FLAGS DON'T MATCH,
+#             BUT FLAGS ARE NUMBERS
+#
+
+
+--source include/have_innodb.inc
+
+--let $MYSQLD_DATADIR=`select @@datadir`
+--let $DB = `SELECT DATABASE()`
+#--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
+
+CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB ROW_FORMAT=COMPACT;
+FLUSH TABLES t1 FOR EXPORT;
+--copy_file $MYSQLD_DATADIR/$DB/t1.ibd $MYSQL_TMP_DIR/t1.ibd
+--copy_file $MYSQLD_DATADIR/$DB/t1.cfg $MYSQL_TMP_DIR/t1.cfg
+
+UNLOCK TABLES;
+DROP TABLE t1;
+SET GLOBAL innodb_file_format=`Barracuda`;
+SET GLOBAL innodb_file_per_table= ON;
+CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
+ALTER TABLE t1 DISCARD TABLESPACE;
+--move_file $MYSQL_TMP_DIR/t1.ibd $MYSQLD_DATADIR/$DB/t1.ibd
+--move_file $MYSQL_TMP_DIR/t1.cfg $MYSQLD_DATADIR/$DB/t1.cfg
+
+--error ER_TABLE_SCHEMA_MISMATCH
+ALTER TABLE t1 IMPORT TABLESPACE;
+DROP TABLE t1;
+
+SET GLOBAL innodb_file_format=`Antelope`;
+
+--remove_file $MYSQLD_DATADIR/$DB/t1.ibd
+--remove_file $MYSQLD_DATADIR/$DB/t1.cfg
index 5847b90367ae5b3a9a36757c4548181aacf3292c..8ed1566baf525885993036e9de947ef114004554 100644 (file)
@@ -103,3 +103,53 @@ execute s using @a, @a;
 select 1 as a limit 4294967296,10;
 
 --echo End of 5.1 tests
+
+#
+# Bug #27998526 : FORCE INDEX DOESN'T TAKE EFFECT WHEN A QUERY HAS GROUP_BY,
+# ORDER_BY, AND LIMIT
+#
+
+
+CREATE TABLE t1 (id INT NOT NULL AUTO_INCREMENT,
+                 k INT,
+                 payload CHAR(100),
+                 PRIMARY KEY(id),
+                 KEY idx_k (k));
+
+INSERT INTO t1(k) VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
+ANALYZE TABLE t1;
+
+#problem query
+let query1= SELECT * FROM t1 FORCE INDEX (idx_k)
+  WHERE k BETWEEN 2 AND 5
+  GROUP BY id
+  ORDER BY id LIMIT 0,1;
+
+# no order by
+let query2= SELECT * FROM t1 FORCE INDEX (idx_k)
+  WHERE k BETWEEN 2 AND 5
+  GROUP BY id
+  LIMIT 0,1;
+
+#no group by
+let query3= SELECT * FROM t1 FORCE INDEX (idx_k)
+  WHERE k BETWEEN 2 AND 5
+  ORDER BY id LIMIT 0,1;
+
+#no limit
+let query4= SELECT * FROM t1 FORCE INDEX (idx_k)
+  WHERE k BETWEEN 2 AND 5
+  GROUP BY id
+  ORDER BY id;
+
+eval EXPLAIN $query1;
+eval EXPLAIN $query2;
+eval EXPLAIN $query3;
+eval EXPLAIN $query4;
+
+eval $query1;
+eval $query2;
+eval $query3;
+eval $query4;
+
+DROP TABLE t1;
index 3bfe0aa891f72cf27ba2e573b7bb73a4da8adffd..e2d5b40adbc0fe6d34f77dfbb807986de4c46266 100644 (file)
@@ -13,19 +13,21 @@ exec $MYSQLD --defaults-file=/path/with/no/extension --print-defaults 2>&1;
 --error 1
 exec $MYSQLD --defaults-file=/path/with.ext --print-defaults 2>&1;
 
---replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
+# Using $MYSQL_TEST_DIR_ABS which contains canonical path to the
+# test directory since --print-default prints the absolute path.
+--replace_result $MYSQL_TEST_DIR_ABS MYSQL_TEST_DIR
 --error 1
 exec $MYSQLD --defaults-file=relative/path/with.ext --print-defaults 2>&1;
 
---replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
+--replace_result $MYSQL_TEST_DIR_ABS MYSQL_TEST_DIR
 --error 1
 exec $MYSQLD --defaults-file=relative/path/without/extension --print-defaults 2>&1;
 
---replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
+--replace_result $MYSQL_TEST_DIR_ABS MYSQL_TEST_DIR
 --error 1
 exec $MYSQLD --defaults-file=with.ext --print-defaults 2>&1;
 
---replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
+--replace_result $MYSQL_TEST_DIR_ABS MYSQL_TEST_DIR
 --error 1
 exec $MYSQLD --defaults-file=no_extension --print-defaults 2>&1;
 
diff --git a/mysql-wsrep-5.6/mysql-test/t/sp_debug.test b/mysql-wsrep-5.6/mysql-test/t/sp_debug.test
new file mode 100644 (file)
index 0000000..a6d6e9f
--- /dev/null
@@ -0,0 +1,42 @@
+#
+--source include/have_debug.inc
+
+
+--echo #
+--echo # Bug#26040870 - ASSERT ON KILL'ING A STORED ROUTINE INVOCATION.
+--echo #
+
+CREATE TABLE t1 (a INT);
+DELIMITER |;
+CREATE FUNCTION f1() RETURNS INT
+BEGIN
+  INSERT INTO t1 VALUES (1);
+  RETURN 1;
+END|
+DELIMITER ;|
+
+--connect(con1,localhost,root)
+--let $sp_con_id= `SELECT CONNECTION_ID()`
+SET DEBUG_SYNC= "sp_lex_instr_before_exec_core SIGNAL sp_ready WAIT_FOR sp_finish";
+send SELECT f1();
+
+--connection default
+SET DEBUG_SYNC="now WAIT_FOR sp_ready";
+--replace_result $sp_con_id sp_con_id
+--eval KILL QUERY $sp_con_id
+SET DEBUG_SYNC="now SIGNAL sp_finish";
+
+--connection con1
+--echo # Diagnostics area is not set if routine statement execution is
+--echo # interrupted by the KILL operation. Accessing diagnostics area in such
+--echo # case results in the issue reported.
+--echo # Patch for the bug25586773, checks if diagnostics area is set before
+--echo # accessing it.
+--error ER_QUERY_INTERRUPTED
+reap;
+
+--connection default
+SET DEBUG_SYNC='RESET';
+DROP TABLE t1;
+DROP FUNCTION f1;
+disconnect con1;
diff --git a/mysql-wsrep-5.6/mysql-test/t/ssl_verify_identity-master.opt b/mysql-wsrep-5.6/mysql-test/t/ssl_verify_identity-master.opt
new file mode 100644 (file)
index 0000000..4607f83
--- /dev/null
@@ -0,0 +1,3 @@
+--ssl-ca=$MYSQL_TEST_DIR/std_data/ca-cert-verify-san.pem
+--ssl-key=$MYSQL_TEST_DIR/std_data/server-key-verify-san.pem
+--ssl-cert=$MYSQL_TEST_DIR/std_data/server-cert-verify-san.pem
diff --git a/mysql-wsrep-5.6/mysql-test/t/ssl_verify_identity.test b/mysql-wsrep-5.6/mysql-test/t/ssl_verify_identity.test
new file mode 100644 (file)
index 0000000..28c96c8
--- /dev/null
@@ -0,0 +1,53 @@
+# === Purpose ===
+# This test verifies that while verifying the server certificates
+# when ssl-verify-server-cert option is provided, the DNS/IPs provided
+# in the Subject Alternative Names field (which can be provided as an
+# extension in X509) are also checked for apart from the Common Name in
+# the subject. Applicable for openssl versions 1.0.2 and greater.
+#
+# === Related bugs and/or worklogs ===
+# Bug #16211011 - SSL CERTIFICATE SUBJECT ALT NAMES WITH IPS NOT RESPECTED WITH --SSL-VERIFY-SERVER-CERT
+#
+# Note that these test cases are written keeping in mind that the openssl version used by the system will
+# be 1.0.2+. For older versions of openssl, the test will be skipped.
+
+--source include/have_openssl.inc
+--source include/have_openssl_support.inc
+--source include/check_openssl_version.inc
+--source include/not_embedded.inc
+
+--echo ### Trying to connect without ssl. This should establish an unencrypted connection.
+--exec $MYSQL --skip-ssl test -e "SHOW STATUS LIKE 'Ssl_cipher'" 2> $MYSQLTEST_VARDIR/tmp/bug24732452_stderr
+--cat_file $MYSQLTEST_VARDIR/tmp/bug24732452_stderr
+--cat_file $MYSQLTEST_VARDIR/tmp/bug24732452_stderr
+
+--echo ### Trying to connect with ssl-mode as REQUIRED. This should establish an encrypted connection.
+--replace_result ECDHE-RSA-AES128-GCM-SHA256 SSL_CIPHER DHE-RSA-AES128-GCM-SHA256 SSL_CIPHER DHE-RSA-AES256-SHA SSL_CIPHER ECDHE-RSA-AES128-SHA256 SSL_CIPHER
+--exec $MYSQL --ssl-mode=REQUIRED --ssl-ca=$MYSQL_TEST_DIR/std_data/ca-cert-verify-san.pem  --ssl-cert=$MYSQL_TEST_DIR/std_data/client-cert-verify-san.pem --ssl-key=$MYSQL_TEST_DIR/std_data/client-key-verify-san.pem test -e "SHOW STATUS LIKE 'Ssl_cipher'" 2> $MYSQLTEST_VARDIR/tmp/bug24732452_stderr
+--cat_file $MYSQLTEST_VARDIR/tmp/bug24732452_stderr
+
+--echo ### Trying to connect with ssl-verify-server-cert option. This should establish an encrypted connection.
+--replace_result ECDHE-RSA-AES128-GCM-SHA256 SSL_CIPHER DHE-RSA-AES128-GCM-SHA256 SSL_CIPHER DHE-RSA-AES256-SHA SSL_CIPHER ECDHE-RSA-AES128-SHA256 SSL_CIPHER
+--exec $MYSQL --ssl-verify-server-cert --ssl-ca=$MYSQL_TEST_DIR/std_data/ca-cert-verify-san.pem  --ssl-cert=$MYSQL_TEST_DIR/std_data/client-cert-verify-san.pem --ssl-key=$MYSQL_TEST_DIR/std_data/client-key-verify-san.pem test -e "SHOW STATUS LIKE 'Ssl_cipher'" 2> $MYSQLTEST_VARDIR/tmp/bug24732452_stderr
+--cat_file $MYSQLTEST_VARDIR/tmp/bug24732452_stderr
+
+--echo ### Trying to connect with ssl-verify-server-cert option and hostname as nonexistent. This should fail.
+--error 1
+--exec $MYSQL --host=nonexistent --ssl-verify-server-cert --ssl-ca=$MYSQL_TEST_DIR/std_data/ca-cert-verify-san.pem  --ssl-cert=$MYSQL_TEST_DIR/std_data/client-cert-verify-san.pem --ssl-key=$MYSQL_TEST_DIR/std_data/client-key-verify-san.pem test -e "SHOW STATUS LIKE 'Ssl_cipher'" 2> $MYSQLTEST_VARDIR/tmp/bug24732452_stderr
+let SEARCH_FILE= $MYSQLTEST_VARDIR/tmp/bug24732452_stderr;
+--echo #Search for the error in the file
+--let SEARCH_PATTERN= ERROR 2005 \(HY000\): Unknown MySQL server host 'nonexistent'
+--source include/search_pattern_in_file.inc
+
+--echo ### Trying to connect with ssl-verify-server-cert option and hostname as localhost. This should establish an encrypted connection as localhost is present in Alternative Subject Name in the certificate.
+--replace_result ECDHE-RSA-AES128-GCM-SHA256 SSL_CIPHER DHE-RSA-AES128-GCM-SHA256 SSL_CIPHER DHE-RSA-AES256-SHA SSL_CIPHER ECDHE-RSA-AES128-SHA256 SSL_CIPHER
+--exec $MYSQL --host=localhost --ssl-verify-server-cert --ssl-ca=$MYSQL_TEST_DIR/std_data/ca-cert-verify-san.pem  --ssl-cert=$MYSQL_TEST_DIR/std_data/client-cert-verify-san.pem --ssl-key=$MYSQL_TEST_DIR/std_data/client-key-verify-san.pem test -e "SHOW STATUS LIKE 'Ssl_cipher'" 2> $MYSQLTEST_VARDIR/tmp/bug24732452_stderr
+--cat_file $MYSQLTEST_VARDIR/tmp/bug24732452_stderr
+
+--echo ### Trying to connect with ssl-verify-server-cert option and hostname as 127.0.0.1. This should establish an encrypted connection as localhost is present in Alternative Subject Name in the certificate.
+--replace_result ECDHE-RSA-AES128-GCM-SHA256 SSL_CIPHER DHE-RSA-AES128-GCM-SHA256 SSL_CIPHER DHE-RSA-AES256-SHA SSL_CIPHER ECDHE-RSA-AES128-SHA256 SSL_CIPHER
+--exec $MYSQL --host=127.0.0.1 --ssl-verify-server-cert --ssl-ca=$MYSQL_TEST_DIR/std_data/ca-cert-verify-san.pem  --ssl-cert=$MYSQL_TEST_DIR/std_data/client-cert-verify-san.pem --ssl-key=$MYSQL_TEST_DIR/std_data/client-key-verify-san.pem test -e "SHOW STATUS LIKE 'Ssl_cipher'" 2> $MYSQLTEST_VARDIR/tmp/bug24732452_stderr
+--cat_file $MYSQLTEST_VARDIR/tmp/bug24732452_stderr
+
+#Cleanup
+--remove_file $MYSQLTEST_VARDIR/tmp/bug24732452_stderr
index d5a73fb9b2c8e4ed0d8e158aa1b3047da906862b..6f6ea6b9965a58d6fa116a3fcfeb8b38df8e37e0 100644 (file)
@@ -1256,3 +1256,17 @@ SET @@long_query_time= @old_long_query_time;
 SET @@global.log_output= @old_log_output;
 SET @@global.slow_query_log= @old_slow_query_log;
 
+--echo #
+--echo # Bug#27197235 USER VARIABLE + UINON + DECIMAL COLUMN RETURNS
+--echo #              WRONG VALUES
+--echo #
+
+let $old_charset= `SELECT @@character_set_client`;
+
+SET NAMES utf8;
+SET @advertAcctId = 1000003;
+select @advertAcctId as a from dual union all select 1.0 from dual;
+
+eval SET NAMES $old_charset;
+SET @advertAcctId = 1000003;
+select @advertAcctId as a from dual union all select 1.0 from dual;
index 9972c1dd686f61cfd6babb2a793101572d9cca61..c800a4fb4fe319cb2ca86a55c04ae3a52935323e 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006, 2016, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2006, 2017, Oracle and/or its affiliates. All rights reserved.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -85,7 +85,8 @@ retry:
   do { /* PTR() isn't necessary below, head is a dummy node */
     cursor->curr= (LF_SLIST *)(*cursor->prev);
     _lf_pin(pins, 1, cursor->curr);
-  } while (*cursor->prev != (intptr)cursor->curr && LF_BACKOFF);
+  } while (my_atomic_loadptr((void**)cursor->prev) != cursor->curr &&
+                              LF_BACKOFF);
   for (;;)
   {
     if (unlikely(!cursor->curr))
@@ -99,7 +100,7 @@ retry:
     cur_hashnr= cursor->curr->hashnr;
     cur_key= cursor->curr->key;
     cur_keylen= cursor->curr->keylen;
-    if (*cursor->prev != (intptr)cursor->curr)
+    if (my_atomic_loadptr((void**)cursor->prev) != cursor->curr)
     {
       (void)LF_BACKOFF;
       goto retry;
@@ -533,7 +534,8 @@ retry:
   do { /* PTR() isn't necessary below, head is a dummy node */
     cursor->curr= (LF_SLIST *)(*cursor->prev);
     lf_pin(pins, 1, cursor->curr);
-  } while (*cursor->prev != (intptr)cursor->curr && LF_BACKOFF);
+  } while (my_atomic_loadptr((void**)cursor->prev) != cursor->curr &&
+                              LF_BACKOFF);
   for (;;)
   {
     if (unlikely(!cursor->curr))
@@ -545,7 +547,7 @@ retry:
       lf_pin(pins, 0, cursor->next);
     } while (link != cursor->curr->link && LF_BACKOFF);
     cur_hashnr= cursor->curr->hashnr;
-    if (*cursor->prev != (intptr)cursor->curr)
+    if (my_atomic_loadptr((void**)cursor->prev) != cursor->curr)
     {
       (void)LF_BACKOFF;
       goto retry;
index 847dc6cdbede91dbbd4049492de464d095585e08..88db516565660955aaec177048e43783df1e5aa9 100644 (file)
Binary files a/mysql-wsrep-5.6/packaging/WiX/AdminBackground.jpg and b/mysql-wsrep-5.6/packaging/WiX/AdminBackground.jpg differ
index 6e2e33d404f0d954ba6a852422d4f4721740e989..96da8f155587067b2977bcb631af9f86d9cedb3d 100644 (file)
Binary files a/mysql-wsrep-5.6/packaging/WiX/AdminHeader.jpg and b/mysql-wsrep-5.6/packaging/WiX/AdminHeader.jpg differ
index ec10d9a9c2bb37fb3ca1d658a3e5661cc275f510..e2bf591966fc31c8ac802545b9823d26c50c25cb 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2010, 2018, Oracle and/or its affiliates. All rights reserved.
 # 
 # This 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,8 +40,6 @@ IF(NOT WIX_DIR)
   RETURN()
 ENDIF()
 
-ADD_SUBDIRECTORY(ca)
-
 # mysql_server_extra.wxs.in needs DATADIR_MYSQL_FILES and DATADIR_PERFORMANCE_SCHEMA_FILES, i.e
 # Wix-compatible file lists for ${builddir}\sql\data\{mysql,performance_schema}
 
@@ -100,7 +98,6 @@ ELSE()
   FILE(APPEND "${CMAKE_CURRENT_BINARY_DIR}/COPYING.rtf" "\n}\n")
   SET(COPYING_RTF "${CMAKE_CURRENT_BINARY_DIR}/COPYING.rtf")
 ENDIF()
-GET_TARGET_PROPERTY(WIXCA_LOCATION wixca LOCATION)
 SET(CPACK_WIX_CONFIG ${CMAKE_CURRENT_SOURCE_DIR}/CPackWixConfig.cmake)
 SET(CPACK_WIX_INCLUDE "${CMAKE_CURRENT_BINARY_DIR}/mysql_server_extra.wxs;${CMAKE_CURRENT_SOURCE_DIR}/custom_ui.wxs")
 
@@ -130,7 +127,6 @@ ADD_CUSTOM_TARGET(
   ${CONFIG_PARAM} 
   -P  ${CMAKE_CURRENT_BINARY_DIR}/create_msi.cmake
 )
-ADD_DEPENDENCIES(MSI wixca)
 
 ADD_CUSTOM_TARGET(
   MSI_ESSENTIALS
@@ -139,5 +135,4 @@ ADD_CUSTOM_TARGET(
   ${CONFIG_PARAM}
   -P  ${CMAKE_CURRENT_BINARY_DIR}/create_msi.cmake
 )
-ADD_DEPENDENCIES(MSI_ESSENTIALS wixca)
 
index a471afcda9525e3009b35019aeb245e0a4e10f3e..367abffc3e84391f22484eef8912f102e8f63a0d 100644 (file)
Binary files a/mysql-wsrep-5.6/packaging/WiX/MySQLServer.ico and b/mysql-wsrep-5.6/packaging/WiX/MySQLServer.ico differ
diff --git a/mysql-wsrep-5.6/packaging/WiX/ca/CMakeLists.txt b/mysql-wsrep-5.6/packaging/WiX/ca/CMakeLists.txt
deleted file mode 100644 (file)
index 2afa5af..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-# 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 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(CMAKE_SIZEOF_VOID_P EQUAL 8)
-  SET(WIX_ARCH "x64")
-ELSE()
-  SET(WIX_ARCH "x86")
-ENDIF()
-
-IF(MSVC_VERSION EQUAL 1900)
-  SET(WIX_MSVC_DIR "VS2015")
-ELSEIF(MSVC_VERSION EQUAL 1800)
-  SET(WIX_MSVC_DIR "VS2013")
-ELSEIF(MSVC_VERSION EQUAL 1600)
-  SET(WIX_MSVC_DIR "VS2010")
-ELSE()
-  # When next VS is out, add the correct version here
-  MESSAGE(FATAL_ERROR "Unknown VS version")
-ENDIF()
-
-INCLUDE_DIRECTORIES(${WIX_DIR}/../SDK/${WIX_MSVC_DIR}/inc)
-LINK_DIRECTORIES(${WIX_DIR}/../SDK/${WIX_MSVC_DIR}/lib/${WIX_ARCH})
-
-SET(WIXCA_SOURCES CustomAction.cpp CustomAction.def)
-
-MESSAGE(STATUS "Searching for wcautil in ${WIX_DIR}/../SDK/${WIX_MSVC_DIR}/lib/${WIX_ARCH}")
-MESSAGE(STATUS "Searching for dutil in ${WIX_DIR}/../SDK/${WIX_MSVC_DIR}/lib/${WIX_ARCH}")
-
-FIND_LIBRARY(WIX_WCAUTIL_LIBRARY 
-  NAMES wcautil
-  PATHS ${WIX_DIR}/../SDK/${WIX_MSVC_DIR}/lib/${WIX_ARCH})
-
-FIND_LIBRARY(WIX_DUTIL_LIBRARY 
-  NAMES dutil
-  PATHS ${WIX_DIR}/../SDK/${WIX_MSVC_DIR}/lib/${WIX_ARCH})
-
-MESSAGE(STATUS "Found: ${WIX_WCAUTIL_LIBRARY}")
-MESSAGE(STATUS "Found: ${WIX_DUTIL_LIBRARY}")
-
-ADD_VERSION_INFO(wixca SHARED WIXCA_SOURCES)
-ADD_LIBRARY(wixca SHARED EXCLUDE_FROM_ALL ${WIXCA_SOURCES})
-TARGET_LINK_LIBRARIES(wixca ${WIX_WCAUTIL_LIBRARY} ${WIX_DUTIL_LIBRARY} 
-  msi version )
diff --git a/mysql-wsrep-5.6/packaging/WiX/ca/CustomAction.cpp b/mysql-wsrep-5.6/packaging/WiX/ca/CustomAction.cpp
deleted file mode 100644 (file)
index 444e003..0000000
+++ /dev/null
@@ -1,188 +0,0 @@
-/* Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
-
-   This program is free 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 UNICODE
-#define UNICODE
-#endif
-
-#include <windows.h>
-#include <winreg.h>
-#include <msi.h>
-#include <msiquery.h>
-#include <wcautil.h>
-#include <string.h>
-#include <strsafe.h>
-
-/*
- * Search the registry for a service whose ImagePath starts
- * with our install directory. Stop and remove it if requested.
- */
-static TCHAR last_service_name[128];
-int remove_service(TCHAR *installdir, int check_only) {
-       HKEY hKey;
-       int done = 0;
-
-       if(wcslen(installdir) < 3) {
-               WcaLog(LOGMSG_STANDARD, "INSTALLDIR is suspiciously short, better not do anything.");
-               return 0;
-       }
-
-       if(check_only == 0) {
-               WcaLog(LOGMSG_STANDARD, "Determining number of matching services...");
-               int servicecount = remove_service(installdir, 1);
-               if(servicecount <= 0) {
-                       WcaLog(LOGMSG_STANDARD, "No services found, not removing anything.");
-                       return 0;
-               } else if(servicecount == 1) {
-                       TCHAR buf[256];
-                       swprintf_s(buf, sizeof(buf), TEXT("There is a service called '%ls' set up to run from this installation. Do you wish me to stop and remove that service?"), last_service_name);
-                       int rc = MessageBox(NULL, buf, TEXT("Removing MySQL Server"), MB_ICONQUESTION|MB_YESNOCANCEL|MB_SYSTEMMODAL);
-                       if(rc == IDCANCEL) return -1;
-                       if(rc != IDYES) return 0;
-               } else if(servicecount > 0) {
-                       TCHAR buf[256];
-                       swprintf_s(buf, sizeof(buf), TEXT("There appear to be %d services set up to run from this installation. Do you wish me to stop and remove those services?"), servicecount);
-                       int rc = MessageBox(NULL, buf, TEXT("Removing MySQL Server"), MB_ICONQUESTION|MB_YESNOCANCEL|MB_SYSTEMMODAL);
-                       if(rc == IDCANCEL) return -1;
-                       if(rc != IDYES) return 0;
-               }
-       }
-
-       if(check_only == -1) check_only = 0;
-
-       WcaLog(LOGMSG_STANDARD, "Looking for service...");
-       WcaLog(LOGMSG_STANDARD, "INSTALLDIR = %ls", installdir);
-       if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, TEXT("SYSTEM\\CurrentControlSet\\services"), 0, KEY_READ, &hKey)==ERROR_SUCCESS) {
-               DWORD index = 0;
-               TCHAR keyname[1024];
-               DWORD keylen = sizeof(keyname);
-               FILETIME t;
-               /* Go through all services in the registry */
-               while(RegEnumKeyExW(hKey, index, keyname, &keylen, NULL, NULL, NULL, &t) == ERROR_SUCCESS) {
-                       HKEY hServiceKey = 0;
-                       TCHAR path[1024];
-                       DWORD pathlen = sizeof(path)-1;
-                       if (RegOpenKeyExW(hKey, keyname, NULL, KEY_READ, &hServiceKey) == ERROR_SUCCESS) {
-                               /* Look at the ImagePath value of each service */
-                               if (RegQueryValueExW(hServiceKey, TEXT("ImagePath"), NULL, NULL, (LPBYTE)path, &pathlen) == ERROR_SUCCESS) {
-                                       path[pathlen] = 0;
-                                       TCHAR *p = path;
-                                       if(p[0] == '"') p += 1;
-                                       /* See if it is similar to our install directory */
-                                       if(wcsncmp(p, installdir, wcslen(installdir)) == 0) {
-                                               WcaLog(LOGMSG_STANDARD, "Found service '%ls' with ImagePath '%ls'.", keyname, path);
-                                               swprintf_s(last_service_name, sizeof(last_service_name), TEXT("%ls"), keyname);
-                                               /* If we are supposed to stop and remove the service... */
-                                               if(!check_only) {
-                                                       WcaLog(LOGMSG_STANDARD, "Trying to stop the service.");
-                                                       SC_HANDLE hSCM = NULL; 
-                                                       hSCM = OpenSCManager(NULL, NULL, SC_MANAGER_CONNECT);
-                                                       if(hSCM != NULL) {
-                                                               SC_HANDLE hService = NULL;
-                                                               hService = OpenService(hSCM, keyname, SERVICE_STOP|SERVICE_QUERY_STATUS|DELETE);
-                                                               if(hService != NULL) {
-                                                                       WcaLog(LOGMSG_STANDARD, "Waiting for the service to stop...");
-                                                                       SERVICE_STATUS status;
-                                                                       /* Attempt to stop the service */
-                                                                       if(ControlService(hService, SERVICE_CONTROL_STOP, &status)) {
-                                                                               /* Now wait until it's stopped */
-                                                                               while("it's one big, mean and cruel world out there") {
-                                                                                       if(!QueryServiceStatus(hService, &status)) break;
-                                                                                       if(status.dwCurrentState == SERVICE_STOPPED) break;
-                                                                                       Sleep(1000);
-                                                                               }
-                                                                               WcaLog(LOGMSG_STANDARD, "Stopped the service.");
-                                                                       }
-                                                                       /* Mark the service for deletion */
-                                                                       DeleteService(hService);
-                                                                       CloseServiceHandle(hService);
-                                                               }
-                                                               CloseServiceHandle(hSCM);
-                                                       }
-                                               }
-                                               done++;
-                                       }
-                               }
-                               RegCloseKey(hServiceKey);
-                       }
-                       index++;
-                       keylen = sizeof(keyname)-1;
-               }
-               RegCloseKey(hKey);
-       } else {
-               WcaLog(LOGMSG_STANDARD, "Can't seem to go through the list of installed services in the registry.");
-       }
-       return done;
-}
-
-UINT wrap(MSIHANDLE hInstall, char *name, int check_only) {
-       HRESULT hr = S_OK;
-       UINT er = ERROR_SUCCESS;
-
-       hr = WcaInitialize(hInstall, name);
-       ExitOnFailure(hr, "Failed to initialize");
-
-       WcaLog(LOGMSG_STANDARD, "Initialized.");
-
-    TCHAR INSTALLDIR[1024];
-    DWORD INSTALLDIR_size = sizeof(INSTALLDIR);
-       if(MsiGetPropertyW(hInstall, TEXT("CustomActionData"), INSTALLDIR, &INSTALLDIR_size) == ERROR_SUCCESS) {
-               int rc = remove_service(INSTALLDIR, check_only);
-               if(rc < 0) {
-                       er = ERROR_CANCELLED;
-               }
-       } else {
-               er = ERROR_CANT_ACCESS_FILE;
-       }
-
-LExit:
-       return WcaFinalize(er);
-}
-
-UINT __stdcall RemoveServiceNoninteractive(MSIHANDLE hInstall)
-{
-       return wrap(hInstall, "RemoveServiceNoninteractive", -1);
-}
-
-UINT __stdcall RemoveService(MSIHANDLE hInstall)
-{
-       return wrap(hInstall, "RemoveService", 0);
-}
-
-UINT __stdcall TestService(MSIHANDLE hInstall)
-{
-       return wrap(hInstall, "TestService", 1);
-}
-
-/* DllMain - Initialize and cleanup WiX custom action utils */
-extern "C" BOOL WINAPI DllMain(
-       __in HINSTANCE hInst,
-       __in ULONG ulReason,
-       __in LPVOID
-       )
-{
-       switch(ulReason)
-       {
-       case DLL_PROCESS_ATTACH:
-               WcaGlobalInitialize(hInst);
-               break;
-
-       case DLL_PROCESS_DETACH:
-               WcaGlobalFinalize();
-               break;
-       }
-
-       return TRUE;
-}
diff --git a/mysql-wsrep-5.6/packaging/WiX/ca/CustomAction.def b/mysql-wsrep-5.6/packaging/WiX/ca/CustomAction.def
deleted file mode 100644 (file)
index 5f5e663..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-LIBRARY "wixca"
-VERSION 1.0
-
-EXPORTS
-
-RemoveService
-RemoveServiceNoninteractive
-TestService
index b306c0c70d3a04339bf9a76a7de7bd65e318c979..72914ae6cf1c76ec2251d831972c40d33ae346a2 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved.\r
+# Copyright (c) 2010, 2018, 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
@@ -26,7 +26,6 @@ SET(MINOR_VERSION "@MINOR_VERSION@")
 SET(PATCH_VERSION "@PATCH_VERSION@")\r
 SET(CMAKE_SIZEOF_VOID_P @CMAKE_SIZEOF_VOID_P@)\r
 SET(MANUFACTURER "@MANUFACTURER@")\r
-SET(WIXCA_LOCATION "@WIXCA_LOCATION@")\r
 SET(COPYING_RTF "@COPYING_RTF@")\r
 SET(CPACK_WIX_CONFIG "@CPACK_WIX_CONFIG@")\r
 SET(CPACK_WIX_INCLUDE "@CPACK_WIX_INCLUDE@")\r
@@ -193,8 +192,6 @@ ENDFOREACH()
 \r
 \r
 IF(CMAKE_INSTALL_CONFIG_NAME)\r
-  STRING(REPLACE "${CMAKE_CFG_INTDIR}" "${CMAKE_INSTALL_CONFIG_NAME}" \r
-    WIXCA_LOCATION "${WIXCA_LOCATION}")\r
   SET(CONFIG_PARAM "-DCMAKE_INSTALL_CONFIG_NAME=${CMAKE_INSTALL_CONFIG_NAME}")\r
 ENDIF()\r
 \r
index 7b3cffb5a38ec6d6b123f6ae056767f00085d491..6e5d2d69486e19c840c82e5b6ed4fb5bda87493b 100644 (file)
@@ -2,7 +2,7 @@
       xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">\r
 \r
 <!--\r
-   Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved.\r
+   Copyright (c) 2010, 2018, 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
       Id="WixUILicenseRtf"\r
       Value="@COPYING_RTF@"/>\r
 \r
-    <!-- How to remove the service on uninstall -->\r
-    <Binary Id='wixca.dll' SourceFile='@WIXCA_LOCATION@' />\r
-    <CustomAction Id="UnregisterProperty" Property="UnregisterService" Value="[INSTALLDIR]" Return="check" />\r
-    <CustomAction Id="UnregisterPropertySilent" Property="UnregisterServiceSilently" Value="[INSTALLDIR]" Return="check" />\r
-    <CustomAction Id="UnregisterService"\r
-                  BinaryKey="wixca.dll"\r
-                  DllEntry="RemoveService"\r
-                  Execute="deferred"\r
-                  Impersonate="no"\r
-                  Return="check" />\r
-    <CustomAction Id="UnregisterServiceSilently"\r
-                  BinaryKey="wixca.dll"\r
-                  DllEntry="RemoveServiceNoninteractive"\r
-                  Execute="deferred"\r
-                  Impersonate="no"\r
-                  Return="check" />\r
-    <InstallExecuteSequence>\r
-      <Custom Action="UnregisterProperty" After="InstallInitialize">Installed And Not UPGRADINGPRODUCTCODE And REMOVE="ALL"</Custom>\r
-      <Custom Action="UnregisterPropertySilent" After="InstallInitialize">Installed And Not UPGRADINGPRODUCTCODE And REMOVE="ALL"</Custom>\r
-      <Custom Action="UnregisterService" After="UnregisterProperty">Installed And Not UPGRADINGPRODUCTCODE And REMOVE="ALL" And UILevel&gt;4</Custom>\r
-      <Custom Action="UnregisterServiceSilently" After="UnregisterPropertySilent">Installed And Not UPGRADINGPRODUCTCODE And REMOVE="ALL" And UILevel&lt;=4</Custom>\r
-    </InstallExecuteSequence>\r
-\r
     <!-- Installation root-->\r
     <Directory Id='TARGETDIR' Name='SourceDir'>\r
       <Directory Id='@PlatformProgramFilesFolder@'>\r
index c0ca360f0daf4add52f36ead74d90290b26c65a6..a75f6c935a116a206fd5c794a81ac8fa09be3510 100644 (file)
@@ -179,6 +179,24 @@ ELSEIF(DEB_CODENAME STREQUAL "precise")
   SET (DEB_SERVICE_SERVER_EXECPOST "")
   SET (DEB_INIT_APPARMOR "/lib/init/apparmor-profile-load usr.sbin.mysqld")
   SET (DEB_STARTUP "SYSV")
+ELSEIF(DEB_CODENAME STREQUAL "sid")
+  IF (DEFINED DEB_GCC_SNAPSHOT)
+    SET (DEB_CMAKE_EXTRAS "${DEB_CMAKE_EXTRAS} -DCMAKE_C_COMPILER=/usr/lib/gcc-snapshot/bin/gcc -DCMAKE_CXX_COMPILER=/usr/lib/gcc-snapshot/bin/g++ -DMYSQL_MAINTAINER_MODE=0 -DCMAKE_CXX_COMPILER_LAUNCHER=ccache")
+  ENDIF()
+  SET (DEB_PLATFORMRELEASE "debianunstable")
+  SET (DEB_CONTROL_BDEPS "dh-systemd")
+  SET (DEB_INSTALL_SOURCE_XZ "../*.tar.xz usr/src/mysql/")
+  SET (DEB_RULES_INSTALL_SYSTEMD
+    "install -m 0755 debian/extra/mysql-systemd-start debian/tmp/usr/share/mysql/")
+  SET (DEB_RULES_INSTALL_APPARMOR "")
+  SET (DEB_RULES_APPARMOR_LOAD "")
+  SET (DEB_RULES_SYSTEMD_ENABLE "dh_systemd_enable --name=mysql")
+  SET (DEB_RULES_SYSTEMD_START "dh_systemd_start --restart-after-upgrade")
+  SET (DEB_INSTALL_SERVER_SYSTEMD "usr/share/mysql/mysql-systemd-start")
+  SET (DEB_INSTALL_SERVER_APPARMOR "")
+  SET (DEB_SERVICE_SERVER_EXECPRE
+    "ExecStartPre=/usr/share/mysql/mysql-systemd-start pre")
+  SET (DEB_INIT_APPARMOR "")
 ELSEIF(DEB_CODENAME STREQUAL "trusty")
   SET (DEB_PLATFORMRELEASE "ubuntu14.04")
   SET (DEB_CONTROL_BDEPS "dh-apparmor")
@@ -251,6 +269,23 @@ ELSEIF(DEB_CODENAME STREQUAL "artful")
   SET (DEB_SERVICE_SERVER_EXECPRE
     "ExecStartPre=/usr/share/mysql/mysql-systemd-start pre")
   SET (DEB_INIT_APPARMOR "/lib/apparmor/profile-load usr.sbin.mysqld")
+ELSEIF(DEB_CODENAME STREQUAL "bionic")
+  SET (DEB_PLATFORMRELEASE "ubuntu18.04")
+  SET (DEB_CONTROL_BDEPS "dh-apparmor, dh-systemd (>=1.5)")
+  SET (DEB_INSTALL_SOURCE_XZ "../*.tar.xz usr/src/mysql/")
+  SET (DEB_RULES_INSTALL_SYSTEMD
+    "install -m 0755 debian/extra/mysql-systemd-start debian/tmp/usr/share/mysql/")
+  SET (DEB_RULES_INSTALL_APPARMOR
+    "install -g root -o root -m 0644 -D debian/extra/apparmor-profile debian/tmp/etc/apparmor.d/usr.sbin.mysqld")
+  SET (DEB_RULES_APPARMOR_LOAD
+    "dh_apparmor -pmysql-${DEB_PRODUCTNAME}-server --profile-name=usr.sbin.mysqld")
+  SET (DEB_RULES_SYSTEMD_ENABLE "dh_systemd_enable --name=mysql")
+  SET (DEB_RULES_SYSTEMD_START "dh_systemd_start --restart-after-upgrade")
+  SET (DEB_INSTALL_SERVER_SYSTEMD "usr/share/mysql/mysql-systemd-start")
+  SET (DEB_INSTALL_SERVER_APPARMOR "etc/apparmor.d/usr.sbin.mysqld")
+  SET (DEB_SERVICE_SERVER_EXECPRE
+    "ExecStartPre=/usr/share/mysql/mysql-systemd-start pre")
+  SET (DEB_INIT_APPARMOR "/lib/apparmor/profile-load usr.sbin.mysqld")
 ELSE()
   MESSAGE(STATUS
     "Skipping deb packaging on unsupported platform ${DEB_CODENAME}.")
index ddc639c1506ca68216a4a4d7eb9c8d1cf69bb9b8..4a2bcd76aa685cceb5a39c3571dc6bc75fbdcd2e 100644 (file)
@@ -4,7 +4,7 @@ Upstream-Contact: MySQL Release Engineering <mysql-build@oss.oracle.com>
 Source: http://dev.mysql.com/
 
 Files: *
-Copyright: 2000, 2016, Oracle and/or its affiliates. All rights reserved.
+Copyright: 2000, 2018, Oracle and/or its affiliates. All rights reserved.
 License: Commercial
  This is a release of MySQL, a dual-license SQL database server.
  For the avoidance of doubt, this particular copy of the software
index 50e29be3be659a467bec04d9567063a091eff40c..45563622359f23e8862b86eb78a604b7ccdf18f0 100644 (file)
@@ -3,7 +3,7 @@ Upstream-Name: @DEB_COPYRIGHT_UPSTREAMNAME@
 Upstream-Contact: MySQL Release Engineering <mysql-build@oss.oracle.com>
 Source: http://dev.mysql.com/
 
-Copyright: 2015, 2016, Oracle and/or its affiliates. All rights reserved.
+Copyright: 2000, 2018, 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
index 6a6d62cb91090bff584f3891632dd14124aeb80b..309bd9fd443fc45a18931f469d857e35108f3393 100644 (file)
@@ -17,9 +17,9 @@
 usr/bin/mysql_client_test
 usr/bin/mysqltest
 # manpages
-usr/share/man/man1/mysql_client_test.1
-usr/share/man/man1/mysql-test-run.pl.1
-usr/share/man/man1/mysqltest.1
+#usr/share/man/man1/mysql_client_test.1
+#usr/share/man/man1/mysql-test-run.pl.1
+#usr/share/man/man1/mysqltest.1
 # plugins
 usr/lib/mysql/plugin/auth.so
 usr/lib/mysql/plugin/auth_test_plugin.so
index fed6dfe6821dc36c46ad506c9b572c8e8292828b..694b5b550423fc9a31e7f5d335ce774aaf53121c 100644 (file)
@@ -1,6 +1,6 @@
 #!/usr/bin/make -f
 
-# Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -134,8 +134,4 @@ override_dh_install:
                -Xusr/share/mysql/binary-configure \
                -Xusr/share/mysql/docs/mysql.info \
                -Xusr/share/man/man1/mysqlman.1 \
-               -Xusr/share/man/man1/mysqltest \
-               -Xusr/share/man/man1/mysql_client_test \
-               -Xusr/share/man/man1/mysql-stress-test.pl.1 \
-               -Xusr/share/man/man1/mysql-test-run.pl.1 \
                -X.h.pp
index 6fe1abaf0b0333f13b8e70e5212e5751be9bce60..449d07552253ec6486d2850d87c0c99090b33f4e 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -440,14 +440,6 @@ rm -rf %{buildroot}%{_bindir}/mysql_embedded
 rm -rf %{buildroot}%{_bindir}/mysql_setpermission
 rm -rf %{buildroot}%{_mandir}/man1/mysql_setpermission.1*
 
-# Remove obsoleted man pages
-rm -f %{buildroot}%{_mandir}/man1/mysql-stress-test.pl.1
-rm -f %{buildroot}%{_mandir}/man1/mysql-test-run.pl.1
-rm -f %{buildroot}%{_mandir}/man1/mysql_client_test.1
-rm -f %{buildroot}%{_mandir}/man1/mysql_client_test_embedded.1
-rm -f %{buildroot}%{_mandir}/man1/mysqltest.1
-rm -f %{buildroot}%{_mandir}/man1/mysqltest_embedded.1
-
 %check
 %if 0%{?runselftest}
 pushd release
@@ -726,6 +718,9 @@ datadir=$(/usr/bin/my_print_defaults server mysqld | grep '^--datadir=' | sed -n
 %attr(755, root, root) %{_libdir}/mysql/libmysqld.so
 
 %changelog
+* Wed Jan 10 2018 Bjorn Munch <bjorn.munch@oracle.com> - 5.6.40-1
+- No longer need to remove obsoleted mysqltest man pages
+
 * Tue Oct 31 2017 Bjorn Munch <bjorn.munch@oracle.com> - 5.6.39-1
 - Remove obsoleted mysqltest man pages
 
index ec56869dcd2bbb79bf28111798f3766e266cbaaf..095a13fa5997c8f048156df2795c6602c1ccb369 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -613,14 +613,6 @@ rm -rf %{buildroot}%{_bindir}/mysql_embedded
 rm -rf %{buildroot}%{_bindir}/mysql_setpermission
 rm -rf %{buildroot}%{_mandir}/man1/mysql_setpermission.1*
 
-# Remove obsoleted man pages
-rm -f %{buildroot}%{_mandir}/man1/mysql-stress-test.pl.1
-rm -f %{buildroot}%{_mandir}/man1/mysql-test-run.pl.1
-rm -f %{buildroot}%{_mandir}/man1/mysql_client_test.1
-rm -f %{buildroot}%{_mandir}/man1/mysql_client_test_embedded.1
-rm -f %{buildroot}%{_mandir}/man1/mysqltest.1
-rm -f %{buildroot}%{_mandir}/man1/mysqltest_embedded.1
-
 %check
 %if 0%{?runselftest}
 pushd release
@@ -956,6 +948,9 @@ fi
 %endif
 
 %changelog
+* Wed Jan 10 2018 Bjorn Munch <bjorn.munch@oracle.com> - 5.6.40-1
+- No longer need to remove obsoleted mysqltest man pages
+
 * Tue Oct 31 2017 Bjorn Munch <bjorn.munch@oracle.com> - 5.6.39-1
 - Remove obsoleted mysqltest man pages
 
index 86bfdfa3955163df954651a4a78c40b27085cddf..5d500f1b0bf93e7088c5de29fe6e079e367b0f94 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -476,14 +476,6 @@ rm -rf %{buildroot}%{_bindir}/mysql_setpermission
 rm -rf %{buildroot}%{_mandir}/man1/mysql_setpermission.1*
 rm -f %{buildroot}%{_datadir}/mysql/win_install_firewall.sql 
 
-# Remove obsoleted man pages
-rm -f %{buildroot}%{_mandir}/man1/mysql-stress-test.pl.1
-rm -f %{buildroot}%{_mandir}/man1/mysql-test-run.pl.1
-rm -f %{buildroot}%{_mandir}/man1/mysql_client_test.1
-rm -f %{buildroot}%{_mandir}/man1/mysql_client_test_embedded.1
-rm -f %{buildroot}%{_mandir}/man1/mysqltest.1
-rm -f %{buildroot}%{_mandir}/man1/mysqltest_embedded.1
-
 # rcmysql symlink
 install -d %{buildroot}%{_sbindir}
 %if 0%{?systemd}
@@ -824,6 +816,9 @@ fi
 %attr(755, root, root) %{_libdir}/mysql/libmysqld.so
 
 %changelog
+* Wed Jan 10 2018 Bjorn Munch <bjorn.munch@oracle.com> - 5.6.40-1
+- No longer need to remove obsoleted mysqltest man pages
+
 * Tue Oct 31 2017 Bjorn Munch <bjorn.munch@oracle.com> - 5.6.39-1
 - Remove obsoleted mysqltest man pages
 
index 365812d32234b0448e71bfa8a94dc356a941b403..986992576233801f85ae36e4b43b5d8c627b10d4 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2016, 2017 Oracle and/or its affiliates. All rights reserved.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -689,16 +689,9 @@ namespace connection_control
         Successful connection.
         delete entry for given account from the hash
       */
-      if (user_present && m_userhost_hash.remove_entry(userhost))
+      if (user_present)
       {
-        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;
+        (void) m_userhost_hash.remove_entry(userhost);
       }
     }
 
index 51d005273b6685e266f0c5ab18f54fcc1703f87d..1d63224f0be08c96a6f56955d2b06daf66b6540a 100644 (file)
@@ -1,6 +1,6 @@
 /***********************************************************************
 
-Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
+Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
 
 This program is free software; you can redistribute it and/or modify it
 under the terms of the GNU General Public License as published by the
@@ -1135,6 +1135,9 @@ have_conn:
                        }
                }
        } else {
+        bool auto_commit = (engine->read_batch_size == 1 &&
+                !(engine->cfg_status & IB_CFG_DISABLE_ROWLOCK)) ? true : false;
+
                assert(conn_option == CONN_MODE_READ);
 
                if (!read_crsr) {
@@ -1142,15 +1145,12 @@ have_conn:
                                /* This is read operation, start a trx
                                with "read_write" parameter set to false */
                                conn_data->crsr_trx = ib_cb_trx_begin(
-                                       engine->trx_level, false,
-                                       engine->read_batch_size == 1);
+                                       engine->trx_level, false, auto_commit);
                                trx_updated = true;
                        } else {
                                ib_cb_trx_start(conn_data->crsr_trx,
                                                engine->trx_level,
-                                               false,
-                                               engine->read_batch_size == 1,
-                                               NULL);
+                                               false, auto_commit, NULL);
                        }
 
                        err = innodb_api_begin(
@@ -1183,8 +1183,7 @@ have_conn:
                        /* This is read operation, start a trx
                        with "read_write" parameter set to false */
                        conn_data->crsr_trx = ib_cb_trx_begin(
-                               engine->trx_level, false,
-                               engine->read_batch_size == 1);
+                               engine->trx_level, false, auto_commit);
 
                        trx_updated = true;
 
@@ -1230,8 +1229,7 @@ have_conn:
                        with "read_write" parameter set to false */
                        ib_cb_trx_start(conn_data->crsr_trx,
                                        engine->trx_level,
-                                       false,
-                                       engine->read_batch_size == 1,
+                                       false, auto_commit,
                                        NULL);
 
                        ib_cb_cursor_stmt_begin(conn_data->read_crsr);
index cfff524c8fdc5949333e799a293b5b08822ca353..f24d871f29633b45bf92f234fd4594e30b20e4ac 100644 (file)
@@ -116,8 +116,15 @@ fi
 #         --exclude '*.[0-9][0-9][0-9][0-9][0-9][0-9]' --exclude '*.index')
 
 # New filter - exclude everything except dirs (schemas) and innodb files
-FILTER=(-f '- /lost+found' -f '- /.fseventsd' -f '- /.Trashes'
-        -f '+ /wsrep_sst_binlog.tar' -f '+ /ib_lru_dump' -f '+ /ibdata*' -f '+ /*/' -f '- /*')
+FILTER=(-f '- /lost+found'
+        -f '- /.fseventsd'
+        -f '- /.Trashes'
+        -f '+ /wsrep_sst_binlog.tar'
+        -f '+ /ib_lru_dump'
+        -f '+ /ibdata*'
+        -f '+ /undo*'
+        -f '+ /*/'
+        -f '- /*')
 
 if [ "$WSREP_SST_OPT_ROLE" = "donor" ]
 then
index 425938b6562f731466297dc26d468400e4c839dd..010911ccbc30fbe2ec6130ce59ebef0ab02cacc5 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -97,6 +97,10 @@ my_bool      net_flush(NET *net);
 #define SOCKET_ERROR -1
 #endif
 
+#ifdef HAVE_OPENSSL
+#include <openssl/x509v3.h>
+#endif
+
 #include "client_settings.h"
 #include <sql_common.h>
 #include <mysql/client_plugin.h>
@@ -1130,6 +1134,7 @@ static int add_init_command(struct st_mysql_options *options, const char *cmd)
     } while(0)
 #endif
 
+#if defined(HAVE_OPENSSL) && !defined(EMBEDDED_LIBRARY)
 static char *set_ssl_option_unpack_path(struct st_mysql_options *options,
                                         const char *arg)
 {
@@ -1144,6 +1149,7 @@ static char *set_ssl_option_unpack_path(struct st_mysql_options *options,
   }
   return opt_var;
 }
+#endif
 
 
 void mysql_read_default_options(struct st_mysql_options *options,
@@ -1443,7 +1449,8 @@ unpack_fields(MYSQL *mysql, MYSQL_DATA *data,MEM_ROOT *alloc,uint fields,
     {
       uchar *pos;
       /* fields count may be wrong */
-      DBUG_ASSERT((uint) (field - result) < fields);
+      if (field < result || (uint) (field - result) >= fields)
+        DBUG_RETURN(NULL);
       cli_fetch_lengths(&lengths[0], row->data, default_value ? 8 : 7);
       field->catalog=   strmake_root(alloc,(char*) row->data[0], lengths[0]);
       field->db=        strmake_root(alloc,(char*) row->data[1], lengths[1]);
@@ -1550,6 +1557,7 @@ MYSQL_DATA *cli_read_rows(MYSQL *mysql,MYSQL_FIELD *mysql_fields,
 
   if ((pkt_len= cli_safe_read(mysql)) == packet_error)
     DBUG_RETURN(0);
+  if (pkt_len == 0) DBUG_RETURN(0);
   if (!(result=(MYSQL_DATA*) my_malloc(sizeof(MYSQL_DATA),
                                       MYF(MY_WME | MY_ZEROFILL))))
   {
@@ -1661,18 +1669,20 @@ read_one_row(MYSQL *mysql,uint fields,MYSQL_ROW row, ulong *lengths)
   end_pos=pos+pkt_len;
   for (field=0 ; field < fields ; field++)
   {
-    if ((len=(ulong) net_field_length(&pos)) == NULL_LENGTH)
+    len=(ulong) net_field_length_checked(&pos, (ulong)(end_pos - pos));
+    if (pos > end_pos)
+    {
+      set_mysql_error(mysql, CR_UNKNOWN_ERROR, unknown_sqlstate);
+      return -1;
+    }
+
+    if (len == NULL_LENGTH)
     {                                          /* null field */
       row[field] = 0;
       *lengths++=0;
     }
     else
     {
-      if (len > (ulong) (end_pos - pos))
-      {
-        set_mysql_error(mysql, CR_UNKNOWN_ERROR, unknown_sqlstate);
-        return -1;
-      }
       row[field] = (char*) pos;
       pos+=len;
       *lengths++=len;
@@ -1868,12 +1878,15 @@ static int ssl_verify_server_cert(Vio *vio, const char* server_hostname, const c
 {
   SSL *ssl;
   X509 *server_cert= NULL;
+  int ret_validation= 1;
+
+#if !(OPENSSL_VERSION_NUMBER >= 0x10002000L)
   char *cn= NULL;
   int cn_loc= -1;
   ASN1_STRING *cn_asn1= NULL;
   X509_NAME_ENTRY *cn_entry= NULL;
   X509_NAME *subject= NULL;
-  int ret_validation= 1;
+#endif
 
   DBUG_ENTER("ssl_verify_server_cert");
   DBUG_PRINT("enter", ("server_hostname: %s", server_hostname));
@@ -1908,11 +1921,25 @@ static int ssl_verify_server_cert(Vio *vio, const char* server_hostname, const c
   */
 
   /*
-   Some notes for future development
-   We should check host name in alternative name first and then if needed check in common name.
-   Currently yssl doesn't support alternative name.
-   openssl 1.0.2 support X509_check_host method for host name validation, we may need to start using
-   X509_check_host in the future.
+    Use OpenSSL certificate matching functions instead of our own if we
+    have OpenSSL. The X509_check_* functions return 1 on success.
+  */
+#if OPENSSL_VERSION_NUMBER >= 0x10002000L || defined(HAVE_WOLFSSL)
+  if ((X509_check_host(server_cert, server_hostname, strlen(server_hostname),
+                       0, 0) != 1) &&
+      (X509_check_ip_asc(server_cert, server_hostname, 0) != 1)) {
+    *errptr = "Failed to verify the server certificate via X509 certificate "
+              "matching functions";
+    goto error;
+
+  } else {
+    /* Success */
+    ret_validation = 0;
+  }
+#else  /* OPENSSL_VERSION_NUMBER < 0x10002000L */
+  /*
+     OpenSSL prior to 1.0.2 do not support X509_check_host() function.
+     Use deprecated X509_get_subject_name() instead.
   */
 
   subject= X509_get_subject_name((X509 *) server_cert);
@@ -1955,7 +1982,7 @@ static int ssl_verify_server_cert(Vio *vio, const char* server_hostname, const c
     /* Success */
     ret_validation= 0;
   }
-
+#endif /* OPENSSL_VERSION_NUMBER >= 0x10002000L */
   *errptr= "SSL certificate validation failure";
 
 error:
@@ -1967,6 +1994,36 @@ error:
 #endif /* HAVE_OPENSSL && !EMBEDDED_LIBRARY */
 
 
+/**
+  Checks if any SSL option is set for libmysqld embedded server.
+
+  @param  mysql   the connection handle
+  @retval 0       success
+  @retval 1       failure
+*/
+#ifdef EMBEDDED_LIBRARY
+int embedded_ssl_check(MYSQL *mysql)
+{
+  if (mysql->options.ssl_key || mysql->options.ssl_cert ||
+      mysql->options.ssl_ca || mysql->options.ssl_capath ||
+      mysql->options.ssl_cipher ||
+      mysql->options.client_flag & CLIENT_SSL_VERIFY_SERVER_CERT ||
+      (mysql->options.extension &&
+       (mysql->options.extension->ssl_crl ||
+        mysql->options.extension->ssl_crlpath ||
+        mysql->options.extension->ssl_mode == SSL_MODE_REQUIRED)))
+  {
+     set_mysql_extended_error(mysql, CR_SSL_CONNECTION_ERROR, unknown_sqlstate,
+                              ER(CR_SSL_CONNECTION_ERROR),
+                              "Embedded server libmysqld library doesn't support "
+                              "SSL connections");
+     return 1;
+  }
+  return 0;
+}
+#endif
+
+
 /*
   Note that the mysql argument must be initialized with mysql_init()
   before calling mysql_real_connect !
@@ -3839,6 +3896,11 @@ CLI_MYSQL_REAL_CONNECT(MYSQL *mysql,const char *host, const char *user,
 
   mysql->client_flag= client_flag;
 
+#ifdef EMBEDDED_LIBRARY
+  if (embedded_ssl_check(mysql))
+    goto error;
+#endif
+
   /*
     Part 2: invoke the plugin to send the authentication data to the server
   */
@@ -4527,10 +4589,14 @@ mysql_options(MYSQL *mysql,enum mysql_option option, const void *arg)
     mysql->options.ci.bind_address= my_strdup(arg, MYF(MY_WME));
     break;
   case MYSQL_OPT_SSL_VERIFY_SERVER_CERT:
+#if defined(HAVE_OPENSSL) && !defined(EMBEDDED_LIBRARY)
     if (*(my_bool*) arg)
       mysql->options.client_flag|= CLIENT_SSL_VERIFY_SERVER_CERT;
     else
       mysql->options.client_flag&= ~CLIENT_SSL_VERIFY_SERVER_CERT;
+#elif defined(EMBEDDED_LIBRARY)
+    DBUG_RETURN(1);
+#endif
     break;
   case MYSQL_PLUGIN_DIR:
     EXTENSION_SET_STRING(&mysql->options, plugin_dir, arg);
@@ -4539,41 +4605,71 @@ mysql_options(MYSQL *mysql,enum mysql_option option, const void *arg)
     EXTENSION_SET_STRING(&mysql->options, default_auth, arg);
     break;
   case MYSQL_OPT_SSL_KEY:
+#if defined(HAVE_OPENSSL) && !defined(EMBEDDED_LIBRARY)
     if (mysql->options.ssl_key)
       my_free(mysql->options.ssl_key);
     mysql->options.ssl_key= set_ssl_option_unpack_path(&mysql->options, arg);
+#elif defined(EMBEDDED_LIBRARY)
+    DBUG_RETURN(1);
+#endif
     break;
   case MYSQL_OPT_SSL_CERT:
+#if defined(HAVE_OPENSSL) && !defined(EMBEDDED_LIBRARY)
     if (mysql->options.ssl_cert)
       my_free(mysql->options.ssl_cert);
     mysql->options.ssl_cert= set_ssl_option_unpack_path(&mysql->options, arg);
+#elif defined(EMBEDDED_LIBRARY)
+    DBUG_RETURN(1);
+#endif
     break;
   case MYSQL_OPT_SSL_CA:
+#if defined(HAVE_OPENSSL) && !defined(EMBEDDED_LIBRARY)
     if (mysql->options.ssl_ca)
       my_free(mysql->options.ssl_ca);
     mysql->options.ssl_ca= set_ssl_option_unpack_path(&mysql->options, arg);
+#elif defined(EMBEDDED_LIBRARY)
+    DBUG_RETURN(1);
+#endif
     break;
   case MYSQL_OPT_SSL_CAPATH:
+#if defined(HAVE_OPENSSL) && !defined(EMBEDDED_LIBRARY)
     if (mysql->options.ssl_capath)
       my_free(mysql->options.ssl_capath);
     mysql->options.ssl_capath= set_ssl_option_unpack_path(&mysql->options, arg);
+#elif defined(EMBEDDED_LIBRARY)
+    DBUG_RETURN(1);
+#endif
+    break;
+  case MYSQL_OPT_SSL_CIPHER:
+#if defined(HAVE_OPENSSL) && !defined(EMBEDDED_LIBRARY)
+    SET_SSL_OPTION(ssl_cipher, arg);
+#elif defined(EMBEDDED_LIBRARY)
+    DBUG_RETURN(1);
+#endif
     break;
-  case MYSQL_OPT_SSL_CIPHER:   SET_SSL_OPTION(ssl_cipher, arg);  break;
   case MYSQL_OPT_SSL_CRL:
+#if defined(HAVE_OPENSSL) && !defined(EMBEDDED_LIBRARY)
     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);
+#elif defined(EMBEDDED_LIBRARY)
+    DBUG_RETURN(1);
+#endif
     break;
   case MYSQL_OPT_SSL_CRLPATH:
+#if defined(HAVE_OPENSSL) && !defined(EMBEDDED_LIBRARY)
     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);
+#elif defined(EMBEDDED_LIBRARY)
+    DBUG_RETURN(1);
+#endif
     break;
   case MYSQL_SERVER_PUBLIC_KEY:
     EXTENSION_SET_STRING(&mysql->options, server_public_key_path, arg);
@@ -4628,11 +4724,15 @@ mysql_options(MYSQL *mysql,enum mysql_option option, const void *arg)
       mysql->options.client_flag&= ~CLIENT_CAN_HANDLE_EXPIRED_PASSWORDS;
     break;
   case MYSQL_OPT_SSL_MODE:
+#if defined(HAVE_OPENSSL) && !defined(EMBEDDED_LIBRARY)
     if (*(uint *) arg == SSL_MODE_REQUIRED)
     {
       ENSURE_EXTENSIONS_PRESENT(&mysql->options);
       mysql->options.extension->ssl_mode= SSL_MODE_REQUIRED;
     }
+#elif defined(EMBEDDED_LIBRARY)
+    DBUG_RETURN(1);
+#endif
     break;
 
   default:
diff --git a/mysql-wsrep-5.6/sql-common/my_path_permissions.cc b/mysql-wsrep-5.6/sql-common/my_path_permissions.cc
new file mode 100644 (file)
index 0000000..22cd748
--- /dev/null
@@ -0,0 +1,54 @@
+/* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+
+   This program is free software; you can redistribute it and/or modify it
+   under the terms of the GNU General Public License as published by the
+   Free Software Foundation; version 2 of the License.
+
+   This program is distributed in the hope that it will be useful, but
+   WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+   02110-1301, USA */
+
+#include "my_dir.h"
+
+#ifdef  __cplusplus
+extern "C" {
+#endif
+
+/**
+  Check if a file/dir is world-writable (only on non-Windows platforms)
+
+  @param [in] Path of the file/dir to be checked
+
+  @returns Status of the file/dir check
+    @retval -2 Permission denied to check attributes of file/dir
+    @retval -1 Error in reading file/dir
+    @retval  0 File/dir is not world-writable
+    @retval  1 File/dir is world-writable
+ */
+
+int is_file_or_dir_world_writable(const char *path)
+{
+  MY_STAT stat_info;
+  (void)path; // avoid unused param warning when built on Windows
+#ifndef _WIN32
+  if (!my_stat(path, &stat_info, MYF(0)))
+  {
+      return (errno == EACCES) ? -2 : -1;
+  }
+  if ((stat_info.st_mode & S_IWOTH) &&
+      ((stat_info.st_mode & S_IFMT) == S_IFREG ||   /* file   */
+       (stat_info.st_mode & S_IFMT) == S_IFDIR))    /* or dir */
+    return 1;
+#endif
+  return 0;
+}
+
+#ifdef  __cplusplus
+}
+#endif
index 02a4efe4ac03ecabc009c1f27f7f29451394734f..07aceee11aae5073cb12a5eeed7857fc9d66e82f 100644 (file)
@@ -1,5 +1,4 @@
-/* Copyright (c) 2000-2003, 2007 MySQL AB
-   Use is subject to license terms
+/* Copyright (c) 2000, 2018 Oracle and/or its affiliates. All rights reserved.
 
    This 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,6 +45,40 @@ ulong STDCALL net_field_length(uchar **packet)
   return (ulong) uint4korr(pos+1);
 }
 
+/* The same as above but with max length check */
+ulong STDCALL net_field_length_checked(uchar **packet, ulong max_length)
+{
+  ulong len;
+  uchar *pos= (uchar *)*packet;
+
+  if (*pos < 251)
+  {
+    (*packet)++;
+    len= (ulong) *pos;
+    return (len > max_length) ? max_length : len;
+  }
+  if (*pos == 251)
+  {
+    (*packet)++;
+    return NULL_LENGTH;
+  }
+  if (*pos == 252)
+  {
+    (*packet)+=3;
+    len= (ulong) uint2korr(pos+1);
+    return (len > max_length) ? max_length : len;
+  }
+  if (*pos == 253)
+  {
+    (*packet)+=4;
+    len= (ulong) uint3korr(pos+1);
+    return (len > max_length) ? max_length : len;
+  }
+  (*packet)+=9;                                 /* Must be 254 when here */
+  len= (ulong) uint4korr(pos+1);
+  return (len > max_length) ? max_length : len;
+}
+
 /* The same as above but returns longlong */
 my_ulonglong net_field_length_ll(uchar **packet)
 {
index bc1e430b03a05255dc9180b75fde2fc240ab0927..fd54da76a413f1f4564e73b6954a4a72a23f5f9e 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (c) 2006, 2017, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2006, 2018, Oracle and/or its affiliates. All rights reserved.
 # 
 # This 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
 
-IF(WITH_WSREP)
- SET(WSREP_INCLUDES ${CMAKE_SOURCE_DIR}/wsrep)
-ENDIF()
-
 INCLUDE_DIRECTORIES(
   ${CMAKE_SOURCE_DIR}/include 
   ${CMAKE_SOURCE_DIR}/sql 
@@ -40,8 +36,8 @@ SET(GEN_DIGEST_SOURCES
 )
 
 SET_SOURCE_FILES_PROPERTIES(${GEN_SOURCES}
-                            ${CONF_SOURCES}
                             ${GEN_DIGEST_SOURCES}
+                            ${CONF_SOURCES}
                             PROPERTIES GENERATED 1)
 
 # Gen_lex_token
@@ -216,13 +212,14 @@ ENDIF()
 SET(SQL_SOURCE
   ${WSREP_SOURCES}
   ${GEN_SOURCES}
-  ${CONF_SOURCES}
   ${GEN_DIGEST_SOURCES}
+  ${CONF_SOURCES}
   ${MYSYS_LIBWRAP_SOURCE}
   ${SQL_SHARED_SOURCES}
   ../libmysql/errmsg.c
   ../sql-common/client.c
   ../sql-common/client_plugin.c
+  ../sql-common/my_path_permissions.cc
   ../sql-common/my_time.c
   ../sql-common/my_user.c 
   ../sql-common/pack.c
@@ -299,7 +296,8 @@ ELSE()
   SET(MYSQLD_SOURCE main.cc ${DTRACE_PROBES_ALL})
 ENDIF()
 
-MYSQL_ADD_EXECUTABLE(mysqld ${MYSQLD_SOURCE} DESTINATION ${INSTALL_SBINDIR} COMPONENT Server)
+MYSQL_ADD_EXECUTABLE(mysqld
+  ${MYSQLD_SOURCE} DESTINATION ${INSTALL_SBINDIR} COMPONENT Server)
 
 OPTION(DEBUG_EXTNAME "Build server as mysqld-debug (debug builds only)" OFF)
 MARK_AS_ADVANCED(DEBUG_EXTNAME)
@@ -326,9 +324,11 @@ IF(NOT WITHOUT_DYNAMIC_PLUGINS)
     SET_TARGET_PROPERTIES(mysqld PROPERTIES LINK_FLAGS "${mysqld_link_flags} -Wl,--export-all-symbols")
   ENDIF()
   IF(MSVC)
-    # Set module definition file. Also use non-incremental linker, 
-    # incremental appears to crash from time to time,if used with /DEF option
-    SET_TARGET_PROPERTIES(mysqld PROPERTIES LINK_FLAGS "${mysqld_link_flags} /DEF:mysqld.def /INCREMENTAL:NO")
+    # Set module definition file.
+    # Also use non-incremental linker, incremental appears to crash from
+    # time to time,if used with /DEF option
+    SET_TARGET_PROPERTIES(mysqld PROPERTIES LINK_FLAGS
+      "${mysqld_link_flags} /DEF:mysqld.def /INCREMENTAL:NO")
 
     FOREACH (CORELIB sql mysys mysys_ssl dbug strings)
       GET_TARGET_PROPERTY(LOC ${CORELIB} LOCATION)
@@ -389,25 +389,26 @@ ENDIF()
 # Handle out-of-source build from source package with possibly broken 
 # bison. Copy bison output to from source to build directory, if not already 
 # there
-IF (NOT ${CMAKE_CURRENT_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_BINARY_DIR})
-  IF(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/sql_yacc.cc)
-    IF(NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/sql_yacc.cc)
-      CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/sql_yacc.cc 
-        ${CMAKE_CURRENT_BINARY_DIR}/sql_yacc.cc COPYONLY)
-      CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/sql_yacc.h
-        ${CMAKE_CURRENT_BINARY_DIR}/sql_yacc.h COPYONLY)
-    ENDIF()
-  ENDIF()
-ENDIF()
-
-
 INCLUDE(${CMAKE_SOURCE_DIR}/cmake/bison.cmake)
+COPY_BISON_OUTPUT(
+  ${CMAKE_CURRENT_SOURCE_DIR}/sql_yacc.cc
+  ${CMAKE_CURRENT_SOURCE_DIR}/sql_yacc.h
+  ${CMAKE_CURRENT_BINARY_DIR}/sql_yacc.cc
+  ${CMAKE_CURRENT_BINARY_DIR}/sql_yacc.h
+)
+
 RUN_BISON(
   ${CMAKE_CURRENT_SOURCE_DIR}/sql_yacc.yy 
   ${CMAKE_CURRENT_BINARY_DIR}/sql_yacc.cc
   ${CMAKE_CURRENT_BINARY_DIR}/sql_yacc.h
 )
 
+SET_SOURCE_FILES_PROPERTIES(
+  ${CMAKE_CURRENT_BINARY_DIR}/sql_yacc.cc
+  ${CMAKE_CURRENT_SOURCE_DIR}/sql_digest.cc
+  PROPERTIES OBJECT_DEPENDS ${GEN_DIGEST_SOURCES}
+)
+
 # Gen_lex_hash
 ADD_EXECUTABLE(gen_lex_hash gen_lex_hash.cc)
 
@@ -431,8 +432,6 @@ ADD_CUSTOM_TARGET(
         DEPENDS ${GEN_DIGEST_SOURCES}
 )
 
-#Need this only for embedded
-SET_TARGET_PROPERTIES(GenServerSource PROPERTIES EXCLUDE_FROM_ALL TRUE)
 
 IF(WIN32 OR HAVE_DLOPEN AND NOT DISABLE_SHARED)
   ADD_LIBRARY(udf_example MODULE udf_example.cc)
@@ -440,7 +439,8 @@ IF(WIN32 OR HAVE_DLOPEN AND NOT DISABLE_SHARED)
   # udf_example depends on strings 
   IF(WIN32)
     IF(MSVC)
-     SET_TARGET_PROPERTIES(udf_example PROPERTIES LINK_FLAGS "/DEF:${CMAKE_CURRENT_SOURCE_DIR}/udf_example.def")
+      SET_TARGET_PROPERTIES(udf_example
+        PROPERTIES LINK_FLAGS "/DEF:${CMAKE_CURRENT_SOURCE_DIR}/udf_example.def")
     ENDIF()
     TARGET_LINK_LIBRARIES(udf_example strings)
   ELSE()
@@ -524,4 +524,3 @@ ENDIF()
 ADD_CUSTOM_TARGET(show-dist-name
   COMMAND ${CMAKE_COMMAND} -E echo "${CPACK_PACKAGE_FILE_NAME}"
 )
-
index 2b81800f5751253984d1763d00ea6d8a8e80de1e..caf4bda11befede7613f139eee040a04a9d534e7 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2009, 2018, Oracle and/or its affiliates. All rights reserved.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -370,6 +370,36 @@ public:
     return flags.incident;
   }
 
+  /**
+    Sets the binlog_cache_data::Flags::flush_error flag if there
+    is an error while flushing cache to the file.
+
+    @param thd  The client thread that is executing the transaction.
+  */
+  void set_flush_error(THD *thd)
+  {
+    flags.flush_error= true;
+    if(is_trx_cache())
+    {
+      /*
+         If the cache is a transactional cache and if the write
+         has failed due to ENOSPC, then my_write() would have
+         set EE_WRITE error, so clear the error and create an
+         equivalent server error.
+      */
+      if (thd->is_error())
+        thd->clear_error();
+      char errbuf[MYSYS_STRERROR_SIZE];
+      my_error(ER_ERROR_ON_WRITE, MYF(MY_WME), my_filename(cache_log.file),
+          errno, my_strerror(errbuf, sizeof(errbuf), errno));
+    }
+  }
+
+  bool get_flush_error(void) const
+  {
+    return flags.flush_error;
+  }
+
   bool has_xid() const {
     // There should only be an XID event if we are transactional
     DBUG_ASSERT((flags.transactional && flags.with_xid) || !flags.with_xid);
@@ -414,6 +444,7 @@ public:
     flags.with_xid= false;
     flags.immediate= false;
     flags.finalized= false;
+    flags.flush_error= false;
     /*
       The truncate function calls reinit_io_cache that calls my_b_flush_io_cache
       which may increase disk_writes. This breaks the disk_writes use by the
@@ -476,7 +507,13 @@ protected:
   {
     DBUG_PRINT("info", ("truncating to position %lu", (ulong) pos));
     remove_pending_event();
-    reinit_io_cache(&cache_log, WRITE_CACHE, pos, 0, 0);
+    /*
+      Whenever there is an error while flushing cache to file,
+      the local cache will not be in a normal state and the same
+      cache cannot be used without facing an assert.
+      So, clear the cache if there is a flush error.
+    */
+    reinit_io_cache(&cache_log, WRITE_CACHE, pos, 0, get_flush_error());
     cache_log.end_of_file= saved_max_binlog_cache_size;
   }
 
@@ -530,6 +567,12 @@ protected:
       This indicates that the cache contain an XID event.
      */
     bool with_xid:1;
+
+    /*
+      This flag is set to 'true' when there is an error while flushing the
+      I/O cache to file.
+     */
+    bool flush_error:1;
   } flags;
 
 private:
@@ -989,6 +1032,14 @@ int binlog_cache_data::write_event(THD *thd, Log_event *ev)
   {
     DBUG_EXECUTE_IF("simulate_disk_full_at_flush_pending",
                   {DBUG_SET("+d,simulate_file_write_error");});
+
+    DBUG_EXECUTE_IF("simulate_tmpdir_partition_full",
+                  {
+                  static int count= -1;
+                  count++;
+                  if(count % 4 == 3 && ev->get_type_code() == WRITE_ROWS_EVENT)
+                    DBUG_SET("+d,simulate_temp_file_write_error");
+                  });
     if (ev->write(&cache_log) != 0)
     {
       DBUG_EXECUTE_IF("simulate_disk_full_at_flush_pending",
@@ -1004,6 +1055,19 @@ int binlog_cache_data::write_event(THD *thd, Log_event *ev)
                         */
                         DBUG_SET("+d,simulate_do_write_cache_failure");
                       });
+
+      DBUG_EXECUTE_IF("simulate_temp_file_write_error",
+                      {
+                        DBUG_SET("-d,simulate_temp_file_write_error");
+                      });
+      /*
+        If the flush has failed due to ENOSPC error, set the
+        flush_error flag.
+      */
+      if (thd->is_error() && my_errno == ENOSPC)
+      {
+        set_flush_error(thd);
+      }
       DBUG_RETURN(1);
     }
     if (ev->get_type_code() == XID_EVENT)
@@ -1139,12 +1203,41 @@ gtid_before_write_cache(THD* thd, binlog_cache_data* cache_data)
     Gtid_log_event gtid_ev(thd, cache_data->is_trx_cache(),
                            &cached_group->spec);
     bool using_file= cache_data->cache_log.pos_in_file > 0;
+
+    DBUG_EXECUTE_IF("simulate_tmpdir_partition_full",
+                  {
+                  DBUG_SET("+d,simulate_temp_file_write_error");
+                  });
+
     my_off_t saved_position= cache_data->reset_write_pos(0, using_file);
-    error= gtid_ev.write(&cache_data->cache_log);
-    cache_data->reset_write_pos(saved_position, using_file);
+
+    if (!cache_data->cache_log.error)
+    {
+      if (gtid_ev.write(&cache_data->cache_log))
+        goto err;
+      cache_data->reset_write_pos(saved_position, using_file);
+    }
+
+    if (cache_data->cache_log.error)
+      goto err;
   }
 
   DBUG_RETURN(error);
+
+err:
+  DBUG_EXECUTE_IF("simulate_tmpdir_partition_full",
+                {
+                DBUG_SET("-d,simulate_temp_file_write_error");
+                });
+  /*
+    If the reinit_io_cache has failed, set the flush_error flag.
+  */
+  if (cache_data->cache_log.error)
+  {
+    cache_data->set_flush_error(thd);
+  }
+  DBUG_RETURN(1);
+
 }
 
 /**
@@ -6150,6 +6243,14 @@ err:
     sql_print_error(ER(ER_ERROR_ON_WRITE), name,
                     errno, my_strerror(errbuf, sizeof(errbuf), errno));
   }
+
+  /*
+    If the flush has failed due to ENOSPC, set the flush_error flag.
+  */
+  if (cache->error && thd->is_error() && my_errno == ENOSPC)
+  {
+    cache_data->set_flush_error(thd);
+  }
   thd->commit_error= THD::CE_FLUSH_ERROR;
 
   DBUG_RETURN(1);
@@ -7201,6 +7302,14 @@ void MYSQL_BIN_LOG::handle_binlog_flush_or_sync_error(THD *thd,
     }
     close(LOG_CLOSE_INDEX|LOG_CLOSE_STOP_EVENT, false/*need_lock_log=false*/,
           true/*need_lock_index=true*/);
+    /*
+      If there is a write error (flush/sync stage) and if
+      binlog_error_action=IGNORE_ERROR, clear the error
+      and allow the commit to happen in storage engine.
+    */
+    if (check_write_error(thd))
+      thd->clear_error();
+
     if (need_lock_log)
       mysql_mutex_unlock(&LOCK_log);
     DEBUG_SYNC(thd, "after_binlog_closed_due_to_error");
index 655c19ec4dc81f88d452ec94e17c298ebdec6ccf..e94c3e3307777259b64e1e82943156430d18b947 100644 (file)
@@ -1,5 +1,5 @@
 /*
-   Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
+   Copyright (c) 2006, 2017, Oracle and/or its affiliates. All rights reserved.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -174,6 +174,8 @@ protected:
     error_log_print(ERROR_LEVEL, fmt, args);
     va_end(args);
   }
+public:
+  Event_db_intact() { has_keys= TRUE; }
 };
 
 /** In case of an error, a message is printed to the error log. */
@@ -549,14 +551,6 @@ Event_db_repository::fill_schema_events(THD *thd, TABLE_LIST *i_s_table,
   if (open_system_tables_for_read(thd, &event_table, &open_tables_backup))
     DBUG_RETURN(TRUE);
 
-  if (!event_table.table->key_info)
-  {
-    close_system_tables(thd, &open_tables_backup);
-    my_error(ER_TABLE_CORRUPT, MYF(0), event_table.table->s->db.str,
-             event_table.table->s->table_name.str);
-    DBUG_RETURN(TRUE);
-  }
   if (table_intact.check(event_table.table, &event_table_def))
   {
     close_system_tables(thd, &open_tables_backup);
@@ -964,13 +958,6 @@ Event_db_repository::find_named_event(LEX_STRING db, LEX_STRING name,
       name.length > table->field[ET_FIELD_NAME]->field_length)
     DBUG_RETURN(TRUE);
   
-  if (!table->key_info)
-  {
-    my_error(ER_TABLE_CORRUPT, MYF(0), table->s->db.str, 
-             table->s->table_name.str);
-    DBUG_RETURN(TRUE);
-  }
-
   table->field[ET_FIELD_DB]->store(db.str, db.length, &my_charset_bin);
   table->field[ET_FIELD_NAME]->store(name.str, name.length, &my_charset_bin);
 
index 10362c4bedc8c8e926751d30803d146a59181b86..22c939442b0dafccc24f3ce493390c9115a47339 100644 (file)
@@ -144,6 +144,8 @@ public:
     Info *result= (Info *)new_item();
     if (!result)
       return NULL;
+    if (!m_hook)
+      return NULL;
     *m_hook= result;
     m_hook= &result->next;
     m_n_points++;
index ccbfb7138931f38e38d8a96e9a037911f06170ad..760ec384c35c63604263a529ae0bc472c97ebca1 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -733,7 +733,8 @@ int Gcalc_operation_reducer::end_couple(active_thread *t0, active_thread *t1,
 {
   DBUG_ENTER("Gcalc_operation_reducer::end_couple");
   res_point *rp0, *rp1;
-  DBUG_ASSERT(t1->result_range);
+  if (!t1->result_range)
+    DBUG_RETURN(1);
   if (!(rp0= add_res_point(p)) || !(rp1= add_res_point(p)))
     DBUG_RETURN(1);
   rp0->down= t0->rp;
index 45d9685634449c1bb158462efb4dd654efac3f77..08704590387fe56e7190ac054bd57382f59a0203 100644 (file)
@@ -2088,6 +2088,9 @@ int ha_partition::copy_partitions(ulonglong * const copied,
         /* Copy record to new handler */
         (*copied)++;
         tmp_disable_binlog(thd); /* Do not replicate the low-level changes. */
+#ifdef WITH_WSREP
+        reenable_wsrep(thd);
+#endif
         result= m_new_file[new_part]->ha_write_row(m_rec0);
         reenable_binlog(thd);
         if (result)
@@ -4062,6 +4065,9 @@ int ha_partition::write_row(uchar * buf)
   start_part_bulk_insert(thd, part_id);
 
   tmp_disable_binlog(thd); /* Do not replicate the low-level changes. */
+#ifdef WITH_WSREP
+  reenable_wsrep(thd);
+#endif
   error= m_file[part_id]->ha_write_row(buf);
   if (have_auto_increment && !table->s->next_number_keypart)
     set_auto_increment_if_higher(table->next_number_field);
@@ -4152,6 +4158,9 @@ int ha_partition::update_row(const uchar *old_data, uchar *new_data)
   {
     DBUG_PRINT("info", ("Update in partition %d", new_part_id));
     tmp_disable_binlog(thd); /* Do not replicate the low-level changes. */
+#ifdef WITH_WSREP
+    reenable_wsrep(thd);
+#endif
     error= m_file[new_part_id]->ha_update_row(old_data, new_data);
     reenable_binlog(thd);
     goto exit;
@@ -4173,6 +4182,9 @@ int ha_partition::update_row(const uchar *old_data, uchar *new_data)
     DBUG_PRINT("info", ("Update from partition %d to partition %d",
                        old_part_id, new_part_id));
     tmp_disable_binlog(thd); /* Do not replicate the low-level changes. */
+#ifdef WITH_WSREP
+    reenable_wsrep(thd);
+#endif
     error= m_file[new_part_id]->ha_write_row(new_data);
     reenable_binlog(thd);
     table->next_number_field= saved_next_number_field;
@@ -4180,6 +4192,9 @@ int ha_partition::update_row(const uchar *old_data, uchar *new_data)
       goto exit;
 
     tmp_disable_binlog(thd); /* Do not replicate the low-level changes. */
+#ifdef WITH_WSREP
+    reenable_wsrep(thd);
+#endif
     error= m_file[old_part_id]->ha_delete_row(old_data);
     reenable_binlog(thd);
     if (error)
@@ -4291,6 +4306,9 @@ int ha_partition::delete_row(const uchar *buf)
 
   m_last_part= part_id;
   tmp_disable_binlog(thd);
+#ifdef WITH_WSREP
+  reenable_wsrep(thd);
+#endif
   error= m_file[part_id]->ha_delete_row(buf);
   reenable_binlog(thd);
   DBUG_RETURN(error);
index f6119b2a325aacaf1a04fcc7a1562c4b0790142b..038212314f97f8fcef35a5202dc671e11d758520 100644 (file)
@@ -1,5 +1,5 @@
 /*
-   Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
+   Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -9384,6 +9384,7 @@ bool Item_type_holder::join_types(THD *thd, Item *item)
   }
   if (Field::result_merge_type(fld_type) == DECIMAL_RESULT)
   {
+    collation.set_numeric();
     decimals= min<int>(max(decimals, item->decimals), DECIMAL_MAX_SCALE);
     int item_int_part= item->decimal_int_part();
     int item_prec = max(prev_decimal_int_part, item_int_part) + decimals;
index 81e7b4dbef609d225d4b5934bb2f3dc4788bade3..3441d6939f16773ce65ae77e5c40ebababc71186 100644 (file)
@@ -1,5 +1,5 @@
 /*
-   Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
+   Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -2968,8 +2968,8 @@ void Item_func_make_set::update_used_tables()
   item->update_used_tables();
   used_tables_cache|=item->used_tables();
   const_item_cache&=item->const_item();
-  with_subselect= item->has_subquery();
-  with_stored_program= item->has_stored_program();
+  with_subselect|= item->has_subquery();
+  with_stored_program|= item->has_stored_program();
 }
 
 
index d5185f3087848a1c2aca1711af58773c72475e5b..96ec6e3dfb5173a44956959910ad7b5541251c8f 100644 (file)
@@ -1,5 +1,5 @@
 /*
-   Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
+   Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -1039,10 +1039,19 @@ my_bool Log_event::need_checksum()
 
 bool Log_event::wrapper_my_b_safe_write(IO_CACHE* file, const uchar* buf, ulong size)
 {
+  DBUG_EXECUTE_IF("simulate_temp_file_write_error",
+                  {
+                    file->write_pos = file->write_end;
+                    DBUG_SET("+d,simulate_file_write_error");
+                  });
   if (need_checksum() && size != 0)
     crc= my_checksum(crc, buf, size);
-
-  return my_b_safe_write(file, buf, size);
+  bool ret = my_b_safe_write(file, buf, size);
+  DBUG_EXECUTE_IF("simulate_temp_file_write_error",
+                  {
+                    DBUG_SET("-d,simulate_file_write_error");
+                  });
+  return ret;
 }
 
 bool Log_event::write_footer(IO_CACHE* file) 
@@ -4225,6 +4234,25 @@ Query_log_event::Query_log_event(const char* buf, uint event_len,
   db= (char *)start;
   query= (char *)(start + db_len + 1);
   q_len= data_len - db_len -1;
+
+  if (data_len && (data_len < db_len ||
+                   data_len < q_len ||
+                   data_len != (db_len + q_len + 1)))
+  {
+    q_len= 0;
+    query= NULL;
+    DBUG_VOID_RETURN;
+  }
+
+  unsigned int max_length;
+  max_length= (event_len - ((const char*)(end + db_len + 1) -
+                            (buf - common_header_len)));
+  if (q_len != max_length)
+  {
+    q_len= 0;
+    query= NULL;
+    DBUG_VOID_RETURN;
+  }
   /**
     Append the db length at the end of the buffer. This will be used by
     Query_cache::send_result_to_client() in case the query cache is On.
@@ -4624,6 +4652,26 @@ int Query_log_event::do_apply_event(Relay_log_info const *rli,
     you.
   */
   thd->catalog= catalog_len ? (char *) catalog : (char *)"";
+
+  size_t valid_len;
+  bool len_error;
+  bool is_invalid_db_name= validate_string(system_charset_info, db, db_len,
+                                           &valid_len, &len_error);
+
+  DBUG_PRINT("debug",("is_invalid_db_name= %s, valid_len=%zu, len_error=%s",
+                      is_invalid_db_name ? "true" : "false",
+                      valid_len,
+                      len_error ? "true" : "false"));
+
+  if (is_invalid_db_name || len_error)
+  {
+    rli->report(ERROR_LEVEL, ER_SLAVE_FATAL_ERROR,
+                ER_THD(thd, ER_SLAVE_FATAL_ERROR),
+                "Invalid database name in Query event.");
+    thd->is_slave_error= true;
+    goto end;
+  }
+
   set_thd_db(thd, db, db_len);
 
   /*
@@ -4803,7 +4851,23 @@ int Query_log_event::do_apply_event(Relay_log_info const *rli,
       }
       else
         thd->variables.collation_database= thd->db_charset;
-      
+
+      {
+        const CHARSET_INFO *cs= thd->charset();
+        /*
+          We cannot ask for parsing a statement using a character set
+          without state_maps (parser internal data).
+        */
+        if (!cs->state_map)
+        {
+          rli->report(ERROR_LEVEL, ER_SLAVE_FATAL_ERROR,
+                      ER_THD(thd, ER_SLAVE_FATAL_ERROR),
+                      "character_set cannot be parsed");
+          thd->is_slave_error= true;
+          goto end;
+        }
+      }
+
       thd->table_map_for_update= (table_map)table_map_for_update;
       thd->set_invoker(&user, &host);
       /*
@@ -5357,7 +5421,13 @@ int Start_log_event_v3::do_apply_event(Relay_log_info const *rli)
     */
     break;
   default:
-    /* this case is impossible */
+    /*
+      This case is not expected. It can be either an event corruption or an
+      unsupported binary log version.
+    */
+    rli->report(ERROR_LEVEL, ER_SLAVE_FATAL_ERROR,
+                ER_THD(thd, ER_SLAVE_FATAL_ERROR),
+                "Binlog version not supported");
     DBUG_RETURN(1);
   }
   DBUG_RETURN(error);
@@ -6286,6 +6356,9 @@ int Load_log_event::copy_log_event(const char *buf, ulong event_len,
 
   fields = (char*)field_lens + num_fields;
   table_name  = fields + field_block_len;
+  if (strlen(table_name) > NAME_LEN)
+    goto err;
+
   db = table_name + table_name_len + 1;
   DBUG_EXECUTE_IF ("simulate_invalid_address",
                    db_len = data_len;);
@@ -7739,6 +7812,13 @@ User_var_log_event(const char* buf, uint event_len,
   buf+= description_event->common_header_len +
     description_event->post_header_len[USER_VAR_EVENT-1];
   name_len= uint4korr(buf);
+  /* Avoid reading out of buffer */
+  if ((buf - buf_start) + UV_NAME_LEN_SIZE + name_len > event_len)
+  {
+    error= true;
+    goto err;
+  }
+
   name= (char *) buf + UV_NAME_LEN_SIZE;
 
   /*
@@ -7798,6 +7878,11 @@ User_var_log_event(const char* buf, uint event_len,
       we keep the flags set to UNDEF_F.
     */
     uint bytes_read= ((val + val_len) - start);
+    if (bytes_read > event_len)
+    {
+      error= true;
+      goto err;
+    }
 #ifndef DBUG_OFF
     bool old_pre_checksum_fd= description_event->is_version_before_checksum();
 #endif
@@ -8029,7 +8114,12 @@ int User_var_log_event::do_apply_event(Relay_log_info const *rli)
   }
 
   if (!(charset= get_charset(charset_number, MYF(MY_WME))))
+  {
+    rli->report(ERROR_LEVEL, ER_SLAVE_FATAL_ERROR,
+                ER_THD(thd, ER_SLAVE_FATAL_ERROR),
+                "Invalid character set for User var event");
     return 1;
+  }
   double real_val;
   longlong int_val;
 
@@ -8047,12 +8137,26 @@ int User_var_log_event::do_apply_event(Relay_log_info const *rli)
   {
     switch (type) {
     case REAL_RESULT:
+      if (val_len != 8)
+      {
+        rli->report(ERROR_LEVEL, ER_SLAVE_FATAL_ERROR,
+                    ER_THD(thd, ER_SLAVE_FATAL_ERROR),
+                    "Invalid variable length at User var event");
+        return 1;
+      }
       float8get(real_val, val);
       it= new Item_float(real_val, 0);
       val= (char*) &real_val;          // Pointer to value in native format
       val_len= 8;
       break;
     case INT_RESULT:
+      if (val_len != 8)
+      {
+        rli->report(ERROR_LEVEL, ER_SLAVE_FATAL_ERROR,
+                    ER_THD(thd, ER_SLAVE_FATAL_ERROR),
+                    "Invalid variable length at User var event");
+        return 1;
+      }
       int_val= (longlong) uint8korr(val);
       it= new Item_int(int_val);
       val= (char*) &int_val;           // Pointer to value in native format
@@ -8060,6 +8164,13 @@ int User_var_log_event::do_apply_event(Relay_log_info const *rli)
       break;
     case DECIMAL_RESULT:
     {
+      if (val_len < 3)
+      {
+        rli->report(ERROR_LEVEL, ER_SLAVE_FATAL_ERROR,
+                    ER_THD(thd, ER_SLAVE_FATAL_ERROR),
+                    "Invalid variable length at User var event");
+        return 1;
+      }
       Item_decimal *dec= new Item_decimal((uchar*) val+2, val[0], val[1]);
       it= dec;
       val= (char *)dec->val_decimal(NULL);
@@ -9485,7 +9596,15 @@ Rows_log_event::Rows_log_event(const char *buf, uint event_len,
       which includes length bytes
     */
     var_header_len= uint2korr(post_start);
-    assert(var_header_len >= 2);
+    /* Check length and also avoid out of buffer read */
+    if (var_header_len < 2 ||
+        event_len < static_cast<unsigned int>(var_header_len +
+                                              (post_start - buf)))
+    {
+      m_cols.bitmap= NULL;
+      DBUG_VOID_RETURN;
+    }
+
     var_header_len-= 2;
 
     /* Iterate over var-len header, extracting 'chunks' */
@@ -9531,6 +9650,15 @@ Rows_log_event::Rows_log_event(const char *buf, uint event_len,
   DBUG_PRINT("debug", ("Reading from %p", ptr_after_width));
   m_width = net_field_length(&ptr_after_width);
   DBUG_PRINT("debug", ("m_width=%lu", m_width));
+  /* Avoid reading out of buffer */
+  if (static_cast<unsigned int>((ptr_after_width +
+                                 (m_width + 7) / 8) -
+                                 (uchar*)buf) > event_len)
+  {
+    m_cols.bitmap= NULL;
+    DBUG_VOID_RETURN;
+  }
+
   /* if bitmap_init fails, catched in is_valid() */
   if (likely(!bitmap_init(&m_cols,
                           m_width <= sizeof(m_bitbuf)*8 ? m_bitbuf : NULL,
@@ -9580,7 +9708,13 @@ Rows_log_event::Rows_log_event(const char *buf, uint event_len,
 
   const uchar* const ptr_rows_data= (const uchar*) ptr_after_width;
 
-  size_t const data_size= event_len - (ptr_rows_data - (const uchar *) buf);
+  size_t const read_size= ptr_rows_data - (const unsigned char *) buf;
+  if (read_size > event_len)
+  {
+    DBUG_VOID_RETURN;
+  }
+
+  size_t const data_size= event_len - read_size;
   DBUG_PRINT("info",("m_table_id: %llu  m_flags: %d  m_width: %lu  data_size: %lu",
                      m_table_id.id(), m_flags, m_width, (ulong) data_size));
 
@@ -10283,7 +10417,13 @@ void Rows_log_event::do_post_row_operations(Relay_log_info const *rli, int error
 
   if (!m_curr_row_end && !error)
   {
+    const uchar *previous_m_curr_row= m_curr_row;
     error= unpack_current_row(rli, &m_cols);
+
+    if (!error && previous_m_curr_row == m_curr_row)
+    {
+      error= 1;
+    }
   }
 
   // at this moment m_curr_row_end should be set
@@ -12158,6 +12298,15 @@ Table_map_log_event::Table_map_log_event(const char *buf, uint event_len,
                      (ulong) m_tbllen, (long) (ptr_tbllen-(const uchar*)vpart),
                      m_colcnt, (long) (ptr_colcnt-(const uchar*)vpart)));
 
+  bytes_read= (unsigned int) (ptr_after_colcnt - (unsigned char *)buf);
+  /* Avoid reading out of buffer */
+  if (event_len <= bytes_read || event_len - bytes_read < m_colcnt)
+  {
+    m_coltype= NULL;
+    m_memory= NULL;
+    DBUG_VOID_RETURN;
+  }
+
   /* Allocate mem for all fields in one go. If fails, caught in is_valid() */
   m_memory= (uchar*) my_multi_malloc(MYF(MY_WME),
                                      &m_dbnam, (uint) m_dblen + 1,
@@ -12178,15 +12327,24 @@ Table_map_log_event::Table_map_log_event(const char *buf, uint event_len,
     if (bytes_read < event_len)
     {
       m_field_metadata_size= net_field_length(&ptr_after_colcnt);
-      DBUG_ASSERT(m_field_metadata_size <= (m_colcnt * 2));
-      uint num_null_bytes= (m_colcnt + 7) / 8;
-      m_meta_memory= (uchar *)my_multi_malloc(MYF(MY_WME),
-                                     &m_null_bits, num_null_bytes,
-                                     &m_field_metadata, m_field_metadata_size,
-                                     NULL);
-      memcpy(m_field_metadata, ptr_after_colcnt, m_field_metadata_size);
-      ptr_after_colcnt= (uchar*)ptr_after_colcnt + m_field_metadata_size;
-      memcpy(m_null_bits, ptr_after_colcnt, num_null_bytes);
+      if (m_field_metadata_size <= (m_colcnt * 2))
+      {
+        uint num_null_bytes= (m_colcnt + 7) / 8;
+        m_meta_memory= (uchar *)my_multi_malloc(MYF(MY_WME),
+                                       &m_null_bits, num_null_bytes,
+                                       &m_field_metadata, m_field_metadata_size,
+                                       NULL);
+        memcpy(m_field_metadata, ptr_after_colcnt, m_field_metadata_size);
+        ptr_after_colcnt= (uchar*)ptr_after_colcnt + m_field_metadata_size;
+        memcpy(m_null_bits, ptr_after_colcnt, num_null_bytes);
+      }
+      else
+      {
+        m_coltype= NULL;
+        my_free(m_memory);
+        m_memory= NULL;
+        DBUG_VOID_RETURN;
+      }
     }
   }
 
@@ -12196,8 +12354,10 @@ Table_map_log_event::Table_map_log_event(const char *buf, uint event_len,
 
 Table_map_log_event::~Table_map_log_event()
 {
-  my_free(m_meta_memory);
-  my_free(m_memory);
+  if (m_meta_memory != NULL)
+    my_free(m_meta_memory);
+  if (m_memory != NULL)
+    my_free(m_memory);
 }
 
 /*
@@ -12806,6 +12966,22 @@ Write_rows_log_event::write_row(const Relay_log_info *const rli,
   if ((error= unpack_current_row(rli, &m_cols)))
     DBUG_RETURN(error);
 
+  /*
+    When m_curr_row == m_curr_row_end, it means a row that contains nothing,
+    so all the pointers shall be pointing to the same address, or else
+    we have corrupt data and shall throw the error.
+  */
+  DBUG_PRINT("debug",("m_rows_buf= %p, m_rows_cur= %p, m_rows_end= %p",
+                      m_rows_buf, m_rows_cur, m_rows_end));
+  DBUG_PRINT("debug",("m_curr_row= %p, m_curr_row_end= %p",
+                      m_curr_row, m_curr_row_end));
+  if (m_curr_row == m_curr_row_end &&
+      !((m_rows_buf == m_rows_cur) && (m_rows_cur == m_rows_end)))
+  {
+    my_error(ER_SLAVE_CORRUPT_EVENT, MYF(0));
+    DBUG_RETURN(ER_SLAVE_CORRUPT_EVENT);
+  }
+
   if (m_curr_row == m_rows_buf)
   {
     /* this is the first row to be inserted, we estimate the rows with
@@ -13509,6 +13685,8 @@ Rows_query_log_event::Rows_query_log_event(const char *buf, uint event_len,
   uint8 const post_header_len=
     descr_event->post_header_len[ROWS_QUERY_LOG_EVENT-1];
 
+  m_rows_query= NULL;
+
   DBUG_PRINT("info",("event_len: %u; common_header_len: %d; post_header_len: %d",
                      event_len, common_header_len, post_header_len));
 
@@ -13516,8 +13694,12 @@ Rows_query_log_event::Rows_query_log_event(const char *buf, uint event_len,
    m_rows_query length is stored using only one byte, but that length is
    ignored and the complete query is read.
   */
-  int offset= common_header_len + post_header_len + 1;
-  int len= event_len - offset;
+  unsigned int offset= common_header_len + post_header_len + 1;
+  /* Avoid reading out of buffer */
+  if (offset > event_len)
+    DBUG_VOID_RETURN;
+
+  unsigned int len= event_len - offset;
   if (!(m_rows_query= (char*) my_malloc(len+1, MYF(MY_WME))))
     return;
   strmake(m_rows_query, buf + offset, len);
index d4884af637384e7478c5b96dff62b31300789b98..f6519a6dfe346ee13b3a089d2343674aaab9c780 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -4876,6 +4876,8 @@ public:
 
   virtual Log_event_type get_type_code() { return ROWS_QUERY_LOG_EVENT; }
 
+  virtual bool is_valid() const { return m_rows_query != NULL; }
+
   virtual int get_data_size()
   {
     return IGNORABLE_HEADER_LEN + 1 + (uint) strlen(m_rows_query);
index 49a14c007f6857784991cfc1539302dc569264de..393ee634195bf23d1731479c04df2b004e778306 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -1349,6 +1349,15 @@ Old_rows_log_event::Old_rows_log_event(const char *buf, uint event_len,
   DBUG_PRINT("debug", ("Reading from %p", ptr_after_width));
   m_width = net_field_length(&ptr_after_width);
   DBUG_PRINT("debug", ("m_width=%lu", m_width));
+  /* Avoid reading out of buffer */
+  if (static_cast<unsigned int>(m_width +
+                                (ptr_after_width -
+                                (const uchar *)buf)) > event_len)
+  {
+    m_cols.bitmap= NULL;
+    DBUG_VOID_RETURN;
+  }
+
   /* if bitmap_init fails, catched in is_valid() */
   if (likely(!bitmap_init(&m_cols,
                           m_width <= sizeof(m_bitbuf)*8 ? m_bitbuf : NULL,
index 6823263f60ee1a0ceca309efdaa387b8a72c1994..373282aca0360c8d883cc2e2a2774e33329a695a 100644 (file)
@@ -10344,6 +10344,40 @@ static int test_if_case_insensitive(const char *dir_name)
 static void create_pid_file()
 {
   File file;
+  bool check_parent_path= 1, is_path_accessible= 1;
+  char pid_filepath[FN_REFLEN], *pos= NULL;
+  /* Copy pid file name to get pid file path */
+  strcpy(pid_filepath, pidfile_name);
+
+  /* Iterate through the entire path to check if even one of the sub-dirs
+     is world-writable */
+  while (check_parent_path && (pos= strrchr(pid_filepath, FN_LIBCHAR))
+         && (pos != pid_filepath)) /* shouldn't check root */
+  {
+    *pos= '\0';  /* Trim the inner-most dir */
+    switch (is_file_or_dir_world_writable(pid_filepath))
+    {
+      case -2:
+        is_path_accessible= 0;
+        break;
+      case -1:
+        sql_perror("Can't start server: can't check PID filepath");
+        exit(1);
+      case 1:
+        sql_print_warning("Insecure configuration for --pid-file: Location "
+                          "'%s' in the path is accessible to all OS users. "
+                          "Consider choosing a different directory.",
+                          pid_filepath);
+        check_parent_path= 0;
+        break;
+      case 0:
+        continue; /* Keep checking the parent dir */
+    }
+  }
+  if(!is_path_accessible)
+  {
+    sql_print_warning("Few location(s) are inaccessible while checking PID filepath.");
+  }
   if ((file= mysql_file_create(key_file_pid, pidfile_name, 0664,
                                O_WRONLY | O_TRUNC, MYF(MY_WME))) >= 0)
   {
index 945b6d6b359bc789e9a0bf31d6d88b1f1423ecbf..21528e8b272e96da33c739b746ddbb50b61c35d6 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -1696,6 +1696,10 @@ static bool sql_slave_killed(THD* thd, Relay_log_info* rli)
   DBUG_ASSERT(rli->slave_running == 1);
   if (rli->sql_thread_kill_accepted)
     DBUG_RETURN(true);
+  DBUG_EXECUTE_IF("stop_when_mts_in_group", rli->abort_slave = 1;
+                  DBUG_SET("-d,stop_when_mts_in_group");
+                  DBUG_SET("-d,simulate_stop_when_mts_in_group");
+                  DBUG_RETURN(false););
   if (abort_loop || thd->killed || rli->abort_slave)
   {
     rli->sql_thread_kill_accepted= true;
@@ -4027,6 +4031,10 @@ apply_event_and_update_pos(Log_event** ptr_ev, THD* thd, Relay_log_info* rli)
       DBUG_RETURN(SLAVE_APPLY_EVENT_AND_UPDATE_POS_OK);
 
     exec_res= ev->apply_event(rli);
+    DBUG_EXECUTE_IF("simulate_stop_when_mts_in_group",
+                    if (rli->mts_group_status == Relay_log_info::MTS_IN_GROUP
+                        && rli->curr_group_seen_begin)
+                   DBUG_SET("+d,stop_when_mts_in_group"););
 #ifdef WITH_WSREP
     if (exec_res && thd->wsrep_conflict_state != NO_CONFLICT)
     {
@@ -6220,6 +6228,7 @@ pthread_handler_t handle_slave_sql(void *arg)
 
   Relay_log_info* rli = ((Master_info*)arg)->rli;
   const char *errmsg;
+  const char *error_string;
   bool mts_inited= false;
 
   // needs to call my_thread_init(), otherwise we get a coredump in DBUG_ stuff
@@ -6233,6 +6242,7 @@ pthread_handler_t handle_slave_sql(void *arg)
   mysql_mutex_lock(&rli->run_lock);
   DBUG_ASSERT(!rli->slave_running);
   errmsg= 0;
+  error_string= 0;
 #ifndef DBUG_OFF
   rli->events_until_exit = abort_slave_event_count;
 #endif
@@ -6522,17 +6532,14 @@ log '%s' at position %s, relay log '%s' position: %s", rli->get_rpl_log_name(),
           sql_print_warning("Slave: %s Error_code: %d", err->get_message_text(), err->get_sql_errno());
         }
         if (udf_error)
-          sql_print_error("Error loading user-defined library, slave SQL "
-            "thread aborted. Install the missing library, and restart the "
-            "slave SQL thread with \"SLAVE START\". We stopped at log '%s' "
-            "position %s", rli->get_rpl_log_name(),
-            llstr(rli->get_group_master_log_pos(), llbuff));
+          error_string= "Error loading user-defined library, slave SQL "
+            "thread aborted. Install the missing library, and restart the"
+            " slave SQL thread with \"SLAVE START\".";
         else
-          sql_print_error("\
-Error running query, slave SQL thread aborted. Fix the problem, and restart \
-the slave SQL thread with \"SLAVE START\". We stopped at log \
-'%s' position %s", rli->get_rpl_log_name(),
-llstr(rli->get_group_master_log_pos(), llbuff));
+          error_string= "Error running query, slave SQL thread aborted."
+            " Fix the problem, and restart the slave SQL thread with "
+            "\"SLAVE START\".";
+
 #ifdef WITH_WSREP
         if (WSREP_ON && last_errno == ER_UNKNOWN_COM_ERROR)
         {
@@ -6544,15 +6551,19 @@ llstr(rli->get_group_master_log_pos(), llbuff));
     }
   }
 
-  /* Thread stopped. Print the current replication position to the log */
-  sql_print_information("Slave SQL thread exiting, replication stopped in log "
-                        "'%s' at position %s",
-                        rli->get_rpl_log_name(),
-                        llstr(rli->get_group_master_log_pos(), llbuff));
-
  err:
 
   slave_stop_workers(rli, &mts_inited); // stopping worker pool
+  /* Thread stopped. Print the current replication position to the log */
+  if (error_string)
+    sql_print_error("%s We stopped at log '%s' position %s.", error_string,
+                    rli->get_rpl_log_name(),
+                    llstr(rli->get_group_master_log_pos(), llbuff));
+  else
+    sql_print_information("Slave SQL thread exiting, replication stopped in log"
+                          " '%s' at position %s",
+                          rli->get_rpl_log_name(),
+                          llstr(rli->get_group_master_log_pos(), llbuff));
   rli->clear_mts_recovery_groups();
 
 #ifdef WITH_WSREP
index b8ac6510f6a3768cfc594fe0b1144cab9c125c17..471980ecb0ae8b8aec7a8086bd68073d5d6a82fe 100644 (file)
@@ -7109,6 +7109,9 @@ ER_GTID_UNSAFE_BINLOG_SPLITTABLE_STATEMENT_AND_GTID_GROUP
 
 ER_SLAVE_HAS_MORE_GTIDS_THAN_MASTER
   eng "Slave has more GTIDs than the master has, using the master's SERVER_UUID. This may indicate that the end of the binary log was truncated or that the last binary log file was lost, e.g., after a power or disk failure when sync_binlog != 1. The master may or may not have rolled back transactions that were already replicated to the slave. Suggest to replicate any transactions that master has rolled back from slave to master, and/or commit empty transactions on master to account for transactions that have been committed on master but are not included in GTID_EXECUTED."
+
+ER_MISSING_KEY
+  eng "The table '%s.%s' does not have the necessary key(s) defined on it. Please check the table definition and create index(s) accordingly."
 #
 #  End of 5.6 error messages.
 #
index a22908952dc059808715471ec2eef6b3dd7c4803..be8fd82e2317431291080d1005bf6c2c5bc11488 100644 (file)
@@ -1,5 +1,5 @@
 /*
-   Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved.
+   Copyright (c) 2002, 2017, Oracle and/or its affiliates. All rights reserved.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -352,7 +352,7 @@ private:
   bool m_print_once;
 
 public:
-  Proc_table_intact() : m_print_once(TRUE) {}
+  Proc_table_intact() : m_print_once(TRUE) { has_keys= TRUE; }
 
 protected:
   void report_error(uint code, const char *fmt, ...);
@@ -415,17 +415,9 @@ TABLE *open_proc_table_for_read(THD *thd, Open_tables_backup *backup)
   if (open_system_tables_for_read(thd, &table, backup))
     DBUG_RETURN(NULL);
    
-  if (!table.table->key_info)
-  {
-    my_error(ER_TABLE_CORRUPT, MYF(0), table.table->s->db.str,
-             table.table->s->table_name.str);
-    goto err;
-  }
-
   if (!proc_table_intact.check(table.table, &proc_table_def))
     DBUG_RETURN(table.table);
 
-err:
   close_system_tables(thd, backup);
   DBUG_RETURN(NULL);
 }
index 664426ac1376ab3d0a0d278fcf21138aaa245ee1..3a9636a056de5d3e956f27a43654a7e5ed263f5e 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012, 2017, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
 
    This 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,7 @@
 #include "sql_parse.h"    // check_table_access
 #include "sql_prepare.h"  // reinit_stmt_before_use
 #include "transaction.h"  // trans_commit_stmt
+#include "debug_sync.h"   // DEBUG_SYNC
 
 #include <algorithm>
 
@@ -428,6 +429,7 @@ bool sp_lex_instr::reset_lex_and_exec_core(THD *thd,
   }
   else
   {
+    DEBUG_SYNC(thd, "sp_lex_instr_before_exec_core");
     rc= exec_core(thd, nextp);
     DBUG_PRINT("info",("exec_core returned: %d", rc));
   }
index 117a7b1b617d9735a0119fd9ff681d9cdbbb38ff..8b77f809acd4360c98c9cc52e64db622df424ff9 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -1074,6 +1074,8 @@ protected:
 
     va_end(args);
   }
+public:
+  Acl_table_intact() { has_keys= TRUE; }
 };
 
 #define IP_ADDR_STRLEN (3 + 1 + 3 + 1 + 3 + 1 + 3)
@@ -2732,13 +2734,6 @@ bool change_password(THD *thd, const char *host, const char *user,
   if (table_intact.check(table, &mysql_user_table_def))
     DBUG_RETURN(1);
 
-  if (!table->key_info)
-  {
-    my_error(ER_TABLE_CORRUPT, MYF(0), table->s->db.str,
-             table->s->table_name.str);
-    DBUG_RETURN(1);
-  }
-
   /*
     This statement will be replicated as a statement, even when using
     row-based replication.  The flag will be reset at the end of the
@@ -2757,7 +2752,7 @@ bool change_password(THD *thd, const char *host, const char *user,
   }
   mysql_mutex_assert_owner(&acl_cache->lock);
   table->use_all_columns();
-  DBUG_ASSERT(host != '\0');
+  DBUG_ASSERT(host != 0);
   table->field[MYSQL_USER_FIELD_HOST]->store(host, strlen(host),
                                              system_charset_info);
   table->field[MYSQL_USER_FIELD_USER]->store(user, strlen(user),
@@ -3207,7 +3202,7 @@ update_user_table(THD *thd, TABLE *table,
   if (!is_user_table_positioned)
   {
     table->use_all_columns();
-    DBUG_ASSERT(host != '\0');
+    DBUG_ASSERT(host != 0);
     table->field[MYSQL_USER_FIELD_HOST]->store(host, (uint) strlen(host),
                                               system_charset_info);
     table->field[MYSQL_USER_FIELD_USER]->store(user, (uint) strlen(user),
@@ -3342,15 +3337,8 @@ static int replace_user_table(THD *thd, TABLE *table, LEX_USER *combo,
   if (table_intact.check(table, &mysql_user_table_def))
     goto end;
 
-  if (!table->key_info)
-  {
-    my_error(ER_TABLE_CORRUPT, MYF(0), table->s->db.str,
-             table->s->table_name.str);
-    goto end;
-  }
   table->use_all_columns();
-  DBUG_ASSERT(combo->host.str != '\0');
+  DBUG_ASSERT(combo->host.str != 0);
   table->field[MYSQL_USER_FIELD_HOST]->store(combo->host.str,combo->host.length,
                                              system_charset_info);
   table->field[MYSQL_USER_FIELD_USER]->store(combo->user.str,combo->user.length,
@@ -3441,7 +3429,7 @@ static int replace_user_table(THD *thd, TABLE *table, LEX_USER *combo,
 
     old_row_exists = 0;
     restore_record(table,s->default_values);
-    DBUG_ASSERT(combo->host.str != '\0');
+    DBUG_ASSERT(combo->host.str != 0);
     table->field[MYSQL_USER_FIELD_HOST]->store(combo->host.str,combo->host.length,
                                                system_charset_info);
     table->field[MYSQL_USER_FIELD_USER]->store(combo->user.str,combo->user.length,
@@ -4448,13 +4436,6 @@ static int replace_column_table(GRANT_TABLE *g_t,
   if (table_intact.check(table, &mysql_columns_priv_table_def))
     DBUG_RETURN(-1);
 
-  if (!table->key_info)
-  {
-    my_error(ER_TABLE_CORRUPT, MYF(0), table->s->db.str,
-             table->s->table_name.str);
-    DBUG_RETURN(-1);
-  }
-
   key_part= table->key_info->key_part;
 
   table->use_all_columns();
@@ -7613,13 +7594,6 @@ static int handle_grant_table(TABLE_LIST *tables, uint table_no, bool drop,
     host_field->store(host_str, user_from->host.length, system_charset_info);
     user_field->store(user_str, user_from->user.length, system_charset_info);
 
-    if (!table->key_info)
-    {
-      my_error(ER_TABLE_CORRUPT, MYF(0), table->s->db.str,
-               table->s->table_name.str);
-      DBUG_RETURN(-1);
-    }
-     
     key_prefix_length= (table->key_info->key_part[0].store_length +
                         table->key_info->key_part[1].store_length);
     key_copy(user_key, table->record[0], table->key_info, key_prefix_length);
@@ -8644,13 +8618,6 @@ bool mysql_user_password_expire(THD *thd, List <LEX_USER> &list)
   if (table_intact.check(table, &mysql_user_table_def))
     DBUG_RETURN(true);
 
-  if (!table->key_info)
-  {
-    my_error(ER_TABLE_CORRUPT, MYF(0), table->s->db.str,
-             table->s->table_name.str);
-    DBUG_RETURN(true);
-  }
-
   /*
     This statement will be replicated as a statement, even when using
     row-based replication.  The flag will be reset at the end of the
@@ -9151,19 +9118,12 @@ bool sp_grant_privileges(THD *thd, const char *sp_db, const char *sp_name,
   if (!(combo=(LEX_USER*) thd->alloc(sizeof(st_lex_user))))
     DBUG_RETURN(TRUE);
 
-  combo->user.str= sctx->user;
+  combo->user.str= (char *) sctx->priv_user;
 
   mysql_mutex_lock(&acl_cache->lock);
 
-  if ((au= find_acl_user(combo->host.str=(char*)sctx->host_or_ip,combo->user.str,FALSE)))
-    goto found_acl;
-  if ((au= find_acl_user(combo->host.str=(char*)sctx->get_host()->ptr(),
-                         combo->user.str,FALSE)))
-    goto found_acl;
-  if ((au= find_acl_user(combo->host.str=(char*)sctx->get_ip()->ptr(),
-                         combo->user.str,FALSE)))
-    goto found_acl;
-  if((au= find_acl_user(combo->host.str=(char*)"%", combo->user.str, FALSE)))
+ if ((au= find_acl_user(combo->host.str= (char *) sctx->priv_host,
+                        combo->user.str, FALSE)))
     goto found_acl;
 
   mysql_mutex_unlock(&acl_cache->lock);
index 167daff7b6b39805b3ce4cba6f4bcaf9a3b74ffa..c9a1b32bb50eb38a9d256e0c435f608ee41a1653 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2010, 2018, Oracle and/or its affiliates. All rights reserved.
 
    This 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 "wsrep_mysqld.h"
 #endif /* WITH_WSREP */
 
+bool has_external_data_or_index_dir(partition_info &pi);
 
 Alter_info::Alter_info(const Alter_info &rhs, MEM_ROOT *mem_root)
   :drop_list(rhs.drop_list, mem_root),
@@ -213,6 +214,16 @@ bool Sql_cmd_alter_table::execute(THD *thd)
 
   if (thd->is_fatal_error) /* out of memory creating a copy of alter_info */
     DBUG_RETURN(TRUE);
+
+#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, any_db, NULL, NULL, FALSE, FALSE))
+
+      DBUG_RETURN(TRUE);
+  }
+#endif
   /*
     We also require DROP priv for ALTER TABLE ... DROP PARTITION, as well
     as for RENAME TO, as being done by SQLCOM_RENAME_TABLE
@@ -313,9 +324,10 @@ bool Sql_cmd_alter_table::execute(THD *thd)
   if ((!thd->is_current_stmt_binlog_format_row() ||
        !find_temporary_table(thd, first_table)))
     {
-      WSREP_TO_ISOLATION_BEGIN(((lex->name.str) ? select_lex->db : NULL),
-                              ((lex->name.str) ? lex->name.str : NULL),
-                              first_table);
+      WSREP_TO_ISOLATION_BEGIN_ALTER(((lex->name.str) ? select_lex->db : NULL),
+                                     ((lex->name.str) ? lex->name.str : NULL),
+                                     first_table,
+                                     &alter_info);
     }
 #endif /* WITH_WSREP */
   result= mysql_alter_table(thd, select_lex->db, lex->name.str,
@@ -328,7 +340,7 @@ bool Sql_cmd_alter_table::execute(THD *thd)
 
   DBUG_RETURN(result);
 #ifdef WITH_WSREP
- error:
+error:
   {
     WSREP_WARN("ALTER TABLE isolation failure");
     DBUG_RETURN(TRUE);
index f31ccb508a8954f92bb6bfdbdecc3b0c83f72acb..941afd09a6e7c1aba4ed8f8a3a8aa55c1be17fcf 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -499,6 +499,22 @@ bool is_any_audit_plugin_active(THD *thd MY_ATTRIBUTE((unused)))
   return (mysql_global_audit_mask[0] & MYSQL_AUDIT_GENERAL_CLASSMASK);
 }
 
+/**
+  @brief Checks presence of active audit plugin
+
+  @retval      TRUE             At least one audit plugin is present
+  @retval      FALSE            No audit plugin is present
+*/
+bool is_global_audit_mask_set()
+{
+  for (int i= MYSQL_AUDIT_GENERAL_CLASS; i < MYSQL_AUDIT_CLASS_MASK_SIZE; i++)
+  {
+    if (mysql_global_audit_mask[i] != 0)
+      return true;
+  }
+  return false;
+}
+
 #else /* EMBEDDED_LIBRARY */
 
 
index 39b9a19aab308ec6723b26d1b4e576b38d5fba25..c5dced4585940b494c879fff3bd95bd4001e27db 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -38,6 +38,7 @@ extern void mysql_audit_acquire_plugins(THD *thd, uint event_class);
 extern void mysql_audit_notify(THD *thd, uint event_class,
                                uint event_subtype, ...);
 bool is_any_audit_plugin_active(THD *thd MY_ATTRIBUTE((unused)));
+bool is_global_audit_mask_set();
 #else
 #define mysql_audit_notify(...)
 #endif
index 7f917c03b51d2ba1a4d4ee6f88ea6b46704d7cc7..1a5e4beb21f5467f5e511f37dcf1344bcf06af73 100644 (file)
@@ -4335,11 +4335,29 @@ my_eof(THD *thd)
   thd->get_stmt_da()->set_eof_status(thd);
 }
 
-#define tmp_disable_binlog(A)       \
-  {ulonglong tmp_disable_binlog__save_options= (A)->variables.option_bits; \
-  (A)->variables.option_bits&= ~OPTION_BIN_LOG
+#ifdef WITH_WSREP
+
+  #define tmp_disable_binlog(A)                                               \
+    {ulonglong tmp_disable_binlog__save_options= (A)->variables.option_bits;  \
+    my_bool tmp_disable_binlog__save_wsrep_on= (A)->variables.wsrep_on;       \
+    (A)->variables.wsrep_on= 0;                                               \
+    (A)->variables.option_bits&= ~OPTION_BIN_LOG
+  
+  #define reenable_binlog(A)                                                  \
+    (A)->variables.wsrep_on= tmp_disable_binlog__save_wsrep_on;               \
+    (A)->variables.option_bits= tmp_disable_binlog__save_options;}
 
-#define reenable_binlog(A)   (A)->variables.option_bits= tmp_disable_binlog__save_options;}
+  #define reenable_wsrep(A)    (A)->variables.wsrep_on= tmp_disable_binlog__save_wsrep_on;
+
+#else
+
+  #define tmp_disable_binlog(A)       \
+    {ulonglong tmp_disable_binlog__save_options= (A)->variables.option_bits; \
+    (A)->variables.option_bits&= ~OPTION_BIN_LOG
+
+  #define reenable_binlog(A)   (A)->variables.option_bits= tmp_disable_binlog__save_options;}
+
+#endif
 
 
 LEX_STRING *
index 93a600a7f3d0b034f6c7bae32f6e45e1b08c45b2..0fbfaf234b502fa33320e49da126ca391ec39f77 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -7869,6 +7869,9 @@ static bool make_join_select(JOIN *join, Item *cond)
               sel->cond->quick_fix_field();
 
             key_map usable_keys= tab->keys;
+            if (tab->table->force_index)
+              usable_keys.intersect(tab->table->keys_in_use_for_order_by);
+
             ORDER::enum_order interesting_order= ORDER::ORDER_NOT_RELEVANT;
 
             if (recheck_reason == LOW_LIMIT)
index 3ccd1388f3f7dff0ef24d9bef4d757d664595555..70e734ba9870591bb6d7116c010a61179f22097e 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -213,25 +213,50 @@ inline bool all_tables_not_ok(THD *thd, TABLE_LIST *tables)
   @param thd  Thread handle.
   @param db   Database name used while evaluating the filtering
               rules.
-  
+  @param sql_cmd Represents the current query that needs to be
+                 verified against the database filter rules.
+  @return TRUE Query should not be filtered out from the execution.
+          FALSE Query should be filtered out from the execution.
+
 */
-inline bool db_stmt_db_ok(THD *thd, char* db)
+inline bool check_database_filters(THD *thd, char* db, enum_sql_command sql_cmd)
 {
-  DBUG_ENTER("db_stmt_db_ok");
-
-  if (!thd->slave_thread)
+  DBUG_ENTER("check_database_filters");
+  DBUG_ASSERT(thd->slave_thread);
+  if (!db)
     DBUG_RETURN(TRUE);
-
+  switch (sql_cmd)
+  {
+  case SQLCOM_BEGIN:
+  case SQLCOM_COMMIT:
+  case SQLCOM_SAVEPOINT:
+  case SQLCOM_ROLLBACK:
+  case SQLCOM_ROLLBACK_TO_SAVEPOINT:
+    DBUG_RETURN(TRUE);
+  default:
+    break;
+  }
+  bool db_ok= rpl_filter->db_ok(db);
   /*
     No filters exist in ignore/do_db ? Then, just check
-    wild_do_table filtering. Otherwise, check the do_db
-    rules.
+    wild_do_table filtering for 'DATABASE' related
+    statements (CREATE/DROP/ALTER DATABASE)
   */
-  bool db_ok= (rpl_filter->get_do_db()->is_empty() &&
-               rpl_filter->get_ignore_db()->is_empty()) ?
-              rpl_filter->db_ok_with_wild_table(db) :
-              rpl_filter->db_ok(db);
-
+  if (db_ok &&
+      (rpl_filter->get_do_db()->is_empty() &&
+       rpl_filter->get_ignore_db()->is_empty()))
+  {
+    switch (sql_cmd)
+    {
+    case SQLCOM_CREATE_DB:
+    case SQLCOM_ALTER_DB:
+    case SQLCOM_ALTER_DB_UPGRADE:
+    case SQLCOM_DROP_DB:
+      db_ok= rpl_filter->db_ok_with_wild_table(db);
+    default:
+      break;
+    }
+  }
   DBUG_RETURN(db_ok);
 }
 #endif
@@ -2696,13 +2721,7 @@ mysql_execute_command(THD *thd)
 #ifdef HAVE_REPLICATION
   if (unlikely(thd->slave_thread))
   {
-    // Database filters.
-    if (lex->sql_command != SQLCOM_BEGIN &&
-        lex->sql_command != SQLCOM_COMMIT &&
-        lex->sql_command != SQLCOM_SAVEPOINT &&
-        lex->sql_command != SQLCOM_ROLLBACK &&
-        lex->sql_command != SQLCOM_ROLLBACK_TO_SAVEPOINT &&
-        !rpl_filter->db_ok(thd->db))
+    if (!check_database_filters(thd, thd->db, lex->sql_command))
       DBUG_RETURN(0);
 
     if (lex->sql_command == SQLCOM_DROP_TRIGGER)
@@ -4269,20 +4288,6 @@ end_with_restore_list:
     if (!(alias=thd->strmake(lex->name.str, lex->name.length)) ||
         (check_and_convert_db_name(&lex->name, FALSE) != IDENT_NAME_OK))
       break;
-    /*
-      If in a slave thread :
-      CREATE DATABASE DB was certainly not preceded by USE DB.
-      For that reason, db_ok() in sql/slave.cc did not check the
-      do_db/ignore_db. And as this query involves no tables, tables_ok()
-      above was not called. So we have to check rules again here.
-    */
-#ifdef HAVE_REPLICATION
-    if (!db_stmt_db_ok(thd, lex->name.str))
-    {
-      my_message(ER_SLAVE_IGNORED_TABLE, ER(ER_SLAVE_IGNORED_TABLE), MYF(0));
-      break;
-    }
-#endif
     if (check_access(thd, CREATE_ACL, lex->name.str, NULL, NULL, 1, 0))
       break;
     WSREP_TO_ISOLATION_BEGIN(lex->name.str, NULL, NULL)
@@ -4294,20 +4299,6 @@ end_with_restore_list:
   {
     if (check_and_convert_db_name(&lex->name, FALSE) != IDENT_NAME_OK)
       break;
-    /*
-      If in a slave thread :
-      DROP DATABASE DB may not be preceded by USE DB.
-      For that reason, maybe db_ok() in sql/slave.cc did not check the 
-      do_db/ignore_db. And as this query involves no tables, tables_ok()
-      above was not called. So we have to check rules again here.
-    */
-#ifdef HAVE_REPLICATION
-    if (!db_stmt_db_ok(thd, lex->name.str))
-    {
-      my_message(ER_SLAVE_IGNORED_TABLE, ER(ER_SLAVE_IGNORED_TABLE), MYF(0));
-      break;
-    }
-#endif
     if (check_access(thd, DROP_ACL, lex->name.str, NULL, NULL, 1, 0))
       break;
     WSREP_TO_ISOLATION_BEGIN(lex->name.str, NULL, NULL)
@@ -4317,14 +4308,6 @@ end_with_restore_list:
   case SQLCOM_ALTER_DB_UPGRADE:
   {
     LEX_STRING *db= & lex->name;
-#ifdef HAVE_REPLICATION
-    if (!db_stmt_db_ok(thd, lex->name.str))
-    {
-      res= 1;
-      my_message(ER_SLAVE_IGNORED_TABLE, ER(ER_SLAVE_IGNORED_TABLE), MYF(0));
-      break;
-    }
-#endif
     if (check_and_convert_db_name(db, FALSE) != IDENT_NAME_OK)
       break;
     if (check_access(thd, ALTER_ACL, db->str, NULL, NULL, 1, 0) ||
@@ -4346,20 +4329,6 @@ end_with_restore_list:
     HA_CREATE_INFO create_info(lex->create_info);
     if (check_and_convert_db_name(db, FALSE) != IDENT_NAME_OK)
       break;
-    /*
-      If in a slave thread :
-      ALTER DATABASE DB may not be preceded by USE DB.
-      For that reason, maybe db_ok() in sql/slave.cc did not check the
-      do_db/ignore_db. And as this query involves no tables, tables_ok()
-      above was not called. So we have to check rules again here.
-    */
-#ifdef HAVE_REPLICATION
-    if (!db_stmt_db_ok(thd, lex->name.str))
-    {
-      my_message(ER_SLAVE_IGNORED_TABLE, ER(ER_SLAVE_IGNORED_TABLE), MYF(0));
-      break;
-    }
-#endif
     if (check_access(thd, ALTER_ACL, db->str, NULL, NULL, 1, 0))
       break;
     WSREP_TO_ISOLATION_BEGIN(db->str, NULL, NULL)
@@ -7286,12 +7255,7 @@ bool mysql_test_parse_for_slave(THD *thd, char *rawbuf, uint length)
     {
       if (all_tables_not_ok(thd, lex->select_lex.table_list.first))
         ignorable= true;
-      else if (lex->sql_command != SQLCOM_BEGIN &&
-               lex->sql_command != SQLCOM_COMMIT &&
-               lex->sql_command != SQLCOM_SAVEPOINT &&
-               lex->sql_command != SQLCOM_ROLLBACK &&
-               lex->sql_command != SQLCOM_ROLLBACK_TO_SAVEPOINT &&
-               !rpl_filter->db_ok(thd->db))
+      else if (!check_database_filters(thd, thd->db, lex->sql_command))
         ignorable= true;
     }
     thd->m_digest= parent_digest;
index bac46e930326c406db4c2b2946576ed9b4210084..e2c343c7413c4434360bc78a16c4ca319b22ed69 100644 (file)
@@ -217,6 +217,11 @@ inline bool is_supported_parser_charset(const CHARSET_INFO *cs)
 #define WSREP_TO_ISOLATION_BEGIN(db_, table_, table_list_)                   \
   if (WSREP(thd) && wsrep_to_isolation_begin(thd, db_, table_, table_list_)) goto error;
 
+#define WSREP_TO_ISOLATION_BEGIN_ALTER(db_, table_, table_list_, alter_info_) \
+  if (WSREP(thd) && wsrep_to_isolation_begin(thd, db_, table_,                \
+                                             table_list_, alter_info_))       \
+    goto error;
+
 #define WSREP_TO_ISOLATION_END                                              \
   if (WSREP(thd) || (thd && thd->wsrep_exec_mode==TOTAL_ORDER))             \
     wsrep_to_isolation_end(thd);
index f5bdd6163fc21e045d0a76b4ac78caf9696c435d..1698c83dd21b8cb01223f559ad781b4c7f2a1786 100644 (file)
@@ -1,5 +1,5 @@
 /*
-   Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved.
+   Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -1975,7 +1975,7 @@ bool mysql_uninstall_plugin(THD *thd, const LEX_STRING *name)
 
   if (!table->key_info)
   {
-    my_error(ER_TABLE_CORRUPT, MYF(0), table->s->db.str,
+    my_error(ER_MISSING_KEY, MYF(0), table->s->db.str,
              table->s->table_name.str);
     DBUG_RETURN(TRUE);
   }
index f1cfaecd83c0c86fcdbb1afa959e59aaa6033640..703051d034283638f025106704938a38b84d3ca9 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2002, 2017, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -3219,8 +3219,11 @@ void Prepared_statement::setup_set_params()
     because we want to look it up in the query cache) or not.
   */
   if ((mysql_bin_log.is_open() && is_update_query(lex->sql_command)) ||
-      opt_log || opt_slow_log ||
-      query_cache_is_cacheable_query(lex))
+      opt_log || opt_slow_log || query_cache_is_cacheable_query(lex)
+#ifndef EMBEDDED_LIBRARY
+      || is_global_audit_mask_set()
+#endif
+     )
   {
     set_params_from_vars= insert_params_from_vars_with_log;
 #ifndef EMBEDDED_LIBRARY
index 40bab57ac109641c651803515542d750972e2ae9..30e1550a5ce11990ee0c32b1fe0dcebfaeccff0f 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
 
    This 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,6 +187,11 @@ template <class T> T available_buffer(const char* buf_start,
                                       const char* buf_current,
                                       T buf_len)
 {
+  /* Sanity check */
+  if (buf_current < buf_start ||
+      buf_len < static_cast<T>(buf_current - buf_start))
+    return static_cast<T>(0);
+
   return buf_len - (buf_current - buf_start);
 }
 
index 525db472ad6b10739c5d608b845b3a7c76261f09..c635f3262ec8c196660fff15805b69bfdb4fc51a 100644 (file)
@@ -4431,6 +4431,19 @@ static Sys_var_mybool Sys_wsrep_certify_nonPK(
        GLOBAL_VAR(wsrep_certify_nonPK), 
        CMD_LINE(OPT_ARG), DEFAULT(TRUE));
 
+static const char *wsrep_certification_rules_names[]= { "strict", "optimized", NullS };
+static Sys_var_enum Sys_wsrep_certification_rules(
+       "wsrep_certification_rules",
+       "Certification rules to use in the cluster. Possible values are: "
+       "\"strict\": stricter rules that could result in more certification "
+       "failures. "
+       "\"optimized\": relaxed rules that allow more concurrency and "
+       "cause less certification failures.",
+       GLOBAL_VAR(wsrep_certification_rules), CMD_LINE(REQUIRED_ARG),
+       wsrep_certification_rules_names, DEFAULT(WSREP_CERTIFICATION_RULES_STRICT),
+       NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(0),
+       ON_UPDATE(0));
+
 static Sys_var_mybool Sys_wsrep_causal_reads(
        "wsrep_causal_reads", "(DEPRECATED) setting this variable is equivalent to setting wsrep_sync_wait READ flag",
        SESSION_VAR(wsrep_causal_reads), 
index 07ec7cdbb88baca807ada596fe405c73c506b3b9..08bafaf33782639dc5fd97d6a53c3db53e112aa9 100644 (file)
@@ -3339,7 +3339,7 @@ Table_check_intact::check(TABLE *table, const TABLE_FIELD_DEF *table_def)
 
   /* Whether the table definition has already been validated. */
   if (table->s->table_field_def_cache == table_def)
-    DBUG_RETURN(FALSE);
+    goto end;
 
   if (table->s->fields != table_def->count)
   {
@@ -3456,6 +3456,15 @@ Table_check_intact::check(TABLE *table, const TABLE_FIELD_DEF *table_def)
   if (! error)
     table->s->table_field_def_cache= table_def;
 
+end:
+
+  if (has_keys && !error && !table->key_info)
+  {
+    my_error(ER_MISSING_KEY, MYF(0), table->s->db.str,
+             table->s->table_name.str);
+    error= TRUE;
+  }
+
   DBUG_RETURN(error);
 }
 
index 43e9124695bf01f27c47c686a8c04ee3d11b3f49..7f8db1790ff948b371174b83120578049ad43c18 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef TABLE_INCLUDED
 #define TABLE_INCLUDED
 
-/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -523,10 +523,11 @@ typedef struct st_table_field_def
 class Table_check_intact
 {
 protected:
+  bool has_keys;
   virtual void report_error(uint code, const char *fmt, ...)= 0;
 
 public:
-  Table_check_intact() {}
+  Table_check_intact() : has_keys(FALSE) {}
   virtual ~Table_check_intact() {}
 
   /** Checks whether a table is intact. */
index 247c8d1e70d76e626758569e2dee88d345ba9979..a58f01ce7319a717fb189fb918f9e1e168fb8a31 100644 (file)
@@ -16,7 +16,7 @@
 #ifndef WSREP_APPLIER_H
 #define WSREP_APPLIER_H
 
-#include "../wsrep/wsrep_api.h"
+#include "wsrep_api.h"
 
 /* wsrep callback prototypes */
 
index ca2df1c7d44acb870939926ce4cec338978d7929..3ff57aa930880b4c7f26b8154ccaea7abfef067b 100644 (file)
@@ -138,6 +138,19 @@ void wsrep_post_commit(THD* thd, bool all)
      */
      WSREP_DEBUG("cleanup transaction for LOCAL_STATE: %s",
                  WSREP_QUERY(thd));
+     /*
+       Run post-rollback hook to clean up in the case if
+       some keys were populated for the transaction in provider
+       but during commit time there was no write set to replicate.
+       This may happen when client sets the SAVEPOINT and immediately
+       rolls back to savepoint after first operation. 
+      */
+     if (all && thd->wsrep_conflict_state != MUST_REPLAY &&
+         wsrep->post_rollback(wsrep, &thd->wsrep_ws_handle))
+     {
+         WSREP_WARN("post_rollback fail: %llu %d",
+                    (long long)thd->thread_id, thd->get_stmt_da()->status());
+     }
      wsrep_cleanup_transaction(thd);
      break;
    }
index f1cafcf9bad951379bbed040991013b254956785..ffe2f845b88733f4ea81e85ea9cf5fce0e61a2a2 100644 (file)
@@ -56,6 +56,7 @@ ulong   wsrep_max_ws_size              = 1073741824UL;//max ws (RBR buffer) size
 ulong   wsrep_max_ws_rows              = 65536; // max number of rows in ws
 int     wsrep_to_isolation             = 0; // # of active TO isolation threads
 my_bool wsrep_certify_nonPK            = 1; // certify, even when no primary key
+ulong   wsrep_certification_rules      = WSREP_CERTIFICATION_RULES_STRICT;
 long    wsrep_max_protocol_version     = 3; // maximum protocol version to use
 ulong   wsrep_forced_binlog_format     = BINLOG_FORMAT_UNSPEC;
 my_bool wsrep_recovery                 = 0; // recovery
@@ -879,110 +880,145 @@ static bool wsrep_prepare_key_for_isolation(const char* db,
                                             wsrep_buf_t* key,
                                             size_t* key_len)
 {
-    if (*key_len < 2) return false;
+  if (*key_len < 2) return false;
 
-    switch (wsrep_protocol_version)
-    {
-    case 0:
-        *key_len= 0;
-        break;
-    case 1:
-    case 2:
-    case 3:
+  switch (wsrep_protocol_version)
+  {
+  case 0:
+    *key_len= 0;
+    break;
+  case 1:
+  case 2:
+  case 3:
+  {
+    *key_len= 0;
+    if (db)
     {
-        *key_len= 0;
-        if (db)
-        {
-            // sql_print_information("%s.%s", db, table);
-            if (db)
-            {
-                key[*key_len].ptr= db;
-                key[*key_len].len= strlen(db);
-                ++(*key_len);
-                if (table)
-                {
-                    key[*key_len].ptr= table;
-                    key[*key_len].len= strlen(table);
-                    ++(*key_len);
-                }
-            }
-        }
-        break;
+      // sql_print_information("%s.%s", db, table);
+      key[*key_len].ptr= db;
+      key[*key_len].len= strlen(db);
+      ++(*key_len);
+      if (table)
+      {
+        key[*key_len].ptr= table;
+        key[*key_len].len= strlen(table);
+        ++(*key_len);
+      }
     }
-    default:
+    break;
+  }
+  default:
+    return false;
+  }
+  return true;
+}
+
+
+static bool wsrep_prepare_key_for_isolation(const char* db,
+                                            const char* table,
+                                            wsrep_key_arr_t* ka)
+{
+  wsrep_key_t* tmp;
+  tmp= (wsrep_key_t*)my_realloc(ka->keys,
+                                (ka->keys_len + 1) * sizeof(wsrep_key_t),
+                                MYF(0));
+  if (!tmp)
+  {
+    WSREP_ERROR("Can't allocate memory for key_array");
+    return false;
+  }
+  ka->keys= tmp;
+  if (!(ka->keys[ka->keys_len].key_parts= (wsrep_buf_t*)
+        my_malloc(sizeof(wsrep_buf_t)*2, MYF(0))))
+  {
+    WSREP_ERROR("Can't allocate memory for key_parts");
+    return false;
+  }
+  ka->keys[ka->keys_len].key_parts_num= 2;
+  ++ka->keys_len;
+  if (!wsrep_prepare_key_for_isolation(db, table,
+                                       (wsrep_buf_t*)ka->keys[ka->keys_len - 1].key_parts,
+                                       &ka->keys[ka->keys_len - 1].key_parts_num))
+  {
+    WSREP_ERROR("Preparing keys for isolation failed");
+    return false;
+  }
+
+  return true;
+}
+
+
+static bool wsrep_prepare_keys_for_alter_add_fk(char* child_table_db,
+                                                Alter_info* alter_info,
+                                                wsrep_key_arr_t* ka)
+{
+  Key *key;
+  List_iterator<Key> key_iterator(alter_info->key_list);
+  while ((key= key_iterator++))
+  {
+    if (key->type == Key::FOREIGN_KEY)
+    {
+      Foreign_key *fk_key= (Foreign_key *)key;
+      const char *db_name= fk_key->ref_db.str;
+      const char *table_name= fk_key->ref_table.str;
+      if (!db_name)
+      {
+        db_name= child_table_db;
+      }
+      if (!wsrep_prepare_key_for_isolation(db_name, table_name, ka))
+      {
         return false;
+      }
     }
-
-    return true;
+  }
+  return true;
 }
 
-/* Prepare key list from db/table and table_list */
-bool wsrep_prepare_keys_for_isolation(THD*              thd,
-                                      const char*       db,
-                                      const char*       table,
-                                      const TABLE_LIST* table_list,
-                                      wsrep_key_arr_t*  ka)
+
+static bool wsrep_prepare_keys_for_isolation(THD*              thd,
+                                             const char*       db,
+                                             const char*       table,
+                                             const TABLE_LIST* table_list,
+                                             Alter_info*       alter_info,
+                                             wsrep_key_arr_t*  ka)
 {
   ka->keys= 0;
   ka->keys_len= 0;
 
   if (db || table)
   {
-    if (!(ka->keys= (wsrep_key_t*)my_malloc(sizeof(wsrep_key_t), MYF(0))))
-    {
-      WSREP_ERROR("Can't allocate memory for key_array");
-      goto err;
-    }
-    ka->keys_len= 1;
-    if (!(ka->keys[0].key_parts= (wsrep_buf_t*)
-          my_malloc(sizeof(wsrep_buf_t)*2, MYF(0))))
-    {
-      WSREP_ERROR("Can't allocate memory for key_parts");
-      goto err;
-    }
-    ka->keys[0].key_parts_num= 2;
-    if (!wsrep_prepare_key_for_isolation(
-                                         db, table,
-                                         (wsrep_buf_t*)ka->keys[0].key_parts,
-                                         &ka->keys[0].key_parts_num))
-    {
-      WSREP_ERROR("Preparing keys for isolation failed (1)");
+    if (!wsrep_prepare_key_for_isolation(db, table, ka))
       goto err;
-    }
   }
 
   for (const TABLE_LIST* table= table_list; table; table= table->next_global)
   {
-    wsrep_key_t* tmp;
-    tmp= (wsrep_key_t*)my_realloc(ka->keys,
-                                  (ka->keys_len + 1) * sizeof(wsrep_key_t),
-                                  MYF(0));
-    if (!tmp)
-    {
-      WSREP_ERROR("Can't allocate memory for key_array");
+    if (!wsrep_prepare_key_for_isolation(table->db, table->table_name, ka))
       goto err;
-    }
-    ka->keys= tmp;
-    if (!(ka->keys[ka->keys_len].key_parts= (wsrep_buf_t*)
-          my_malloc(sizeof(wsrep_buf_t)*2, MYF(0))))
-    {
-      WSREP_ERROR("Can't allocate memory for key_parts");
-      goto err;
-    }
-    ka->keys[ka->keys_len].key_parts_num= 2;
-    ++ka->keys_len;
-    if (!wsrep_prepare_key_for_isolation(table->db, table->table_name,
-                                         (wsrep_buf_t*)ka->keys[ka->keys_len - 1].key_parts,
-                                         &ka->keys[ka->keys_len - 1].key_parts_num))
-    {
-      WSREP_ERROR("Preparing keys for isolation failed (2)");
+  }
+
+  if (alter_info && (alter_info->flags & Alter_info::ADD_FOREIGN_KEY))
+  {
+    if (!wsrep_prepare_keys_for_alter_add_fk(table_list->db, alter_info, ka))
       goto err;
-    }
   }
-    return 0;
+
+  return false;
+
 err:
-    wsrep_keys_free(ka);
-    return 1;
+  wsrep_keys_free(ka);
+  return true;
+}
+
+
+/* Prepare key list from db/table and table_list */
+bool wsrep_prepare_keys_for_isolation(THD*              thd,
+                                      const char*       db,
+                                      const char*       table,
+                                      const TABLE_LIST* table_list,
+                                      wsrep_key_arr_t*  ka)
+{
+  return wsrep_prepare_keys_for_isolation(thd, db, table, table_list, NULL, ka);
 }
 
 
@@ -1291,7 +1327,8 @@ static bool wsrep_can_run_in_toi(THD *thd, const char *db, const char *table,
   -1: TOI replication failed 
  */
 static int wsrep_TOI_begin(THD *thd, char *db_, char *table_,
-                           const TABLE_LIST* table_list)
+                           const TABLE_LIST* table_list,
+                           Alter_info* alter_info)
 {
   wsrep_status_t ret(WSREP_WARNING);
   uchar* buf(0);
@@ -1336,7 +1373,8 @@ static int wsrep_TOI_begin(THD *thd, char *db_, char *table_,
   wsrep_key_arr_t key_arr= {0, 0};
   struct wsrep_buf buff = { buf, buf_len };
   if (!buf_err                                                                  &&
-      !wsrep_prepare_keys_for_isolation(thd, db_, table_, table_list, &key_arr) &&
+      !wsrep_prepare_keys_for_isolation(thd, db_, table_,
+                                        table_list, alter_info, &key_arr)       &&
       key_arr.keys_len > 0                                                      &&
       WSREP_OK == (ret = wsrep->to_execute_start(wsrep, thd->thread_id,
                                                 key_arr.keys, key_arr.keys_len,
@@ -1473,9 +1511,9 @@ static void wsrep_RSU_end(THD *thd)
 }
 
 int wsrep_to_isolation_begin(THD *thd, char *db_, char *table_,
-                             const TABLE_LIST* table_list)
+                             const TABLE_LIST* table_list,
+                             Alter_info* alter_info)
 {
-
   /*
     No isolation for applier or replaying threads.
    */
@@ -1526,10 +1564,10 @@ int wsrep_to_isolation_begin(THD *thd, char *db_, char *table_,
   {
     switch (thd->variables.wsrep_OSU_method) {
     case WSREP_OSU_TOI:
-      ret =  wsrep_TOI_begin(thd, db_, table_, table_list);
+      ret= wsrep_TOI_begin(thd, db_, table_, table_list, alter_info);
       break;
     case WSREP_OSU_RSU:
-      ret =  wsrep_RSU_begin(thd, db_, table_);
+      ret= wsrep_RSU_begin(thd, db_, table_);
       break;
     default:
       WSREP_ERROR("Unsupported OSU method: %lu",
index 1266f06484373a70890466a7117b9e65c310350f..e22c2d3de9ad6baa089f7b700b34ace327159a91 100644 (file)
 #define WSREP_MYSQLD_H
 
 #include "mysqld.h"
+#include "wsrep_api.h"
 typedef struct st_mysql_show_var SHOW_VAR;
 #include <sql_priv.h>
 #include "rpl_gtid.h"
-#include "../wsrep/wsrep_api.h"
 
 #define WSREP_UNDEFINED_TRX_ID ULONGLONG_MAX
 
@@ -59,6 +59,10 @@ enum wsrep_consistency_check_mode {
     CONSISTENCY_CHECK_RUNNING,
 };
 
+enum enum_wsrep_certification_rules {
+    WSREP_CERTIFICATION_RULES_STRICT,
+    WSREP_CERTIFICATION_RULES_OPTIMIZED
+};
 
 // Global wsrep parameters
 extern wsrep_t*    wsrep;
@@ -86,6 +90,7 @@ extern ulong       wsrep_max_ws_size;
 extern ulong       wsrep_max_ws_rows;
 extern const char* wsrep_notify_cmd;
 extern my_bool     wsrep_certify_nonPK;
+extern ulong       wsrep_certification_rules;
 extern long        wsrep_max_protocol_version;
 extern long        wsrep_protocol_version;
 extern ulong       wsrep_forced_binlog_format;
@@ -327,8 +332,10 @@ extern PSI_mutex_key key_LOCK_wsrep_slave_threads;
 extern PSI_mutex_key key_LOCK_wsrep_desync;
 #endif /* HAVE_PSI_INTERFACE */
 struct TABLE_LIST;
+class Alter_info;
 int wsrep_to_isolation_begin(THD *thd, char *db_, char *table_,
-                             const TABLE_LIST* table_list);
+                             const TABLE_LIST* table_list,
+                             Alter_info* alter_info = NULL);
 void wsrep_to_isolation_end(THD *thd);
 void wsrep_cleanup_transaction(THD *thd);
 int wsrep_to_buf_helper(
index 58d8cc4f86d0ad3816d1782761d8c8ec7df411fd..9dc91e73119f917c85d2d4c63c021ed067044499 100644 (file)
@@ -19,8 +19,8 @@
 #ifndef WSREP_PRIV_H
 #define WSREP_PRIV_H
 
+#include "wsrep_api.h"
 #include "wsrep_mysqld.h"
-#include "../wsrep/wsrep_api.h"
 
 #include <log.h>
 #include <pthread.h>
index 6ead01b89d2d2bd2703fd40a26095f9380d14b73..b17fb3af42bdb70e2ab263446ad22e68ab09f22e 100644 (file)
@@ -286,7 +286,10 @@ void wsrep_sst_continue ()
   if (sst_needed)
   {
     WSREP_INFO("Signalling provider to continue.");
-    wsrep_sst_received (wsrep, local_uuid, local_seqno, NULL, 0);
+    // local_uuid and local_seqno are global variables and are volatile
+    wsrep_uuid_t  const sst_uuid  = local_uuid;
+    wsrep_seqno_t const sst_seqno = local_seqno;
+    wsrep_sst_received (wsrep, sst_uuid, sst_seqno, NULL, 0);
   }
 }
 
index 04de2d35ed864cfb3dc9145d1e2b8e8ca53757ec..0426d481921280e47bab1b1cb8eae454da0aeac8 100644 (file)
@@ -16,8 +16,8 @@
 #ifndef WSREP_XID_H
 #define WSREP_XID_H
 
-#include "../wsrep/wsrep_api.h"
 #include "handler.h" // XID typedef
+#include "wsrep_api.h"
 
 void wsrep_xid_init(xid_t*, const wsrep_uuid_t&, wsrep_seqno_t);
 int wsrep_is_wsrep_xid(const void* xid);
index a79d5a84b659f809b4124470cd72cf2dea08c48f..825f1f0672c259630ad43cb2e622623992db78a4 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 1996, 2017, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1996, 2018, 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
@@ -3378,7 +3378,10 @@ dict_foreign_find_index(
                    && dict_foreign_qualify_index(
                            table, col_names, columns, n_cols,
                            index, types_idx,
-                           check_charsets, check_null)) {
+                           check_charsets, check_null)
+                   && (!(index->online_status ==
+                               ONLINE_INDEX_ABORTED_DROPPED
+                      ||index->online_status == ONLINE_INDEX_ABORTED))) {
                        return(index);
                }
 
index f3fa6e52d0d40176d370f36f1f23962561598117..a1f56671fc8076805e2388303d3640d26abce932 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 2011, 2017, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2011, 2018, Oracle and/or its affiliates. All Rights Reserved.
 
 This program is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free Software
@@ -868,37 +868,28 @@ fts_drop_index(
 
                        err = fts_drop_index_tables(trx, index);
 
-                       for(;;) {
-                               bool retry = false;
-                               if (index->index_fts_syncing) {
-                                       retry = true;
-                               }
-                               if (!retry){
-                                       fts_free(table);
-                                       break;
-                               }
-                               DICT_BG_YIELD(trx);
-                       }
+                       while (index->index_fts_syncing
+                                && !trx_is_interrupted(trx)) {
+                                DICT_BG_YIELD(trx);
+                        }
+
+                        fts_free(table);
+
                        return(err);
                }
 
-               for(;;) {
-                       bool retry = false;
-                       if (index->index_fts_syncing) {
-                               retry = true;
-                       }
-                       if (!retry){
-                               current_doc_id = table->fts->cache->next_doc_id;
-                               first_doc_id = table->fts->cache->first_doc_id;
-                               fts_cache_clear(table->fts->cache);
-                               fts_cache_destroy(table->fts->cache);
-                               table->fts->cache = fts_cache_create(table);
-                               table->fts->cache->next_doc_id = current_doc_id;
-                               table->fts->cache->first_doc_id = first_doc_id;
-                               break;
-                       }
-                       DICT_BG_YIELD(trx);
-               }
+               while (index->index_fts_syncing
+                        && !trx_is_interrupted(trx)) {
+                        DICT_BG_YIELD(trx);
+                }
+
+               current_doc_id = table->fts->cache->next_doc_id;
+               first_doc_id = table->fts->cache->first_doc_id;
+               fts_cache_clear(table->fts->cache);
+               fts_cache_destroy(table->fts->cache);
+               table->fts->cache = fts_cache_create(table);
+               table->fts->cache->next_doc_id = current_doc_id;
+               table->fts->cache->first_doc_id = first_doc_id;
        } else {
                fts_cache_t*            cache = table->fts->cache;
                fts_index_cache_t*      index_cache;
@@ -908,17 +899,13 @@ fts_drop_index(
                index_cache = fts_find_index_cache(cache, index);
 
                if (index_cache != NULL) {
-                       for(;;) {
-                               bool retry = false;
-                               if (index->index_fts_syncing) {
-                                       retry = true;
-                               }
-                               if (!retry && index_cache->words) {
-                                       fts_words_free(index_cache->words);
-                                       rbt_free(index_cache->words);
-                                       break;
-                               }
-                               DICT_BG_YIELD(trx);
+                       while (index->index_fts_syncing
+                                && !trx_is_interrupted(trx)) {
+                                DICT_BG_YIELD(trx);
+                        }
+                       if (index_cache->words) {
+                               fts_words_free(index_cache->words);
+                               rbt_free(index_cache->words);
                        }
 
                        ib_vector_remove(cache->indexes, *(void**) index_cache);
index 8ff965816170cc8681f205f4515f273a2e1f98ab..c13b5590b0d7b3192a87090e475e0ba4dcfd779e 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 2000, 2017, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2000, 2018, Oracle and/or its affiliates. All Rights Reserved.
 Copyright (c) 2008, 2009 Google Inc.
 Copyright (c) 2009, Percona Inc.
 Copyright (c) 2012, Facebook Inc.
@@ -108,6 +108,7 @@ enum_tx_isolation thd_get_trx_isolation(const THD* thd);
 # endif /* MYSQL_PLUGIN_IMPORT */
 #ifdef WITH_WSREP
 #include "../storage/innobase/include/ut0byte.h"
+#include "wsrep_api.h"
 #include <wsrep_mysqld.h>
 #include <my_md5.h>
 extern my_bool wsrep_certify_nonPK;
@@ -7489,7 +7490,8 @@ report_error:
            (sql_command != SQLCOM_LOAD ||
             thd_binlog_format(user_thd) == BINLOG_FORMAT_ROW)) {
 
-               if (wsrep_append_keys(user_thd, false, record, NULL)) {
+               if (wsrep_append_keys(user_thd, WSREP_KEY_EXCLUSIVE, record,
+                                     NULL)) {
                        DBUG_PRINT("wsrep", ("row key failed"));
                        error_result = HA_ERR_INTERNAL_ERROR;
                        goto wsrep_error;
@@ -8002,7 +8004,8 @@ func_exit:
 
                DBUG_PRINT("wsrep", ("update row key"));
 
-               if (wsrep_append_keys(user_thd, false, old_row, new_row)) {
+               if (wsrep_append_keys(user_thd, WSREP_KEY_EXCLUSIVE, old_row,
+                                     new_row)) {
                        DBUG_PRINT("wsrep", ("row key failed"));
                        err = HA_ERR_INTERNAL_ERROR;
                        goto wsrep_error;
@@ -8061,7 +8064,8 @@ ha_innobase::delete_row(
        if (error == DB_SUCCESS && wsrep_thd_exec_mode(user_thd) == LOCAL_STATE &&
             wsrep_on(user_thd)) {
 
-               if (wsrep_append_keys(user_thd, false, record, NULL)) {
+               if (wsrep_append_keys(user_thd, WSREP_KEY_EXCLUSIVE, record,
+                                     NULL)) {
                        DBUG_PRINT("wsrep", ("delete fail"));
                        error = DB_ERROR;
                        goto wsrep_error;
@@ -9260,6 +9264,21 @@ wsrep_dict_foreign_find_index(
        ibool           check_charsets,
        ulint           check_null);
 
+inline
+const char*
+wsrep_key_type_to_str(wsrep_key_type type)
+{
+       switch (type) {
+       case WSREP_KEY_SHARED:
+               return "shared";
+       case WSREP_KEY_SEMI:
+               return "semi";
+       case WSREP_KEY_EXCLUSIVE:
+               return "exclusive";
+       };
+       return "unknown";
+}
+
 extern
 dberr_t
 wsrep_append_foreign_key(
@@ -9268,7 +9287,8 @@ wsrep_append_foreign_key(
        const rec_t*    rec,            /*!< in: clustered index record */
        dict_index_t*   index,          /*!< in: clustered index */
        ibool           referenced,     /*!< in: is check for referenced table */
-       ibool           shared)         /*!< in: is shared access */
+       wsrep_key_type  key_type)       /*!< in: access type of this key
+                                       (shared, exclusive, semi...) */
 {
        THD* thd = (THD*)trx->mysql_thd;
        int rcode = 0;
@@ -9368,8 +9388,8 @@ wsrep_append_foreign_key(
                wsrep_protocol_version > 1);
        if (rcode != DB_SUCCESS) {
                WSREP_ERROR(
-                       "FK key set failed: %d (%lu %lu), index: %s %s, %s",
-                       rcode, referenced, shared,
+                       "FK key set failed: %d (%lu %s), index: %s %s, %s",
+                       rcode, referenced, wsrep_key_type_to_str(key_type),
                        (index && index->name)       ? index->name :
                                "void index",
                        (index && index->table_name) ? index->table_name :
@@ -9388,7 +9408,7 @@ wsrep_append_foreign_key(
 #ifdef WSREP_DEBUG_PRINT
        ulint j;
        fprintf(stderr, "FK parent key, table: %s %s len: %lu ",
-               cache_key, (shared) ? "shared" : "exclusive", len+1);
+               cache_key, wsrep_key_type_to_str(key_type), len+1);
        for (j=0; j<len+1; j++) {
                fprintf(stderr, " %hhX, ", key[j]);
        }
@@ -9421,7 +9441,7 @@ wsrep_append_foreign_key(
                wsrep_ws_handle(thd, trx),
                &wkey,
                1,
-               shared ? WSREP_KEY_SHARED : WSREP_KEY_EXCLUSIVE,
+               key_type,
                copy);
        if (rcode) {
                DBUG_PRINT("wsrep", ("row key failed: %d", rcode));
@@ -9442,14 +9462,15 @@ wsrep_append_key(
        TABLE           *table,
        const char*     key,
        uint16_t        key_len,
-       bool            shared
+       wsrep_key_type  key_type        /*!< in: access type of this key
+                                       (shared, exclusive, semi...) */
 )
 {
        DBUG_ENTER("wsrep_append_key");
        bool const copy = true;
 #ifdef WSREP_DEBUG_PRINT
        fprintf(stderr, "%s conn %ld, trx %llu, keylen %d, table %s\n SQL: %s ",
-               (shared) ? "Shared" : "Exclusive",
+               wsrep_key_type_to_str(key_type),
                wsrep_thd_thread_id(thd), (long long)trx->id, key_len,
                table_share->table_name.str, wsrep_thd_query(thd));
        for (int i=0; i<key_len; i++) {
@@ -9476,7 +9497,7 @@ wsrep_append_key(
                                wsrep_ws_handle(thd, trx),
                                &wkey,
                                1,
-                               shared ? WSREP_KEY_SHARED : WSREP_KEY_EXCLUSIVE,
+                               key_type,
                                copy);
        if (rcode) {
                DBUG_PRINT("wsrep", ("row key failed: %d", rcode));
@@ -9513,7 +9534,8 @@ wsrep_is_FK_index(dict_table_t* table,
 int
 ha_innobase::wsrep_append_keys(
        THD             *thd,
-       bool            shared,
+       wsrep_key_type  key_type,       /*!< in: access type of this key
+                                       (shared, exclusive, semi...) */
        const uchar*    record0,        /* in: row in MySQL format */
        const uchar*    record1)        /* in: row in MySQL format */
 {
@@ -9545,7 +9567,7 @@ ha_innobase::wsrep_append_keys(
                if (!is_null) {
                        rcode = wsrep_append_key(
                                thd, trx, table_share, table, keyval,
-                               len, shared);
+                               len, key_type);
                        if (rcode) DBUG_RETURN(rcode);
                }
                else
@@ -9598,10 +9620,11 @@ ha_innobase::wsrep_append_keys(
                                if (!is_null) {
                                        rcode = wsrep_append_key(
                                                thd, trx, table_share, table,
-                                               keyval0, len+1, shared);
+                                               keyval0, len+1, key_type);
                                        if (rcode) DBUG_RETURN(rcode);
 
-                                       if (key_info->flags & HA_NOSAME || shared)
+                                       if (key_info->flags & HA_NOSAME ||
+                                           key_type == WSREP_KEY_SHARED)
                                                key_appended = true;
                                }
                                else
@@ -9618,7 +9641,7 @@ ha_innobase::wsrep_append_keys(
                                                rcode = wsrep_append_key(
                                                        thd, trx, table_share,
                                                        table,
-                                                       keyval1, len+1, shared);
+                                                       keyval1, len+1, key_type);
                                                if (rcode) DBUG_RETURN(rcode);
                                        }
                                }
@@ -9634,7 +9657,7 @@ ha_innobase::wsrep_append_keys(
                wsrep_calc_row_hash(digest, record0, table, prebuilt, thd);
                if ((rcode = wsrep_append_key(thd, trx, table_share, table,
                                              (const char*) digest, 16,
-                                             shared))) {
+                                             key_type))) {
                        DBUG_RETURN(rcode);
                }
 
@@ -9644,7 +9667,7 @@ ha_innobase::wsrep_append_keys(
                        if ((rcode = wsrep_append_key(thd, trx, table_share,
                                                      table,
                                                      (const char*) digest,
-                                                     16, shared))) {
+                                                     16, key_type))) {
                                DBUG_RETURN(rcode);
                        }
                }
@@ -11475,6 +11498,7 @@ static MY_ATTRIBUTE((nonnull, warn_unused_result))
 dberr_t
 innobase_rename_table(
 /*==================*/
+       THD*            thd,    /*!< Connection thread handle */
        trx_t*          trx,    /*!< in: transaction */
        const char*     from,   /*!< in: old name of the table */
        const char*     to)     /*!< in: new name of the table */
@@ -11500,6 +11524,37 @@ innobase_rename_table(
 
        row_mysql_lock_data_dictionary(trx);
 
+       dict_table_t*   table                   = NULL;
+        table = dict_table_open_on_name(norm_from, TRUE, FALSE,
+                                        DICT_ERR_IGNORE_NONE);
+
+        /* Since DICT_BG_YIELD has sleep for 250 milliseconds,
+       Convert lock_wait_timeout unit from second to 250 milliseconds */
+        long int lock_wait_timeout = thd_lock_wait_timeout(thd) * 4;
+        if (table != NULL) {
+                for (dict_index_t* index = dict_table_get_first_index(table);
+                     index != NULL;
+                     index = dict_table_get_next_index(index)) {
+
+                        if (index->type & DICT_FTS) {
+                                /* Found */
+                                while (index->index_fts_syncing
+                                        && !trx_is_interrupted(trx)
+                                        && (lock_wait_timeout--) > 0) {
+                                        DICT_BG_YIELD(trx);
+                                }
+                        }
+                }
+                dict_table_close(table, TRUE, FALSE);
+        }
+
+        /* FTS sync is in progress. We shall timeout this operation */
+        if (lock_wait_timeout < 0) {
+                error = DB_LOCK_WAIT_TIMEOUT;
+                row_mysql_unlock_data_dictionary(trx);
+                DBUG_RETURN(error);
+        }
+
        /* Transaction must be flagged as a locking transaction or it hasn't
        been started yet. */
 
@@ -11609,7 +11664,7 @@ ha_innobase::rename_table(
        ++trx->will_lock;
        trx_set_dict_operation(trx, TRX_DICT_OP_INDEX);
 
-       error = innobase_rename_table(trx, from, to);
+       error = innobase_rename_table(thd, trx, from, to);
 
        DEBUG_SYNC(thd, "after_innobase_rename_table");
 
@@ -11655,6 +11710,12 @@ ha_innobase::rename_table(
                error = DB_ERROR;
        }
 
+       else if (error == DB_LOCK_WAIT_TIMEOUT) {
+                my_error(ER_LOCK_WAIT_TIMEOUT, MYF(0), to);
+
+                error = DB_LOCK_WAIT;
+        }
+
        DBUG_RETURN(convert_error_code_to_mysql(error, 0, NULL));
 }
 
@@ -13336,6 +13397,7 @@ ha_innobase::start_stmt(
                case SQLCOM_INSERT:
                case SQLCOM_UPDATE:
                case SQLCOM_DELETE:
+               case SQLCOM_REPLACE:
                        init_table_handle_for_HANDLER();
                        prebuilt->select_lock_type = LOCK_X;
                        prebuilt->stored_select_lock_type = LOCK_X;
index 0073bd94d2ab892a52708b7596cb9ab74fdfb473..57a650b471d4661b547f6c1b67319cce22a827be 100644 (file)
@@ -25,6 +25,10 @@ this program; if not, write to the Free Software Foundation, Inc.,
 
 #include "dict0stats.h"
 
+#ifdef WITH_WSREP
+#include "wsrep_api.h"
+#endif /* WITH_WSREP */
+
 /* Structure defines translation table between mysql index and innodb
 index structures */
 struct innodb_idx_translate_t {
@@ -96,8 +100,11 @@ class ha_innobase: public handler
        dict_index_t* innobase_get_index(uint keynr);
 
 #ifdef WITH_WSREP
-       int wsrep_append_keys(THD *thd, bool shared,
-                                 const uchar* record0, const uchar* record1);
+       int wsrep_append_keys(
+               THD *thd,
+               wsrep_key_type key_type,
+               const uchar* record0,
+               const uchar* record1);
 #endif
        /* Init values for the class: */
  public:
index d7dad764a71092e61af360943fd2426cb9e19d1f..7f1dc0cb159183e2eed3a15556f6651132a22beb 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 2005, 2017, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2005, 2018, Oracle and/or its affiliates. All Rights Reserved.
 
 This program is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free Software
@@ -4608,13 +4608,15 @@ processed_field:
 }
 
 /** Get the auto-increment value of the table on commit.
-@param ha_alter_info   Data used during in-place alter
-@param ctx             In-place ALTER TABLE context
-@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) */
+@param[in] ha_alter_info       Data used during in-place alter
+@param[in,out] ctx             In-place ALTER TABLE context
+                               return autoinc value in ctx->max_autoinc
+@param altered_table[in]       MySQL table that is being altered
+@param old_table[in]   MySQL table as it is before the ALTER operation
+retval true Failure
+@retval false Success*/
 static MY_ATTRIBUTE((nonnull, warn_unused_result))
-ulonglong
+bool
 commit_get_autoinc(
 /*===============*/
        Alter_inplace_info*     ha_alter_info,
@@ -4622,23 +4624,28 @@ commit_get_autoinc(
        const TABLE*            altered_table,
        const TABLE*            old_table)
 {
-       ulonglong               max_autoinc;
 
        DBUG_ENTER("commit_get_autoinc");
 
        if (!altered_table->found_next_number_field) {
                /* There is no AUTO_INCREMENT column in the table
                after the ALTER operation. */
-               max_autoinc = 0;
+               ctx->max_autoinc = 0;
        } else if (ctx->add_autoinc != ULINT_UNDEFINED) {
                /* An AUTO_INCREMENT column was added. Get the last
                value from the sequence, which may be based on a
                supplied AUTO_INCREMENT value. */
-               max_autoinc = ctx->sequence.last();
+               ctx->max_autoinc = ctx->sequence.last();
        } else if ((ha_alter_info->handler_flags
                    & Alter_inplace_info::CHANGE_CREATE_OPTION)
                   && (ha_alter_info->create_info->used_fields
                       & HA_CREATE_USED_AUTO)) {
+
+               /* Check if the table is discarded */
+               if(dict_table_is_discarded(ctx->old_table)) {
+                       DBUG_RETURN(true);
+               }
+
                /* An AUTO_INCREMENT value was supplied, but the table was not
                rebuilt. Get the user-supplied value or the last value from the
                sequence. */
@@ -4651,7 +4658,8 @@ commit_get_autoinc(
                dict_index_t*   index = dict_table_get_index_on_first_col(
                        ctx->old_table, autoinc_field->field_index);
 
-               max_autoinc = ha_alter_info->create_info->auto_increment_value;
+               ctx->max_autoinc =
+                       ha_alter_info->create_info->auto_increment_value;
 
                dict_table_autoinc_lock(ctx->old_table);
 
@@ -4660,8 +4668,8 @@ commit_get_autoinc(
 
                if (err != DB_SUCCESS) {
                        ut_ad(0);
-                       max_autoinc = 0;
-               } else if (max_autoinc <= max_value_table) {
+                       ctx->max_autoinc = 0;
+               } else if (ctx->max_autoinc <= max_value_table) {
                        ulonglong       col_max_value;
                        ulonglong       offset;
 
@@ -4669,7 +4677,7 @@ commit_get_autoinc(
                                old_table->found_next_number_field);
 
                        offset = ctx->prebuilt->autoinc_offset;
-                       max_autoinc = innobase_next_autoinc(
+                       ctx->max_autoinc = innobase_next_autoinc(
                                max_value_table, 1, 1, offset,
                                col_max_value);
                }
@@ -4679,11 +4687,11 @@ commit_get_autoinc(
                Read the old counter value from the table. */
                ut_ad(old_table->found_next_number_field);
                dict_table_autoinc_lock(ctx->old_table);
-               max_autoinc = ctx->old_table->autoinc;
+               ctx->max_autoinc = ctx->old_table->autoinc;
                dict_table_autoinc_unlock(ctx->old_table);
        }
 
-       DBUG_RETURN(max_autoinc);
+       DBUG_RETURN(false);
 }
 
 /** Add or drop foreign key constraints to the data dictionary tables,
@@ -5664,8 +5672,13 @@ ha_innobase::commit_inplace_alter_table(
 
                DBUG_ASSERT(new_clustered == ctx->need_rebuild());
 
-               ctx->max_autoinc = commit_get_autoinc(
-                       ha_alter_info, ctx, altered_table, table);
+               if (commit_get_autoinc(ha_alter_info, ctx, altered_table,
+                       table)) {
+                       fail = true;
+                       my_error(ER_TABLESPACE_DISCARDED, MYF(0),
+                                table->s->table_name.str);
+                       goto rollback_trx;
+               }
 
                if (ctx->need_rebuild()) {
                        ctx->tmp_name = dict_mem_create_temporary_tablename(
@@ -5697,6 +5710,8 @@ ha_innobase::commit_inplace_alter_table(
 #endif
        }
 
+rollback_trx:
+
        /* Commit or roll back the changes to the data dictionary. */
 
        if (fail) {
index eda89951c3f28a8b40750cc76e7ff0458e0b7700..c4f6eed4aad45810875f3e82cf750f86b155830f 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 2012, 2016, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2012, 2018, Oracle and/or its affiliates. All Rights Reserved.
 
 This program is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free Software
@@ -1337,11 +1337,20 @@ row_import::match_schema(
        /* Do some simple checks. */
 
        if (m_flags != m_table->flags) {
-               ib_errf(thd, IB_LOG_LEVEL_ERROR, ER_TABLE_SCHEMA_MISMATCH,
-                        "Table flags don't match, server table has 0x%lx "
-                        "and the meta-data file has 0x%lx",
-                        (ulong) m_table->n_cols, (ulong) m_flags);
-
+               if (dict_tf_to_row_format_string(m_flags) !=
+                               dict_tf_to_row_format_string(m_table->flags)) {
+                       ib_errf(thd, IB_LOG_LEVEL_ERROR,
+                               ER_TABLE_SCHEMA_MISMATCH,
+                               "Table flags don't match,"
+                               "server table has %s "
+                               "and the meta-data file has %s",
+                               dict_tf_to_row_format_string(m_table->flags),
+                               dict_tf_to_row_format_string(m_flags));
+               } else {
+                       ib_errf(thd, IB_LOG_LEVEL_ERROR,
+                               ER_TABLE_SCHEMA_MISMATCH,
+                               "Table flags don't match");
+               }
                return(DB_ERROR);
        } else if (m_table->n_cols != m_n_cols) {
                ib_errf(thd, IB_LOG_LEVEL_ERROR, ER_TABLE_SCHEMA_MISMATCH,
@@ -1827,12 +1836,6 @@ PageConverter::update_records(
 
                rec_t*  rec = m_rec_iter.current();
 
-               /* FIXME: Move out of the loop */
-
-               if (rec_get_status(rec) == REC_STATUS_NODE_PTR) {
-                       break;
-               }
-
                ibool   deleted = rec_get_deleted_flag(rec, comp);
 
                /* For the clustered index we have to adjust the BLOB
@@ -1934,6 +1937,10 @@ PageConverter::update_index_page(
                return(DB_SUCCESS);
        }
 
+       if (!page_is_leaf(block->frame)) {
+               return (DB_SUCCESS);
+       }
+
        return(update_records(block));
 }
 
index 3dcb1fd508a52a85b0e8b3a529f7f4708c3d0835..14e7a5207019a006bf6e1fddc2482ef6815ad752 100644 (file)
@@ -53,6 +53,11 @@ Created 4/20/1996 Heikki Tuuri
 #include "fts0types.h"
 #include "m_string.h"
 
+#ifdef WITH_WSREP
+#include "wsrep_api.h"
+#include "wsrep_mysqld.h"
+#endif /* WITH_WSREP */
+
 /*************************************************************************
 IMPORTANT NOTE: Any operation that generates redo MUST check that there
 is enough space in the redo log before for that operation. This is
@@ -926,7 +931,7 @@ dberr_t wsrep_append_foreign_key(trx_t *trx,
                                 const rec_t*           clust_rec,
                                 dict_index_t*          clust_index,
                                 ibool                  referenced,
-                                ibool                  shared);
+                                wsrep_key_type         key_type);
 #endif /* WITH_WSREP */
 
 /*********************************************************************//**
@@ -1285,7 +1290,7 @@ row_ins_foreign_check_on_constraint(
                                        foreign,
                                        clust_rec,
                                        clust_index,
-                                       FALSE, FALSE);
+                                       FALSE, WSREP_KEY_EXCLUSIVE);
        if (err != DB_SUCCESS) {
                fprintf(stderr, 
                        "WSREP: foreign key append failed: %d\n", err);
@@ -1627,13 +1632,26 @@ run_again:
                                if (check_ref) {
                                        err = DB_SUCCESS;
 #ifdef WITH_WSREP
+                                       wsrep_key_type key_type = WSREP_KEY_EXCLUSIVE;
+                                       if (upd_node != NULL) {
+                                               key_type = WSREP_KEY_SHARED;
+                                       } else {
+                                               switch (wsrep_certification_rules) {
+                                               case WSREP_CERTIFICATION_RULES_STRICT:
+                                                       key_type = WSREP_KEY_EXCLUSIVE;
+                                                       break;
+                                               case WSREP_CERTIFICATION_RULES_OPTIMIZED:
+                                                       key_type = WSREP_KEY_SEMI;
+                                                       break;
+                                               }
+                                       }
                                        err = wsrep_append_foreign_key(
                                                thr_get_trx(thr),
                                                foreign,
                                                rec,
                                                check_index,
                                                check_ref,
-                                               (upd_node) ? TRUE : FALSE);
+                                               key_type);
 #endif /* WITH_WSREP */
                                        goto end_scan;
                                } else if (foreign->type != 0) {
index 4596e2fb95130dc9b6d38b7d198cb03d92a13a02..7320fe3ac854364e092d4290a3be0d81c894f762 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 2011, 2016, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2011, 2018, Oracle and/or its affiliates. All Rights Reserved.
 
 This program is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free Software
@@ -2720,7 +2720,15 @@ all_done:
 
        while (!trx_is_interrupted(trx)) {
                mrec = next_mrec;
-               ut_ad(mrec < mrec_end);
+               ut_ad(mrec <= mrec_end);
+
+               if (mrec == mrec_end) {
+                       /* We are at the end of the log.
+                          Mark the replay all_done. */
+                       if (has_index_lock) {
+                               goto all_done;
+                       }
+               }
 
                if (!has_index_lock) {
                        /* We are applying operations from a different
index 8d2d9e1c76b734997b4d7f64d760bcc22fe2013b..cfd640ed4d5d93c0137be91fb81886797715734f 100644 (file)
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 2000, 2017, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2000, 2018, Oracle and/or its affiliates. All Rights Reserved.
 
 This program is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free Software
@@ -1426,8 +1426,7 @@ error_exit:
                        doc_ids difference should not exceed
                        FTS_DOC_ID_MAX_STEP value. */
 
-                       if (next_doc_id > 1
-                           && doc_id - next_doc_id >= FTS_DOC_ID_MAX_STEP) {
+                       if (doc_id - next_doc_id >= FTS_DOC_ID_MAX_STEP) {
                                fprintf(stderr,
                                        "InnoDB: Doc ID " UINT64PF " is too"
                                        " big. Its difference with largest"
@@ -5086,7 +5085,8 @@ row_rename_table_for_mysql(
                }
        }
 
-       if (dict_table_has_fts_index(table)
+       if ((dict_table_has_fts_index(table)
+           || DICT_TF2_FLAG_IS_SET(table, DICT_TF2_FTS_HAS_DOC_ID))
            && !dict_tables_have_same_db(old_name, new_name)) {
                err = fts_rename_aux_tables(table, new_name, trx);
                if (err != DB_TABLE_NOT_FOUND) {
index 80d20ace92b61a3942612360cea693422b9130e8..0181a768ab32beb3bef5bf26d1fb40fcba39c43f 100644 (file)
@@ -1,5 +1,5 @@
 /*
-   Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
+   Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -1170,10 +1170,14 @@ int ha_myisam::repair(THD *thd, MI_CHECK &param, bool do_optimize)
     if (file->s->base.auto_key)
       update_auto_increment_key(&param, file, 1);
     if (optimize_done)
+    {
+      mysql_mutex_lock(&share->intern_lock);
       error = update_state_info(&param, file,
                                UPDATE_TIME | UPDATE_OPEN_COUNT |
                                (local_testflag &
                                 T_STATISTICS ? UPDATE_STAT : 0));
+      mysql_mutex_unlock(&share->intern_lock);
+    }
     info(HA_STATUS_NO_LOCK | HA_STATUS_TIME | HA_STATUS_VARIABLE |
         HA_STATUS_CONST);
     if (rows != file->state->records && ! (param.testflag & T_VERY_SILENT))
index fa93d0e8745a2fd37b4dd8a1ca9563d2cd2dcac5..08af875b8a70b7eb7f6dd65be80f7c810896860a 100644 (file)
@@ -1,5 +1,5 @@
 /*
-   Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
+   Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -4480,6 +4480,10 @@ int update_state_info(MI_CHECK *param, MI_INFO *info,uint update)
     int error;
     uint r_locks=share->r_locks,w_locks=share->w_locks;
     share->r_locks= share->w_locks= share->tot_locks= 0;
+
+    DBUG_EXECUTE_IF("simulate_incorrect_share_wlock_value",
+                    DEBUG_SYNC_C("after_share_wlock_set_to_0"););
+
     error=_mi_writeinfo(info,WRITEINFO_NO_UNLOCK);
     share->r_locks=r_locks;
     share->w_locks=w_locks;
index 7fb4e0e82fc78f84d0822313d875b0ed2a653e0f..ecbcbd6b10c2b9ab0522114b0ede1bcf651b2eee 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
 
    This 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,10 @@ int mi_lock_database(MI_INFO *info, int lock_type)
       info->invalidator=info->s->invalidator;
       share->w_locks++;
       share->tot_locks++;
+
+      DBUG_EXECUTE_IF("simulate_incorrect_share_wlock_value",
+                      DEBUG_SYNC_C("after_share_wlock_increment"););
+
       info->s->in_use= list_add(info->s->in_use, &info->in_use);
       break;
     default:
index 7861c74a401d60048c1944b059b154e1441a33ae..d50ae49435fcbe6bac7973fe2d0b9ed64296265f 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2008, 2018, Oracle and/or its affiliates. All rights reserved.
 
   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
@@ -899,6 +899,7 @@ void test_init_disabled()
   psi->create_file(file_key_A, "foo-instrumented", (File) 12);
   file_A1= lookup_file_by_name("foo-instrumented");
   ok(file_A1 != NULL, "file_A1 instrumented");
+  destroy_file(reinterpret_cast<PFS_thread*>(psi->get_thread()), file_A1);
 
   /* broken key + enabled T-1: no instrumentation */
 
@@ -1150,6 +1151,8 @@ void test_locker_disabled()
   psi->create_file(file_key_A, "foo", (File) 12);
   file_A1= (PSI_file*) lookup_file_by_name("foo");
   ok(file_A1 != NULL, "instrumented");
+  destroy_file(reinterpret_cast<PFS_thread*>(psi->get_thread()),
+               reinterpret_cast<PFS_file*>(file_A1));
 
   socket_class_A->m_enabled= true;
   socket_A1= psi->init_socket(socket_key_A, NULL, NULL, 0);
index ca693fb4e735f857e33f9d7ebad2d9e297e83ed6..e332cbf97426f77fc83e34645105605e36fc92b6 100644 (file)
@@ -32,6 +32,7 @@ SYSTEMD_NO_WRAP=1
 
 # Prevent Debian's init scripts from calling systemctl
 
+SYSTEMCTL_SKIP_REDIRECT=true
 _SYSTEMCTL_SKIP_REDIRECT=true
  
 # If you install MySQL on some other places than @prefix@, then you
index 6d9e1f585f527d2fea85289ce9e0a18263d78fcd..ffb5966e6eae9073293a601ece7949126de55445 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -848,12 +848,6 @@ install -m 644 "%{malloc_lib_source}" \
 # Remove man pages we explicitly do not want to package, avoids 'unpackaged
 # files' warning.
 # This has become obsolete:  rm -f $RBR%{_mandir}/man1/make_win_bin_dist.1*
-rm -f $RBR%{_mandir}/man1/mysql-stress-test.pl.1
-rm -f $RBR%{_mandir}/man1/mysql-test-run.pl.1
-rm -f $RBR%{_mandir}/man1/mysql_client_test.1
-rm -f $RBR%{_mandir}/man1/mysql_client_test_embedded.1
-rm -f $RBR%{_mandir}/man1/mysqltest.1
-rm -f $RBR%{_mandir}/man1/mysqltest_embedded.1
 
 %check
 
@@ -1508,6 +1502,9 @@ echo "====="                                     >> $STATUS_HISTORY
 # merging BK trees)
 ##############################################################################
 %changelog
+* Wed Jan 10 2018 Bjorn Munch <bjorn.munch@oracle.com>
+- No longer need to remove obsoleted mysqltest man pages
+
 * Tue Oct 31 2017 Bjorn Munch <bjorn.munch@oracle.com>
 - Remove obsoleted mysqltest man pages
 
index 182e4586ddc1a52da641b50a8f43ce79af36d846..91982277564d04d72d58e08f61e216f9ac2f4d0a 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (c) 2012, Codership Oy. All rights reserved.
+# Copyright (c) 2012, 2018, Codership Oy. All rights reserved.
 # 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -13,9 +13,7 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
 
-INCLUDE_DIRECTORIES( "." )
-
-SET(WSREP_SOURCES wsrep_gtid.c wsrep_uuid.c wsrep_loader.c wsrep_dummy.c)
+SET(WSREP_SOURCES src/wsrep_gtid.c src/wsrep_uuid.c src/wsrep_loader.c src/wsrep_dummy.c)
 
 ADD_CONVENIENCE_LIBRARY(wsrep ${WSREP_SOURCES})
 DTRACE_INSTRUMENT(wsrep)
diff --git a/mysql-wsrep-5.6/wsrep/Makefile.am b/mysql-wsrep-5.6/wsrep/Makefile.am
deleted file mode 100644 (file)
index a748ece..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-noinst_LIBRARIES = libwsrep.a
-libwsrep_a_SOURCES = wsrep_api.h wsrep_loader.c wsrep_dummy.c wsrep_uuid.c wsrep_gtid.c
-noinst_PROGRAMS = wsrep_listener
-wsrep_listener_SOURCES = wsrep_listener.c
-wsrep_listener_LDADD = $(noinst_LIBRARIES)
-wsrep_listener_LDFLAGS = -static -ldl
-
diff --git a/mysql-wsrep-5.6/wsrep/src/CMakeLists.txt b/mysql-wsrep-5.6/wsrep/src/CMakeLists.txt
new file mode 100644 (file)
index 0000000..a69940f
--- /dev/null
@@ -0,0 +1,25 @@
+# Copyright (c) 2018, Codership Oy. All rights reserved.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+
+CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
+
+INCLUDE_DIRECTORIES(".")
+
+SET(WSREP_SOURCES wsrep_gtid.c wsrep_uuid.c wsrep_loader.c wsrep_dummy.c)
+
+ADD_LIBRARY(wsrep ${WSREP_SOURCES})
+
+#ADD_EXECUTABLE(listener wsrep_listener.c ${WSREP_SOURCES})
+#TARGET_LINK_LIBRARIES(listener ${LIBDL})
diff --git a/mysql-wsrep-5.6/wsrep/src/COPYING b/mysql-wsrep-5.6/wsrep/src/COPYING
new file mode 100644 (file)
index 0000000..d159169
--- /dev/null
@@ -0,0 +1,339 @@
+                    GNU GENERAL PUBLIC LICENSE
+                       Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+                            Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users.  This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it.  (Some other Free Software Foundation software is covered by
+the GNU Lesser General Public License instead.)  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+  To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have.  You must make sure that they, too, receive or can get the
+source code.  And you must show them these terms so they know their
+rights.
+
+  We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+  Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software.  If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+  Finally, any free program is threatened constantly by software
+patents.  We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary.  To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+                    GNU GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License.  The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language.  (Hereinafter, translation is included without limitation in
+the term "modification".)  Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+  1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+  2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) You must cause the modified files to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    b) You must cause any work that you distribute or publish, that in
+    whole or in part contains or is derived from the Program or any
+    part thereof, to be licensed as a whole at no charge to all third
+    parties under the terms of this License.
+
+    c) If the modified program normally reads commands interactively
+    when run, you must cause it, when started running for such
+    interactive use in the most ordinary way, to print or display an
+    announcement including an appropriate copyright notice and a
+    notice that there is no warranty (or else, saying that you provide
+    a warranty) and that users may redistribute the program under
+    these conditions, and telling the user how to view a copy of this
+    License.  (Exception: if the Program itself is interactive but
+    does not normally print such an announcement, your work based on
+    the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+    a) Accompany it with the complete corresponding machine-readable
+    source code, which must be distributed under the terms of Sections
+    1 and 2 above on a medium customarily used for software interchange; or,
+
+    b) Accompany it with a written offer, valid for at least three
+    years, to give any third party, for a charge no more than your
+    cost of physically performing source distribution, a complete
+    machine-readable copy of the corresponding source code, to be
+    distributed under the terms of Sections 1 and 2 above on a medium
+    customarily used for software interchange; or,
+
+    c) Accompany it with the information you received as to the offer
+    to distribute corresponding source code.  (This alternative is
+    allowed only for noncommercial distribution and only if you
+    received the program in object code or executable form with such
+    an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it.  For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable.  However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License.  Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+  5. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Program or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+  6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+  7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded.  In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+  9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation.  If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+  10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission.  For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this.  Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+                            NO WARRANTY
+
+  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+                     END OF TERMS AND CONDITIONS
+
+            How to Apply These Terms to Your New Programs
+
+  If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+  To do so, attach the following notices to the program.  It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the program's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    This program is free 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.
+
+    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.
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+    Gnomovision version 69, Copyright (C) year name of author
+    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+    This is free software, and you are welcome to redistribute it
+    under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License.  Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+  `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+  <signature of Ty Coon>, 1 April 1989
+  Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs.  If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library.  If this is what you want to do, use the GNU Lesser General
+Public License instead of this License.
diff --git a/mysql-wsrep-5.6/wsrep/src/README.md b/mysql-wsrep-5.6/wsrep/src/README.md
new file mode 100644 (file)
index 0000000..24b60ae
--- /dev/null
@@ -0,0 +1 @@
+Write Set Replication API specification
\ No newline at end of file
diff --git a/mysql-wsrep-5.6/wsrep/src/wsrep.xcf b/mysql-wsrep-5.6/wsrep/src/wsrep.xcf
new file mode 100644 (file)
index 0000000..54108c6
Binary files /dev/null and b/mysql-wsrep-5.6/wsrep/src/wsrep.xcf differ
diff --git a/mysql-wsrep-5.6/wsrep/src/wsrep_listener.c b/mysql-wsrep-5.6/wsrep/src/wsrep_listener.c
new file mode 100644 (file)
index 0000000..614b360
--- /dev/null
@@ -0,0 +1,260 @@
+/* Copyright (C) 2012 Codership Oy <info@codersihp.com>
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; version 2 of the License.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+/*! @file Example of wsrep event listener. Outputs description of received
+ *        events to stdout. To get a general picture you should start with
+ *        main() function. */
+
+#include <wsrep_api.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <errno.h>
+#include <signal.h>
+#include <pthread.h>
+
+/*! This is global application context, it will be used by wsrep callbacks */
+struct application_context
+{};
+
+static struct application_context global_ctx;
+
+/*! This is receiving thread context, it will be used by wsrep callbacks */
+struct receiver_context
+{
+    char msg[4096];
+};
+
+/*! This is a logger callback which library will be using to log events. */
+static void
+logger_cb (wsrep_log_level_t level __attribute__((unused)), const char* msg)
+{
+    fprintf (stderr, "WSREP: %s\n", msg);
+}
+
+/*! This will be called on cluster view change (nodes joining, leaving, etc.).
+ *  Each view change is the point where application may be pronounced out of
+ *  sync with the current cluster view and need state transfer.
+ *  It is guaranteed that no other callbacks are called concurrently with it. */
+static wsrep_cb_status_t
+view_cb (void*                    app_ctx   __attribute__((unused)),
+         void*                    recv_ctx  __attribute__((unused)),
+         const wsrep_view_info_t* view,
+         const char*              state     __attribute__((unused)),
+         size_t                   state_len __attribute__((unused)),
+         void**                   sst_req,
+         size_t*                  sst_req_len)
+{
+    printf ("New cluster membership view: %d nodes, my index is %d, "
+            "global seqno: %lld\n",
+            view->memb_num, view->my_idx, (long long)view->state_id.seqno);
+
+    if (view->state_gap) /* we need to receive new state from the cluster */
+    {
+        /* For simplicity we're skipping state transfer by using magic string
+         * as a state transfer request.
+         * This node will not be considered JOINED (having full state)
+         * by other cluster members. */
+        *sst_req = strdup(WSREP_STATE_TRANSFER_NONE);
+
+        if (*sst_req)
+            *sst_req_len = strlen(*sst_req) + 1;
+        else
+            *sst_req_len = -ENOMEM;
+    }
+
+    return WSREP_CB_SUCCESS;
+}
+
+/*! This is called to "apply" writeset.
+ *  If writesets don't conflict on keys, it may be called concurrently to
+ *  utilize several CPU cores. */
+static wsrep_cb_status_t
+apply_cb (void*                   recv_ctx,
+          const void*             ws_data __attribute__((unused)),
+          size_t                  ws_size,
+          uint32_t                flags __attribute__((unused)),
+          const wsrep_trx_meta_t* meta)
+{
+    struct receiver_context* ctx = (struct receiver_context*)recv_ctx;
+
+    snprintf (ctx->msg, sizeof(ctx->msg),
+              "Got writeset %lld, size %zu", (long long)meta->gtid.seqno,
+              ws_size);
+
+    return WSREP_CB_SUCCESS;
+}
+
+/*! This is called to "commit" or "rollback" previously applied writeset,
+ *  depending on commit parameter.
+ *  By default this callback is called synchronously in the order determined
+ *  by seqno. */
+static wsrep_cb_status_t
+commit_cb (void*                   recv_ctx,
+           uint32_t                flags __attribute((unused)),
+           const wsrep_trx_meta_t* meta __attribute__((unused)),
+           wsrep_bool_t*           exit __attribute__((unused)),
+           wsrep_bool_t            commit)
+{
+    struct receiver_context* ctx = (struct receiver_context*)recv_ctx;
+
+    /* Here we just print it to stdout. Since this callback is synchronous
+     * we don't need to worry about exclusive access to stdout. */
+    if (commit) puts(ctx->msg);
+
+    return WSREP_CB_SUCCESS;
+}
+
+/* The following callbacks are stubs and not used in this example. */
+static wsrep_cb_status_t
+sst_donate_cb (void*               app_ctx   __attribute__((unused)),
+               void*               recv_ctx  __attribute__((unused)),
+               const void*         msg       __attribute__((unused)),
+               size_t              msg_len   __attribute__((unused)),
+               const wsrep_gtid_t* state_id  __attribute__((unused)),
+               const char*         state     __attribute__((unused)),
+               size_t              state_len __attribute__((unused)),
+               wsrep_bool_t        bypass    __attribute__((unused)))
+{
+    return WSREP_CB_SUCCESS;
+}
+
+static void synced_cb (void* app_ctx __attribute__((unused))) {}
+
+/* wsrep provider handle (global for simplicty) */
+static wsrep_t* wsrep = NULL;
+
+/* This is the listening thread. It blocks in wsrep::recv() call until
+ * disconnect from cluster. It will apply and commit writesets through the
+ * callbacks defined avbove. */
+static void*
+recv_thread (void* arg)
+{
+    struct receiver_context* ctx = (struct receiver_context*)arg;
+
+    wsrep_status_t rc = wsrep->recv(wsrep, ctx);
+
+    fprintf (stderr, "Receiver exited with code %d", rc);
+
+    return NULL;
+}
+
+/* This is a signal handler to demonstrate graceful cluster leave. */
+static void
+graceful_leave (int signum)
+{
+    printf ("Got signal %d, exiting...\n", signum);
+    wsrep->disconnect(wsrep);
+}
+
+int main (int argc, char* argv[])
+{
+    if (argc != 4)
+    {
+        fprintf (stderr, "Usage: %s </path/to/wsrep/provider> <wsrep URI> "
+                 "<cluster name>\n", argv[0]);
+        exit (EXIT_FAILURE);
+    }
+
+    const char* const wsrep_provider = argv[1];
+    const char* const wsrep_uri      = argv[2];
+    const char* const cluster_name   = argv[3];
+
+    /* Now let's load and initialize provider */
+    wsrep_status_t rc = wsrep_load (wsrep_provider, &wsrep, logger_cb);
+    if (WSREP_OK != rc)
+    {
+        fprintf (stderr, "Failed to load wsrep provider '%s'\n",wsrep_provider);
+        exit (EXIT_FAILURE);
+    }
+
+    wsrep_gtid_t state_id = { WSREP_UUID_UNDEFINED, WSREP_SEQNO_UNDEFINED };
+
+    /* wsrep provider initialization arguments */
+    struct wsrep_init_args wsrep_args =
+    {
+        .app_ctx       = &global_ctx,
+
+        .node_name     = "example listener",
+        .node_address  = "",
+        .node_incoming = "",
+        .data_dir      = ".", // working directory
+        .options       = "",
+        .proto_ver     = 127, // maximum supported application event protocol
+
+        .state_id      = &state_id,
+        .state         = NULL,
+        .state_len     = 0,
+
+        .logger_cb       = logger_cb,
+        .view_handler_cb = view_cb,
+        .apply_cb        = apply_cb,
+        .commit_cb       = commit_cb,
+        .sst_donate_cb   = sst_donate_cb,
+        .synced_cb       = synced_cb
+    };
+
+    rc = wsrep->init(wsrep, &wsrep_args);
+    if (WSREP_OK != rc)
+    {
+        fprintf (stderr, "wsrep::init() failed: %d\n", rc);
+        exit (EXIT_FAILURE);
+    }
+
+    /* Connect to cluster */
+    rc = wsrep->connect (wsrep, cluster_name, wsrep_uri, "", 0);
+    if (0 != rc)
+    {
+        fprintf (stderr,
+                 "wsrep::connect() failed: %d (%s)\n", rc, strerror(-rc));
+        exit (EXIT_FAILURE);
+    }
+
+    /* Now let's start several listening threads*/
+    int const num_threads = 4;
+    struct receiver_context thread_ctx[num_threads];
+    pthread_t threads[num_threads];
+
+    int i;
+    for (i = 0; i < num_threads; i++)
+    {
+        int err = pthread_create (
+            &threads[i], NULL, recv_thread, &thread_ctx[i]);
+
+        if (err)
+        {
+            fprintf (stderr, "Failed to start thread %d: %d (%s)",
+                     i, err, strerror(err));
+            exit (EXIT_FAILURE);
+        }
+    }
+
+    signal (SIGTERM, graceful_leave);
+    signal (SIGINT,  graceful_leave);
+
+    /* Listening threads are now running and receiving writesets. Wait for them
+     * to join. Threads will join after signal handler closes wsrep connection*/
+    for (i = 0; i < num_threads; i++)
+    {
+        pthread_join (threads[i], NULL);
+    }
+
+    /* Unload provider after nobody uses it any more. */
+    wsrep_unload (wsrep);
+
+    return 0;
+}
similarity index 98%
rename from mysql-wsrep-5.6/wsrep/wsrep_loader.c
rename to mysql-wsrep-5.6/wsrep/src/wsrep_loader.c
index 904f9a1c4775cf8902375478f7108e2ac03ee9c8..c22e47de3cc6bb78e0de7ee000d412026cf0cb6d 100644 (file)
@@ -55,8 +55,8 @@ static int wsrep_check_iface_version(const char* found, const char* iface_ver)
 
 static int verify(const wsrep_t *wh, const char *iface_ver)
 {
-    const size_t msg_len = 128;
     char msg[128];
+    const size_t msg_len = sizeof(msg);
 
 #define VERIFY(_p) if (!(_p)) {                                       \
         snprintf(msg, msg_len, "wsrep_load(): verify(): %s\n", # _p); \
@@ -135,8 +135,8 @@ int wsrep_load(const char *spec, wsrep_t **hptr, wsrep_log_cb_t log_cb)
     int ret = 0;
     void *dlh = NULL;
     wsrep_loader_fun dlfun;
-    const size_t msg_len = 1024;
-    char msg[1024 + 1];
+    char msg[1024];
+    const size_t msg_len = sizeof(msg) - 1;
     msg[msg_len] = 0;
 
     if (NULL != log_cb)