[Commits] c55acefc4c5: Merge remote-tracking branch 'origin/10.4' into bb-10.4-galera4

jan jan.lindstrom at mariadb.com
Mon Jan 7 14:20:36 EET 2019


revision-id: c55acefc4c5a3c04784fa47ff706ceefb980a6a3 (mariadb-10.3.6-286-gc55acefc4c5)
parent(s): 18a9ff6bfde04daf68f2a7bf9da618da635622f3 aa2db754196c03e26b70b40987c75bedb75b5e32
author: Jan Lindström
committer: Jan Lindström
timestamp: 2019-01-07 14:20:33 +0200
message:

Merge remote-tracking branch 'origin/10.4' into bb-10.4-galera4


 .gitignore                                         |    2 -
 CMakeLists.txt                                     |    1 +
 Docs/README-wsrep                                  |   50 +-
 cmake/cpack_rpm.cmake                              |    2 +
 cmake/mariadb_connector_c.cmake                    |    5 +-
 cmake/zlib.cmake                                   |    5 -
 debian/autobake-deb.sh                             |    2 +-
 debian/control                                     |    2 +-
 debian/mariadb-server-10.4.install                 |    2 -
 extra/mariabackup/fil_cur.cc                       |  183 ++-
 extra/mariabackup/xtrabackup.cc                    |   61 +-
 extra/mariabackup/xtrabackup.h                     |    2 +
 libmariadb                                         |    2 +-
 man/wsrep_sst_xtrabackup-v2.1                      |    2 +
 man/wsrep_sst_xtrabackup.1                         |    2 +
 mysql-test/main/alter_table_errors.result          |   19 +
 mysql-test/main/alter_table_errors.test            |   11 +
 mysql-test/main/check.result                       |   10 +
 mysql-test/main/check.test                         |   12 +
 mysql-test/main/func_group_innodb.result           |   24 +
 mysql-test/main/func_group_innodb.test             |   19 +
 mysql-test/main/func_hybrid_type.result            |   18 +
 mysql-test/main/func_hybrid_type.test              |   16 +
 mysql-test/main/func_math.result                   |   33 +
 mysql-test/main/func_math.test                     |   25 +
 mysql-test/main/grant5.result                      |    7 +
 mysql-test/main/grant5.test                        |   11 +
 mysql-test/main/innodb_ext_key.result              |    1 +
 mysql-test/main/innodb_ext_key.test                |    1 +
 mysql-test/main/mysqldump.result                   |    6 +-
 mysql-test/main/mysqldump.test                     |    2 +-
 mysql-test/main/partition_alter.test               |    2 -
 mysql-test/main/partition_innodb.result            |   23 +
 mysql-test/main/partition_innodb.test              |   25 +
 mysql-test/main/ps_error.result                    |   73 ++
 mysql-test/main/ps_error.test                      |   66 +
 mysql-test/main/range_innodb.result                |   18 +
 mysql-test/main/range_innodb.test                  |   17 +
 mysql-test/main/read_only.result                   |   16 +-
 mysql-test/main/read_only.test                     |   23 +-
 mysql-test/main/sp.result                          |   35 +
 mysql-test/main/sp.test                            |   34 +
 mysql-test/main/udf.result                         |   14 +
 mysql-test/main/udf.test                           |   13 +
 mysql-test/main/win.result                         |   23 +-
 mysql-test/main/win.test                           |   19 +-
 mysql-test/std_data/mdev17909#P#p20181029.MYD      |  Bin
 mysql-test/std_data/mdev17909#P#p20181029.MYI      |  Bin 0 -> 1024 bytes
 mysql-test/std_data/mdev17909#P#p20181128.MYD      |  Bin
 mysql-test/std_data/mdev17909#P#p20181128.MYI      |  Bin 0 -> 1024 bytes
 mysql-test/std_data/mdev17909.frm                  |  Bin 0 -> 3284 bytes
 mysql-test/std_data/mdev17909.par                  |  Bin 0 -> 48 bytes
 .../encryption/r/innodb-bad-key-change.result      |    1 +
 .../encryption/r/innodb-encryption-disable.result  |    1 +
 .../suite/encryption/r/innodb-missing-key.result   |    1 +
 .../suite/encryption/t/innodb-bad-key-change.test  |    1 +
 .../encryption/t/innodb-encryption-disable.test    |    1 +
 .../suite/encryption/t/innodb-missing-key.test     |    1 +
 .../galera/r/galera_autoinc_sst_mariabackup.result |    2 +
 .../galera/r/galera_ist_innodb_flush_logs.result   |  204 ++++
 .../galera/t/galera_autoinc_sst_mariabackup.cnf    |    1 -
 .../galera/t/galera_autoinc_sst_mariabackup.test   |    8 +
 .../galera/t/galera_ist_innodb_flush_logs.cnf      |   13 +
 .../galera/t/galera_ist_innodb_flush_logs.test     |   13 +
 .../galera_ist_mariabackup_innodb_flush_logs.test  |    1 +
 mysql-test/suite/innodb/disabled.def               |    1 +
 mysql-test/suite/innodb/include/crc32.pl           |   33 +
 mysql-test/suite/innodb/r/data_types.result        |   12 +-
 .../suite/innodb/r/innodb-alter-debug.result       |   23 +
 mysql-test/suite/innodb/r/innodb-alter.result      |   21 +
 mysql-test/suite/innodb/t/data_types.test          |   11 +-
 mysql-test/suite/innodb/t/innodb-alter-debug.test  |   32 +
 mysql-test/suite/innodb/t/innodb-alter.test        |   13 +
 .../mariabackup/encrypted_page_compressed.opt      |    6 +
 .../mariabackup/encrypted_page_compressed.result   |    7 +
 .../mariabackup/encrypted_page_compressed.test     |   48 +
 .../mariabackup/encrypted_page_corruption.result   |    4 +-
 .../mariabackup/encrypted_page_corruption.test     |   43 +-
 mysql-test/suite/mariabackup/huge_lsn.opt          |    4 +
 mysql-test/suite/mariabackup/partition_partial.opt |    1 +
 .../suite/mariabackup/partition_partial.result     |   31 +
 .../suite/mariabackup/partition_partial.test       |   44 +
 .../mariabackup/unencrypted_page_compressed.result |   11 +
 .../mariabackup/unencrypted_page_compressed.test   |   50 +
 .../suite/mariabackup/xb_aws_key_management.result |    3 -
 mysql-test/suite/rpl/r/rpl_idempotency.result      |   17 +
 mysql-test/suite/rpl/t/rpl_idempotency.test        |   21 +
 mysql-test/suite/storage_engine/type_bool.result   |    4 +-
 .../suite/sys_vars/r/wsrep_sst_method_basic.result |    4 +
 .../suite/sys_vars/t/wsrep_sst_method_basic.test   |    5 +
 mysql-test/suite/vcol/r/upgrade.result             |   16 +
 mysql-test/suite/vcol/t/upgrade.test               |   15 +
 scripts/CMakeLists.txt                             |    2 -
 scripts/wsrep_sst_xtrabackup-v2.sh                 | 1260 --------------------
 scripts/wsrep_sst_xtrabackup.sh                    |  692 -----------
 sql/ha_sequence.cc                                 |    2 +-
 sql/handler.h                                      |   12 +-
 sql/item.cc                                        |    4 +-
 sql/item_func.cc                                   |   12 +-
 sql/partition_info.cc                              |    4 +-
 sql/sql_acl.cc                                     |    6 +-
 sql/sql_const.h                                    |   12 +-
 sql/sql_db.cc                                      |    9 +-
 sql/sql_db.h                                       |    3 +-
 sql/sql_parse.cc                                   |    4 +-
 sql/sql_select.cc                                  |    4 +
 sql/sql_signal.cc                                  |   10 +-
 sql/sql_table.cc                                   |   16 +-
 sql/table.cc                                       |   10 +-
 sql/temporary_tables.cc                            |   50 +-
 sql/wsrep_sst.cc                                   |   28 +-
 sql/wsrep_sst.h                                    |    3 +
 storage/connect/global.h                           |    6 +-
 storage/connect/ha_connect.cc                      |    4 +-
 storage/connect/jsonudf.cpp                        |   12 +-
 .../mysql-test/connect/r/jdbc_oracle.result        |   18 +-
 storage/connect/plugutil.cpp                       |   28 +-
 storage/connect/reldef.cpp                         |   11 +-
 storage/connect/tabfmt.h                           |    2 +-
 storage/connect/tabjson.cpp                        |   10 +-
 storage/connect/tabjson.h                          |    6 +-
 storage/connect/tabodbc.cpp                        |  317 ++---
 storage/connect/tabxml.cpp                         |   13 +-
 storage/connect/tabxml.h                           |    5 +-
 storage/connect/user_connect.cc                    |    4 +-
 storage/innobase/btr/btr0cur.cc                    |   15 +-
 storage/innobase/buf/buf0buf.cc                    |    4 +-
 storage/innobase/dict/dict0mem.cc                  |   29 +-
 storage/innobase/fil/fil0pagecompress.cc           |    8 +-
 storage/innobase/gis/gis0sea.cc                    |    2 +-
 storage/innobase/handler/ha_innodb.cc              |  191 ++-
 storage/innobase/handler/handler0alter.cc          |   21 +-
 storage/innobase/include/dict0mem.h                |    4 -
 storage/innobase/os/os0event.cc                    |   21 +-
 storage/innobase/row/row0mysql.cc                  |   17 +-
 storage/innobase/srv/srv0srv.cc                    |    2 -
 storage/innobase/ut/ut0dbg.cc                      |    2 +-
 storage/rocksdb/CMakeLists.txt                     |    4 +-
 storage/rocksdb/ha_rocksdb.cc                      |    1 -
 .../{myrocks_hotbackup => myrocks_hotbackup.py}    |    2 +-
 storage/tokudb/CMakeLists.txt                      |   47 +-
 storage/tokudb/mysql-test/tokudb/disabled.def      |    4 +-
 .../mysql-test/tokudb/t/change_column_bin.py       |    0
 .../tokudb/t/change_column_bin_rename.py           |    0
 .../mysql-test/tokudb/t/change_column_char.py      |    0
 .../tokudb/t/change_column_char_binary.py          |    0
 .../tokudb/t/change_column_char_charbinary.py      |    0
 .../tokudb/t/change_column_char_rename.py          |    0
 .../mysql-test/tokudb/t/change_column_int.py       |    0
 .../mysql-test/tokudb/t/change_column_int_key.py   |    0
 .../tokudb/t/change_column_int_not_supported.py    |    0
 .../tokudb/t/change_column_int_rename.py           |    0
 .../r/partition_alter1_1_2_tokudb.result           |   56 +
 .../r/partition_alter1_1_tokudb.result             |   32 +
 .../r/partition_alter1_2_tokudb.result             |   80 ++
 .../r/partition_alter2_1_1_tokudb.result           |   40 +
 .../r/partition_alter2_1_2_tokudb.result           |   40 +
 .../r/partition_alter2_2_1_tokudb.result           |   40 +
 .../r/partition_alter2_2_2_tokudb.result           |   40 +
 .../tokudb_parts/r/partition_alter4_tokudb.result  |  216 ++++
 .../tokudb_parts/r/partition_basic_tokudb.result   |   64 +
 unittest/mysys/lf-t.c                              |    5 -
 unittest/mysys/my_atomic-t.c                       |   17 +-
 unittest/mysys/thr_template.c                      |   31 +-
 unittest/mysys/waiting_threads-t.c                 |    4 +-
 165 files changed, 2659 insertions(+), 2626 deletions(-)

diff --cc sql/wsrep_sst.cc
index ecfc6e5430c,0a2424fa069..c75248e2833
--- a/sql/wsrep_sst.cc
+++ b/sql/wsrep_sst.cc
@@@ -731,12 -797,13 +731,13 @@@ static ssize_t sst_prepare_mysqldump (c
    return ret;
  }
  
 -static bool SE_initialized = false;
 -
 -ssize_t wsrep_sst_prepare (void** msg)
 +std::string wsrep_sst_prepare()
  {
 +  const ssize_t ip_max= 256;
 +  char ip_buf[ip_max];
    const char* addr_in=  NULL;
    const char* addr_out= NULL;
+   const char* method;
  
    if (!strcmp(wsrep_sst_method, WSREP_SST_SKIP))
    {
@@@ -785,53 -862,65 +786,60 @@@
    }
  
    ssize_t addr_len= -ENOSYS;
-   if (!strcmp(wsrep_sst_method, WSREP_SST_MYSQLDUMP))
+   method = wsrep_sst_method;
+   if (!strcmp(method, WSREP_SST_MYSQLDUMP))
    {
      addr_len= sst_prepare_mysqldump (addr_in, &addr_out);
 -    if (addr_len < 0) unireg_abort(1);
 +    if (addr_len < 0)
 +    {
 +      throw wsrep::runtime_error("Could not prepare mysqldimp address");
 +    }
    }
    else
    {
      /*! A heuristic workaround until we learn how to stop and start engines */
 -    if (SE_initialized)
 +    if (Wsrep_server_state::instance().is_initialized() &&
 +        Wsrep_server_state::instance().state() == Wsrep_server_state::s_joiner)
      {
-       /*
- 	we already did SST at initializaiton, now engines are running
- 	sql_print_information() is here because the message is too long
- 	for WSREP_INFO.
-       */
+       if (!strcmp(method, WSREP_SST_XTRABACKUP) ||
+           !strcmp(method, WSREP_SST_XTRABACKUPV2))
+       {
+          WSREP_WARN("The %s SST method is deprecated, so it is automatically "
+                     "replaced by %s", method, WSREP_SST_MARIABACKUP);
+          method = WSREP_SST_MARIABACKUP;
+       }
+       // we already did SST at initializaiton, now engines are running
+       // sql_print_information() is here because the message is too long
+       // for WSREP_INFO.
        sql_print_information ("WSREP: "
                   "You have configured '%s' state snapshot transfer method "
                   "which cannot be performed on a running server. "
                   "Wsrep provider won't be able to fall back to it "
                   "if other means of state transfer are unavailable. "
                   "In that case you will need to restart the server.",
-                  wsrep_sst_method);
+                  method);
 -      *msg = 0;
 -      return 0;
 +      return "";
      }
  
-     addr_len= sst_prepare_other (wsrep_sst_method, sst_auth_real,
+     addr_len = sst_prepare_other (method, sst_auth_real,
                                    addr_in, &addr_out);
      if (addr_len < 0)
      {
        WSREP_ERROR("Failed to prepare for '%s' SST. Unrecoverable.",
-                    wsrep_sst_method);
+                    method);
 -      unireg_abort(1);
 +      throw wsrep::runtime_error("Failed to prepare for SST. Unrecoverable");
      }
    }
  
+   size_t const method_len(strlen(method));
 -  size_t const msg_len   (method_len + addr_len + 2 /* + auth_len + 1*/);
 +  std::string ret;
-   ret += wsrep_sst_method;
++  ret += method;
 +  ret.push_back('\0');
 +  ret += addr_out;
  
 -  *msg = malloc (msg_len);
 -  if (NULL != *msg) {
 -    char* const method_ptr(reinterpret_cast<char*>(*msg));
 -    strcpy (method_ptr, method);
 -    char* const addr_ptr(method_ptr + method_len + 1);
 -    strcpy (addr_ptr, addr_out);
 -
 -    WSREP_INFO ("Prepared SST request: %s|%s", method_ptr, addr_ptr);
 -  }
 -  else {
 -    WSREP_ERROR("Failed to allocate SST request of size %zu. Can't continue.",
 -                msg_len);
 -    unireg_abort(1);
 -  }
 +  const char* method_ptr(ret.data());
 +  const char* addr_ptr(ret.data() + strlen(method_ptr) + 1);
 +  WSREP_INFO ("Prepared SST request: %s|%s", method_ptr, addr_ptr);
  
    if (addr_out != addr_in) /* malloc'ed */ free ((char*)addr_out);
  


More information about the commits mailing list