From d5ceddb39140b34dd6fc9ac68ef3f5f17cae857d Mon Sep 17 00:00:00 2001 From: Vladislav Vaintroub Date: Tue, 7 Dec 2021 01:28:51 +0100 Subject: [PATCH 01/65] Appveyor - cache chocolatey packages --- appveyor.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/appveyor.yml b/appveyor.yml index 9797aec6b44f8..e8902eec5894c 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -6,6 +6,10 @@ init: version: build-{build}~branch-{branch} +cache: + - C:\ProgramData\chocolatey\bin -> appveyor.yml + - C:\ProgramData\chocolatey\lib -> appveyor.yml + clone_depth: 1 build_script: From 375ae890c76228c1f827bdc8f7684e81d5414466 Mon Sep 17 00:00:00 2001 From: forkfun Date: Tue, 7 Dec 2021 15:25:43 +0100 Subject: [PATCH 02/65] enable rpl_semi_sync_after_sync and rpl_semi_sync_slave_compressed_protocol tests --- mysql-test/suite/rpl/disabled.def | 3 --- 1 file changed, 3 deletions(-) diff --git a/mysql-test/suite/rpl/disabled.def b/mysql-test/suite/rpl/disabled.def index 9407357560668..5f5dc459ffa12 100644 --- a/mysql-test/suite/rpl/disabled.def +++ b/mysql-test/suite/rpl/disabled.def @@ -10,9 +10,6 @@ # ############################################################################## -#rpl_get_master_version_and_clock : Bug#11766137 Jan 05 2011 joro Valgrind warnings rpl_partition_archive : MDEV-5077 2013-09-27 svoj Cannot exchange partition with archive table rpl_row_binlog_max_cache_size : MDEV-11092 rpl_row_index_choice : MDEV-11666 -rpl_semi_sync_after_sync : fails after MDEV-16172 -rpl_semi_sync_slave_compressed_protocol : MDEV-25580 2021-05-05 Sujatha From 8dd1f01d0933596f3dde87f32b39bebca5aa1bff Mon Sep 17 00:00:00 2001 From: Vladislav Vaintroub Date: Tue, 7 Dec 2021 17:42:47 +0100 Subject: [PATCH 03/65] MDEV-27191 MariaDB client - "system" command does not work on Windows - define USE_POPEN, like it is done elsewhere. - use Notepad as default editor on Windows for the "edit" command. --- client/mysql.cc | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/client/mysql.cc b/client/mysql.cc index 177d0f6075729..382c216f772dc 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -96,8 +96,8 @@ extern "C" { # include # endif #define HAVE_READLINE -#define USE_POPEN #endif +#define USE_POPEN } #ifdef HAVE_VIDATTR @@ -4210,11 +4210,6 @@ com_nopager(String *buffer __attribute__((unused)), } #endif - -/* - Sorry, you can't send the result to an editor in Win32 -*/ - #ifdef USE_POPEN static int com_edit(String *buffer,char *line __attribute__((unused))) @@ -4236,7 +4231,7 @@ com_edit(String *buffer,char *line __attribute__((unused))) if (!(editor = (char *)getenv("EDITOR")) && !(editor = (char *)getenv("VISUAL"))) - editor = "vi"; + editor = IF_WIN("notepad","vi"); strxmov(buff,editor," ",filename,NullS); if ((error= system(buff))) { @@ -4251,7 +4246,7 @@ com_edit(String *buffer,char *line __attribute__((unused))) if ((fd = my_open(filename,O_RDONLY, MYF(MY_WME))) < 0) goto err; (void) buffer->alloc((uint) stat_arg.st_size); - if ((tmp=read(fd,(char*) buffer->ptr(),buffer->alloced_length())) >= 0L) + if ((tmp=(int)my_read(fd,(uchar*) buffer->ptr(),buffer->alloced_length(),MYF(0))) >= 0) buffer->length((uint) tmp); else buffer->length(0); From f13c2107b39a6dd1e52bb582545631a4d93f2681 Mon Sep 17 00:00:00 2001 From: Vladislav Vaintroub Date: Tue, 7 Dec 2021 17:46:29 +0100 Subject: [PATCH 04/65] Don't beep in mysql_upgrade_service.exe This beep looks especially strange, as mysqladmin output is redirected to the log file --- sql/mysql_upgrade_service.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sql/mysql_upgrade_service.cc b/sql/mysql_upgrade_service.cc index 5afe4ccbc5213..78302520f821c 100644 --- a/sql/mysql_upgrade_service.cc +++ b/sql/mysql_upgrade_service.cc @@ -464,8 +464,8 @@ int main(int argc, char **argv) if (WaitForSingleObject(mysqld_process, 0) != WAIT_TIMEOUT) die("mysqld.exe did not start"); - if (run_tool(P_WAIT, mysqladmin_path, "--protocol=pipe", - socket_param, "ping", NULL) == 0) + if (run_tool(P_WAIT, mysqladmin_path, "--protocol=pipe", socket_param, + "ping", "--no-beep", NULL) == 0) { break; } From f974062c519e95a00dbd5a1711e2bb95490eb4dc Mon Sep 17 00:00:00 2001 From: Sergei Krivonos Date: Tue, 7 Dec 2021 19:34:31 +0200 Subject: [PATCH 05/65] MDEV-19129: Fixed configure for Xcode, CMake generate CMake Error in wsrep-lib/CMakeLists.txt: The custom command generating /Users/name/build/mariadb-server/sql/lex_token.h is attached to multiple targets: GenServerSource sql but none of these is a common dependency of the other(s). This is not allowed by the Xcode "new build system". --- sql/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/sql/CMakeLists.txt b/sql/CMakeLists.txt index 17779adcff84f..4771627496695 100644 --- a/sql/CMakeLists.txt +++ b/sql/CMakeLists.txt @@ -351,6 +351,7 @@ ADD_CUSTOM_TARGET( GenServerSource DEPENDS ${GEN_SOURCES} ) +ADD_DEPENDENCIES(sql GenServerSource) #Need this only for embedded SET_TARGET_PROPERTIES(GenServerSource PROPERTIES EXCLUDE_FROM_ALL TRUE) From 5c8e628dda8be24544941b1892ce24c33b14e004 Mon Sep 17 00:00:00 2001 From: Alexey Yurchenko Date: Thu, 2 Dec 2021 22:26:01 +0200 Subject: [PATCH 06/65] wsrep-lib update: bugfixes, cleanups, event API, state transition cleanups Don't switch state to DONOR in `wsrep_sst_donate()` - wsrep-lib does it now --- sql/wsrep_mysqld.cc | 14 -------------- sql/wsrep_mysqld.h | 2 -- sql/wsrep_sst.cc | 5 ----- wsrep-lib | 2 +- 4 files changed, 1 insertion(+), 22 deletions(-) diff --git a/sql/wsrep_mysqld.cc b/sql/wsrep_mysqld.cc index 3fc03054014c9..a2856b5034d9a 100644 --- a/sql/wsrep_mysqld.cc +++ b/sql/wsrep_mysqld.cc @@ -2623,20 +2623,6 @@ void wsrep_wait_appliers_close(THD *thd) */ } -void -wsrep_last_committed_id(wsrep_gtid_t* gtid) -{ - wsrep::gtid ret= Wsrep_server_state::instance().last_committed_gtid(); - memcpy(gtid->uuid.data, ret.id().data(), sizeof(gtid->uuid.data)); - gtid->seqno= ret.seqno().get(); -} - -void -wsrep_node_uuid(wsrep_uuid_t& uuid) -{ - uuid= node_uuid; -} - int wsrep_must_ignore_error(THD* thd) { const int error= thd->get_stmt_da()->sql_errno(); diff --git a/sql/wsrep_mysqld.h b/sql/wsrep_mysqld.h index db3e9b09b5151..279f2bd44aa3a 100644 --- a/sql/wsrep_mysqld.h +++ b/sql/wsrep_mysqld.h @@ -210,7 +210,6 @@ extern bool wsrep_must_sync_wait (THD* thd, uint mask= WSREP_SYNC_WAIT_BEFORE_RE extern bool wsrep_sync_wait (THD* thd, uint mask= WSREP_SYNC_WAIT_BEFORE_READ); extern enum wsrep::provider::status wsrep_sync_wait_upto (THD* thd, wsrep_gtid_t* upto, int timeout); -extern void wsrep_last_committed_id (wsrep_gtid_t* gtid); extern int wsrep_check_opts(); extern void wsrep_prepend_PATH (const char* path); extern bool wsrep_append_fk_parent_table(THD* thd, TABLE_LIST* table, wsrep::key_array* keys); @@ -382,7 +381,6 @@ bool wsrep_node_is_synced(); void wsrep_init_SR(); void wsrep_verify_SE_checkpoint(const wsrep_uuid_t& uuid, wsrep_seqno_t seqno); int wsrep_replay_from_SR_store(THD*, const wsrep_trx_meta_t&); -void wsrep_node_uuid(wsrep_uuid_t&); class Log_event; int wsrep_ignored_error_code(Log_event* ev, int error); diff --git a/sql/wsrep_sst.cc b/sql/wsrep_sst.cc index 88bee67a2fc9f..a11c2fcb78aad 100644 --- a/sql/wsrep_sst.cc +++ b/sql/wsrep_sst.cc @@ -1892,11 +1892,6 @@ int wsrep_sst_donate(const std::string& msg, const wsrep::gtid& current_gtid, const bool bypass) { - /* This will be reset when sync callback is called. - * Should we set wsrep_ready to FALSE here too? */ - - wsrep_config_state->set(wsrep::server_state::s_donor); - const char* method= msg.data(); size_t method_len= strlen (method); diff --git a/wsrep-lib b/wsrep-lib index 22921e7082ddf..14b3612a30813 160000 --- a/wsrep-lib +++ b/wsrep-lib @@ -1 +1 @@ -Subproject commit 22921e7082ddfb45222f21a585aa8b877e62aa8b +Subproject commit 14b3612a308132d819237bba322f3373ac5a5135 From 5e8148819eac7e48ce962ae27b9d27ac0c32f8ed Mon Sep 17 00:00:00 2001 From: forkfun Date: Wed, 8 Dec 2021 14:28:42 +0100 Subject: [PATCH 07/65] minor cleanup of backup_lock_binlog.test, so that test passes also with statement binlog format --- mysql-test/main/backup_lock_binlog.result | 3 --- mysql-test/main/backup_lock_binlog.test | 1 - 2 files changed, 4 deletions(-) diff --git a/mysql-test/main/backup_lock_binlog.result b/mysql-test/main/backup_lock_binlog.result index adf960a9cb1a8..b07e1b59e581e 100644 --- a/mysql-test/main/backup_lock_binlog.result +++ b/mysql-test/main/backup_lock_binlog.result @@ -2,9 +2,6 @@ # MDEV-25334 FTWRL/Backup blocks DDL on temporary tables with binlog # enabled assertion fails in Diagnostics_area::set_error_status # -select @@binlog_format; -@@binlog_format -MIXED connect con1,localhost,root,,; connection default; # diff --git a/mysql-test/main/backup_lock_binlog.test b/mysql-test/main/backup_lock_binlog.test index 45b3f1cfbd936..71463d6a8d59f 100644 --- a/mysql-test/main/backup_lock_binlog.test +++ b/mysql-test/main/backup_lock_binlog.test @@ -9,7 +9,6 @@ --echo # enabled assertion fails in Diagnostics_area::set_error_status --echo # -select @@binlog_format; --connect (con1,localhost,root,,) connection default; From a9b5f5998927b423b39f8ff3697595bf88e77496 Mon Sep 17 00:00:00 2001 From: forkfun Date: Wed, 8 Dec 2021 14:06:33 +0100 Subject: [PATCH 08/65] enable rpl_parallel2 test, as MDEV-23089 is fixed --- mysql-test/suite/rpl/disabled.def | 1 - 1 file changed, 1 deletion(-) diff --git a/mysql-test/suite/rpl/disabled.def b/mysql-test/suite/rpl/disabled.def index 6b8340699aabc..34f23c5494ec2 100644 --- a/mysql-test/suite/rpl/disabled.def +++ b/mysql-test/suite/rpl/disabled.def @@ -18,4 +18,3 @@ rpl_semi_sync_after_sync : fails after MDEV-16172 rpl_semi_sync_slave_compressed_protocol : MDEV-25580 2021-05-05 Sujatha rpl_auto_increment_update_failure : disabled for now rpl_current_user : waits for MDEV-22374 fix -rpl_parallel2 : waits for MDEV-23089 From eafa2a1411d373fc21e82cc49cc1e6d7a33c127a Mon Sep 17 00:00:00 2001 From: forkfun Date: Thu, 9 Dec 2021 16:29:22 +0100 Subject: [PATCH 09/65] enable partition_open_files_limit test --- mysql-test/disabled.def | 1 - mysql-test/r/partition_open_files_limit.result | 2 ++ mysql-test/suite/binlog/t/binlog_sf.test | 8 ++------ mysql-test/t/compound.test | 2 +- 4 files changed, 5 insertions(+), 8 deletions(-) diff --git a/mysql-test/disabled.def b/mysql-test/disabled.def index 8ba5b271c2b2d..6ae67e00eca79 100644 --- a/mysql-test/disabled.def +++ b/mysql-test/disabled.def @@ -16,4 +16,3 @@ mysql_embedded : Bug#12561297 2011-05-14 Anitha Dependent on PB2 chang #show_explain : Psergey: random timeout in range-checked-for-each record query. file_contents : MDEV-6526 these files are not installed anymore max_statement_time : cannot possibly work, depends on timing -partition_open_files_limit : open_files_limit check broken by MDEV-18360 diff --git a/mysql-test/r/partition_open_files_limit.result b/mysql-test/r/partition_open_files_limit.result index fed32a69c44db..327fe24d27d61 100644 --- a/mysql-test/r/partition_open_files_limit.result +++ b/mysql-test/r/partition_open_files_limit.result @@ -1,4 +1,6 @@ DROP TABLE IF EXISTS `t1`; +call mtr.add_suppression("option 'table_open_cache'"); +call mtr.add_suppression("option 'max_connections'"); # Bug#46922: crash when adding partitions and open_files_limit is reached CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=MyISAM PARTITION BY KEY () PARTITIONS 1; diff --git a/mysql-test/suite/binlog/t/binlog_sf.test b/mysql-test/suite/binlog/t/binlog_sf.test index 05b31afcb5805..fecc47369724f 100644 --- a/mysql-test/suite/binlog/t/binlog_sf.test +++ b/mysql-test/suite/binlog/t/binlog_sf.test @@ -1,4 +1,3 @@ --- source include/have_log_bin.inc # We change binlog format inside the test, so no need to re-run with # more than one binlog_format. @@ -9,13 +8,9 @@ # save status -let $oblf=`select @@SESSION.BINLOG_FORMAT`; let $otfc=`select @@log_bin_trust_function_creators`; - set global log_bin_trust_function_creators=0; - - # fail *on definition* set binlog_format=STATEMENT; @@ -186,6 +181,7 @@ drop function fn16456; # restore status --disable_query_log -eval set binlog_format=$oblf; +set binlog_format=STATEMENT; eval set global log_bin_trust_function_creators=$otfc; +reset master; --enable_query_log diff --git a/mysql-test/t/compound.test b/mysql-test/t/compound.test index 7583bc1cca99f..046a9b9767edd 100644 --- a/mysql-test/t/compound.test +++ b/mysql-test/t/compound.test @@ -1,7 +1,7 @@ # # MDEV-5317 Compound statement / anonymous blocks # -source include/have_log_bin.inc; +source include/have_binlog_format_mixed_or_statement.inc; delimiter |; CREATE TABLE t1 (a INT PRIMARY KEY)| From 0745db71798ea7179140f4ffe85d6d69c9ba7da6 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Thu, 9 Dec 2021 19:14:17 +0100 Subject: [PATCH 10/65] don't use buffered_option_error_reporter without perfschema it's not printed, not cleaned up without perfschema, so isn't supposed to be written into either this fixes "Memory not freed" warnings when early command line options produce warnings in non-perfschema builds --- sql/mysqld.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sql/mysqld.cc b/sql/mysqld.cc index d7a4413878017..6a7ea117c84ca 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -1392,12 +1392,13 @@ static MYSQL_SOCKET unix_sock, base_ip_sock, extra_ip_sock; struct my_rnd_struct sql_rand; ///< used by sql_class.cc:THD::THD() #ifndef EMBEDDED_LIBRARY +C_MODE_START +#ifdef WITH_PERFSCHEMA_STORAGE_ENGINE /** Error reporter that buffer log messages. @param level log message level @param format log message format string */ -C_MODE_START static void buffered_option_error_reporter(enum loglevel level, const char *format, ...) { @@ -1409,6 +1410,7 @@ static void buffered_option_error_reporter(enum loglevel level, va_end(args); buffered_logs.buffer(level, buffer); } +#endif /** @@ -5809,7 +5811,7 @@ int mysqld_main(int argc, char **argv) Initialize the array of performance schema instrument configurations. */ init_pfs_instrument_array(); -#endif /* WITH_PERFSCHEMA_STORAGE_ENGINE */ + /* Logs generated while parsing the command line options are buffered and printed later. @@ -5817,7 +5819,7 @@ int mysqld_main(int argc, char **argv) buffered_logs.init(); my_getopt_error_reporter= buffered_option_error_reporter; my_charset_error_reporter= buffered_option_error_reporter; -#ifdef WITH_PERFSCHEMA_STORAGE_ENGINE + pfs_param.m_pfs_instrument= const_cast(""); #endif /* WITH_PERFSCHEMA_STORAGE_ENGINE */ my_timer_init(&sys_timer_info); From 74b3d4252a291456982c8e61a3af3d9936c6fbdd Mon Sep 17 00:00:00 2001 From: sjaakola Date: Fri, 10 Dec 2021 11:38:27 +0200 Subject: [PATCH 11/65] MDEV-27218 mtr test galera.MDEV-20793 has sporadic false positive failures Fixes to make the galera.MDEV-20793 test deterministic. Specifically, after --send COMMIT, there is now a sync point to catch a known state of the COMMIT execution --- mysql-test/suite/galera/r/MDEV-20793.result | 7 +++++- mysql-test/suite/galera/t/MDEV-20793.test | 26 ++++++++++++++++++++- 2 files changed, 31 insertions(+), 2 deletions(-) diff --git a/mysql-test/suite/galera/r/MDEV-20793.result b/mysql-test/suite/galera/r/MDEV-20793.result index b420c8720f568..feb068f258f90 100644 --- a/mysql-test/suite/galera/r/MDEV-20793.result +++ b/mysql-test/suite/galera/r/MDEV-20793.result @@ -9,7 +9,6 @@ connection node_1; SET SESSION wsrep_retry_autocommit = 0; START TRANSACTION; UPDATE t1 SET f2 = 1; -SET SESSION debug_sync = "wsrep_before_replay SIGNAL reached WAIT_FOR continue"; connection node_1_ctrl; SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync'; connection node_2; @@ -24,9 +23,15 @@ UPDATE t1 SET f2 = 2 WHERE f1 = 5; connection node_1_ctrl; SET SESSION wsrep_on = 0; SET SESSION wsrep_on = 1; +SET GLOBAL wsrep_provider_options = 'dbug='; +SET GLOBAL wsrep_provider_options = 'dbug=d,after_replicate_sync'; connection node_1; +SET SESSION debug_sync = "wsrep_before_replay SIGNAL reached WAIT_FOR continue"; COMMIT; connection node_1_ctrl; +SET SESSION wsrep_on = 0; +SET SESSION wsrep_on = 1; +SET GLOBAL wsrep_provider_options = 'signal=after_replicate_sync'; SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync'; SET SESSION debug_sync = "now WAIT_FOR reached"; SET GLOBAL wsrep_provider_options = 'signal=local_monitor_slave_enter_sync'; diff --git a/mysql-test/suite/galera/t/MDEV-20793.test b/mysql-test/suite/galera/t/MDEV-20793.test index 13ff3cbe77bf3..6835a73a2a49a 100644 --- a/mysql-test/suite/galera/t/MDEV-20793.test +++ b/mysql-test/suite/galera/t/MDEV-20793.test @@ -30,9 +30,9 @@ SET GLOBAL wsrep_slave_threads = 2; SET SESSION wsrep_retry_autocommit = 0; START TRANSACTION; UPDATE t1 SET f2 = 1; -SET SESSION debug_sync = "wsrep_before_replay SIGNAL reached WAIT_FOR continue"; --connection node_1_ctrl +# set sync point for incoming applier --let $galera_sync_point = apply_monitor_slave_enter_sync --source include/galera_set_sync_point.inc @@ -42,8 +42,11 @@ SET SESSION debug_sync = "wsrep_before_replay SIGNAL reached WAIT_FOR continue"; INSERT INTO t1 VALUES (2, 2); --connection node_1_ctrl +# wait to see the INSERT from node_2 reaching applier sync point --source include/galera_wait_sync_point.inc --source include/galera_clear_sync_point.inc + +# set sync point to catch other write set applying from node_2 --let $galera_sync_point = local_monitor_slave_enter_sync --source include/galera_set_sync_point.inc @@ -52,17 +55,38 @@ INSERT INTO t1 VALUES (2, 2); UPDATE t1 SET f2 = 2 WHERE f1 = 5; --connection node_1_ctrl +# wait until both appliers are stopped in sync points --let $galera_sync_point = apply_monitor_slave_enter_sync local_monitor_slave_enter_sync --source include/galera_wait_sync_point.inc +--source include/galera_clear_sync_point.inc + +# set sync point for catching node_1 transaction just before committing +--let $galera_sync_point = after_replicate_sync +--source include/galera_set_sync_point.inc --connection node_1 +# set sync point, which will stop execution after COMMIT has been BF aborted +# and send the COMMIT, it should stop in commit_monitor_master_enter_sync point +SET SESSION debug_sync = "wsrep_before_replay SIGNAL reached WAIT_FOR continue"; --send COMMIT --connection node_1_ctrl +# wait until both appliers and local COMMIT are idle in their sync points +--let $galera_sync_point = after_replicate_sync apply_monitor_slave_enter_sync local_monitor_slave_enter_sync +--source include/galera_wait_sync_point.inc + +# release local COMMIT processing, it will continue and pause first before certification, +--let $galera_sync_point = after_replicate_sync +--source include/galera_signal_sync_point.inc + +# release first applier (INSERT), it should BF abort the local COMMIT processing --let $galera_sync_point = apply_monitor_slave_enter_sync --source include/galera_signal_sync_point.inc + +# wait to see that COMMIT was BF aborted and has reached replaying state SET SESSION debug_sync = "now WAIT_FOR reached"; +# release the latter applier, with real lock conflict --let $galera_sync_point = local_monitor_slave_enter_sync --source include/galera_signal_sync_point.inc --source include/galera_clear_sync_point.inc From 88b339805d7a9ddebc3fd61e9dee83270dbf474d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Sat, 11 Dec 2021 15:27:14 +0200 Subject: [PATCH 12/65] Fix a test for cmake -DPLUGIN_PERFSCHEMA=NO --- mysql-test/suite/perfschema/t/digest_view.test | 1 + 1 file changed, 1 insertion(+) diff --git a/mysql-test/suite/perfschema/t/digest_view.test b/mysql-test/suite/perfschema/t/digest_view.test index 462d60556eb99..f718d7530e6ae 100644 --- a/mysql-test/suite/perfschema/t/digest_view.test +++ b/mysql-test/suite/perfschema/t/digest_view.test @@ -8,6 +8,7 @@ # Test requires: sp-protocol/ps-protocol/view-protocol/cursor-protocol disabled --source include/no_protocol.inc --source include/not_embedded.inc +--source include/have_perfschema.inc CREATE TABLE test.v1 (a int, b int); INSERT INTO test.v1 VALUES (1, 100), (2, 200), (3, 300); From 6b066ec33285c089ce770c2d1eb50bc49787ee92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Mon, 13 Dec 2021 08:04:45 +0200 Subject: [PATCH 13/65] MDEV-27235: Crash on SET GLOBAL innodb_encrypt_tables fil_crypt_set_encrypt_tables(): If no encryption threads have been initialized, do nothing. --- mysql-test/suite/innodb/r/temporary_table.result | 1 + mysql-test/suite/innodb/t/temporary_table.test | 2 ++ storage/innobase/fil/fil0crypt.cc | 4 ++++ 3 files changed, 7 insertions(+) diff --git a/mysql-test/suite/innodb/r/temporary_table.result b/mysql-test/suite/innodb/r/temporary_table.result index 0307ba88200b4..9a11b7561af23 100644 --- a/mysql-test/suite/innodb/r/temporary_table.result +++ b/mysql-test/suite/innodb/r/temporary_table.result @@ -136,6 +136,7 @@ show tables; Tables_in_test create temporary table t1 (keyc int, c1 char(100), c2 char(100)) engine = innodb; ERROR HY000: Can't create table `test`.`t1` (errno: 165 "Table is read only") +SET GLOBAL innodb_encrypt_tables=DEFAULT; # test various bad start-up parameters FOUND 2 /InnoDB: Unable to create temporary file/ in mysqld.1.err FOUND 1 /innodb_temporary and innodb_system file names seem to be the same/ in mysqld.1.err diff --git a/mysql-test/suite/innodb/t/temporary_table.test b/mysql-test/suite/innodb/t/temporary_table.test index d7fe66e2efbe3..46ac867c1c2a6 100644 --- a/mysql-test/suite/innodb/t/temporary_table.test +++ b/mysql-test/suite/innodb/t/temporary_table.test @@ -121,6 +121,8 @@ show tables; --error ER_CANT_CREATE_TABLE create temporary table t1 (keyc int, c1 char(100), c2 char(100)) engine = innodb; +SET GLOBAL innodb_encrypt_tables=DEFAULT; + --echo # test various bad start-up parameters let SEARCH_FILE = $MYSQLTEST_VARDIR/log/mysqld.1.err; diff --git a/storage/innobase/fil/fil0crypt.cc b/storage/innobase/fil/fil0crypt.cc index 46fc12ee6b05a..a8ffa3e257844 100644 --- a/storage/innobase/fil/fil0crypt.cc +++ b/storage/innobase/fil/fil0crypt.cc @@ -2470,6 +2470,10 @@ void fil_crypt_set_encrypt_tables( uint val) { + if (!fil_crypt_threads_inited) { + return; + } + mutex_enter(&fil_system->mutex); srv_encrypt_tables = val; From 8bb55633699612279744c055e22eeca8d4058273 Mon Sep 17 00:00:00 2001 From: Julius Goryavsky Date: Mon, 13 Dec 2021 02:15:57 +0100 Subject: [PATCH 14/65] MDEV-27181: Galera SST scripts should use ssl_capath for CA directory 1. Galera SST scripts should use ssl_capath (not ssl_ca) for CA directory. The current implementation tries to automatically detect the path using the trailing slash in the ssl_ca variable value, but this approach is not compatible with the server configuration. Now, by analogy with the server, SST scripts also use a separate ssl_capath variable. In addition, a similar tcapath variable has been added for the old-style configuration (in the "sst" section). 2. Openssl utility detection made more reliable. 3. Removed extra spaces in automatically generated command lines - to simplify debugging of the SST scripts. 4. In general, the code for detecting the presence or absence of auxiliary utilities has been improved - it is made more reliable in some configurations (and for shells other than bash). --- mysql-test/std_data/capath/3106f582.0 | 1 + mysql-test/std_data/capath/cacert.pem | 79 ++++ mysql-test/std_data/capath/ed1f42db.0 | 1 + mysql-test/suite/galera/disabled.def | 1 - ...alera_sst_rsync_encrypt_with_capath.result | 398 ++++++++++++++++++ .../galera_sst_rsync_encrypt_with_key.result | 2 - ...alera_sst_rsync_encrypt_with_server.result | 2 - .../galera_sst_mariabackup_table_options.test | 1 + .../galera_sst_rsync_encrypt_with_capath.cnf | 20 + .../galera_sst_rsync_encrypt_with_capath.test | 26 ++ .../t/galera_sst_rsync_encrypt_with_key.test | 3 - .../galera_sst_rsync_encrypt_with_server.test | 3 - .../t/galera_ipv6_mariabackup.test | 1 + .../t/galera_ipv6_mariabackup_section.test | 1 + scripts/wsrep_sst_common.sh | 142 ++++--- scripts/wsrep_sst_mariabackup.sh | 292 +++++++------ scripts/wsrep_sst_mysqldump.sh | 11 +- scripts/wsrep_sst_rsync.sh | 117 ++--- scripts/wsrep_sst_xtrabackup-v2.sh | 321 +++++++------- scripts/wsrep_sst_xtrabackup.sh | 5 +- vio/viosslfactories.c | 17 + 21 files changed, 1033 insertions(+), 411 deletions(-) create mode 120000 mysql-test/std_data/capath/3106f582.0 create mode 100644 mysql-test/std_data/capath/cacert.pem create mode 120000 mysql-test/std_data/capath/ed1f42db.0 create mode 100644 mysql-test/suite/galera/r/galera_sst_rsync_encrypt_with_capath.result create mode 100644 mysql-test/suite/galera/t/galera_sst_rsync_encrypt_with_capath.cnf create mode 100644 mysql-test/suite/galera/t/galera_sst_rsync_encrypt_with_capath.test diff --git a/mysql-test/std_data/capath/3106f582.0 b/mysql-test/std_data/capath/3106f582.0 new file mode 120000 index 0000000000000..1310cfcff205a --- /dev/null +++ b/mysql-test/std_data/capath/3106f582.0 @@ -0,0 +1 @@ +cacert.pem \ No newline at end of file diff --git a/mysql-test/std_data/capath/cacert.pem b/mysql-test/std_data/capath/cacert.pem new file mode 100644 index 0000000000000..23dda2318e150 --- /dev/null +++ b/mysql-test/std_data/capath/cacert.pem @@ -0,0 +1,79 @@ +Certificate: + Data: + Version: 3 (0x2) + Serial Number: + d0:4d:23:85:ee:59:b3:fa + Signature Algorithm: sha256WithRSAEncryption + Issuer: CN=cacert, C=FI, ST=Helsinki, L=Helsinki, O=MariaDB + Validity + Not Before: Jan 27 10:11:10 2019 GMT + Not After : Jan 22 10:11:10 2039 GMT + Subject: CN=cacert, C=FI, ST=Helsinki, L=Helsinki, O=MariaDB + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + Public-Key: (2048 bit) + Modulus: + 00:e8:0e:a7:84:d3:75:30:06:30:b2:10:b9:d1:88: + 36:2b:5e:f8:c8:44:57:cb:67:72:ab:96:95:33:d5: + 88:d1:8f:23:50:98:ba:6d:20:00:80:bd:35:d5:c1: + bf:98:49:c4:0a:15:4a:34:a6:21:9b:2e:8c:15:09: + f0:63:81:02:c2:7c:e2:53:e0:f7:a1:1a:40:5e:8f: + 41:4a:4c:56:d4:20:f1:d5:a7:c1:53:2e:ff:7e:37: + 17:cc:7e:74:bd:e2:22:33:ce:8c:77:62:a4:c5:3f: + 44:35:7b:7e:b9:f5:7d:8c:7a:27:58:fd:2c:42:86: + 2e:e7:6b:01:99:7b:fe:7d:a7:a1:4f:3e:39:39:54: + 1f:61:de:74:66:d1:77:4f:43:1b:66:70:29:85:de: + fc:8f:8e:1b:7b:a2:66:48:26:7f:9b:a6:fd:4a:e4: + dc:eb:ed:bd:f8:e3:f1:57:98:13:6f:f1:a3:2a:e3: + 73:bd:8d:7c:6f:4b:59:35:bc:b5:42:3e:99:a7:13: + 8d:be:2e:5c:9a:c6:5b:ab:ae:bf:00:e9:c8:ee:05: + 22:8e:d5:67:1a:47:9a:6d:9c:f9:42:3e:15:34:f8: + 31:ec:b4:7e:d3:92:95:b0:b8:f9:66:f3:bd:1d:31: + 2c:b1:90:62:a1:f8:4e:a6:5d:26:22:f0:e1:fe:16: + 2b:69 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Subject Key Identifier: + CA:71:99:89:F0:72:AB:75:66:BB:65:6A:03:04:72:A5:7B:95:A6:93 + X509v3 Authority Key Identifier: + keyid:CA:71:99:89:F0:72:AB:75:66:BB:65:6A:03:04:72:A5:7B:95:A6:93 + + X509v3 Basic Constraints: + CA:TRUE + Signature Algorithm: sha256WithRSAEncryption + df:fd:74:29:5b:5e:9a:8b:09:02:40:59:73:cb:71:47:3f:97: + 3d:a9:fd:c4:8c:01:29:c9:86:b8:71:55:ff:72:0e:50:dc:c8: + b5:e6:91:41:52:47:21:30:cc:4d:e7:3b:4b:db:55:ea:7d:46: + eb:53:e0:b7:1b:80:7c:b1:0c:d3:d1:bc:a0:73:ae:96:1f:fd: + 05:52:7e:54:d5:03:52:69:7b:34:5f:27:d7:98:da:98:76:73: + e6:bb:50:59:2a:94:90:67:03:1c:a4:76:2f:ee:ef:59:60:09: + 48:33:03:2b:52:ed:83:42:f8:71:19:7f:d8:be:40:ed:20:01: + 90:3c:7e:1c:8b:d2:9f:f3:2f:09:1f:50:c8:10:e1:8a:d9:a5: + 49:9c:0b:74:17:b9:2b:68:f6:1e:73:c2:73:10:38:b3:35:e2: + 87:91:1b:a1:d1:9b:81:9d:1b:32:cc:03:6e:4c:82:95:81:11: + 42:56:e2:16:2b:22:65:db:40:2c:ca:dc:03:f4:d5:07:cf:f5: + 13:b2:cf:51:5b:24:cd:c7:d1:9b:42:8e:f9:df:5d:1e:5a:09: + a3:4f:a9:0b:f4:21:c5:bb:ff:02:93:67:e8:2d:ee:ab:d9:59: + 76:03:2c:a1:bd:fb:dc:af:b6:82:94:71:85:53:a8:18:0d:3a: + 9e:42:eb:59 +-----BEGIN CERTIFICATE----- +MIIDfzCCAmegAwIBAgIJANBNI4XuWbP6MA0GCSqGSIb3DQEBCwUAMFYxDzANBgNV +BAMMBmNhY2VydDELMAkGA1UEBhMCRkkxETAPBgNVBAgMCEhlbHNpbmtpMREwDwYD +VQQHDAhIZWxzaW5raTEQMA4GA1UECgwHTWFyaWFEQjAeFw0xOTAxMjcxMDExMTBa +Fw0zOTAxMjIxMDExMTBaMFYxDzANBgNVBAMMBmNhY2VydDELMAkGA1UEBhMCRkkx +ETAPBgNVBAgMCEhlbHNpbmtpMREwDwYDVQQHDAhIZWxzaW5raTEQMA4GA1UECgwH +TWFyaWFEQjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOgOp4TTdTAG +MLIQudGINite+MhEV8tncquWlTPViNGPI1CYum0gAIC9NdXBv5hJxAoVSjSmIZsu +jBUJ8GOBAsJ84lPg96EaQF6PQUpMVtQg8dWnwVMu/343F8x+dL3iIjPOjHdipMU/ +RDV7frn1fYx6J1j9LEKGLudrAZl7/n2noU8+OTlUH2HedGbRd09DG2ZwKYXe/I+O +G3uiZkgmf5um/Urk3Ovtvfjj8VeYE2/xoyrjc72NfG9LWTW8tUI+macTjb4uXJrG +W6uuvwDpyO4FIo7VZxpHmm2c+UI+FTT4Mey0ftOSlbC4+WbzvR0xLLGQYqH4TqZd +JiLw4f4WK2kCAwEAAaNQME4wHQYDVR0OBBYEFMpxmYnwcqt1ZrtlagMEcqV7laaT +MB8GA1UdIwQYMBaAFMpxmYnwcqt1ZrtlagMEcqV7laaTMAwGA1UdEwQFMAMBAf8w +DQYJKoZIhvcNAQELBQADggEBAN/9dClbXpqLCQJAWXPLcUc/lz2p/cSMASnJhrhx +Vf9yDlDcyLXmkUFSRyEwzE3nO0vbVep9RutT4LcbgHyxDNPRvKBzrpYf/QVSflTV +A1JpezRfJ9eY2ph2c+a7UFkqlJBnAxykdi/u71lgCUgzAytS7YNC+HEZf9i+QO0g +AZA8fhyL0p/zLwkfUMgQ4YrZpUmcC3QXuSto9h5zwnMQOLM14oeRG6HRm4GdGzLM +A25MgpWBEUJW4hYrImXbQCzK3AP01QfP9ROyz1FbJM3H0ZtCjvnfXR5aCaNPqQv0 +IcW7/wKTZ+gt7qvZWXYDLKG9+9yvtoKUcYVTqBgNOp5C61k= +-----END CERTIFICATE----- diff --git a/mysql-test/std_data/capath/ed1f42db.0 b/mysql-test/std_data/capath/ed1f42db.0 new file mode 120000 index 0000000000000..1310cfcff205a --- /dev/null +++ b/mysql-test/std_data/capath/ed1f42db.0 @@ -0,0 +1 @@ +cacert.pem \ No newline at end of file diff --git a/mysql-test/suite/galera/disabled.def b/mysql-test/suite/galera/disabled.def index d92f3f7d6b8b5..955a2c82ebcf3 100644 --- a/mysql-test/suite/galera/disabled.def +++ b/mysql-test/suite/galera/disabled.def @@ -29,5 +29,4 @@ versioning_trx_id: MDEV-18590: galera.versioning_trx_id: Test failure: mysqltest galera_wsrep_provider_unset_set: wsrep_provider is read-only for security reasons pxc-421: wsrep_provider is read-only for security reasons galera_sst_xtrabackup-v2: Test fails due to innodb issues -galera_sst_xtrabackup-v2_encrypt_with_key: Test fails due to innodb issues galera_sst_xtrabackup-v2_data_dir: Test fails due to innodb issues diff --git a/mysql-test/suite/galera/r/galera_sst_rsync_encrypt_with_capath.result b/mysql-test/suite/galera/r/galera_sst_rsync_encrypt_with_capath.result new file mode 100644 index 0000000000000..170ba62dd129f --- /dev/null +++ b/mysql-test/suite/galera/r/galera_sst_rsync_encrypt_with_capath.result @@ -0,0 +1,398 @@ +connection node_1; +connection node_2; +connection node_1; +Performing State Transfer on a server that has been shut down cleanly and restarted +connection node_1; +CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES ('node1_committed_before'); +INSERT INTO t1 VALUES ('node1_committed_before'); +INSERT INTO t1 VALUES ('node1_committed_before'); +INSERT INTO t1 VALUES ('node1_committed_before'); +INSERT INTO t1 VALUES ('node1_committed_before'); +COMMIT; +connection node_2; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES ('node2_committed_before'); +INSERT INTO t1 VALUES ('node2_committed_before'); +INSERT INTO t1 VALUES ('node2_committed_before'); +INSERT INTO t1 VALUES ('node2_committed_before'); +INSERT INTO t1 VALUES ('node2_committed_before'); +COMMIT; +Shutting down server ... +connection node_1; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES ('node1_committed_during'); +INSERT INTO t1 VALUES ('node1_committed_during'); +INSERT INTO t1 VALUES ('node1_committed_during'); +INSERT INTO t1 VALUES ('node1_committed_during'); +INSERT INTO t1 VALUES ('node1_committed_during'); +COMMIT; +START TRANSACTION; +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +connect node_1a_galera_st_shutdown_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +connection node_2; +Starting server ... +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES ('node2_committed_after'); +INSERT INTO t1 VALUES ('node2_committed_after'); +INSERT INTO t1 VALUES ('node2_committed_after'); +INSERT INTO t1 VALUES ('node2_committed_after'); +INSERT INTO t1 VALUES ('node2_committed_after'); +COMMIT; +connection node_1; +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +COMMIT; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES ('node1_committed_after'); +INSERT INTO t1 VALUES ('node1_committed_after'); +INSERT INTO t1 VALUES ('node1_committed_after'); +INSERT INTO t1 VALUES ('node1_committed_after'); +INSERT INTO t1 VALUES ('node1_committed_after'); +COMMIT; +connection node_1a_galera_st_shutdown_slave; +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +ROLLBACK; +SELECT COUNT(*) = 35 FROM t1; +COUNT(*) = 35 +1 +SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; +COUNT(*) = 0 +1 +COMMIT; +SET AUTOCOMMIT=ON; +connection node_1; +SELECT COUNT(*) = 35 FROM t1; +COUNT(*) = 35 +1 +SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; +COUNT(*) = 0 +1 +DROP TABLE t1; +COMMIT; +SET AUTOCOMMIT=ON; +Performing State Transfer on a server that starts from a clean var directory +This is accomplished by shutting down node #2 and removing its var directory before restarting it +connection node_1; +CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES ('node1_committed_before'); +INSERT INTO t1 VALUES ('node1_committed_before'); +INSERT INTO t1 VALUES ('node1_committed_before'); +INSERT INTO t1 VALUES ('node1_committed_before'); +INSERT INTO t1 VALUES ('node1_committed_before'); +COMMIT; +connection node_2; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES ('node2_committed_before'); +INSERT INTO t1 VALUES ('node2_committed_before'); +INSERT INTO t1 VALUES ('node2_committed_before'); +INSERT INTO t1 VALUES ('node2_committed_before'); +INSERT INTO t1 VALUES ('node2_committed_before'); +COMMIT; +Shutting down server ... +connection node_1; +Cleaning var directory ... +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES ('node1_committed_during'); +INSERT INTO t1 VALUES ('node1_committed_during'); +INSERT INTO t1 VALUES ('node1_committed_during'); +INSERT INTO t1 VALUES ('node1_committed_during'); +INSERT INTO t1 VALUES ('node1_committed_during'); +COMMIT; +START TRANSACTION; +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +connect node_1a_galera_st_clean_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +connection node_2; +Starting server ... +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES ('node2_committed_after'); +INSERT INTO t1 VALUES ('node2_committed_after'); +INSERT INTO t1 VALUES ('node2_committed_after'); +INSERT INTO t1 VALUES ('node2_committed_after'); +INSERT INTO t1 VALUES ('node2_committed_after'); +COMMIT; +connection node_1; +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +COMMIT; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES ('node1_committed_after'); +INSERT INTO t1 VALUES ('node1_committed_after'); +INSERT INTO t1 VALUES ('node1_committed_after'); +INSERT INTO t1 VALUES ('node1_committed_after'); +INSERT INTO t1 VALUES ('node1_committed_after'); +COMMIT; +connection node_1a_galera_st_clean_slave; +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +ROLLBACK; +SELECT COUNT(*) = 35 FROM t1; +COUNT(*) = 35 +1 +SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; +COUNT(*) = 0 +1 +COMMIT; +SET AUTOCOMMIT=ON; +connection node_1; +SELECT COUNT(*) = 35 FROM t1; +COUNT(*) = 35 +1 +SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; +COUNT(*) = 0 +1 +DROP TABLE t1; +COMMIT; +SET AUTOCOMMIT=ON; +Performing State Transfer on a server that has been killed and restarted +connection node_1; +CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES ('node1_committed_before'); +INSERT INTO t1 VALUES ('node1_committed_before'); +INSERT INTO t1 VALUES ('node1_committed_before'); +INSERT INTO t1 VALUES ('node1_committed_before'); +INSERT INTO t1 VALUES ('node1_committed_before'); +COMMIT; +connection node_2; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES ('node2_committed_before'); +INSERT INTO t1 VALUES ('node2_committed_before'); +INSERT INTO t1 VALUES ('node2_committed_before'); +INSERT INTO t1 VALUES ('node2_committed_before'); +INSERT INTO t1 VALUES ('node2_committed_before'); +COMMIT; +Killing server ... +connection node_1; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES ('node1_committed_during'); +INSERT INTO t1 VALUES ('node1_committed_during'); +INSERT INTO t1 VALUES ('node1_committed_during'); +INSERT INTO t1 VALUES ('node1_committed_during'); +INSERT INTO t1 VALUES ('node1_committed_during'); +COMMIT; +START TRANSACTION; +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +connect node_1a_galera_st_kill_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +connection node_2; +Performing --wsrep-recover ... +Starting server ... +Using --wsrep-start-position when starting mysqld ... +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES ('node2_committed_after'); +INSERT INTO t1 VALUES ('node2_committed_after'); +INSERT INTO t1 VALUES ('node2_committed_after'); +INSERT INTO t1 VALUES ('node2_committed_after'); +INSERT INTO t1 VALUES ('node2_committed_after'); +COMMIT; +connection node_1; +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +COMMIT; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES ('node1_committed_after'); +INSERT INTO t1 VALUES ('node1_committed_after'); +INSERT INTO t1 VALUES ('node1_committed_after'); +INSERT INTO t1 VALUES ('node1_committed_after'); +INSERT INTO t1 VALUES ('node1_committed_after'); +COMMIT; +connection node_1a_galera_st_kill_slave; +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +ROLLBACK; +SELECT COUNT(*) = 35 FROM t1; +COUNT(*) = 35 +1 +SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; +COUNT(*) = 0 +1 +COMMIT; +SET AUTOCOMMIT=ON; +connection node_1; +SELECT COUNT(*) = 35 FROM t1; +COUNT(*) = 35 +1 +SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; +COUNT(*) = 0 +1 +DROP TABLE t1; +COMMIT; +SET AUTOCOMMIT=ON; +Performing State Transfer on a server that has been killed and restarted +while a DDL was in progress on it +connection node_1; +CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES ('node1_committed_before'); +INSERT INTO t1 VALUES ('node1_committed_before'); +INSERT INTO t1 VALUES ('node1_committed_before'); +INSERT INTO t1 VALUES ('node1_committed_before'); +INSERT INTO t1 VALUES ('node1_committed_before'); +connection node_2; +START TRANSACTION; +INSERT INTO t1 VALUES ('node2_committed_before'); +INSERT INTO t1 VALUES ('node2_committed_before'); +INSERT INTO t1 VALUES ('node2_committed_before'); +INSERT INTO t1 VALUES ('node2_committed_before'); +INSERT INTO t1 VALUES ('node2_committed_before'); +COMMIT; +SET GLOBAL debug_dbug = 'd,sync.alter_opened_table'; +connection node_1; +ALTER TABLE t1 ADD COLUMN f2 INTEGER; +connection node_2; +SET wsrep_sync_wait = 0; +Killing server ... +connection node_1; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 (f1) VALUES ('node1_committed_during'); +INSERT INTO t1 (f1) VALUES ('node1_committed_during'); +INSERT INTO t1 (f1) VALUES ('node1_committed_during'); +INSERT INTO t1 (f1) VALUES ('node1_committed_during'); +INSERT INTO t1 (f1) VALUES ('node1_committed_during'); +COMMIT; +START TRANSACTION; +INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); +connect node_1a_galera_st_kill_slave_ddl, 127.0.0.1, root, , test, $NODE_MYPORT_1; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); +connection node_2; +Performing --wsrep-recover ... +connection node_2; +Starting server ... +Using --wsrep-start-position when starting mysqld ... +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 (f1) VALUES ('node2_committed_after'); +INSERT INTO t1 (f1) VALUES ('node2_committed_after'); +INSERT INTO t1 (f1) VALUES ('node2_committed_after'); +INSERT INTO t1 (f1) VALUES ('node2_committed_after'); +INSERT INTO t1 (f1) VALUES ('node2_committed_after'); +COMMIT; +connection node_1; +INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); +COMMIT; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 (f1) VALUES ('node1_committed_after'); +INSERT INTO t1 (f1) VALUES ('node1_committed_after'); +INSERT INTO t1 (f1) VALUES ('node1_committed_after'); +INSERT INTO t1 (f1) VALUES ('node1_committed_after'); +INSERT INTO t1 (f1) VALUES ('node1_committed_after'); +COMMIT; +connection node_1a_galera_st_kill_slave_ddl; +INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); +ROLLBACK; +SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1'; +COUNT(*) = 2 +1 +SELECT COUNT(*) = 35 FROM t1; +COUNT(*) = 35 +1 +SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; +COUNT(*) = 0 +1 +COMMIT; +SET AUTOCOMMIT=ON; +connection node_1; +SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1'; +COUNT(*) = 2 +1 +SELECT COUNT(*) = 35 FROM t1; +COUNT(*) = 35 +1 +SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; +COUNT(*) = 0 +1 +DROP TABLE t1; +COMMIT; +SET AUTOCOMMIT=ON; +SET GLOBAL debug_dbug = $debug_orig; +include/assert_grep.inc [Using stunnel for SSL encryption] diff --git a/mysql-test/suite/galera/r/galera_sst_rsync_encrypt_with_key.result b/mysql-test/suite/galera/r/galera_sst_rsync_encrypt_with_key.result index 251c087412b6c..170ba62dd129f 100644 --- a/mysql-test/suite/galera/r/galera_sst_rsync_encrypt_with_key.result +++ b/mysql-test/suite/galera/r/galera_sst_rsync_encrypt_with_key.result @@ -1,7 +1,5 @@ connection node_1; connection node_2; -connection node_2; -CALL mtr.add_suppression("\\[ERROR\\] .*ib_buffer_pool' for reading: No such file or directory"); connection node_1; Performing State Transfer on a server that has been shut down cleanly and restarted connection node_1; diff --git a/mysql-test/suite/galera/r/galera_sst_rsync_encrypt_with_server.result b/mysql-test/suite/galera/r/galera_sst_rsync_encrypt_with_server.result index 251c087412b6c..170ba62dd129f 100644 --- a/mysql-test/suite/galera/r/galera_sst_rsync_encrypt_with_server.result +++ b/mysql-test/suite/galera/r/galera_sst_rsync_encrypt_with_server.result @@ -1,7 +1,5 @@ connection node_1; connection node_2; -connection node_2; -CALL mtr.add_suppression("\\[ERROR\\] .*ib_buffer_pool' for reading: No such file or directory"); connection node_1; Performing State Transfer on a server that has been shut down cleanly and restarted connection node_1; diff --git a/mysql-test/suite/galera/t/galera_sst_mariabackup_table_options.test b/mysql-test/suite/galera/t/galera_sst_mariabackup_table_options.test index 953a163555977..7a3a6c825c497 100644 --- a/mysql-test/suite/galera/t/galera_sst_mariabackup_table_options.test +++ b/mysql-test/suite/galera/t/galera_sst_mariabackup_table_options.test @@ -66,6 +66,7 @@ COMMIT; --source include/wait_condition.inc --echo Cleaning var directory ... +--remove_file $MYSQLTEST_VARDIR/mysqld.2/data/grastate.dat --remove_files_wildcard $MYSQLTEST_VARDIR/mysqld.2/data/mtr --remove_files_wildcard $MYSQLTEST_VARDIR/mysqld.2/data/performance_schema --remove_files_wildcard $MYSQLTEST_VARDIR/mysqld.2/data/test diff --git a/mysql-test/suite/galera/t/galera_sst_rsync_encrypt_with_capath.cnf b/mysql-test/suite/galera/t/galera_sst_rsync_encrypt_with_capath.cnf new file mode 100644 index 0000000000000..3ab762df013b6 --- /dev/null +++ b/mysql-test/suite/galera/t/galera_sst_rsync_encrypt_with_capath.cnf @@ -0,0 +1,20 @@ +!include ../galera_2nodes.cnf + +[mysqld] +wsrep_sst_method=rsync +ssl-cert=@ENV.MYSQL_TEST_DIR/std_data/server-cert.pem +ssl-key=@ENV.MYSQL_TEST_DIR/std_data/server-key.pem +ssl-capath=@ENV.MYSQL_TEST_DIR/std_data/capath +# We need to turn off the default setting for the duration +# of the test (to test working with a directory instead of +# a file): +ssl-ca= + +[sst] +ssl-mode=VERIFY_CA + +[mysqld.1] +wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcache.size=1;pc.ignore_sb=true' + +[mysqld.2] +wsrep_provider_options='base_port=@mysqld.2.#galera_port;gcache.size=1;pc.ignore_sb=true' diff --git a/mysql-test/suite/galera/t/galera_sst_rsync_encrypt_with_capath.test b/mysql-test/suite/galera/t/galera_sst_rsync_encrypt_with_capath.test new file mode 100644 index 0000000000000..a2d92723ec485 --- /dev/null +++ b/mysql-test/suite/galera/t/galera_sst_rsync_encrypt_with_capath.test @@ -0,0 +1,26 @@ +--source include/big_test.inc +--source include/galera_cluster.inc +--source include/have_debug.inc +--source include/have_stunnel.inc + +# Save original auto_increment_offset values. +--let $node_1=node_1 +--let $node_2=node_2 +--source include/auto_increment_offset_save.inc + +--connection node_1 +--source suite/galera/include/galera_st_shutdown_slave.inc +--source suite/galera/include/galera_st_clean_slave.inc + +--source suite/galera/include/galera_st_kill_slave.inc +--source suite/galera/include/galera_st_kill_slave_ddl.inc + +# Confirm that transfer was SSL-encrypted +--let $assert_text = Using stunnel for SSL encryption +--let $assert_select = Using stunnel for SSL encryption +--let $assert_count = 5 +--let $assert_file = $MYSQLTEST_VARDIR/log/mysqld.1.err +--let $assert_only_after = CURRENT_TEST +--source include/assert_grep.inc + +--source include/auto_increment_offset_restore.inc diff --git a/mysql-test/suite/galera/t/galera_sst_rsync_encrypt_with_key.test b/mysql-test/suite/galera/t/galera_sst_rsync_encrypt_with_key.test index 838c473b9ce12..a2d92723ec485 100644 --- a/mysql-test/suite/galera/t/galera_sst_rsync_encrypt_with_key.test +++ b/mysql-test/suite/galera/t/galera_sst_rsync_encrypt_with_key.test @@ -8,9 +8,6 @@ --let $node_2=node_2 --source include/auto_increment_offset_save.inc ---connection node_2 -CALL mtr.add_suppression("\\[ERROR\\] .*ib_buffer_pool' for reading: No such file or directory"); - --connection node_1 --source suite/galera/include/galera_st_shutdown_slave.inc --source suite/galera/include/galera_st_clean_slave.inc diff --git a/mysql-test/suite/galera/t/galera_sst_rsync_encrypt_with_server.test b/mysql-test/suite/galera/t/galera_sst_rsync_encrypt_with_server.test index 838c473b9ce12..a2d92723ec485 100644 --- a/mysql-test/suite/galera/t/galera_sst_rsync_encrypt_with_server.test +++ b/mysql-test/suite/galera/t/galera_sst_rsync_encrypt_with_server.test @@ -8,9 +8,6 @@ --let $node_2=node_2 --source include/auto_increment_offset_save.inc ---connection node_2 -CALL mtr.add_suppression("\\[ERROR\\] .*ib_buffer_pool' for reading: No such file or directory"); - --connection node_1 --source suite/galera/include/galera_st_shutdown_slave.inc --source suite/galera/include/galera_st_clean_slave.inc diff --git a/mysql-test/suite/galera_3nodes/t/galera_ipv6_mariabackup.test b/mysql-test/suite/galera_3nodes/t/galera_ipv6_mariabackup.test index dc3331d1be375..2bb2bb284e9fa 100644 --- a/mysql-test/suite/galera_3nodes/t/galera_ipv6_mariabackup.test +++ b/mysql-test/suite/galera_3nodes/t/galera_ipv6_mariabackup.test @@ -1,3 +1,4 @@ +--source include/big_test.inc --source include/galera_cluster.inc --source include/check_ipv6.inc --source include/have_innodb.inc diff --git a/mysql-test/suite/galera_3nodes/t/galera_ipv6_mariabackup_section.test b/mysql-test/suite/galera_3nodes/t/galera_ipv6_mariabackup_section.test index c88ff99790c07..86607e61542f4 100644 --- a/mysql-test/suite/galera_3nodes/t/galera_ipv6_mariabackup_section.test +++ b/mysql-test/suite/galera_3nodes/t/galera_ipv6_mariabackup_section.test @@ -1,3 +1,4 @@ +--source include/big_test.inc --source include/galera_cluster.inc --source include/check_ipv6.inc --source include/have_innodb.inc diff --git a/scripts/wsrep_sst_common.sh b/scripts/wsrep_sst_common.sh index dbd639595dfd6..5c84aa7c17f57 100644 --- a/scripts/wsrep_sst_common.sh +++ b/scripts/wsrep_sst_common.sh @@ -19,6 +19,9 @@ set -u +# Setting the path for some utilities on CentOS +export PATH="$PATH:/usr/sbin:/usr/bin:/sbin:/bin" + WSREP_SST_OPT_BYPASS=0 WSREP_SST_OPT_BINLOG="" WSREP_SST_OPT_BINLOG_INDEX="" @@ -384,10 +387,8 @@ case "$1" in skip_mysqld_arg=1 ;; '--innodb-force-recovery') - if [ -n "$value" ]; then - if [ "$value" -ne 0 ]; then - INNODB_FORCE_RECOVERY="$value" - fi + if [ -n "$value" -a "$value" != "0" ]; then + INNODB_FORCE_RECOVERY="$value" fi skip_mysqld_arg=1 ;; @@ -584,7 +585,8 @@ get_binlog() if [ -n "$WSREP_SST_OPT_ADDR_PORT" ]; then if [ -n "$WSREP_SST_OPT_PORT" ]; then if [ "$WSREP_SST_OPT_PORT" != "$WSREP_SST_OPT_ADDR_PORT" ]; then - echo "WSREP_SST: [ERROR] port in --port=$WSREP_SST_OPT_PORT differs from port in --address=$WSREP_SST_OPT_ADDR" >&2 + echo "WSREP_SST: [ERROR] port in --port=$WSREP_SST_OPT_PORT" \ + "differs from port in --address=$WSREP_SST_OPT_ADDR" >&2 exit 2 fi else @@ -616,8 +618,19 @@ fi readonly WSREP_SST_OPT_ADDR readonly WSREP_SST_OPT_ADDR_PORT -# try to use my_print_defaults, mysql and mysqldump that come with the sources -# (for MTR suite) +commandex() +{ + if [ -n "$BASH_VERSION" ]; then + command -v "$1" || : + elif [ -x "$1" ]; then + echo "$1" + else + which "$1" || : + fi +} + +# try to use my_print_defaults, mysql and mysqldump that come +# with the sources (for MTR suite): script_binary=$(dirname "$0") SCRIPTS_DIR=$(cd "$script_binary"; pwd -P) EXTRA_DIR="$SCRIPTS_DIR/../extra" @@ -626,13 +639,13 @@ CLIENT_DIR="$SCRIPTS_DIR/../client" if [ -x "$CLIENT_DIR/mysql" ]; then MYSQL_CLIENT="$CLIENT_DIR/mysql" else - MYSQL_CLIENT="$(command -v mysql)" + MYSQL_CLIENT=$(commandex 'mysql') fi if [ -x "$CLIENT_DIR/mysqldump" ]; then MYSQLDUMP="$CLIENT_DIR/mysqldump" else - MYSQLDUMP="$(command -v mysqldump)" + MYSQLDUMP=$(commandex 'mysqldump') fi wsrep_log() @@ -663,7 +676,7 @@ if [ -x "$SCRIPTS_DIR/my_print_defaults" ]; then elif [ -x "$EXTRA_DIR/my_print_defaults" ]; then MY_PRINT_DEFAULTS="$EXTRA_DIR/my_print_defaults" else - MY_PRINT_DEFAULTS="$(command -v my_print_defaults)" + MY_PRINT_DEFAULTS=$(commandex 'my_print_defaults') if [ -z "$MY_PRINT_DEFAULTS" ]; then wsrep_log_error "my_print_defaults not found in path" exit 2 @@ -673,16 +686,16 @@ fi readonly MY_PRINT_DEFAULTS wsrep_defaults="$WSREP_SST_OPT_DEFAULTS" -wsrep_defaults="$wsrep_defaults${wsrep_defaults:+ }$WSREP_SST_OPT_EXTRA_DEFAULTS" -wsrep_defaults="$wsrep_defaults${wsrep_defaults:+ }$WSREP_SST_OPT_SUFFIX_DEFAULT" +wsrep_defaults="$wsrep_defaults${WSREP_SST_OPT_EXTRA_DEFAULTS:+ }$WSREP_SST_OPT_EXTRA_DEFAULTS" +wsrep_defaults="$wsrep_defaults${WSREP_SST_OPT_SUFFIX_DEFAULT:+ }$WSREP_SST_OPT_SUFFIX_DEFAULT" -readonly WSREP_SST_OPT_CONF="$wsrep_defaults" +readonly WSREP_SST_OPT_CONF="${wsrep_defaults:+ }$wsrep_defaults" wsrep_defaults="$WSREP_SST_OPT_DEFAULT" -wsrep_defaults="$wsrep_defaults${wsrep_defaults:+ }$WSREP_SST_OPT_EXTRA_DEFAULT" -wsrep_defaults="$wsrep_defaults${wsrep_defaults:+ }$WSREP_SST_OPT_SUFFIX_DEFAULT" +wsrep_defaults="$wsrep_defaults${WSREP_SST_OPT_EXTRA_DEFAULT:+ }$WSREP_SST_OPT_EXTRA_DEFAULT" +wsrep_defaults="$wsrep_defaults${WSREP_SST_OPT_SUFFIX_DEFAULT:+ }$WSREP_SST_OPT_SUFFIX_DEFAULT" -readonly WSREP_SST_OPT_CONF_UNQUOTED="$wsrep_defaults" +readonly WSREP_SST_OPT_CONF_UNQUOTED="${wsrep_defaults:+ }$wsrep_defaults" # # User can specify mariabackup specific settings that will be used during sst @@ -819,8 +832,7 @@ if wsrep_auth_not_set; then fi # Splitting WSREP_SST_OPT_AUTH as "user:password" pair: -if ! wsrep_auth_not_set -then +if ! wsrep_auth_not_set; then # Extract username as shortest prefix up to first ':' character: WSREP_SST_OPT_AUTH_USER="${WSREP_SST_OPT_AUTH%%:*}" if [ -z "$WSREP_SST_OPT_USER" ]; then @@ -848,8 +860,7 @@ readonly WSREP_SST_OPT_USER readonly WSREP_SST_OPT_PSWD readonly WSREP_SST_OPT_AUTH -if [ -n "$WSREP_SST_OPT_REMOTE_AUTH" ] -then +if [ -n "$WSREP_SST_OPT_REMOTE_AUTH" ]; then # Split auth string at the last ':' readonly WSREP_SST_OPT_REMOTE_USER="${WSREP_SST_OPT_REMOTE_AUTH%%:*}" readonly WSREP_SST_OPT_REMOTE_PSWD="${WSREP_SST_OPT_REMOTE_AUTH#*:}" @@ -860,8 +871,7 @@ fi readonly WSREP_SST_OPT_REMOTE_AUTH -if [ -n "$WSREP_SST_OPT_DATA" ] -then +if [ -n "$WSREP_SST_OPT_DATA" ]; then SST_PROGRESS_FILE="$WSREP_SST_OPT_DATA/sst_in_progress" else SST_PROGRESS_FILE="" @@ -870,13 +880,14 @@ fi wsrep_cleanup_progress_file() { [ -n "$SST_PROGRESS_FILE" -a \ - -f "$SST_PROGRESS_FILE" ] && rm -f "$SST_PROGRESS_FILE" 2>/dev/null || true + -f "$SST_PROGRESS_FILE" ] && \ + rm -f "$SST_PROGRESS_FILE" 2>/dev/null || : } wsrep_check_program() { local prog="$1" - local cmd=$(command -v "$prog") + local cmd=$(commandex "$prog") if [ -z "$cmd" ]; then echo "'$prog' not found in PATH" return 2 # no such file or directory @@ -898,9 +909,9 @@ wsrep_check_programs() wsrep_check_datadir() { - if [ -z "$WSREP_SST_OPT_DATA" ] - then - wsrep_log_error "The '--datadir' parameter must be passed to the SST script" + if [ -z "$WSREP_SST_OPT_DATA" ]; then + wsrep_log_error \ + "The '--datadir' parameter must be passed to the SST script" exit 2 fi } @@ -912,10 +923,10 @@ get_openssl() return fi # Let's look for openssl: - OPENSSL_BINARY="$(command -v openssl)" + OPENSSL_BINARY=$(commandex 'openssl') if [ -z "$OPENSSL_BINARY" ]; then OPENSSL_BINARY='/usr/bin/openssl' - if [ -z "$OPENSSL_BINARY" ]; then + if [ ! -x "$OPENSSL_BINARY" ]; then OPENSSL_BINARY="" fi fi @@ -928,13 +939,12 @@ get_openssl() wsrep_gen_secret() { get_openssl - if [ -n "$OPENSSL_BINARY" ] - then + if [ -n "$OPENSSL_BINARY" ]; then echo $("$OPENSSL_BINARY" rand -hex 16) else printf "%04x%04x%04x%04x%04x%04x%04x%04x" \ - $RANDOM $RANDOM $RANDOM $RANDOM \ - $RANDOM $RANDOM $RANDOM $RANDOM + $RANDOM $RANDOM $RANDOM $RANDOM \ + $RANDOM $RANDOM $RANDOM $RANDOM fi } @@ -968,14 +978,14 @@ is_local_ip() fi # Now let's check if the given address is assigned to # one of the network cards: - local ip_util="$(command -v ip)" + local ip_util=$(commandex 'ip') if [ -n "$ip_util" ]; then # ip address show ouput format is " inet[6]
/": "$ip_util" address show \ | grep -E "^[[:space:]]*inet.? [^[:space:]]+/" -o \ | grep -F " $1/" >/dev/null && return 0 else - local ifconfig_util="$(command -v ifconfig)" + local ifconfig_util=$(commandex 'ifconfig') if [ -n "$ifconfig_util" ]; then # ifconfig output format is " inet[6]
...": "$ifconfig_util" \ @@ -992,15 +1002,15 @@ check_sockets_utils() sockstat_available=0 ss_available=0 - [ -n "$(command -v lsof)" ] && lsof_available=1 - [ -n "$(command -v sockstat)" ] && sockstat_available=1 - [ -n "$(command -v ss)" ] && ss_available=1 + [ -n "$(commandex lsof)" ] && lsof_available=1 + [ -n "$(commandex sockstat)" ] && sockstat_available=1 + [ -n "$(commandex ss)" ] && ss_available=1 if [ $lsof_available -eq 0 -a \ $sockstat_available -eq 0 -a \ $ss_available -eq 0 ] then - wsrep_log_error "Neither lsof, nor sockstat or ss tool was found in " \ + wsrep_log_error "Neither lsof, nor sockstat or ss tool was found in" \ "the PATH. Make sure you have it installed." exit 2 # ENOENT fi @@ -1085,26 +1095,38 @@ check_for_dhparams() # verify_ca_matches_cert() { - local ca="$1" - local cert="$2" - local path=${3:-0} + local cert="$1" + local ca="$2" + local cap="$3" # If the openssl utility is not installed, then # we will not do this certificate check: get_openssl if [ -z "$OPENSSL_BINARY" ]; then + wsrep_log_info "openssl utility not found" return fi - local not_match=0 + local readable=1; [ ! -r "$cert" ] && readable=0 + [ -n "$ca" ] && [ ! -r "$ca" ] && readable=0 + [ -n "$cap" ] && [ ! -r "$cap" ] && readable=0 - if [ $path -eq 0 ]; then - "$OPENSSL_BINARY" verify -verbose -CAfile "$ca" "$cert" >/dev/null 2>&1 || not_match=1 - else - "$OPENSSL_BINARY" verify -verbose -CApath "$ca" "$cert" >/dev/null 2>&1 || not_match=1 + if [ readable -eq 0 ]; then + wsrep_log_error \ + "Both PEM file and CA file (or path) must be readable" + exit 22 fi + local not_match=0 + local errmsg + errmsg=$("$OPENSSL_BINARY" verify -verbose \ + ${ca:+ -CAfile} ${ca:+ "$ca"} \ + ${cap:+ -CApath} ${cap:+ "$cap"} \ + "$cert" 2>&1) || not_match=1 + if [ $not_match -eq 1 ]; then + wsrep_log_info "run: \"$OPENSSL_BINARY\" verify -verbose${ca:+ -CAfile \"$ca\"}${cap:+ -CApath \"$cap\"} \"$cert\"" + wsrep_log_info "output: $errmsg" wsrep_log_error "******** FATAL ERROR ********************************************" wsrep_log_error "* The certifcate and CA (certificate authority) do not match. *" wsrep_log_error "* It does not appear that the certificate was issued by the CA. *" @@ -1124,12 +1146,18 @@ verify_ca_matches_cert() # verify_cert_matches_key() { - local cert_path="$1" - local key_path="$2" + local cert="$1" + local key="$2" + + if [ ! -r "$key" -o ! -r "$cert" ]; then + wsrep_log_error "Both the certificate file and the key file" \ + "must be readable" + exit 22 + fi # If the diff utility is not installed, then # we will not do this certificate check: - if [ -z "$(command -v diff)" ]; then + if [ -z "$(commandex diff)" ]; then return fi @@ -1142,13 +1170,13 @@ verify_cert_matches_key() # Generate the public key from the cert and the key. # They should match (otherwise we can't create an SSL connection). - if ! diff <("$OPENSSL_BINARY" x509 -in "$cert_path" -pubkey -noout 2>/dev/null) \ - <("$OPENSSL_BINARY" pkey -in "$key_path" -pubout 2>/dev/null) >/dev/null 2>&1 + if ! diff <("$OPENSSL_BINARY" x509 -in "$cert" -pubkey -noout 2>/dev/null) \ + <("$OPENSSL_BINARY" pkey -in "$key" -pubout 2>/dev/null) >/dev/null 2>&1 then - wsrep_log_error "******************* FATAL ERROR ****************" - wsrep_log_error "* The certifcate and private key do not match. *" - wsrep_log_error "* Please check your certificate and key files. *" - wsrep_log_error "************************************************" + wsrep_log_error "******************* FATAL ERROR *****************" + wsrep_log_error "* The certificate and private key do not match. *" + wsrep_log_error "* Please check your certificate and key files. *" + wsrep_log_error "*************************************************" exit 22 fi } @@ -1305,9 +1333,9 @@ get_proc() elif [ "$OS" = 'Darwin' -o "$OS" = 'FreeBSD' ]; then nproc=$(sysctl -n hw.ncpu) fi + set -e if [ -z "$nproc" ] || [ $nproc -eq 0 ]; then nproc=1 fi - set -e fi } diff --git a/scripts/wsrep_sst_mariabackup.sh b/scripts/wsrep_sst_mariabackup.sh index b429a9effd562..4bca785fcadb0 100644 --- a/scripts/wsrep_sst_mariabackup.sh +++ b/scripts/wsrep_sst_mariabackup.sh @@ -20,10 +20,11 @@ # https://mariadb.com/kb/en/mariabackup-overview/ # Make sure to read that before proceeding! +OS="$(uname)" + . $(dirname "$0")/wsrep_sst_common wsrep_check_datadir -OS="$(uname)" ealgo="" eformat="" ekey="" @@ -34,7 +35,7 @@ ssyslog="" ssystag="" BACKUP_PID="" tcert="" -tpath=0 +tcap="" tpem="" tkey="" tmode="DISABLED" @@ -88,14 +89,14 @@ readonly SECRET_TAG="secret" # For backup locks it is 1 sent by joiner sst_ver=1 -if [ -n "$(command -v pv)" ] && pv --help | grep -qw -- '-F'; then +if [ -n "$(commandex pv)" ] && pv --help | grep -qw -- '-F'; then pvopts="$pvopts $pvformat" fi pcmd="pv $pvopts" declare -a RC -BACKUP_BIN="$(command -v mariabackup)" -if [ ! -x "$BACKUP_BIN" ]; then +BACKUP_BIN=$(commandex 'mariabackup') +if [ -z "$BACKUP_BIN" ]; then wsrep_log_error 'mariabackup binary not found in path' exit 42 fi @@ -145,14 +146,14 @@ get_keys() if [ $encrypt -eq 0 ]; then if [ -n "$ealgo" -o -n "$ekey" -o -n "$ekeyfile" ]; then - wsrep_log_error "Options for encryption are specified, " \ + wsrep_log_error "Options for encryption are specified," \ "but encryption itself is disabled. SST may fail." fi return fi if [ $sfmt = 'tar' ]; then - wsrep_log_info "NOTE: key-based encryption (encrypt=1) " \ + wsrep_log_info "NOTE: key-based encryption (encrypt=1)" \ "cannot be enabled with tar format" encrypt=-1 return @@ -165,16 +166,18 @@ get_keys() exit 3 fi - if [ -z "$ekey" -a ! -r "$ekeyfile" ]; then - wsrep_log_error "FATAL: Either key must be specified " \ - "or keyfile must be readable" - exit 3 + if [ -z "$ekey" ]; then + if [ ! -r "$ekeyfile" ]; then + wsrep_log_error "FATAL: Either key must be specified" \ + "or keyfile must be readable" + exit 3 + fi fi if [ "$eformat" = 'openssl' ]; then get_openssl if [ -z "$OPENSSL_BINARY" ]; then - wsrep_log_error "If encryption using the openssl is enabled, " \ + wsrep_log_error "If encryption using the openssl is enabled," \ "then you need to install openssl" exit 2 fi @@ -192,12 +195,12 @@ get_keys() ecmd="$ecmd -k '$ekey'" fi elif [ "$eformat" = 'xbcrypt' ]; then - if [ -z "$(command -v xbcrypt)" ]; then - wsrep_log_error "If encryption using the xbcrypt is enabled, " \ + if [ -z "$(commandex xbcrypt)" ]; then + wsrep_log_error "If encryption using the xbcrypt is enabled," \ "then you need to install xbcrypt" exit 2 fi - wsrep_log_info "NOTE: xbcrypt-based encryption, " \ + wsrep_log_info "NOTE: xbcrypt-based encryption," \ "supported only from Xtrabackup 2.1.4" if [ -z "$ekey" ]; then ecmd="xbcrypt --encrypt-algo='$ealgo' --encrypt-key-file='$ekeyfile'" @@ -342,40 +345,34 @@ get_transfer() CN_option=",commonname=''" if [ $encrypt -eq 2 ]; then - wsrep_log_info "Using openssl based encryption with socat: with crt and pem" - if [ -z "$tpem" -o -z "$tcert" ]; then + wsrep_log_info \ + "Using openssl based encryption with socat: with crt and pem" + if [ -z "$tpem" -o -z "$tcert$tcap" ]; then wsrep_log_error \ "Both PEM file and CRT file (or path) are required" exit 22 fi - if [ ! -r "$tpem" -o ! -r "$tcert" ]; then - wsrep_log_error \ - "Both PEM file and CRT file (or path) must be readable" - exit 22 + verify_ca_matches_cert "$tpem" "$tcert" "$tcap" + tcmd="$tcmd,cert='$tpem'" + if [ -n "$tcert" ]; then + tcmd="$tcmd,cafile='$tcert'" fi - verify_ca_matches_cert "$tcert" "$tpem" $tpath - if [ $tpath -eq 0 ]; then - tcmd="$tcmd,cert='$tpem',cafile='$tcert'" - else - tcmd="$tcmd,cert='$tpem',capath='$tcert'" + if [ -n "$tcap" ]; then + tcmd="$tcmd,capath='$tcap'" fi stagemsg="$stagemsg-OpenSSL-Encrypted-2" - wsrep_log_info "$action with cert=$tpem, ca=$tcert" + wsrep_log_info "$action with cert='$tpem', ca='$tcert', capath='$tcap'" elif [ $encrypt -eq 3 -o $encrypt -eq 4 ]; then - wsrep_log_info "Using openssl based encryption with socat: with key and crt" + wsrep_log_info \ + "Using openssl based encryption with socat: with key and crt" if [ -z "$tpem" -o -z "$tkey" ]; then - wsrep_log_error "Both certificate file (or path) " \ - "and key file are required" - exit 22 - fi - if [ ! -r "$tpem" -o ! -r "$tkey" ]; then - wsrep_log_error "Both certificate file (or path) " \ - "and key file must be readable" + wsrep_log_error "Both the certificate file (or path) and" \ + "the key file are required" exit 22 fi verify_cert_matches_key "$tpem" "$tkey" stagemsg="$stagemsg-OpenSSL-Encrypted-3" - if [ -z "$tcert" ]; then + if [ -z "$tcert$tcap" ]; then if [ $encrypt -eq 4 ]; then wsrep_log_error \ "Peer certificate file (or path) required if encrypt=4" @@ -384,14 +381,11 @@ get_transfer() # no verification CN_option="" tcmd="$tcmd,cert='$tpem',key='$tkey',verify=0" - wsrep_log_info "$action with cert=$tpem, key=$tkey, verify=0" + wsrep_log_info \ + "$action with cert='$tpem', key='$tkey', verify=0" else # CA verification - if [ ! -r "$tcert" ]; then - wsrep_log_error "Certificate file or path must be readable" - exit 22 - fi - verify_ca_matches_cert "$tcert" "$tpem" $tpath + verify_ca_matches_cert "$tpem" "$tcert" "$tcap" if [ -n "$WSREP_SST_OPT_REMOTE_USER" ]; then CN_option=",commonname='$WSREP_SST_OPT_REMOTE_USER'" elif [ "$WSREP_SST_OPT_ROLE" = 'joiner' -o $encrypt -eq 4 ] @@ -402,12 +396,15 @@ get_transfer() else CN_option=",commonname='$WSREP_SST_OPT_HOST_UNESCAPED'" fi - if [ $tpath -eq 0 ]; then - tcmd="$tcmd,cert='$tpem',key='$tkey',cafile='$tcert'" - else - tcmd="$tcmd,cert='$tpem',key='$tkey',capath='$tcert'" + tcmd="$tcmd,cert='$tpem',key='$tkey'" + if [ -n "$tcert" ]; then + tcmd="$tcmd,cafile='$tcert'" + fi + if [ -n "$tcap" ]; then + tcmd="$tcmd,capath='$tcap'" fi - wsrep_log_info "$action with cert=$tpem, key=$tkey, ca=$tcert" + wsrep_log_info "$action with cert='$tpem', key='$tkey'," \ + "ca='$tcert', capath='$tcap'" fi else wsrep_log_info "Unknown encryption mode: encrypt=$encrypt" @@ -425,7 +422,9 @@ get_transfer() get_footprint() { pushd "$WSREP_SST_OPT_DATA" 1>/dev/null - payload=$(find . -regex '.*\.ibd$\|.*\.MYI$\|.*\.MYD$\|.*ibdata1$' -type f -print0 | du --files0-from=- --block-size=1 -c -s | awk 'END { print $1 }') + payload=$(find . -regex '.*\.ibd$\|.*\.MYI$\|.*\.MYD$\|.*ibdata1$' \ + -type f -print0 | du --files0-from=- --block-size=1 -c -s | \ + awk 'END { print $1 }') if [ "$compress" != 'none' ]; then # QuickLZ has around 50% compression ratio # When compression/compaction used, the progress is only an approximate. @@ -438,7 +437,7 @@ get_footprint() adjust_progress() { - if [ -z "$(command -v pv)" ]; then + if [ -z "$(commandex pv)" ]; then wsrep_log_error "pv not found in path: $PATH" wsrep_log_error "Disabling all progress/rate-limiting" pcmd="" @@ -470,33 +469,42 @@ check_server_ssl_config() { # backward-compatible behavior: tcert=$(parse_cnf 'sst' 'tca') + tcap=$(parse_cnf 'sst' 'tcapath') tpem=$(parse_cnf 'sst' 'tcert') tkey=$(parse_cnf 'sst' 'tkey') # reading new ssl configuration options: local tcert2=$(parse_cnf "$encgroups" 'ssl-ca') + local tcap2=$(parse_cnf "$encgroups" 'ssl-capath') local tpem2=$(parse_cnf "$encgroups" 'ssl-cert') local tkey2=$(parse_cnf "$encgroups" 'ssl-key') # if there are no old options, then we take new ones: - if [ -z "$tcert" -a -z "$tpem" -a -z "$tkey" ]; then + if [ -z "$tcert" -a -z "$tcap" -a -z "$tpem" -a -z "$tkey" ]; then tcert="$tcert2" + tcap="$tcap2" tpem="$tpem2" tkey="$tkey2" # checking for presence of the new-style SSL configuration: - elif [ -n "$tcert2" -o -n "$tpem2" -o -n "$tkey2" ]; then + elif [ -n "$tcert2" -o -n "$tcap2" -o -n "$tpem2" -o -n "$tkey2" ]; then if [ "$tcert" != "$tcert2" -o \ + "$tcap" != "$tcap2" -o \ "$tpem" != "$tpem2" -o \ "$tkey" != "$tkey2" ] then - wsrep_log_info "new ssl configuration options (ssl-ca, ssl-cert " \ - "and ssl-key) are ignored by SST due to presence " \ - "of the tca, tcert and/or tkey in the [sst] section" + wsrep_log_info \ + "new ssl configuration options (ssl-ca[path], ssl-cert" \ + "and ssl-key) are ignored by SST due to presence" \ + "of the tca[path], tcert and/or tkey in the [sst] section" fi fi if [ -n "$tcert" ]; then - tcert=$(trim_string "$tcert") - if [ "${tcert%/}" != "$tcert" ]; then - tpath=1 - fi + tcert=$(trim_string "$tcert") + if [ "${tcert%/}" != "$tcert" ] || [ -d "$tcert" ]; then + tcap="$tcert" + tcert="" + fi + fi + if [ -n "$tcap" ]; then + tcap=$(trim_string "$tcap") fi } @@ -506,10 +514,10 @@ read_cnf() tfmt=$(parse_cnf sst transferfmt 'socat') encrypt=$(parse_cnf "$encgroups" 'encrypt' 0) - tmode=$(parse_cnf "$encgroups" 'ssl-mode' 'DISABLED' | tr [:lower:] [:upper:]) + tmode=$(parse_cnf "$encgroups" 'ssl-mode' 'DISABLED' | \ + tr [:lower:] [:upper:]) - if [ $encrypt -eq 0 -o $encrypt -ge 2 ] - then + if [ $encrypt -eq 0 -o $encrypt -ge 2 ]; then if [ "$tmode" != 'DISABLED' -o $encrypt -ge 2 ]; then check_server_ssl_config fi @@ -517,11 +525,13 @@ read_cnf() if [ 0 -eq $encrypt -a -n "$tpem" -a -n "$tkey" ] then encrypt=3 # enable cert/key SSL encyption - # avoid CA verification if not set explicitly: - # nodes may happen to have different CA if self-generated - # zeroing up tcert does the trick - [ "${tmode#VERIFY}" != "$tmode" ] || tcert="" + # nodes may happen to have different CA if self-generated, + # zeroing up tcert and tcap does the trick: + if [ "${tmode#VERIFY}" = "$tmode" ]; then + tcert="" + tcap="" + fi fi fi elif [ $encrypt -eq 1 ]; then @@ -535,8 +545,9 @@ read_cnf() fi fi - wsrep_log_info "SSL configuration: CA='$tcert', CERT='$tpem'," \ - "KEY='$tkey', MODE='$tmode', encrypt='$encrypt'" + wsrep_log_info "SSL configuration: CA='$tcert', CAPATH='$tcap'," \ + "CERT='$tpem', KEY='$tkey', MODE='$tmode'," \ + "encrypt='$encrypt'" sockopt=$(parse_cnf sst sockopt "") progress=$(parse_cnf sst progress "") @@ -561,7 +572,8 @@ read_cnf() sstlogarchivedir=$(parse_cnf sst sst-log-archive-dir '/tmp/sst_log_archive') if [ $speciald -eq 0 ]; then - wsrep_log_error "sst-special-dirs equal to 0 is not supported, falling back to 1" + wsrep_log_error \ + "sst-special-dirs equal to 0 is not supported, falling back to 1" speciald=1 fi @@ -589,7 +601,7 @@ get_stream() { if [ "$sfmt" = 'mbstream' -o "$sfmt" = 'xbstream' ]; then sfmt='mbstream' - STREAM_BIN="$(command -v mbstream)" + local STREAM_BIN=$(commandex "$sfmt") if [ -z "$STREAM_BIN" ]; then wsrep_log_error "Streaming with $sfmt, but $sfmt not found in path" exit 42 @@ -621,7 +633,7 @@ cleanup_at_exit() # Since this is invoked just after exit NNN local estatus=$? if [ $estatus -ne 0 ]; then - wsrep_log_error "Cleanup after exit with status:$estatus" + wsrep_log_error "Cleanup after exit with status: $estatus" fi if [ "$WSREP_SST_OPT_ROLE" = 'joiner' ]; then @@ -630,7 +642,8 @@ cleanup_at_exit() else if [ -n "$BACKUP_PID" ]; then if check_pid "$BACKUP_PID" 1; then - wsrep_log_error "mariabackup process is still running. Killing..." + wsrep_log_error \ + "mariabackup process is still running. Killing..." cleanup_pid $CHECK_PID "$BACKUP_PID" fi fi @@ -638,8 +651,8 @@ cleanup_at_exit() fi if [ -n "$progress" -a -p "$progress" ]; then - wsrep_log_info "Cleaning up fifo file $progress" - rm -f "$progress" || true + wsrep_log_info "Cleaning up fifo file: $progress" + rm -f "$progress" || : fi wsrep_log_info "Cleaning up temporary directories" @@ -649,8 +662,8 @@ cleanup_at_exit() [ -d "$STATDIR" ] && rm -rf "$STATDIR" fi else - [ -n "$xtmpdir" -a -d "$xtmpdir" ] && rm -rf "$xtmpdir" || true - [ -n "$itmpdir" -a -d "$itmpdir" ] && rm -rf "$itmpdir" || true + [ -n "$xtmpdir" -a -d "$xtmpdir" ] && rm -rf "$xtmpdir" || : + [ -n "$itmpdir" -a -d "$itmpdir" ] && rm -rf "$itmpdir" || : fi # Final cleanup @@ -662,7 +675,7 @@ cleanup_at_exit() # This means a signal was delivered to the process. # So, more cleanup. if [ $estatus -ge 128 ]; then - kill -KILL -- -$$ || true + kill -KILL -- -$$ || : fi fi @@ -738,7 +751,7 @@ recv_joiner() local ltcmd="$tcmd" if [ $tmt -gt 0 ]; then - if [ -n "$(command -v timeout)" ]; then + if [ -n "$(commandex timeout)" ]; then if timeout --help | grep -qw -- '-k'; then ltcmd="timeout -k $(( tmt+10 )) $tmt $tcmd" else @@ -760,14 +773,14 @@ recv_joiner() popd 1>/dev/null if [ ${RC[0]} -eq 124 ]; then - wsrep_log_error "Possible timeout in receiving first data from " \ + wsrep_log_error "Possible timeout in receiving first data from" \ "donor in gtid stage: exit codes: ${RC[@]}" exit 32 fi for ecode in "${RC[@]}"; do if [ $ecode -ne 0 ]; then - wsrep_log_error "Error while getting data from donor node: " \ + wsrep_log_error "Error while getting data from donor node:" \ "exit codes: ${RC[@]}" exit 32 fi @@ -776,7 +789,7 @@ recv_joiner() if [ $checkf -eq 1 ]; then if [ ! -r "$MAGIC_FILE" ]; then # this message should cause joiner to abort - wsrep_log_error "receiving process ended without creating " \ + wsrep_log_error "receiving process ended without creating" \ "'$MAGIC_FILE'" wsrep_log_info "Contents of datadir" wsrep_log_info $(ls -l "$dir/"*) @@ -784,10 +797,11 @@ recv_joiner() fi # check donor supplied secret - SECRET=$(grep -F -- "$SECRET_TAG " "$MAGIC_FILE" 2>/dev/null | cut -d ' ' -f 2) + SECRET=$(grep -F -- "$SECRET_TAG " "$MAGIC_FILE" 2>/dev/null | \ + cut -d ' ' -f 2) if [ "$SECRET" != "$MY_SECRET" ]; then wsrep_log_error "Donor does not know my secret!" - wsrep_log_info "Donor:'$SECRET', my:'$MY_SECRET'" + wsrep_log_info "Donor: '$SECRET', my: '$MY_SECRET'" exit 32 fi @@ -810,7 +824,7 @@ send_donor() for ecode in "${RC[@]}"; do if [ $ecode -ne 0 ]; then - wsrep_log_error "Error while sending data to joiner node: " \ + wsrep_log_error "Error while sending data to joiner node:" \ "exit codes: ${RC[@]}" exit 32 fi @@ -823,7 +837,9 @@ monitor_process() while true ; do if ! ps -p "$WSREP_SST_OPT_PARENT" >/dev/null 2>&1; then - wsrep_log_error "Parent mysqld process (PID: $WSREP_SST_OPT_PARENT) terminated unexpectedly." + wsrep_log_error \ + "Parent mysqld process (PID: $WSREP_SST_OPT_PARENT)" \ + "terminated unexpectedly." kill -- -"$WSREP_SST_OPT_PARENT" exit 32 fi @@ -845,7 +861,7 @@ read_cnf setup_ports if "$BACKUP_BIN" --help 2>/dev/null | grep -qw -- '--version-check'; then - disver='--no-version-check' + disver=' --no-version-check' fi # if no command line argument and INNODB_DATA_HOME_DIR environment variable @@ -867,7 +883,7 @@ INNODB_DATA_HOME_DIR=$(pwd -P) cd "$OLD_PWD" if [ $ssyslog -eq 1 ]; then - if [ -n "$(command -v logger)" ]; then + if [ -n "$(commandex logger)" ]; then wsrep_log_info "Logging all stderr of SST/mariabackup to syslog" exec 2> >(logger -p daemon.err -t ${ssystag}wsrep-sst-$WSREP_SST_OPT_ROLE) @@ -898,10 +914,8 @@ else fi fi - if [ -e "$INNOAPPLYLOG" ] - then - if [ -n "$sstlogarchivedir" ] - then + if [ -e "$INNOAPPLYLOG" ]; then + if [ -n "$sstlogarchivedir" ]; then newfile=$(basename "$INNOAPPLYLOG") newfile="$sstlogarchivedir/$newfile.$ARCHIVETIMESTAMP" else @@ -912,10 +926,8 @@ else gzip "$newfile" fi - if [ -e "$INNOMOVELOG" ] - then - if [ -n "$sstlogarchivedir" ] - then + if [ -e "$INNOMOVELOG" ]; then + if [ -n "$sstlogarchivedir" ]; then newfile=$(basename "$INNOMOVELOG") newfile="$sstlogarchivedir/$newfile.$ARCHIVETIMESTAMP" else @@ -926,10 +938,8 @@ else gzip "$newfile" fi - if [ -e "$INNOBACKUPLOG" ] - then - if [ -n "$sstlogarchivedir" ] - then + if [ -e "$INNOBACKUPLOG" ]; then + if [ -n "$sstlogarchivedir" ]; then newfile=$(basename "$INNOBACKUPLOG") newfile="$sstlogarchivedir/$newfile.$ARCHIVETIMESTAMP" else @@ -949,15 +959,15 @@ setup_commands() { local mysqld_args="" if [ -n "$WSREP_SST_OPT_MYSQLD" ]; then - mysqld_args="--mysqld-args $WSREP_SST_OPT_MYSQLD" + mysqld_args=" --mysqld-args $WSREP_SST_OPT_MYSQLD" fi - if [ -z "$INNODB_FORCE_RECOVERY" ]; then - INNOAPPLY="$BACKUP_BIN --prepare $disver $iapts $INNOEXTRA --target-dir='$DATA' --datadir='$DATA' $mysqld_args $INNOAPPLY" - else - INNOAPPLY="$BACKUP_BIN --prepare $disver $iapts $INNOEXTRA --innodb-force-recovery=$INNODB_FORCE_RECOVERY --target-dir='$DATA' --datadir='$DATA' $mysqld_args $INNOAPPLY" + local recovery="" + if [ -n "$INNODB_FORCE_RECOVERY" ]; then + recovery=" --innodb-force-recovery=$INNODB_FORCE_RECOVERY" fi - INNOMOVE="$BACKUP_BIN $WSREP_SST_OPT_CONF --move-back $disver $impts --force-non-empty-directories --target-dir='$DATA' --datadir='${TDATA:-$DATA}' $INNOMOVE" - INNOBACKUP="$BACKUP_BIN $WSREP_SST_OPT_CONF --backup $disver $iopts $tmpopts $INNOEXTRA --galera-info --stream=$sfmt --target-dir='$itmpdir' --datadir='$DATA' $mysqld_args $INNOBACKUP" + INNOAPPLY="$BACKUP_BIN --prepare$disver$recovery${iapts:+ }$iapts$INNOEXTRA --target-dir='$DATA' --datadir='$DATA'$mysqld_args $INNOAPPLY" + INNOMOVE="$BACKUP_BIN$WSREP_SST_OPT_CONF --move-back$disver${impts:+ }$impts --force-non-empty-directories --target-dir='$DATA' --datadir='${TDATA:-$DATA}' $INNOMOVE" + INNOBACKUP="$BACKUP_BIN$WSREP_SST_OPT_CONF --backup$disver${iopts:+ }$iopts $tmpopts$INNOEXTRA --galera-info --stream=$sfmt --target-dir='$itmpdir' --datadir='$DATA'$mysqld_args $INNOBACKUP" } get_stream @@ -1055,27 +1065,28 @@ then tcmd="$ecmd | $tcmd" fi - iopts="--databases-exclude='lost+found' $iopts" + iopts="--databases-exclude='lost+found'${iopts:+ }$iopts" if [ ${FORCE_FTWRL:-0} -eq 1 ]; then - wsrep_log_info "Forcing FTWRL due to environment variable FORCE_FTWRL equal to $FORCE_FTWRL" - iopts="--no-backup-locks $iopts" + wsrep_log_info "Forcing FTWRL due to environment variable" \ + "FORCE_FTWRL equal to $FORCE_FTWRL" + iopts="--no-backup-locks${iopts:+ }$iopts" fi # if compression is enabled for backup files, then add the # appropriate options to the mariabackup command line: if [ "$compress" != 'none' ]; then - iopts="--compress${compress:+=$compress} $iopts" + iopts="--compress${compress:+=$compress}${iopts:+ }$iopts" if [ -n "$compress_threads" ]; then - iopts="--compress-threads=$compress_threads $iopts" + iopts="--compress-threads=$compress_threads${iopts:+ }$iopts" fi if [ -n "$compress_chunk" ]; then - iopts="--compress-chunk-size=$compress_chunk $iopts" + iopts="--compress-chunk-size=$compress_chunk${iopts:+ }$iopts" fi fi if [ -n "$backup_threads" ]; then - iopts="--parallel=$backup_threads $iopts" + iopts="--parallel=$backup_threads${iopts:+ }$iopts" fi setup_commands @@ -1084,7 +1095,7 @@ then set -e if [ ${RC[0]} -ne 0 ]; then - wsrep_log_error "mariabackup finished with error: ${RC[0]}. " \ + wsrep_log_error "mariabackup finished with error: ${RC[0]}." \ "Check syslog or '$INNOBACKUPLOG' for details" exit 22 elif [ ${RC[$(( ${#RC[@]}-1 ))]} -eq 1 ]; then @@ -1125,7 +1136,8 @@ then elif [ "$WSREP_SST_OPT_ROLE" = 'joiner' ] then - [ -e "$SST_PROGRESS_FILE" ] && wsrep_log_info "Stale sst_in_progress file: $SST_PROGRESS_FILE" + [ -e "$SST_PROGRESS_FILE" ] && \ + wsrep_log_info "Stale sst_in_progress file: $SST_PROGRESS_FILE" [ -n "$SST_PROGRESS_FILE" ] && touch "$SST_PROGRESS_FILE" ib_home_dir="$INNODB_DATA_HOME_DIR" @@ -1146,7 +1158,7 @@ then ib_undo_dir="$INNODB_UNDO_DIR" if [ -n "$backup_threads" ]; then - impts="--parallel=$backup_threads $impts" + impts="--parallel=$backup_threads${impts:+ }$impts" fi stagemsg='Joiner-Recv' @@ -1165,15 +1177,15 @@ then ADDR="$WSREP_SST_OPT_ADDR" - if [ "${tmode#VERIFY}" != "$tmode" ] - then # backward-incompatible behavior + if [ "${tmode#VERIFY}" != "$tmode" ]; then + # backward-incompatible behavior: CN="" - if [ -n "$tpem" ] - then + if [ -n "$tpem" ]; then # find out my Common Name get_openssl if [ -z "$OPENSSL_BINARY" ]; then - wsrep_log_error 'openssl not found but it is required for authentication' + wsrep_log_error \ + 'openssl not found but it is required for authentication' exit 42 fi CN=$("$OPENSSL_BINARY" x509 -noout -subject -in "$tpem" | \ @@ -1213,15 +1225,17 @@ then if ! ps -p "$WSREP_SST_OPT_PARENT" >/dev/null 2>&1 then - wsrep_log_error "Parent mysqld process (PID: $WSREP_SST_OPT_PARENT) terminated unexpectedly." + wsrep_log_error "Parent mysqld process (PID: $WSREP_SST_OPT_PARENT)" \ + "terminated unexpectedly." exit 32 fi - if [ ! -r "$STATDIR/$IST_FILE" ] - then + if [ ! -r "$STATDIR/$IST_FILE" ]; then if [ -d "$DATA/.sst" ]; then - wsrep_log_info "WARNING: Stale temporary SST directory: '$DATA/.sst' from previous state transfer. Removing" + wsrep_log_info \ + "WARNING: Stale temporary SST directory:" \ + "'$DATA/.sst' from previous state transfer, removing..." rm -rf "$DATA/.sst" fi mkdir -p "$DATA/.sst" @@ -1229,17 +1243,20 @@ then jpid=$! wsrep_log_info "Proceeding with SST" - wsrep_log_info "Cleaning the existing datadir and innodb-data/log directories" + wsrep_log_info \ + "Cleaning the existing datadir and innodb-data/log directories" if [ "$OS" = 'FreeBSD' ]; then find -E ${ib_home_dir:+"$ib_home_dir"} \ ${ib_undo_dir:+"$ib_undo_dir"} \ ${ib_log_dir:+"$ib_log_dir"} \ - "$DATA" -mindepth 1 -prune -regex "$cpat" -o -exec rm -rfv {} 1>&2 \+ + "$DATA" -mindepth 1 -prune -regex "$cpat" \ + -o -exec rm -rfv {} 1>&2 \+ else find ${ib_home_dir:+"$ib_home_dir"} \ ${ib_undo_dir:+"$ib_undo_dir"} \ ${ib_log_dir:+"$ib_log_dir"} \ - "$DATA" -mindepth 1 -prune -regex "$cpat" -o -exec rm -rfv {} 1>&2 \+ + "$DATA" -mindepth 1 -prune -regex "$cpat" \ + -o -exec rm -rfv {} 1>&2 \+ fi get_binlog @@ -1248,9 +1265,9 @@ then binlog_dir=$(dirname "$WSREP_SST_OPT_BINLOG") cd "$binlog_dir" wsrep_log_info "Cleaning the binlog directory $binlog_dir as well" - rm -fv "$WSREP_SST_OPT_BINLOG".[0-9]* 1>&2 \+ || true + rm -fv "$WSREP_SST_OPT_BINLOG".[0-9]* 1>&2 \+ || : [ -f "$WSREP_SST_OPT_BINLOG_INDEX" ] && \ - rm -fv "$WSREP_SST_OPT_BINLOG_INDEX" 1>&2 \+ || true + rm -fv "$WSREP_SST_OPT_BINLOG_INDEX" 1>&2 \+ || : cd "$OLD_PWD" fi @@ -1262,7 +1279,8 @@ then monitor_process $jpid if [ ! -s "$DATA/xtrabackup_checkpoints" ]; then - wsrep_log_error "xtrabackup_checkpoints missing, failed mariabackup/SST on donor" + wsrep_log_error "xtrabackup_checkpoints missing," \ + "failed mariabackup/SST on donor" exit 2 fi @@ -1277,7 +1295,7 @@ then if [ -n "$qpfiles" ]; then wsrep_log_info "Compressed qpress files found" - if [ -z "$(command -v qpress)" ]; then + if [ -z "$(commandex qpress)" ]; then wsrep_log_error "qpress utility not found in the path" exit 22 fi @@ -1300,14 +1318,17 @@ then # Decompress the qpress files wsrep_log_info "Decompression with $nproc threads" - timeit "Joiner-Decompression" "find '$DATA' -type f -name '*.qp' -printf '%p\n%h\n' | $dcmd" + timeit "Joiner-Decompression" \ + "find '$DATA' -type f -name '*.qp' -printf '%p\n%h\n' | $dcmd" extcode=$? if [ $extcode -eq 0 ]; then wsrep_log_info "Removing qpress files after decompression" find "$DATA" -type f -name '*.qp' -delete if [ $? -ne 0 ]; then - wsrep_log_error "Something went wrong with deletion of qpress files. Investigate" + wsrep_log_error \ + "Something went wrong with deletion of qpress files." \ + "Investigate" fi else wsrep_log_error "Decompression failed. Exit code: $extcode" @@ -1321,7 +1342,7 @@ then BINLOG_FILENAME=$(basename "$WSREP_SST_OPT_BINLOG") # To avoid comparing data directory and BINLOG_DIRNAME - mv "$DATA/$BINLOG_FILENAME".* "$BINLOG_DIRNAME/" 2>/dev/null || true + mv "$DATA/$BINLOG_FILENAME".* "$BINLOG_DIRNAME/" 2>/dev/null || : cd "$BINLOG_DIRNAME" for bfile in $(ls -1 "$BINLOG_FILENAME".[0-9]*); do @@ -1336,7 +1357,8 @@ then timeit "mariabackup prepare stage" "$INNOAPPLY" if [ $? -ne 0 ]; then - wsrep_log_error "mariabackup apply finished with errors. Check syslog or '$INNOAPPLYLOG' for details" + wsrep_log_error "mariabackup apply finished with errors." \ + "Check syslog or '$INNOAPPLYLOG' for details." exit 22 fi diff --git a/scripts/wsrep_sst_mysqldump.sh b/scripts/wsrep_sst_mysqldump.sh index 798bee1ac100d..bed2cac0a9a9d 100644 --- a/scripts/wsrep_sst_mysqldump.sh +++ b/scripts/wsrep_sst_mysqldump.sh @@ -19,7 +19,6 @@ # This is a reference script for mysqldump-based state snapshot tansfer . $(dirname "$0")/wsrep_sst_common -PATH=$PATH:/usr/sbin:/usr/bin:/sbin:/bin EINVAL=22 @@ -93,8 +92,7 @@ DROP PREPARE stmt;" SET_START_POSITION="SET GLOBAL wsrep_start_position='$WSREP_SST_OPT_GTID';" SET_WSREP_GTID_DOMAIN_ID="" -if [ -n $WSREP_SST_OPT_GTID_DOMAIN_ID ] -then +if [ -n $WSREP_SST_OPT_GTID_DOMAIN_ID ]; then SET_WSREP_GTID_DOMAIN_ID=" SET @val = (SELECT GLOBAL_VALUE FROM INFORMATION_SCHEMA.SYSTEM_VARIABLES WHERE VARIABLE_NAME = 'WSREP_GTID_STRICT_MODE' AND GLOBAL_VALUE > 0); SET @stmt = IF (@val IS NOT NULL, 'SET GLOBAL WSREP_GTID_DOMAIN_ID=$WSREP_SST_OPT_GTID_DOMAIN_ID', 'SET @dummy = 0'); @@ -103,7 +101,7 @@ then DROP PREPARE stmt;" fi -MYSQL="$MYSQL_CLIENT $WSREP_SST_OPT_CONF_UNQUOTED "\ +MYSQL="$MYSQL_CLIENT$WSREP_SST_OPT_CONF_UNQUOTED "\ "$AUTH -h$WSREP_SST_OPT_HOST_UNESCAPED "\ "-P$WSREP_SST_OPT_PORT --disable-reconnect --connect_timeout=10" @@ -125,8 +123,7 @@ SET_GTID_BINLOG_STATE="" SQL_LOG_BIN_OFF="" # Safety check -if [ ${SERVER_VERSION%%.*} -gt 5 ] -then +if [ ${SERVER_VERSION%%.*} -gt 5 ]; then # If binary logging is enabled on the joiner node, we need to copy donor's # gtid_binlog_state to joiner. In order to do that, a RESET MASTER must be # executed to erase binary logs (if any). Binary logging should also be @@ -140,7 +137,7 @@ then fi # NOTE: we don't use --routines here because we're dumping mysql.proc table -MYSQLDUMP="$MYSQLDUMP $WSREP_SST_OPT_CONF_UNQUOTED $AUTH -S$WSREP_SST_OPT_SOCKET \ +MYSQLDUMP="$MYSQLDUMP$WSREP_SST_OPT_CONF_UNQUOTED $AUTH -S$WSREP_SST_OPT_SOCKET \ --add-drop-database --add-drop-table --skip-add-locks --create-options \ --disable-keys --extended-insert --skip-lock-tables --quick --set-charset \ --skip-comments --flush-privileges --all-databases --events" diff --git a/scripts/wsrep_sst_rsync.sh b/scripts/wsrep_sst_rsync.sh index 29c9cd4347026..b0cc8cb30664d 100644 --- a/scripts/wsrep_sst_rsync.sh +++ b/scripts/wsrep_sst_rsync.sh @@ -25,9 +25,6 @@ STUNNEL_REAL_PID=0 # stunnel process id OS="$(uname)" [ "$OS" = 'Darwin' ] && export -n LD_LIBRARY_PATH -# Setting the path for lsof on CentOS -export PATH="/usr/sbin:/sbin:$PATH" - . $(dirname "$0")/wsrep_sst_common wsrep_check_datadir @@ -37,7 +34,8 @@ cleanup_joiner() { local failure=0 - wsrep_log_info "Joiner cleanup: rsync PID=$RSYNC_REAL_PID, stunnel PID=$STUNNEL_REAL_PID" + wsrep_log_info "Joiner cleanup: rsync PID=$RSYNC_REAL_PID," \ + "stunnel PID=$STUNNEL_REAL_PID" if [ -n "$STUNNEL" ]; then if cleanup_pid $STUNNEL_REAL_PID "$STUNNEL_PID" "$STUNNEL_CONF"; then @@ -87,7 +85,7 @@ check_pid_and_port() if [ $lsof_available -ne 0 ]; then port_info=$(lsof -Pnl -i ":$port" 2>/dev/null | \ - grep -F '(LISTEN)') + grep -F '(LISTEN)') echo "$port_info" | \ grep -q -E "[[:space:]](\\*|\\[?::\\]?):$port[[:space:]]" && busy=1 else @@ -124,7 +122,7 @@ check_pid_and_port() fi if ! check_port "$pid" "$port" "$utils"; then - wsrep_log_error "rsync or stunnel daemon port '$port' " \ + wsrep_log_error "rsync or stunnel daemon port '$port'" \ "has been taken by another program" exit 16 # EBUSY fi @@ -223,6 +221,7 @@ FILTER="-f '- /lost+found' SSTKEY=$(parse_cnf 'sst' 'tkey') SSTCERT=$(parse_cnf 'sst' 'tcert') SSTCA=$(parse_cnf 'sst' 'tca') +SSTCAP=$(parse_cnf 'sst' 'tcapath') SST_SECTIONS="--mysqld|sst" @@ -231,28 +230,34 @@ check_server_ssl_config() SSTKEY=$(parse_cnf "$SST_SECTIONS" 'ssl-key') SSTCERT=$(parse_cnf "$SST_SECTIONS" 'ssl-cert') SSTCA=$(parse_cnf "$SST_SECTIONS" 'ssl-ca') + SSTCAP=$(parse_cnf "$SST_SECTIONS" 'ssl-capath') } SSLMODE=$(parse_cnf "$SST_SECTIONS" 'ssl-mode' | tr [:lower:] [:upper:]) # no old-style SSL config in [sst], check for new one: -if [ -z "$SSTKEY" -a -z "$SSTCERT" -a -z "$SSTCA" ]; then +if [ -z "$SSTKEY" -a -z "$SSTCERT" -a -z "$SSTCA" -a -z "$SSTCAP" ]; then check_server_ssl_config fi -SSTPATH=0 if [ -n "$SSTCA" ]; then - SSTCA=$(trim_string "$SSTCA") - if [ "${SSTCA%/}" != "$SSTCA" ]; then - SSTPATH=1 - fi + SSTCA=$(trim_string "$SSTCA") + if [ "${SSTCA%/}" != "$SSTCA" ] || [ -d "$SSTCA" ]; then + SSTCAP="$SSTCA" + SSTCA="" + fi +fi + +if [ -n "$SSTCAP" ]; then + SSTCAP=$(trim_string "$SSTCAP") fi if [ -z "$SSLMODE" ]; then # Implicit verification if CA is set and the SSL mode # is not specified by user: - if [ -n "$SSTCA" ]; then - if [ -n "$(command -v stunnel)" ]; then + if [ -n "$SSTCA$SSTCAP" ]; then + STUNNEL_BIN=$(commandex 'stunnel') + if [ -n "$STUNNEL_BIN" ]; then SSLMODE='VERIFY_CA' fi # Require SSL by default if SSL key and cert are present: @@ -265,17 +270,18 @@ if [ -n "$SSTCERT" -a -n "$SSTKEY" ]; then verify_cert_matches_key "$SSTCERT" "$SSTKEY" fi -if [ -n "$SSTCA" ]; then - if [ $SSTPATH -eq 0 ]; then +CAFILE_OPT="" +CAPATH_OPT="" +if [ -n "$SSTCA$SSTCAP" ]; then + if [ -n "$SSTCA" ]; then CAFILE_OPT="CAfile = $SSTCA" - else - CAFILE_OPT="CApath = $SSTCA" + fi + if [ -n "$SSTCAP" ]; then + CAPATH_OPT="CApath = $SSTCAP" fi if [ -n "$SSTCERT" ]; then - verify_ca_matches_cert "$SSTCA" "$SSTCERT" $SSTPATH + verify_ca_matches_cert "$SSTCERT" "$SSTCA" "$SSTCAP" fi -else - CAFILE_OPT="" fi VERIFY_OPT="" @@ -295,7 +301,7 @@ then exit 22 # EINVAL ;; esac - if [ -z "$SSTCA" ]; then + if [ -z "$SSTCA$SSTCAP" ]; then wsrep_log_error "Can't have ssl-mode='$SSLMODE' without CA file or path" exit 22 # EINVAL fi @@ -318,9 +324,12 @@ fi STUNNEL="" if [ -n "$SSLMODE" -a "$SSLMODE" != 'DISABLED' ]; then - STUNNEL_BIN="$(command -v stunnel)" + if [ -z "${STUNNEL_BIN+x}" ]; then + STUNNEL_BIN=$(commandex 'stunnel') + fi if [ -n "$STUNNEL_BIN" ]; then - wsrep_log_info "Using stunnel for SSL encryption: CA: '$SSTCA', ssl-mode='$SSLMODE'" + wsrep_log_info "Using stunnel for SSL encryption: CA: '$SSTCA'," \ + "CAPATH='$SSTCAP', ssl-mode='$SSLMODE'" STUNNEL="$STUNNEL_BIN $STUNNEL_CONF" fi fi @@ -340,6 +349,7 @@ then key = $SSTKEY cert = $SSTCERT ${CAFILE_OPT} +${CAPATH_OPT} foreground = yes pid = $STUNNEL_PID debug = warning @@ -392,8 +402,8 @@ EOF # Prepare binlog files cd "$BINLOG_DIRNAME" - binlog_files_full=$(tail -n $BINLOG_N_FILES "$WSREP_SST_OPT_BINLOG_INDEX") - + binlog_files_full=$(tail -n $BINLOG_N_FILES \ + "$WSREP_SST_OPT_BINLOG_INDEX") binlog_files="" for ii in $binlog_files_full do @@ -417,9 +427,10 @@ EOF WHOLE_FILE_OPT="--whole-file" fi - # first, the normal directories, so that we can detect incompatible protocol + # first, the normal directories, so that we can detect + # incompatible protocol: RC=0 - eval rsync ${STUNNEL:+"'--rsh=$STUNNEL'"} \ + eval rsync ${STUNNEL:+"--rsh='$STUNNEL'"} \ --owner --group --perms --links --specials \ --ignore-times --inplace --dirs --delete --quiet \ $WHOLE_FILE_OPT $FILTER "'$WSREP_SST_OPT_DATA/'" \ @@ -430,8 +441,9 @@ EOF case $RC in 12) RC=71 # EPROTO wsrep_log_error \ - "rsync server on the other end has incompatible protocol. " \ - "Make sure you have the same version of rsync on all nodes." + "rsync server on the other end has incompatible" \ + "protocol. Make sure you have the same version of" \ + "rsync on all nodes." ;; 22) RC=12 # ENOMEM ;; @@ -481,9 +493,9 @@ EOF find . -maxdepth 1 -mindepth 1 -type d -not -name 'lost+found' \ -not -name '.zfs' -print0 | xargs -I{} -0 -P $backup_threads \ rsync ${STUNNEL:+--rsh="$STUNNEL"} \ - --owner --group --perms --links --specials \ - --ignore-times --inplace --recursive --delete --quiet \ - $WHOLE_FILE_OPT --exclude '*/ib_logfile*' --exclude '*/aria_log.*' \ + --owner --group --perms --links --specials --ignore-times \ + --inplace --recursive --delete --quiet $WHOLE_FILE_OPT \ + --exclude '*/ib_logfile*' --exclude '*/aria_log.*' \ --exclude '*/aria_log_control' "$WSREP_SST_OPT_DATA/{}/" \ "rsync://$WSREP_SST_OPT_ADDR/{}" >&2 || RC=$? @@ -514,7 +526,8 @@ EOF fi rsync ${STUNNEL:+--rsh="$STUNNEL"} \ - --archive --quiet --checksum "$MAGIC_FILE" "rsync://$WSREP_SST_OPT_ADDR" + --archive --quiet --checksum "$MAGIC_FILE" \ + "rsync://$WSREP_SST_OPT_ADDR" echo "done $STATE" @@ -546,7 +559,8 @@ then check_round=0 while check_pid "$STUNNEL_PID" 1 do - wsrep_log_info "lingering stunnel daemon found at startup, waiting for it to exit" + wsrep_log_info "Lingering stunnel daemon found at startup," \ + "waiting for it to exit" check_round=$(( check_round + 1 )) if [ $check_round -eq 10 ]; then wsrep_log_error "stunnel daemon already running." @@ -563,7 +577,8 @@ then check_round=0 while check_pid "$RSYNC_PID" 1 do - wsrep_log_info "lingering rsync daemon found at startup, waiting for it to exit" + wsrep_log_info "Lingering rsync daemon found at startup," \ + "waiting for it to exit" check_round=$(( check_round + 1 )) if [ $check_round -eq 10 ]; then wsrep_log_error "rsync daemon already running." @@ -575,9 +590,7 @@ then [ -f "$MAGIC_FILE" ] && rm -f "$MAGIC_FILE" [ -f "$BINLOG_TAR_FILE" ] && rm -f "$BINLOG_TAR_FILE" - if [ -z "$STUNNEL" ]; then - [ -f "$STUNNEL_CONF" ] && rm -f "$STUNNEL_CONF" - fi + [ -z "$STUNNEL" ] && [ -f "$STUNNEL_CONF" ] && rm -f "$STUNNEL_CONF" ADDR="$WSREP_SST_OPT_ADDR" RSYNC_PORT="$WSREP_SST_OPT_PORT" @@ -628,19 +641,21 @@ EOF echo $$ > "$SST_PID" - if [ -z "$STUNNEL" ] - then - rsync --daemon --no-detach --port "$RSYNC_PORT" --config "$RSYNC_CONF" $RSYNC_EXTRA_ARGS & + if [ -z "$STUNNEL" ]; then + rsync --daemon --no-detach --port "$RSYNC_PORT" \ + --config "$RSYNC_CONF" $RSYNC_EXTRA_ARGS & RSYNC_REAL_PID=$! TRANSFER_REAL_PID=$RSYNC_REAL_PID TRANSFER_PID="$RSYNC_PID" else # Let's check if the path to the config file contains a space? + RSYNC_BIN=$(commandex 'rsync') if [ "${RSYNC_CONF#* }" = "$RSYNC_CONF" ]; then cat << EOF > "$STUNNEL_CONF" key = $SSTKEY cert = $SSTCERT ${CAFILE_OPT} +${CAPATH_OPT} foreground = yes pid = $STUNNEL_PID debug = warning @@ -650,17 +665,18 @@ ${CHECK_OPT} ${CHECK_OPT_LOCAL} [rsync] accept = $STUNNEL_ACCEPT -exec = $(command -v rsync) +exec = $RSYNC_BIN execargs = rsync --server --daemon --config=$RSYNC_CONF . EOF else # The path contains a space, so we will run it via # shell with "eval" command: - export RSYNC_CMD="eval $(command -v rsync) --server --daemon --config='$RSYNC_CONF' ." + export RSYNC_CMD="eval '$RSYNC_BIN' --server --daemon --config='$RSYNC_CONF' ." cat << EOF > "$STUNNEL_CONF" key = $SSTKEY cert = $SSTCERT ${CAFILE_OPT} +${CAPATH_OPT} foreground = yes pid = $STUNNEL_PID debug = warning @@ -688,7 +704,8 @@ EOF # find out my Common Name get_openssl if [ -z "$OPENSSL_BINARY" ]; then - wsrep_log_error 'openssl not found but it is required for authentication' + wsrep_log_error \ + 'openssl not found but it is required for authentication' exit 42 fi CN=$("$OPENSSL_BINARY" x509 -noout -subject -in "$SSTCERT" | \ @@ -703,7 +720,8 @@ EOF ADDR="$WSREP_SST_OPT_HOST" fi - until check_pid_and_port "$TRANSFER_PID" $TRANSFER_REAL_PID "$RSYNC_ADDR_UNESCAPED" "$RSYNC_PORT" + until check_pid_and_port "$TRANSFER_PID" $TRANSFER_REAL_PID \ + "$RSYNC_ADDR_UNESCAPED" "$RSYNC_PORT" do sleep 0.2 done @@ -722,7 +740,7 @@ EOF if ! ps -p $MYSQLD_PID >/dev/null 2>&1 then wsrep_log_error \ - "Parent mysqld process (PID: $MYSQLD_PID) terminated unexpectedly." + "Parent mysqld process (PID: $MYSQLD_PID) terminated unexpectedly." kill -- -$MYSQLD_PID sleep 1 exit 32 @@ -768,10 +786,11 @@ EOF if [ -r "$MAGIC_FILE" ]; then if [ -n "$MY_SECRET" ]; then # check donor supplied secret - SECRET=$(grep -F -- "$SECRET_TAG " "$MAGIC_FILE" 2>/dev/null | cut -d ' ' -f 2) + SECRET=$(grep -F -- "$SECRET_TAG " "$MAGIC_FILE" 2>/dev/null | \ + cut -d ' ' -f 2) if [ "$SECRET" != "$MY_SECRET" ]; then wsrep_log_error "Donor does not know my secret!" - wsrep_log_info "Donor:'$SECRET', my:'$MY_SECRET'" + wsrep_log_info "Donor: '$SECRET', my: '$MY_SECRET'" exit 32 fi # remove secret from the magic file, and output diff --git a/scripts/wsrep_sst_xtrabackup-v2.sh b/scripts/wsrep_sst_xtrabackup-v2.sh index 73f15e79a4cae..d5c978c414736 100644 --- a/scripts/wsrep_sst_xtrabackup-v2.sh +++ b/scripts/wsrep_sst_xtrabackup-v2.sh @@ -17,13 +17,15 @@ # MA 02110-1335 USA. # Documentation: -# http://www.percona.com/doc/percona-xtradb-cluster/manual/xtrabackup_sst.html +# https://mariadb.com/kb/en/mariabackup-overview/ +# https://www.percona.com/doc/percona-xtradb-cluster/manual/xtrabackup_sst.html # Make sure to read that before proceeding! +OS="$(uname)" + . $(dirname "$0")/wsrep_sst_common wsrep_check_datadir -OS="$(uname)" ealgo="" eformat="" ekey="" @@ -34,7 +36,7 @@ ssyslog="" ssystag="" BACKUP_PID="" tcert="" -tpath=0 +tcap="" tpem="" tkey="" tmode="DISABLED" @@ -88,14 +90,14 @@ readonly SECRET_TAG="secret" sst_ver=-1 -if [ -n "$(command -v pv)" ] && pv --help | grep -qw -- '-F'; then +if [ -n "$(commandex pv)" ] && pv --help | grep -qw -- '-F'; then pvopts="$pvopts $pvformat" fi pcmd="pv $pvopts" declare -a RC -BACKUP_BIN="$(command -v innobackupex)" -if [ ! -x "$BACKUP_BIN" ]; then +BACKUP_BIN=$(commandex 'innobackupex') +if [ -z "$BACKUP_BIN" ]; then wsrep_log_error 'innobackupex binary not found in path' exit 42 fi @@ -145,14 +147,14 @@ get_keys() if [ $encrypt -eq 0 ]; then if [ -n "$ealgo" -o -n "$ekey" -o -n "$ekeyfile" ]; then - wsrep_log_error "Options for encryption are specified, " \ + wsrep_log_error "Options for encryption are specified," \ "but encryption itself is disabled. SST may fail." fi return fi if [ $sfmt = 'tar' ]; then - wsrep_log_info "NOTE: key-based encryption (encrypt=1) " \ + wsrep_log_info "NOTE: key-based encryption (encrypt=1)" \ "cannot be enabled with tar format" encrypt=-1 return @@ -165,16 +167,18 @@ get_keys() exit 3 fi - if [ -z "$ekey" -a ! -r "$ekeyfile" ]; then - wsrep_log_error "FATAL: Either key must be specified " \ - "or keyfile must be readable" - exit 3 + if [ -z "$ekey" ]; then + if [ ! -r "$ekeyfile" ]; then + wsrep_log_error "FATAL: Either key must be specified" \ + "or keyfile must be readable" + exit 3 + fi fi if [ "$eformat" = 'openssl' ]; then get_openssl if [ -z "$OPENSSL_BINARY" ]; then - wsrep_log_error "If encryption using the openssl is enabled, " \ + wsrep_log_error "If encryption using the openssl is enabled," \ "then you need to install openssl" exit 2 fi @@ -192,19 +196,19 @@ get_keys() ecmd="$ecmd -k '$ekey'" fi elif [ "$eformat" = 'xbcrypt' ]; then - if [ -z "$(command -v xbcrypt)" ]; then - wsrep_log_error "If encryption using the xbcrypt is enabled, " \ + if [ -z "$(commandex xbcrypt)" ]; then + wsrep_log_error "If encryption using the xbcrypt is enabled," \ "then you need to install xbcrypt" exit 2 fi - wsrep_log_info "NOTE: xbcrypt-based encryption, " \ + wsrep_log_info "NOTE: xbcrypt-based encryption," \ "supported only from Xtrabackup 2.1.4" if [ -z "$ekey" ]; then ecmd="xbcrypt --encrypt-algo='$ealgo' --encrypt-key-file='$ekeyfile'" else - wsrep_log_warning \ - "Using the 'encrypt-key' option causes the encryption key " \ - "to be set via the command-line and is considered insecure. " \ + wsrep_log_info \ + "Using the 'encrypt-key' option causes the encryption key" \ + "to be set via the command-line and is considered insecure." \ "It is recommended to use the 'encrypt-key-file' option instead." ecmd="xbcrypt --encrypt-algo='$ealgo' --encrypt-key='$ekey'" fi @@ -346,40 +350,34 @@ get_transfer() CN_option=",commonname=''" if [ $encrypt -eq 2 ]; then - wsrep_log_info "Using openssl based encryption with socat: with crt and pem" - if [ -z "$tpem" -o -z "$tcert" ]; then + wsrep_log_info \ + "Using openssl based encryption with socat: with crt and pem" + if [ -z "$tpem" -o -z "$tcert$tcap" ]; then wsrep_log_error \ "Both PEM file and CRT file (or path) are required" exit 22 fi - if [ ! -r "$tpem" -o ! -r "$tcert" ]; then - wsrep_log_error \ - "Both PEM file and CRT file (or path) must be readable" - exit 22 + verify_ca_matches_cert "$tpem" "$tcert" "$tcap" + tcmd="$tcmd,cert='$tpem'" + if [ -n "$tcert" ]; then + tcmd="$tcmd,cafile='$tcert'" fi - verify_ca_matches_cert "$tcert" "$tpem" $tpath - if [ $tpath -eq 0 ]; then - tcmd="$tcmd,cert='$tpem',cafile='$tcert'" - else - tcmd="$tcmd,cert='$tpem',capath='$tcert'" + if [ -n "$tcap" ]; then + tcmd="$tcmd,capath='$tcap'" fi stagemsg="$stagemsg-OpenSSL-Encrypted-2" - wsrep_log_info "$action with cert=$tpem, ca=$tcert" + wsrep_log_info "$action with cert='$tpem', ca='$tcert', capath='$tcap'" elif [ $encrypt -eq 3 -o $encrypt -eq 4 ]; then - wsrep_log_info "Using openssl based encryption with socat: with key and crt" + wsrep_log_info \ + "Using openssl based encryption with socat: with key and crt" if [ -z "$tpem" -o -z "$tkey" ]; then - wsrep_log_error "Both certificate file (or path) " \ - "and key file are required" - exit 22 - fi - if [ ! -r "$tpem" -o ! -r "$tkey" ]; then - wsrep_log_error "Both certificate file (or path) " \ - "and key file must be readable" + wsrep_log_error "Both the certificate file (or path) and" \ + "the key file are required" exit 22 fi verify_cert_matches_key "$tpem" "$tkey" stagemsg="$stagemsg-OpenSSL-Encrypted-3" - if [ -z "$tcert" ]; then + if [ -z "$tcert$tcap" ]; then if [ $encrypt -eq 4 ]; then wsrep_log_error \ "Peer certificate file (or path) required if encrypt=4" @@ -388,14 +386,11 @@ get_transfer() # no verification CN_option="" tcmd="$tcmd,cert='$tpem',key='$tkey',verify=0" - wsrep_log_info "$action with cert=$tpem, key=$tkey, verify=0" + wsrep_log_info \ + "$action with cert='$tpem', key='$tkey', verify=0" else # CA verification - if [ ! -r "$tcert" ]; then - wsrep_log_error "Certificate file or path must be readable" - exit 22 - fi - verify_ca_matches_cert "$tcert" "$tpem" $tpath + verify_ca_matches_cert "$tpem" "$tcert" "$tcap" if [ -n "$WSREP_SST_OPT_REMOTE_USER" ]; then CN_option=",commonname='$WSREP_SST_OPT_REMOTE_USER'" elif [ "$WSREP_SST_OPT_ROLE" = 'joiner' -o $encrypt -eq 4 ] @@ -406,12 +401,15 @@ get_transfer() else CN_option=",commonname='$WSREP_SST_OPT_HOST_UNESCAPED'" fi - if [ $tpath -eq 0 ]; then - tcmd="$tcmd,cert='$tpem',key='$tkey',cafile='$tcert'" - else - tcmd="$tcmd,cert='$tpem',key='$tkey',capath='$tcert'" + tcmd="$tcmd,cert='$tpem',key='$tkey'" + if [ -n "$tcert" ]; then + tcmd="$tcmd,cafile='$tcert'" + fi + if [ -n "$tcap" ]; then + tcmd="$tcmd,capath='$tcap'" fi - wsrep_log_info "$action with cert=$tpem, key=$tkey, ca=$tcert" + wsrep_log_info "$action with cert='$tpem', key='$tkey'," \ + "ca='$tcert', capath='$tcap'" fi else wsrep_log_info "Unknown encryption mode: encrypt=$encrypt" @@ -429,7 +427,9 @@ get_transfer() get_footprint() { pushd "$WSREP_SST_OPT_DATA" 1>/dev/null - payload=$(find . -regex '.*\.ibd$\|.*\.MYI$\|.*\.MYD$\|.*ibdata1$' -type f -print0 | du --files0-from=- --block-size=1 -c -s | awk 'END { print $1 }') + payload=$(find . -regex '.*\.ibd$\|.*\.MYI$\|.*\.MYD$\|.*ibdata1$' \ + -type f -print0 | du --files0-from=- --block-size=1 -c -s | \ + awk 'END { print $1 }') if [ "$compress" != 'none' ]; then # QuickLZ has around 50% compression ratio # When compression/compaction used, the progress is only an approximate. @@ -442,7 +442,7 @@ get_footprint() adjust_progress() { - if [ -z "$(command -v pv)" ]; then + if [ -z "$(commandex pv)" ]; then wsrep_log_error "pv not found in path: $PATH" wsrep_log_error "Disabling all progress/rate-limiting" pcmd="" @@ -474,33 +474,42 @@ check_server_ssl_config() { # backward-compatible behavior: tcert=$(parse_cnf 'sst' 'tca') + tcap=$(parse_cnf 'sst' 'tcapath') tpem=$(parse_cnf 'sst' 'tcert') tkey=$(parse_cnf 'sst' 'tkey') # reading new ssl configuration options: local tcert2=$(parse_cnf "$encgroups" 'ssl-ca') + local tcap2=$(parse_cnf "$encgroups" 'ssl-capath') local tpem2=$(parse_cnf "$encgroups" 'ssl-cert') local tkey2=$(parse_cnf "$encgroups" 'ssl-key') # if there are no old options, then we take new ones: - if [ -z "$tcert" -a -z "$tpem" -a -z "$tkey" ]; then + if [ -z "$tcert" -a -z "$tcap" -a -z "$tpem" -a -z "$tkey" ]; then tcert="$tcert2" + tcap="$tcap2" tpem="$tpem2" tkey="$tkey2" # checking for presence of the new-style SSL configuration: - elif [ -n "$tcert2" -o -n "$tpem2" -o -n "$tkey2" ]; then + elif [ -n "$tcert2" -o -n "$tcap2" -o -n "$tpem2" -o -n "$tkey2" ]; then if [ "$tcert" != "$tcert2" -o \ + "$tcap" != "$tcap2" -o \ "$tpem" != "$tpem2" -o \ "$tkey" != "$tkey2" ] then - wsrep_log_info "new ssl configuration options (ssl-ca, ssl-cert " \ - "and ssl-key) are ignored by SST due to presence " \ - "of the tca, tcert and/or tkey in the [sst] section" + wsrep_log_info \ + "new ssl configuration options (ssl-ca[path], ssl-cert" \ + "and ssl-key) are ignored by SST due to presence" \ + "of the tca[path], tcert and/or tkey in the [sst] section" fi fi if [ -n "$tcert" ]; then - tcert=$(trim_string "$tcert") - if [ "${tcert%/}" != "$tcert" ]; then - tpath=1 - fi + tcert=$(trim_string "$tcert") + if [ "${tcert%/}" != "$tcert" ] || [ -d "$tcert" ]; then + tcap="$tcert" + tcert="" + fi + fi + if [ -n "$tcap" ]; then + tcap=$(trim_string "$tcap") fi } @@ -510,10 +519,10 @@ read_cnf() tfmt=$(parse_cnf sst transferfmt 'socat') encrypt=$(parse_cnf "$encgroups" 'encrypt' 0) - tmode=$(parse_cnf "$encgroups" 'ssl-mode' 'DISABLED' | tr [:lower:] [:upper:]) + tmode=$(parse_cnf "$encgroups" 'ssl-mode' 'DISABLED' | \ + tr [:lower:] [:upper:]) - if [ $encrypt -eq 0 -o $encrypt -ge 2 ] - then + if [ $encrypt -eq 0 -o $encrypt -ge 2 ]; then if [ "$tmode" != 'DISABLED' -o $encrypt -ge 2 ]; then check_server_ssl_config fi @@ -521,11 +530,13 @@ read_cnf() if [ 0 -eq $encrypt -a -n "$tpem" -a -n "$tkey" ] then encrypt=3 # enable cert/key SSL encyption - # avoid CA verification if not set explicitly: - # nodes may happen to have different CA if self-generated - # zeroing up tcert does the trick - [ "${tmode#VERIFY}" != "$tmode" ] || tcert="" + # nodes may happen to have different CA if self-generated, + # zeroing up tcert and tcap does the trick: + if [ "${tmode#VERIFY}" = "$tmode" ]; then + tcert="" + tcap="" + fi fi fi elif [ $encrypt -eq 1 ]; then @@ -539,8 +550,9 @@ read_cnf() fi fi - wsrep_log_info "SSL configuration: CA='$tcert', CERT='$tpem'," \ - "KEY='$tkey', MODE='$tmode', encrypt='$encrypt'" + wsrep_log_info "SSL configuration: CA='$tcert', CAPATH='$tcap'," \ + "CERT='$tpem', KEY='$tkey', MODE='$tmode'," \ + "encrypt='$encrypt'" sockopt=$(parse_cnf sst sockopt "") progress=$(parse_cnf sst progress "") @@ -566,7 +578,8 @@ read_cnf() sstlogarchivedir=$(parse_cnf sst sst-log-archive-dir '/tmp/sst_log_archive') if [ $speciald -eq 0 ]; then - wsrep_log_error "sst-special-dirs equal to 0 is not supported, falling back to 1" + wsrep_log_error \ + "sst-special-dirs equal to 0 is not supported, falling back to 1" speciald=1 fi @@ -593,12 +606,12 @@ read_cnf() get_stream() { if [ "$sfmt" = 'mbstream' -o "$sfmt" = 'xbstream' ]; then - STREAM_BIN=$(command -v "$sfmt") + local STREAM_BIN=$(commandex "$sfmt") if [ -z "$STREAM_BIN" ]; then if [ "$sfmt" = 'xbstream' ]; then - STREAM_BIN="$(command -v mbstream)" + STREAM_BIN=$(commandex 'mbstream') else - STREAM_BIN="$(command -v xbstream)" + STREAM_BIN=$(commandex 'xbstream') fi fi if [ -z "$STREAM_BIN" ]; then @@ -632,7 +645,7 @@ cleanup_at_exit() # Since this is invoked just after exit NNN local estatus=$? if [ $estatus -ne 0 ]; then - wsrep_log_error "Cleanup after exit with status:$estatus" + wsrep_log_error "Cleanup after exit with status: $estatus" fi if [ "$WSREP_SST_OPT_ROLE" = 'joiner' ]; then @@ -641,7 +654,8 @@ cleanup_at_exit() else if [ -n "$BACKUP_PID" ]; then if check_pid "$BACKUP_PID" 1; then - wsrep_log_error "xtrabackup process is still running. Killing..." + wsrep_log_error \ + "innobackupex process is still running. Killing..." cleanup_pid $CHECK_PID "$BACKUP_PID" fi fi @@ -649,8 +663,8 @@ cleanup_at_exit() fi if [ -n "$progress" -a -p "$progress" ]; then - wsrep_log_info "Cleaning up fifo file $progress" - rm -f "$progress" || true + wsrep_log_info "Cleaning up fifo file: $progress" + rm -f "$progress" || : fi wsrep_log_info "Cleaning up temporary directories" @@ -660,8 +674,8 @@ cleanup_at_exit() [ -d "$STATDIR" ] && rm -rf "$STATDIR" fi else - [ -n "$xtmpdir" -a -d "$xtmpdir" ] && rm -rf "$xtmpdir" || true - [ -n "$itmpdir" -a -d "$itmpdir" ] && rm -rf "$itmpdir" || true + [ -n "$xtmpdir" -a -d "$xtmpdir" ] && rm -rf "$xtmpdir" || : + [ -n "$itmpdir" -a -d "$itmpdir" ] && rm -rf "$itmpdir" || : fi # Final cleanup @@ -673,7 +687,7 @@ cleanup_at_exit() # This means a signal was delivered to the process. # So, more cleanup. if [ $estatus -ge 128 ]; then - kill -KILL -- -$$ || true + kill -KILL -- -$$ || : fi fi @@ -749,7 +763,7 @@ recv_joiner() local ltcmd="$tcmd" if [ $tmt -gt 0 ]; then - if [ -n "$(command -v timeout)" ]; then + if [ -n "$(commandex timeout)" ]; then if timeout --help | grep -qw -- '-k'; then ltcmd="timeout -k $(( tmt+10 )) $tmt $tcmd" else @@ -771,14 +785,14 @@ recv_joiner() popd 1>/dev/null if [ ${RC[0]} -eq 124 ]; then - wsrep_log_error "Possible timeout in receiving first data from " \ + wsrep_log_error "Possible timeout in receiving first data from" \ "donor in gtid stage: exit codes: ${RC[@]}" exit 32 fi for ecode in "${RC[@]}"; do if [ $ecode -ne 0 ]; then - wsrep_log_error "Error while getting data from donor node: " \ + wsrep_log_error "Error while getting data from donor node:" \ "exit codes: ${RC[@]}" exit 32 fi @@ -787,7 +801,7 @@ recv_joiner() if [ $checkf -eq 1 ]; then if [ ! -r "$MAGIC_FILE" ]; then # this message should cause joiner to abort - wsrep_log_error "receiving process ended without creating " \ + wsrep_log_error "receiving process ended without creating" \ "'$MAGIC_FILE'" wsrep_log_info "Contents of datadir" wsrep_log_info $(ls -l "$dir/"*) @@ -795,10 +809,11 @@ recv_joiner() fi # check donor supplied secret - SECRET=$(grep -F -- "$SECRET_TAG " "$MAGIC_FILE" 2>/dev/null | cut -d ' ' -f 2) + SECRET=$(grep -F -- "$SECRET_TAG " "$MAGIC_FILE" 2>/dev/null | \ + cut -d ' ' -f 2) if [ "$SECRET" != "$MY_SECRET" ]; then wsrep_log_error "Donor does not know my secret!" - wsrep_log_info "Donor:'$SECRET', my:'$MY_SECRET'" + wsrep_log_info "Donor: '$SECRET', my: '$MY_SECRET'" exit 32 fi @@ -821,7 +836,7 @@ send_donor() for ecode in "${RC[@]}"; do if [ $ecode -ne 0 ]; then - wsrep_log_error "Error while sending data to joiner node: " \ + wsrep_log_error "Error while sending data to joiner node:" \ "exit codes: ${RC[@]}" exit 32 fi @@ -834,7 +849,9 @@ monitor_process() while true ; do if ! ps -p "$WSREP_SST_OPT_PARENT" >/dev/null 2>&1; then - wsrep_log_error "Parent mysqld process (PID: $WSREP_SST_OPT_PARENT) terminated unexpectedly." + wsrep_log_error \ + "Parent mysqld process (PID: $WSREP_SST_OPT_PARENT)" \ + "terminated unexpectedly." kill -- -"$WSREP_SST_OPT_PARENT" exit 32 fi @@ -850,13 +867,17 @@ monitor_process() XB_REQUIRED_VERSION="2.3.5" XB_VERSION=`$BACKUP_BIN --version 2>&1 | grep -oe '[0-9]\.[0-9][\.0-9]*' | head -n1` -if [[ -z "$XB_VERSION" ]]; then - wsrep_log_error "FATAL: Cannot determine the $BACKUP_BIN version. Needs xtrabackup-$XB_REQUIRED_VERSION or higher to perform SST" +if [ -z "$XB_VERSION" ]; then + wsrep_log_error "FATAL: Cannot determine the $BACKUP_BIN version." \ + "Needs xtrabackup-$XB_REQUIRED_VERSION or higher to" \ + "perform SST" exit 2 fi if ! check_for_version "$XB_VERSION" "$XB_REQUIRED_VERSION"; then - wsrep_log_error "FATAL: The $BACKUP_BIN version is $XB_VERSION. Needs xtrabackup-$XB_REQUIRED_VERSION or higher to perform SST" + wsrep_log_error "FATAL: The $BACKUP_BIN version is $XB_VERSION." \ + "Needs xtrabackup-$XB_REQUIRED_VERSION or higher to" \ + "perform SST" exit 2 fi @@ -871,7 +892,7 @@ read_cnf setup_ports if "$BACKUP_BIN" --help 2>/dev/null | grep -qw -- '--version-check'; then - disver='--no-version-check' + disver=' --no-version-check' fi # if no command line argument and INNODB_DATA_HOME_DIR environment variable @@ -893,19 +914,19 @@ INNODB_DATA_HOME_DIR=$(pwd -P) cd "$OLD_PWD" if [ $ssyslog -eq 1 ]; then - if [ -n "$(command -v logger)" ]; then + if [ -n "$(commandex logger)" ]; then wsrep_log_info "Logging all stderr of SST/xtrabackup to syslog" exec 2> >(logger -p daemon.err -t ${ssystag}wsrep-sst-$WSREP_SST_OPT_ROLE) wsrep_log_error() { - logger -p daemon.err -t ${ssystag}wsrep-sst-$WSREP_SST_OPT_ROLE "$@" + logger -p daemon.err -t ${ssystag}wsrep-sst-$WSREP_SST_OPT_ROLE "$@" } wsrep_log_info() { - logger -p daemon.info -t ${ssystag}wsrep-sst-$WSREP_SST_OPT_ROLE "$@" + logger -p daemon.info -t ${ssystag}wsrep-sst-$WSREP_SST_OPT_ROLE "$@" } else wsrep_log_error "logger not in path: $PATH. Ignoring" @@ -924,10 +945,8 @@ else fi fi - if [ -e "$INNOAPPLYLOG" ] - then - if [ -n "$sstlogarchivedir" ] - then + if [ -e "$INNOAPPLYLOG" ]; then + if [ -n "$sstlogarchivedir" ]; then newfile=$(basename "$INNOAPPLYLOG") newfile="$sstlogarchivedir/$newfile.$ARCHIVETIMESTAMP" else @@ -938,10 +957,8 @@ else gzip "$newfile" fi - if [ -e "$INNOMOVELOG" ] - then - if [ -n "$sstlogarchivedir" ] - then + if [ -e "$INNOMOVELOG" ]; then + if [ -n "$sstlogarchivedir" ]; then newfile=$(basename "$INNOMOVELOG") newfile="$sstlogarchivedir/$newfile.$ARCHIVETIMESTAMP" else @@ -952,10 +969,8 @@ else gzip "$newfile" fi - if [ -e "$INNOBACKUPLOG" ] - then - if [ -n "$sstlogarchivedir" ] - then + if [ -e "$INNOBACKUPLOG" ]; then + if [ -n "$sstlogarchivedir" ]; then newfile=$(basename "$INNOBACKUPLOG") newfile="$sstlogarchivedir/$newfile.$ARCHIVETIMESTAMP" else @@ -973,17 +988,17 @@ fi setup_commands() { - if [ -z "$INNODB_FORCE_RECOVERY" ]; then - INNOAPPLY="$BACKUP_BIN $disver $iapts $INNOEXTRA --apply-log $rebuildcmd '$DATA' $INNOAPPLY" - else - INNOAPPLY="$BACKUP_BIN $disver $iapts $INNOEXTRA --innodb-force-recovery=$INNODB_FORCE_RECOVERY --apply-log $rebuildcmd '$DATA' $INNOAPPLY" + local recovery="" + if [ -n "$INNODB_FORCE_RECOVERY" ]; then + recovery=" --innodb-force-recovery=$INNODB_FORCE_RECOVERY" fi - INNOMOVE="$BACKUP_BIN $WSREP_SST_OPT_CONF --move-back $disver $impts --force-non-empty-directories '$DATA' $INNOMOVE" - sfmt_work="$sfmt" + INNOAPPLY="$BACKUP_BIN$disver$recovery${iapts:+ }$iapts$INNOEXTRA --apply-log $rebuildcmd '$DATA' $INNOAPPLY" + INNOMOVE="$BACKUP_BIN$WSREP_SST_OPT_CONF --move-back$disver${impts:+ }$impts --force-non-empty-directories '$DATA' $INNOMOVE" + local sfmt_work="$sfmt" if [ "$sfmt" = 'mbstream' ]; then sfmt_work='xbstream' fi - INNOBACKUP="$BACKUP_BIN $WSREP_SST_OPT_CONF $disver $iopts $tmpopts $INNOEXTRA --galera-info --stream=$sfmt_work '$itmpdir' $INNOBACKUP" + INNOBACKUP="$BACKUP_BIN$WSREP_SST_OPT_CONF$disver${iopts:+ }$iopts $tmpopts$INNOEXTRA --galera-info --stream=$sfmt_work '$itmpdir' $INNOBACKUP" } get_stream @@ -1081,27 +1096,28 @@ then tcmd="$ecmd | $tcmd" fi - iopts="--databases-exclude='lost+found' $iopts" + iopts="--databases-exclude='lost+found'${iopts:+ }$iopts" if [ ${FORCE_FTWRL:-0} -eq 1 ]; then - wsrep_log_info "Forcing FTWRL due to environment variable FORCE_FTWRL equal to $FORCE_FTWRL" - iopts="--no-backup-locks $iopts" + wsrep_log_info "Forcing FTWRL due to environment variable" \ + "FORCE_FTWRL equal to $FORCE_FTWRL" + iopts="--no-backup-locks${iopts:+ }$iopts" fi # if compression is enabled for backup files, then add the # appropriate options to the innobackupex command line: if [ "$compress" != 'none' ]; then - iopts="--compress${compress:+=$compress} $iopts" + iopts="--compress${compress:+=$compress}${iopts:+ }$iopts" if [ -n "$compress_threads" ]; then - iopts="--compress-threads=$compress_threads $iopts" + iopts="--compress-threads=$compress_threads${iopts:+ }$iopts" fi if [ -n "$compress_chunk" ]; then - iopts="--compress-chunk-size=$compress_chunk $iopts" + iopts="--compress-chunk-size=$compress_chunk${iopts:+ }$iopts" fi fi if [ -n "$backup_threads" ]; then - iopts="--parallel=$backup_threads $iopts" + iopts="--parallel=$backup_threads${iopts:+ }$iopts" fi setup_commands @@ -1110,7 +1126,7 @@ then set -e if [ ${RC[0]} -ne 0 ]; then - wsrep_log_error "innobackupex finished with error: ${RC[0]}. " \ + wsrep_log_error "innobackupex finished with error: ${RC[0]}." \ "Check syslog or '$INNOBACKUPLOG' for details" exit 22 elif [ ${RC[$(( ${#RC[@]}-1 ))]} -eq 1 ]; then @@ -1151,7 +1167,8 @@ then elif [ "$WSREP_SST_OPT_ROLE" = 'joiner' ] then - [ -e "$SST_PROGRESS_FILE" ] && wsrep_log_info "Stale sst_in_progress file: $SST_PROGRESS_FILE" + [ -e "$SST_PROGRESS_FILE" ] && \ + wsrep_log_info "Stale sst_in_progress file: $SST_PROGRESS_FILE" [ -n "$SST_PROGRESS_FILE" ] && touch "$SST_PROGRESS_FILE" ib_home_dir="$INNODB_DATA_HOME_DIR" @@ -1172,7 +1189,7 @@ then ib_undo_dir="$INNODB_UNDO_DIR" if [ -n "$backup_threads" ]; then - impts="--parallel=$backup_threads $impts" + impts="--parallel=$backup_threads${impts:+ }$impts" fi stagemsg='Joiner-Recv' @@ -1191,15 +1208,15 @@ then ADDR="$WSREP_SST_OPT_ADDR" - if [ "${tmode#VERIFY}" != "$tmode" ] - then # backward-incompatible behavior + if [ "${tmode#VERIFY}" != "$tmode" ]; then + # backward-incompatible behavior: CN="" - if [ -n "$tpem" ] - then + if [ -n "$tpem" ]; then # find out my Common Name get_openssl if [ -z "$OPENSSL_BINARY" ]; then - wsrep_log_error 'openssl not found but it is required for authentication' + wsrep_log_error \ + 'openssl not found but it is required for authentication' exit 42 fi CN=$("$OPENSSL_BINARY" x509 -noout -subject -in "$tpem" | \ @@ -1239,15 +1256,17 @@ then if ! ps -p "$WSREP_SST_OPT_PARENT" >/dev/null 2>&1 then - wsrep_log_error "Parent mysqld process (PID: $WSREP_SST_OPT_PARENT) terminated unexpectedly." + wsrep_log_error "Parent mysqld process (PID: $WSREP_SST_OPT_PARENT)" \ + "terminated unexpectedly." exit 32 fi - if [ ! -r "$STATDIR/$IST_FILE" ] - then + if [ ! -r "$STATDIR/$IST_FILE" ]; then if [ -d "$DATA/.sst" ]; then - wsrep_log_info "WARNING: Stale temporary SST directory: '$DATA/.sst' from previous state transfer. Removing" + wsrep_log_info \ + "WARNING: Stale temporary SST directory:" \ + "'$DATA/.sst' from previous state transfer, removing..." rm -rf "$DATA/.sst" fi mkdir -p "$DATA/.sst" @@ -1255,17 +1274,20 @@ then jpid=$! wsrep_log_info "Proceeding with SST" - wsrep_log_info "Cleaning the existing datadir and innodb-data/log directories" + wsrep_log_info \ + "Cleaning the existing datadir and innodb-data/log directories" if [ "$OS" = 'FreeBSD' ]; then find -E ${ib_home_dir:+"$ib_home_dir"} \ ${ib_undo_dir:+"$ib_undo_dir"} \ ${ib_log_dir:+"$ib_log_dir"} \ - "$DATA" -mindepth 1 -prune -regex "$cpat" -o -exec rm -rfv {} 1>&2 \+ + "$DATA" -mindepth 1 -prune -regex "$cpat" \ + -o -exec rm -rfv {} 1>&2 \+ else find ${ib_home_dir:+"$ib_home_dir"} \ ${ib_undo_dir:+"$ib_undo_dir"} \ ${ib_log_dir:+"$ib_log_dir"} \ - "$DATA" -mindepth 1 -prune -regex "$cpat" -o -exec rm -rfv {} 1>&2 \+ + "$DATA" -mindepth 1 -prune -regex "$cpat" \ + -o -exec rm -rfv {} 1>&2 \+ fi get_binlog @@ -1274,9 +1296,9 @@ then binlog_dir=$(dirname "$WSREP_SST_OPT_BINLOG") cd "$binlog_dir" wsrep_log_info "Cleaning the binlog directory $binlog_dir as well" - rm -fv "$WSREP_SST_OPT_BINLOG".[0-9]* 1>&2 \+ || true + rm -fv "$WSREP_SST_OPT_BINLOG".[0-9]* 1>&2 \+ || : [ -f "$WSREP_SST_OPT_BINLOG_INDEX" ] && \ - rm -fv "$WSREP_SST_OPT_BINLOG_INDEX" 1>&2 \+ || true + rm -fv "$WSREP_SST_OPT_BINLOG_INDEX" 1>&2 \+ || : cd "$OLD_PWD" fi @@ -1288,7 +1310,8 @@ then monitor_process $jpid if [ ! -s "$DATA/xtrabackup_checkpoints" ]; then - wsrep_log_error "xtrabackup_checkpoints missing, failed xtrabackup/SST on donor" + wsrep_log_error "xtrabackup_checkpoints missing," \ + "failed xtrabackup/SST on donor" exit 2 fi @@ -1305,7 +1328,7 @@ then if [ -n "$qpfiles" ]; then wsrep_log_info "Compressed qpress files found" - if [ -z "$(command -v qpress)" ]; then + if [ -z "$(commandex qpress)" ]; then wsrep_log_error "qpress utility not found in the path" exit 22 fi @@ -1328,14 +1351,17 @@ then # Decompress the qpress files wsrep_log_info "Decompression with $nproc threads" - timeit "Joiner-Decompression" "find '$DATA' -type f -name '*.qp' -printf '%p\n%h\n' | $dcmd" + timeit "Joiner-Decompression" \ + "find '$DATA' -type f -name '*.qp' -printf '%p\n%h\n' | $dcmd" extcode=$? if [ $extcode -eq 0 ]; then wsrep_log_info "Removing qpress files after decompression" find "$DATA" -type f -name '*.qp' -delete if [ $? -ne 0 ]; then - wsrep_log_error "Something went wrong with deletion of qpress files. Investigate" + wsrep_log_error \ + "Something went wrong with deletion of qpress files." \ + "Investigate" fi else wsrep_log_error "Decompression failed. Exit code: $extcode" @@ -1349,7 +1375,7 @@ then BINLOG_FILENAME=$(basename "$WSREP_SST_OPT_BINLOG") # To avoid comparing data directory and BINLOG_DIRNAME - mv "$DATA/$BINLOG_FILENAME".* "$BINLOG_DIRNAME/" 2>/dev/null || true + mv "$DATA/$BINLOG_FILENAME".* "$BINLOG_DIRNAME/" 2>/dev/null || : cd "$BINLOG_DIRNAME" for bfile in $(ls -1 "$BINLOG_FILENAME".[0-9]*); do @@ -1364,12 +1390,11 @@ then timeit "Xtrabackup prepare stage" "$INNOAPPLY" if [ $? -ne 0 ]; then - wsrep_log_error "xtrabackup apply finished with errors. Check '$INNOAPPLYLOG' for details" + wsrep_log_error "xtrabackup apply finished with errors." \ + "Check syslog or '$INNOAPPLYLOG' for details." exit 22 fi - # [ -f "$INNOAPPLYLOG" ] && rm "$INNOAPPLYLOG" - MAGIC_FILE="$TDATA/$INFO_FILE" wsrep_log_info "Moving the backup to $TDATA" diff --git a/scripts/wsrep_sst_xtrabackup.sh b/scripts/wsrep_sst_xtrabackup.sh index b84aca4866e0e..de7b771bd2d47 100644 --- a/scripts/wsrep_sst_xtrabackup.sh +++ b/scripts/wsrep_sst_xtrabackup.sh @@ -17,7 +17,7 @@ # MA 02110-1335 USA. # Optional dependencies and options documented here: -# http://www.percona.com/doc/percona-xtradb-cluster/manual/xtrabackup_sst.html +# https://www.percona.com/doc/percona-xtradb-cluster/manual/xtrabackup_sst.html # Make sure to read that before proceeding! . $(dirname "$0")/wsrep_sst_common @@ -64,9 +64,6 @@ INFO_FILE="xtrabackup_galera_info" IST_FILE="xtrabackup_ist" MAGIC_FILE="${DATA}/${INFO_FILE}" -# Setting the path for ss and ip -export PATH="/usr/sbin:/sbin:$PATH" - timeit(){ local stage="$1" shift diff --git a/vio/viosslfactories.c b/vio/viosslfactories.c index 8ab7565a666d1..08f0905e04416 100644 --- a/vio/viosslfactories.c +++ b/vio/viosslfactories.c @@ -178,6 +178,12 @@ new_VioSSLFd(const char *key_file, const char *cert_file, struct st_VioSSLFd *ssl_fd; long ssl_ctx_options= SSL_OP_NO_SSLv2 | SSL_OP_NO_SSLv3; DBUG_ENTER("new_VioSSLFd"); + + if (ca_file && ! ca_file[0]) ca_file = NULL; + if (ca_path && ! ca_path[0]) ca_path = NULL; + if (crl_file && ! crl_file[0]) crl_file = NULL; + if (crl_path && ! crl_path[0]) crl_path = NULL; + DBUG_PRINT("enter", ("key_file: '%s' cert_file: '%s' ca_file: '%s' ca_path: '%s' " "cipher: '%s' crl_file: '%s' crl_path: '%s' ", @@ -308,6 +314,11 @@ new_VioSSLConnectorFd(const char *key_file, const char *cert_file, struct st_VioSSLFd *ssl_fd; int verify= SSL_VERIFY_PEER; + if (ca_file && ! ca_file[0]) ca_file = NULL; + if (ca_path && ! ca_path[0]) ca_path = NULL; + if (crl_file && ! crl_file[0]) crl_file = NULL; + if (crl_path && ! crl_path[0]) crl_path = NULL; + /* Turn off verification of servers certificate if both ca_file and ca_path is set to NULL @@ -339,6 +350,12 @@ new_VioSSLAcceptorFd(const char *key_file, const char *cert_file, { struct st_VioSSLFd *ssl_fd; int verify= SSL_VERIFY_PEER | SSL_VERIFY_CLIENT_ONCE; + + if (ca_file && ! ca_file[0]) ca_file = NULL; + if (ca_path && ! ca_path[0]) ca_path = NULL; + if (crl_file && ! crl_file[0]) crl_file = NULL; + if (crl_path && ! crl_path[0]) crl_path = NULL; + if (!(ssl_fd= new_VioSSLFd(key_file, cert_file, ca_file, ca_path, cipher, FALSE, error, crl_file, crl_path))) From 7bc629a5ce9e1edf2c27ddfba2a55c4341d55b4f Mon Sep 17 00:00:00 2001 From: Julius Goryavsky Date: Mon, 13 Dec 2021 02:15:57 +0100 Subject: [PATCH 15/65] MDEV-27181: Galera SST scripts should use ssl_capath for CA directory 1. Galera SST scripts should use ssl_capath (not ssl_ca) for CA directory. The current implementation tries to automatically detect the path using the trailing slash in the ssl_ca variable value, but this approach is not compatible with the server configuration. Now, by analogy with the server, SST scripts also use a separate ssl_capath variable. In addition, a similar tcapath variable has been added for the old-style configuration (in the "sst" section). 2. Openssl utility detection made more reliable. 3. Removed extra spaces in automatically generated command lines - to simplify debugging of the SST scripts. 4. In general, the code for detecting the presence or absence of auxiliary utilities has been improved - it is made more reliable in some configurations (and for shells other than bash). --- mysql-test/std_data/capath/3106f582.0 | 1 + mysql-test/std_data/capath/cacert.pem | 79 ++++ mysql-test/std_data/capath/ed1f42db.0 | 1 + mysql-test/suite/galera/disabled.def | 1 - ...alera_sst_rsync_encrypt_with_capath.result | 398 ++++++++++++++++++ .../galera_sst_rsync_encrypt_with_key.result | 2 - ...alera_sst_rsync_encrypt_with_server.result | 2 - .../galera_sst_mariabackup_table_options.test | 1 + .../galera_sst_rsync_encrypt_with_capath.cnf | 20 + .../galera_sst_rsync_encrypt_with_capath.test | 26 ++ .../t/galera_sst_rsync_encrypt_with_key.test | 3 - .../galera_sst_rsync_encrypt_with_server.test | 3 - .../t/galera_ipv6_mariabackup.test | 1 + .../t/galera_ipv6_mariabackup_section.test | 1 + scripts/wsrep_sst_common.sh | 142 ++++--- scripts/wsrep_sst_mariabackup.sh | 292 +++++++------ scripts/wsrep_sst_mysqldump.sh | 11 +- scripts/wsrep_sst_rsync.sh | 117 ++--- vio/viosslfactories.c | 17 + 19 files changed, 859 insertions(+), 259 deletions(-) create mode 120000 mysql-test/std_data/capath/3106f582.0 create mode 100644 mysql-test/std_data/capath/cacert.pem create mode 120000 mysql-test/std_data/capath/ed1f42db.0 create mode 100644 mysql-test/suite/galera/r/galera_sst_rsync_encrypt_with_capath.result create mode 100644 mysql-test/suite/galera/t/galera_sst_rsync_encrypt_with_capath.cnf create mode 100644 mysql-test/suite/galera/t/galera_sst_rsync_encrypt_with_capath.test diff --git a/mysql-test/std_data/capath/3106f582.0 b/mysql-test/std_data/capath/3106f582.0 new file mode 120000 index 0000000000000..1310cfcff205a --- /dev/null +++ b/mysql-test/std_data/capath/3106f582.0 @@ -0,0 +1 @@ +cacert.pem \ No newline at end of file diff --git a/mysql-test/std_data/capath/cacert.pem b/mysql-test/std_data/capath/cacert.pem new file mode 100644 index 0000000000000..23dda2318e150 --- /dev/null +++ b/mysql-test/std_data/capath/cacert.pem @@ -0,0 +1,79 @@ +Certificate: + Data: + Version: 3 (0x2) + Serial Number: + d0:4d:23:85:ee:59:b3:fa + Signature Algorithm: sha256WithRSAEncryption + Issuer: CN=cacert, C=FI, ST=Helsinki, L=Helsinki, O=MariaDB + Validity + Not Before: Jan 27 10:11:10 2019 GMT + Not After : Jan 22 10:11:10 2039 GMT + Subject: CN=cacert, C=FI, ST=Helsinki, L=Helsinki, O=MariaDB + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + Public-Key: (2048 bit) + Modulus: + 00:e8:0e:a7:84:d3:75:30:06:30:b2:10:b9:d1:88: + 36:2b:5e:f8:c8:44:57:cb:67:72:ab:96:95:33:d5: + 88:d1:8f:23:50:98:ba:6d:20:00:80:bd:35:d5:c1: + bf:98:49:c4:0a:15:4a:34:a6:21:9b:2e:8c:15:09: + f0:63:81:02:c2:7c:e2:53:e0:f7:a1:1a:40:5e:8f: + 41:4a:4c:56:d4:20:f1:d5:a7:c1:53:2e:ff:7e:37: + 17:cc:7e:74:bd:e2:22:33:ce:8c:77:62:a4:c5:3f: + 44:35:7b:7e:b9:f5:7d:8c:7a:27:58:fd:2c:42:86: + 2e:e7:6b:01:99:7b:fe:7d:a7:a1:4f:3e:39:39:54: + 1f:61:de:74:66:d1:77:4f:43:1b:66:70:29:85:de: + fc:8f:8e:1b:7b:a2:66:48:26:7f:9b:a6:fd:4a:e4: + dc:eb:ed:bd:f8:e3:f1:57:98:13:6f:f1:a3:2a:e3: + 73:bd:8d:7c:6f:4b:59:35:bc:b5:42:3e:99:a7:13: + 8d:be:2e:5c:9a:c6:5b:ab:ae:bf:00:e9:c8:ee:05: + 22:8e:d5:67:1a:47:9a:6d:9c:f9:42:3e:15:34:f8: + 31:ec:b4:7e:d3:92:95:b0:b8:f9:66:f3:bd:1d:31: + 2c:b1:90:62:a1:f8:4e:a6:5d:26:22:f0:e1:fe:16: + 2b:69 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Subject Key Identifier: + CA:71:99:89:F0:72:AB:75:66:BB:65:6A:03:04:72:A5:7B:95:A6:93 + X509v3 Authority Key Identifier: + keyid:CA:71:99:89:F0:72:AB:75:66:BB:65:6A:03:04:72:A5:7B:95:A6:93 + + X509v3 Basic Constraints: + CA:TRUE + Signature Algorithm: sha256WithRSAEncryption + df:fd:74:29:5b:5e:9a:8b:09:02:40:59:73:cb:71:47:3f:97: + 3d:a9:fd:c4:8c:01:29:c9:86:b8:71:55:ff:72:0e:50:dc:c8: + b5:e6:91:41:52:47:21:30:cc:4d:e7:3b:4b:db:55:ea:7d:46: + eb:53:e0:b7:1b:80:7c:b1:0c:d3:d1:bc:a0:73:ae:96:1f:fd: + 05:52:7e:54:d5:03:52:69:7b:34:5f:27:d7:98:da:98:76:73: + e6:bb:50:59:2a:94:90:67:03:1c:a4:76:2f:ee:ef:59:60:09: + 48:33:03:2b:52:ed:83:42:f8:71:19:7f:d8:be:40:ed:20:01: + 90:3c:7e:1c:8b:d2:9f:f3:2f:09:1f:50:c8:10:e1:8a:d9:a5: + 49:9c:0b:74:17:b9:2b:68:f6:1e:73:c2:73:10:38:b3:35:e2: + 87:91:1b:a1:d1:9b:81:9d:1b:32:cc:03:6e:4c:82:95:81:11: + 42:56:e2:16:2b:22:65:db:40:2c:ca:dc:03:f4:d5:07:cf:f5: + 13:b2:cf:51:5b:24:cd:c7:d1:9b:42:8e:f9:df:5d:1e:5a:09: + a3:4f:a9:0b:f4:21:c5:bb:ff:02:93:67:e8:2d:ee:ab:d9:59: + 76:03:2c:a1:bd:fb:dc:af:b6:82:94:71:85:53:a8:18:0d:3a: + 9e:42:eb:59 +-----BEGIN CERTIFICATE----- +MIIDfzCCAmegAwIBAgIJANBNI4XuWbP6MA0GCSqGSIb3DQEBCwUAMFYxDzANBgNV +BAMMBmNhY2VydDELMAkGA1UEBhMCRkkxETAPBgNVBAgMCEhlbHNpbmtpMREwDwYD +VQQHDAhIZWxzaW5raTEQMA4GA1UECgwHTWFyaWFEQjAeFw0xOTAxMjcxMDExMTBa +Fw0zOTAxMjIxMDExMTBaMFYxDzANBgNVBAMMBmNhY2VydDELMAkGA1UEBhMCRkkx +ETAPBgNVBAgMCEhlbHNpbmtpMREwDwYDVQQHDAhIZWxzaW5raTEQMA4GA1UECgwH +TWFyaWFEQjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOgOp4TTdTAG +MLIQudGINite+MhEV8tncquWlTPViNGPI1CYum0gAIC9NdXBv5hJxAoVSjSmIZsu +jBUJ8GOBAsJ84lPg96EaQF6PQUpMVtQg8dWnwVMu/343F8x+dL3iIjPOjHdipMU/ +RDV7frn1fYx6J1j9LEKGLudrAZl7/n2noU8+OTlUH2HedGbRd09DG2ZwKYXe/I+O +G3uiZkgmf5um/Urk3Ovtvfjj8VeYE2/xoyrjc72NfG9LWTW8tUI+macTjb4uXJrG +W6uuvwDpyO4FIo7VZxpHmm2c+UI+FTT4Mey0ftOSlbC4+WbzvR0xLLGQYqH4TqZd +JiLw4f4WK2kCAwEAAaNQME4wHQYDVR0OBBYEFMpxmYnwcqt1ZrtlagMEcqV7laaT +MB8GA1UdIwQYMBaAFMpxmYnwcqt1ZrtlagMEcqV7laaTMAwGA1UdEwQFMAMBAf8w +DQYJKoZIhvcNAQELBQADggEBAN/9dClbXpqLCQJAWXPLcUc/lz2p/cSMASnJhrhx +Vf9yDlDcyLXmkUFSRyEwzE3nO0vbVep9RutT4LcbgHyxDNPRvKBzrpYf/QVSflTV +A1JpezRfJ9eY2ph2c+a7UFkqlJBnAxykdi/u71lgCUgzAytS7YNC+HEZf9i+QO0g +AZA8fhyL0p/zLwkfUMgQ4YrZpUmcC3QXuSto9h5zwnMQOLM14oeRG6HRm4GdGzLM +A25MgpWBEUJW4hYrImXbQCzK3AP01QfP9ROyz1FbJM3H0ZtCjvnfXR5aCaNPqQv0 +IcW7/wKTZ+gt7qvZWXYDLKG9+9yvtoKUcYVTqBgNOp5C61k= +-----END CERTIFICATE----- diff --git a/mysql-test/std_data/capath/ed1f42db.0 b/mysql-test/std_data/capath/ed1f42db.0 new file mode 120000 index 0000000000000..1310cfcff205a --- /dev/null +++ b/mysql-test/std_data/capath/ed1f42db.0 @@ -0,0 +1 @@ +cacert.pem \ No newline at end of file diff --git a/mysql-test/suite/galera/disabled.def b/mysql-test/suite/galera/disabled.def index d92f3f7d6b8b5..955a2c82ebcf3 100644 --- a/mysql-test/suite/galera/disabled.def +++ b/mysql-test/suite/galera/disabled.def @@ -29,5 +29,4 @@ versioning_trx_id: MDEV-18590: galera.versioning_trx_id: Test failure: mysqltest galera_wsrep_provider_unset_set: wsrep_provider is read-only for security reasons pxc-421: wsrep_provider is read-only for security reasons galera_sst_xtrabackup-v2: Test fails due to innodb issues -galera_sst_xtrabackup-v2_encrypt_with_key: Test fails due to innodb issues galera_sst_xtrabackup-v2_data_dir: Test fails due to innodb issues diff --git a/mysql-test/suite/galera/r/galera_sst_rsync_encrypt_with_capath.result b/mysql-test/suite/galera/r/galera_sst_rsync_encrypt_with_capath.result new file mode 100644 index 0000000000000..170ba62dd129f --- /dev/null +++ b/mysql-test/suite/galera/r/galera_sst_rsync_encrypt_with_capath.result @@ -0,0 +1,398 @@ +connection node_1; +connection node_2; +connection node_1; +Performing State Transfer on a server that has been shut down cleanly and restarted +connection node_1; +CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES ('node1_committed_before'); +INSERT INTO t1 VALUES ('node1_committed_before'); +INSERT INTO t1 VALUES ('node1_committed_before'); +INSERT INTO t1 VALUES ('node1_committed_before'); +INSERT INTO t1 VALUES ('node1_committed_before'); +COMMIT; +connection node_2; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES ('node2_committed_before'); +INSERT INTO t1 VALUES ('node2_committed_before'); +INSERT INTO t1 VALUES ('node2_committed_before'); +INSERT INTO t1 VALUES ('node2_committed_before'); +INSERT INTO t1 VALUES ('node2_committed_before'); +COMMIT; +Shutting down server ... +connection node_1; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES ('node1_committed_during'); +INSERT INTO t1 VALUES ('node1_committed_during'); +INSERT INTO t1 VALUES ('node1_committed_during'); +INSERT INTO t1 VALUES ('node1_committed_during'); +INSERT INTO t1 VALUES ('node1_committed_during'); +COMMIT; +START TRANSACTION; +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +connect node_1a_galera_st_shutdown_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +connection node_2; +Starting server ... +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES ('node2_committed_after'); +INSERT INTO t1 VALUES ('node2_committed_after'); +INSERT INTO t1 VALUES ('node2_committed_after'); +INSERT INTO t1 VALUES ('node2_committed_after'); +INSERT INTO t1 VALUES ('node2_committed_after'); +COMMIT; +connection node_1; +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +COMMIT; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES ('node1_committed_after'); +INSERT INTO t1 VALUES ('node1_committed_after'); +INSERT INTO t1 VALUES ('node1_committed_after'); +INSERT INTO t1 VALUES ('node1_committed_after'); +INSERT INTO t1 VALUES ('node1_committed_after'); +COMMIT; +connection node_1a_galera_st_shutdown_slave; +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +ROLLBACK; +SELECT COUNT(*) = 35 FROM t1; +COUNT(*) = 35 +1 +SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; +COUNT(*) = 0 +1 +COMMIT; +SET AUTOCOMMIT=ON; +connection node_1; +SELECT COUNT(*) = 35 FROM t1; +COUNT(*) = 35 +1 +SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; +COUNT(*) = 0 +1 +DROP TABLE t1; +COMMIT; +SET AUTOCOMMIT=ON; +Performing State Transfer on a server that starts from a clean var directory +This is accomplished by shutting down node #2 and removing its var directory before restarting it +connection node_1; +CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES ('node1_committed_before'); +INSERT INTO t1 VALUES ('node1_committed_before'); +INSERT INTO t1 VALUES ('node1_committed_before'); +INSERT INTO t1 VALUES ('node1_committed_before'); +INSERT INTO t1 VALUES ('node1_committed_before'); +COMMIT; +connection node_2; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES ('node2_committed_before'); +INSERT INTO t1 VALUES ('node2_committed_before'); +INSERT INTO t1 VALUES ('node2_committed_before'); +INSERT INTO t1 VALUES ('node2_committed_before'); +INSERT INTO t1 VALUES ('node2_committed_before'); +COMMIT; +Shutting down server ... +connection node_1; +Cleaning var directory ... +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES ('node1_committed_during'); +INSERT INTO t1 VALUES ('node1_committed_during'); +INSERT INTO t1 VALUES ('node1_committed_during'); +INSERT INTO t1 VALUES ('node1_committed_during'); +INSERT INTO t1 VALUES ('node1_committed_during'); +COMMIT; +START TRANSACTION; +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +connect node_1a_galera_st_clean_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +connection node_2; +Starting server ... +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES ('node2_committed_after'); +INSERT INTO t1 VALUES ('node2_committed_after'); +INSERT INTO t1 VALUES ('node2_committed_after'); +INSERT INTO t1 VALUES ('node2_committed_after'); +INSERT INTO t1 VALUES ('node2_committed_after'); +COMMIT; +connection node_1; +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +COMMIT; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES ('node1_committed_after'); +INSERT INTO t1 VALUES ('node1_committed_after'); +INSERT INTO t1 VALUES ('node1_committed_after'); +INSERT INTO t1 VALUES ('node1_committed_after'); +INSERT INTO t1 VALUES ('node1_committed_after'); +COMMIT; +connection node_1a_galera_st_clean_slave; +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +ROLLBACK; +SELECT COUNT(*) = 35 FROM t1; +COUNT(*) = 35 +1 +SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; +COUNT(*) = 0 +1 +COMMIT; +SET AUTOCOMMIT=ON; +connection node_1; +SELECT COUNT(*) = 35 FROM t1; +COUNT(*) = 35 +1 +SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; +COUNT(*) = 0 +1 +DROP TABLE t1; +COMMIT; +SET AUTOCOMMIT=ON; +Performing State Transfer on a server that has been killed and restarted +connection node_1; +CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES ('node1_committed_before'); +INSERT INTO t1 VALUES ('node1_committed_before'); +INSERT INTO t1 VALUES ('node1_committed_before'); +INSERT INTO t1 VALUES ('node1_committed_before'); +INSERT INTO t1 VALUES ('node1_committed_before'); +COMMIT; +connection node_2; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES ('node2_committed_before'); +INSERT INTO t1 VALUES ('node2_committed_before'); +INSERT INTO t1 VALUES ('node2_committed_before'); +INSERT INTO t1 VALUES ('node2_committed_before'); +INSERT INTO t1 VALUES ('node2_committed_before'); +COMMIT; +Killing server ... +connection node_1; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES ('node1_committed_during'); +INSERT INTO t1 VALUES ('node1_committed_during'); +INSERT INTO t1 VALUES ('node1_committed_during'); +INSERT INTO t1 VALUES ('node1_committed_during'); +INSERT INTO t1 VALUES ('node1_committed_during'); +COMMIT; +START TRANSACTION; +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +connect node_1a_galera_st_kill_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +connection node_2; +Performing --wsrep-recover ... +Starting server ... +Using --wsrep-start-position when starting mysqld ... +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES ('node2_committed_after'); +INSERT INTO t1 VALUES ('node2_committed_after'); +INSERT INTO t1 VALUES ('node2_committed_after'); +INSERT INTO t1 VALUES ('node2_committed_after'); +INSERT INTO t1 VALUES ('node2_committed_after'); +COMMIT; +connection node_1; +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +COMMIT; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES ('node1_committed_after'); +INSERT INTO t1 VALUES ('node1_committed_after'); +INSERT INTO t1 VALUES ('node1_committed_after'); +INSERT INTO t1 VALUES ('node1_committed_after'); +INSERT INTO t1 VALUES ('node1_committed_after'); +COMMIT; +connection node_1a_galera_st_kill_slave; +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +ROLLBACK; +SELECT COUNT(*) = 35 FROM t1; +COUNT(*) = 35 +1 +SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; +COUNT(*) = 0 +1 +COMMIT; +SET AUTOCOMMIT=ON; +connection node_1; +SELECT COUNT(*) = 35 FROM t1; +COUNT(*) = 35 +1 +SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; +COUNT(*) = 0 +1 +DROP TABLE t1; +COMMIT; +SET AUTOCOMMIT=ON; +Performing State Transfer on a server that has been killed and restarted +while a DDL was in progress on it +connection node_1; +CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES ('node1_committed_before'); +INSERT INTO t1 VALUES ('node1_committed_before'); +INSERT INTO t1 VALUES ('node1_committed_before'); +INSERT INTO t1 VALUES ('node1_committed_before'); +INSERT INTO t1 VALUES ('node1_committed_before'); +connection node_2; +START TRANSACTION; +INSERT INTO t1 VALUES ('node2_committed_before'); +INSERT INTO t1 VALUES ('node2_committed_before'); +INSERT INTO t1 VALUES ('node2_committed_before'); +INSERT INTO t1 VALUES ('node2_committed_before'); +INSERT INTO t1 VALUES ('node2_committed_before'); +COMMIT; +SET GLOBAL debug_dbug = 'd,sync.alter_opened_table'; +connection node_1; +ALTER TABLE t1 ADD COLUMN f2 INTEGER; +connection node_2; +SET wsrep_sync_wait = 0; +Killing server ... +connection node_1; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 (f1) VALUES ('node1_committed_during'); +INSERT INTO t1 (f1) VALUES ('node1_committed_during'); +INSERT INTO t1 (f1) VALUES ('node1_committed_during'); +INSERT INTO t1 (f1) VALUES ('node1_committed_during'); +INSERT INTO t1 (f1) VALUES ('node1_committed_during'); +COMMIT; +START TRANSACTION; +INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); +connect node_1a_galera_st_kill_slave_ddl, 127.0.0.1, root, , test, $NODE_MYPORT_1; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); +connection node_2; +Performing --wsrep-recover ... +connection node_2; +Starting server ... +Using --wsrep-start-position when starting mysqld ... +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 (f1) VALUES ('node2_committed_after'); +INSERT INTO t1 (f1) VALUES ('node2_committed_after'); +INSERT INTO t1 (f1) VALUES ('node2_committed_after'); +INSERT INTO t1 (f1) VALUES ('node2_committed_after'); +INSERT INTO t1 (f1) VALUES ('node2_committed_after'); +COMMIT; +connection node_1; +INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); +COMMIT; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 (f1) VALUES ('node1_committed_after'); +INSERT INTO t1 (f1) VALUES ('node1_committed_after'); +INSERT INTO t1 (f1) VALUES ('node1_committed_after'); +INSERT INTO t1 (f1) VALUES ('node1_committed_after'); +INSERT INTO t1 (f1) VALUES ('node1_committed_after'); +COMMIT; +connection node_1a_galera_st_kill_slave_ddl; +INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); +ROLLBACK; +SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1'; +COUNT(*) = 2 +1 +SELECT COUNT(*) = 35 FROM t1; +COUNT(*) = 35 +1 +SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; +COUNT(*) = 0 +1 +COMMIT; +SET AUTOCOMMIT=ON; +connection node_1; +SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1'; +COUNT(*) = 2 +1 +SELECT COUNT(*) = 35 FROM t1; +COUNT(*) = 35 +1 +SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; +COUNT(*) = 0 +1 +DROP TABLE t1; +COMMIT; +SET AUTOCOMMIT=ON; +SET GLOBAL debug_dbug = $debug_orig; +include/assert_grep.inc [Using stunnel for SSL encryption] diff --git a/mysql-test/suite/galera/r/galera_sst_rsync_encrypt_with_key.result b/mysql-test/suite/galera/r/galera_sst_rsync_encrypt_with_key.result index 251c087412b6c..170ba62dd129f 100644 --- a/mysql-test/suite/galera/r/galera_sst_rsync_encrypt_with_key.result +++ b/mysql-test/suite/galera/r/galera_sst_rsync_encrypt_with_key.result @@ -1,7 +1,5 @@ connection node_1; connection node_2; -connection node_2; -CALL mtr.add_suppression("\\[ERROR\\] .*ib_buffer_pool' for reading: No such file or directory"); connection node_1; Performing State Transfer on a server that has been shut down cleanly and restarted connection node_1; diff --git a/mysql-test/suite/galera/r/galera_sst_rsync_encrypt_with_server.result b/mysql-test/suite/galera/r/galera_sst_rsync_encrypt_with_server.result index 251c087412b6c..170ba62dd129f 100644 --- a/mysql-test/suite/galera/r/galera_sst_rsync_encrypt_with_server.result +++ b/mysql-test/suite/galera/r/galera_sst_rsync_encrypt_with_server.result @@ -1,7 +1,5 @@ connection node_1; connection node_2; -connection node_2; -CALL mtr.add_suppression("\\[ERROR\\] .*ib_buffer_pool' for reading: No such file or directory"); connection node_1; Performing State Transfer on a server that has been shut down cleanly and restarted connection node_1; diff --git a/mysql-test/suite/galera/t/galera_sst_mariabackup_table_options.test b/mysql-test/suite/galera/t/galera_sst_mariabackup_table_options.test index 953a163555977..7a3a6c825c497 100644 --- a/mysql-test/suite/galera/t/galera_sst_mariabackup_table_options.test +++ b/mysql-test/suite/galera/t/galera_sst_mariabackup_table_options.test @@ -66,6 +66,7 @@ COMMIT; --source include/wait_condition.inc --echo Cleaning var directory ... +--remove_file $MYSQLTEST_VARDIR/mysqld.2/data/grastate.dat --remove_files_wildcard $MYSQLTEST_VARDIR/mysqld.2/data/mtr --remove_files_wildcard $MYSQLTEST_VARDIR/mysqld.2/data/performance_schema --remove_files_wildcard $MYSQLTEST_VARDIR/mysqld.2/data/test diff --git a/mysql-test/suite/galera/t/galera_sst_rsync_encrypt_with_capath.cnf b/mysql-test/suite/galera/t/galera_sst_rsync_encrypt_with_capath.cnf new file mode 100644 index 0000000000000..3ab762df013b6 --- /dev/null +++ b/mysql-test/suite/galera/t/galera_sst_rsync_encrypt_with_capath.cnf @@ -0,0 +1,20 @@ +!include ../galera_2nodes.cnf + +[mysqld] +wsrep_sst_method=rsync +ssl-cert=@ENV.MYSQL_TEST_DIR/std_data/server-cert.pem +ssl-key=@ENV.MYSQL_TEST_DIR/std_data/server-key.pem +ssl-capath=@ENV.MYSQL_TEST_DIR/std_data/capath +# We need to turn off the default setting for the duration +# of the test (to test working with a directory instead of +# a file): +ssl-ca= + +[sst] +ssl-mode=VERIFY_CA + +[mysqld.1] +wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcache.size=1;pc.ignore_sb=true' + +[mysqld.2] +wsrep_provider_options='base_port=@mysqld.2.#galera_port;gcache.size=1;pc.ignore_sb=true' diff --git a/mysql-test/suite/galera/t/galera_sst_rsync_encrypt_with_capath.test b/mysql-test/suite/galera/t/galera_sst_rsync_encrypt_with_capath.test new file mode 100644 index 0000000000000..a2d92723ec485 --- /dev/null +++ b/mysql-test/suite/galera/t/galera_sst_rsync_encrypt_with_capath.test @@ -0,0 +1,26 @@ +--source include/big_test.inc +--source include/galera_cluster.inc +--source include/have_debug.inc +--source include/have_stunnel.inc + +# Save original auto_increment_offset values. +--let $node_1=node_1 +--let $node_2=node_2 +--source include/auto_increment_offset_save.inc + +--connection node_1 +--source suite/galera/include/galera_st_shutdown_slave.inc +--source suite/galera/include/galera_st_clean_slave.inc + +--source suite/galera/include/galera_st_kill_slave.inc +--source suite/galera/include/galera_st_kill_slave_ddl.inc + +# Confirm that transfer was SSL-encrypted +--let $assert_text = Using stunnel for SSL encryption +--let $assert_select = Using stunnel for SSL encryption +--let $assert_count = 5 +--let $assert_file = $MYSQLTEST_VARDIR/log/mysqld.1.err +--let $assert_only_after = CURRENT_TEST +--source include/assert_grep.inc + +--source include/auto_increment_offset_restore.inc diff --git a/mysql-test/suite/galera/t/galera_sst_rsync_encrypt_with_key.test b/mysql-test/suite/galera/t/galera_sst_rsync_encrypt_with_key.test index 838c473b9ce12..a2d92723ec485 100644 --- a/mysql-test/suite/galera/t/galera_sst_rsync_encrypt_with_key.test +++ b/mysql-test/suite/galera/t/galera_sst_rsync_encrypt_with_key.test @@ -8,9 +8,6 @@ --let $node_2=node_2 --source include/auto_increment_offset_save.inc ---connection node_2 -CALL mtr.add_suppression("\\[ERROR\\] .*ib_buffer_pool' for reading: No such file or directory"); - --connection node_1 --source suite/galera/include/galera_st_shutdown_slave.inc --source suite/galera/include/galera_st_clean_slave.inc diff --git a/mysql-test/suite/galera/t/galera_sst_rsync_encrypt_with_server.test b/mysql-test/suite/galera/t/galera_sst_rsync_encrypt_with_server.test index 838c473b9ce12..a2d92723ec485 100644 --- a/mysql-test/suite/galera/t/galera_sst_rsync_encrypt_with_server.test +++ b/mysql-test/suite/galera/t/galera_sst_rsync_encrypt_with_server.test @@ -8,9 +8,6 @@ --let $node_2=node_2 --source include/auto_increment_offset_save.inc ---connection node_2 -CALL mtr.add_suppression("\\[ERROR\\] .*ib_buffer_pool' for reading: No such file or directory"); - --connection node_1 --source suite/galera/include/galera_st_shutdown_slave.inc --source suite/galera/include/galera_st_clean_slave.inc diff --git a/mysql-test/suite/galera_3nodes/t/galera_ipv6_mariabackup.test b/mysql-test/suite/galera_3nodes/t/galera_ipv6_mariabackup.test index dc3331d1be375..2bb2bb284e9fa 100644 --- a/mysql-test/suite/galera_3nodes/t/galera_ipv6_mariabackup.test +++ b/mysql-test/suite/galera_3nodes/t/galera_ipv6_mariabackup.test @@ -1,3 +1,4 @@ +--source include/big_test.inc --source include/galera_cluster.inc --source include/check_ipv6.inc --source include/have_innodb.inc diff --git a/mysql-test/suite/galera_3nodes/t/galera_ipv6_mariabackup_section.test b/mysql-test/suite/galera_3nodes/t/galera_ipv6_mariabackup_section.test index c88ff99790c07..86607e61542f4 100644 --- a/mysql-test/suite/galera_3nodes/t/galera_ipv6_mariabackup_section.test +++ b/mysql-test/suite/galera_3nodes/t/galera_ipv6_mariabackup_section.test @@ -1,3 +1,4 @@ +--source include/big_test.inc --source include/galera_cluster.inc --source include/check_ipv6.inc --source include/have_innodb.inc diff --git a/scripts/wsrep_sst_common.sh b/scripts/wsrep_sst_common.sh index dbd639595dfd6..5c84aa7c17f57 100644 --- a/scripts/wsrep_sst_common.sh +++ b/scripts/wsrep_sst_common.sh @@ -19,6 +19,9 @@ set -u +# Setting the path for some utilities on CentOS +export PATH="$PATH:/usr/sbin:/usr/bin:/sbin:/bin" + WSREP_SST_OPT_BYPASS=0 WSREP_SST_OPT_BINLOG="" WSREP_SST_OPT_BINLOG_INDEX="" @@ -384,10 +387,8 @@ case "$1" in skip_mysqld_arg=1 ;; '--innodb-force-recovery') - if [ -n "$value" ]; then - if [ "$value" -ne 0 ]; then - INNODB_FORCE_RECOVERY="$value" - fi + if [ -n "$value" -a "$value" != "0" ]; then + INNODB_FORCE_RECOVERY="$value" fi skip_mysqld_arg=1 ;; @@ -584,7 +585,8 @@ get_binlog() if [ -n "$WSREP_SST_OPT_ADDR_PORT" ]; then if [ -n "$WSREP_SST_OPT_PORT" ]; then if [ "$WSREP_SST_OPT_PORT" != "$WSREP_SST_OPT_ADDR_PORT" ]; then - echo "WSREP_SST: [ERROR] port in --port=$WSREP_SST_OPT_PORT differs from port in --address=$WSREP_SST_OPT_ADDR" >&2 + echo "WSREP_SST: [ERROR] port in --port=$WSREP_SST_OPT_PORT" \ + "differs from port in --address=$WSREP_SST_OPT_ADDR" >&2 exit 2 fi else @@ -616,8 +618,19 @@ fi readonly WSREP_SST_OPT_ADDR readonly WSREP_SST_OPT_ADDR_PORT -# try to use my_print_defaults, mysql and mysqldump that come with the sources -# (for MTR suite) +commandex() +{ + if [ -n "$BASH_VERSION" ]; then + command -v "$1" || : + elif [ -x "$1" ]; then + echo "$1" + else + which "$1" || : + fi +} + +# try to use my_print_defaults, mysql and mysqldump that come +# with the sources (for MTR suite): script_binary=$(dirname "$0") SCRIPTS_DIR=$(cd "$script_binary"; pwd -P) EXTRA_DIR="$SCRIPTS_DIR/../extra" @@ -626,13 +639,13 @@ CLIENT_DIR="$SCRIPTS_DIR/../client" if [ -x "$CLIENT_DIR/mysql" ]; then MYSQL_CLIENT="$CLIENT_DIR/mysql" else - MYSQL_CLIENT="$(command -v mysql)" + MYSQL_CLIENT=$(commandex 'mysql') fi if [ -x "$CLIENT_DIR/mysqldump" ]; then MYSQLDUMP="$CLIENT_DIR/mysqldump" else - MYSQLDUMP="$(command -v mysqldump)" + MYSQLDUMP=$(commandex 'mysqldump') fi wsrep_log() @@ -663,7 +676,7 @@ if [ -x "$SCRIPTS_DIR/my_print_defaults" ]; then elif [ -x "$EXTRA_DIR/my_print_defaults" ]; then MY_PRINT_DEFAULTS="$EXTRA_DIR/my_print_defaults" else - MY_PRINT_DEFAULTS="$(command -v my_print_defaults)" + MY_PRINT_DEFAULTS=$(commandex 'my_print_defaults') if [ -z "$MY_PRINT_DEFAULTS" ]; then wsrep_log_error "my_print_defaults not found in path" exit 2 @@ -673,16 +686,16 @@ fi readonly MY_PRINT_DEFAULTS wsrep_defaults="$WSREP_SST_OPT_DEFAULTS" -wsrep_defaults="$wsrep_defaults${wsrep_defaults:+ }$WSREP_SST_OPT_EXTRA_DEFAULTS" -wsrep_defaults="$wsrep_defaults${wsrep_defaults:+ }$WSREP_SST_OPT_SUFFIX_DEFAULT" +wsrep_defaults="$wsrep_defaults${WSREP_SST_OPT_EXTRA_DEFAULTS:+ }$WSREP_SST_OPT_EXTRA_DEFAULTS" +wsrep_defaults="$wsrep_defaults${WSREP_SST_OPT_SUFFIX_DEFAULT:+ }$WSREP_SST_OPT_SUFFIX_DEFAULT" -readonly WSREP_SST_OPT_CONF="$wsrep_defaults" +readonly WSREP_SST_OPT_CONF="${wsrep_defaults:+ }$wsrep_defaults" wsrep_defaults="$WSREP_SST_OPT_DEFAULT" -wsrep_defaults="$wsrep_defaults${wsrep_defaults:+ }$WSREP_SST_OPT_EXTRA_DEFAULT" -wsrep_defaults="$wsrep_defaults${wsrep_defaults:+ }$WSREP_SST_OPT_SUFFIX_DEFAULT" +wsrep_defaults="$wsrep_defaults${WSREP_SST_OPT_EXTRA_DEFAULT:+ }$WSREP_SST_OPT_EXTRA_DEFAULT" +wsrep_defaults="$wsrep_defaults${WSREP_SST_OPT_SUFFIX_DEFAULT:+ }$WSREP_SST_OPT_SUFFIX_DEFAULT" -readonly WSREP_SST_OPT_CONF_UNQUOTED="$wsrep_defaults" +readonly WSREP_SST_OPT_CONF_UNQUOTED="${wsrep_defaults:+ }$wsrep_defaults" # # User can specify mariabackup specific settings that will be used during sst @@ -819,8 +832,7 @@ if wsrep_auth_not_set; then fi # Splitting WSREP_SST_OPT_AUTH as "user:password" pair: -if ! wsrep_auth_not_set -then +if ! wsrep_auth_not_set; then # Extract username as shortest prefix up to first ':' character: WSREP_SST_OPT_AUTH_USER="${WSREP_SST_OPT_AUTH%%:*}" if [ -z "$WSREP_SST_OPT_USER" ]; then @@ -848,8 +860,7 @@ readonly WSREP_SST_OPT_USER readonly WSREP_SST_OPT_PSWD readonly WSREP_SST_OPT_AUTH -if [ -n "$WSREP_SST_OPT_REMOTE_AUTH" ] -then +if [ -n "$WSREP_SST_OPT_REMOTE_AUTH" ]; then # Split auth string at the last ':' readonly WSREP_SST_OPT_REMOTE_USER="${WSREP_SST_OPT_REMOTE_AUTH%%:*}" readonly WSREP_SST_OPT_REMOTE_PSWD="${WSREP_SST_OPT_REMOTE_AUTH#*:}" @@ -860,8 +871,7 @@ fi readonly WSREP_SST_OPT_REMOTE_AUTH -if [ -n "$WSREP_SST_OPT_DATA" ] -then +if [ -n "$WSREP_SST_OPT_DATA" ]; then SST_PROGRESS_FILE="$WSREP_SST_OPT_DATA/sst_in_progress" else SST_PROGRESS_FILE="" @@ -870,13 +880,14 @@ fi wsrep_cleanup_progress_file() { [ -n "$SST_PROGRESS_FILE" -a \ - -f "$SST_PROGRESS_FILE" ] && rm -f "$SST_PROGRESS_FILE" 2>/dev/null || true + -f "$SST_PROGRESS_FILE" ] && \ + rm -f "$SST_PROGRESS_FILE" 2>/dev/null || : } wsrep_check_program() { local prog="$1" - local cmd=$(command -v "$prog") + local cmd=$(commandex "$prog") if [ -z "$cmd" ]; then echo "'$prog' not found in PATH" return 2 # no such file or directory @@ -898,9 +909,9 @@ wsrep_check_programs() wsrep_check_datadir() { - if [ -z "$WSREP_SST_OPT_DATA" ] - then - wsrep_log_error "The '--datadir' parameter must be passed to the SST script" + if [ -z "$WSREP_SST_OPT_DATA" ]; then + wsrep_log_error \ + "The '--datadir' parameter must be passed to the SST script" exit 2 fi } @@ -912,10 +923,10 @@ get_openssl() return fi # Let's look for openssl: - OPENSSL_BINARY="$(command -v openssl)" + OPENSSL_BINARY=$(commandex 'openssl') if [ -z "$OPENSSL_BINARY" ]; then OPENSSL_BINARY='/usr/bin/openssl' - if [ -z "$OPENSSL_BINARY" ]; then + if [ ! -x "$OPENSSL_BINARY" ]; then OPENSSL_BINARY="" fi fi @@ -928,13 +939,12 @@ get_openssl() wsrep_gen_secret() { get_openssl - if [ -n "$OPENSSL_BINARY" ] - then + if [ -n "$OPENSSL_BINARY" ]; then echo $("$OPENSSL_BINARY" rand -hex 16) else printf "%04x%04x%04x%04x%04x%04x%04x%04x" \ - $RANDOM $RANDOM $RANDOM $RANDOM \ - $RANDOM $RANDOM $RANDOM $RANDOM + $RANDOM $RANDOM $RANDOM $RANDOM \ + $RANDOM $RANDOM $RANDOM $RANDOM fi } @@ -968,14 +978,14 @@ is_local_ip() fi # Now let's check if the given address is assigned to # one of the network cards: - local ip_util="$(command -v ip)" + local ip_util=$(commandex 'ip') if [ -n "$ip_util" ]; then # ip address show ouput format is " inet[6]
/": "$ip_util" address show \ | grep -E "^[[:space:]]*inet.? [^[:space:]]+/" -o \ | grep -F " $1/" >/dev/null && return 0 else - local ifconfig_util="$(command -v ifconfig)" + local ifconfig_util=$(commandex 'ifconfig') if [ -n "$ifconfig_util" ]; then # ifconfig output format is " inet[6]
...": "$ifconfig_util" \ @@ -992,15 +1002,15 @@ check_sockets_utils() sockstat_available=0 ss_available=0 - [ -n "$(command -v lsof)" ] && lsof_available=1 - [ -n "$(command -v sockstat)" ] && sockstat_available=1 - [ -n "$(command -v ss)" ] && ss_available=1 + [ -n "$(commandex lsof)" ] && lsof_available=1 + [ -n "$(commandex sockstat)" ] && sockstat_available=1 + [ -n "$(commandex ss)" ] && ss_available=1 if [ $lsof_available -eq 0 -a \ $sockstat_available -eq 0 -a \ $ss_available -eq 0 ] then - wsrep_log_error "Neither lsof, nor sockstat or ss tool was found in " \ + wsrep_log_error "Neither lsof, nor sockstat or ss tool was found in" \ "the PATH. Make sure you have it installed." exit 2 # ENOENT fi @@ -1085,26 +1095,38 @@ check_for_dhparams() # verify_ca_matches_cert() { - local ca="$1" - local cert="$2" - local path=${3:-0} + local cert="$1" + local ca="$2" + local cap="$3" # If the openssl utility is not installed, then # we will not do this certificate check: get_openssl if [ -z "$OPENSSL_BINARY" ]; then + wsrep_log_info "openssl utility not found" return fi - local not_match=0 + local readable=1; [ ! -r "$cert" ] && readable=0 + [ -n "$ca" ] && [ ! -r "$ca" ] && readable=0 + [ -n "$cap" ] && [ ! -r "$cap" ] && readable=0 - if [ $path -eq 0 ]; then - "$OPENSSL_BINARY" verify -verbose -CAfile "$ca" "$cert" >/dev/null 2>&1 || not_match=1 - else - "$OPENSSL_BINARY" verify -verbose -CApath "$ca" "$cert" >/dev/null 2>&1 || not_match=1 + if [ readable -eq 0 ]; then + wsrep_log_error \ + "Both PEM file and CA file (or path) must be readable" + exit 22 fi + local not_match=0 + local errmsg + errmsg=$("$OPENSSL_BINARY" verify -verbose \ + ${ca:+ -CAfile} ${ca:+ "$ca"} \ + ${cap:+ -CApath} ${cap:+ "$cap"} \ + "$cert" 2>&1) || not_match=1 + if [ $not_match -eq 1 ]; then + wsrep_log_info "run: \"$OPENSSL_BINARY\" verify -verbose${ca:+ -CAfile \"$ca\"}${cap:+ -CApath \"$cap\"} \"$cert\"" + wsrep_log_info "output: $errmsg" wsrep_log_error "******** FATAL ERROR ********************************************" wsrep_log_error "* The certifcate and CA (certificate authority) do not match. *" wsrep_log_error "* It does not appear that the certificate was issued by the CA. *" @@ -1124,12 +1146,18 @@ verify_ca_matches_cert() # verify_cert_matches_key() { - local cert_path="$1" - local key_path="$2" + local cert="$1" + local key="$2" + + if [ ! -r "$key" -o ! -r "$cert" ]; then + wsrep_log_error "Both the certificate file and the key file" \ + "must be readable" + exit 22 + fi # If the diff utility is not installed, then # we will not do this certificate check: - if [ -z "$(command -v diff)" ]; then + if [ -z "$(commandex diff)" ]; then return fi @@ -1142,13 +1170,13 @@ verify_cert_matches_key() # Generate the public key from the cert and the key. # They should match (otherwise we can't create an SSL connection). - if ! diff <("$OPENSSL_BINARY" x509 -in "$cert_path" -pubkey -noout 2>/dev/null) \ - <("$OPENSSL_BINARY" pkey -in "$key_path" -pubout 2>/dev/null) >/dev/null 2>&1 + if ! diff <("$OPENSSL_BINARY" x509 -in "$cert" -pubkey -noout 2>/dev/null) \ + <("$OPENSSL_BINARY" pkey -in "$key" -pubout 2>/dev/null) >/dev/null 2>&1 then - wsrep_log_error "******************* FATAL ERROR ****************" - wsrep_log_error "* The certifcate and private key do not match. *" - wsrep_log_error "* Please check your certificate and key files. *" - wsrep_log_error "************************************************" + wsrep_log_error "******************* FATAL ERROR *****************" + wsrep_log_error "* The certificate and private key do not match. *" + wsrep_log_error "* Please check your certificate and key files. *" + wsrep_log_error "*************************************************" exit 22 fi } @@ -1305,9 +1333,9 @@ get_proc() elif [ "$OS" = 'Darwin' -o "$OS" = 'FreeBSD' ]; then nproc=$(sysctl -n hw.ncpu) fi + set -e if [ -z "$nproc" ] || [ $nproc -eq 0 ]; then nproc=1 fi - set -e fi } diff --git a/scripts/wsrep_sst_mariabackup.sh b/scripts/wsrep_sst_mariabackup.sh index b429a9effd562..4bca785fcadb0 100644 --- a/scripts/wsrep_sst_mariabackup.sh +++ b/scripts/wsrep_sst_mariabackup.sh @@ -20,10 +20,11 @@ # https://mariadb.com/kb/en/mariabackup-overview/ # Make sure to read that before proceeding! +OS="$(uname)" + . $(dirname "$0")/wsrep_sst_common wsrep_check_datadir -OS="$(uname)" ealgo="" eformat="" ekey="" @@ -34,7 +35,7 @@ ssyslog="" ssystag="" BACKUP_PID="" tcert="" -tpath=0 +tcap="" tpem="" tkey="" tmode="DISABLED" @@ -88,14 +89,14 @@ readonly SECRET_TAG="secret" # For backup locks it is 1 sent by joiner sst_ver=1 -if [ -n "$(command -v pv)" ] && pv --help | grep -qw -- '-F'; then +if [ -n "$(commandex pv)" ] && pv --help | grep -qw -- '-F'; then pvopts="$pvopts $pvformat" fi pcmd="pv $pvopts" declare -a RC -BACKUP_BIN="$(command -v mariabackup)" -if [ ! -x "$BACKUP_BIN" ]; then +BACKUP_BIN=$(commandex 'mariabackup') +if [ -z "$BACKUP_BIN" ]; then wsrep_log_error 'mariabackup binary not found in path' exit 42 fi @@ -145,14 +146,14 @@ get_keys() if [ $encrypt -eq 0 ]; then if [ -n "$ealgo" -o -n "$ekey" -o -n "$ekeyfile" ]; then - wsrep_log_error "Options for encryption are specified, " \ + wsrep_log_error "Options for encryption are specified," \ "but encryption itself is disabled. SST may fail." fi return fi if [ $sfmt = 'tar' ]; then - wsrep_log_info "NOTE: key-based encryption (encrypt=1) " \ + wsrep_log_info "NOTE: key-based encryption (encrypt=1)" \ "cannot be enabled with tar format" encrypt=-1 return @@ -165,16 +166,18 @@ get_keys() exit 3 fi - if [ -z "$ekey" -a ! -r "$ekeyfile" ]; then - wsrep_log_error "FATAL: Either key must be specified " \ - "or keyfile must be readable" - exit 3 + if [ -z "$ekey" ]; then + if [ ! -r "$ekeyfile" ]; then + wsrep_log_error "FATAL: Either key must be specified" \ + "or keyfile must be readable" + exit 3 + fi fi if [ "$eformat" = 'openssl' ]; then get_openssl if [ -z "$OPENSSL_BINARY" ]; then - wsrep_log_error "If encryption using the openssl is enabled, " \ + wsrep_log_error "If encryption using the openssl is enabled," \ "then you need to install openssl" exit 2 fi @@ -192,12 +195,12 @@ get_keys() ecmd="$ecmd -k '$ekey'" fi elif [ "$eformat" = 'xbcrypt' ]; then - if [ -z "$(command -v xbcrypt)" ]; then - wsrep_log_error "If encryption using the xbcrypt is enabled, " \ + if [ -z "$(commandex xbcrypt)" ]; then + wsrep_log_error "If encryption using the xbcrypt is enabled," \ "then you need to install xbcrypt" exit 2 fi - wsrep_log_info "NOTE: xbcrypt-based encryption, " \ + wsrep_log_info "NOTE: xbcrypt-based encryption," \ "supported only from Xtrabackup 2.1.4" if [ -z "$ekey" ]; then ecmd="xbcrypt --encrypt-algo='$ealgo' --encrypt-key-file='$ekeyfile'" @@ -342,40 +345,34 @@ get_transfer() CN_option=",commonname=''" if [ $encrypt -eq 2 ]; then - wsrep_log_info "Using openssl based encryption with socat: with crt and pem" - if [ -z "$tpem" -o -z "$tcert" ]; then + wsrep_log_info \ + "Using openssl based encryption with socat: with crt and pem" + if [ -z "$tpem" -o -z "$tcert$tcap" ]; then wsrep_log_error \ "Both PEM file and CRT file (or path) are required" exit 22 fi - if [ ! -r "$tpem" -o ! -r "$tcert" ]; then - wsrep_log_error \ - "Both PEM file and CRT file (or path) must be readable" - exit 22 + verify_ca_matches_cert "$tpem" "$tcert" "$tcap" + tcmd="$tcmd,cert='$tpem'" + if [ -n "$tcert" ]; then + tcmd="$tcmd,cafile='$tcert'" fi - verify_ca_matches_cert "$tcert" "$tpem" $tpath - if [ $tpath -eq 0 ]; then - tcmd="$tcmd,cert='$tpem',cafile='$tcert'" - else - tcmd="$tcmd,cert='$tpem',capath='$tcert'" + if [ -n "$tcap" ]; then + tcmd="$tcmd,capath='$tcap'" fi stagemsg="$stagemsg-OpenSSL-Encrypted-2" - wsrep_log_info "$action with cert=$tpem, ca=$tcert" + wsrep_log_info "$action with cert='$tpem', ca='$tcert', capath='$tcap'" elif [ $encrypt -eq 3 -o $encrypt -eq 4 ]; then - wsrep_log_info "Using openssl based encryption with socat: with key and crt" + wsrep_log_info \ + "Using openssl based encryption with socat: with key and crt" if [ -z "$tpem" -o -z "$tkey" ]; then - wsrep_log_error "Both certificate file (or path) " \ - "and key file are required" - exit 22 - fi - if [ ! -r "$tpem" -o ! -r "$tkey" ]; then - wsrep_log_error "Both certificate file (or path) " \ - "and key file must be readable" + wsrep_log_error "Both the certificate file (or path) and" \ + "the key file are required" exit 22 fi verify_cert_matches_key "$tpem" "$tkey" stagemsg="$stagemsg-OpenSSL-Encrypted-3" - if [ -z "$tcert" ]; then + if [ -z "$tcert$tcap" ]; then if [ $encrypt -eq 4 ]; then wsrep_log_error \ "Peer certificate file (or path) required if encrypt=4" @@ -384,14 +381,11 @@ get_transfer() # no verification CN_option="" tcmd="$tcmd,cert='$tpem',key='$tkey',verify=0" - wsrep_log_info "$action with cert=$tpem, key=$tkey, verify=0" + wsrep_log_info \ + "$action with cert='$tpem', key='$tkey', verify=0" else # CA verification - if [ ! -r "$tcert" ]; then - wsrep_log_error "Certificate file or path must be readable" - exit 22 - fi - verify_ca_matches_cert "$tcert" "$tpem" $tpath + verify_ca_matches_cert "$tpem" "$tcert" "$tcap" if [ -n "$WSREP_SST_OPT_REMOTE_USER" ]; then CN_option=",commonname='$WSREP_SST_OPT_REMOTE_USER'" elif [ "$WSREP_SST_OPT_ROLE" = 'joiner' -o $encrypt -eq 4 ] @@ -402,12 +396,15 @@ get_transfer() else CN_option=",commonname='$WSREP_SST_OPT_HOST_UNESCAPED'" fi - if [ $tpath -eq 0 ]; then - tcmd="$tcmd,cert='$tpem',key='$tkey',cafile='$tcert'" - else - tcmd="$tcmd,cert='$tpem',key='$tkey',capath='$tcert'" + tcmd="$tcmd,cert='$tpem',key='$tkey'" + if [ -n "$tcert" ]; then + tcmd="$tcmd,cafile='$tcert'" + fi + if [ -n "$tcap" ]; then + tcmd="$tcmd,capath='$tcap'" fi - wsrep_log_info "$action with cert=$tpem, key=$tkey, ca=$tcert" + wsrep_log_info "$action with cert='$tpem', key='$tkey'," \ + "ca='$tcert', capath='$tcap'" fi else wsrep_log_info "Unknown encryption mode: encrypt=$encrypt" @@ -425,7 +422,9 @@ get_transfer() get_footprint() { pushd "$WSREP_SST_OPT_DATA" 1>/dev/null - payload=$(find . -regex '.*\.ibd$\|.*\.MYI$\|.*\.MYD$\|.*ibdata1$' -type f -print0 | du --files0-from=- --block-size=1 -c -s | awk 'END { print $1 }') + payload=$(find . -regex '.*\.ibd$\|.*\.MYI$\|.*\.MYD$\|.*ibdata1$' \ + -type f -print0 | du --files0-from=- --block-size=1 -c -s | \ + awk 'END { print $1 }') if [ "$compress" != 'none' ]; then # QuickLZ has around 50% compression ratio # When compression/compaction used, the progress is only an approximate. @@ -438,7 +437,7 @@ get_footprint() adjust_progress() { - if [ -z "$(command -v pv)" ]; then + if [ -z "$(commandex pv)" ]; then wsrep_log_error "pv not found in path: $PATH" wsrep_log_error "Disabling all progress/rate-limiting" pcmd="" @@ -470,33 +469,42 @@ check_server_ssl_config() { # backward-compatible behavior: tcert=$(parse_cnf 'sst' 'tca') + tcap=$(parse_cnf 'sst' 'tcapath') tpem=$(parse_cnf 'sst' 'tcert') tkey=$(parse_cnf 'sst' 'tkey') # reading new ssl configuration options: local tcert2=$(parse_cnf "$encgroups" 'ssl-ca') + local tcap2=$(parse_cnf "$encgroups" 'ssl-capath') local tpem2=$(parse_cnf "$encgroups" 'ssl-cert') local tkey2=$(parse_cnf "$encgroups" 'ssl-key') # if there are no old options, then we take new ones: - if [ -z "$tcert" -a -z "$tpem" -a -z "$tkey" ]; then + if [ -z "$tcert" -a -z "$tcap" -a -z "$tpem" -a -z "$tkey" ]; then tcert="$tcert2" + tcap="$tcap2" tpem="$tpem2" tkey="$tkey2" # checking for presence of the new-style SSL configuration: - elif [ -n "$tcert2" -o -n "$tpem2" -o -n "$tkey2" ]; then + elif [ -n "$tcert2" -o -n "$tcap2" -o -n "$tpem2" -o -n "$tkey2" ]; then if [ "$tcert" != "$tcert2" -o \ + "$tcap" != "$tcap2" -o \ "$tpem" != "$tpem2" -o \ "$tkey" != "$tkey2" ] then - wsrep_log_info "new ssl configuration options (ssl-ca, ssl-cert " \ - "and ssl-key) are ignored by SST due to presence " \ - "of the tca, tcert and/or tkey in the [sst] section" + wsrep_log_info \ + "new ssl configuration options (ssl-ca[path], ssl-cert" \ + "and ssl-key) are ignored by SST due to presence" \ + "of the tca[path], tcert and/or tkey in the [sst] section" fi fi if [ -n "$tcert" ]; then - tcert=$(trim_string "$tcert") - if [ "${tcert%/}" != "$tcert" ]; then - tpath=1 - fi + tcert=$(trim_string "$tcert") + if [ "${tcert%/}" != "$tcert" ] || [ -d "$tcert" ]; then + tcap="$tcert" + tcert="" + fi + fi + if [ -n "$tcap" ]; then + tcap=$(trim_string "$tcap") fi } @@ -506,10 +514,10 @@ read_cnf() tfmt=$(parse_cnf sst transferfmt 'socat') encrypt=$(parse_cnf "$encgroups" 'encrypt' 0) - tmode=$(parse_cnf "$encgroups" 'ssl-mode' 'DISABLED' | tr [:lower:] [:upper:]) + tmode=$(parse_cnf "$encgroups" 'ssl-mode' 'DISABLED' | \ + tr [:lower:] [:upper:]) - if [ $encrypt -eq 0 -o $encrypt -ge 2 ] - then + if [ $encrypt -eq 0 -o $encrypt -ge 2 ]; then if [ "$tmode" != 'DISABLED' -o $encrypt -ge 2 ]; then check_server_ssl_config fi @@ -517,11 +525,13 @@ read_cnf() if [ 0 -eq $encrypt -a -n "$tpem" -a -n "$tkey" ] then encrypt=3 # enable cert/key SSL encyption - # avoid CA verification if not set explicitly: - # nodes may happen to have different CA if self-generated - # zeroing up tcert does the trick - [ "${tmode#VERIFY}" != "$tmode" ] || tcert="" + # nodes may happen to have different CA if self-generated, + # zeroing up tcert and tcap does the trick: + if [ "${tmode#VERIFY}" = "$tmode" ]; then + tcert="" + tcap="" + fi fi fi elif [ $encrypt -eq 1 ]; then @@ -535,8 +545,9 @@ read_cnf() fi fi - wsrep_log_info "SSL configuration: CA='$tcert', CERT='$tpem'," \ - "KEY='$tkey', MODE='$tmode', encrypt='$encrypt'" + wsrep_log_info "SSL configuration: CA='$tcert', CAPATH='$tcap'," \ + "CERT='$tpem', KEY='$tkey', MODE='$tmode'," \ + "encrypt='$encrypt'" sockopt=$(parse_cnf sst sockopt "") progress=$(parse_cnf sst progress "") @@ -561,7 +572,8 @@ read_cnf() sstlogarchivedir=$(parse_cnf sst sst-log-archive-dir '/tmp/sst_log_archive') if [ $speciald -eq 0 ]; then - wsrep_log_error "sst-special-dirs equal to 0 is not supported, falling back to 1" + wsrep_log_error \ + "sst-special-dirs equal to 0 is not supported, falling back to 1" speciald=1 fi @@ -589,7 +601,7 @@ get_stream() { if [ "$sfmt" = 'mbstream' -o "$sfmt" = 'xbstream' ]; then sfmt='mbstream' - STREAM_BIN="$(command -v mbstream)" + local STREAM_BIN=$(commandex "$sfmt") if [ -z "$STREAM_BIN" ]; then wsrep_log_error "Streaming with $sfmt, but $sfmt not found in path" exit 42 @@ -621,7 +633,7 @@ cleanup_at_exit() # Since this is invoked just after exit NNN local estatus=$? if [ $estatus -ne 0 ]; then - wsrep_log_error "Cleanup after exit with status:$estatus" + wsrep_log_error "Cleanup after exit with status: $estatus" fi if [ "$WSREP_SST_OPT_ROLE" = 'joiner' ]; then @@ -630,7 +642,8 @@ cleanup_at_exit() else if [ -n "$BACKUP_PID" ]; then if check_pid "$BACKUP_PID" 1; then - wsrep_log_error "mariabackup process is still running. Killing..." + wsrep_log_error \ + "mariabackup process is still running. Killing..." cleanup_pid $CHECK_PID "$BACKUP_PID" fi fi @@ -638,8 +651,8 @@ cleanup_at_exit() fi if [ -n "$progress" -a -p "$progress" ]; then - wsrep_log_info "Cleaning up fifo file $progress" - rm -f "$progress" || true + wsrep_log_info "Cleaning up fifo file: $progress" + rm -f "$progress" || : fi wsrep_log_info "Cleaning up temporary directories" @@ -649,8 +662,8 @@ cleanup_at_exit() [ -d "$STATDIR" ] && rm -rf "$STATDIR" fi else - [ -n "$xtmpdir" -a -d "$xtmpdir" ] && rm -rf "$xtmpdir" || true - [ -n "$itmpdir" -a -d "$itmpdir" ] && rm -rf "$itmpdir" || true + [ -n "$xtmpdir" -a -d "$xtmpdir" ] && rm -rf "$xtmpdir" || : + [ -n "$itmpdir" -a -d "$itmpdir" ] && rm -rf "$itmpdir" || : fi # Final cleanup @@ -662,7 +675,7 @@ cleanup_at_exit() # This means a signal was delivered to the process. # So, more cleanup. if [ $estatus -ge 128 ]; then - kill -KILL -- -$$ || true + kill -KILL -- -$$ || : fi fi @@ -738,7 +751,7 @@ recv_joiner() local ltcmd="$tcmd" if [ $tmt -gt 0 ]; then - if [ -n "$(command -v timeout)" ]; then + if [ -n "$(commandex timeout)" ]; then if timeout --help | grep -qw -- '-k'; then ltcmd="timeout -k $(( tmt+10 )) $tmt $tcmd" else @@ -760,14 +773,14 @@ recv_joiner() popd 1>/dev/null if [ ${RC[0]} -eq 124 ]; then - wsrep_log_error "Possible timeout in receiving first data from " \ + wsrep_log_error "Possible timeout in receiving first data from" \ "donor in gtid stage: exit codes: ${RC[@]}" exit 32 fi for ecode in "${RC[@]}"; do if [ $ecode -ne 0 ]; then - wsrep_log_error "Error while getting data from donor node: " \ + wsrep_log_error "Error while getting data from donor node:" \ "exit codes: ${RC[@]}" exit 32 fi @@ -776,7 +789,7 @@ recv_joiner() if [ $checkf -eq 1 ]; then if [ ! -r "$MAGIC_FILE" ]; then # this message should cause joiner to abort - wsrep_log_error "receiving process ended without creating " \ + wsrep_log_error "receiving process ended without creating" \ "'$MAGIC_FILE'" wsrep_log_info "Contents of datadir" wsrep_log_info $(ls -l "$dir/"*) @@ -784,10 +797,11 @@ recv_joiner() fi # check donor supplied secret - SECRET=$(grep -F -- "$SECRET_TAG " "$MAGIC_FILE" 2>/dev/null | cut -d ' ' -f 2) + SECRET=$(grep -F -- "$SECRET_TAG " "$MAGIC_FILE" 2>/dev/null | \ + cut -d ' ' -f 2) if [ "$SECRET" != "$MY_SECRET" ]; then wsrep_log_error "Donor does not know my secret!" - wsrep_log_info "Donor:'$SECRET', my:'$MY_SECRET'" + wsrep_log_info "Donor: '$SECRET', my: '$MY_SECRET'" exit 32 fi @@ -810,7 +824,7 @@ send_donor() for ecode in "${RC[@]}"; do if [ $ecode -ne 0 ]; then - wsrep_log_error "Error while sending data to joiner node: " \ + wsrep_log_error "Error while sending data to joiner node:" \ "exit codes: ${RC[@]}" exit 32 fi @@ -823,7 +837,9 @@ monitor_process() while true ; do if ! ps -p "$WSREP_SST_OPT_PARENT" >/dev/null 2>&1; then - wsrep_log_error "Parent mysqld process (PID: $WSREP_SST_OPT_PARENT) terminated unexpectedly." + wsrep_log_error \ + "Parent mysqld process (PID: $WSREP_SST_OPT_PARENT)" \ + "terminated unexpectedly." kill -- -"$WSREP_SST_OPT_PARENT" exit 32 fi @@ -845,7 +861,7 @@ read_cnf setup_ports if "$BACKUP_BIN" --help 2>/dev/null | grep -qw -- '--version-check'; then - disver='--no-version-check' + disver=' --no-version-check' fi # if no command line argument and INNODB_DATA_HOME_DIR environment variable @@ -867,7 +883,7 @@ INNODB_DATA_HOME_DIR=$(pwd -P) cd "$OLD_PWD" if [ $ssyslog -eq 1 ]; then - if [ -n "$(command -v logger)" ]; then + if [ -n "$(commandex logger)" ]; then wsrep_log_info "Logging all stderr of SST/mariabackup to syslog" exec 2> >(logger -p daemon.err -t ${ssystag}wsrep-sst-$WSREP_SST_OPT_ROLE) @@ -898,10 +914,8 @@ else fi fi - if [ -e "$INNOAPPLYLOG" ] - then - if [ -n "$sstlogarchivedir" ] - then + if [ -e "$INNOAPPLYLOG" ]; then + if [ -n "$sstlogarchivedir" ]; then newfile=$(basename "$INNOAPPLYLOG") newfile="$sstlogarchivedir/$newfile.$ARCHIVETIMESTAMP" else @@ -912,10 +926,8 @@ else gzip "$newfile" fi - if [ -e "$INNOMOVELOG" ] - then - if [ -n "$sstlogarchivedir" ] - then + if [ -e "$INNOMOVELOG" ]; then + if [ -n "$sstlogarchivedir" ]; then newfile=$(basename "$INNOMOVELOG") newfile="$sstlogarchivedir/$newfile.$ARCHIVETIMESTAMP" else @@ -926,10 +938,8 @@ else gzip "$newfile" fi - if [ -e "$INNOBACKUPLOG" ] - then - if [ -n "$sstlogarchivedir" ] - then + if [ -e "$INNOBACKUPLOG" ]; then + if [ -n "$sstlogarchivedir" ]; then newfile=$(basename "$INNOBACKUPLOG") newfile="$sstlogarchivedir/$newfile.$ARCHIVETIMESTAMP" else @@ -949,15 +959,15 @@ setup_commands() { local mysqld_args="" if [ -n "$WSREP_SST_OPT_MYSQLD" ]; then - mysqld_args="--mysqld-args $WSREP_SST_OPT_MYSQLD" + mysqld_args=" --mysqld-args $WSREP_SST_OPT_MYSQLD" fi - if [ -z "$INNODB_FORCE_RECOVERY" ]; then - INNOAPPLY="$BACKUP_BIN --prepare $disver $iapts $INNOEXTRA --target-dir='$DATA' --datadir='$DATA' $mysqld_args $INNOAPPLY" - else - INNOAPPLY="$BACKUP_BIN --prepare $disver $iapts $INNOEXTRA --innodb-force-recovery=$INNODB_FORCE_RECOVERY --target-dir='$DATA' --datadir='$DATA' $mysqld_args $INNOAPPLY" + local recovery="" + if [ -n "$INNODB_FORCE_RECOVERY" ]; then + recovery=" --innodb-force-recovery=$INNODB_FORCE_RECOVERY" fi - INNOMOVE="$BACKUP_BIN $WSREP_SST_OPT_CONF --move-back $disver $impts --force-non-empty-directories --target-dir='$DATA' --datadir='${TDATA:-$DATA}' $INNOMOVE" - INNOBACKUP="$BACKUP_BIN $WSREP_SST_OPT_CONF --backup $disver $iopts $tmpopts $INNOEXTRA --galera-info --stream=$sfmt --target-dir='$itmpdir' --datadir='$DATA' $mysqld_args $INNOBACKUP" + INNOAPPLY="$BACKUP_BIN --prepare$disver$recovery${iapts:+ }$iapts$INNOEXTRA --target-dir='$DATA' --datadir='$DATA'$mysqld_args $INNOAPPLY" + INNOMOVE="$BACKUP_BIN$WSREP_SST_OPT_CONF --move-back$disver${impts:+ }$impts --force-non-empty-directories --target-dir='$DATA' --datadir='${TDATA:-$DATA}' $INNOMOVE" + INNOBACKUP="$BACKUP_BIN$WSREP_SST_OPT_CONF --backup$disver${iopts:+ }$iopts $tmpopts$INNOEXTRA --galera-info --stream=$sfmt --target-dir='$itmpdir' --datadir='$DATA'$mysqld_args $INNOBACKUP" } get_stream @@ -1055,27 +1065,28 @@ then tcmd="$ecmd | $tcmd" fi - iopts="--databases-exclude='lost+found' $iopts" + iopts="--databases-exclude='lost+found'${iopts:+ }$iopts" if [ ${FORCE_FTWRL:-0} -eq 1 ]; then - wsrep_log_info "Forcing FTWRL due to environment variable FORCE_FTWRL equal to $FORCE_FTWRL" - iopts="--no-backup-locks $iopts" + wsrep_log_info "Forcing FTWRL due to environment variable" \ + "FORCE_FTWRL equal to $FORCE_FTWRL" + iopts="--no-backup-locks${iopts:+ }$iopts" fi # if compression is enabled for backup files, then add the # appropriate options to the mariabackup command line: if [ "$compress" != 'none' ]; then - iopts="--compress${compress:+=$compress} $iopts" + iopts="--compress${compress:+=$compress}${iopts:+ }$iopts" if [ -n "$compress_threads" ]; then - iopts="--compress-threads=$compress_threads $iopts" + iopts="--compress-threads=$compress_threads${iopts:+ }$iopts" fi if [ -n "$compress_chunk" ]; then - iopts="--compress-chunk-size=$compress_chunk $iopts" + iopts="--compress-chunk-size=$compress_chunk${iopts:+ }$iopts" fi fi if [ -n "$backup_threads" ]; then - iopts="--parallel=$backup_threads $iopts" + iopts="--parallel=$backup_threads${iopts:+ }$iopts" fi setup_commands @@ -1084,7 +1095,7 @@ then set -e if [ ${RC[0]} -ne 0 ]; then - wsrep_log_error "mariabackup finished with error: ${RC[0]}. " \ + wsrep_log_error "mariabackup finished with error: ${RC[0]}." \ "Check syslog or '$INNOBACKUPLOG' for details" exit 22 elif [ ${RC[$(( ${#RC[@]}-1 ))]} -eq 1 ]; then @@ -1125,7 +1136,8 @@ then elif [ "$WSREP_SST_OPT_ROLE" = 'joiner' ] then - [ -e "$SST_PROGRESS_FILE" ] && wsrep_log_info "Stale sst_in_progress file: $SST_PROGRESS_FILE" + [ -e "$SST_PROGRESS_FILE" ] && \ + wsrep_log_info "Stale sst_in_progress file: $SST_PROGRESS_FILE" [ -n "$SST_PROGRESS_FILE" ] && touch "$SST_PROGRESS_FILE" ib_home_dir="$INNODB_DATA_HOME_DIR" @@ -1146,7 +1158,7 @@ then ib_undo_dir="$INNODB_UNDO_DIR" if [ -n "$backup_threads" ]; then - impts="--parallel=$backup_threads $impts" + impts="--parallel=$backup_threads${impts:+ }$impts" fi stagemsg='Joiner-Recv' @@ -1165,15 +1177,15 @@ then ADDR="$WSREP_SST_OPT_ADDR" - if [ "${tmode#VERIFY}" != "$tmode" ] - then # backward-incompatible behavior + if [ "${tmode#VERIFY}" != "$tmode" ]; then + # backward-incompatible behavior: CN="" - if [ -n "$tpem" ] - then + if [ -n "$tpem" ]; then # find out my Common Name get_openssl if [ -z "$OPENSSL_BINARY" ]; then - wsrep_log_error 'openssl not found but it is required for authentication' + wsrep_log_error \ + 'openssl not found but it is required for authentication' exit 42 fi CN=$("$OPENSSL_BINARY" x509 -noout -subject -in "$tpem" | \ @@ -1213,15 +1225,17 @@ then if ! ps -p "$WSREP_SST_OPT_PARENT" >/dev/null 2>&1 then - wsrep_log_error "Parent mysqld process (PID: $WSREP_SST_OPT_PARENT) terminated unexpectedly." + wsrep_log_error "Parent mysqld process (PID: $WSREP_SST_OPT_PARENT)" \ + "terminated unexpectedly." exit 32 fi - if [ ! -r "$STATDIR/$IST_FILE" ] - then + if [ ! -r "$STATDIR/$IST_FILE" ]; then if [ -d "$DATA/.sst" ]; then - wsrep_log_info "WARNING: Stale temporary SST directory: '$DATA/.sst' from previous state transfer. Removing" + wsrep_log_info \ + "WARNING: Stale temporary SST directory:" \ + "'$DATA/.sst' from previous state transfer, removing..." rm -rf "$DATA/.sst" fi mkdir -p "$DATA/.sst" @@ -1229,17 +1243,20 @@ then jpid=$! wsrep_log_info "Proceeding with SST" - wsrep_log_info "Cleaning the existing datadir and innodb-data/log directories" + wsrep_log_info \ + "Cleaning the existing datadir and innodb-data/log directories" if [ "$OS" = 'FreeBSD' ]; then find -E ${ib_home_dir:+"$ib_home_dir"} \ ${ib_undo_dir:+"$ib_undo_dir"} \ ${ib_log_dir:+"$ib_log_dir"} \ - "$DATA" -mindepth 1 -prune -regex "$cpat" -o -exec rm -rfv {} 1>&2 \+ + "$DATA" -mindepth 1 -prune -regex "$cpat" \ + -o -exec rm -rfv {} 1>&2 \+ else find ${ib_home_dir:+"$ib_home_dir"} \ ${ib_undo_dir:+"$ib_undo_dir"} \ ${ib_log_dir:+"$ib_log_dir"} \ - "$DATA" -mindepth 1 -prune -regex "$cpat" -o -exec rm -rfv {} 1>&2 \+ + "$DATA" -mindepth 1 -prune -regex "$cpat" \ + -o -exec rm -rfv {} 1>&2 \+ fi get_binlog @@ -1248,9 +1265,9 @@ then binlog_dir=$(dirname "$WSREP_SST_OPT_BINLOG") cd "$binlog_dir" wsrep_log_info "Cleaning the binlog directory $binlog_dir as well" - rm -fv "$WSREP_SST_OPT_BINLOG".[0-9]* 1>&2 \+ || true + rm -fv "$WSREP_SST_OPT_BINLOG".[0-9]* 1>&2 \+ || : [ -f "$WSREP_SST_OPT_BINLOG_INDEX" ] && \ - rm -fv "$WSREP_SST_OPT_BINLOG_INDEX" 1>&2 \+ || true + rm -fv "$WSREP_SST_OPT_BINLOG_INDEX" 1>&2 \+ || : cd "$OLD_PWD" fi @@ -1262,7 +1279,8 @@ then monitor_process $jpid if [ ! -s "$DATA/xtrabackup_checkpoints" ]; then - wsrep_log_error "xtrabackup_checkpoints missing, failed mariabackup/SST on donor" + wsrep_log_error "xtrabackup_checkpoints missing," \ + "failed mariabackup/SST on donor" exit 2 fi @@ -1277,7 +1295,7 @@ then if [ -n "$qpfiles" ]; then wsrep_log_info "Compressed qpress files found" - if [ -z "$(command -v qpress)" ]; then + if [ -z "$(commandex qpress)" ]; then wsrep_log_error "qpress utility not found in the path" exit 22 fi @@ -1300,14 +1318,17 @@ then # Decompress the qpress files wsrep_log_info "Decompression with $nproc threads" - timeit "Joiner-Decompression" "find '$DATA' -type f -name '*.qp' -printf '%p\n%h\n' | $dcmd" + timeit "Joiner-Decompression" \ + "find '$DATA' -type f -name '*.qp' -printf '%p\n%h\n' | $dcmd" extcode=$? if [ $extcode -eq 0 ]; then wsrep_log_info "Removing qpress files after decompression" find "$DATA" -type f -name '*.qp' -delete if [ $? -ne 0 ]; then - wsrep_log_error "Something went wrong with deletion of qpress files. Investigate" + wsrep_log_error \ + "Something went wrong with deletion of qpress files." \ + "Investigate" fi else wsrep_log_error "Decompression failed. Exit code: $extcode" @@ -1321,7 +1342,7 @@ then BINLOG_FILENAME=$(basename "$WSREP_SST_OPT_BINLOG") # To avoid comparing data directory and BINLOG_DIRNAME - mv "$DATA/$BINLOG_FILENAME".* "$BINLOG_DIRNAME/" 2>/dev/null || true + mv "$DATA/$BINLOG_FILENAME".* "$BINLOG_DIRNAME/" 2>/dev/null || : cd "$BINLOG_DIRNAME" for bfile in $(ls -1 "$BINLOG_FILENAME".[0-9]*); do @@ -1336,7 +1357,8 @@ then timeit "mariabackup prepare stage" "$INNOAPPLY" if [ $? -ne 0 ]; then - wsrep_log_error "mariabackup apply finished with errors. Check syslog or '$INNOAPPLYLOG' for details" + wsrep_log_error "mariabackup apply finished with errors." \ + "Check syslog or '$INNOAPPLYLOG' for details." exit 22 fi diff --git a/scripts/wsrep_sst_mysqldump.sh b/scripts/wsrep_sst_mysqldump.sh index 798bee1ac100d..bed2cac0a9a9d 100644 --- a/scripts/wsrep_sst_mysqldump.sh +++ b/scripts/wsrep_sst_mysqldump.sh @@ -19,7 +19,6 @@ # This is a reference script for mysqldump-based state snapshot tansfer . $(dirname "$0")/wsrep_sst_common -PATH=$PATH:/usr/sbin:/usr/bin:/sbin:/bin EINVAL=22 @@ -93,8 +92,7 @@ DROP PREPARE stmt;" SET_START_POSITION="SET GLOBAL wsrep_start_position='$WSREP_SST_OPT_GTID';" SET_WSREP_GTID_DOMAIN_ID="" -if [ -n $WSREP_SST_OPT_GTID_DOMAIN_ID ] -then +if [ -n $WSREP_SST_OPT_GTID_DOMAIN_ID ]; then SET_WSREP_GTID_DOMAIN_ID=" SET @val = (SELECT GLOBAL_VALUE FROM INFORMATION_SCHEMA.SYSTEM_VARIABLES WHERE VARIABLE_NAME = 'WSREP_GTID_STRICT_MODE' AND GLOBAL_VALUE > 0); SET @stmt = IF (@val IS NOT NULL, 'SET GLOBAL WSREP_GTID_DOMAIN_ID=$WSREP_SST_OPT_GTID_DOMAIN_ID', 'SET @dummy = 0'); @@ -103,7 +101,7 @@ then DROP PREPARE stmt;" fi -MYSQL="$MYSQL_CLIENT $WSREP_SST_OPT_CONF_UNQUOTED "\ +MYSQL="$MYSQL_CLIENT$WSREP_SST_OPT_CONF_UNQUOTED "\ "$AUTH -h$WSREP_SST_OPT_HOST_UNESCAPED "\ "-P$WSREP_SST_OPT_PORT --disable-reconnect --connect_timeout=10" @@ -125,8 +123,7 @@ SET_GTID_BINLOG_STATE="" SQL_LOG_BIN_OFF="" # Safety check -if [ ${SERVER_VERSION%%.*} -gt 5 ] -then +if [ ${SERVER_VERSION%%.*} -gt 5 ]; then # If binary logging is enabled on the joiner node, we need to copy donor's # gtid_binlog_state to joiner. In order to do that, a RESET MASTER must be # executed to erase binary logs (if any). Binary logging should also be @@ -140,7 +137,7 @@ then fi # NOTE: we don't use --routines here because we're dumping mysql.proc table -MYSQLDUMP="$MYSQLDUMP $WSREP_SST_OPT_CONF_UNQUOTED $AUTH -S$WSREP_SST_OPT_SOCKET \ +MYSQLDUMP="$MYSQLDUMP$WSREP_SST_OPT_CONF_UNQUOTED $AUTH -S$WSREP_SST_OPT_SOCKET \ --add-drop-database --add-drop-table --skip-add-locks --create-options \ --disable-keys --extended-insert --skip-lock-tables --quick --set-charset \ --skip-comments --flush-privileges --all-databases --events" diff --git a/scripts/wsrep_sst_rsync.sh b/scripts/wsrep_sst_rsync.sh index 29c9cd4347026..b0cc8cb30664d 100644 --- a/scripts/wsrep_sst_rsync.sh +++ b/scripts/wsrep_sst_rsync.sh @@ -25,9 +25,6 @@ STUNNEL_REAL_PID=0 # stunnel process id OS="$(uname)" [ "$OS" = 'Darwin' ] && export -n LD_LIBRARY_PATH -# Setting the path for lsof on CentOS -export PATH="/usr/sbin:/sbin:$PATH" - . $(dirname "$0")/wsrep_sst_common wsrep_check_datadir @@ -37,7 +34,8 @@ cleanup_joiner() { local failure=0 - wsrep_log_info "Joiner cleanup: rsync PID=$RSYNC_REAL_PID, stunnel PID=$STUNNEL_REAL_PID" + wsrep_log_info "Joiner cleanup: rsync PID=$RSYNC_REAL_PID," \ + "stunnel PID=$STUNNEL_REAL_PID" if [ -n "$STUNNEL" ]; then if cleanup_pid $STUNNEL_REAL_PID "$STUNNEL_PID" "$STUNNEL_CONF"; then @@ -87,7 +85,7 @@ check_pid_and_port() if [ $lsof_available -ne 0 ]; then port_info=$(lsof -Pnl -i ":$port" 2>/dev/null | \ - grep -F '(LISTEN)') + grep -F '(LISTEN)') echo "$port_info" | \ grep -q -E "[[:space:]](\\*|\\[?::\\]?):$port[[:space:]]" && busy=1 else @@ -124,7 +122,7 @@ check_pid_and_port() fi if ! check_port "$pid" "$port" "$utils"; then - wsrep_log_error "rsync or stunnel daemon port '$port' " \ + wsrep_log_error "rsync or stunnel daemon port '$port'" \ "has been taken by another program" exit 16 # EBUSY fi @@ -223,6 +221,7 @@ FILTER="-f '- /lost+found' SSTKEY=$(parse_cnf 'sst' 'tkey') SSTCERT=$(parse_cnf 'sst' 'tcert') SSTCA=$(parse_cnf 'sst' 'tca') +SSTCAP=$(parse_cnf 'sst' 'tcapath') SST_SECTIONS="--mysqld|sst" @@ -231,28 +230,34 @@ check_server_ssl_config() SSTKEY=$(parse_cnf "$SST_SECTIONS" 'ssl-key') SSTCERT=$(parse_cnf "$SST_SECTIONS" 'ssl-cert') SSTCA=$(parse_cnf "$SST_SECTIONS" 'ssl-ca') + SSTCAP=$(parse_cnf "$SST_SECTIONS" 'ssl-capath') } SSLMODE=$(parse_cnf "$SST_SECTIONS" 'ssl-mode' | tr [:lower:] [:upper:]) # no old-style SSL config in [sst], check for new one: -if [ -z "$SSTKEY" -a -z "$SSTCERT" -a -z "$SSTCA" ]; then +if [ -z "$SSTKEY" -a -z "$SSTCERT" -a -z "$SSTCA" -a -z "$SSTCAP" ]; then check_server_ssl_config fi -SSTPATH=0 if [ -n "$SSTCA" ]; then - SSTCA=$(trim_string "$SSTCA") - if [ "${SSTCA%/}" != "$SSTCA" ]; then - SSTPATH=1 - fi + SSTCA=$(trim_string "$SSTCA") + if [ "${SSTCA%/}" != "$SSTCA" ] || [ -d "$SSTCA" ]; then + SSTCAP="$SSTCA" + SSTCA="" + fi +fi + +if [ -n "$SSTCAP" ]; then + SSTCAP=$(trim_string "$SSTCAP") fi if [ -z "$SSLMODE" ]; then # Implicit verification if CA is set and the SSL mode # is not specified by user: - if [ -n "$SSTCA" ]; then - if [ -n "$(command -v stunnel)" ]; then + if [ -n "$SSTCA$SSTCAP" ]; then + STUNNEL_BIN=$(commandex 'stunnel') + if [ -n "$STUNNEL_BIN" ]; then SSLMODE='VERIFY_CA' fi # Require SSL by default if SSL key and cert are present: @@ -265,17 +270,18 @@ if [ -n "$SSTCERT" -a -n "$SSTKEY" ]; then verify_cert_matches_key "$SSTCERT" "$SSTKEY" fi -if [ -n "$SSTCA" ]; then - if [ $SSTPATH -eq 0 ]; then +CAFILE_OPT="" +CAPATH_OPT="" +if [ -n "$SSTCA$SSTCAP" ]; then + if [ -n "$SSTCA" ]; then CAFILE_OPT="CAfile = $SSTCA" - else - CAFILE_OPT="CApath = $SSTCA" + fi + if [ -n "$SSTCAP" ]; then + CAPATH_OPT="CApath = $SSTCAP" fi if [ -n "$SSTCERT" ]; then - verify_ca_matches_cert "$SSTCA" "$SSTCERT" $SSTPATH + verify_ca_matches_cert "$SSTCERT" "$SSTCA" "$SSTCAP" fi -else - CAFILE_OPT="" fi VERIFY_OPT="" @@ -295,7 +301,7 @@ then exit 22 # EINVAL ;; esac - if [ -z "$SSTCA" ]; then + if [ -z "$SSTCA$SSTCAP" ]; then wsrep_log_error "Can't have ssl-mode='$SSLMODE' without CA file or path" exit 22 # EINVAL fi @@ -318,9 +324,12 @@ fi STUNNEL="" if [ -n "$SSLMODE" -a "$SSLMODE" != 'DISABLED' ]; then - STUNNEL_BIN="$(command -v stunnel)" + if [ -z "${STUNNEL_BIN+x}" ]; then + STUNNEL_BIN=$(commandex 'stunnel') + fi if [ -n "$STUNNEL_BIN" ]; then - wsrep_log_info "Using stunnel for SSL encryption: CA: '$SSTCA', ssl-mode='$SSLMODE'" + wsrep_log_info "Using stunnel for SSL encryption: CA: '$SSTCA'," \ + "CAPATH='$SSTCAP', ssl-mode='$SSLMODE'" STUNNEL="$STUNNEL_BIN $STUNNEL_CONF" fi fi @@ -340,6 +349,7 @@ then key = $SSTKEY cert = $SSTCERT ${CAFILE_OPT} +${CAPATH_OPT} foreground = yes pid = $STUNNEL_PID debug = warning @@ -392,8 +402,8 @@ EOF # Prepare binlog files cd "$BINLOG_DIRNAME" - binlog_files_full=$(tail -n $BINLOG_N_FILES "$WSREP_SST_OPT_BINLOG_INDEX") - + binlog_files_full=$(tail -n $BINLOG_N_FILES \ + "$WSREP_SST_OPT_BINLOG_INDEX") binlog_files="" for ii in $binlog_files_full do @@ -417,9 +427,10 @@ EOF WHOLE_FILE_OPT="--whole-file" fi - # first, the normal directories, so that we can detect incompatible protocol + # first, the normal directories, so that we can detect + # incompatible protocol: RC=0 - eval rsync ${STUNNEL:+"'--rsh=$STUNNEL'"} \ + eval rsync ${STUNNEL:+"--rsh='$STUNNEL'"} \ --owner --group --perms --links --specials \ --ignore-times --inplace --dirs --delete --quiet \ $WHOLE_FILE_OPT $FILTER "'$WSREP_SST_OPT_DATA/'" \ @@ -430,8 +441,9 @@ EOF case $RC in 12) RC=71 # EPROTO wsrep_log_error \ - "rsync server on the other end has incompatible protocol. " \ - "Make sure you have the same version of rsync on all nodes." + "rsync server on the other end has incompatible" \ + "protocol. Make sure you have the same version of" \ + "rsync on all nodes." ;; 22) RC=12 # ENOMEM ;; @@ -481,9 +493,9 @@ EOF find . -maxdepth 1 -mindepth 1 -type d -not -name 'lost+found' \ -not -name '.zfs' -print0 | xargs -I{} -0 -P $backup_threads \ rsync ${STUNNEL:+--rsh="$STUNNEL"} \ - --owner --group --perms --links --specials \ - --ignore-times --inplace --recursive --delete --quiet \ - $WHOLE_FILE_OPT --exclude '*/ib_logfile*' --exclude '*/aria_log.*' \ + --owner --group --perms --links --specials --ignore-times \ + --inplace --recursive --delete --quiet $WHOLE_FILE_OPT \ + --exclude '*/ib_logfile*' --exclude '*/aria_log.*' \ --exclude '*/aria_log_control' "$WSREP_SST_OPT_DATA/{}/" \ "rsync://$WSREP_SST_OPT_ADDR/{}" >&2 || RC=$? @@ -514,7 +526,8 @@ EOF fi rsync ${STUNNEL:+--rsh="$STUNNEL"} \ - --archive --quiet --checksum "$MAGIC_FILE" "rsync://$WSREP_SST_OPT_ADDR" + --archive --quiet --checksum "$MAGIC_FILE" \ + "rsync://$WSREP_SST_OPT_ADDR" echo "done $STATE" @@ -546,7 +559,8 @@ then check_round=0 while check_pid "$STUNNEL_PID" 1 do - wsrep_log_info "lingering stunnel daemon found at startup, waiting for it to exit" + wsrep_log_info "Lingering stunnel daemon found at startup," \ + "waiting for it to exit" check_round=$(( check_round + 1 )) if [ $check_round -eq 10 ]; then wsrep_log_error "stunnel daemon already running." @@ -563,7 +577,8 @@ then check_round=0 while check_pid "$RSYNC_PID" 1 do - wsrep_log_info "lingering rsync daemon found at startup, waiting for it to exit" + wsrep_log_info "Lingering rsync daemon found at startup," \ + "waiting for it to exit" check_round=$(( check_round + 1 )) if [ $check_round -eq 10 ]; then wsrep_log_error "rsync daemon already running." @@ -575,9 +590,7 @@ then [ -f "$MAGIC_FILE" ] && rm -f "$MAGIC_FILE" [ -f "$BINLOG_TAR_FILE" ] && rm -f "$BINLOG_TAR_FILE" - if [ -z "$STUNNEL" ]; then - [ -f "$STUNNEL_CONF" ] && rm -f "$STUNNEL_CONF" - fi + [ -z "$STUNNEL" ] && [ -f "$STUNNEL_CONF" ] && rm -f "$STUNNEL_CONF" ADDR="$WSREP_SST_OPT_ADDR" RSYNC_PORT="$WSREP_SST_OPT_PORT" @@ -628,19 +641,21 @@ EOF echo $$ > "$SST_PID" - if [ -z "$STUNNEL" ] - then - rsync --daemon --no-detach --port "$RSYNC_PORT" --config "$RSYNC_CONF" $RSYNC_EXTRA_ARGS & + if [ -z "$STUNNEL" ]; then + rsync --daemon --no-detach --port "$RSYNC_PORT" \ + --config "$RSYNC_CONF" $RSYNC_EXTRA_ARGS & RSYNC_REAL_PID=$! TRANSFER_REAL_PID=$RSYNC_REAL_PID TRANSFER_PID="$RSYNC_PID" else # Let's check if the path to the config file contains a space? + RSYNC_BIN=$(commandex 'rsync') if [ "${RSYNC_CONF#* }" = "$RSYNC_CONF" ]; then cat << EOF > "$STUNNEL_CONF" key = $SSTKEY cert = $SSTCERT ${CAFILE_OPT} +${CAPATH_OPT} foreground = yes pid = $STUNNEL_PID debug = warning @@ -650,17 +665,18 @@ ${CHECK_OPT} ${CHECK_OPT_LOCAL} [rsync] accept = $STUNNEL_ACCEPT -exec = $(command -v rsync) +exec = $RSYNC_BIN execargs = rsync --server --daemon --config=$RSYNC_CONF . EOF else # The path contains a space, so we will run it via # shell with "eval" command: - export RSYNC_CMD="eval $(command -v rsync) --server --daemon --config='$RSYNC_CONF' ." + export RSYNC_CMD="eval '$RSYNC_BIN' --server --daemon --config='$RSYNC_CONF' ." cat << EOF > "$STUNNEL_CONF" key = $SSTKEY cert = $SSTCERT ${CAFILE_OPT} +${CAPATH_OPT} foreground = yes pid = $STUNNEL_PID debug = warning @@ -688,7 +704,8 @@ EOF # find out my Common Name get_openssl if [ -z "$OPENSSL_BINARY" ]; then - wsrep_log_error 'openssl not found but it is required for authentication' + wsrep_log_error \ + 'openssl not found but it is required for authentication' exit 42 fi CN=$("$OPENSSL_BINARY" x509 -noout -subject -in "$SSTCERT" | \ @@ -703,7 +720,8 @@ EOF ADDR="$WSREP_SST_OPT_HOST" fi - until check_pid_and_port "$TRANSFER_PID" $TRANSFER_REAL_PID "$RSYNC_ADDR_UNESCAPED" "$RSYNC_PORT" + until check_pid_and_port "$TRANSFER_PID" $TRANSFER_REAL_PID \ + "$RSYNC_ADDR_UNESCAPED" "$RSYNC_PORT" do sleep 0.2 done @@ -722,7 +740,7 @@ EOF if ! ps -p $MYSQLD_PID >/dev/null 2>&1 then wsrep_log_error \ - "Parent mysqld process (PID: $MYSQLD_PID) terminated unexpectedly." + "Parent mysqld process (PID: $MYSQLD_PID) terminated unexpectedly." kill -- -$MYSQLD_PID sleep 1 exit 32 @@ -768,10 +786,11 @@ EOF if [ -r "$MAGIC_FILE" ]; then if [ -n "$MY_SECRET" ]; then # check donor supplied secret - SECRET=$(grep -F -- "$SECRET_TAG " "$MAGIC_FILE" 2>/dev/null | cut -d ' ' -f 2) + SECRET=$(grep -F -- "$SECRET_TAG " "$MAGIC_FILE" 2>/dev/null | \ + cut -d ' ' -f 2) if [ "$SECRET" != "$MY_SECRET" ]; then wsrep_log_error "Donor does not know my secret!" - wsrep_log_info "Donor:'$SECRET', my:'$MY_SECRET'" + wsrep_log_info "Donor: '$SECRET', my: '$MY_SECRET'" exit 32 fi # remove secret from the magic file, and output diff --git a/vio/viosslfactories.c b/vio/viosslfactories.c index 8ab7565a666d1..08f0905e04416 100644 --- a/vio/viosslfactories.c +++ b/vio/viosslfactories.c @@ -178,6 +178,12 @@ new_VioSSLFd(const char *key_file, const char *cert_file, struct st_VioSSLFd *ssl_fd; long ssl_ctx_options= SSL_OP_NO_SSLv2 | SSL_OP_NO_SSLv3; DBUG_ENTER("new_VioSSLFd"); + + if (ca_file && ! ca_file[0]) ca_file = NULL; + if (ca_path && ! ca_path[0]) ca_path = NULL; + if (crl_file && ! crl_file[0]) crl_file = NULL; + if (crl_path && ! crl_path[0]) crl_path = NULL; + DBUG_PRINT("enter", ("key_file: '%s' cert_file: '%s' ca_file: '%s' ca_path: '%s' " "cipher: '%s' crl_file: '%s' crl_path: '%s' ", @@ -308,6 +314,11 @@ new_VioSSLConnectorFd(const char *key_file, const char *cert_file, struct st_VioSSLFd *ssl_fd; int verify= SSL_VERIFY_PEER; + if (ca_file && ! ca_file[0]) ca_file = NULL; + if (ca_path && ! ca_path[0]) ca_path = NULL; + if (crl_file && ! crl_file[0]) crl_file = NULL; + if (crl_path && ! crl_path[0]) crl_path = NULL; + /* Turn off verification of servers certificate if both ca_file and ca_path is set to NULL @@ -339,6 +350,12 @@ new_VioSSLAcceptorFd(const char *key_file, const char *cert_file, { struct st_VioSSLFd *ssl_fd; int verify= SSL_VERIFY_PEER | SSL_VERIFY_CLIENT_ONCE; + + if (ca_file && ! ca_file[0]) ca_file = NULL; + if (ca_path && ! ca_path[0]) ca_path = NULL; + if (crl_file && ! crl_file[0]) crl_file = NULL; + if (crl_path && ! crl_path[0]) crl_path = NULL; + if (!(ssl_fd= new_VioSSLFd(key_file, cert_file, ca_file, ca_path, cipher, FALSE, error, crl_file, crl_path))) From 66b492f3e43e357951ee6b1c93f4afabcbfec9ba Mon Sep 17 00:00:00 2001 From: sjaakola Date: Mon, 13 Dec 2021 12:13:03 +0200 Subject: [PATCH 16/65] Fix for the test galera.galera_UK_conflict mtr test galera.galera_UK_conflict, has rather distorted logic in test scenario 2. The test would fail always with: CURRENT_TEST: galera.galera_UK_conflict mysqltest: In included file "./include/galera_wait_sync_point.inc": included from /home/seppo/work/wsrep/mariadb-server/mysql-test/suite/galera/t/galera_UK_conflict.test at line 216: At line 3: query 'SET SESSION wsrep_on = 0' failed: 1179: You are not allowed to execute this command in a transaction This happens because wait_condition is called in wrong connection (node_1, which is excuting MST transaction) This test is fixed by using contl connection for wait contdition check, and new result is recorded as well --- .../suite/galera/r/galera_UK_conflict.result | 57 +++++++++++++++++-- .../suite/galera/t/galera_UK_conflict.test | 8 ++- 2 files changed, 58 insertions(+), 7 deletions(-) diff --git a/mysql-test/suite/galera/r/galera_UK_conflict.result b/mysql-test/suite/galera/r/galera_UK_conflict.result index cc7e17d7c5804..b0420d58ede1c 100644 --- a/mysql-test/suite/galera/r/galera_UK_conflict.result +++ b/mysql-test/suite/galera/r/galera_UK_conflict.result @@ -71,6 +71,31 @@ INSERT INTO t1 VALUES (8,8,8); SELECT COUNT(*) FROM t1; COUNT(*) 7 +SELECT * FROM t1; +f1 f2 f3 +1 1 0 +3 3 1 +4 4 2 +5 5 2 +7 7 7 +8 8 8 +10 10 0 +connection node_1; +SELECT COUNT(*) FROM t1; +COUNT(*) +7 +SELECT * FROM t1; +f1 f2 f3 +1 1 0 +3 3 1 +4 4 2 +5 5 2 +7 7 7 +8 8 8 +10 10 0 +DROP TABLE t1; +test scenario 2 +connection node_1; CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 int, f3 int, unique key keyj (f2)); INSERT INTO t1 VALUES (1, 1, 0); INSERT INTO t1 VALUES (3, 3, 0); @@ -92,9 +117,9 @@ SET SESSION wsrep_on = 1; SET GLOBAL wsrep_provider_options = 'dbug='; SET GLOBAL wsrep_provider_options = 'dbug=d,commit_monitor_master_enter_sync'; connection node_1; -SELECT COUNT(*) FROM t1; -COUNT(*) -7 +COMMIT; +connection node_1a; +SET SESSION wsrep_on = 0; SET SESSION wsrep_on = 1; SET GLOBAL wsrep_provider_options = 'dbug='; SET GLOBAL DEBUG_DBUG = "d,sync.wsrep_replay_cb"; @@ -125,8 +150,32 @@ f1 f2 f3 3 3 1 4 4 2 5 5 2 -8 8 8 10 10 0 INSERT INTO t1 VALUES (7,7,7); INSERT INTO t1 VALUES (8,8,8); +SELECT COUNT(*) FROM t1; +COUNT(*) +7 +SELECT * FROM t1; +f1 f2 f3 +1 1 0 +3 3 1 +4 4 2 +5 5 2 +7 7 7 +8 8 8 +10 10 0 +connection node_1; +SELECT COUNT(*) FROM t1; +COUNT(*) +7 +SELECT * FROM t1; +f1 f2 f3 +1 1 0 +3 3 1 +4 4 2 +5 5 2 +7 7 7 +8 8 8 +10 10 0 DROP TABLE t1; diff --git a/mysql-test/suite/galera/t/galera_UK_conflict.test b/mysql-test/suite/galera/t/galera_UK_conflict.test index 25f414a576464..7a14821cc32e6 100644 --- a/mysql-test/suite/galera/t/galera_UK_conflict.test +++ b/mysql-test/suite/galera/t/galera_UK_conflict.test @@ -207,14 +207,16 @@ INSERT INTO t1 VALUES (5, 5, 2); --source include/galera_set_sync_point.inc --connection node_1 ---let $wait_condition = SELECT COUNT(*) = 7 FROM t1 ---source include/wait_condition.inc -SELECT COUNT(*) FROM t1; +--send COMMIT + +--connection node_1a # wait for the local commit to enter in commit monitor wait state --let $galera_sync_point = apply_monitor_slave_enter_sync commit_monitor_master_enter_sync --source include/galera_wait_sync_point.inc --source include/galera_clear_sync_point.inc +# first applier is now waiting in before commit, and local trx in commit monitor + # set sync point before replaying SET GLOBAL DEBUG_DBUG = "d,sync.wsrep_replay_cb"; From dda0bfaaecc898d7a4b1e1234e0f5083294ccf6e Mon Sep 17 00:00:00 2001 From: Julius Goryavsky Date: Tue, 14 Dec 2021 03:47:59 +0100 Subject: [PATCH 17/65] MDEV-27181: Galera SST scripts should use ssl_capath for CA directory 1. Galera SST scripts should use ssl_capath (not ssl_ca) for CA directory. The current implementation tries to automatically detect the path using the trailing slash in the ssl_ca variable value, but this approach is not compatible with the server configuration. Now, by analogy with the server, SST scripts also use a separate ssl_capath variable. In addition, a similar tcapath variable has been added for the old-style configuration (in the "sst" section). 2. Openssl utility detection made more reliable. 3. Removed extra spaces in automatically generated command lines - to simplify debugging of the SST scripts. 4. In general, the code for detecting the presence or absence of auxiliary utilities has been improved - it is made more reliable in some configurations (and for shells other than bash). --- mysql-test/std_data/capath/3106f582.0 | 1 + mysql-test/std_data/capath/cacert.pem | 79 +++ mysql-test/std_data/capath/ed1f42db.0 | 1 + ..._sst_rsync_encrypt_with_capath,debug.rdiff | 191 +++++++ ...alera_sst_rsync_encrypt_with_capath.result | 520 ++++++++++++++++++ .../galera_sst_rsync_encrypt_with_key.result | 2 - ...alera_sst_rsync_encrypt_with_server.result | 2 - .../galera_sst_mariabackup_table_options.test | 1 + .../galera_sst_rsync_encrypt_with_capath.cnf | 20 + .../galera_sst_rsync_encrypt_with_capath.test | 26 + .../t/galera_sst_rsync_encrypt_with_key.test | 3 - .../galera_sst_rsync_encrypt_with_server.test | 3 - .../t/galera_ipv6_mariabackup.test | 1 + .../t/galera_ipv6_mariabackup_section.test | 1 + scripts/wsrep_sst_common.sh | 142 +++-- scripts/wsrep_sst_mariabackup.sh | 292 +++++----- scripts/wsrep_sst_mysqldump.sh | 11 +- scripts/wsrep_sst_rsync.sh | 117 ++-- vio/viosslfactories.c | 17 + 19 files changed, 1172 insertions(+), 258 deletions(-) create mode 120000 mysql-test/std_data/capath/3106f582.0 create mode 100644 mysql-test/std_data/capath/cacert.pem create mode 120000 mysql-test/std_data/capath/ed1f42db.0 create mode 100644 mysql-test/suite/galera/r/galera_sst_rsync_encrypt_with_capath,debug.rdiff create mode 100644 mysql-test/suite/galera/r/galera_sst_rsync_encrypt_with_capath.result create mode 100644 mysql-test/suite/galera/t/galera_sst_rsync_encrypt_with_capath.cnf create mode 100644 mysql-test/suite/galera/t/galera_sst_rsync_encrypt_with_capath.test diff --git a/mysql-test/std_data/capath/3106f582.0 b/mysql-test/std_data/capath/3106f582.0 new file mode 120000 index 0000000000000..1310cfcff205a --- /dev/null +++ b/mysql-test/std_data/capath/3106f582.0 @@ -0,0 +1 @@ +cacert.pem \ No newline at end of file diff --git a/mysql-test/std_data/capath/cacert.pem b/mysql-test/std_data/capath/cacert.pem new file mode 100644 index 0000000000000..23dda2318e150 --- /dev/null +++ b/mysql-test/std_data/capath/cacert.pem @@ -0,0 +1,79 @@ +Certificate: + Data: + Version: 3 (0x2) + Serial Number: + d0:4d:23:85:ee:59:b3:fa + Signature Algorithm: sha256WithRSAEncryption + Issuer: CN=cacert, C=FI, ST=Helsinki, L=Helsinki, O=MariaDB + Validity + Not Before: Jan 27 10:11:10 2019 GMT + Not After : Jan 22 10:11:10 2039 GMT + Subject: CN=cacert, C=FI, ST=Helsinki, L=Helsinki, O=MariaDB + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + Public-Key: (2048 bit) + Modulus: + 00:e8:0e:a7:84:d3:75:30:06:30:b2:10:b9:d1:88: + 36:2b:5e:f8:c8:44:57:cb:67:72:ab:96:95:33:d5: + 88:d1:8f:23:50:98:ba:6d:20:00:80:bd:35:d5:c1: + bf:98:49:c4:0a:15:4a:34:a6:21:9b:2e:8c:15:09: + f0:63:81:02:c2:7c:e2:53:e0:f7:a1:1a:40:5e:8f: + 41:4a:4c:56:d4:20:f1:d5:a7:c1:53:2e:ff:7e:37: + 17:cc:7e:74:bd:e2:22:33:ce:8c:77:62:a4:c5:3f: + 44:35:7b:7e:b9:f5:7d:8c:7a:27:58:fd:2c:42:86: + 2e:e7:6b:01:99:7b:fe:7d:a7:a1:4f:3e:39:39:54: + 1f:61:de:74:66:d1:77:4f:43:1b:66:70:29:85:de: + fc:8f:8e:1b:7b:a2:66:48:26:7f:9b:a6:fd:4a:e4: + dc:eb:ed:bd:f8:e3:f1:57:98:13:6f:f1:a3:2a:e3: + 73:bd:8d:7c:6f:4b:59:35:bc:b5:42:3e:99:a7:13: + 8d:be:2e:5c:9a:c6:5b:ab:ae:bf:00:e9:c8:ee:05: + 22:8e:d5:67:1a:47:9a:6d:9c:f9:42:3e:15:34:f8: + 31:ec:b4:7e:d3:92:95:b0:b8:f9:66:f3:bd:1d:31: + 2c:b1:90:62:a1:f8:4e:a6:5d:26:22:f0:e1:fe:16: + 2b:69 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Subject Key Identifier: + CA:71:99:89:F0:72:AB:75:66:BB:65:6A:03:04:72:A5:7B:95:A6:93 + X509v3 Authority Key Identifier: + keyid:CA:71:99:89:F0:72:AB:75:66:BB:65:6A:03:04:72:A5:7B:95:A6:93 + + X509v3 Basic Constraints: + CA:TRUE + Signature Algorithm: sha256WithRSAEncryption + df:fd:74:29:5b:5e:9a:8b:09:02:40:59:73:cb:71:47:3f:97: + 3d:a9:fd:c4:8c:01:29:c9:86:b8:71:55:ff:72:0e:50:dc:c8: + b5:e6:91:41:52:47:21:30:cc:4d:e7:3b:4b:db:55:ea:7d:46: + eb:53:e0:b7:1b:80:7c:b1:0c:d3:d1:bc:a0:73:ae:96:1f:fd: + 05:52:7e:54:d5:03:52:69:7b:34:5f:27:d7:98:da:98:76:73: + e6:bb:50:59:2a:94:90:67:03:1c:a4:76:2f:ee:ef:59:60:09: + 48:33:03:2b:52:ed:83:42:f8:71:19:7f:d8:be:40:ed:20:01: + 90:3c:7e:1c:8b:d2:9f:f3:2f:09:1f:50:c8:10:e1:8a:d9:a5: + 49:9c:0b:74:17:b9:2b:68:f6:1e:73:c2:73:10:38:b3:35:e2: + 87:91:1b:a1:d1:9b:81:9d:1b:32:cc:03:6e:4c:82:95:81:11: + 42:56:e2:16:2b:22:65:db:40:2c:ca:dc:03:f4:d5:07:cf:f5: + 13:b2:cf:51:5b:24:cd:c7:d1:9b:42:8e:f9:df:5d:1e:5a:09: + a3:4f:a9:0b:f4:21:c5:bb:ff:02:93:67:e8:2d:ee:ab:d9:59: + 76:03:2c:a1:bd:fb:dc:af:b6:82:94:71:85:53:a8:18:0d:3a: + 9e:42:eb:59 +-----BEGIN CERTIFICATE----- +MIIDfzCCAmegAwIBAgIJANBNI4XuWbP6MA0GCSqGSIb3DQEBCwUAMFYxDzANBgNV +BAMMBmNhY2VydDELMAkGA1UEBhMCRkkxETAPBgNVBAgMCEhlbHNpbmtpMREwDwYD +VQQHDAhIZWxzaW5raTEQMA4GA1UECgwHTWFyaWFEQjAeFw0xOTAxMjcxMDExMTBa +Fw0zOTAxMjIxMDExMTBaMFYxDzANBgNVBAMMBmNhY2VydDELMAkGA1UEBhMCRkkx +ETAPBgNVBAgMCEhlbHNpbmtpMREwDwYDVQQHDAhIZWxzaW5raTEQMA4GA1UECgwH +TWFyaWFEQjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOgOp4TTdTAG +MLIQudGINite+MhEV8tncquWlTPViNGPI1CYum0gAIC9NdXBv5hJxAoVSjSmIZsu +jBUJ8GOBAsJ84lPg96EaQF6PQUpMVtQg8dWnwVMu/343F8x+dL3iIjPOjHdipMU/ +RDV7frn1fYx6J1j9LEKGLudrAZl7/n2noU8+OTlUH2HedGbRd09DG2ZwKYXe/I+O +G3uiZkgmf5um/Urk3Ovtvfjj8VeYE2/xoyrjc72NfG9LWTW8tUI+macTjb4uXJrG +W6uuvwDpyO4FIo7VZxpHmm2c+UI+FTT4Mey0ftOSlbC4+WbzvR0xLLGQYqH4TqZd +JiLw4f4WK2kCAwEAAaNQME4wHQYDVR0OBBYEFMpxmYnwcqt1ZrtlagMEcqV7laaT +MB8GA1UdIwQYMBaAFMpxmYnwcqt1ZrtlagMEcqV7laaTMAwGA1UdEwQFMAMBAf8w +DQYJKoZIhvcNAQELBQADggEBAN/9dClbXpqLCQJAWXPLcUc/lz2p/cSMASnJhrhx +Vf9yDlDcyLXmkUFSRyEwzE3nO0vbVep9RutT4LcbgHyxDNPRvKBzrpYf/QVSflTV +A1JpezRfJ9eY2ph2c+a7UFkqlJBnAxykdi/u71lgCUgzAytS7YNC+HEZf9i+QO0g +AZA8fhyL0p/zLwkfUMgQ4YrZpUmcC3QXuSto9h5zwnMQOLM14oeRG6HRm4GdGzLM +A25MgpWBEUJW4hYrImXbQCzK3AP01QfP9ROyz1FbJM3H0ZtCjvnfXR5aCaNPqQv0 +IcW7/wKTZ+gt7qvZWXYDLKG9+9yvtoKUcYVTqBgNOp5C61k= +-----END CERTIFICATE----- diff --git a/mysql-test/std_data/capath/ed1f42db.0 b/mysql-test/std_data/capath/ed1f42db.0 new file mode 120000 index 0000000000000..1310cfcff205a --- /dev/null +++ b/mysql-test/std_data/capath/ed1f42db.0 @@ -0,0 +1 @@ +cacert.pem \ No newline at end of file diff --git a/mysql-test/suite/galera/r/galera_sst_rsync_encrypt_with_capath,debug.rdiff b/mysql-test/suite/galera/r/galera_sst_rsync_encrypt_with_capath,debug.rdiff new file mode 100644 index 0000000000000..59417d4d6e445 --- /dev/null +++ b/mysql-test/suite/galera/r/galera_sst_rsync_encrypt_with_capath,debug.rdiff @@ -0,0 +1,191 @@ +--- r/galera_sst_rsync_encrypt_with_server.result ++++ r/galera_sst_rsync_encrypt_with_server,debug.reject +@@ -519,4 +519,188 @@ + 1 + DROP TABLE t1; + COMMIT; ++Performing State Transfer on a server that has been killed and restarted ++while a DDL was in progress on it ++connection node_1; ++CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB; ++SET AUTOCOMMIT=OFF; ++START TRANSACTION; ++INSERT INTO t1 VALUES (1,'node1_committed_before'); ++INSERT INTO t1 VALUES (2,'node1_committed_before'); ++INSERT INTO t1 VALUES (3,'node1_committed_before'); ++INSERT INTO t1 VALUES (4,'node1_committed_before'); ++INSERT INTO t1 VALUES (5,'node1_committed_before'); ++connection node_2; ++START TRANSACTION; ++INSERT INTO t1 VALUES (6,'node2_committed_before'); ++INSERT INTO t1 VALUES (7,'node2_committed_before'); ++INSERT INTO t1 VALUES (8,'node2_committed_before'); ++INSERT INTO t1 VALUES (9,'node2_committed_before'); ++INSERT INTO t1 VALUES (10,'node2_committed_before'); ++COMMIT; ++SET GLOBAL debug_dbug = 'd,sync.alter_opened_table'; ++connection node_1; ++ALTER TABLE t1 ADD COLUMN f2 INTEGER; ++connection node_2; ++SET wsrep_sync_wait = 0; ++Killing server ... ++connection node_1; ++SET AUTOCOMMIT=OFF; ++START TRANSACTION; ++INSERT INTO t1 (id,f1) VALUES (11,'node1_committed_during'); ++INSERT INTO t1 (id,f1) VALUES (12,'node1_committed_during'); ++INSERT INTO t1 (id,f1) VALUES (13,'node1_committed_during'); ++INSERT INTO t1 (id,f1) VALUES (14,'node1_committed_during'); ++INSERT INTO t1 (id,f1) VALUES (15,'node1_committed_during'); ++COMMIT; ++START TRANSACTION; ++INSERT INTO t1 (id,f1) VALUES (16,'node1_to_be_committed_after'); ++INSERT INTO t1 (id,f1) VALUES (17,'node1_to_be_committed_after'); ++INSERT INTO t1 (id,f1) VALUES (18,'node1_to_be_committed_after'); ++INSERT INTO t1 (id,f1) VALUES (19,'node1_to_be_committed_after'); ++INSERT INTO t1 (id,f1) VALUES (20,'node1_to_be_committed_after'); ++connect node_1a_galera_st_kill_slave_ddl, 127.0.0.1, root, , test, $NODE_MYPORT_1; ++SET AUTOCOMMIT=OFF; ++START TRANSACTION; ++INSERT INTO t1 (id,f1) VALUES (21,'node1_to_be_rollbacked_after'); ++INSERT INTO t1 (id,f1) VALUES (22,'node1_to_be_rollbacked_after'); ++INSERT INTO t1 (id,f1) VALUES (23,'node1_to_be_rollbacked_after'); ++INSERT INTO t1 (id,f1) VALUES (24,'node1_to_be_rollbacked_after'); ++INSERT INTO t1 (id,f1) VALUES (25,'node1_to_be_rollbacked_after'); ++connection node_2; ++Performing --wsrep-recover ... ++connection node_2; ++Starting server ... ++Using --wsrep-start-position when starting mysqld ... ++SET AUTOCOMMIT=OFF; ++START TRANSACTION; ++INSERT INTO t1 (id,f1) VALUES (26,'node2_committed_after'); ++INSERT INTO t1 (id,f1) VALUES (27,'node2_committed_after'); ++INSERT INTO t1 (id,f1) VALUES (28,'node2_committed_after'); ++INSERT INTO t1 (id,f1) VALUES (29,'node2_committed_after'); ++INSERT INTO t1 (id,f1) VALUES (30,'node2_committed_after'); ++COMMIT; ++connection node_1; ++INSERT INTO t1 (id,f1) VALUES (31,'node1_to_be_committed_after'); ++INSERT INTO t1 (id,f1) VALUES (32,'node1_to_be_committed_after'); ++INSERT INTO t1 (id,f1) VALUES (33,'node1_to_be_committed_after'); ++INSERT INTO t1 (id,f1) VALUES (34,'node1_to_be_committed_after'); ++INSERT INTO t1 (id,f1) VALUES (35,'node1_to_be_committed_after'); ++COMMIT; ++SET AUTOCOMMIT=OFF; ++START TRANSACTION; ++INSERT INTO t1 (id,f1) VALUES (36,'node1_committed_after'); ++INSERT INTO t1 (id,f1) VALUES (37,'node1_committed_after'); ++INSERT INTO t1 (id,f1) VALUES (38,'node1_committed_after'); ++INSERT INTO t1 (id,f1) VALUES (39,'node1_committed_after'); ++INSERT INTO t1 (id,f1) VALUES (40,'node1_committed_after'); ++COMMIT; ++connection node_1a_galera_st_kill_slave_ddl; ++INSERT INTO t1 (id,f1) VALUES (41,'node1_to_be_rollbacked_after'); ++INSERT INTO t1 (id,f1) VALUES (42,'node1_to_be_rollbacked_after'); ++INSERT INTO t1 (id,f1) VALUES (43,'node1_to_be_rollbacked_after'); ++INSERT INTO t1 (id,f1) VALUES (44,'node1_to_be_rollbacked_after'); ++INSERT INTO t1 (id,f1) VALUES (45,'node1_to_be_rollbacked_after'); ++ROLLBACK; ++SET AUTOCOMMIT=ON; ++SET SESSION wsrep_sync_wait=15; ++SELECT COUNT(*) AS EXPECT_3 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1'; ++EXPECT_3 ++3 ++SELECT COUNT(*) AS EXPECT_35 FROM t1; ++EXPECT_35 ++35 ++SELECT * FROM t1; ++id f1 f2 ++1 node1_committed_before NULL ++2 node1_committed_before NULL ++3 node1_committed_before NULL ++4 node1_committed_before NULL ++5 node1_committed_before NULL ++6 node2_committed_before NULL ++7 node2_committed_before NULL ++8 node2_committed_before NULL ++9 node2_committed_before NULL ++10 node2_committed_before NULL ++11 node1_committed_during NULL ++12 node1_committed_during NULL ++13 node1_committed_during NULL ++14 node1_committed_during NULL ++15 node1_committed_during NULL ++16 node1_to_be_committed_after NULL ++17 node1_to_be_committed_after NULL ++18 node1_to_be_committed_after NULL ++19 node1_to_be_committed_after NULL ++20 node1_to_be_committed_after NULL ++26 node2_committed_after NULL ++27 node2_committed_after NULL ++28 node2_committed_after NULL ++29 node2_committed_after NULL ++30 node2_committed_after NULL ++31 node1_to_be_committed_after NULL ++32 node1_to_be_committed_after NULL ++33 node1_to_be_committed_after NULL ++34 node1_to_be_committed_after NULL ++35 node1_to_be_committed_after NULL ++36 node1_committed_after NULL ++37 node1_committed_after NULL ++38 node1_committed_after NULL ++39 node1_committed_after NULL ++40 node1_committed_after NULL ++SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; ++COUNT(*) = 0 ++1 ++COMMIT; ++connection node_1; ++SET AUTOCOMMIT=ON; ++SET SESSION wsrep_sync_wait=15; ++SELECT COUNT(*) AS EXPECT_3 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1'; ++EXPECT_3 ++3 ++SELECT COUNT(*) AS EXPECT_35 FROM t1; ++EXPECT_35 ++35 ++SELECT * FROM t1; ++id f1 f2 ++1 node1_committed_before NULL ++2 node1_committed_before NULL ++3 node1_committed_before NULL ++4 node1_committed_before NULL ++5 node1_committed_before NULL ++6 node2_committed_before NULL ++7 node2_committed_before NULL ++8 node2_committed_before NULL ++9 node2_committed_before NULL ++10 node2_committed_before NULL ++11 node1_committed_during NULL ++12 node1_committed_during NULL ++13 node1_committed_during NULL ++14 node1_committed_during NULL ++15 node1_committed_during NULL ++16 node1_to_be_committed_after NULL ++17 node1_to_be_committed_after NULL ++18 node1_to_be_committed_after NULL ++19 node1_to_be_committed_after NULL ++20 node1_to_be_committed_after NULL ++26 node2_committed_after NULL ++27 node2_committed_after NULL ++28 node2_committed_after NULL ++29 node2_committed_after NULL ++30 node2_committed_after NULL ++31 node1_to_be_committed_after NULL ++32 node1_to_be_committed_after NULL ++33 node1_to_be_committed_after NULL ++34 node1_to_be_committed_after NULL ++35 node1_to_be_committed_after NULL ++36 node1_committed_after NULL ++37 node1_committed_after NULL ++38 node1_committed_after NULL ++39 node1_committed_after NULL ++40 node1_committed_after NULL ++SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; ++COUNT(*) = 0 ++1 ++DROP TABLE t1; ++COMMIT; ++SET GLOBAL debug_dbug = $debug_orig; + include/assert_grep.inc [Using stunnel for SSL encryption] diff --git a/mysql-test/suite/galera/r/galera_sst_rsync_encrypt_with_capath.result b/mysql-test/suite/galera/r/galera_sst_rsync_encrypt_with_capath.result new file mode 100644 index 0000000000000..be8c845bdcf4a --- /dev/null +++ b/mysql-test/suite/galera/r/galera_sst_rsync_encrypt_with_capath.result @@ -0,0 +1,520 @@ +connection node_2; +connection node_1; +connection node_1; +connection node_2; +connection node_1; +Performing State Transfer on a server that has been shut down cleanly and restarted +connection node_1; +CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES (1,'node1_committed_before'); +INSERT INTO t1 VALUES (2,'node1_committed_before'); +INSERT INTO t1 VALUES (3,'node1_committed_before'); +INSERT INTO t1 VALUES (4,'node1_committed_before'); +INSERT INTO t1 VALUES (5,'node1_committed_before'); +COMMIT; +connection node_2; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES (6,'node2_committed_before'); +INSERT INTO t1 VALUES (7,'node2_committed_before'); +INSERT INTO t1 VALUES (8,'node2_committed_before'); +INSERT INTO t1 VALUES (9,'node2_committed_before'); +INSERT INTO t1 VALUES (10,'node2_committed_before'); +COMMIT; +Shutting down server ... +connection node_1; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES (11,'node1_committed_during'); +INSERT INTO t1 VALUES (12,'node1_committed_during'); +INSERT INTO t1 VALUES (13,'node1_committed_during'); +INSERT INTO t1 VALUES (14,'node1_committed_during'); +INSERT INTO t1 VALUES (15,'node1_committed_during'); +COMMIT; +START TRANSACTION; +INSERT INTO t1 VALUES (16,'node1_to_be_committed_after'); +INSERT INTO t1 VALUES (17,'node1_to_be_committed_after'); +INSERT INTO t1 VALUES (18,'node1_to_be_committed_after'); +INSERT INTO t1 VALUES (19,'node1_to_be_committed_after'); +INSERT INTO t1 VALUES (20,'node1_to_be_committed_after'); +connect node_1a_galera_st_shutdown_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES (21,'node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES (22,'node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES (23,'node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES (24,'node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES (25,'node1_to_be_rollbacked_after'); +connection node_2; +Starting server ... +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES (26,'node2_committed_after'); +INSERT INTO t1 VALUES (27,'node2_committed_after'); +INSERT INTO t1 VALUES (28,'node2_committed_after'); +INSERT INTO t1 VALUES (29,'node2_committed_after'); +INSERT INTO t1 VALUES (30,'node2_committed_after'); +COMMIT; +connection node_1; +INSERT INTO t1 VALUES (31,'node1_to_be_committed_after'); +INSERT INTO t1 VALUES (32,'node1_to_be_committed_after'); +INSERT INTO t1 VALUES (33,'node1_to_be_committed_after'); +INSERT INTO t1 VALUES (34,'node1_to_be_committed_after'); +INSERT INTO t1 VALUES (35,'node1_to_be_committed_after'); +COMMIT; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES (36,'node1_committed_after'); +INSERT INTO t1 VALUES (37,'node1_committed_after'); +INSERT INTO t1 VALUES (38,'node1_committed_after'); +INSERT INTO t1 VALUES (39,'node1_committed_after'); +INSERT INTO t1 VALUES (40,'node1_committed_after'); +COMMIT; +connection node_1a_galera_st_shutdown_slave; +INSERT INTO t1 VALUES (41,'node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES (42,'node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES (43,'node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES (44,'node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES (45,'node1_to_be_rollbacked_after'); +ROLLBACK; +SET AUTOCOMMIT=ON; +SET SESSION wsrep_sync_wait=15; +SELECT COUNT(*) AS EXPECT_15 FROM t1; +EXPECT_15 +35 +SELECT * from t1; +id f1 +1 node1_committed_before +2 node1_committed_before +3 node1_committed_before +4 node1_committed_before +5 node1_committed_before +6 node2_committed_before +7 node2_committed_before +8 node2_committed_before +9 node2_committed_before +10 node2_committed_before +11 node1_committed_during +12 node1_committed_during +13 node1_committed_during +14 node1_committed_during +15 node1_committed_during +16 node1_to_be_committed_after +17 node1_to_be_committed_after +18 node1_to_be_committed_after +19 node1_to_be_committed_after +20 node1_to_be_committed_after +26 node2_committed_after +27 node2_committed_after +28 node2_committed_after +29 node2_committed_after +30 node2_committed_after +31 node1_to_be_committed_after +32 node1_to_be_committed_after +33 node1_to_be_committed_after +34 node1_to_be_committed_after +35 node1_to_be_committed_after +36 node1_committed_after +37 node1_committed_after +38 node1_committed_after +39 node1_committed_after +40 node1_committed_after +SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; +COUNT(*) = 0 +1 +COMMIT; +connection node_1; +SET AUTOCOMMIT=ON; +SET SESSION wsrep_sync_wait=15; +SELECT COUNT(*) AS EXPECT_15 FROM t1; +EXPECT_15 +35 +SELECT * from t1; +id f1 +1 node1_committed_before +2 node1_committed_before +3 node1_committed_before +4 node1_committed_before +5 node1_committed_before +6 node2_committed_before +7 node2_committed_before +8 node2_committed_before +9 node2_committed_before +10 node2_committed_before +11 node1_committed_during +12 node1_committed_during +13 node1_committed_during +14 node1_committed_during +15 node1_committed_during +16 node1_to_be_committed_after +17 node1_to_be_committed_after +18 node1_to_be_committed_after +19 node1_to_be_committed_after +20 node1_to_be_committed_after +26 node2_committed_after +27 node2_committed_after +28 node2_committed_after +29 node2_committed_after +30 node2_committed_after +31 node1_to_be_committed_after +32 node1_to_be_committed_after +33 node1_to_be_committed_after +34 node1_to_be_committed_after +35 node1_to_be_committed_after +36 node1_committed_after +37 node1_committed_after +38 node1_committed_after +39 node1_committed_after +40 node1_committed_after +SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; +COUNT(*) = 0 +1 +DROP TABLE t1; +COMMIT; +Performing State Transfer on a server that starts from a clean var directory +This is accomplished by shutting down node #2 and removing its var directory before restarting it +connection node_1; +CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES (1,'node1_committed_before'); +INSERT INTO t1 VALUES (2,'node1_committed_before'); +INSERT INTO t1 VALUES (3,'node1_committed_before'); +INSERT INTO t1 VALUES (4,'node1_committed_before'); +INSERT INTO t1 VALUES (5,'node1_committed_before'); +COMMIT; +connection node_2; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES (6,'node2_committed_before'); +INSERT INTO t1 VALUES (7,'node2_committed_before'); +INSERT INTO t1 VALUES (8,'node2_committed_before'); +INSERT INTO t1 VALUES (9,'node2_committed_before'); +INSERT INTO t1 VALUES (10,'node2_committed_before'); +COMMIT; +Shutting down server ... +connection node_1; +Cleaning var directory ... +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES (11,'node1_committed_during'); +INSERT INTO t1 VALUES (12,'node1_committed_during'); +INSERT INTO t1 VALUES (13,'node1_committed_during'); +INSERT INTO t1 VALUES (14,'node1_committed_during'); +INSERT INTO t1 VALUES (15,'node1_committed_during'); +COMMIT; +START TRANSACTION; +INSERT INTO t1 VALUES (16,'node1_to_be_committed_after'); +INSERT INTO t1 VALUES (17,'node1_to_be_committed_after'); +INSERT INTO t1 VALUES (18,'node1_to_be_committed_after'); +INSERT INTO t1 VALUES (19,'node1_to_be_committed_after'); +INSERT INTO t1 VALUES (20,'node1_to_be_committed_after'); +connect node_1a_galera_st_clean_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES (21,'node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES (22,'node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES (23,'node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES (24,'node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES (25,'node1_to_be_rollbacked_after'); +connection node_2; +Starting server ... +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES (26,'node2_committed_after'); +INSERT INTO t1 VALUES (27,'node2_committed_after'); +INSERT INTO t1 VALUES (28,'node2_committed_after'); +INSERT INTO t1 VALUES (29,'node2_committed_after'); +INSERT INTO t1 VALUES (30,'node2_committed_after'); +COMMIT; +connection node_1; +INSERT INTO t1 VALUES (31,'node1_to_be_committed_after'); +INSERT INTO t1 VALUES (32,'node1_to_be_committed_after'); +INSERT INTO t1 VALUES (33,'node1_to_be_committed_after'); +INSERT INTO t1 VALUES (34,'node1_to_be_committed_after'); +INSERT INTO t1 VALUES (35,'node1_to_be_committed_after'); +COMMIT; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES (36,'node1_committed_after'); +INSERT INTO t1 VALUES (37,'node1_committed_after'); +INSERT INTO t1 VALUES (38,'node1_committed_after'); +INSERT INTO t1 VALUES (39,'node1_committed_after'); +INSERT INTO t1 VALUES (40,'node1_committed_after'); +COMMIT; +connection node_1a_galera_st_clean_slave; +INSERT INTO t1 VALUES (41,'node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES (42,'node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES (43,'node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES (44,'node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES (45,'node1_to_be_rollbacked_after'); +ROLLBACK; +SET AUTOCOMMIT=ON; +SET SESSION wsrep_sync_wait=15; +SELECT COUNT(*) AS EXPECT_35 FROM t1; +EXPECT_35 +35 +SELECT * from t1; +id f1 +1 node1_committed_before +2 node1_committed_before +3 node1_committed_before +4 node1_committed_before +5 node1_committed_before +6 node2_committed_before +7 node2_committed_before +8 node2_committed_before +9 node2_committed_before +10 node2_committed_before +11 node1_committed_during +12 node1_committed_during +13 node1_committed_during +14 node1_committed_during +15 node1_committed_during +16 node1_to_be_committed_after +17 node1_to_be_committed_after +18 node1_to_be_committed_after +19 node1_to_be_committed_after +20 node1_to_be_committed_after +26 node2_committed_after +27 node2_committed_after +28 node2_committed_after +29 node2_committed_after +30 node2_committed_after +31 node1_to_be_committed_after +32 node1_to_be_committed_after +33 node1_to_be_committed_after +34 node1_to_be_committed_after +35 node1_to_be_committed_after +36 node1_committed_after +37 node1_committed_after +38 node1_committed_after +39 node1_committed_after +40 node1_committed_after +SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; +COUNT(*) = 0 +1 +COMMIT; +connection node_1; +SET AUTOCOMMIT=ON; +SET SESSION wsrep_sync_wait=15; +SELECT COUNT(*) AS EXPECT_35 FROM t1; +EXPECT_35 +35 +SELECT * from t1; +id f1 +1 node1_committed_before +2 node1_committed_before +3 node1_committed_before +4 node1_committed_before +5 node1_committed_before +6 node2_committed_before +7 node2_committed_before +8 node2_committed_before +9 node2_committed_before +10 node2_committed_before +11 node1_committed_during +12 node1_committed_during +13 node1_committed_during +14 node1_committed_during +15 node1_committed_during +16 node1_to_be_committed_after +17 node1_to_be_committed_after +18 node1_to_be_committed_after +19 node1_to_be_committed_after +20 node1_to_be_committed_after +26 node2_committed_after +27 node2_committed_after +28 node2_committed_after +29 node2_committed_after +30 node2_committed_after +31 node1_to_be_committed_after +32 node1_to_be_committed_after +33 node1_to_be_committed_after +34 node1_to_be_committed_after +35 node1_to_be_committed_after +36 node1_committed_after +37 node1_committed_after +38 node1_committed_after +39 node1_committed_after +40 node1_committed_after +SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; +COUNT(*) = 0 +1 +DROP TABLE t1; +COMMIT; +Performing State Transfer on a server that has been killed and restarted +connection node_1; +CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES (1,'node1_committed_before'); +INSERT INTO t1 VALUES (2,'node1_committed_before'); +INSERT INTO t1 VALUES (3,'node1_committed_before'); +INSERT INTO t1 VALUES (4,'node1_committed_before'); +INSERT INTO t1 VALUES (5,'node1_committed_before'); +COMMIT; +connection node_2; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES (6,'node2_committed_before'); +INSERT INTO t1 VALUES (7,'node2_committed_before'); +INSERT INTO t1 VALUES (8,'node2_committed_before'); +INSERT INTO t1 VALUES (9,'node2_committed_before'); +INSERT INTO t1 VALUES (10,'node2_committed_before'); +COMMIT; +Killing server ... +connection node_1; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES (11,'node1_committed_during'); +INSERT INTO t1 VALUES (12,'node1_committed_during'); +INSERT INTO t1 VALUES (13,'node1_committed_during'); +INSERT INTO t1 VALUES (14,'node1_committed_during'); +INSERT INTO t1 VALUES (15,'node1_committed_during'); +COMMIT; +START TRANSACTION; +INSERT INTO t1 VALUES (16,'node1_to_be_committed_after'); +INSERT INTO t1 VALUES (17,'node1_to_be_committed_after'); +INSERT INTO t1 VALUES (18,'node1_to_be_committed_after'); +INSERT INTO t1 VALUES (19,'node1_to_be_committed_after'); +INSERT INTO t1 VALUES (20,'node1_to_be_committed_after'); +connect node_1a_galera_st_kill_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES (21,'node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES (22,'node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES (23,'node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES (24,'node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES (25,'node1_to_be_rollbacked_after'); +connection node_2; +Performing --wsrep-recover ... +Starting server ... +Using --wsrep-start-position when starting mysqld ... +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES (26,'node2_committed_after'); +INSERT INTO t1 VALUES (27,'node2_committed_after'); +INSERT INTO t1 VALUES (28,'node2_committed_after'); +INSERT INTO t1 VALUES (29,'node2_committed_after'); +INSERT INTO t1 VALUES (30,'node2_committed_after'); +COMMIT; +connection node_1; +INSERT INTO t1 VALUES (31,'node1_to_be_committed_after'); +INSERT INTO t1 VALUES (32,'node1_to_be_committed_after'); +INSERT INTO t1 VALUES (33,'node1_to_be_committed_after'); +INSERT INTO t1 VALUES (34,'node1_to_be_committed_after'); +INSERT INTO t1 VALUES (35,'node1_to_be_committed_after'); +COMMIT; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES (36,'node1_committed_after'); +INSERT INTO t1 VALUES (37,'node1_committed_after'); +INSERT INTO t1 VALUES (38,'node1_committed_after'); +INSERT INTO t1 VALUES (39,'node1_committed_after'); +INSERT INTO t1 VALUES (40,'node1_committed_after'); +COMMIT; +connection node_1a_galera_st_kill_slave; +INSERT INTO t1 VALUES (41,'node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES (42,'node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES (43,'node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES (45,'node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES (46,'node1_to_be_rollbacked_after'); +ROLLBACK; +SET AUTOCOMMIT=ON; +SET SESSION wsrep_sync_wait=15; +SELECT COUNT(*) AS EXPECT_35 FROM t1; +EXPECT_35 +35 +SELECT * FROM t1; +id f1 +1 node1_committed_before +2 node1_committed_before +3 node1_committed_before +4 node1_committed_before +5 node1_committed_before +6 node2_committed_before +7 node2_committed_before +8 node2_committed_before +9 node2_committed_before +10 node2_committed_before +11 node1_committed_during +12 node1_committed_during +13 node1_committed_during +14 node1_committed_during +15 node1_committed_during +16 node1_to_be_committed_after +17 node1_to_be_committed_after +18 node1_to_be_committed_after +19 node1_to_be_committed_after +20 node1_to_be_committed_after +26 node2_committed_after +27 node2_committed_after +28 node2_committed_after +29 node2_committed_after +30 node2_committed_after +31 node1_to_be_committed_after +32 node1_to_be_committed_after +33 node1_to_be_committed_after +34 node1_to_be_committed_after +35 node1_to_be_committed_after +36 node1_committed_after +37 node1_committed_after +38 node1_committed_after +39 node1_committed_after +40 node1_committed_after +SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; +COUNT(*) = 0 +1 +COMMIT; +connection node_1; +SET AUTOCOMMIT=ON; +SET SESSION wsrep_sync_wait=15; +SELECT COUNT(*) AS EXPECT_35 FROM t1; +EXPECT_35 +35 +SELECT * FROM t1; +id f1 +1 node1_committed_before +2 node1_committed_before +3 node1_committed_before +4 node1_committed_before +5 node1_committed_before +6 node2_committed_before +7 node2_committed_before +8 node2_committed_before +9 node2_committed_before +10 node2_committed_before +11 node1_committed_during +12 node1_committed_during +13 node1_committed_during +14 node1_committed_during +15 node1_committed_during +16 node1_to_be_committed_after +17 node1_to_be_committed_after +18 node1_to_be_committed_after +19 node1_to_be_committed_after +20 node1_to_be_committed_after +26 node2_committed_after +27 node2_committed_after +28 node2_committed_after +29 node2_committed_after +30 node2_committed_after +31 node1_to_be_committed_after +32 node1_to_be_committed_after +33 node1_to_be_committed_after +34 node1_to_be_committed_after +35 node1_to_be_committed_after +36 node1_committed_after +37 node1_committed_after +38 node1_committed_after +39 node1_committed_after +40 node1_committed_after +SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; +COUNT(*) = 0 +1 +DROP TABLE t1; +COMMIT; +include/assert_grep.inc [Using stunnel for SSL encryption] diff --git a/mysql-test/suite/galera/r/galera_sst_rsync_encrypt_with_key.result b/mysql-test/suite/galera/r/galera_sst_rsync_encrypt_with_key.result index b791e580623d1..be8c845bdcf4a 100644 --- a/mysql-test/suite/galera/r/galera_sst_rsync_encrypt_with_key.result +++ b/mysql-test/suite/galera/r/galera_sst_rsync_encrypt_with_key.result @@ -2,8 +2,6 @@ connection node_2; connection node_1; connection node_1; connection node_2; -connection node_2; -CALL mtr.add_suppression("\\[ERROR\\] .*ib_buffer_pool' for reading: No such file or directory"); connection node_1; Performing State Transfer on a server that has been shut down cleanly and restarted connection node_1; diff --git a/mysql-test/suite/galera/r/galera_sst_rsync_encrypt_with_server.result b/mysql-test/suite/galera/r/galera_sst_rsync_encrypt_with_server.result index b791e580623d1..be8c845bdcf4a 100644 --- a/mysql-test/suite/galera/r/galera_sst_rsync_encrypt_with_server.result +++ b/mysql-test/suite/galera/r/galera_sst_rsync_encrypt_with_server.result @@ -2,8 +2,6 @@ connection node_2; connection node_1; connection node_1; connection node_2; -connection node_2; -CALL mtr.add_suppression("\\[ERROR\\] .*ib_buffer_pool' for reading: No such file or directory"); connection node_1; Performing State Transfer on a server that has been shut down cleanly and restarted connection node_1; diff --git a/mysql-test/suite/galera/t/galera_sst_mariabackup_table_options.test b/mysql-test/suite/galera/t/galera_sst_mariabackup_table_options.test index 953a163555977..7a3a6c825c497 100644 --- a/mysql-test/suite/galera/t/galera_sst_mariabackup_table_options.test +++ b/mysql-test/suite/galera/t/galera_sst_mariabackup_table_options.test @@ -66,6 +66,7 @@ COMMIT; --source include/wait_condition.inc --echo Cleaning var directory ... +--remove_file $MYSQLTEST_VARDIR/mysqld.2/data/grastate.dat --remove_files_wildcard $MYSQLTEST_VARDIR/mysqld.2/data/mtr --remove_files_wildcard $MYSQLTEST_VARDIR/mysqld.2/data/performance_schema --remove_files_wildcard $MYSQLTEST_VARDIR/mysqld.2/data/test diff --git a/mysql-test/suite/galera/t/galera_sst_rsync_encrypt_with_capath.cnf b/mysql-test/suite/galera/t/galera_sst_rsync_encrypt_with_capath.cnf new file mode 100644 index 0000000000000..3ab762df013b6 --- /dev/null +++ b/mysql-test/suite/galera/t/galera_sst_rsync_encrypt_with_capath.cnf @@ -0,0 +1,20 @@ +!include ../galera_2nodes.cnf + +[mysqld] +wsrep_sst_method=rsync +ssl-cert=@ENV.MYSQL_TEST_DIR/std_data/server-cert.pem +ssl-key=@ENV.MYSQL_TEST_DIR/std_data/server-key.pem +ssl-capath=@ENV.MYSQL_TEST_DIR/std_data/capath +# We need to turn off the default setting for the duration +# of the test (to test working with a directory instead of +# a file): +ssl-ca= + +[sst] +ssl-mode=VERIFY_CA + +[mysqld.1] +wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcache.size=1;pc.ignore_sb=true' + +[mysqld.2] +wsrep_provider_options='base_port=@mysqld.2.#galera_port;gcache.size=1;pc.ignore_sb=true' diff --git a/mysql-test/suite/galera/t/galera_sst_rsync_encrypt_with_capath.test b/mysql-test/suite/galera/t/galera_sst_rsync_encrypt_with_capath.test new file mode 100644 index 0000000000000..a2d92723ec485 --- /dev/null +++ b/mysql-test/suite/galera/t/galera_sst_rsync_encrypt_with_capath.test @@ -0,0 +1,26 @@ +--source include/big_test.inc +--source include/galera_cluster.inc +--source include/have_debug.inc +--source include/have_stunnel.inc + +# Save original auto_increment_offset values. +--let $node_1=node_1 +--let $node_2=node_2 +--source include/auto_increment_offset_save.inc + +--connection node_1 +--source suite/galera/include/galera_st_shutdown_slave.inc +--source suite/galera/include/galera_st_clean_slave.inc + +--source suite/galera/include/galera_st_kill_slave.inc +--source suite/galera/include/galera_st_kill_slave_ddl.inc + +# Confirm that transfer was SSL-encrypted +--let $assert_text = Using stunnel for SSL encryption +--let $assert_select = Using stunnel for SSL encryption +--let $assert_count = 5 +--let $assert_file = $MYSQLTEST_VARDIR/log/mysqld.1.err +--let $assert_only_after = CURRENT_TEST +--source include/assert_grep.inc + +--source include/auto_increment_offset_restore.inc diff --git a/mysql-test/suite/galera/t/galera_sst_rsync_encrypt_with_key.test b/mysql-test/suite/galera/t/galera_sst_rsync_encrypt_with_key.test index 838c473b9ce12..a2d92723ec485 100644 --- a/mysql-test/suite/galera/t/galera_sst_rsync_encrypt_with_key.test +++ b/mysql-test/suite/galera/t/galera_sst_rsync_encrypt_with_key.test @@ -8,9 +8,6 @@ --let $node_2=node_2 --source include/auto_increment_offset_save.inc ---connection node_2 -CALL mtr.add_suppression("\\[ERROR\\] .*ib_buffer_pool' for reading: No such file or directory"); - --connection node_1 --source suite/galera/include/galera_st_shutdown_slave.inc --source suite/galera/include/galera_st_clean_slave.inc diff --git a/mysql-test/suite/galera/t/galera_sst_rsync_encrypt_with_server.test b/mysql-test/suite/galera/t/galera_sst_rsync_encrypt_with_server.test index 838c473b9ce12..a2d92723ec485 100644 --- a/mysql-test/suite/galera/t/galera_sst_rsync_encrypt_with_server.test +++ b/mysql-test/suite/galera/t/galera_sst_rsync_encrypt_with_server.test @@ -8,9 +8,6 @@ --let $node_2=node_2 --source include/auto_increment_offset_save.inc ---connection node_2 -CALL mtr.add_suppression("\\[ERROR\\] .*ib_buffer_pool' for reading: No such file or directory"); - --connection node_1 --source suite/galera/include/galera_st_shutdown_slave.inc --source suite/galera/include/galera_st_clean_slave.inc diff --git a/mysql-test/suite/galera_3nodes/t/galera_ipv6_mariabackup.test b/mysql-test/suite/galera_3nodes/t/galera_ipv6_mariabackup.test index 31613454348e3..6e02350b12b4d 100644 --- a/mysql-test/suite/galera_3nodes/t/galera_ipv6_mariabackup.test +++ b/mysql-test/suite/galera_3nodes/t/galera_ipv6_mariabackup.test @@ -1,3 +1,4 @@ +--source include/big_test.inc --source include/galera_cluster.inc --source include/check_ipv6.inc --source include/have_innodb.inc diff --git a/mysql-test/suite/galera_3nodes/t/galera_ipv6_mariabackup_section.test b/mysql-test/suite/galera_3nodes/t/galera_ipv6_mariabackup_section.test index 3b2ca0892f18b..453aa21988dbc 100644 --- a/mysql-test/suite/galera_3nodes/t/galera_ipv6_mariabackup_section.test +++ b/mysql-test/suite/galera_3nodes/t/galera_ipv6_mariabackup_section.test @@ -1,3 +1,4 @@ +--source include/big_test.inc --source include/galera_cluster.inc --source include/check_ipv6.inc --source include/have_innodb.inc diff --git a/scripts/wsrep_sst_common.sh b/scripts/wsrep_sst_common.sh index dbd639595dfd6..5c84aa7c17f57 100644 --- a/scripts/wsrep_sst_common.sh +++ b/scripts/wsrep_sst_common.sh @@ -19,6 +19,9 @@ set -u +# Setting the path for some utilities on CentOS +export PATH="$PATH:/usr/sbin:/usr/bin:/sbin:/bin" + WSREP_SST_OPT_BYPASS=0 WSREP_SST_OPT_BINLOG="" WSREP_SST_OPT_BINLOG_INDEX="" @@ -384,10 +387,8 @@ case "$1" in skip_mysqld_arg=1 ;; '--innodb-force-recovery') - if [ -n "$value" ]; then - if [ "$value" -ne 0 ]; then - INNODB_FORCE_RECOVERY="$value" - fi + if [ -n "$value" -a "$value" != "0" ]; then + INNODB_FORCE_RECOVERY="$value" fi skip_mysqld_arg=1 ;; @@ -584,7 +585,8 @@ get_binlog() if [ -n "$WSREP_SST_OPT_ADDR_PORT" ]; then if [ -n "$WSREP_SST_OPT_PORT" ]; then if [ "$WSREP_SST_OPT_PORT" != "$WSREP_SST_OPT_ADDR_PORT" ]; then - echo "WSREP_SST: [ERROR] port in --port=$WSREP_SST_OPT_PORT differs from port in --address=$WSREP_SST_OPT_ADDR" >&2 + echo "WSREP_SST: [ERROR] port in --port=$WSREP_SST_OPT_PORT" \ + "differs from port in --address=$WSREP_SST_OPT_ADDR" >&2 exit 2 fi else @@ -616,8 +618,19 @@ fi readonly WSREP_SST_OPT_ADDR readonly WSREP_SST_OPT_ADDR_PORT -# try to use my_print_defaults, mysql and mysqldump that come with the sources -# (for MTR suite) +commandex() +{ + if [ -n "$BASH_VERSION" ]; then + command -v "$1" || : + elif [ -x "$1" ]; then + echo "$1" + else + which "$1" || : + fi +} + +# try to use my_print_defaults, mysql and mysqldump that come +# with the sources (for MTR suite): script_binary=$(dirname "$0") SCRIPTS_DIR=$(cd "$script_binary"; pwd -P) EXTRA_DIR="$SCRIPTS_DIR/../extra" @@ -626,13 +639,13 @@ CLIENT_DIR="$SCRIPTS_DIR/../client" if [ -x "$CLIENT_DIR/mysql" ]; then MYSQL_CLIENT="$CLIENT_DIR/mysql" else - MYSQL_CLIENT="$(command -v mysql)" + MYSQL_CLIENT=$(commandex 'mysql') fi if [ -x "$CLIENT_DIR/mysqldump" ]; then MYSQLDUMP="$CLIENT_DIR/mysqldump" else - MYSQLDUMP="$(command -v mysqldump)" + MYSQLDUMP=$(commandex 'mysqldump') fi wsrep_log() @@ -663,7 +676,7 @@ if [ -x "$SCRIPTS_DIR/my_print_defaults" ]; then elif [ -x "$EXTRA_DIR/my_print_defaults" ]; then MY_PRINT_DEFAULTS="$EXTRA_DIR/my_print_defaults" else - MY_PRINT_DEFAULTS="$(command -v my_print_defaults)" + MY_PRINT_DEFAULTS=$(commandex 'my_print_defaults') if [ -z "$MY_PRINT_DEFAULTS" ]; then wsrep_log_error "my_print_defaults not found in path" exit 2 @@ -673,16 +686,16 @@ fi readonly MY_PRINT_DEFAULTS wsrep_defaults="$WSREP_SST_OPT_DEFAULTS" -wsrep_defaults="$wsrep_defaults${wsrep_defaults:+ }$WSREP_SST_OPT_EXTRA_DEFAULTS" -wsrep_defaults="$wsrep_defaults${wsrep_defaults:+ }$WSREP_SST_OPT_SUFFIX_DEFAULT" +wsrep_defaults="$wsrep_defaults${WSREP_SST_OPT_EXTRA_DEFAULTS:+ }$WSREP_SST_OPT_EXTRA_DEFAULTS" +wsrep_defaults="$wsrep_defaults${WSREP_SST_OPT_SUFFIX_DEFAULT:+ }$WSREP_SST_OPT_SUFFIX_DEFAULT" -readonly WSREP_SST_OPT_CONF="$wsrep_defaults" +readonly WSREP_SST_OPT_CONF="${wsrep_defaults:+ }$wsrep_defaults" wsrep_defaults="$WSREP_SST_OPT_DEFAULT" -wsrep_defaults="$wsrep_defaults${wsrep_defaults:+ }$WSREP_SST_OPT_EXTRA_DEFAULT" -wsrep_defaults="$wsrep_defaults${wsrep_defaults:+ }$WSREP_SST_OPT_SUFFIX_DEFAULT" +wsrep_defaults="$wsrep_defaults${WSREP_SST_OPT_EXTRA_DEFAULT:+ }$WSREP_SST_OPT_EXTRA_DEFAULT" +wsrep_defaults="$wsrep_defaults${WSREP_SST_OPT_SUFFIX_DEFAULT:+ }$WSREP_SST_OPT_SUFFIX_DEFAULT" -readonly WSREP_SST_OPT_CONF_UNQUOTED="$wsrep_defaults" +readonly WSREP_SST_OPT_CONF_UNQUOTED="${wsrep_defaults:+ }$wsrep_defaults" # # User can specify mariabackup specific settings that will be used during sst @@ -819,8 +832,7 @@ if wsrep_auth_not_set; then fi # Splitting WSREP_SST_OPT_AUTH as "user:password" pair: -if ! wsrep_auth_not_set -then +if ! wsrep_auth_not_set; then # Extract username as shortest prefix up to first ':' character: WSREP_SST_OPT_AUTH_USER="${WSREP_SST_OPT_AUTH%%:*}" if [ -z "$WSREP_SST_OPT_USER" ]; then @@ -848,8 +860,7 @@ readonly WSREP_SST_OPT_USER readonly WSREP_SST_OPT_PSWD readonly WSREP_SST_OPT_AUTH -if [ -n "$WSREP_SST_OPT_REMOTE_AUTH" ] -then +if [ -n "$WSREP_SST_OPT_REMOTE_AUTH" ]; then # Split auth string at the last ':' readonly WSREP_SST_OPT_REMOTE_USER="${WSREP_SST_OPT_REMOTE_AUTH%%:*}" readonly WSREP_SST_OPT_REMOTE_PSWD="${WSREP_SST_OPT_REMOTE_AUTH#*:}" @@ -860,8 +871,7 @@ fi readonly WSREP_SST_OPT_REMOTE_AUTH -if [ -n "$WSREP_SST_OPT_DATA" ] -then +if [ -n "$WSREP_SST_OPT_DATA" ]; then SST_PROGRESS_FILE="$WSREP_SST_OPT_DATA/sst_in_progress" else SST_PROGRESS_FILE="" @@ -870,13 +880,14 @@ fi wsrep_cleanup_progress_file() { [ -n "$SST_PROGRESS_FILE" -a \ - -f "$SST_PROGRESS_FILE" ] && rm -f "$SST_PROGRESS_FILE" 2>/dev/null || true + -f "$SST_PROGRESS_FILE" ] && \ + rm -f "$SST_PROGRESS_FILE" 2>/dev/null || : } wsrep_check_program() { local prog="$1" - local cmd=$(command -v "$prog") + local cmd=$(commandex "$prog") if [ -z "$cmd" ]; then echo "'$prog' not found in PATH" return 2 # no such file or directory @@ -898,9 +909,9 @@ wsrep_check_programs() wsrep_check_datadir() { - if [ -z "$WSREP_SST_OPT_DATA" ] - then - wsrep_log_error "The '--datadir' parameter must be passed to the SST script" + if [ -z "$WSREP_SST_OPT_DATA" ]; then + wsrep_log_error \ + "The '--datadir' parameter must be passed to the SST script" exit 2 fi } @@ -912,10 +923,10 @@ get_openssl() return fi # Let's look for openssl: - OPENSSL_BINARY="$(command -v openssl)" + OPENSSL_BINARY=$(commandex 'openssl') if [ -z "$OPENSSL_BINARY" ]; then OPENSSL_BINARY='/usr/bin/openssl' - if [ -z "$OPENSSL_BINARY" ]; then + if [ ! -x "$OPENSSL_BINARY" ]; then OPENSSL_BINARY="" fi fi @@ -928,13 +939,12 @@ get_openssl() wsrep_gen_secret() { get_openssl - if [ -n "$OPENSSL_BINARY" ] - then + if [ -n "$OPENSSL_BINARY" ]; then echo $("$OPENSSL_BINARY" rand -hex 16) else printf "%04x%04x%04x%04x%04x%04x%04x%04x" \ - $RANDOM $RANDOM $RANDOM $RANDOM \ - $RANDOM $RANDOM $RANDOM $RANDOM + $RANDOM $RANDOM $RANDOM $RANDOM \ + $RANDOM $RANDOM $RANDOM $RANDOM fi } @@ -968,14 +978,14 @@ is_local_ip() fi # Now let's check if the given address is assigned to # one of the network cards: - local ip_util="$(command -v ip)" + local ip_util=$(commandex 'ip') if [ -n "$ip_util" ]; then # ip address show ouput format is " inet[6]
/": "$ip_util" address show \ | grep -E "^[[:space:]]*inet.? [^[:space:]]+/" -o \ | grep -F " $1/" >/dev/null && return 0 else - local ifconfig_util="$(command -v ifconfig)" + local ifconfig_util=$(commandex 'ifconfig') if [ -n "$ifconfig_util" ]; then # ifconfig output format is " inet[6]
...": "$ifconfig_util" \ @@ -992,15 +1002,15 @@ check_sockets_utils() sockstat_available=0 ss_available=0 - [ -n "$(command -v lsof)" ] && lsof_available=1 - [ -n "$(command -v sockstat)" ] && sockstat_available=1 - [ -n "$(command -v ss)" ] && ss_available=1 + [ -n "$(commandex lsof)" ] && lsof_available=1 + [ -n "$(commandex sockstat)" ] && sockstat_available=1 + [ -n "$(commandex ss)" ] && ss_available=1 if [ $lsof_available -eq 0 -a \ $sockstat_available -eq 0 -a \ $ss_available -eq 0 ] then - wsrep_log_error "Neither lsof, nor sockstat or ss tool was found in " \ + wsrep_log_error "Neither lsof, nor sockstat or ss tool was found in" \ "the PATH. Make sure you have it installed." exit 2 # ENOENT fi @@ -1085,26 +1095,38 @@ check_for_dhparams() # verify_ca_matches_cert() { - local ca="$1" - local cert="$2" - local path=${3:-0} + local cert="$1" + local ca="$2" + local cap="$3" # If the openssl utility is not installed, then # we will not do this certificate check: get_openssl if [ -z "$OPENSSL_BINARY" ]; then + wsrep_log_info "openssl utility not found" return fi - local not_match=0 + local readable=1; [ ! -r "$cert" ] && readable=0 + [ -n "$ca" ] && [ ! -r "$ca" ] && readable=0 + [ -n "$cap" ] && [ ! -r "$cap" ] && readable=0 - if [ $path -eq 0 ]; then - "$OPENSSL_BINARY" verify -verbose -CAfile "$ca" "$cert" >/dev/null 2>&1 || not_match=1 - else - "$OPENSSL_BINARY" verify -verbose -CApath "$ca" "$cert" >/dev/null 2>&1 || not_match=1 + if [ readable -eq 0 ]; then + wsrep_log_error \ + "Both PEM file and CA file (or path) must be readable" + exit 22 fi + local not_match=0 + local errmsg + errmsg=$("$OPENSSL_BINARY" verify -verbose \ + ${ca:+ -CAfile} ${ca:+ "$ca"} \ + ${cap:+ -CApath} ${cap:+ "$cap"} \ + "$cert" 2>&1) || not_match=1 + if [ $not_match -eq 1 ]; then + wsrep_log_info "run: \"$OPENSSL_BINARY\" verify -verbose${ca:+ -CAfile \"$ca\"}${cap:+ -CApath \"$cap\"} \"$cert\"" + wsrep_log_info "output: $errmsg" wsrep_log_error "******** FATAL ERROR ********************************************" wsrep_log_error "* The certifcate and CA (certificate authority) do not match. *" wsrep_log_error "* It does not appear that the certificate was issued by the CA. *" @@ -1124,12 +1146,18 @@ verify_ca_matches_cert() # verify_cert_matches_key() { - local cert_path="$1" - local key_path="$2" + local cert="$1" + local key="$2" + + if [ ! -r "$key" -o ! -r "$cert" ]; then + wsrep_log_error "Both the certificate file and the key file" \ + "must be readable" + exit 22 + fi # If the diff utility is not installed, then # we will not do this certificate check: - if [ -z "$(command -v diff)" ]; then + if [ -z "$(commandex diff)" ]; then return fi @@ -1142,13 +1170,13 @@ verify_cert_matches_key() # Generate the public key from the cert and the key. # They should match (otherwise we can't create an SSL connection). - if ! diff <("$OPENSSL_BINARY" x509 -in "$cert_path" -pubkey -noout 2>/dev/null) \ - <("$OPENSSL_BINARY" pkey -in "$key_path" -pubout 2>/dev/null) >/dev/null 2>&1 + if ! diff <("$OPENSSL_BINARY" x509 -in "$cert" -pubkey -noout 2>/dev/null) \ + <("$OPENSSL_BINARY" pkey -in "$key" -pubout 2>/dev/null) >/dev/null 2>&1 then - wsrep_log_error "******************* FATAL ERROR ****************" - wsrep_log_error "* The certifcate and private key do not match. *" - wsrep_log_error "* Please check your certificate and key files. *" - wsrep_log_error "************************************************" + wsrep_log_error "******************* FATAL ERROR *****************" + wsrep_log_error "* The certificate and private key do not match. *" + wsrep_log_error "* Please check your certificate and key files. *" + wsrep_log_error "*************************************************" exit 22 fi } @@ -1305,9 +1333,9 @@ get_proc() elif [ "$OS" = 'Darwin' -o "$OS" = 'FreeBSD' ]; then nproc=$(sysctl -n hw.ncpu) fi + set -e if [ -z "$nproc" ] || [ $nproc -eq 0 ]; then nproc=1 fi - set -e fi } diff --git a/scripts/wsrep_sst_mariabackup.sh b/scripts/wsrep_sst_mariabackup.sh index b429a9effd562..4bca785fcadb0 100644 --- a/scripts/wsrep_sst_mariabackup.sh +++ b/scripts/wsrep_sst_mariabackup.sh @@ -20,10 +20,11 @@ # https://mariadb.com/kb/en/mariabackup-overview/ # Make sure to read that before proceeding! +OS="$(uname)" + . $(dirname "$0")/wsrep_sst_common wsrep_check_datadir -OS="$(uname)" ealgo="" eformat="" ekey="" @@ -34,7 +35,7 @@ ssyslog="" ssystag="" BACKUP_PID="" tcert="" -tpath=0 +tcap="" tpem="" tkey="" tmode="DISABLED" @@ -88,14 +89,14 @@ readonly SECRET_TAG="secret" # For backup locks it is 1 sent by joiner sst_ver=1 -if [ -n "$(command -v pv)" ] && pv --help | grep -qw -- '-F'; then +if [ -n "$(commandex pv)" ] && pv --help | grep -qw -- '-F'; then pvopts="$pvopts $pvformat" fi pcmd="pv $pvopts" declare -a RC -BACKUP_BIN="$(command -v mariabackup)" -if [ ! -x "$BACKUP_BIN" ]; then +BACKUP_BIN=$(commandex 'mariabackup') +if [ -z "$BACKUP_BIN" ]; then wsrep_log_error 'mariabackup binary not found in path' exit 42 fi @@ -145,14 +146,14 @@ get_keys() if [ $encrypt -eq 0 ]; then if [ -n "$ealgo" -o -n "$ekey" -o -n "$ekeyfile" ]; then - wsrep_log_error "Options for encryption are specified, " \ + wsrep_log_error "Options for encryption are specified," \ "but encryption itself is disabled. SST may fail." fi return fi if [ $sfmt = 'tar' ]; then - wsrep_log_info "NOTE: key-based encryption (encrypt=1) " \ + wsrep_log_info "NOTE: key-based encryption (encrypt=1)" \ "cannot be enabled with tar format" encrypt=-1 return @@ -165,16 +166,18 @@ get_keys() exit 3 fi - if [ -z "$ekey" -a ! -r "$ekeyfile" ]; then - wsrep_log_error "FATAL: Either key must be specified " \ - "or keyfile must be readable" - exit 3 + if [ -z "$ekey" ]; then + if [ ! -r "$ekeyfile" ]; then + wsrep_log_error "FATAL: Either key must be specified" \ + "or keyfile must be readable" + exit 3 + fi fi if [ "$eformat" = 'openssl' ]; then get_openssl if [ -z "$OPENSSL_BINARY" ]; then - wsrep_log_error "If encryption using the openssl is enabled, " \ + wsrep_log_error "If encryption using the openssl is enabled," \ "then you need to install openssl" exit 2 fi @@ -192,12 +195,12 @@ get_keys() ecmd="$ecmd -k '$ekey'" fi elif [ "$eformat" = 'xbcrypt' ]; then - if [ -z "$(command -v xbcrypt)" ]; then - wsrep_log_error "If encryption using the xbcrypt is enabled, " \ + if [ -z "$(commandex xbcrypt)" ]; then + wsrep_log_error "If encryption using the xbcrypt is enabled," \ "then you need to install xbcrypt" exit 2 fi - wsrep_log_info "NOTE: xbcrypt-based encryption, " \ + wsrep_log_info "NOTE: xbcrypt-based encryption," \ "supported only from Xtrabackup 2.1.4" if [ -z "$ekey" ]; then ecmd="xbcrypt --encrypt-algo='$ealgo' --encrypt-key-file='$ekeyfile'" @@ -342,40 +345,34 @@ get_transfer() CN_option=",commonname=''" if [ $encrypt -eq 2 ]; then - wsrep_log_info "Using openssl based encryption with socat: with crt and pem" - if [ -z "$tpem" -o -z "$tcert" ]; then + wsrep_log_info \ + "Using openssl based encryption with socat: with crt and pem" + if [ -z "$tpem" -o -z "$tcert$tcap" ]; then wsrep_log_error \ "Both PEM file and CRT file (or path) are required" exit 22 fi - if [ ! -r "$tpem" -o ! -r "$tcert" ]; then - wsrep_log_error \ - "Both PEM file and CRT file (or path) must be readable" - exit 22 + verify_ca_matches_cert "$tpem" "$tcert" "$tcap" + tcmd="$tcmd,cert='$tpem'" + if [ -n "$tcert" ]; then + tcmd="$tcmd,cafile='$tcert'" fi - verify_ca_matches_cert "$tcert" "$tpem" $tpath - if [ $tpath -eq 0 ]; then - tcmd="$tcmd,cert='$tpem',cafile='$tcert'" - else - tcmd="$tcmd,cert='$tpem',capath='$tcert'" + if [ -n "$tcap" ]; then + tcmd="$tcmd,capath='$tcap'" fi stagemsg="$stagemsg-OpenSSL-Encrypted-2" - wsrep_log_info "$action with cert=$tpem, ca=$tcert" + wsrep_log_info "$action with cert='$tpem', ca='$tcert', capath='$tcap'" elif [ $encrypt -eq 3 -o $encrypt -eq 4 ]; then - wsrep_log_info "Using openssl based encryption with socat: with key and crt" + wsrep_log_info \ + "Using openssl based encryption with socat: with key and crt" if [ -z "$tpem" -o -z "$tkey" ]; then - wsrep_log_error "Both certificate file (or path) " \ - "and key file are required" - exit 22 - fi - if [ ! -r "$tpem" -o ! -r "$tkey" ]; then - wsrep_log_error "Both certificate file (or path) " \ - "and key file must be readable" + wsrep_log_error "Both the certificate file (or path) and" \ + "the key file are required" exit 22 fi verify_cert_matches_key "$tpem" "$tkey" stagemsg="$stagemsg-OpenSSL-Encrypted-3" - if [ -z "$tcert" ]; then + if [ -z "$tcert$tcap" ]; then if [ $encrypt -eq 4 ]; then wsrep_log_error \ "Peer certificate file (or path) required if encrypt=4" @@ -384,14 +381,11 @@ get_transfer() # no verification CN_option="" tcmd="$tcmd,cert='$tpem',key='$tkey',verify=0" - wsrep_log_info "$action with cert=$tpem, key=$tkey, verify=0" + wsrep_log_info \ + "$action with cert='$tpem', key='$tkey', verify=0" else # CA verification - if [ ! -r "$tcert" ]; then - wsrep_log_error "Certificate file or path must be readable" - exit 22 - fi - verify_ca_matches_cert "$tcert" "$tpem" $tpath + verify_ca_matches_cert "$tpem" "$tcert" "$tcap" if [ -n "$WSREP_SST_OPT_REMOTE_USER" ]; then CN_option=",commonname='$WSREP_SST_OPT_REMOTE_USER'" elif [ "$WSREP_SST_OPT_ROLE" = 'joiner' -o $encrypt -eq 4 ] @@ -402,12 +396,15 @@ get_transfer() else CN_option=",commonname='$WSREP_SST_OPT_HOST_UNESCAPED'" fi - if [ $tpath -eq 0 ]; then - tcmd="$tcmd,cert='$tpem',key='$tkey',cafile='$tcert'" - else - tcmd="$tcmd,cert='$tpem',key='$tkey',capath='$tcert'" + tcmd="$tcmd,cert='$tpem',key='$tkey'" + if [ -n "$tcert" ]; then + tcmd="$tcmd,cafile='$tcert'" + fi + if [ -n "$tcap" ]; then + tcmd="$tcmd,capath='$tcap'" fi - wsrep_log_info "$action with cert=$tpem, key=$tkey, ca=$tcert" + wsrep_log_info "$action with cert='$tpem', key='$tkey'," \ + "ca='$tcert', capath='$tcap'" fi else wsrep_log_info "Unknown encryption mode: encrypt=$encrypt" @@ -425,7 +422,9 @@ get_transfer() get_footprint() { pushd "$WSREP_SST_OPT_DATA" 1>/dev/null - payload=$(find . -regex '.*\.ibd$\|.*\.MYI$\|.*\.MYD$\|.*ibdata1$' -type f -print0 | du --files0-from=- --block-size=1 -c -s | awk 'END { print $1 }') + payload=$(find . -regex '.*\.ibd$\|.*\.MYI$\|.*\.MYD$\|.*ibdata1$' \ + -type f -print0 | du --files0-from=- --block-size=1 -c -s | \ + awk 'END { print $1 }') if [ "$compress" != 'none' ]; then # QuickLZ has around 50% compression ratio # When compression/compaction used, the progress is only an approximate. @@ -438,7 +437,7 @@ get_footprint() adjust_progress() { - if [ -z "$(command -v pv)" ]; then + if [ -z "$(commandex pv)" ]; then wsrep_log_error "pv not found in path: $PATH" wsrep_log_error "Disabling all progress/rate-limiting" pcmd="" @@ -470,33 +469,42 @@ check_server_ssl_config() { # backward-compatible behavior: tcert=$(parse_cnf 'sst' 'tca') + tcap=$(parse_cnf 'sst' 'tcapath') tpem=$(parse_cnf 'sst' 'tcert') tkey=$(parse_cnf 'sst' 'tkey') # reading new ssl configuration options: local tcert2=$(parse_cnf "$encgroups" 'ssl-ca') + local tcap2=$(parse_cnf "$encgroups" 'ssl-capath') local tpem2=$(parse_cnf "$encgroups" 'ssl-cert') local tkey2=$(parse_cnf "$encgroups" 'ssl-key') # if there are no old options, then we take new ones: - if [ -z "$tcert" -a -z "$tpem" -a -z "$tkey" ]; then + if [ -z "$tcert" -a -z "$tcap" -a -z "$tpem" -a -z "$tkey" ]; then tcert="$tcert2" + tcap="$tcap2" tpem="$tpem2" tkey="$tkey2" # checking for presence of the new-style SSL configuration: - elif [ -n "$tcert2" -o -n "$tpem2" -o -n "$tkey2" ]; then + elif [ -n "$tcert2" -o -n "$tcap2" -o -n "$tpem2" -o -n "$tkey2" ]; then if [ "$tcert" != "$tcert2" -o \ + "$tcap" != "$tcap2" -o \ "$tpem" != "$tpem2" -o \ "$tkey" != "$tkey2" ] then - wsrep_log_info "new ssl configuration options (ssl-ca, ssl-cert " \ - "and ssl-key) are ignored by SST due to presence " \ - "of the tca, tcert and/or tkey in the [sst] section" + wsrep_log_info \ + "new ssl configuration options (ssl-ca[path], ssl-cert" \ + "and ssl-key) are ignored by SST due to presence" \ + "of the tca[path], tcert and/or tkey in the [sst] section" fi fi if [ -n "$tcert" ]; then - tcert=$(trim_string "$tcert") - if [ "${tcert%/}" != "$tcert" ]; then - tpath=1 - fi + tcert=$(trim_string "$tcert") + if [ "${tcert%/}" != "$tcert" ] || [ -d "$tcert" ]; then + tcap="$tcert" + tcert="" + fi + fi + if [ -n "$tcap" ]; then + tcap=$(trim_string "$tcap") fi } @@ -506,10 +514,10 @@ read_cnf() tfmt=$(parse_cnf sst transferfmt 'socat') encrypt=$(parse_cnf "$encgroups" 'encrypt' 0) - tmode=$(parse_cnf "$encgroups" 'ssl-mode' 'DISABLED' | tr [:lower:] [:upper:]) + tmode=$(parse_cnf "$encgroups" 'ssl-mode' 'DISABLED' | \ + tr [:lower:] [:upper:]) - if [ $encrypt -eq 0 -o $encrypt -ge 2 ] - then + if [ $encrypt -eq 0 -o $encrypt -ge 2 ]; then if [ "$tmode" != 'DISABLED' -o $encrypt -ge 2 ]; then check_server_ssl_config fi @@ -517,11 +525,13 @@ read_cnf() if [ 0 -eq $encrypt -a -n "$tpem" -a -n "$tkey" ] then encrypt=3 # enable cert/key SSL encyption - # avoid CA verification if not set explicitly: - # nodes may happen to have different CA if self-generated - # zeroing up tcert does the trick - [ "${tmode#VERIFY}" != "$tmode" ] || tcert="" + # nodes may happen to have different CA if self-generated, + # zeroing up tcert and tcap does the trick: + if [ "${tmode#VERIFY}" = "$tmode" ]; then + tcert="" + tcap="" + fi fi fi elif [ $encrypt -eq 1 ]; then @@ -535,8 +545,9 @@ read_cnf() fi fi - wsrep_log_info "SSL configuration: CA='$tcert', CERT='$tpem'," \ - "KEY='$tkey', MODE='$tmode', encrypt='$encrypt'" + wsrep_log_info "SSL configuration: CA='$tcert', CAPATH='$tcap'," \ + "CERT='$tpem', KEY='$tkey', MODE='$tmode'," \ + "encrypt='$encrypt'" sockopt=$(parse_cnf sst sockopt "") progress=$(parse_cnf sst progress "") @@ -561,7 +572,8 @@ read_cnf() sstlogarchivedir=$(parse_cnf sst sst-log-archive-dir '/tmp/sst_log_archive') if [ $speciald -eq 0 ]; then - wsrep_log_error "sst-special-dirs equal to 0 is not supported, falling back to 1" + wsrep_log_error \ + "sst-special-dirs equal to 0 is not supported, falling back to 1" speciald=1 fi @@ -589,7 +601,7 @@ get_stream() { if [ "$sfmt" = 'mbstream' -o "$sfmt" = 'xbstream' ]; then sfmt='mbstream' - STREAM_BIN="$(command -v mbstream)" + local STREAM_BIN=$(commandex "$sfmt") if [ -z "$STREAM_BIN" ]; then wsrep_log_error "Streaming with $sfmt, but $sfmt not found in path" exit 42 @@ -621,7 +633,7 @@ cleanup_at_exit() # Since this is invoked just after exit NNN local estatus=$? if [ $estatus -ne 0 ]; then - wsrep_log_error "Cleanup after exit with status:$estatus" + wsrep_log_error "Cleanup after exit with status: $estatus" fi if [ "$WSREP_SST_OPT_ROLE" = 'joiner' ]; then @@ -630,7 +642,8 @@ cleanup_at_exit() else if [ -n "$BACKUP_PID" ]; then if check_pid "$BACKUP_PID" 1; then - wsrep_log_error "mariabackup process is still running. Killing..." + wsrep_log_error \ + "mariabackup process is still running. Killing..." cleanup_pid $CHECK_PID "$BACKUP_PID" fi fi @@ -638,8 +651,8 @@ cleanup_at_exit() fi if [ -n "$progress" -a -p "$progress" ]; then - wsrep_log_info "Cleaning up fifo file $progress" - rm -f "$progress" || true + wsrep_log_info "Cleaning up fifo file: $progress" + rm -f "$progress" || : fi wsrep_log_info "Cleaning up temporary directories" @@ -649,8 +662,8 @@ cleanup_at_exit() [ -d "$STATDIR" ] && rm -rf "$STATDIR" fi else - [ -n "$xtmpdir" -a -d "$xtmpdir" ] && rm -rf "$xtmpdir" || true - [ -n "$itmpdir" -a -d "$itmpdir" ] && rm -rf "$itmpdir" || true + [ -n "$xtmpdir" -a -d "$xtmpdir" ] && rm -rf "$xtmpdir" || : + [ -n "$itmpdir" -a -d "$itmpdir" ] && rm -rf "$itmpdir" || : fi # Final cleanup @@ -662,7 +675,7 @@ cleanup_at_exit() # This means a signal was delivered to the process. # So, more cleanup. if [ $estatus -ge 128 ]; then - kill -KILL -- -$$ || true + kill -KILL -- -$$ || : fi fi @@ -738,7 +751,7 @@ recv_joiner() local ltcmd="$tcmd" if [ $tmt -gt 0 ]; then - if [ -n "$(command -v timeout)" ]; then + if [ -n "$(commandex timeout)" ]; then if timeout --help | grep -qw -- '-k'; then ltcmd="timeout -k $(( tmt+10 )) $tmt $tcmd" else @@ -760,14 +773,14 @@ recv_joiner() popd 1>/dev/null if [ ${RC[0]} -eq 124 ]; then - wsrep_log_error "Possible timeout in receiving first data from " \ + wsrep_log_error "Possible timeout in receiving first data from" \ "donor in gtid stage: exit codes: ${RC[@]}" exit 32 fi for ecode in "${RC[@]}"; do if [ $ecode -ne 0 ]; then - wsrep_log_error "Error while getting data from donor node: " \ + wsrep_log_error "Error while getting data from donor node:" \ "exit codes: ${RC[@]}" exit 32 fi @@ -776,7 +789,7 @@ recv_joiner() if [ $checkf -eq 1 ]; then if [ ! -r "$MAGIC_FILE" ]; then # this message should cause joiner to abort - wsrep_log_error "receiving process ended without creating " \ + wsrep_log_error "receiving process ended without creating" \ "'$MAGIC_FILE'" wsrep_log_info "Contents of datadir" wsrep_log_info $(ls -l "$dir/"*) @@ -784,10 +797,11 @@ recv_joiner() fi # check donor supplied secret - SECRET=$(grep -F -- "$SECRET_TAG " "$MAGIC_FILE" 2>/dev/null | cut -d ' ' -f 2) + SECRET=$(grep -F -- "$SECRET_TAG " "$MAGIC_FILE" 2>/dev/null | \ + cut -d ' ' -f 2) if [ "$SECRET" != "$MY_SECRET" ]; then wsrep_log_error "Donor does not know my secret!" - wsrep_log_info "Donor:'$SECRET', my:'$MY_SECRET'" + wsrep_log_info "Donor: '$SECRET', my: '$MY_SECRET'" exit 32 fi @@ -810,7 +824,7 @@ send_donor() for ecode in "${RC[@]}"; do if [ $ecode -ne 0 ]; then - wsrep_log_error "Error while sending data to joiner node: " \ + wsrep_log_error "Error while sending data to joiner node:" \ "exit codes: ${RC[@]}" exit 32 fi @@ -823,7 +837,9 @@ monitor_process() while true ; do if ! ps -p "$WSREP_SST_OPT_PARENT" >/dev/null 2>&1; then - wsrep_log_error "Parent mysqld process (PID: $WSREP_SST_OPT_PARENT) terminated unexpectedly." + wsrep_log_error \ + "Parent mysqld process (PID: $WSREP_SST_OPT_PARENT)" \ + "terminated unexpectedly." kill -- -"$WSREP_SST_OPT_PARENT" exit 32 fi @@ -845,7 +861,7 @@ read_cnf setup_ports if "$BACKUP_BIN" --help 2>/dev/null | grep -qw -- '--version-check'; then - disver='--no-version-check' + disver=' --no-version-check' fi # if no command line argument and INNODB_DATA_HOME_DIR environment variable @@ -867,7 +883,7 @@ INNODB_DATA_HOME_DIR=$(pwd -P) cd "$OLD_PWD" if [ $ssyslog -eq 1 ]; then - if [ -n "$(command -v logger)" ]; then + if [ -n "$(commandex logger)" ]; then wsrep_log_info "Logging all stderr of SST/mariabackup to syslog" exec 2> >(logger -p daemon.err -t ${ssystag}wsrep-sst-$WSREP_SST_OPT_ROLE) @@ -898,10 +914,8 @@ else fi fi - if [ -e "$INNOAPPLYLOG" ] - then - if [ -n "$sstlogarchivedir" ] - then + if [ -e "$INNOAPPLYLOG" ]; then + if [ -n "$sstlogarchivedir" ]; then newfile=$(basename "$INNOAPPLYLOG") newfile="$sstlogarchivedir/$newfile.$ARCHIVETIMESTAMP" else @@ -912,10 +926,8 @@ else gzip "$newfile" fi - if [ -e "$INNOMOVELOG" ] - then - if [ -n "$sstlogarchivedir" ] - then + if [ -e "$INNOMOVELOG" ]; then + if [ -n "$sstlogarchivedir" ]; then newfile=$(basename "$INNOMOVELOG") newfile="$sstlogarchivedir/$newfile.$ARCHIVETIMESTAMP" else @@ -926,10 +938,8 @@ else gzip "$newfile" fi - if [ -e "$INNOBACKUPLOG" ] - then - if [ -n "$sstlogarchivedir" ] - then + if [ -e "$INNOBACKUPLOG" ]; then + if [ -n "$sstlogarchivedir" ]; then newfile=$(basename "$INNOBACKUPLOG") newfile="$sstlogarchivedir/$newfile.$ARCHIVETIMESTAMP" else @@ -949,15 +959,15 @@ setup_commands() { local mysqld_args="" if [ -n "$WSREP_SST_OPT_MYSQLD" ]; then - mysqld_args="--mysqld-args $WSREP_SST_OPT_MYSQLD" + mysqld_args=" --mysqld-args $WSREP_SST_OPT_MYSQLD" fi - if [ -z "$INNODB_FORCE_RECOVERY" ]; then - INNOAPPLY="$BACKUP_BIN --prepare $disver $iapts $INNOEXTRA --target-dir='$DATA' --datadir='$DATA' $mysqld_args $INNOAPPLY" - else - INNOAPPLY="$BACKUP_BIN --prepare $disver $iapts $INNOEXTRA --innodb-force-recovery=$INNODB_FORCE_RECOVERY --target-dir='$DATA' --datadir='$DATA' $mysqld_args $INNOAPPLY" + local recovery="" + if [ -n "$INNODB_FORCE_RECOVERY" ]; then + recovery=" --innodb-force-recovery=$INNODB_FORCE_RECOVERY" fi - INNOMOVE="$BACKUP_BIN $WSREP_SST_OPT_CONF --move-back $disver $impts --force-non-empty-directories --target-dir='$DATA' --datadir='${TDATA:-$DATA}' $INNOMOVE" - INNOBACKUP="$BACKUP_BIN $WSREP_SST_OPT_CONF --backup $disver $iopts $tmpopts $INNOEXTRA --galera-info --stream=$sfmt --target-dir='$itmpdir' --datadir='$DATA' $mysqld_args $INNOBACKUP" + INNOAPPLY="$BACKUP_BIN --prepare$disver$recovery${iapts:+ }$iapts$INNOEXTRA --target-dir='$DATA' --datadir='$DATA'$mysqld_args $INNOAPPLY" + INNOMOVE="$BACKUP_BIN$WSREP_SST_OPT_CONF --move-back$disver${impts:+ }$impts --force-non-empty-directories --target-dir='$DATA' --datadir='${TDATA:-$DATA}' $INNOMOVE" + INNOBACKUP="$BACKUP_BIN$WSREP_SST_OPT_CONF --backup$disver${iopts:+ }$iopts $tmpopts$INNOEXTRA --galera-info --stream=$sfmt --target-dir='$itmpdir' --datadir='$DATA'$mysqld_args $INNOBACKUP" } get_stream @@ -1055,27 +1065,28 @@ then tcmd="$ecmd | $tcmd" fi - iopts="--databases-exclude='lost+found' $iopts" + iopts="--databases-exclude='lost+found'${iopts:+ }$iopts" if [ ${FORCE_FTWRL:-0} -eq 1 ]; then - wsrep_log_info "Forcing FTWRL due to environment variable FORCE_FTWRL equal to $FORCE_FTWRL" - iopts="--no-backup-locks $iopts" + wsrep_log_info "Forcing FTWRL due to environment variable" \ + "FORCE_FTWRL equal to $FORCE_FTWRL" + iopts="--no-backup-locks${iopts:+ }$iopts" fi # if compression is enabled for backup files, then add the # appropriate options to the mariabackup command line: if [ "$compress" != 'none' ]; then - iopts="--compress${compress:+=$compress} $iopts" + iopts="--compress${compress:+=$compress}${iopts:+ }$iopts" if [ -n "$compress_threads" ]; then - iopts="--compress-threads=$compress_threads $iopts" + iopts="--compress-threads=$compress_threads${iopts:+ }$iopts" fi if [ -n "$compress_chunk" ]; then - iopts="--compress-chunk-size=$compress_chunk $iopts" + iopts="--compress-chunk-size=$compress_chunk${iopts:+ }$iopts" fi fi if [ -n "$backup_threads" ]; then - iopts="--parallel=$backup_threads $iopts" + iopts="--parallel=$backup_threads${iopts:+ }$iopts" fi setup_commands @@ -1084,7 +1095,7 @@ then set -e if [ ${RC[0]} -ne 0 ]; then - wsrep_log_error "mariabackup finished with error: ${RC[0]}. " \ + wsrep_log_error "mariabackup finished with error: ${RC[0]}." \ "Check syslog or '$INNOBACKUPLOG' for details" exit 22 elif [ ${RC[$(( ${#RC[@]}-1 ))]} -eq 1 ]; then @@ -1125,7 +1136,8 @@ then elif [ "$WSREP_SST_OPT_ROLE" = 'joiner' ] then - [ -e "$SST_PROGRESS_FILE" ] && wsrep_log_info "Stale sst_in_progress file: $SST_PROGRESS_FILE" + [ -e "$SST_PROGRESS_FILE" ] && \ + wsrep_log_info "Stale sst_in_progress file: $SST_PROGRESS_FILE" [ -n "$SST_PROGRESS_FILE" ] && touch "$SST_PROGRESS_FILE" ib_home_dir="$INNODB_DATA_HOME_DIR" @@ -1146,7 +1158,7 @@ then ib_undo_dir="$INNODB_UNDO_DIR" if [ -n "$backup_threads" ]; then - impts="--parallel=$backup_threads $impts" + impts="--parallel=$backup_threads${impts:+ }$impts" fi stagemsg='Joiner-Recv' @@ -1165,15 +1177,15 @@ then ADDR="$WSREP_SST_OPT_ADDR" - if [ "${tmode#VERIFY}" != "$tmode" ] - then # backward-incompatible behavior + if [ "${tmode#VERIFY}" != "$tmode" ]; then + # backward-incompatible behavior: CN="" - if [ -n "$tpem" ] - then + if [ -n "$tpem" ]; then # find out my Common Name get_openssl if [ -z "$OPENSSL_BINARY" ]; then - wsrep_log_error 'openssl not found but it is required for authentication' + wsrep_log_error \ + 'openssl not found but it is required for authentication' exit 42 fi CN=$("$OPENSSL_BINARY" x509 -noout -subject -in "$tpem" | \ @@ -1213,15 +1225,17 @@ then if ! ps -p "$WSREP_SST_OPT_PARENT" >/dev/null 2>&1 then - wsrep_log_error "Parent mysqld process (PID: $WSREP_SST_OPT_PARENT) terminated unexpectedly." + wsrep_log_error "Parent mysqld process (PID: $WSREP_SST_OPT_PARENT)" \ + "terminated unexpectedly." exit 32 fi - if [ ! -r "$STATDIR/$IST_FILE" ] - then + if [ ! -r "$STATDIR/$IST_FILE" ]; then if [ -d "$DATA/.sst" ]; then - wsrep_log_info "WARNING: Stale temporary SST directory: '$DATA/.sst' from previous state transfer. Removing" + wsrep_log_info \ + "WARNING: Stale temporary SST directory:" \ + "'$DATA/.sst' from previous state transfer, removing..." rm -rf "$DATA/.sst" fi mkdir -p "$DATA/.sst" @@ -1229,17 +1243,20 @@ then jpid=$! wsrep_log_info "Proceeding with SST" - wsrep_log_info "Cleaning the existing datadir and innodb-data/log directories" + wsrep_log_info \ + "Cleaning the existing datadir and innodb-data/log directories" if [ "$OS" = 'FreeBSD' ]; then find -E ${ib_home_dir:+"$ib_home_dir"} \ ${ib_undo_dir:+"$ib_undo_dir"} \ ${ib_log_dir:+"$ib_log_dir"} \ - "$DATA" -mindepth 1 -prune -regex "$cpat" -o -exec rm -rfv {} 1>&2 \+ + "$DATA" -mindepth 1 -prune -regex "$cpat" \ + -o -exec rm -rfv {} 1>&2 \+ else find ${ib_home_dir:+"$ib_home_dir"} \ ${ib_undo_dir:+"$ib_undo_dir"} \ ${ib_log_dir:+"$ib_log_dir"} \ - "$DATA" -mindepth 1 -prune -regex "$cpat" -o -exec rm -rfv {} 1>&2 \+ + "$DATA" -mindepth 1 -prune -regex "$cpat" \ + -o -exec rm -rfv {} 1>&2 \+ fi get_binlog @@ -1248,9 +1265,9 @@ then binlog_dir=$(dirname "$WSREP_SST_OPT_BINLOG") cd "$binlog_dir" wsrep_log_info "Cleaning the binlog directory $binlog_dir as well" - rm -fv "$WSREP_SST_OPT_BINLOG".[0-9]* 1>&2 \+ || true + rm -fv "$WSREP_SST_OPT_BINLOG".[0-9]* 1>&2 \+ || : [ -f "$WSREP_SST_OPT_BINLOG_INDEX" ] && \ - rm -fv "$WSREP_SST_OPT_BINLOG_INDEX" 1>&2 \+ || true + rm -fv "$WSREP_SST_OPT_BINLOG_INDEX" 1>&2 \+ || : cd "$OLD_PWD" fi @@ -1262,7 +1279,8 @@ then monitor_process $jpid if [ ! -s "$DATA/xtrabackup_checkpoints" ]; then - wsrep_log_error "xtrabackup_checkpoints missing, failed mariabackup/SST on donor" + wsrep_log_error "xtrabackup_checkpoints missing," \ + "failed mariabackup/SST on donor" exit 2 fi @@ -1277,7 +1295,7 @@ then if [ -n "$qpfiles" ]; then wsrep_log_info "Compressed qpress files found" - if [ -z "$(command -v qpress)" ]; then + if [ -z "$(commandex qpress)" ]; then wsrep_log_error "qpress utility not found in the path" exit 22 fi @@ -1300,14 +1318,17 @@ then # Decompress the qpress files wsrep_log_info "Decompression with $nproc threads" - timeit "Joiner-Decompression" "find '$DATA' -type f -name '*.qp' -printf '%p\n%h\n' | $dcmd" + timeit "Joiner-Decompression" \ + "find '$DATA' -type f -name '*.qp' -printf '%p\n%h\n' | $dcmd" extcode=$? if [ $extcode -eq 0 ]; then wsrep_log_info "Removing qpress files after decompression" find "$DATA" -type f -name '*.qp' -delete if [ $? -ne 0 ]; then - wsrep_log_error "Something went wrong with deletion of qpress files. Investigate" + wsrep_log_error \ + "Something went wrong with deletion of qpress files." \ + "Investigate" fi else wsrep_log_error "Decompression failed. Exit code: $extcode" @@ -1321,7 +1342,7 @@ then BINLOG_FILENAME=$(basename "$WSREP_SST_OPT_BINLOG") # To avoid comparing data directory and BINLOG_DIRNAME - mv "$DATA/$BINLOG_FILENAME".* "$BINLOG_DIRNAME/" 2>/dev/null || true + mv "$DATA/$BINLOG_FILENAME".* "$BINLOG_DIRNAME/" 2>/dev/null || : cd "$BINLOG_DIRNAME" for bfile in $(ls -1 "$BINLOG_FILENAME".[0-9]*); do @@ -1336,7 +1357,8 @@ then timeit "mariabackup prepare stage" "$INNOAPPLY" if [ $? -ne 0 ]; then - wsrep_log_error "mariabackup apply finished with errors. Check syslog or '$INNOAPPLYLOG' for details" + wsrep_log_error "mariabackup apply finished with errors." \ + "Check syslog or '$INNOAPPLYLOG' for details." exit 22 fi diff --git a/scripts/wsrep_sst_mysqldump.sh b/scripts/wsrep_sst_mysqldump.sh index 798bee1ac100d..bed2cac0a9a9d 100644 --- a/scripts/wsrep_sst_mysqldump.sh +++ b/scripts/wsrep_sst_mysqldump.sh @@ -19,7 +19,6 @@ # This is a reference script for mysqldump-based state snapshot tansfer . $(dirname "$0")/wsrep_sst_common -PATH=$PATH:/usr/sbin:/usr/bin:/sbin:/bin EINVAL=22 @@ -93,8 +92,7 @@ DROP PREPARE stmt;" SET_START_POSITION="SET GLOBAL wsrep_start_position='$WSREP_SST_OPT_GTID';" SET_WSREP_GTID_DOMAIN_ID="" -if [ -n $WSREP_SST_OPT_GTID_DOMAIN_ID ] -then +if [ -n $WSREP_SST_OPT_GTID_DOMAIN_ID ]; then SET_WSREP_GTID_DOMAIN_ID=" SET @val = (SELECT GLOBAL_VALUE FROM INFORMATION_SCHEMA.SYSTEM_VARIABLES WHERE VARIABLE_NAME = 'WSREP_GTID_STRICT_MODE' AND GLOBAL_VALUE > 0); SET @stmt = IF (@val IS NOT NULL, 'SET GLOBAL WSREP_GTID_DOMAIN_ID=$WSREP_SST_OPT_GTID_DOMAIN_ID', 'SET @dummy = 0'); @@ -103,7 +101,7 @@ then DROP PREPARE stmt;" fi -MYSQL="$MYSQL_CLIENT $WSREP_SST_OPT_CONF_UNQUOTED "\ +MYSQL="$MYSQL_CLIENT$WSREP_SST_OPT_CONF_UNQUOTED "\ "$AUTH -h$WSREP_SST_OPT_HOST_UNESCAPED "\ "-P$WSREP_SST_OPT_PORT --disable-reconnect --connect_timeout=10" @@ -125,8 +123,7 @@ SET_GTID_BINLOG_STATE="" SQL_LOG_BIN_OFF="" # Safety check -if [ ${SERVER_VERSION%%.*} -gt 5 ] -then +if [ ${SERVER_VERSION%%.*} -gt 5 ]; then # If binary logging is enabled on the joiner node, we need to copy donor's # gtid_binlog_state to joiner. In order to do that, a RESET MASTER must be # executed to erase binary logs (if any). Binary logging should also be @@ -140,7 +137,7 @@ then fi # NOTE: we don't use --routines here because we're dumping mysql.proc table -MYSQLDUMP="$MYSQLDUMP $WSREP_SST_OPT_CONF_UNQUOTED $AUTH -S$WSREP_SST_OPT_SOCKET \ +MYSQLDUMP="$MYSQLDUMP$WSREP_SST_OPT_CONF_UNQUOTED $AUTH -S$WSREP_SST_OPT_SOCKET \ --add-drop-database --add-drop-table --skip-add-locks --create-options \ --disable-keys --extended-insert --skip-lock-tables --quick --set-charset \ --skip-comments --flush-privileges --all-databases --events" diff --git a/scripts/wsrep_sst_rsync.sh b/scripts/wsrep_sst_rsync.sh index 29c9cd4347026..b0cc8cb30664d 100644 --- a/scripts/wsrep_sst_rsync.sh +++ b/scripts/wsrep_sst_rsync.sh @@ -25,9 +25,6 @@ STUNNEL_REAL_PID=0 # stunnel process id OS="$(uname)" [ "$OS" = 'Darwin' ] && export -n LD_LIBRARY_PATH -# Setting the path for lsof on CentOS -export PATH="/usr/sbin:/sbin:$PATH" - . $(dirname "$0")/wsrep_sst_common wsrep_check_datadir @@ -37,7 +34,8 @@ cleanup_joiner() { local failure=0 - wsrep_log_info "Joiner cleanup: rsync PID=$RSYNC_REAL_PID, stunnel PID=$STUNNEL_REAL_PID" + wsrep_log_info "Joiner cleanup: rsync PID=$RSYNC_REAL_PID," \ + "stunnel PID=$STUNNEL_REAL_PID" if [ -n "$STUNNEL" ]; then if cleanup_pid $STUNNEL_REAL_PID "$STUNNEL_PID" "$STUNNEL_CONF"; then @@ -87,7 +85,7 @@ check_pid_and_port() if [ $lsof_available -ne 0 ]; then port_info=$(lsof -Pnl -i ":$port" 2>/dev/null | \ - grep -F '(LISTEN)') + grep -F '(LISTEN)') echo "$port_info" | \ grep -q -E "[[:space:]](\\*|\\[?::\\]?):$port[[:space:]]" && busy=1 else @@ -124,7 +122,7 @@ check_pid_and_port() fi if ! check_port "$pid" "$port" "$utils"; then - wsrep_log_error "rsync or stunnel daemon port '$port' " \ + wsrep_log_error "rsync or stunnel daemon port '$port'" \ "has been taken by another program" exit 16 # EBUSY fi @@ -223,6 +221,7 @@ FILTER="-f '- /lost+found' SSTKEY=$(parse_cnf 'sst' 'tkey') SSTCERT=$(parse_cnf 'sst' 'tcert') SSTCA=$(parse_cnf 'sst' 'tca') +SSTCAP=$(parse_cnf 'sst' 'tcapath') SST_SECTIONS="--mysqld|sst" @@ -231,28 +230,34 @@ check_server_ssl_config() SSTKEY=$(parse_cnf "$SST_SECTIONS" 'ssl-key') SSTCERT=$(parse_cnf "$SST_SECTIONS" 'ssl-cert') SSTCA=$(parse_cnf "$SST_SECTIONS" 'ssl-ca') + SSTCAP=$(parse_cnf "$SST_SECTIONS" 'ssl-capath') } SSLMODE=$(parse_cnf "$SST_SECTIONS" 'ssl-mode' | tr [:lower:] [:upper:]) # no old-style SSL config in [sst], check for new one: -if [ -z "$SSTKEY" -a -z "$SSTCERT" -a -z "$SSTCA" ]; then +if [ -z "$SSTKEY" -a -z "$SSTCERT" -a -z "$SSTCA" -a -z "$SSTCAP" ]; then check_server_ssl_config fi -SSTPATH=0 if [ -n "$SSTCA" ]; then - SSTCA=$(trim_string "$SSTCA") - if [ "${SSTCA%/}" != "$SSTCA" ]; then - SSTPATH=1 - fi + SSTCA=$(trim_string "$SSTCA") + if [ "${SSTCA%/}" != "$SSTCA" ] || [ -d "$SSTCA" ]; then + SSTCAP="$SSTCA" + SSTCA="" + fi +fi + +if [ -n "$SSTCAP" ]; then + SSTCAP=$(trim_string "$SSTCAP") fi if [ -z "$SSLMODE" ]; then # Implicit verification if CA is set and the SSL mode # is not specified by user: - if [ -n "$SSTCA" ]; then - if [ -n "$(command -v stunnel)" ]; then + if [ -n "$SSTCA$SSTCAP" ]; then + STUNNEL_BIN=$(commandex 'stunnel') + if [ -n "$STUNNEL_BIN" ]; then SSLMODE='VERIFY_CA' fi # Require SSL by default if SSL key and cert are present: @@ -265,17 +270,18 @@ if [ -n "$SSTCERT" -a -n "$SSTKEY" ]; then verify_cert_matches_key "$SSTCERT" "$SSTKEY" fi -if [ -n "$SSTCA" ]; then - if [ $SSTPATH -eq 0 ]; then +CAFILE_OPT="" +CAPATH_OPT="" +if [ -n "$SSTCA$SSTCAP" ]; then + if [ -n "$SSTCA" ]; then CAFILE_OPT="CAfile = $SSTCA" - else - CAFILE_OPT="CApath = $SSTCA" + fi + if [ -n "$SSTCAP" ]; then + CAPATH_OPT="CApath = $SSTCAP" fi if [ -n "$SSTCERT" ]; then - verify_ca_matches_cert "$SSTCA" "$SSTCERT" $SSTPATH + verify_ca_matches_cert "$SSTCERT" "$SSTCA" "$SSTCAP" fi -else - CAFILE_OPT="" fi VERIFY_OPT="" @@ -295,7 +301,7 @@ then exit 22 # EINVAL ;; esac - if [ -z "$SSTCA" ]; then + if [ -z "$SSTCA$SSTCAP" ]; then wsrep_log_error "Can't have ssl-mode='$SSLMODE' without CA file or path" exit 22 # EINVAL fi @@ -318,9 +324,12 @@ fi STUNNEL="" if [ -n "$SSLMODE" -a "$SSLMODE" != 'DISABLED' ]; then - STUNNEL_BIN="$(command -v stunnel)" + if [ -z "${STUNNEL_BIN+x}" ]; then + STUNNEL_BIN=$(commandex 'stunnel') + fi if [ -n "$STUNNEL_BIN" ]; then - wsrep_log_info "Using stunnel for SSL encryption: CA: '$SSTCA', ssl-mode='$SSLMODE'" + wsrep_log_info "Using stunnel for SSL encryption: CA: '$SSTCA'," \ + "CAPATH='$SSTCAP', ssl-mode='$SSLMODE'" STUNNEL="$STUNNEL_BIN $STUNNEL_CONF" fi fi @@ -340,6 +349,7 @@ then key = $SSTKEY cert = $SSTCERT ${CAFILE_OPT} +${CAPATH_OPT} foreground = yes pid = $STUNNEL_PID debug = warning @@ -392,8 +402,8 @@ EOF # Prepare binlog files cd "$BINLOG_DIRNAME" - binlog_files_full=$(tail -n $BINLOG_N_FILES "$WSREP_SST_OPT_BINLOG_INDEX") - + binlog_files_full=$(tail -n $BINLOG_N_FILES \ + "$WSREP_SST_OPT_BINLOG_INDEX") binlog_files="" for ii in $binlog_files_full do @@ -417,9 +427,10 @@ EOF WHOLE_FILE_OPT="--whole-file" fi - # first, the normal directories, so that we can detect incompatible protocol + # first, the normal directories, so that we can detect + # incompatible protocol: RC=0 - eval rsync ${STUNNEL:+"'--rsh=$STUNNEL'"} \ + eval rsync ${STUNNEL:+"--rsh='$STUNNEL'"} \ --owner --group --perms --links --specials \ --ignore-times --inplace --dirs --delete --quiet \ $WHOLE_FILE_OPT $FILTER "'$WSREP_SST_OPT_DATA/'" \ @@ -430,8 +441,9 @@ EOF case $RC in 12) RC=71 # EPROTO wsrep_log_error \ - "rsync server on the other end has incompatible protocol. " \ - "Make sure you have the same version of rsync on all nodes." + "rsync server on the other end has incompatible" \ + "protocol. Make sure you have the same version of" \ + "rsync on all nodes." ;; 22) RC=12 # ENOMEM ;; @@ -481,9 +493,9 @@ EOF find . -maxdepth 1 -mindepth 1 -type d -not -name 'lost+found' \ -not -name '.zfs' -print0 | xargs -I{} -0 -P $backup_threads \ rsync ${STUNNEL:+--rsh="$STUNNEL"} \ - --owner --group --perms --links --specials \ - --ignore-times --inplace --recursive --delete --quiet \ - $WHOLE_FILE_OPT --exclude '*/ib_logfile*' --exclude '*/aria_log.*' \ + --owner --group --perms --links --specials --ignore-times \ + --inplace --recursive --delete --quiet $WHOLE_FILE_OPT \ + --exclude '*/ib_logfile*' --exclude '*/aria_log.*' \ --exclude '*/aria_log_control' "$WSREP_SST_OPT_DATA/{}/" \ "rsync://$WSREP_SST_OPT_ADDR/{}" >&2 || RC=$? @@ -514,7 +526,8 @@ EOF fi rsync ${STUNNEL:+--rsh="$STUNNEL"} \ - --archive --quiet --checksum "$MAGIC_FILE" "rsync://$WSREP_SST_OPT_ADDR" + --archive --quiet --checksum "$MAGIC_FILE" \ + "rsync://$WSREP_SST_OPT_ADDR" echo "done $STATE" @@ -546,7 +559,8 @@ then check_round=0 while check_pid "$STUNNEL_PID" 1 do - wsrep_log_info "lingering stunnel daemon found at startup, waiting for it to exit" + wsrep_log_info "Lingering stunnel daemon found at startup," \ + "waiting for it to exit" check_round=$(( check_round + 1 )) if [ $check_round -eq 10 ]; then wsrep_log_error "stunnel daemon already running." @@ -563,7 +577,8 @@ then check_round=0 while check_pid "$RSYNC_PID" 1 do - wsrep_log_info "lingering rsync daemon found at startup, waiting for it to exit" + wsrep_log_info "Lingering rsync daemon found at startup," \ + "waiting for it to exit" check_round=$(( check_round + 1 )) if [ $check_round -eq 10 ]; then wsrep_log_error "rsync daemon already running." @@ -575,9 +590,7 @@ then [ -f "$MAGIC_FILE" ] && rm -f "$MAGIC_FILE" [ -f "$BINLOG_TAR_FILE" ] && rm -f "$BINLOG_TAR_FILE" - if [ -z "$STUNNEL" ]; then - [ -f "$STUNNEL_CONF" ] && rm -f "$STUNNEL_CONF" - fi + [ -z "$STUNNEL" ] && [ -f "$STUNNEL_CONF" ] && rm -f "$STUNNEL_CONF" ADDR="$WSREP_SST_OPT_ADDR" RSYNC_PORT="$WSREP_SST_OPT_PORT" @@ -628,19 +641,21 @@ EOF echo $$ > "$SST_PID" - if [ -z "$STUNNEL" ] - then - rsync --daemon --no-detach --port "$RSYNC_PORT" --config "$RSYNC_CONF" $RSYNC_EXTRA_ARGS & + if [ -z "$STUNNEL" ]; then + rsync --daemon --no-detach --port "$RSYNC_PORT" \ + --config "$RSYNC_CONF" $RSYNC_EXTRA_ARGS & RSYNC_REAL_PID=$! TRANSFER_REAL_PID=$RSYNC_REAL_PID TRANSFER_PID="$RSYNC_PID" else # Let's check if the path to the config file contains a space? + RSYNC_BIN=$(commandex 'rsync') if [ "${RSYNC_CONF#* }" = "$RSYNC_CONF" ]; then cat << EOF > "$STUNNEL_CONF" key = $SSTKEY cert = $SSTCERT ${CAFILE_OPT} +${CAPATH_OPT} foreground = yes pid = $STUNNEL_PID debug = warning @@ -650,17 +665,18 @@ ${CHECK_OPT} ${CHECK_OPT_LOCAL} [rsync] accept = $STUNNEL_ACCEPT -exec = $(command -v rsync) +exec = $RSYNC_BIN execargs = rsync --server --daemon --config=$RSYNC_CONF . EOF else # The path contains a space, so we will run it via # shell with "eval" command: - export RSYNC_CMD="eval $(command -v rsync) --server --daemon --config='$RSYNC_CONF' ." + export RSYNC_CMD="eval '$RSYNC_BIN' --server --daemon --config='$RSYNC_CONF' ." cat << EOF > "$STUNNEL_CONF" key = $SSTKEY cert = $SSTCERT ${CAFILE_OPT} +${CAPATH_OPT} foreground = yes pid = $STUNNEL_PID debug = warning @@ -688,7 +704,8 @@ EOF # find out my Common Name get_openssl if [ -z "$OPENSSL_BINARY" ]; then - wsrep_log_error 'openssl not found but it is required for authentication' + wsrep_log_error \ + 'openssl not found but it is required for authentication' exit 42 fi CN=$("$OPENSSL_BINARY" x509 -noout -subject -in "$SSTCERT" | \ @@ -703,7 +720,8 @@ EOF ADDR="$WSREP_SST_OPT_HOST" fi - until check_pid_and_port "$TRANSFER_PID" $TRANSFER_REAL_PID "$RSYNC_ADDR_UNESCAPED" "$RSYNC_PORT" + until check_pid_and_port "$TRANSFER_PID" $TRANSFER_REAL_PID \ + "$RSYNC_ADDR_UNESCAPED" "$RSYNC_PORT" do sleep 0.2 done @@ -722,7 +740,7 @@ EOF if ! ps -p $MYSQLD_PID >/dev/null 2>&1 then wsrep_log_error \ - "Parent mysqld process (PID: $MYSQLD_PID) terminated unexpectedly." + "Parent mysqld process (PID: $MYSQLD_PID) terminated unexpectedly." kill -- -$MYSQLD_PID sleep 1 exit 32 @@ -768,10 +786,11 @@ EOF if [ -r "$MAGIC_FILE" ]; then if [ -n "$MY_SECRET" ]; then # check donor supplied secret - SECRET=$(grep -F -- "$SECRET_TAG " "$MAGIC_FILE" 2>/dev/null | cut -d ' ' -f 2) + SECRET=$(grep -F -- "$SECRET_TAG " "$MAGIC_FILE" 2>/dev/null | \ + cut -d ' ' -f 2) if [ "$SECRET" != "$MY_SECRET" ]; then wsrep_log_error "Donor does not know my secret!" - wsrep_log_info "Donor:'$SECRET', my:'$MY_SECRET'" + wsrep_log_info "Donor: '$SECRET', my: '$MY_SECRET'" exit 32 fi # remove secret from the magic file, and output diff --git a/vio/viosslfactories.c b/vio/viosslfactories.c index 80d1e55f358c3..a1fc14b90832e 100644 --- a/vio/viosslfactories.c +++ b/vio/viosslfactories.c @@ -232,6 +232,12 @@ new_VioSSLFd(const char *key_file, const char *cert_file, struct st_VioSSLFd *ssl_fd; long ssl_ctx_options; DBUG_ENTER("new_VioSSLFd"); + + if (ca_file && ! ca_file[0]) ca_file = NULL; + if (ca_path && ! ca_path[0]) ca_path = NULL; + if (crl_file && ! crl_file[0]) crl_file = NULL; + if (crl_path && ! crl_path[0]) crl_path = NULL; + DBUG_PRINT("enter", ("key_file: '%s' cert_file: '%s' ca_file: '%s' ca_path: '%s' " "cipher: '%s' crl_file: '%s' crl_path: '%s'", @@ -378,6 +384,11 @@ new_VioSSLConnectorFd(const char *key_file, const char *cert_file, struct st_VioSSLFd *ssl_fd; int verify= SSL_VERIFY_PEER; + if (ca_file && ! ca_file[0]) ca_file = NULL; + if (ca_path && ! ca_path[0]) ca_path = NULL; + if (crl_file && ! crl_file[0]) crl_file = NULL; + if (crl_path && ! crl_path[0]) crl_path = NULL; + /* Turn off verification of servers certificate if both ca_file and ca_path is set to NULL @@ -410,6 +421,12 @@ new_VioSSLAcceptorFd(const char *key_file, const char *cert_file, { struct st_VioSSLFd *ssl_fd; int verify= SSL_VERIFY_PEER | SSL_VERIFY_CLIENT_ONCE; + + if (ca_file && ! ca_file[0]) ca_file = NULL; + if (ca_path && ! ca_path[0]) ca_path = NULL; + if (crl_file && ! crl_file[0]) crl_file = NULL; + if (crl_path && ! crl_path[0]) crl_path = NULL; + if (!(ssl_fd= new_VioSSLFd(key_file, cert_file, ca_file, ca_path, cipher, FALSE, error, crl_file, crl_path, tls_version))) From 03678bcf55bf8a813a1d81c021d2ae085750aee2 Mon Sep 17 00:00:00 2001 From: Julius Goryavsky Date: Tue, 14 Dec 2021 03:47:59 +0100 Subject: [PATCH 18/65] MDEV-27181: Galera SST scripts should use ssl_capath for CA directory 1. Galera SST scripts should use ssl_capath (not ssl_ca) for CA directory. The current implementation tries to automatically detect the path using the trailing slash in the ssl_ca variable value, but this approach is not compatible with the server configuration. Now, by analogy with the server, SST scripts also use a separate ssl_capath variable. In addition, a similar tcapath variable has been added for the old-style configuration (in the "sst" section). 2. Openssl utility detection made more reliable. 3. Removed extra spaces in automatically generated command lines - to simplify debugging of the SST scripts. 4. In general, the code for detecting the presence or absence of auxiliary utilities has been improved - it is made more reliable in some configurations (and for shells other than bash). --- mysql-test/std_data/capath/3106f582.0 | 1 + mysql-test/std_data/capath/cacert.pem | 79 +++ mysql-test/std_data/capath/ed1f42db.0 | 1 + ..._sst_rsync_encrypt_with_capath,debug.rdiff | 191 +++++++ ...alera_sst_rsync_encrypt_with_capath.result | 520 ++++++++++++++++++ .../galera_sst_rsync_encrypt_with_key.result | 2 - ...alera_sst_rsync_encrypt_with_server.result | 2 - .../galera_sst_mariabackup_table_options.test | 1 + .../galera_sst_rsync_encrypt_with_capath.cnf | 20 + .../galera_sst_rsync_encrypt_with_capath.test | 26 + .../t/galera_sst_rsync_encrypt_with_key.test | 3 - .../galera_sst_rsync_encrypt_with_server.test | 3 - .../t/galera_ipv6_mariabackup.test | 1 + .../t/galera_ipv6_mariabackup_section.test | 1 + scripts/wsrep_sst_common.sh | 142 +++-- scripts/wsrep_sst_mariabackup.sh | 292 +++++----- scripts/wsrep_sst_mysqldump.sh | 11 +- scripts/wsrep_sst_rsync.sh | 117 ++-- vio/viosslfactories.c | 17 + 19 files changed, 1172 insertions(+), 258 deletions(-) create mode 120000 mysql-test/std_data/capath/3106f582.0 create mode 100644 mysql-test/std_data/capath/cacert.pem create mode 120000 mysql-test/std_data/capath/ed1f42db.0 create mode 100644 mysql-test/suite/galera/r/galera_sst_rsync_encrypt_with_capath,debug.rdiff create mode 100644 mysql-test/suite/galera/r/galera_sst_rsync_encrypt_with_capath.result create mode 100644 mysql-test/suite/galera/t/galera_sst_rsync_encrypt_with_capath.cnf create mode 100644 mysql-test/suite/galera/t/galera_sst_rsync_encrypt_with_capath.test diff --git a/mysql-test/std_data/capath/3106f582.0 b/mysql-test/std_data/capath/3106f582.0 new file mode 120000 index 0000000000000..1310cfcff205a --- /dev/null +++ b/mysql-test/std_data/capath/3106f582.0 @@ -0,0 +1 @@ +cacert.pem \ No newline at end of file diff --git a/mysql-test/std_data/capath/cacert.pem b/mysql-test/std_data/capath/cacert.pem new file mode 100644 index 0000000000000..23dda2318e150 --- /dev/null +++ b/mysql-test/std_data/capath/cacert.pem @@ -0,0 +1,79 @@ +Certificate: + Data: + Version: 3 (0x2) + Serial Number: + d0:4d:23:85:ee:59:b3:fa + Signature Algorithm: sha256WithRSAEncryption + Issuer: CN=cacert, C=FI, ST=Helsinki, L=Helsinki, O=MariaDB + Validity + Not Before: Jan 27 10:11:10 2019 GMT + Not After : Jan 22 10:11:10 2039 GMT + Subject: CN=cacert, C=FI, ST=Helsinki, L=Helsinki, O=MariaDB + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + Public-Key: (2048 bit) + Modulus: + 00:e8:0e:a7:84:d3:75:30:06:30:b2:10:b9:d1:88: + 36:2b:5e:f8:c8:44:57:cb:67:72:ab:96:95:33:d5: + 88:d1:8f:23:50:98:ba:6d:20:00:80:bd:35:d5:c1: + bf:98:49:c4:0a:15:4a:34:a6:21:9b:2e:8c:15:09: + f0:63:81:02:c2:7c:e2:53:e0:f7:a1:1a:40:5e:8f: + 41:4a:4c:56:d4:20:f1:d5:a7:c1:53:2e:ff:7e:37: + 17:cc:7e:74:bd:e2:22:33:ce:8c:77:62:a4:c5:3f: + 44:35:7b:7e:b9:f5:7d:8c:7a:27:58:fd:2c:42:86: + 2e:e7:6b:01:99:7b:fe:7d:a7:a1:4f:3e:39:39:54: + 1f:61:de:74:66:d1:77:4f:43:1b:66:70:29:85:de: + fc:8f:8e:1b:7b:a2:66:48:26:7f:9b:a6:fd:4a:e4: + dc:eb:ed:bd:f8:e3:f1:57:98:13:6f:f1:a3:2a:e3: + 73:bd:8d:7c:6f:4b:59:35:bc:b5:42:3e:99:a7:13: + 8d:be:2e:5c:9a:c6:5b:ab:ae:bf:00:e9:c8:ee:05: + 22:8e:d5:67:1a:47:9a:6d:9c:f9:42:3e:15:34:f8: + 31:ec:b4:7e:d3:92:95:b0:b8:f9:66:f3:bd:1d:31: + 2c:b1:90:62:a1:f8:4e:a6:5d:26:22:f0:e1:fe:16: + 2b:69 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Subject Key Identifier: + CA:71:99:89:F0:72:AB:75:66:BB:65:6A:03:04:72:A5:7B:95:A6:93 + X509v3 Authority Key Identifier: + keyid:CA:71:99:89:F0:72:AB:75:66:BB:65:6A:03:04:72:A5:7B:95:A6:93 + + X509v3 Basic Constraints: + CA:TRUE + Signature Algorithm: sha256WithRSAEncryption + df:fd:74:29:5b:5e:9a:8b:09:02:40:59:73:cb:71:47:3f:97: + 3d:a9:fd:c4:8c:01:29:c9:86:b8:71:55:ff:72:0e:50:dc:c8: + b5:e6:91:41:52:47:21:30:cc:4d:e7:3b:4b:db:55:ea:7d:46: + eb:53:e0:b7:1b:80:7c:b1:0c:d3:d1:bc:a0:73:ae:96:1f:fd: + 05:52:7e:54:d5:03:52:69:7b:34:5f:27:d7:98:da:98:76:73: + e6:bb:50:59:2a:94:90:67:03:1c:a4:76:2f:ee:ef:59:60:09: + 48:33:03:2b:52:ed:83:42:f8:71:19:7f:d8:be:40:ed:20:01: + 90:3c:7e:1c:8b:d2:9f:f3:2f:09:1f:50:c8:10:e1:8a:d9:a5: + 49:9c:0b:74:17:b9:2b:68:f6:1e:73:c2:73:10:38:b3:35:e2: + 87:91:1b:a1:d1:9b:81:9d:1b:32:cc:03:6e:4c:82:95:81:11: + 42:56:e2:16:2b:22:65:db:40:2c:ca:dc:03:f4:d5:07:cf:f5: + 13:b2:cf:51:5b:24:cd:c7:d1:9b:42:8e:f9:df:5d:1e:5a:09: + a3:4f:a9:0b:f4:21:c5:bb:ff:02:93:67:e8:2d:ee:ab:d9:59: + 76:03:2c:a1:bd:fb:dc:af:b6:82:94:71:85:53:a8:18:0d:3a: + 9e:42:eb:59 +-----BEGIN CERTIFICATE----- +MIIDfzCCAmegAwIBAgIJANBNI4XuWbP6MA0GCSqGSIb3DQEBCwUAMFYxDzANBgNV +BAMMBmNhY2VydDELMAkGA1UEBhMCRkkxETAPBgNVBAgMCEhlbHNpbmtpMREwDwYD +VQQHDAhIZWxzaW5raTEQMA4GA1UECgwHTWFyaWFEQjAeFw0xOTAxMjcxMDExMTBa +Fw0zOTAxMjIxMDExMTBaMFYxDzANBgNVBAMMBmNhY2VydDELMAkGA1UEBhMCRkkx +ETAPBgNVBAgMCEhlbHNpbmtpMREwDwYDVQQHDAhIZWxzaW5raTEQMA4GA1UECgwH +TWFyaWFEQjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOgOp4TTdTAG +MLIQudGINite+MhEV8tncquWlTPViNGPI1CYum0gAIC9NdXBv5hJxAoVSjSmIZsu +jBUJ8GOBAsJ84lPg96EaQF6PQUpMVtQg8dWnwVMu/343F8x+dL3iIjPOjHdipMU/ +RDV7frn1fYx6J1j9LEKGLudrAZl7/n2noU8+OTlUH2HedGbRd09DG2ZwKYXe/I+O +G3uiZkgmf5um/Urk3Ovtvfjj8VeYE2/xoyrjc72NfG9LWTW8tUI+macTjb4uXJrG +W6uuvwDpyO4FIo7VZxpHmm2c+UI+FTT4Mey0ftOSlbC4+WbzvR0xLLGQYqH4TqZd +JiLw4f4WK2kCAwEAAaNQME4wHQYDVR0OBBYEFMpxmYnwcqt1ZrtlagMEcqV7laaT +MB8GA1UdIwQYMBaAFMpxmYnwcqt1ZrtlagMEcqV7laaTMAwGA1UdEwQFMAMBAf8w +DQYJKoZIhvcNAQELBQADggEBAN/9dClbXpqLCQJAWXPLcUc/lz2p/cSMASnJhrhx +Vf9yDlDcyLXmkUFSRyEwzE3nO0vbVep9RutT4LcbgHyxDNPRvKBzrpYf/QVSflTV +A1JpezRfJ9eY2ph2c+a7UFkqlJBnAxykdi/u71lgCUgzAytS7YNC+HEZf9i+QO0g +AZA8fhyL0p/zLwkfUMgQ4YrZpUmcC3QXuSto9h5zwnMQOLM14oeRG6HRm4GdGzLM +A25MgpWBEUJW4hYrImXbQCzK3AP01QfP9ROyz1FbJM3H0ZtCjvnfXR5aCaNPqQv0 +IcW7/wKTZ+gt7qvZWXYDLKG9+9yvtoKUcYVTqBgNOp5C61k= +-----END CERTIFICATE----- diff --git a/mysql-test/std_data/capath/ed1f42db.0 b/mysql-test/std_data/capath/ed1f42db.0 new file mode 120000 index 0000000000000..1310cfcff205a --- /dev/null +++ b/mysql-test/std_data/capath/ed1f42db.0 @@ -0,0 +1 @@ +cacert.pem \ No newline at end of file diff --git a/mysql-test/suite/galera/r/galera_sst_rsync_encrypt_with_capath,debug.rdiff b/mysql-test/suite/galera/r/galera_sst_rsync_encrypt_with_capath,debug.rdiff new file mode 100644 index 0000000000000..59417d4d6e445 --- /dev/null +++ b/mysql-test/suite/galera/r/galera_sst_rsync_encrypt_with_capath,debug.rdiff @@ -0,0 +1,191 @@ +--- r/galera_sst_rsync_encrypt_with_server.result ++++ r/galera_sst_rsync_encrypt_with_server,debug.reject +@@ -519,4 +519,188 @@ + 1 + DROP TABLE t1; + COMMIT; ++Performing State Transfer on a server that has been killed and restarted ++while a DDL was in progress on it ++connection node_1; ++CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB; ++SET AUTOCOMMIT=OFF; ++START TRANSACTION; ++INSERT INTO t1 VALUES (1,'node1_committed_before'); ++INSERT INTO t1 VALUES (2,'node1_committed_before'); ++INSERT INTO t1 VALUES (3,'node1_committed_before'); ++INSERT INTO t1 VALUES (4,'node1_committed_before'); ++INSERT INTO t1 VALUES (5,'node1_committed_before'); ++connection node_2; ++START TRANSACTION; ++INSERT INTO t1 VALUES (6,'node2_committed_before'); ++INSERT INTO t1 VALUES (7,'node2_committed_before'); ++INSERT INTO t1 VALUES (8,'node2_committed_before'); ++INSERT INTO t1 VALUES (9,'node2_committed_before'); ++INSERT INTO t1 VALUES (10,'node2_committed_before'); ++COMMIT; ++SET GLOBAL debug_dbug = 'd,sync.alter_opened_table'; ++connection node_1; ++ALTER TABLE t1 ADD COLUMN f2 INTEGER; ++connection node_2; ++SET wsrep_sync_wait = 0; ++Killing server ... ++connection node_1; ++SET AUTOCOMMIT=OFF; ++START TRANSACTION; ++INSERT INTO t1 (id,f1) VALUES (11,'node1_committed_during'); ++INSERT INTO t1 (id,f1) VALUES (12,'node1_committed_during'); ++INSERT INTO t1 (id,f1) VALUES (13,'node1_committed_during'); ++INSERT INTO t1 (id,f1) VALUES (14,'node1_committed_during'); ++INSERT INTO t1 (id,f1) VALUES (15,'node1_committed_during'); ++COMMIT; ++START TRANSACTION; ++INSERT INTO t1 (id,f1) VALUES (16,'node1_to_be_committed_after'); ++INSERT INTO t1 (id,f1) VALUES (17,'node1_to_be_committed_after'); ++INSERT INTO t1 (id,f1) VALUES (18,'node1_to_be_committed_after'); ++INSERT INTO t1 (id,f1) VALUES (19,'node1_to_be_committed_after'); ++INSERT INTO t1 (id,f1) VALUES (20,'node1_to_be_committed_after'); ++connect node_1a_galera_st_kill_slave_ddl, 127.0.0.1, root, , test, $NODE_MYPORT_1; ++SET AUTOCOMMIT=OFF; ++START TRANSACTION; ++INSERT INTO t1 (id,f1) VALUES (21,'node1_to_be_rollbacked_after'); ++INSERT INTO t1 (id,f1) VALUES (22,'node1_to_be_rollbacked_after'); ++INSERT INTO t1 (id,f1) VALUES (23,'node1_to_be_rollbacked_after'); ++INSERT INTO t1 (id,f1) VALUES (24,'node1_to_be_rollbacked_after'); ++INSERT INTO t1 (id,f1) VALUES (25,'node1_to_be_rollbacked_after'); ++connection node_2; ++Performing --wsrep-recover ... ++connection node_2; ++Starting server ... ++Using --wsrep-start-position when starting mysqld ... ++SET AUTOCOMMIT=OFF; ++START TRANSACTION; ++INSERT INTO t1 (id,f1) VALUES (26,'node2_committed_after'); ++INSERT INTO t1 (id,f1) VALUES (27,'node2_committed_after'); ++INSERT INTO t1 (id,f1) VALUES (28,'node2_committed_after'); ++INSERT INTO t1 (id,f1) VALUES (29,'node2_committed_after'); ++INSERT INTO t1 (id,f1) VALUES (30,'node2_committed_after'); ++COMMIT; ++connection node_1; ++INSERT INTO t1 (id,f1) VALUES (31,'node1_to_be_committed_after'); ++INSERT INTO t1 (id,f1) VALUES (32,'node1_to_be_committed_after'); ++INSERT INTO t1 (id,f1) VALUES (33,'node1_to_be_committed_after'); ++INSERT INTO t1 (id,f1) VALUES (34,'node1_to_be_committed_after'); ++INSERT INTO t1 (id,f1) VALUES (35,'node1_to_be_committed_after'); ++COMMIT; ++SET AUTOCOMMIT=OFF; ++START TRANSACTION; ++INSERT INTO t1 (id,f1) VALUES (36,'node1_committed_after'); ++INSERT INTO t1 (id,f1) VALUES (37,'node1_committed_after'); ++INSERT INTO t1 (id,f1) VALUES (38,'node1_committed_after'); ++INSERT INTO t1 (id,f1) VALUES (39,'node1_committed_after'); ++INSERT INTO t1 (id,f1) VALUES (40,'node1_committed_after'); ++COMMIT; ++connection node_1a_galera_st_kill_slave_ddl; ++INSERT INTO t1 (id,f1) VALUES (41,'node1_to_be_rollbacked_after'); ++INSERT INTO t1 (id,f1) VALUES (42,'node1_to_be_rollbacked_after'); ++INSERT INTO t1 (id,f1) VALUES (43,'node1_to_be_rollbacked_after'); ++INSERT INTO t1 (id,f1) VALUES (44,'node1_to_be_rollbacked_after'); ++INSERT INTO t1 (id,f1) VALUES (45,'node1_to_be_rollbacked_after'); ++ROLLBACK; ++SET AUTOCOMMIT=ON; ++SET SESSION wsrep_sync_wait=15; ++SELECT COUNT(*) AS EXPECT_3 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1'; ++EXPECT_3 ++3 ++SELECT COUNT(*) AS EXPECT_35 FROM t1; ++EXPECT_35 ++35 ++SELECT * FROM t1; ++id f1 f2 ++1 node1_committed_before NULL ++2 node1_committed_before NULL ++3 node1_committed_before NULL ++4 node1_committed_before NULL ++5 node1_committed_before NULL ++6 node2_committed_before NULL ++7 node2_committed_before NULL ++8 node2_committed_before NULL ++9 node2_committed_before NULL ++10 node2_committed_before NULL ++11 node1_committed_during NULL ++12 node1_committed_during NULL ++13 node1_committed_during NULL ++14 node1_committed_during NULL ++15 node1_committed_during NULL ++16 node1_to_be_committed_after NULL ++17 node1_to_be_committed_after NULL ++18 node1_to_be_committed_after NULL ++19 node1_to_be_committed_after NULL ++20 node1_to_be_committed_after NULL ++26 node2_committed_after NULL ++27 node2_committed_after NULL ++28 node2_committed_after NULL ++29 node2_committed_after NULL ++30 node2_committed_after NULL ++31 node1_to_be_committed_after NULL ++32 node1_to_be_committed_after NULL ++33 node1_to_be_committed_after NULL ++34 node1_to_be_committed_after NULL ++35 node1_to_be_committed_after NULL ++36 node1_committed_after NULL ++37 node1_committed_after NULL ++38 node1_committed_after NULL ++39 node1_committed_after NULL ++40 node1_committed_after NULL ++SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; ++COUNT(*) = 0 ++1 ++COMMIT; ++connection node_1; ++SET AUTOCOMMIT=ON; ++SET SESSION wsrep_sync_wait=15; ++SELECT COUNT(*) AS EXPECT_3 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1'; ++EXPECT_3 ++3 ++SELECT COUNT(*) AS EXPECT_35 FROM t1; ++EXPECT_35 ++35 ++SELECT * FROM t1; ++id f1 f2 ++1 node1_committed_before NULL ++2 node1_committed_before NULL ++3 node1_committed_before NULL ++4 node1_committed_before NULL ++5 node1_committed_before NULL ++6 node2_committed_before NULL ++7 node2_committed_before NULL ++8 node2_committed_before NULL ++9 node2_committed_before NULL ++10 node2_committed_before NULL ++11 node1_committed_during NULL ++12 node1_committed_during NULL ++13 node1_committed_during NULL ++14 node1_committed_during NULL ++15 node1_committed_during NULL ++16 node1_to_be_committed_after NULL ++17 node1_to_be_committed_after NULL ++18 node1_to_be_committed_after NULL ++19 node1_to_be_committed_after NULL ++20 node1_to_be_committed_after NULL ++26 node2_committed_after NULL ++27 node2_committed_after NULL ++28 node2_committed_after NULL ++29 node2_committed_after NULL ++30 node2_committed_after NULL ++31 node1_to_be_committed_after NULL ++32 node1_to_be_committed_after NULL ++33 node1_to_be_committed_after NULL ++34 node1_to_be_committed_after NULL ++35 node1_to_be_committed_after NULL ++36 node1_committed_after NULL ++37 node1_committed_after NULL ++38 node1_committed_after NULL ++39 node1_committed_after NULL ++40 node1_committed_after NULL ++SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; ++COUNT(*) = 0 ++1 ++DROP TABLE t1; ++COMMIT; ++SET GLOBAL debug_dbug = $debug_orig; + include/assert_grep.inc [Using stunnel for SSL encryption] diff --git a/mysql-test/suite/galera/r/galera_sst_rsync_encrypt_with_capath.result b/mysql-test/suite/galera/r/galera_sst_rsync_encrypt_with_capath.result new file mode 100644 index 0000000000000..be8c845bdcf4a --- /dev/null +++ b/mysql-test/suite/galera/r/galera_sst_rsync_encrypt_with_capath.result @@ -0,0 +1,520 @@ +connection node_2; +connection node_1; +connection node_1; +connection node_2; +connection node_1; +Performing State Transfer on a server that has been shut down cleanly and restarted +connection node_1; +CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES (1,'node1_committed_before'); +INSERT INTO t1 VALUES (2,'node1_committed_before'); +INSERT INTO t1 VALUES (3,'node1_committed_before'); +INSERT INTO t1 VALUES (4,'node1_committed_before'); +INSERT INTO t1 VALUES (5,'node1_committed_before'); +COMMIT; +connection node_2; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES (6,'node2_committed_before'); +INSERT INTO t1 VALUES (7,'node2_committed_before'); +INSERT INTO t1 VALUES (8,'node2_committed_before'); +INSERT INTO t1 VALUES (9,'node2_committed_before'); +INSERT INTO t1 VALUES (10,'node2_committed_before'); +COMMIT; +Shutting down server ... +connection node_1; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES (11,'node1_committed_during'); +INSERT INTO t1 VALUES (12,'node1_committed_during'); +INSERT INTO t1 VALUES (13,'node1_committed_during'); +INSERT INTO t1 VALUES (14,'node1_committed_during'); +INSERT INTO t1 VALUES (15,'node1_committed_during'); +COMMIT; +START TRANSACTION; +INSERT INTO t1 VALUES (16,'node1_to_be_committed_after'); +INSERT INTO t1 VALUES (17,'node1_to_be_committed_after'); +INSERT INTO t1 VALUES (18,'node1_to_be_committed_after'); +INSERT INTO t1 VALUES (19,'node1_to_be_committed_after'); +INSERT INTO t1 VALUES (20,'node1_to_be_committed_after'); +connect node_1a_galera_st_shutdown_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES (21,'node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES (22,'node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES (23,'node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES (24,'node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES (25,'node1_to_be_rollbacked_after'); +connection node_2; +Starting server ... +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES (26,'node2_committed_after'); +INSERT INTO t1 VALUES (27,'node2_committed_after'); +INSERT INTO t1 VALUES (28,'node2_committed_after'); +INSERT INTO t1 VALUES (29,'node2_committed_after'); +INSERT INTO t1 VALUES (30,'node2_committed_after'); +COMMIT; +connection node_1; +INSERT INTO t1 VALUES (31,'node1_to_be_committed_after'); +INSERT INTO t1 VALUES (32,'node1_to_be_committed_after'); +INSERT INTO t1 VALUES (33,'node1_to_be_committed_after'); +INSERT INTO t1 VALUES (34,'node1_to_be_committed_after'); +INSERT INTO t1 VALUES (35,'node1_to_be_committed_after'); +COMMIT; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES (36,'node1_committed_after'); +INSERT INTO t1 VALUES (37,'node1_committed_after'); +INSERT INTO t1 VALUES (38,'node1_committed_after'); +INSERT INTO t1 VALUES (39,'node1_committed_after'); +INSERT INTO t1 VALUES (40,'node1_committed_after'); +COMMIT; +connection node_1a_galera_st_shutdown_slave; +INSERT INTO t1 VALUES (41,'node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES (42,'node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES (43,'node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES (44,'node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES (45,'node1_to_be_rollbacked_after'); +ROLLBACK; +SET AUTOCOMMIT=ON; +SET SESSION wsrep_sync_wait=15; +SELECT COUNT(*) AS EXPECT_15 FROM t1; +EXPECT_15 +35 +SELECT * from t1; +id f1 +1 node1_committed_before +2 node1_committed_before +3 node1_committed_before +4 node1_committed_before +5 node1_committed_before +6 node2_committed_before +7 node2_committed_before +8 node2_committed_before +9 node2_committed_before +10 node2_committed_before +11 node1_committed_during +12 node1_committed_during +13 node1_committed_during +14 node1_committed_during +15 node1_committed_during +16 node1_to_be_committed_after +17 node1_to_be_committed_after +18 node1_to_be_committed_after +19 node1_to_be_committed_after +20 node1_to_be_committed_after +26 node2_committed_after +27 node2_committed_after +28 node2_committed_after +29 node2_committed_after +30 node2_committed_after +31 node1_to_be_committed_after +32 node1_to_be_committed_after +33 node1_to_be_committed_after +34 node1_to_be_committed_after +35 node1_to_be_committed_after +36 node1_committed_after +37 node1_committed_after +38 node1_committed_after +39 node1_committed_after +40 node1_committed_after +SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; +COUNT(*) = 0 +1 +COMMIT; +connection node_1; +SET AUTOCOMMIT=ON; +SET SESSION wsrep_sync_wait=15; +SELECT COUNT(*) AS EXPECT_15 FROM t1; +EXPECT_15 +35 +SELECT * from t1; +id f1 +1 node1_committed_before +2 node1_committed_before +3 node1_committed_before +4 node1_committed_before +5 node1_committed_before +6 node2_committed_before +7 node2_committed_before +8 node2_committed_before +9 node2_committed_before +10 node2_committed_before +11 node1_committed_during +12 node1_committed_during +13 node1_committed_during +14 node1_committed_during +15 node1_committed_during +16 node1_to_be_committed_after +17 node1_to_be_committed_after +18 node1_to_be_committed_after +19 node1_to_be_committed_after +20 node1_to_be_committed_after +26 node2_committed_after +27 node2_committed_after +28 node2_committed_after +29 node2_committed_after +30 node2_committed_after +31 node1_to_be_committed_after +32 node1_to_be_committed_after +33 node1_to_be_committed_after +34 node1_to_be_committed_after +35 node1_to_be_committed_after +36 node1_committed_after +37 node1_committed_after +38 node1_committed_after +39 node1_committed_after +40 node1_committed_after +SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; +COUNT(*) = 0 +1 +DROP TABLE t1; +COMMIT; +Performing State Transfer on a server that starts from a clean var directory +This is accomplished by shutting down node #2 and removing its var directory before restarting it +connection node_1; +CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES (1,'node1_committed_before'); +INSERT INTO t1 VALUES (2,'node1_committed_before'); +INSERT INTO t1 VALUES (3,'node1_committed_before'); +INSERT INTO t1 VALUES (4,'node1_committed_before'); +INSERT INTO t1 VALUES (5,'node1_committed_before'); +COMMIT; +connection node_2; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES (6,'node2_committed_before'); +INSERT INTO t1 VALUES (7,'node2_committed_before'); +INSERT INTO t1 VALUES (8,'node2_committed_before'); +INSERT INTO t1 VALUES (9,'node2_committed_before'); +INSERT INTO t1 VALUES (10,'node2_committed_before'); +COMMIT; +Shutting down server ... +connection node_1; +Cleaning var directory ... +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES (11,'node1_committed_during'); +INSERT INTO t1 VALUES (12,'node1_committed_during'); +INSERT INTO t1 VALUES (13,'node1_committed_during'); +INSERT INTO t1 VALUES (14,'node1_committed_during'); +INSERT INTO t1 VALUES (15,'node1_committed_during'); +COMMIT; +START TRANSACTION; +INSERT INTO t1 VALUES (16,'node1_to_be_committed_after'); +INSERT INTO t1 VALUES (17,'node1_to_be_committed_after'); +INSERT INTO t1 VALUES (18,'node1_to_be_committed_after'); +INSERT INTO t1 VALUES (19,'node1_to_be_committed_after'); +INSERT INTO t1 VALUES (20,'node1_to_be_committed_after'); +connect node_1a_galera_st_clean_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES (21,'node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES (22,'node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES (23,'node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES (24,'node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES (25,'node1_to_be_rollbacked_after'); +connection node_2; +Starting server ... +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES (26,'node2_committed_after'); +INSERT INTO t1 VALUES (27,'node2_committed_after'); +INSERT INTO t1 VALUES (28,'node2_committed_after'); +INSERT INTO t1 VALUES (29,'node2_committed_after'); +INSERT INTO t1 VALUES (30,'node2_committed_after'); +COMMIT; +connection node_1; +INSERT INTO t1 VALUES (31,'node1_to_be_committed_after'); +INSERT INTO t1 VALUES (32,'node1_to_be_committed_after'); +INSERT INTO t1 VALUES (33,'node1_to_be_committed_after'); +INSERT INTO t1 VALUES (34,'node1_to_be_committed_after'); +INSERT INTO t1 VALUES (35,'node1_to_be_committed_after'); +COMMIT; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES (36,'node1_committed_after'); +INSERT INTO t1 VALUES (37,'node1_committed_after'); +INSERT INTO t1 VALUES (38,'node1_committed_after'); +INSERT INTO t1 VALUES (39,'node1_committed_after'); +INSERT INTO t1 VALUES (40,'node1_committed_after'); +COMMIT; +connection node_1a_galera_st_clean_slave; +INSERT INTO t1 VALUES (41,'node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES (42,'node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES (43,'node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES (44,'node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES (45,'node1_to_be_rollbacked_after'); +ROLLBACK; +SET AUTOCOMMIT=ON; +SET SESSION wsrep_sync_wait=15; +SELECT COUNT(*) AS EXPECT_35 FROM t1; +EXPECT_35 +35 +SELECT * from t1; +id f1 +1 node1_committed_before +2 node1_committed_before +3 node1_committed_before +4 node1_committed_before +5 node1_committed_before +6 node2_committed_before +7 node2_committed_before +8 node2_committed_before +9 node2_committed_before +10 node2_committed_before +11 node1_committed_during +12 node1_committed_during +13 node1_committed_during +14 node1_committed_during +15 node1_committed_during +16 node1_to_be_committed_after +17 node1_to_be_committed_after +18 node1_to_be_committed_after +19 node1_to_be_committed_after +20 node1_to_be_committed_after +26 node2_committed_after +27 node2_committed_after +28 node2_committed_after +29 node2_committed_after +30 node2_committed_after +31 node1_to_be_committed_after +32 node1_to_be_committed_after +33 node1_to_be_committed_after +34 node1_to_be_committed_after +35 node1_to_be_committed_after +36 node1_committed_after +37 node1_committed_after +38 node1_committed_after +39 node1_committed_after +40 node1_committed_after +SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; +COUNT(*) = 0 +1 +COMMIT; +connection node_1; +SET AUTOCOMMIT=ON; +SET SESSION wsrep_sync_wait=15; +SELECT COUNT(*) AS EXPECT_35 FROM t1; +EXPECT_35 +35 +SELECT * from t1; +id f1 +1 node1_committed_before +2 node1_committed_before +3 node1_committed_before +4 node1_committed_before +5 node1_committed_before +6 node2_committed_before +7 node2_committed_before +8 node2_committed_before +9 node2_committed_before +10 node2_committed_before +11 node1_committed_during +12 node1_committed_during +13 node1_committed_during +14 node1_committed_during +15 node1_committed_during +16 node1_to_be_committed_after +17 node1_to_be_committed_after +18 node1_to_be_committed_after +19 node1_to_be_committed_after +20 node1_to_be_committed_after +26 node2_committed_after +27 node2_committed_after +28 node2_committed_after +29 node2_committed_after +30 node2_committed_after +31 node1_to_be_committed_after +32 node1_to_be_committed_after +33 node1_to_be_committed_after +34 node1_to_be_committed_after +35 node1_to_be_committed_after +36 node1_committed_after +37 node1_committed_after +38 node1_committed_after +39 node1_committed_after +40 node1_committed_after +SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; +COUNT(*) = 0 +1 +DROP TABLE t1; +COMMIT; +Performing State Transfer on a server that has been killed and restarted +connection node_1; +CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES (1,'node1_committed_before'); +INSERT INTO t1 VALUES (2,'node1_committed_before'); +INSERT INTO t1 VALUES (3,'node1_committed_before'); +INSERT INTO t1 VALUES (4,'node1_committed_before'); +INSERT INTO t1 VALUES (5,'node1_committed_before'); +COMMIT; +connection node_2; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES (6,'node2_committed_before'); +INSERT INTO t1 VALUES (7,'node2_committed_before'); +INSERT INTO t1 VALUES (8,'node2_committed_before'); +INSERT INTO t1 VALUES (9,'node2_committed_before'); +INSERT INTO t1 VALUES (10,'node2_committed_before'); +COMMIT; +Killing server ... +connection node_1; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES (11,'node1_committed_during'); +INSERT INTO t1 VALUES (12,'node1_committed_during'); +INSERT INTO t1 VALUES (13,'node1_committed_during'); +INSERT INTO t1 VALUES (14,'node1_committed_during'); +INSERT INTO t1 VALUES (15,'node1_committed_during'); +COMMIT; +START TRANSACTION; +INSERT INTO t1 VALUES (16,'node1_to_be_committed_after'); +INSERT INTO t1 VALUES (17,'node1_to_be_committed_after'); +INSERT INTO t1 VALUES (18,'node1_to_be_committed_after'); +INSERT INTO t1 VALUES (19,'node1_to_be_committed_after'); +INSERT INTO t1 VALUES (20,'node1_to_be_committed_after'); +connect node_1a_galera_st_kill_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES (21,'node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES (22,'node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES (23,'node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES (24,'node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES (25,'node1_to_be_rollbacked_after'); +connection node_2; +Performing --wsrep-recover ... +Starting server ... +Using --wsrep-start-position when starting mysqld ... +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES (26,'node2_committed_after'); +INSERT INTO t1 VALUES (27,'node2_committed_after'); +INSERT INTO t1 VALUES (28,'node2_committed_after'); +INSERT INTO t1 VALUES (29,'node2_committed_after'); +INSERT INTO t1 VALUES (30,'node2_committed_after'); +COMMIT; +connection node_1; +INSERT INTO t1 VALUES (31,'node1_to_be_committed_after'); +INSERT INTO t1 VALUES (32,'node1_to_be_committed_after'); +INSERT INTO t1 VALUES (33,'node1_to_be_committed_after'); +INSERT INTO t1 VALUES (34,'node1_to_be_committed_after'); +INSERT INTO t1 VALUES (35,'node1_to_be_committed_after'); +COMMIT; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES (36,'node1_committed_after'); +INSERT INTO t1 VALUES (37,'node1_committed_after'); +INSERT INTO t1 VALUES (38,'node1_committed_after'); +INSERT INTO t1 VALUES (39,'node1_committed_after'); +INSERT INTO t1 VALUES (40,'node1_committed_after'); +COMMIT; +connection node_1a_galera_st_kill_slave; +INSERT INTO t1 VALUES (41,'node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES (42,'node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES (43,'node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES (45,'node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES (46,'node1_to_be_rollbacked_after'); +ROLLBACK; +SET AUTOCOMMIT=ON; +SET SESSION wsrep_sync_wait=15; +SELECT COUNT(*) AS EXPECT_35 FROM t1; +EXPECT_35 +35 +SELECT * FROM t1; +id f1 +1 node1_committed_before +2 node1_committed_before +3 node1_committed_before +4 node1_committed_before +5 node1_committed_before +6 node2_committed_before +7 node2_committed_before +8 node2_committed_before +9 node2_committed_before +10 node2_committed_before +11 node1_committed_during +12 node1_committed_during +13 node1_committed_during +14 node1_committed_during +15 node1_committed_during +16 node1_to_be_committed_after +17 node1_to_be_committed_after +18 node1_to_be_committed_after +19 node1_to_be_committed_after +20 node1_to_be_committed_after +26 node2_committed_after +27 node2_committed_after +28 node2_committed_after +29 node2_committed_after +30 node2_committed_after +31 node1_to_be_committed_after +32 node1_to_be_committed_after +33 node1_to_be_committed_after +34 node1_to_be_committed_after +35 node1_to_be_committed_after +36 node1_committed_after +37 node1_committed_after +38 node1_committed_after +39 node1_committed_after +40 node1_committed_after +SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; +COUNT(*) = 0 +1 +COMMIT; +connection node_1; +SET AUTOCOMMIT=ON; +SET SESSION wsrep_sync_wait=15; +SELECT COUNT(*) AS EXPECT_35 FROM t1; +EXPECT_35 +35 +SELECT * FROM t1; +id f1 +1 node1_committed_before +2 node1_committed_before +3 node1_committed_before +4 node1_committed_before +5 node1_committed_before +6 node2_committed_before +7 node2_committed_before +8 node2_committed_before +9 node2_committed_before +10 node2_committed_before +11 node1_committed_during +12 node1_committed_during +13 node1_committed_during +14 node1_committed_during +15 node1_committed_during +16 node1_to_be_committed_after +17 node1_to_be_committed_after +18 node1_to_be_committed_after +19 node1_to_be_committed_after +20 node1_to_be_committed_after +26 node2_committed_after +27 node2_committed_after +28 node2_committed_after +29 node2_committed_after +30 node2_committed_after +31 node1_to_be_committed_after +32 node1_to_be_committed_after +33 node1_to_be_committed_after +34 node1_to_be_committed_after +35 node1_to_be_committed_after +36 node1_committed_after +37 node1_committed_after +38 node1_committed_after +39 node1_committed_after +40 node1_committed_after +SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; +COUNT(*) = 0 +1 +DROP TABLE t1; +COMMIT; +include/assert_grep.inc [Using stunnel for SSL encryption] diff --git a/mysql-test/suite/galera/r/galera_sst_rsync_encrypt_with_key.result b/mysql-test/suite/galera/r/galera_sst_rsync_encrypt_with_key.result index b791e580623d1..be8c845bdcf4a 100644 --- a/mysql-test/suite/galera/r/galera_sst_rsync_encrypt_with_key.result +++ b/mysql-test/suite/galera/r/galera_sst_rsync_encrypt_with_key.result @@ -2,8 +2,6 @@ connection node_2; connection node_1; connection node_1; connection node_2; -connection node_2; -CALL mtr.add_suppression("\\[ERROR\\] .*ib_buffer_pool' for reading: No such file or directory"); connection node_1; Performing State Transfer on a server that has been shut down cleanly and restarted connection node_1; diff --git a/mysql-test/suite/galera/r/galera_sst_rsync_encrypt_with_server.result b/mysql-test/suite/galera/r/galera_sst_rsync_encrypt_with_server.result index b791e580623d1..be8c845bdcf4a 100644 --- a/mysql-test/suite/galera/r/galera_sst_rsync_encrypt_with_server.result +++ b/mysql-test/suite/galera/r/galera_sst_rsync_encrypt_with_server.result @@ -2,8 +2,6 @@ connection node_2; connection node_1; connection node_1; connection node_2; -connection node_2; -CALL mtr.add_suppression("\\[ERROR\\] .*ib_buffer_pool' for reading: No such file or directory"); connection node_1; Performing State Transfer on a server that has been shut down cleanly and restarted connection node_1; diff --git a/mysql-test/suite/galera/t/galera_sst_mariabackup_table_options.test b/mysql-test/suite/galera/t/galera_sst_mariabackup_table_options.test index 953a163555977..7a3a6c825c497 100644 --- a/mysql-test/suite/galera/t/galera_sst_mariabackup_table_options.test +++ b/mysql-test/suite/galera/t/galera_sst_mariabackup_table_options.test @@ -66,6 +66,7 @@ COMMIT; --source include/wait_condition.inc --echo Cleaning var directory ... +--remove_file $MYSQLTEST_VARDIR/mysqld.2/data/grastate.dat --remove_files_wildcard $MYSQLTEST_VARDIR/mysqld.2/data/mtr --remove_files_wildcard $MYSQLTEST_VARDIR/mysqld.2/data/performance_schema --remove_files_wildcard $MYSQLTEST_VARDIR/mysqld.2/data/test diff --git a/mysql-test/suite/galera/t/galera_sst_rsync_encrypt_with_capath.cnf b/mysql-test/suite/galera/t/galera_sst_rsync_encrypt_with_capath.cnf new file mode 100644 index 0000000000000..3ab762df013b6 --- /dev/null +++ b/mysql-test/suite/galera/t/galera_sst_rsync_encrypt_with_capath.cnf @@ -0,0 +1,20 @@ +!include ../galera_2nodes.cnf + +[mysqld] +wsrep_sst_method=rsync +ssl-cert=@ENV.MYSQL_TEST_DIR/std_data/server-cert.pem +ssl-key=@ENV.MYSQL_TEST_DIR/std_data/server-key.pem +ssl-capath=@ENV.MYSQL_TEST_DIR/std_data/capath +# We need to turn off the default setting for the duration +# of the test (to test working with a directory instead of +# a file): +ssl-ca= + +[sst] +ssl-mode=VERIFY_CA + +[mysqld.1] +wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcache.size=1;pc.ignore_sb=true' + +[mysqld.2] +wsrep_provider_options='base_port=@mysqld.2.#galera_port;gcache.size=1;pc.ignore_sb=true' diff --git a/mysql-test/suite/galera/t/galera_sst_rsync_encrypt_with_capath.test b/mysql-test/suite/galera/t/galera_sst_rsync_encrypt_with_capath.test new file mode 100644 index 0000000000000..a2d92723ec485 --- /dev/null +++ b/mysql-test/suite/galera/t/galera_sst_rsync_encrypt_with_capath.test @@ -0,0 +1,26 @@ +--source include/big_test.inc +--source include/galera_cluster.inc +--source include/have_debug.inc +--source include/have_stunnel.inc + +# Save original auto_increment_offset values. +--let $node_1=node_1 +--let $node_2=node_2 +--source include/auto_increment_offset_save.inc + +--connection node_1 +--source suite/galera/include/galera_st_shutdown_slave.inc +--source suite/galera/include/galera_st_clean_slave.inc + +--source suite/galera/include/galera_st_kill_slave.inc +--source suite/galera/include/galera_st_kill_slave_ddl.inc + +# Confirm that transfer was SSL-encrypted +--let $assert_text = Using stunnel for SSL encryption +--let $assert_select = Using stunnel for SSL encryption +--let $assert_count = 5 +--let $assert_file = $MYSQLTEST_VARDIR/log/mysqld.1.err +--let $assert_only_after = CURRENT_TEST +--source include/assert_grep.inc + +--source include/auto_increment_offset_restore.inc diff --git a/mysql-test/suite/galera/t/galera_sst_rsync_encrypt_with_key.test b/mysql-test/suite/galera/t/galera_sst_rsync_encrypt_with_key.test index 838c473b9ce12..a2d92723ec485 100644 --- a/mysql-test/suite/galera/t/galera_sst_rsync_encrypt_with_key.test +++ b/mysql-test/suite/galera/t/galera_sst_rsync_encrypt_with_key.test @@ -8,9 +8,6 @@ --let $node_2=node_2 --source include/auto_increment_offset_save.inc ---connection node_2 -CALL mtr.add_suppression("\\[ERROR\\] .*ib_buffer_pool' for reading: No such file or directory"); - --connection node_1 --source suite/galera/include/galera_st_shutdown_slave.inc --source suite/galera/include/galera_st_clean_slave.inc diff --git a/mysql-test/suite/galera/t/galera_sst_rsync_encrypt_with_server.test b/mysql-test/suite/galera/t/galera_sst_rsync_encrypt_with_server.test index 838c473b9ce12..a2d92723ec485 100644 --- a/mysql-test/suite/galera/t/galera_sst_rsync_encrypt_with_server.test +++ b/mysql-test/suite/galera/t/galera_sst_rsync_encrypt_with_server.test @@ -8,9 +8,6 @@ --let $node_2=node_2 --source include/auto_increment_offset_save.inc ---connection node_2 -CALL mtr.add_suppression("\\[ERROR\\] .*ib_buffer_pool' for reading: No such file or directory"); - --connection node_1 --source suite/galera/include/galera_st_shutdown_slave.inc --source suite/galera/include/galera_st_clean_slave.inc diff --git a/mysql-test/suite/galera_3nodes/t/galera_ipv6_mariabackup.test b/mysql-test/suite/galera_3nodes/t/galera_ipv6_mariabackup.test index 31613454348e3..6e02350b12b4d 100644 --- a/mysql-test/suite/galera_3nodes/t/galera_ipv6_mariabackup.test +++ b/mysql-test/suite/galera_3nodes/t/galera_ipv6_mariabackup.test @@ -1,3 +1,4 @@ +--source include/big_test.inc --source include/galera_cluster.inc --source include/check_ipv6.inc --source include/have_innodb.inc diff --git a/mysql-test/suite/galera_3nodes/t/galera_ipv6_mariabackup_section.test b/mysql-test/suite/galera_3nodes/t/galera_ipv6_mariabackup_section.test index 3b2ca0892f18b..453aa21988dbc 100644 --- a/mysql-test/suite/galera_3nodes/t/galera_ipv6_mariabackup_section.test +++ b/mysql-test/suite/galera_3nodes/t/galera_ipv6_mariabackup_section.test @@ -1,3 +1,4 @@ +--source include/big_test.inc --source include/galera_cluster.inc --source include/check_ipv6.inc --source include/have_innodb.inc diff --git a/scripts/wsrep_sst_common.sh b/scripts/wsrep_sst_common.sh index dbd639595dfd6..5c84aa7c17f57 100644 --- a/scripts/wsrep_sst_common.sh +++ b/scripts/wsrep_sst_common.sh @@ -19,6 +19,9 @@ set -u +# Setting the path for some utilities on CentOS +export PATH="$PATH:/usr/sbin:/usr/bin:/sbin:/bin" + WSREP_SST_OPT_BYPASS=0 WSREP_SST_OPT_BINLOG="" WSREP_SST_OPT_BINLOG_INDEX="" @@ -384,10 +387,8 @@ case "$1" in skip_mysqld_arg=1 ;; '--innodb-force-recovery') - if [ -n "$value" ]; then - if [ "$value" -ne 0 ]; then - INNODB_FORCE_RECOVERY="$value" - fi + if [ -n "$value" -a "$value" != "0" ]; then + INNODB_FORCE_RECOVERY="$value" fi skip_mysqld_arg=1 ;; @@ -584,7 +585,8 @@ get_binlog() if [ -n "$WSREP_SST_OPT_ADDR_PORT" ]; then if [ -n "$WSREP_SST_OPT_PORT" ]; then if [ "$WSREP_SST_OPT_PORT" != "$WSREP_SST_OPT_ADDR_PORT" ]; then - echo "WSREP_SST: [ERROR] port in --port=$WSREP_SST_OPT_PORT differs from port in --address=$WSREP_SST_OPT_ADDR" >&2 + echo "WSREP_SST: [ERROR] port in --port=$WSREP_SST_OPT_PORT" \ + "differs from port in --address=$WSREP_SST_OPT_ADDR" >&2 exit 2 fi else @@ -616,8 +618,19 @@ fi readonly WSREP_SST_OPT_ADDR readonly WSREP_SST_OPT_ADDR_PORT -# try to use my_print_defaults, mysql and mysqldump that come with the sources -# (for MTR suite) +commandex() +{ + if [ -n "$BASH_VERSION" ]; then + command -v "$1" || : + elif [ -x "$1" ]; then + echo "$1" + else + which "$1" || : + fi +} + +# try to use my_print_defaults, mysql and mysqldump that come +# with the sources (for MTR suite): script_binary=$(dirname "$0") SCRIPTS_DIR=$(cd "$script_binary"; pwd -P) EXTRA_DIR="$SCRIPTS_DIR/../extra" @@ -626,13 +639,13 @@ CLIENT_DIR="$SCRIPTS_DIR/../client" if [ -x "$CLIENT_DIR/mysql" ]; then MYSQL_CLIENT="$CLIENT_DIR/mysql" else - MYSQL_CLIENT="$(command -v mysql)" + MYSQL_CLIENT=$(commandex 'mysql') fi if [ -x "$CLIENT_DIR/mysqldump" ]; then MYSQLDUMP="$CLIENT_DIR/mysqldump" else - MYSQLDUMP="$(command -v mysqldump)" + MYSQLDUMP=$(commandex 'mysqldump') fi wsrep_log() @@ -663,7 +676,7 @@ if [ -x "$SCRIPTS_DIR/my_print_defaults" ]; then elif [ -x "$EXTRA_DIR/my_print_defaults" ]; then MY_PRINT_DEFAULTS="$EXTRA_DIR/my_print_defaults" else - MY_PRINT_DEFAULTS="$(command -v my_print_defaults)" + MY_PRINT_DEFAULTS=$(commandex 'my_print_defaults') if [ -z "$MY_PRINT_DEFAULTS" ]; then wsrep_log_error "my_print_defaults not found in path" exit 2 @@ -673,16 +686,16 @@ fi readonly MY_PRINT_DEFAULTS wsrep_defaults="$WSREP_SST_OPT_DEFAULTS" -wsrep_defaults="$wsrep_defaults${wsrep_defaults:+ }$WSREP_SST_OPT_EXTRA_DEFAULTS" -wsrep_defaults="$wsrep_defaults${wsrep_defaults:+ }$WSREP_SST_OPT_SUFFIX_DEFAULT" +wsrep_defaults="$wsrep_defaults${WSREP_SST_OPT_EXTRA_DEFAULTS:+ }$WSREP_SST_OPT_EXTRA_DEFAULTS" +wsrep_defaults="$wsrep_defaults${WSREP_SST_OPT_SUFFIX_DEFAULT:+ }$WSREP_SST_OPT_SUFFIX_DEFAULT" -readonly WSREP_SST_OPT_CONF="$wsrep_defaults" +readonly WSREP_SST_OPT_CONF="${wsrep_defaults:+ }$wsrep_defaults" wsrep_defaults="$WSREP_SST_OPT_DEFAULT" -wsrep_defaults="$wsrep_defaults${wsrep_defaults:+ }$WSREP_SST_OPT_EXTRA_DEFAULT" -wsrep_defaults="$wsrep_defaults${wsrep_defaults:+ }$WSREP_SST_OPT_SUFFIX_DEFAULT" +wsrep_defaults="$wsrep_defaults${WSREP_SST_OPT_EXTRA_DEFAULT:+ }$WSREP_SST_OPT_EXTRA_DEFAULT" +wsrep_defaults="$wsrep_defaults${WSREP_SST_OPT_SUFFIX_DEFAULT:+ }$WSREP_SST_OPT_SUFFIX_DEFAULT" -readonly WSREP_SST_OPT_CONF_UNQUOTED="$wsrep_defaults" +readonly WSREP_SST_OPT_CONF_UNQUOTED="${wsrep_defaults:+ }$wsrep_defaults" # # User can specify mariabackup specific settings that will be used during sst @@ -819,8 +832,7 @@ if wsrep_auth_not_set; then fi # Splitting WSREP_SST_OPT_AUTH as "user:password" pair: -if ! wsrep_auth_not_set -then +if ! wsrep_auth_not_set; then # Extract username as shortest prefix up to first ':' character: WSREP_SST_OPT_AUTH_USER="${WSREP_SST_OPT_AUTH%%:*}" if [ -z "$WSREP_SST_OPT_USER" ]; then @@ -848,8 +860,7 @@ readonly WSREP_SST_OPT_USER readonly WSREP_SST_OPT_PSWD readonly WSREP_SST_OPT_AUTH -if [ -n "$WSREP_SST_OPT_REMOTE_AUTH" ] -then +if [ -n "$WSREP_SST_OPT_REMOTE_AUTH" ]; then # Split auth string at the last ':' readonly WSREP_SST_OPT_REMOTE_USER="${WSREP_SST_OPT_REMOTE_AUTH%%:*}" readonly WSREP_SST_OPT_REMOTE_PSWD="${WSREP_SST_OPT_REMOTE_AUTH#*:}" @@ -860,8 +871,7 @@ fi readonly WSREP_SST_OPT_REMOTE_AUTH -if [ -n "$WSREP_SST_OPT_DATA" ] -then +if [ -n "$WSREP_SST_OPT_DATA" ]; then SST_PROGRESS_FILE="$WSREP_SST_OPT_DATA/sst_in_progress" else SST_PROGRESS_FILE="" @@ -870,13 +880,14 @@ fi wsrep_cleanup_progress_file() { [ -n "$SST_PROGRESS_FILE" -a \ - -f "$SST_PROGRESS_FILE" ] && rm -f "$SST_PROGRESS_FILE" 2>/dev/null || true + -f "$SST_PROGRESS_FILE" ] && \ + rm -f "$SST_PROGRESS_FILE" 2>/dev/null || : } wsrep_check_program() { local prog="$1" - local cmd=$(command -v "$prog") + local cmd=$(commandex "$prog") if [ -z "$cmd" ]; then echo "'$prog' not found in PATH" return 2 # no such file or directory @@ -898,9 +909,9 @@ wsrep_check_programs() wsrep_check_datadir() { - if [ -z "$WSREP_SST_OPT_DATA" ] - then - wsrep_log_error "The '--datadir' parameter must be passed to the SST script" + if [ -z "$WSREP_SST_OPT_DATA" ]; then + wsrep_log_error \ + "The '--datadir' parameter must be passed to the SST script" exit 2 fi } @@ -912,10 +923,10 @@ get_openssl() return fi # Let's look for openssl: - OPENSSL_BINARY="$(command -v openssl)" + OPENSSL_BINARY=$(commandex 'openssl') if [ -z "$OPENSSL_BINARY" ]; then OPENSSL_BINARY='/usr/bin/openssl' - if [ -z "$OPENSSL_BINARY" ]; then + if [ ! -x "$OPENSSL_BINARY" ]; then OPENSSL_BINARY="" fi fi @@ -928,13 +939,12 @@ get_openssl() wsrep_gen_secret() { get_openssl - if [ -n "$OPENSSL_BINARY" ] - then + if [ -n "$OPENSSL_BINARY" ]; then echo $("$OPENSSL_BINARY" rand -hex 16) else printf "%04x%04x%04x%04x%04x%04x%04x%04x" \ - $RANDOM $RANDOM $RANDOM $RANDOM \ - $RANDOM $RANDOM $RANDOM $RANDOM + $RANDOM $RANDOM $RANDOM $RANDOM \ + $RANDOM $RANDOM $RANDOM $RANDOM fi } @@ -968,14 +978,14 @@ is_local_ip() fi # Now let's check if the given address is assigned to # one of the network cards: - local ip_util="$(command -v ip)" + local ip_util=$(commandex 'ip') if [ -n "$ip_util" ]; then # ip address show ouput format is " inet[6]
/": "$ip_util" address show \ | grep -E "^[[:space:]]*inet.? [^[:space:]]+/" -o \ | grep -F " $1/" >/dev/null && return 0 else - local ifconfig_util="$(command -v ifconfig)" + local ifconfig_util=$(commandex 'ifconfig') if [ -n "$ifconfig_util" ]; then # ifconfig output format is " inet[6]
...": "$ifconfig_util" \ @@ -992,15 +1002,15 @@ check_sockets_utils() sockstat_available=0 ss_available=0 - [ -n "$(command -v lsof)" ] && lsof_available=1 - [ -n "$(command -v sockstat)" ] && sockstat_available=1 - [ -n "$(command -v ss)" ] && ss_available=1 + [ -n "$(commandex lsof)" ] && lsof_available=1 + [ -n "$(commandex sockstat)" ] && sockstat_available=1 + [ -n "$(commandex ss)" ] && ss_available=1 if [ $lsof_available -eq 0 -a \ $sockstat_available -eq 0 -a \ $ss_available -eq 0 ] then - wsrep_log_error "Neither lsof, nor sockstat or ss tool was found in " \ + wsrep_log_error "Neither lsof, nor sockstat or ss tool was found in" \ "the PATH. Make sure you have it installed." exit 2 # ENOENT fi @@ -1085,26 +1095,38 @@ check_for_dhparams() # verify_ca_matches_cert() { - local ca="$1" - local cert="$2" - local path=${3:-0} + local cert="$1" + local ca="$2" + local cap="$3" # If the openssl utility is not installed, then # we will not do this certificate check: get_openssl if [ -z "$OPENSSL_BINARY" ]; then + wsrep_log_info "openssl utility not found" return fi - local not_match=0 + local readable=1; [ ! -r "$cert" ] && readable=0 + [ -n "$ca" ] && [ ! -r "$ca" ] && readable=0 + [ -n "$cap" ] && [ ! -r "$cap" ] && readable=0 - if [ $path -eq 0 ]; then - "$OPENSSL_BINARY" verify -verbose -CAfile "$ca" "$cert" >/dev/null 2>&1 || not_match=1 - else - "$OPENSSL_BINARY" verify -verbose -CApath "$ca" "$cert" >/dev/null 2>&1 || not_match=1 + if [ readable -eq 0 ]; then + wsrep_log_error \ + "Both PEM file and CA file (or path) must be readable" + exit 22 fi + local not_match=0 + local errmsg + errmsg=$("$OPENSSL_BINARY" verify -verbose \ + ${ca:+ -CAfile} ${ca:+ "$ca"} \ + ${cap:+ -CApath} ${cap:+ "$cap"} \ + "$cert" 2>&1) || not_match=1 + if [ $not_match -eq 1 ]; then + wsrep_log_info "run: \"$OPENSSL_BINARY\" verify -verbose${ca:+ -CAfile \"$ca\"}${cap:+ -CApath \"$cap\"} \"$cert\"" + wsrep_log_info "output: $errmsg" wsrep_log_error "******** FATAL ERROR ********************************************" wsrep_log_error "* The certifcate and CA (certificate authority) do not match. *" wsrep_log_error "* It does not appear that the certificate was issued by the CA. *" @@ -1124,12 +1146,18 @@ verify_ca_matches_cert() # verify_cert_matches_key() { - local cert_path="$1" - local key_path="$2" + local cert="$1" + local key="$2" + + if [ ! -r "$key" -o ! -r "$cert" ]; then + wsrep_log_error "Both the certificate file and the key file" \ + "must be readable" + exit 22 + fi # If the diff utility is not installed, then # we will not do this certificate check: - if [ -z "$(command -v diff)" ]; then + if [ -z "$(commandex diff)" ]; then return fi @@ -1142,13 +1170,13 @@ verify_cert_matches_key() # Generate the public key from the cert and the key. # They should match (otherwise we can't create an SSL connection). - if ! diff <("$OPENSSL_BINARY" x509 -in "$cert_path" -pubkey -noout 2>/dev/null) \ - <("$OPENSSL_BINARY" pkey -in "$key_path" -pubout 2>/dev/null) >/dev/null 2>&1 + if ! diff <("$OPENSSL_BINARY" x509 -in "$cert" -pubkey -noout 2>/dev/null) \ + <("$OPENSSL_BINARY" pkey -in "$key" -pubout 2>/dev/null) >/dev/null 2>&1 then - wsrep_log_error "******************* FATAL ERROR ****************" - wsrep_log_error "* The certifcate and private key do not match. *" - wsrep_log_error "* Please check your certificate and key files. *" - wsrep_log_error "************************************************" + wsrep_log_error "******************* FATAL ERROR *****************" + wsrep_log_error "* The certificate and private key do not match. *" + wsrep_log_error "* Please check your certificate and key files. *" + wsrep_log_error "*************************************************" exit 22 fi } @@ -1305,9 +1333,9 @@ get_proc() elif [ "$OS" = 'Darwin' -o "$OS" = 'FreeBSD' ]; then nproc=$(sysctl -n hw.ncpu) fi + set -e if [ -z "$nproc" ] || [ $nproc -eq 0 ]; then nproc=1 fi - set -e fi } diff --git a/scripts/wsrep_sst_mariabackup.sh b/scripts/wsrep_sst_mariabackup.sh index b429a9effd562..4bca785fcadb0 100644 --- a/scripts/wsrep_sst_mariabackup.sh +++ b/scripts/wsrep_sst_mariabackup.sh @@ -20,10 +20,11 @@ # https://mariadb.com/kb/en/mariabackup-overview/ # Make sure to read that before proceeding! +OS="$(uname)" + . $(dirname "$0")/wsrep_sst_common wsrep_check_datadir -OS="$(uname)" ealgo="" eformat="" ekey="" @@ -34,7 +35,7 @@ ssyslog="" ssystag="" BACKUP_PID="" tcert="" -tpath=0 +tcap="" tpem="" tkey="" tmode="DISABLED" @@ -88,14 +89,14 @@ readonly SECRET_TAG="secret" # For backup locks it is 1 sent by joiner sst_ver=1 -if [ -n "$(command -v pv)" ] && pv --help | grep -qw -- '-F'; then +if [ -n "$(commandex pv)" ] && pv --help | grep -qw -- '-F'; then pvopts="$pvopts $pvformat" fi pcmd="pv $pvopts" declare -a RC -BACKUP_BIN="$(command -v mariabackup)" -if [ ! -x "$BACKUP_BIN" ]; then +BACKUP_BIN=$(commandex 'mariabackup') +if [ -z "$BACKUP_BIN" ]; then wsrep_log_error 'mariabackup binary not found in path' exit 42 fi @@ -145,14 +146,14 @@ get_keys() if [ $encrypt -eq 0 ]; then if [ -n "$ealgo" -o -n "$ekey" -o -n "$ekeyfile" ]; then - wsrep_log_error "Options for encryption are specified, " \ + wsrep_log_error "Options for encryption are specified," \ "but encryption itself is disabled. SST may fail." fi return fi if [ $sfmt = 'tar' ]; then - wsrep_log_info "NOTE: key-based encryption (encrypt=1) " \ + wsrep_log_info "NOTE: key-based encryption (encrypt=1)" \ "cannot be enabled with tar format" encrypt=-1 return @@ -165,16 +166,18 @@ get_keys() exit 3 fi - if [ -z "$ekey" -a ! -r "$ekeyfile" ]; then - wsrep_log_error "FATAL: Either key must be specified " \ - "or keyfile must be readable" - exit 3 + if [ -z "$ekey" ]; then + if [ ! -r "$ekeyfile" ]; then + wsrep_log_error "FATAL: Either key must be specified" \ + "or keyfile must be readable" + exit 3 + fi fi if [ "$eformat" = 'openssl' ]; then get_openssl if [ -z "$OPENSSL_BINARY" ]; then - wsrep_log_error "If encryption using the openssl is enabled, " \ + wsrep_log_error "If encryption using the openssl is enabled," \ "then you need to install openssl" exit 2 fi @@ -192,12 +195,12 @@ get_keys() ecmd="$ecmd -k '$ekey'" fi elif [ "$eformat" = 'xbcrypt' ]; then - if [ -z "$(command -v xbcrypt)" ]; then - wsrep_log_error "If encryption using the xbcrypt is enabled, " \ + if [ -z "$(commandex xbcrypt)" ]; then + wsrep_log_error "If encryption using the xbcrypt is enabled," \ "then you need to install xbcrypt" exit 2 fi - wsrep_log_info "NOTE: xbcrypt-based encryption, " \ + wsrep_log_info "NOTE: xbcrypt-based encryption," \ "supported only from Xtrabackup 2.1.4" if [ -z "$ekey" ]; then ecmd="xbcrypt --encrypt-algo='$ealgo' --encrypt-key-file='$ekeyfile'" @@ -342,40 +345,34 @@ get_transfer() CN_option=",commonname=''" if [ $encrypt -eq 2 ]; then - wsrep_log_info "Using openssl based encryption with socat: with crt and pem" - if [ -z "$tpem" -o -z "$tcert" ]; then + wsrep_log_info \ + "Using openssl based encryption with socat: with crt and pem" + if [ -z "$tpem" -o -z "$tcert$tcap" ]; then wsrep_log_error \ "Both PEM file and CRT file (or path) are required" exit 22 fi - if [ ! -r "$tpem" -o ! -r "$tcert" ]; then - wsrep_log_error \ - "Both PEM file and CRT file (or path) must be readable" - exit 22 + verify_ca_matches_cert "$tpem" "$tcert" "$tcap" + tcmd="$tcmd,cert='$tpem'" + if [ -n "$tcert" ]; then + tcmd="$tcmd,cafile='$tcert'" fi - verify_ca_matches_cert "$tcert" "$tpem" $tpath - if [ $tpath -eq 0 ]; then - tcmd="$tcmd,cert='$tpem',cafile='$tcert'" - else - tcmd="$tcmd,cert='$tpem',capath='$tcert'" + if [ -n "$tcap" ]; then + tcmd="$tcmd,capath='$tcap'" fi stagemsg="$stagemsg-OpenSSL-Encrypted-2" - wsrep_log_info "$action with cert=$tpem, ca=$tcert" + wsrep_log_info "$action with cert='$tpem', ca='$tcert', capath='$tcap'" elif [ $encrypt -eq 3 -o $encrypt -eq 4 ]; then - wsrep_log_info "Using openssl based encryption with socat: with key and crt" + wsrep_log_info \ + "Using openssl based encryption with socat: with key and crt" if [ -z "$tpem" -o -z "$tkey" ]; then - wsrep_log_error "Both certificate file (or path) " \ - "and key file are required" - exit 22 - fi - if [ ! -r "$tpem" -o ! -r "$tkey" ]; then - wsrep_log_error "Both certificate file (or path) " \ - "and key file must be readable" + wsrep_log_error "Both the certificate file (or path) and" \ + "the key file are required" exit 22 fi verify_cert_matches_key "$tpem" "$tkey" stagemsg="$stagemsg-OpenSSL-Encrypted-3" - if [ -z "$tcert" ]; then + if [ -z "$tcert$tcap" ]; then if [ $encrypt -eq 4 ]; then wsrep_log_error \ "Peer certificate file (or path) required if encrypt=4" @@ -384,14 +381,11 @@ get_transfer() # no verification CN_option="" tcmd="$tcmd,cert='$tpem',key='$tkey',verify=0" - wsrep_log_info "$action with cert=$tpem, key=$tkey, verify=0" + wsrep_log_info \ + "$action with cert='$tpem', key='$tkey', verify=0" else # CA verification - if [ ! -r "$tcert" ]; then - wsrep_log_error "Certificate file or path must be readable" - exit 22 - fi - verify_ca_matches_cert "$tcert" "$tpem" $tpath + verify_ca_matches_cert "$tpem" "$tcert" "$tcap" if [ -n "$WSREP_SST_OPT_REMOTE_USER" ]; then CN_option=",commonname='$WSREP_SST_OPT_REMOTE_USER'" elif [ "$WSREP_SST_OPT_ROLE" = 'joiner' -o $encrypt -eq 4 ] @@ -402,12 +396,15 @@ get_transfer() else CN_option=",commonname='$WSREP_SST_OPT_HOST_UNESCAPED'" fi - if [ $tpath -eq 0 ]; then - tcmd="$tcmd,cert='$tpem',key='$tkey',cafile='$tcert'" - else - tcmd="$tcmd,cert='$tpem',key='$tkey',capath='$tcert'" + tcmd="$tcmd,cert='$tpem',key='$tkey'" + if [ -n "$tcert" ]; then + tcmd="$tcmd,cafile='$tcert'" + fi + if [ -n "$tcap" ]; then + tcmd="$tcmd,capath='$tcap'" fi - wsrep_log_info "$action with cert=$tpem, key=$tkey, ca=$tcert" + wsrep_log_info "$action with cert='$tpem', key='$tkey'," \ + "ca='$tcert', capath='$tcap'" fi else wsrep_log_info "Unknown encryption mode: encrypt=$encrypt" @@ -425,7 +422,9 @@ get_transfer() get_footprint() { pushd "$WSREP_SST_OPT_DATA" 1>/dev/null - payload=$(find . -regex '.*\.ibd$\|.*\.MYI$\|.*\.MYD$\|.*ibdata1$' -type f -print0 | du --files0-from=- --block-size=1 -c -s | awk 'END { print $1 }') + payload=$(find . -regex '.*\.ibd$\|.*\.MYI$\|.*\.MYD$\|.*ibdata1$' \ + -type f -print0 | du --files0-from=- --block-size=1 -c -s | \ + awk 'END { print $1 }') if [ "$compress" != 'none' ]; then # QuickLZ has around 50% compression ratio # When compression/compaction used, the progress is only an approximate. @@ -438,7 +437,7 @@ get_footprint() adjust_progress() { - if [ -z "$(command -v pv)" ]; then + if [ -z "$(commandex pv)" ]; then wsrep_log_error "pv not found in path: $PATH" wsrep_log_error "Disabling all progress/rate-limiting" pcmd="" @@ -470,33 +469,42 @@ check_server_ssl_config() { # backward-compatible behavior: tcert=$(parse_cnf 'sst' 'tca') + tcap=$(parse_cnf 'sst' 'tcapath') tpem=$(parse_cnf 'sst' 'tcert') tkey=$(parse_cnf 'sst' 'tkey') # reading new ssl configuration options: local tcert2=$(parse_cnf "$encgroups" 'ssl-ca') + local tcap2=$(parse_cnf "$encgroups" 'ssl-capath') local tpem2=$(parse_cnf "$encgroups" 'ssl-cert') local tkey2=$(parse_cnf "$encgroups" 'ssl-key') # if there are no old options, then we take new ones: - if [ -z "$tcert" -a -z "$tpem" -a -z "$tkey" ]; then + if [ -z "$tcert" -a -z "$tcap" -a -z "$tpem" -a -z "$tkey" ]; then tcert="$tcert2" + tcap="$tcap2" tpem="$tpem2" tkey="$tkey2" # checking for presence of the new-style SSL configuration: - elif [ -n "$tcert2" -o -n "$tpem2" -o -n "$tkey2" ]; then + elif [ -n "$tcert2" -o -n "$tcap2" -o -n "$tpem2" -o -n "$tkey2" ]; then if [ "$tcert" != "$tcert2" -o \ + "$tcap" != "$tcap2" -o \ "$tpem" != "$tpem2" -o \ "$tkey" != "$tkey2" ] then - wsrep_log_info "new ssl configuration options (ssl-ca, ssl-cert " \ - "and ssl-key) are ignored by SST due to presence " \ - "of the tca, tcert and/or tkey in the [sst] section" + wsrep_log_info \ + "new ssl configuration options (ssl-ca[path], ssl-cert" \ + "and ssl-key) are ignored by SST due to presence" \ + "of the tca[path], tcert and/or tkey in the [sst] section" fi fi if [ -n "$tcert" ]; then - tcert=$(trim_string "$tcert") - if [ "${tcert%/}" != "$tcert" ]; then - tpath=1 - fi + tcert=$(trim_string "$tcert") + if [ "${tcert%/}" != "$tcert" ] || [ -d "$tcert" ]; then + tcap="$tcert" + tcert="" + fi + fi + if [ -n "$tcap" ]; then + tcap=$(trim_string "$tcap") fi } @@ -506,10 +514,10 @@ read_cnf() tfmt=$(parse_cnf sst transferfmt 'socat') encrypt=$(parse_cnf "$encgroups" 'encrypt' 0) - tmode=$(parse_cnf "$encgroups" 'ssl-mode' 'DISABLED' | tr [:lower:] [:upper:]) + tmode=$(parse_cnf "$encgroups" 'ssl-mode' 'DISABLED' | \ + tr [:lower:] [:upper:]) - if [ $encrypt -eq 0 -o $encrypt -ge 2 ] - then + if [ $encrypt -eq 0 -o $encrypt -ge 2 ]; then if [ "$tmode" != 'DISABLED' -o $encrypt -ge 2 ]; then check_server_ssl_config fi @@ -517,11 +525,13 @@ read_cnf() if [ 0 -eq $encrypt -a -n "$tpem" -a -n "$tkey" ] then encrypt=3 # enable cert/key SSL encyption - # avoid CA verification if not set explicitly: - # nodes may happen to have different CA if self-generated - # zeroing up tcert does the trick - [ "${tmode#VERIFY}" != "$tmode" ] || tcert="" + # nodes may happen to have different CA if self-generated, + # zeroing up tcert and tcap does the trick: + if [ "${tmode#VERIFY}" = "$tmode" ]; then + tcert="" + tcap="" + fi fi fi elif [ $encrypt -eq 1 ]; then @@ -535,8 +545,9 @@ read_cnf() fi fi - wsrep_log_info "SSL configuration: CA='$tcert', CERT='$tpem'," \ - "KEY='$tkey', MODE='$tmode', encrypt='$encrypt'" + wsrep_log_info "SSL configuration: CA='$tcert', CAPATH='$tcap'," \ + "CERT='$tpem', KEY='$tkey', MODE='$tmode'," \ + "encrypt='$encrypt'" sockopt=$(parse_cnf sst sockopt "") progress=$(parse_cnf sst progress "") @@ -561,7 +572,8 @@ read_cnf() sstlogarchivedir=$(parse_cnf sst sst-log-archive-dir '/tmp/sst_log_archive') if [ $speciald -eq 0 ]; then - wsrep_log_error "sst-special-dirs equal to 0 is not supported, falling back to 1" + wsrep_log_error \ + "sst-special-dirs equal to 0 is not supported, falling back to 1" speciald=1 fi @@ -589,7 +601,7 @@ get_stream() { if [ "$sfmt" = 'mbstream' -o "$sfmt" = 'xbstream' ]; then sfmt='mbstream' - STREAM_BIN="$(command -v mbstream)" + local STREAM_BIN=$(commandex "$sfmt") if [ -z "$STREAM_BIN" ]; then wsrep_log_error "Streaming with $sfmt, but $sfmt not found in path" exit 42 @@ -621,7 +633,7 @@ cleanup_at_exit() # Since this is invoked just after exit NNN local estatus=$? if [ $estatus -ne 0 ]; then - wsrep_log_error "Cleanup after exit with status:$estatus" + wsrep_log_error "Cleanup after exit with status: $estatus" fi if [ "$WSREP_SST_OPT_ROLE" = 'joiner' ]; then @@ -630,7 +642,8 @@ cleanup_at_exit() else if [ -n "$BACKUP_PID" ]; then if check_pid "$BACKUP_PID" 1; then - wsrep_log_error "mariabackup process is still running. Killing..." + wsrep_log_error \ + "mariabackup process is still running. Killing..." cleanup_pid $CHECK_PID "$BACKUP_PID" fi fi @@ -638,8 +651,8 @@ cleanup_at_exit() fi if [ -n "$progress" -a -p "$progress" ]; then - wsrep_log_info "Cleaning up fifo file $progress" - rm -f "$progress" || true + wsrep_log_info "Cleaning up fifo file: $progress" + rm -f "$progress" || : fi wsrep_log_info "Cleaning up temporary directories" @@ -649,8 +662,8 @@ cleanup_at_exit() [ -d "$STATDIR" ] && rm -rf "$STATDIR" fi else - [ -n "$xtmpdir" -a -d "$xtmpdir" ] && rm -rf "$xtmpdir" || true - [ -n "$itmpdir" -a -d "$itmpdir" ] && rm -rf "$itmpdir" || true + [ -n "$xtmpdir" -a -d "$xtmpdir" ] && rm -rf "$xtmpdir" || : + [ -n "$itmpdir" -a -d "$itmpdir" ] && rm -rf "$itmpdir" || : fi # Final cleanup @@ -662,7 +675,7 @@ cleanup_at_exit() # This means a signal was delivered to the process. # So, more cleanup. if [ $estatus -ge 128 ]; then - kill -KILL -- -$$ || true + kill -KILL -- -$$ || : fi fi @@ -738,7 +751,7 @@ recv_joiner() local ltcmd="$tcmd" if [ $tmt -gt 0 ]; then - if [ -n "$(command -v timeout)" ]; then + if [ -n "$(commandex timeout)" ]; then if timeout --help | grep -qw -- '-k'; then ltcmd="timeout -k $(( tmt+10 )) $tmt $tcmd" else @@ -760,14 +773,14 @@ recv_joiner() popd 1>/dev/null if [ ${RC[0]} -eq 124 ]; then - wsrep_log_error "Possible timeout in receiving first data from " \ + wsrep_log_error "Possible timeout in receiving first data from" \ "donor in gtid stage: exit codes: ${RC[@]}" exit 32 fi for ecode in "${RC[@]}"; do if [ $ecode -ne 0 ]; then - wsrep_log_error "Error while getting data from donor node: " \ + wsrep_log_error "Error while getting data from donor node:" \ "exit codes: ${RC[@]}" exit 32 fi @@ -776,7 +789,7 @@ recv_joiner() if [ $checkf -eq 1 ]; then if [ ! -r "$MAGIC_FILE" ]; then # this message should cause joiner to abort - wsrep_log_error "receiving process ended without creating " \ + wsrep_log_error "receiving process ended without creating" \ "'$MAGIC_FILE'" wsrep_log_info "Contents of datadir" wsrep_log_info $(ls -l "$dir/"*) @@ -784,10 +797,11 @@ recv_joiner() fi # check donor supplied secret - SECRET=$(grep -F -- "$SECRET_TAG " "$MAGIC_FILE" 2>/dev/null | cut -d ' ' -f 2) + SECRET=$(grep -F -- "$SECRET_TAG " "$MAGIC_FILE" 2>/dev/null | \ + cut -d ' ' -f 2) if [ "$SECRET" != "$MY_SECRET" ]; then wsrep_log_error "Donor does not know my secret!" - wsrep_log_info "Donor:'$SECRET', my:'$MY_SECRET'" + wsrep_log_info "Donor: '$SECRET', my: '$MY_SECRET'" exit 32 fi @@ -810,7 +824,7 @@ send_donor() for ecode in "${RC[@]}"; do if [ $ecode -ne 0 ]; then - wsrep_log_error "Error while sending data to joiner node: " \ + wsrep_log_error "Error while sending data to joiner node:" \ "exit codes: ${RC[@]}" exit 32 fi @@ -823,7 +837,9 @@ monitor_process() while true ; do if ! ps -p "$WSREP_SST_OPT_PARENT" >/dev/null 2>&1; then - wsrep_log_error "Parent mysqld process (PID: $WSREP_SST_OPT_PARENT) terminated unexpectedly." + wsrep_log_error \ + "Parent mysqld process (PID: $WSREP_SST_OPT_PARENT)" \ + "terminated unexpectedly." kill -- -"$WSREP_SST_OPT_PARENT" exit 32 fi @@ -845,7 +861,7 @@ read_cnf setup_ports if "$BACKUP_BIN" --help 2>/dev/null | grep -qw -- '--version-check'; then - disver='--no-version-check' + disver=' --no-version-check' fi # if no command line argument and INNODB_DATA_HOME_DIR environment variable @@ -867,7 +883,7 @@ INNODB_DATA_HOME_DIR=$(pwd -P) cd "$OLD_PWD" if [ $ssyslog -eq 1 ]; then - if [ -n "$(command -v logger)" ]; then + if [ -n "$(commandex logger)" ]; then wsrep_log_info "Logging all stderr of SST/mariabackup to syslog" exec 2> >(logger -p daemon.err -t ${ssystag}wsrep-sst-$WSREP_SST_OPT_ROLE) @@ -898,10 +914,8 @@ else fi fi - if [ -e "$INNOAPPLYLOG" ] - then - if [ -n "$sstlogarchivedir" ] - then + if [ -e "$INNOAPPLYLOG" ]; then + if [ -n "$sstlogarchivedir" ]; then newfile=$(basename "$INNOAPPLYLOG") newfile="$sstlogarchivedir/$newfile.$ARCHIVETIMESTAMP" else @@ -912,10 +926,8 @@ else gzip "$newfile" fi - if [ -e "$INNOMOVELOG" ] - then - if [ -n "$sstlogarchivedir" ] - then + if [ -e "$INNOMOVELOG" ]; then + if [ -n "$sstlogarchivedir" ]; then newfile=$(basename "$INNOMOVELOG") newfile="$sstlogarchivedir/$newfile.$ARCHIVETIMESTAMP" else @@ -926,10 +938,8 @@ else gzip "$newfile" fi - if [ -e "$INNOBACKUPLOG" ] - then - if [ -n "$sstlogarchivedir" ] - then + if [ -e "$INNOBACKUPLOG" ]; then + if [ -n "$sstlogarchivedir" ]; then newfile=$(basename "$INNOBACKUPLOG") newfile="$sstlogarchivedir/$newfile.$ARCHIVETIMESTAMP" else @@ -949,15 +959,15 @@ setup_commands() { local mysqld_args="" if [ -n "$WSREP_SST_OPT_MYSQLD" ]; then - mysqld_args="--mysqld-args $WSREP_SST_OPT_MYSQLD" + mysqld_args=" --mysqld-args $WSREP_SST_OPT_MYSQLD" fi - if [ -z "$INNODB_FORCE_RECOVERY" ]; then - INNOAPPLY="$BACKUP_BIN --prepare $disver $iapts $INNOEXTRA --target-dir='$DATA' --datadir='$DATA' $mysqld_args $INNOAPPLY" - else - INNOAPPLY="$BACKUP_BIN --prepare $disver $iapts $INNOEXTRA --innodb-force-recovery=$INNODB_FORCE_RECOVERY --target-dir='$DATA' --datadir='$DATA' $mysqld_args $INNOAPPLY" + local recovery="" + if [ -n "$INNODB_FORCE_RECOVERY" ]; then + recovery=" --innodb-force-recovery=$INNODB_FORCE_RECOVERY" fi - INNOMOVE="$BACKUP_BIN $WSREP_SST_OPT_CONF --move-back $disver $impts --force-non-empty-directories --target-dir='$DATA' --datadir='${TDATA:-$DATA}' $INNOMOVE" - INNOBACKUP="$BACKUP_BIN $WSREP_SST_OPT_CONF --backup $disver $iopts $tmpopts $INNOEXTRA --galera-info --stream=$sfmt --target-dir='$itmpdir' --datadir='$DATA' $mysqld_args $INNOBACKUP" + INNOAPPLY="$BACKUP_BIN --prepare$disver$recovery${iapts:+ }$iapts$INNOEXTRA --target-dir='$DATA' --datadir='$DATA'$mysqld_args $INNOAPPLY" + INNOMOVE="$BACKUP_BIN$WSREP_SST_OPT_CONF --move-back$disver${impts:+ }$impts --force-non-empty-directories --target-dir='$DATA' --datadir='${TDATA:-$DATA}' $INNOMOVE" + INNOBACKUP="$BACKUP_BIN$WSREP_SST_OPT_CONF --backup$disver${iopts:+ }$iopts $tmpopts$INNOEXTRA --galera-info --stream=$sfmt --target-dir='$itmpdir' --datadir='$DATA'$mysqld_args $INNOBACKUP" } get_stream @@ -1055,27 +1065,28 @@ then tcmd="$ecmd | $tcmd" fi - iopts="--databases-exclude='lost+found' $iopts" + iopts="--databases-exclude='lost+found'${iopts:+ }$iopts" if [ ${FORCE_FTWRL:-0} -eq 1 ]; then - wsrep_log_info "Forcing FTWRL due to environment variable FORCE_FTWRL equal to $FORCE_FTWRL" - iopts="--no-backup-locks $iopts" + wsrep_log_info "Forcing FTWRL due to environment variable" \ + "FORCE_FTWRL equal to $FORCE_FTWRL" + iopts="--no-backup-locks${iopts:+ }$iopts" fi # if compression is enabled for backup files, then add the # appropriate options to the mariabackup command line: if [ "$compress" != 'none' ]; then - iopts="--compress${compress:+=$compress} $iopts" + iopts="--compress${compress:+=$compress}${iopts:+ }$iopts" if [ -n "$compress_threads" ]; then - iopts="--compress-threads=$compress_threads $iopts" + iopts="--compress-threads=$compress_threads${iopts:+ }$iopts" fi if [ -n "$compress_chunk" ]; then - iopts="--compress-chunk-size=$compress_chunk $iopts" + iopts="--compress-chunk-size=$compress_chunk${iopts:+ }$iopts" fi fi if [ -n "$backup_threads" ]; then - iopts="--parallel=$backup_threads $iopts" + iopts="--parallel=$backup_threads${iopts:+ }$iopts" fi setup_commands @@ -1084,7 +1095,7 @@ then set -e if [ ${RC[0]} -ne 0 ]; then - wsrep_log_error "mariabackup finished with error: ${RC[0]}. " \ + wsrep_log_error "mariabackup finished with error: ${RC[0]}." \ "Check syslog or '$INNOBACKUPLOG' for details" exit 22 elif [ ${RC[$(( ${#RC[@]}-1 ))]} -eq 1 ]; then @@ -1125,7 +1136,8 @@ then elif [ "$WSREP_SST_OPT_ROLE" = 'joiner' ] then - [ -e "$SST_PROGRESS_FILE" ] && wsrep_log_info "Stale sst_in_progress file: $SST_PROGRESS_FILE" + [ -e "$SST_PROGRESS_FILE" ] && \ + wsrep_log_info "Stale sst_in_progress file: $SST_PROGRESS_FILE" [ -n "$SST_PROGRESS_FILE" ] && touch "$SST_PROGRESS_FILE" ib_home_dir="$INNODB_DATA_HOME_DIR" @@ -1146,7 +1158,7 @@ then ib_undo_dir="$INNODB_UNDO_DIR" if [ -n "$backup_threads" ]; then - impts="--parallel=$backup_threads $impts" + impts="--parallel=$backup_threads${impts:+ }$impts" fi stagemsg='Joiner-Recv' @@ -1165,15 +1177,15 @@ then ADDR="$WSREP_SST_OPT_ADDR" - if [ "${tmode#VERIFY}" != "$tmode" ] - then # backward-incompatible behavior + if [ "${tmode#VERIFY}" != "$tmode" ]; then + # backward-incompatible behavior: CN="" - if [ -n "$tpem" ] - then + if [ -n "$tpem" ]; then # find out my Common Name get_openssl if [ -z "$OPENSSL_BINARY" ]; then - wsrep_log_error 'openssl not found but it is required for authentication' + wsrep_log_error \ + 'openssl not found but it is required for authentication' exit 42 fi CN=$("$OPENSSL_BINARY" x509 -noout -subject -in "$tpem" | \ @@ -1213,15 +1225,17 @@ then if ! ps -p "$WSREP_SST_OPT_PARENT" >/dev/null 2>&1 then - wsrep_log_error "Parent mysqld process (PID: $WSREP_SST_OPT_PARENT) terminated unexpectedly." + wsrep_log_error "Parent mysqld process (PID: $WSREP_SST_OPT_PARENT)" \ + "terminated unexpectedly." exit 32 fi - if [ ! -r "$STATDIR/$IST_FILE" ] - then + if [ ! -r "$STATDIR/$IST_FILE" ]; then if [ -d "$DATA/.sst" ]; then - wsrep_log_info "WARNING: Stale temporary SST directory: '$DATA/.sst' from previous state transfer. Removing" + wsrep_log_info \ + "WARNING: Stale temporary SST directory:" \ + "'$DATA/.sst' from previous state transfer, removing..." rm -rf "$DATA/.sst" fi mkdir -p "$DATA/.sst" @@ -1229,17 +1243,20 @@ then jpid=$! wsrep_log_info "Proceeding with SST" - wsrep_log_info "Cleaning the existing datadir and innodb-data/log directories" + wsrep_log_info \ + "Cleaning the existing datadir and innodb-data/log directories" if [ "$OS" = 'FreeBSD' ]; then find -E ${ib_home_dir:+"$ib_home_dir"} \ ${ib_undo_dir:+"$ib_undo_dir"} \ ${ib_log_dir:+"$ib_log_dir"} \ - "$DATA" -mindepth 1 -prune -regex "$cpat" -o -exec rm -rfv {} 1>&2 \+ + "$DATA" -mindepth 1 -prune -regex "$cpat" \ + -o -exec rm -rfv {} 1>&2 \+ else find ${ib_home_dir:+"$ib_home_dir"} \ ${ib_undo_dir:+"$ib_undo_dir"} \ ${ib_log_dir:+"$ib_log_dir"} \ - "$DATA" -mindepth 1 -prune -regex "$cpat" -o -exec rm -rfv {} 1>&2 \+ + "$DATA" -mindepth 1 -prune -regex "$cpat" \ + -o -exec rm -rfv {} 1>&2 \+ fi get_binlog @@ -1248,9 +1265,9 @@ then binlog_dir=$(dirname "$WSREP_SST_OPT_BINLOG") cd "$binlog_dir" wsrep_log_info "Cleaning the binlog directory $binlog_dir as well" - rm -fv "$WSREP_SST_OPT_BINLOG".[0-9]* 1>&2 \+ || true + rm -fv "$WSREP_SST_OPT_BINLOG".[0-9]* 1>&2 \+ || : [ -f "$WSREP_SST_OPT_BINLOG_INDEX" ] && \ - rm -fv "$WSREP_SST_OPT_BINLOG_INDEX" 1>&2 \+ || true + rm -fv "$WSREP_SST_OPT_BINLOG_INDEX" 1>&2 \+ || : cd "$OLD_PWD" fi @@ -1262,7 +1279,8 @@ then monitor_process $jpid if [ ! -s "$DATA/xtrabackup_checkpoints" ]; then - wsrep_log_error "xtrabackup_checkpoints missing, failed mariabackup/SST on donor" + wsrep_log_error "xtrabackup_checkpoints missing," \ + "failed mariabackup/SST on donor" exit 2 fi @@ -1277,7 +1295,7 @@ then if [ -n "$qpfiles" ]; then wsrep_log_info "Compressed qpress files found" - if [ -z "$(command -v qpress)" ]; then + if [ -z "$(commandex qpress)" ]; then wsrep_log_error "qpress utility not found in the path" exit 22 fi @@ -1300,14 +1318,17 @@ then # Decompress the qpress files wsrep_log_info "Decompression with $nproc threads" - timeit "Joiner-Decompression" "find '$DATA' -type f -name '*.qp' -printf '%p\n%h\n' | $dcmd" + timeit "Joiner-Decompression" \ + "find '$DATA' -type f -name '*.qp' -printf '%p\n%h\n' | $dcmd" extcode=$? if [ $extcode -eq 0 ]; then wsrep_log_info "Removing qpress files after decompression" find "$DATA" -type f -name '*.qp' -delete if [ $? -ne 0 ]; then - wsrep_log_error "Something went wrong with deletion of qpress files. Investigate" + wsrep_log_error \ + "Something went wrong with deletion of qpress files." \ + "Investigate" fi else wsrep_log_error "Decompression failed. Exit code: $extcode" @@ -1321,7 +1342,7 @@ then BINLOG_FILENAME=$(basename "$WSREP_SST_OPT_BINLOG") # To avoid comparing data directory and BINLOG_DIRNAME - mv "$DATA/$BINLOG_FILENAME".* "$BINLOG_DIRNAME/" 2>/dev/null || true + mv "$DATA/$BINLOG_FILENAME".* "$BINLOG_DIRNAME/" 2>/dev/null || : cd "$BINLOG_DIRNAME" for bfile in $(ls -1 "$BINLOG_FILENAME".[0-9]*); do @@ -1336,7 +1357,8 @@ then timeit "mariabackup prepare stage" "$INNOAPPLY" if [ $? -ne 0 ]; then - wsrep_log_error "mariabackup apply finished with errors. Check syslog or '$INNOAPPLYLOG' for details" + wsrep_log_error "mariabackup apply finished with errors." \ + "Check syslog or '$INNOAPPLYLOG' for details." exit 22 fi diff --git a/scripts/wsrep_sst_mysqldump.sh b/scripts/wsrep_sst_mysqldump.sh index 798bee1ac100d..bed2cac0a9a9d 100644 --- a/scripts/wsrep_sst_mysqldump.sh +++ b/scripts/wsrep_sst_mysqldump.sh @@ -19,7 +19,6 @@ # This is a reference script for mysqldump-based state snapshot tansfer . $(dirname "$0")/wsrep_sst_common -PATH=$PATH:/usr/sbin:/usr/bin:/sbin:/bin EINVAL=22 @@ -93,8 +92,7 @@ DROP PREPARE stmt;" SET_START_POSITION="SET GLOBAL wsrep_start_position='$WSREP_SST_OPT_GTID';" SET_WSREP_GTID_DOMAIN_ID="" -if [ -n $WSREP_SST_OPT_GTID_DOMAIN_ID ] -then +if [ -n $WSREP_SST_OPT_GTID_DOMAIN_ID ]; then SET_WSREP_GTID_DOMAIN_ID=" SET @val = (SELECT GLOBAL_VALUE FROM INFORMATION_SCHEMA.SYSTEM_VARIABLES WHERE VARIABLE_NAME = 'WSREP_GTID_STRICT_MODE' AND GLOBAL_VALUE > 0); SET @stmt = IF (@val IS NOT NULL, 'SET GLOBAL WSREP_GTID_DOMAIN_ID=$WSREP_SST_OPT_GTID_DOMAIN_ID', 'SET @dummy = 0'); @@ -103,7 +101,7 @@ then DROP PREPARE stmt;" fi -MYSQL="$MYSQL_CLIENT $WSREP_SST_OPT_CONF_UNQUOTED "\ +MYSQL="$MYSQL_CLIENT$WSREP_SST_OPT_CONF_UNQUOTED "\ "$AUTH -h$WSREP_SST_OPT_HOST_UNESCAPED "\ "-P$WSREP_SST_OPT_PORT --disable-reconnect --connect_timeout=10" @@ -125,8 +123,7 @@ SET_GTID_BINLOG_STATE="" SQL_LOG_BIN_OFF="" # Safety check -if [ ${SERVER_VERSION%%.*} -gt 5 ] -then +if [ ${SERVER_VERSION%%.*} -gt 5 ]; then # If binary logging is enabled on the joiner node, we need to copy donor's # gtid_binlog_state to joiner. In order to do that, a RESET MASTER must be # executed to erase binary logs (if any). Binary logging should also be @@ -140,7 +137,7 @@ then fi # NOTE: we don't use --routines here because we're dumping mysql.proc table -MYSQLDUMP="$MYSQLDUMP $WSREP_SST_OPT_CONF_UNQUOTED $AUTH -S$WSREP_SST_OPT_SOCKET \ +MYSQLDUMP="$MYSQLDUMP$WSREP_SST_OPT_CONF_UNQUOTED $AUTH -S$WSREP_SST_OPT_SOCKET \ --add-drop-database --add-drop-table --skip-add-locks --create-options \ --disable-keys --extended-insert --skip-lock-tables --quick --set-charset \ --skip-comments --flush-privileges --all-databases --events" diff --git a/scripts/wsrep_sst_rsync.sh b/scripts/wsrep_sst_rsync.sh index 29c9cd4347026..b0cc8cb30664d 100644 --- a/scripts/wsrep_sst_rsync.sh +++ b/scripts/wsrep_sst_rsync.sh @@ -25,9 +25,6 @@ STUNNEL_REAL_PID=0 # stunnel process id OS="$(uname)" [ "$OS" = 'Darwin' ] && export -n LD_LIBRARY_PATH -# Setting the path for lsof on CentOS -export PATH="/usr/sbin:/sbin:$PATH" - . $(dirname "$0")/wsrep_sst_common wsrep_check_datadir @@ -37,7 +34,8 @@ cleanup_joiner() { local failure=0 - wsrep_log_info "Joiner cleanup: rsync PID=$RSYNC_REAL_PID, stunnel PID=$STUNNEL_REAL_PID" + wsrep_log_info "Joiner cleanup: rsync PID=$RSYNC_REAL_PID," \ + "stunnel PID=$STUNNEL_REAL_PID" if [ -n "$STUNNEL" ]; then if cleanup_pid $STUNNEL_REAL_PID "$STUNNEL_PID" "$STUNNEL_CONF"; then @@ -87,7 +85,7 @@ check_pid_and_port() if [ $lsof_available -ne 0 ]; then port_info=$(lsof -Pnl -i ":$port" 2>/dev/null | \ - grep -F '(LISTEN)') + grep -F '(LISTEN)') echo "$port_info" | \ grep -q -E "[[:space:]](\\*|\\[?::\\]?):$port[[:space:]]" && busy=1 else @@ -124,7 +122,7 @@ check_pid_and_port() fi if ! check_port "$pid" "$port" "$utils"; then - wsrep_log_error "rsync or stunnel daemon port '$port' " \ + wsrep_log_error "rsync or stunnel daemon port '$port'" \ "has been taken by another program" exit 16 # EBUSY fi @@ -223,6 +221,7 @@ FILTER="-f '- /lost+found' SSTKEY=$(parse_cnf 'sst' 'tkey') SSTCERT=$(parse_cnf 'sst' 'tcert') SSTCA=$(parse_cnf 'sst' 'tca') +SSTCAP=$(parse_cnf 'sst' 'tcapath') SST_SECTIONS="--mysqld|sst" @@ -231,28 +230,34 @@ check_server_ssl_config() SSTKEY=$(parse_cnf "$SST_SECTIONS" 'ssl-key') SSTCERT=$(parse_cnf "$SST_SECTIONS" 'ssl-cert') SSTCA=$(parse_cnf "$SST_SECTIONS" 'ssl-ca') + SSTCAP=$(parse_cnf "$SST_SECTIONS" 'ssl-capath') } SSLMODE=$(parse_cnf "$SST_SECTIONS" 'ssl-mode' | tr [:lower:] [:upper:]) # no old-style SSL config in [sst], check for new one: -if [ -z "$SSTKEY" -a -z "$SSTCERT" -a -z "$SSTCA" ]; then +if [ -z "$SSTKEY" -a -z "$SSTCERT" -a -z "$SSTCA" -a -z "$SSTCAP" ]; then check_server_ssl_config fi -SSTPATH=0 if [ -n "$SSTCA" ]; then - SSTCA=$(trim_string "$SSTCA") - if [ "${SSTCA%/}" != "$SSTCA" ]; then - SSTPATH=1 - fi + SSTCA=$(trim_string "$SSTCA") + if [ "${SSTCA%/}" != "$SSTCA" ] || [ -d "$SSTCA" ]; then + SSTCAP="$SSTCA" + SSTCA="" + fi +fi + +if [ -n "$SSTCAP" ]; then + SSTCAP=$(trim_string "$SSTCAP") fi if [ -z "$SSLMODE" ]; then # Implicit verification if CA is set and the SSL mode # is not specified by user: - if [ -n "$SSTCA" ]; then - if [ -n "$(command -v stunnel)" ]; then + if [ -n "$SSTCA$SSTCAP" ]; then + STUNNEL_BIN=$(commandex 'stunnel') + if [ -n "$STUNNEL_BIN" ]; then SSLMODE='VERIFY_CA' fi # Require SSL by default if SSL key and cert are present: @@ -265,17 +270,18 @@ if [ -n "$SSTCERT" -a -n "$SSTKEY" ]; then verify_cert_matches_key "$SSTCERT" "$SSTKEY" fi -if [ -n "$SSTCA" ]; then - if [ $SSTPATH -eq 0 ]; then +CAFILE_OPT="" +CAPATH_OPT="" +if [ -n "$SSTCA$SSTCAP" ]; then + if [ -n "$SSTCA" ]; then CAFILE_OPT="CAfile = $SSTCA" - else - CAFILE_OPT="CApath = $SSTCA" + fi + if [ -n "$SSTCAP" ]; then + CAPATH_OPT="CApath = $SSTCAP" fi if [ -n "$SSTCERT" ]; then - verify_ca_matches_cert "$SSTCA" "$SSTCERT" $SSTPATH + verify_ca_matches_cert "$SSTCERT" "$SSTCA" "$SSTCAP" fi -else - CAFILE_OPT="" fi VERIFY_OPT="" @@ -295,7 +301,7 @@ then exit 22 # EINVAL ;; esac - if [ -z "$SSTCA" ]; then + if [ -z "$SSTCA$SSTCAP" ]; then wsrep_log_error "Can't have ssl-mode='$SSLMODE' without CA file or path" exit 22 # EINVAL fi @@ -318,9 +324,12 @@ fi STUNNEL="" if [ -n "$SSLMODE" -a "$SSLMODE" != 'DISABLED' ]; then - STUNNEL_BIN="$(command -v stunnel)" + if [ -z "${STUNNEL_BIN+x}" ]; then + STUNNEL_BIN=$(commandex 'stunnel') + fi if [ -n "$STUNNEL_BIN" ]; then - wsrep_log_info "Using stunnel for SSL encryption: CA: '$SSTCA', ssl-mode='$SSLMODE'" + wsrep_log_info "Using stunnel for SSL encryption: CA: '$SSTCA'," \ + "CAPATH='$SSTCAP', ssl-mode='$SSLMODE'" STUNNEL="$STUNNEL_BIN $STUNNEL_CONF" fi fi @@ -340,6 +349,7 @@ then key = $SSTKEY cert = $SSTCERT ${CAFILE_OPT} +${CAPATH_OPT} foreground = yes pid = $STUNNEL_PID debug = warning @@ -392,8 +402,8 @@ EOF # Prepare binlog files cd "$BINLOG_DIRNAME" - binlog_files_full=$(tail -n $BINLOG_N_FILES "$WSREP_SST_OPT_BINLOG_INDEX") - + binlog_files_full=$(tail -n $BINLOG_N_FILES \ + "$WSREP_SST_OPT_BINLOG_INDEX") binlog_files="" for ii in $binlog_files_full do @@ -417,9 +427,10 @@ EOF WHOLE_FILE_OPT="--whole-file" fi - # first, the normal directories, so that we can detect incompatible protocol + # first, the normal directories, so that we can detect + # incompatible protocol: RC=0 - eval rsync ${STUNNEL:+"'--rsh=$STUNNEL'"} \ + eval rsync ${STUNNEL:+"--rsh='$STUNNEL'"} \ --owner --group --perms --links --specials \ --ignore-times --inplace --dirs --delete --quiet \ $WHOLE_FILE_OPT $FILTER "'$WSREP_SST_OPT_DATA/'" \ @@ -430,8 +441,9 @@ EOF case $RC in 12) RC=71 # EPROTO wsrep_log_error \ - "rsync server on the other end has incompatible protocol. " \ - "Make sure you have the same version of rsync on all nodes." + "rsync server on the other end has incompatible" \ + "protocol. Make sure you have the same version of" \ + "rsync on all nodes." ;; 22) RC=12 # ENOMEM ;; @@ -481,9 +493,9 @@ EOF find . -maxdepth 1 -mindepth 1 -type d -not -name 'lost+found' \ -not -name '.zfs' -print0 | xargs -I{} -0 -P $backup_threads \ rsync ${STUNNEL:+--rsh="$STUNNEL"} \ - --owner --group --perms --links --specials \ - --ignore-times --inplace --recursive --delete --quiet \ - $WHOLE_FILE_OPT --exclude '*/ib_logfile*' --exclude '*/aria_log.*' \ + --owner --group --perms --links --specials --ignore-times \ + --inplace --recursive --delete --quiet $WHOLE_FILE_OPT \ + --exclude '*/ib_logfile*' --exclude '*/aria_log.*' \ --exclude '*/aria_log_control' "$WSREP_SST_OPT_DATA/{}/" \ "rsync://$WSREP_SST_OPT_ADDR/{}" >&2 || RC=$? @@ -514,7 +526,8 @@ EOF fi rsync ${STUNNEL:+--rsh="$STUNNEL"} \ - --archive --quiet --checksum "$MAGIC_FILE" "rsync://$WSREP_SST_OPT_ADDR" + --archive --quiet --checksum "$MAGIC_FILE" \ + "rsync://$WSREP_SST_OPT_ADDR" echo "done $STATE" @@ -546,7 +559,8 @@ then check_round=0 while check_pid "$STUNNEL_PID" 1 do - wsrep_log_info "lingering stunnel daemon found at startup, waiting for it to exit" + wsrep_log_info "Lingering stunnel daemon found at startup," \ + "waiting for it to exit" check_round=$(( check_round + 1 )) if [ $check_round -eq 10 ]; then wsrep_log_error "stunnel daemon already running." @@ -563,7 +577,8 @@ then check_round=0 while check_pid "$RSYNC_PID" 1 do - wsrep_log_info "lingering rsync daemon found at startup, waiting for it to exit" + wsrep_log_info "Lingering rsync daemon found at startup," \ + "waiting for it to exit" check_round=$(( check_round + 1 )) if [ $check_round -eq 10 ]; then wsrep_log_error "rsync daemon already running." @@ -575,9 +590,7 @@ then [ -f "$MAGIC_FILE" ] && rm -f "$MAGIC_FILE" [ -f "$BINLOG_TAR_FILE" ] && rm -f "$BINLOG_TAR_FILE" - if [ -z "$STUNNEL" ]; then - [ -f "$STUNNEL_CONF" ] && rm -f "$STUNNEL_CONF" - fi + [ -z "$STUNNEL" ] && [ -f "$STUNNEL_CONF" ] && rm -f "$STUNNEL_CONF" ADDR="$WSREP_SST_OPT_ADDR" RSYNC_PORT="$WSREP_SST_OPT_PORT" @@ -628,19 +641,21 @@ EOF echo $$ > "$SST_PID" - if [ -z "$STUNNEL" ] - then - rsync --daemon --no-detach --port "$RSYNC_PORT" --config "$RSYNC_CONF" $RSYNC_EXTRA_ARGS & + if [ -z "$STUNNEL" ]; then + rsync --daemon --no-detach --port "$RSYNC_PORT" \ + --config "$RSYNC_CONF" $RSYNC_EXTRA_ARGS & RSYNC_REAL_PID=$! TRANSFER_REAL_PID=$RSYNC_REAL_PID TRANSFER_PID="$RSYNC_PID" else # Let's check if the path to the config file contains a space? + RSYNC_BIN=$(commandex 'rsync') if [ "${RSYNC_CONF#* }" = "$RSYNC_CONF" ]; then cat << EOF > "$STUNNEL_CONF" key = $SSTKEY cert = $SSTCERT ${CAFILE_OPT} +${CAPATH_OPT} foreground = yes pid = $STUNNEL_PID debug = warning @@ -650,17 +665,18 @@ ${CHECK_OPT} ${CHECK_OPT_LOCAL} [rsync] accept = $STUNNEL_ACCEPT -exec = $(command -v rsync) +exec = $RSYNC_BIN execargs = rsync --server --daemon --config=$RSYNC_CONF . EOF else # The path contains a space, so we will run it via # shell with "eval" command: - export RSYNC_CMD="eval $(command -v rsync) --server --daemon --config='$RSYNC_CONF' ." + export RSYNC_CMD="eval '$RSYNC_BIN' --server --daemon --config='$RSYNC_CONF' ." cat << EOF > "$STUNNEL_CONF" key = $SSTKEY cert = $SSTCERT ${CAFILE_OPT} +${CAPATH_OPT} foreground = yes pid = $STUNNEL_PID debug = warning @@ -688,7 +704,8 @@ EOF # find out my Common Name get_openssl if [ -z "$OPENSSL_BINARY" ]; then - wsrep_log_error 'openssl not found but it is required for authentication' + wsrep_log_error \ + 'openssl not found but it is required for authentication' exit 42 fi CN=$("$OPENSSL_BINARY" x509 -noout -subject -in "$SSTCERT" | \ @@ -703,7 +720,8 @@ EOF ADDR="$WSREP_SST_OPT_HOST" fi - until check_pid_and_port "$TRANSFER_PID" $TRANSFER_REAL_PID "$RSYNC_ADDR_UNESCAPED" "$RSYNC_PORT" + until check_pid_and_port "$TRANSFER_PID" $TRANSFER_REAL_PID \ + "$RSYNC_ADDR_UNESCAPED" "$RSYNC_PORT" do sleep 0.2 done @@ -722,7 +740,7 @@ EOF if ! ps -p $MYSQLD_PID >/dev/null 2>&1 then wsrep_log_error \ - "Parent mysqld process (PID: $MYSQLD_PID) terminated unexpectedly." + "Parent mysqld process (PID: $MYSQLD_PID) terminated unexpectedly." kill -- -$MYSQLD_PID sleep 1 exit 32 @@ -768,10 +786,11 @@ EOF if [ -r "$MAGIC_FILE" ]; then if [ -n "$MY_SECRET" ]; then # check donor supplied secret - SECRET=$(grep -F -- "$SECRET_TAG " "$MAGIC_FILE" 2>/dev/null | cut -d ' ' -f 2) + SECRET=$(grep -F -- "$SECRET_TAG " "$MAGIC_FILE" 2>/dev/null | \ + cut -d ' ' -f 2) if [ "$SECRET" != "$MY_SECRET" ]; then wsrep_log_error "Donor does not know my secret!" - wsrep_log_info "Donor:'$SECRET', my:'$MY_SECRET'" + wsrep_log_info "Donor: '$SECRET', my: '$MY_SECRET'" exit 32 fi # remove secret from the magic file, and output diff --git a/vio/viosslfactories.c b/vio/viosslfactories.c index d9fcc942a7173..fbf75729cc62b 100644 --- a/vio/viosslfactories.c +++ b/vio/viosslfactories.c @@ -232,6 +232,12 @@ new_VioSSLFd(const char *key_file, const char *cert_file, struct st_VioSSLFd *ssl_fd; long ssl_ctx_options; DBUG_ENTER("new_VioSSLFd"); + + if (ca_file && ! ca_file[0]) ca_file = NULL; + if (ca_path && ! ca_path[0]) ca_path = NULL; + if (crl_file && ! crl_file[0]) crl_file = NULL; + if (crl_path && ! crl_path[0]) crl_path = NULL; + DBUG_PRINT("enter", ("key_file: '%s' cert_file: '%s' ca_file: '%s' ca_path: '%s' " "cipher: '%s' crl_file: '%s' crl_path: '%s'", @@ -379,6 +385,11 @@ new_VioSSLConnectorFd(const char *key_file, const char *cert_file, struct st_VioSSLFd *ssl_fd; int verify= SSL_VERIFY_PEER; + if (ca_file && ! ca_file[0]) ca_file = NULL; + if (ca_path && ! ca_path[0]) ca_path = NULL; + if (crl_file && ! crl_file[0]) crl_file = NULL; + if (crl_path && ! crl_path[0]) crl_path = NULL; + /* Turn off verification of servers certificate if both ca_file and ca_path is set to NULL @@ -411,6 +422,12 @@ new_VioSSLAcceptorFd(const char *key_file, const char *cert_file, { struct st_VioSSLFd *ssl_fd; int verify= SSL_VERIFY_PEER | SSL_VERIFY_CLIENT_ONCE; + + if (ca_file && ! ca_file[0]) ca_file = NULL; + if (ca_path && ! ca_path[0]) ca_path = NULL; + if (crl_file && ! crl_file[0]) crl_file = NULL; + if (crl_path && ! crl_path[0]) crl_path = NULL; + if (!(ssl_fd= new_VioSSLFd(key_file, cert_file, ca_file, ca_path, cipher, FALSE, error, crl_file, crl_path, tls_version))) From 30bf0bca8f16447ebd04e4743353b1cbf999c9cc Mon Sep 17 00:00:00 2001 From: Julius Goryavsky Date: Tue, 14 Dec 2021 03:47:59 +0100 Subject: [PATCH 19/65] MDEV-27181: Galera SST scripts should use ssl_capath for CA directory 1. Galera SST scripts should use ssl_capath (not ssl_ca) for CA directory. The current implementation tries to automatically detect the path using the trailing slash in the ssl_ca variable value, but this approach is not compatible with the server configuration. Now, by analogy with the server, SST scripts also use a separate ssl_capath variable. In addition, a similar tcapath variable has been added for the old-style configuration (in the "sst" section). 2. Openssl utility detection made more reliable. 3. Removed extra spaces in automatically generated command lines - to simplify debugging of the SST scripts. 4. In general, the code for detecting the presence or absence of auxiliary utilities has been improved - it is made more reliable in some configurations (and for shells other than bash). --- mysql-test/std_data/capath/3106f582.0 | 1 + mysql-test/std_data/capath/cacert.pem | 79 +++ mysql-test/std_data/capath/ed1f42db.0 | 1 + ..._sst_rsync_encrypt_with_capath,debug.rdiff | 191 +++++++ ...alera_sst_rsync_encrypt_with_capath.result | 520 ++++++++++++++++++ .../galera_sst_rsync_encrypt_with_key.result | 2 - ...alera_sst_rsync_encrypt_with_server.result | 2 - .../galera_sst_mariabackup_table_options.test | 1 + .../galera_sst_rsync_encrypt_with_capath.cnf | 20 + .../galera_sst_rsync_encrypt_with_capath.test | 26 + .../t/galera_sst_rsync_encrypt_with_key.test | 3 - .../galera_sst_rsync_encrypt_with_server.test | 3 - .../t/galera_ipv6_mariabackup.test | 1 + .../t/galera_ipv6_mariabackup_section.test | 1 + scripts/wsrep_sst_common.sh | 142 +++-- scripts/wsrep_sst_mariabackup.sh | 292 +++++----- scripts/wsrep_sst_mysqldump.sh | 11 +- scripts/wsrep_sst_rsync.sh | 117 ++-- vio/viosslfactories.c | 17 + 19 files changed, 1172 insertions(+), 258 deletions(-) create mode 120000 mysql-test/std_data/capath/3106f582.0 create mode 100644 mysql-test/std_data/capath/cacert.pem create mode 120000 mysql-test/std_data/capath/ed1f42db.0 create mode 100644 mysql-test/suite/galera/r/galera_sst_rsync_encrypt_with_capath,debug.rdiff create mode 100644 mysql-test/suite/galera/r/galera_sst_rsync_encrypt_with_capath.result create mode 100644 mysql-test/suite/galera/t/galera_sst_rsync_encrypt_with_capath.cnf create mode 100644 mysql-test/suite/galera/t/galera_sst_rsync_encrypt_with_capath.test diff --git a/mysql-test/std_data/capath/3106f582.0 b/mysql-test/std_data/capath/3106f582.0 new file mode 120000 index 0000000000000..1310cfcff205a --- /dev/null +++ b/mysql-test/std_data/capath/3106f582.0 @@ -0,0 +1 @@ +cacert.pem \ No newline at end of file diff --git a/mysql-test/std_data/capath/cacert.pem b/mysql-test/std_data/capath/cacert.pem new file mode 100644 index 0000000000000..23dda2318e150 --- /dev/null +++ b/mysql-test/std_data/capath/cacert.pem @@ -0,0 +1,79 @@ +Certificate: + Data: + Version: 3 (0x2) + Serial Number: + d0:4d:23:85:ee:59:b3:fa + Signature Algorithm: sha256WithRSAEncryption + Issuer: CN=cacert, C=FI, ST=Helsinki, L=Helsinki, O=MariaDB + Validity + Not Before: Jan 27 10:11:10 2019 GMT + Not After : Jan 22 10:11:10 2039 GMT + Subject: CN=cacert, C=FI, ST=Helsinki, L=Helsinki, O=MariaDB + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + Public-Key: (2048 bit) + Modulus: + 00:e8:0e:a7:84:d3:75:30:06:30:b2:10:b9:d1:88: + 36:2b:5e:f8:c8:44:57:cb:67:72:ab:96:95:33:d5: + 88:d1:8f:23:50:98:ba:6d:20:00:80:bd:35:d5:c1: + bf:98:49:c4:0a:15:4a:34:a6:21:9b:2e:8c:15:09: + f0:63:81:02:c2:7c:e2:53:e0:f7:a1:1a:40:5e:8f: + 41:4a:4c:56:d4:20:f1:d5:a7:c1:53:2e:ff:7e:37: + 17:cc:7e:74:bd:e2:22:33:ce:8c:77:62:a4:c5:3f: + 44:35:7b:7e:b9:f5:7d:8c:7a:27:58:fd:2c:42:86: + 2e:e7:6b:01:99:7b:fe:7d:a7:a1:4f:3e:39:39:54: + 1f:61:de:74:66:d1:77:4f:43:1b:66:70:29:85:de: + fc:8f:8e:1b:7b:a2:66:48:26:7f:9b:a6:fd:4a:e4: + dc:eb:ed:bd:f8:e3:f1:57:98:13:6f:f1:a3:2a:e3: + 73:bd:8d:7c:6f:4b:59:35:bc:b5:42:3e:99:a7:13: + 8d:be:2e:5c:9a:c6:5b:ab:ae:bf:00:e9:c8:ee:05: + 22:8e:d5:67:1a:47:9a:6d:9c:f9:42:3e:15:34:f8: + 31:ec:b4:7e:d3:92:95:b0:b8:f9:66:f3:bd:1d:31: + 2c:b1:90:62:a1:f8:4e:a6:5d:26:22:f0:e1:fe:16: + 2b:69 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Subject Key Identifier: + CA:71:99:89:F0:72:AB:75:66:BB:65:6A:03:04:72:A5:7B:95:A6:93 + X509v3 Authority Key Identifier: + keyid:CA:71:99:89:F0:72:AB:75:66:BB:65:6A:03:04:72:A5:7B:95:A6:93 + + X509v3 Basic Constraints: + CA:TRUE + Signature Algorithm: sha256WithRSAEncryption + df:fd:74:29:5b:5e:9a:8b:09:02:40:59:73:cb:71:47:3f:97: + 3d:a9:fd:c4:8c:01:29:c9:86:b8:71:55:ff:72:0e:50:dc:c8: + b5:e6:91:41:52:47:21:30:cc:4d:e7:3b:4b:db:55:ea:7d:46: + eb:53:e0:b7:1b:80:7c:b1:0c:d3:d1:bc:a0:73:ae:96:1f:fd: + 05:52:7e:54:d5:03:52:69:7b:34:5f:27:d7:98:da:98:76:73: + e6:bb:50:59:2a:94:90:67:03:1c:a4:76:2f:ee:ef:59:60:09: + 48:33:03:2b:52:ed:83:42:f8:71:19:7f:d8:be:40:ed:20:01: + 90:3c:7e:1c:8b:d2:9f:f3:2f:09:1f:50:c8:10:e1:8a:d9:a5: + 49:9c:0b:74:17:b9:2b:68:f6:1e:73:c2:73:10:38:b3:35:e2: + 87:91:1b:a1:d1:9b:81:9d:1b:32:cc:03:6e:4c:82:95:81:11: + 42:56:e2:16:2b:22:65:db:40:2c:ca:dc:03:f4:d5:07:cf:f5: + 13:b2:cf:51:5b:24:cd:c7:d1:9b:42:8e:f9:df:5d:1e:5a:09: + a3:4f:a9:0b:f4:21:c5:bb:ff:02:93:67:e8:2d:ee:ab:d9:59: + 76:03:2c:a1:bd:fb:dc:af:b6:82:94:71:85:53:a8:18:0d:3a: + 9e:42:eb:59 +-----BEGIN CERTIFICATE----- +MIIDfzCCAmegAwIBAgIJANBNI4XuWbP6MA0GCSqGSIb3DQEBCwUAMFYxDzANBgNV +BAMMBmNhY2VydDELMAkGA1UEBhMCRkkxETAPBgNVBAgMCEhlbHNpbmtpMREwDwYD +VQQHDAhIZWxzaW5raTEQMA4GA1UECgwHTWFyaWFEQjAeFw0xOTAxMjcxMDExMTBa +Fw0zOTAxMjIxMDExMTBaMFYxDzANBgNVBAMMBmNhY2VydDELMAkGA1UEBhMCRkkx +ETAPBgNVBAgMCEhlbHNpbmtpMREwDwYDVQQHDAhIZWxzaW5raTEQMA4GA1UECgwH +TWFyaWFEQjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOgOp4TTdTAG +MLIQudGINite+MhEV8tncquWlTPViNGPI1CYum0gAIC9NdXBv5hJxAoVSjSmIZsu +jBUJ8GOBAsJ84lPg96EaQF6PQUpMVtQg8dWnwVMu/343F8x+dL3iIjPOjHdipMU/ +RDV7frn1fYx6J1j9LEKGLudrAZl7/n2noU8+OTlUH2HedGbRd09DG2ZwKYXe/I+O +G3uiZkgmf5um/Urk3Ovtvfjj8VeYE2/xoyrjc72NfG9LWTW8tUI+macTjb4uXJrG +W6uuvwDpyO4FIo7VZxpHmm2c+UI+FTT4Mey0ftOSlbC4+WbzvR0xLLGQYqH4TqZd +JiLw4f4WK2kCAwEAAaNQME4wHQYDVR0OBBYEFMpxmYnwcqt1ZrtlagMEcqV7laaT +MB8GA1UdIwQYMBaAFMpxmYnwcqt1ZrtlagMEcqV7laaTMAwGA1UdEwQFMAMBAf8w +DQYJKoZIhvcNAQELBQADggEBAN/9dClbXpqLCQJAWXPLcUc/lz2p/cSMASnJhrhx +Vf9yDlDcyLXmkUFSRyEwzE3nO0vbVep9RutT4LcbgHyxDNPRvKBzrpYf/QVSflTV +A1JpezRfJ9eY2ph2c+a7UFkqlJBnAxykdi/u71lgCUgzAytS7YNC+HEZf9i+QO0g +AZA8fhyL0p/zLwkfUMgQ4YrZpUmcC3QXuSto9h5zwnMQOLM14oeRG6HRm4GdGzLM +A25MgpWBEUJW4hYrImXbQCzK3AP01QfP9ROyz1FbJM3H0ZtCjvnfXR5aCaNPqQv0 +IcW7/wKTZ+gt7qvZWXYDLKG9+9yvtoKUcYVTqBgNOp5C61k= +-----END CERTIFICATE----- diff --git a/mysql-test/std_data/capath/ed1f42db.0 b/mysql-test/std_data/capath/ed1f42db.0 new file mode 120000 index 0000000000000..1310cfcff205a --- /dev/null +++ b/mysql-test/std_data/capath/ed1f42db.0 @@ -0,0 +1 @@ +cacert.pem \ No newline at end of file diff --git a/mysql-test/suite/galera/r/galera_sst_rsync_encrypt_with_capath,debug.rdiff b/mysql-test/suite/galera/r/galera_sst_rsync_encrypt_with_capath,debug.rdiff new file mode 100644 index 0000000000000..59417d4d6e445 --- /dev/null +++ b/mysql-test/suite/galera/r/galera_sst_rsync_encrypt_with_capath,debug.rdiff @@ -0,0 +1,191 @@ +--- r/galera_sst_rsync_encrypt_with_server.result ++++ r/galera_sst_rsync_encrypt_with_server,debug.reject +@@ -519,4 +519,188 @@ + 1 + DROP TABLE t1; + COMMIT; ++Performing State Transfer on a server that has been killed and restarted ++while a DDL was in progress on it ++connection node_1; ++CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB; ++SET AUTOCOMMIT=OFF; ++START TRANSACTION; ++INSERT INTO t1 VALUES (1,'node1_committed_before'); ++INSERT INTO t1 VALUES (2,'node1_committed_before'); ++INSERT INTO t1 VALUES (3,'node1_committed_before'); ++INSERT INTO t1 VALUES (4,'node1_committed_before'); ++INSERT INTO t1 VALUES (5,'node1_committed_before'); ++connection node_2; ++START TRANSACTION; ++INSERT INTO t1 VALUES (6,'node2_committed_before'); ++INSERT INTO t1 VALUES (7,'node2_committed_before'); ++INSERT INTO t1 VALUES (8,'node2_committed_before'); ++INSERT INTO t1 VALUES (9,'node2_committed_before'); ++INSERT INTO t1 VALUES (10,'node2_committed_before'); ++COMMIT; ++SET GLOBAL debug_dbug = 'd,sync.alter_opened_table'; ++connection node_1; ++ALTER TABLE t1 ADD COLUMN f2 INTEGER; ++connection node_2; ++SET wsrep_sync_wait = 0; ++Killing server ... ++connection node_1; ++SET AUTOCOMMIT=OFF; ++START TRANSACTION; ++INSERT INTO t1 (id,f1) VALUES (11,'node1_committed_during'); ++INSERT INTO t1 (id,f1) VALUES (12,'node1_committed_during'); ++INSERT INTO t1 (id,f1) VALUES (13,'node1_committed_during'); ++INSERT INTO t1 (id,f1) VALUES (14,'node1_committed_during'); ++INSERT INTO t1 (id,f1) VALUES (15,'node1_committed_during'); ++COMMIT; ++START TRANSACTION; ++INSERT INTO t1 (id,f1) VALUES (16,'node1_to_be_committed_after'); ++INSERT INTO t1 (id,f1) VALUES (17,'node1_to_be_committed_after'); ++INSERT INTO t1 (id,f1) VALUES (18,'node1_to_be_committed_after'); ++INSERT INTO t1 (id,f1) VALUES (19,'node1_to_be_committed_after'); ++INSERT INTO t1 (id,f1) VALUES (20,'node1_to_be_committed_after'); ++connect node_1a_galera_st_kill_slave_ddl, 127.0.0.1, root, , test, $NODE_MYPORT_1; ++SET AUTOCOMMIT=OFF; ++START TRANSACTION; ++INSERT INTO t1 (id,f1) VALUES (21,'node1_to_be_rollbacked_after'); ++INSERT INTO t1 (id,f1) VALUES (22,'node1_to_be_rollbacked_after'); ++INSERT INTO t1 (id,f1) VALUES (23,'node1_to_be_rollbacked_after'); ++INSERT INTO t1 (id,f1) VALUES (24,'node1_to_be_rollbacked_after'); ++INSERT INTO t1 (id,f1) VALUES (25,'node1_to_be_rollbacked_after'); ++connection node_2; ++Performing --wsrep-recover ... ++connection node_2; ++Starting server ... ++Using --wsrep-start-position when starting mysqld ... ++SET AUTOCOMMIT=OFF; ++START TRANSACTION; ++INSERT INTO t1 (id,f1) VALUES (26,'node2_committed_after'); ++INSERT INTO t1 (id,f1) VALUES (27,'node2_committed_after'); ++INSERT INTO t1 (id,f1) VALUES (28,'node2_committed_after'); ++INSERT INTO t1 (id,f1) VALUES (29,'node2_committed_after'); ++INSERT INTO t1 (id,f1) VALUES (30,'node2_committed_after'); ++COMMIT; ++connection node_1; ++INSERT INTO t1 (id,f1) VALUES (31,'node1_to_be_committed_after'); ++INSERT INTO t1 (id,f1) VALUES (32,'node1_to_be_committed_after'); ++INSERT INTO t1 (id,f1) VALUES (33,'node1_to_be_committed_after'); ++INSERT INTO t1 (id,f1) VALUES (34,'node1_to_be_committed_after'); ++INSERT INTO t1 (id,f1) VALUES (35,'node1_to_be_committed_after'); ++COMMIT; ++SET AUTOCOMMIT=OFF; ++START TRANSACTION; ++INSERT INTO t1 (id,f1) VALUES (36,'node1_committed_after'); ++INSERT INTO t1 (id,f1) VALUES (37,'node1_committed_after'); ++INSERT INTO t1 (id,f1) VALUES (38,'node1_committed_after'); ++INSERT INTO t1 (id,f1) VALUES (39,'node1_committed_after'); ++INSERT INTO t1 (id,f1) VALUES (40,'node1_committed_after'); ++COMMIT; ++connection node_1a_galera_st_kill_slave_ddl; ++INSERT INTO t1 (id,f1) VALUES (41,'node1_to_be_rollbacked_after'); ++INSERT INTO t1 (id,f1) VALUES (42,'node1_to_be_rollbacked_after'); ++INSERT INTO t1 (id,f1) VALUES (43,'node1_to_be_rollbacked_after'); ++INSERT INTO t1 (id,f1) VALUES (44,'node1_to_be_rollbacked_after'); ++INSERT INTO t1 (id,f1) VALUES (45,'node1_to_be_rollbacked_after'); ++ROLLBACK; ++SET AUTOCOMMIT=ON; ++SET SESSION wsrep_sync_wait=15; ++SELECT COUNT(*) AS EXPECT_3 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1'; ++EXPECT_3 ++3 ++SELECT COUNT(*) AS EXPECT_35 FROM t1; ++EXPECT_35 ++35 ++SELECT * FROM t1; ++id f1 f2 ++1 node1_committed_before NULL ++2 node1_committed_before NULL ++3 node1_committed_before NULL ++4 node1_committed_before NULL ++5 node1_committed_before NULL ++6 node2_committed_before NULL ++7 node2_committed_before NULL ++8 node2_committed_before NULL ++9 node2_committed_before NULL ++10 node2_committed_before NULL ++11 node1_committed_during NULL ++12 node1_committed_during NULL ++13 node1_committed_during NULL ++14 node1_committed_during NULL ++15 node1_committed_during NULL ++16 node1_to_be_committed_after NULL ++17 node1_to_be_committed_after NULL ++18 node1_to_be_committed_after NULL ++19 node1_to_be_committed_after NULL ++20 node1_to_be_committed_after NULL ++26 node2_committed_after NULL ++27 node2_committed_after NULL ++28 node2_committed_after NULL ++29 node2_committed_after NULL ++30 node2_committed_after NULL ++31 node1_to_be_committed_after NULL ++32 node1_to_be_committed_after NULL ++33 node1_to_be_committed_after NULL ++34 node1_to_be_committed_after NULL ++35 node1_to_be_committed_after NULL ++36 node1_committed_after NULL ++37 node1_committed_after NULL ++38 node1_committed_after NULL ++39 node1_committed_after NULL ++40 node1_committed_after NULL ++SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; ++COUNT(*) = 0 ++1 ++COMMIT; ++connection node_1; ++SET AUTOCOMMIT=ON; ++SET SESSION wsrep_sync_wait=15; ++SELECT COUNT(*) AS EXPECT_3 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1'; ++EXPECT_3 ++3 ++SELECT COUNT(*) AS EXPECT_35 FROM t1; ++EXPECT_35 ++35 ++SELECT * FROM t1; ++id f1 f2 ++1 node1_committed_before NULL ++2 node1_committed_before NULL ++3 node1_committed_before NULL ++4 node1_committed_before NULL ++5 node1_committed_before NULL ++6 node2_committed_before NULL ++7 node2_committed_before NULL ++8 node2_committed_before NULL ++9 node2_committed_before NULL ++10 node2_committed_before NULL ++11 node1_committed_during NULL ++12 node1_committed_during NULL ++13 node1_committed_during NULL ++14 node1_committed_during NULL ++15 node1_committed_during NULL ++16 node1_to_be_committed_after NULL ++17 node1_to_be_committed_after NULL ++18 node1_to_be_committed_after NULL ++19 node1_to_be_committed_after NULL ++20 node1_to_be_committed_after NULL ++26 node2_committed_after NULL ++27 node2_committed_after NULL ++28 node2_committed_after NULL ++29 node2_committed_after NULL ++30 node2_committed_after NULL ++31 node1_to_be_committed_after NULL ++32 node1_to_be_committed_after NULL ++33 node1_to_be_committed_after NULL ++34 node1_to_be_committed_after NULL ++35 node1_to_be_committed_after NULL ++36 node1_committed_after NULL ++37 node1_committed_after NULL ++38 node1_committed_after NULL ++39 node1_committed_after NULL ++40 node1_committed_after NULL ++SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; ++COUNT(*) = 0 ++1 ++DROP TABLE t1; ++COMMIT; ++SET GLOBAL debug_dbug = $debug_orig; + include/assert_grep.inc [Using stunnel for SSL encryption] diff --git a/mysql-test/suite/galera/r/galera_sst_rsync_encrypt_with_capath.result b/mysql-test/suite/galera/r/galera_sst_rsync_encrypt_with_capath.result new file mode 100644 index 0000000000000..be8c845bdcf4a --- /dev/null +++ b/mysql-test/suite/galera/r/galera_sst_rsync_encrypt_with_capath.result @@ -0,0 +1,520 @@ +connection node_2; +connection node_1; +connection node_1; +connection node_2; +connection node_1; +Performing State Transfer on a server that has been shut down cleanly and restarted +connection node_1; +CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES (1,'node1_committed_before'); +INSERT INTO t1 VALUES (2,'node1_committed_before'); +INSERT INTO t1 VALUES (3,'node1_committed_before'); +INSERT INTO t1 VALUES (4,'node1_committed_before'); +INSERT INTO t1 VALUES (5,'node1_committed_before'); +COMMIT; +connection node_2; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES (6,'node2_committed_before'); +INSERT INTO t1 VALUES (7,'node2_committed_before'); +INSERT INTO t1 VALUES (8,'node2_committed_before'); +INSERT INTO t1 VALUES (9,'node2_committed_before'); +INSERT INTO t1 VALUES (10,'node2_committed_before'); +COMMIT; +Shutting down server ... +connection node_1; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES (11,'node1_committed_during'); +INSERT INTO t1 VALUES (12,'node1_committed_during'); +INSERT INTO t1 VALUES (13,'node1_committed_during'); +INSERT INTO t1 VALUES (14,'node1_committed_during'); +INSERT INTO t1 VALUES (15,'node1_committed_during'); +COMMIT; +START TRANSACTION; +INSERT INTO t1 VALUES (16,'node1_to_be_committed_after'); +INSERT INTO t1 VALUES (17,'node1_to_be_committed_after'); +INSERT INTO t1 VALUES (18,'node1_to_be_committed_after'); +INSERT INTO t1 VALUES (19,'node1_to_be_committed_after'); +INSERT INTO t1 VALUES (20,'node1_to_be_committed_after'); +connect node_1a_galera_st_shutdown_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES (21,'node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES (22,'node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES (23,'node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES (24,'node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES (25,'node1_to_be_rollbacked_after'); +connection node_2; +Starting server ... +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES (26,'node2_committed_after'); +INSERT INTO t1 VALUES (27,'node2_committed_after'); +INSERT INTO t1 VALUES (28,'node2_committed_after'); +INSERT INTO t1 VALUES (29,'node2_committed_after'); +INSERT INTO t1 VALUES (30,'node2_committed_after'); +COMMIT; +connection node_1; +INSERT INTO t1 VALUES (31,'node1_to_be_committed_after'); +INSERT INTO t1 VALUES (32,'node1_to_be_committed_after'); +INSERT INTO t1 VALUES (33,'node1_to_be_committed_after'); +INSERT INTO t1 VALUES (34,'node1_to_be_committed_after'); +INSERT INTO t1 VALUES (35,'node1_to_be_committed_after'); +COMMIT; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES (36,'node1_committed_after'); +INSERT INTO t1 VALUES (37,'node1_committed_after'); +INSERT INTO t1 VALUES (38,'node1_committed_after'); +INSERT INTO t1 VALUES (39,'node1_committed_after'); +INSERT INTO t1 VALUES (40,'node1_committed_after'); +COMMIT; +connection node_1a_galera_st_shutdown_slave; +INSERT INTO t1 VALUES (41,'node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES (42,'node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES (43,'node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES (44,'node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES (45,'node1_to_be_rollbacked_after'); +ROLLBACK; +SET AUTOCOMMIT=ON; +SET SESSION wsrep_sync_wait=15; +SELECT COUNT(*) AS EXPECT_15 FROM t1; +EXPECT_15 +35 +SELECT * from t1; +id f1 +1 node1_committed_before +2 node1_committed_before +3 node1_committed_before +4 node1_committed_before +5 node1_committed_before +6 node2_committed_before +7 node2_committed_before +8 node2_committed_before +9 node2_committed_before +10 node2_committed_before +11 node1_committed_during +12 node1_committed_during +13 node1_committed_during +14 node1_committed_during +15 node1_committed_during +16 node1_to_be_committed_after +17 node1_to_be_committed_after +18 node1_to_be_committed_after +19 node1_to_be_committed_after +20 node1_to_be_committed_after +26 node2_committed_after +27 node2_committed_after +28 node2_committed_after +29 node2_committed_after +30 node2_committed_after +31 node1_to_be_committed_after +32 node1_to_be_committed_after +33 node1_to_be_committed_after +34 node1_to_be_committed_after +35 node1_to_be_committed_after +36 node1_committed_after +37 node1_committed_after +38 node1_committed_after +39 node1_committed_after +40 node1_committed_after +SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; +COUNT(*) = 0 +1 +COMMIT; +connection node_1; +SET AUTOCOMMIT=ON; +SET SESSION wsrep_sync_wait=15; +SELECT COUNT(*) AS EXPECT_15 FROM t1; +EXPECT_15 +35 +SELECT * from t1; +id f1 +1 node1_committed_before +2 node1_committed_before +3 node1_committed_before +4 node1_committed_before +5 node1_committed_before +6 node2_committed_before +7 node2_committed_before +8 node2_committed_before +9 node2_committed_before +10 node2_committed_before +11 node1_committed_during +12 node1_committed_during +13 node1_committed_during +14 node1_committed_during +15 node1_committed_during +16 node1_to_be_committed_after +17 node1_to_be_committed_after +18 node1_to_be_committed_after +19 node1_to_be_committed_after +20 node1_to_be_committed_after +26 node2_committed_after +27 node2_committed_after +28 node2_committed_after +29 node2_committed_after +30 node2_committed_after +31 node1_to_be_committed_after +32 node1_to_be_committed_after +33 node1_to_be_committed_after +34 node1_to_be_committed_after +35 node1_to_be_committed_after +36 node1_committed_after +37 node1_committed_after +38 node1_committed_after +39 node1_committed_after +40 node1_committed_after +SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; +COUNT(*) = 0 +1 +DROP TABLE t1; +COMMIT; +Performing State Transfer on a server that starts from a clean var directory +This is accomplished by shutting down node #2 and removing its var directory before restarting it +connection node_1; +CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES (1,'node1_committed_before'); +INSERT INTO t1 VALUES (2,'node1_committed_before'); +INSERT INTO t1 VALUES (3,'node1_committed_before'); +INSERT INTO t1 VALUES (4,'node1_committed_before'); +INSERT INTO t1 VALUES (5,'node1_committed_before'); +COMMIT; +connection node_2; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES (6,'node2_committed_before'); +INSERT INTO t1 VALUES (7,'node2_committed_before'); +INSERT INTO t1 VALUES (8,'node2_committed_before'); +INSERT INTO t1 VALUES (9,'node2_committed_before'); +INSERT INTO t1 VALUES (10,'node2_committed_before'); +COMMIT; +Shutting down server ... +connection node_1; +Cleaning var directory ... +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES (11,'node1_committed_during'); +INSERT INTO t1 VALUES (12,'node1_committed_during'); +INSERT INTO t1 VALUES (13,'node1_committed_during'); +INSERT INTO t1 VALUES (14,'node1_committed_during'); +INSERT INTO t1 VALUES (15,'node1_committed_during'); +COMMIT; +START TRANSACTION; +INSERT INTO t1 VALUES (16,'node1_to_be_committed_after'); +INSERT INTO t1 VALUES (17,'node1_to_be_committed_after'); +INSERT INTO t1 VALUES (18,'node1_to_be_committed_after'); +INSERT INTO t1 VALUES (19,'node1_to_be_committed_after'); +INSERT INTO t1 VALUES (20,'node1_to_be_committed_after'); +connect node_1a_galera_st_clean_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES (21,'node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES (22,'node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES (23,'node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES (24,'node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES (25,'node1_to_be_rollbacked_after'); +connection node_2; +Starting server ... +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES (26,'node2_committed_after'); +INSERT INTO t1 VALUES (27,'node2_committed_after'); +INSERT INTO t1 VALUES (28,'node2_committed_after'); +INSERT INTO t1 VALUES (29,'node2_committed_after'); +INSERT INTO t1 VALUES (30,'node2_committed_after'); +COMMIT; +connection node_1; +INSERT INTO t1 VALUES (31,'node1_to_be_committed_after'); +INSERT INTO t1 VALUES (32,'node1_to_be_committed_after'); +INSERT INTO t1 VALUES (33,'node1_to_be_committed_after'); +INSERT INTO t1 VALUES (34,'node1_to_be_committed_after'); +INSERT INTO t1 VALUES (35,'node1_to_be_committed_after'); +COMMIT; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES (36,'node1_committed_after'); +INSERT INTO t1 VALUES (37,'node1_committed_after'); +INSERT INTO t1 VALUES (38,'node1_committed_after'); +INSERT INTO t1 VALUES (39,'node1_committed_after'); +INSERT INTO t1 VALUES (40,'node1_committed_after'); +COMMIT; +connection node_1a_galera_st_clean_slave; +INSERT INTO t1 VALUES (41,'node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES (42,'node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES (43,'node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES (44,'node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES (45,'node1_to_be_rollbacked_after'); +ROLLBACK; +SET AUTOCOMMIT=ON; +SET SESSION wsrep_sync_wait=15; +SELECT COUNT(*) AS EXPECT_35 FROM t1; +EXPECT_35 +35 +SELECT * from t1; +id f1 +1 node1_committed_before +2 node1_committed_before +3 node1_committed_before +4 node1_committed_before +5 node1_committed_before +6 node2_committed_before +7 node2_committed_before +8 node2_committed_before +9 node2_committed_before +10 node2_committed_before +11 node1_committed_during +12 node1_committed_during +13 node1_committed_during +14 node1_committed_during +15 node1_committed_during +16 node1_to_be_committed_after +17 node1_to_be_committed_after +18 node1_to_be_committed_after +19 node1_to_be_committed_after +20 node1_to_be_committed_after +26 node2_committed_after +27 node2_committed_after +28 node2_committed_after +29 node2_committed_after +30 node2_committed_after +31 node1_to_be_committed_after +32 node1_to_be_committed_after +33 node1_to_be_committed_after +34 node1_to_be_committed_after +35 node1_to_be_committed_after +36 node1_committed_after +37 node1_committed_after +38 node1_committed_after +39 node1_committed_after +40 node1_committed_after +SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; +COUNT(*) = 0 +1 +COMMIT; +connection node_1; +SET AUTOCOMMIT=ON; +SET SESSION wsrep_sync_wait=15; +SELECT COUNT(*) AS EXPECT_35 FROM t1; +EXPECT_35 +35 +SELECT * from t1; +id f1 +1 node1_committed_before +2 node1_committed_before +3 node1_committed_before +4 node1_committed_before +5 node1_committed_before +6 node2_committed_before +7 node2_committed_before +8 node2_committed_before +9 node2_committed_before +10 node2_committed_before +11 node1_committed_during +12 node1_committed_during +13 node1_committed_during +14 node1_committed_during +15 node1_committed_during +16 node1_to_be_committed_after +17 node1_to_be_committed_after +18 node1_to_be_committed_after +19 node1_to_be_committed_after +20 node1_to_be_committed_after +26 node2_committed_after +27 node2_committed_after +28 node2_committed_after +29 node2_committed_after +30 node2_committed_after +31 node1_to_be_committed_after +32 node1_to_be_committed_after +33 node1_to_be_committed_after +34 node1_to_be_committed_after +35 node1_to_be_committed_after +36 node1_committed_after +37 node1_committed_after +38 node1_committed_after +39 node1_committed_after +40 node1_committed_after +SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; +COUNT(*) = 0 +1 +DROP TABLE t1; +COMMIT; +Performing State Transfer on a server that has been killed and restarted +connection node_1; +CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES (1,'node1_committed_before'); +INSERT INTO t1 VALUES (2,'node1_committed_before'); +INSERT INTO t1 VALUES (3,'node1_committed_before'); +INSERT INTO t1 VALUES (4,'node1_committed_before'); +INSERT INTO t1 VALUES (5,'node1_committed_before'); +COMMIT; +connection node_2; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES (6,'node2_committed_before'); +INSERT INTO t1 VALUES (7,'node2_committed_before'); +INSERT INTO t1 VALUES (8,'node2_committed_before'); +INSERT INTO t1 VALUES (9,'node2_committed_before'); +INSERT INTO t1 VALUES (10,'node2_committed_before'); +COMMIT; +Killing server ... +connection node_1; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES (11,'node1_committed_during'); +INSERT INTO t1 VALUES (12,'node1_committed_during'); +INSERT INTO t1 VALUES (13,'node1_committed_during'); +INSERT INTO t1 VALUES (14,'node1_committed_during'); +INSERT INTO t1 VALUES (15,'node1_committed_during'); +COMMIT; +START TRANSACTION; +INSERT INTO t1 VALUES (16,'node1_to_be_committed_after'); +INSERT INTO t1 VALUES (17,'node1_to_be_committed_after'); +INSERT INTO t1 VALUES (18,'node1_to_be_committed_after'); +INSERT INTO t1 VALUES (19,'node1_to_be_committed_after'); +INSERT INTO t1 VALUES (20,'node1_to_be_committed_after'); +connect node_1a_galera_st_kill_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES (21,'node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES (22,'node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES (23,'node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES (24,'node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES (25,'node1_to_be_rollbacked_after'); +connection node_2; +Performing --wsrep-recover ... +Starting server ... +Using --wsrep-start-position when starting mysqld ... +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES (26,'node2_committed_after'); +INSERT INTO t1 VALUES (27,'node2_committed_after'); +INSERT INTO t1 VALUES (28,'node2_committed_after'); +INSERT INTO t1 VALUES (29,'node2_committed_after'); +INSERT INTO t1 VALUES (30,'node2_committed_after'); +COMMIT; +connection node_1; +INSERT INTO t1 VALUES (31,'node1_to_be_committed_after'); +INSERT INTO t1 VALUES (32,'node1_to_be_committed_after'); +INSERT INTO t1 VALUES (33,'node1_to_be_committed_after'); +INSERT INTO t1 VALUES (34,'node1_to_be_committed_after'); +INSERT INTO t1 VALUES (35,'node1_to_be_committed_after'); +COMMIT; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES (36,'node1_committed_after'); +INSERT INTO t1 VALUES (37,'node1_committed_after'); +INSERT INTO t1 VALUES (38,'node1_committed_after'); +INSERT INTO t1 VALUES (39,'node1_committed_after'); +INSERT INTO t1 VALUES (40,'node1_committed_after'); +COMMIT; +connection node_1a_galera_st_kill_slave; +INSERT INTO t1 VALUES (41,'node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES (42,'node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES (43,'node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES (45,'node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES (46,'node1_to_be_rollbacked_after'); +ROLLBACK; +SET AUTOCOMMIT=ON; +SET SESSION wsrep_sync_wait=15; +SELECT COUNT(*) AS EXPECT_35 FROM t1; +EXPECT_35 +35 +SELECT * FROM t1; +id f1 +1 node1_committed_before +2 node1_committed_before +3 node1_committed_before +4 node1_committed_before +5 node1_committed_before +6 node2_committed_before +7 node2_committed_before +8 node2_committed_before +9 node2_committed_before +10 node2_committed_before +11 node1_committed_during +12 node1_committed_during +13 node1_committed_during +14 node1_committed_during +15 node1_committed_during +16 node1_to_be_committed_after +17 node1_to_be_committed_after +18 node1_to_be_committed_after +19 node1_to_be_committed_after +20 node1_to_be_committed_after +26 node2_committed_after +27 node2_committed_after +28 node2_committed_after +29 node2_committed_after +30 node2_committed_after +31 node1_to_be_committed_after +32 node1_to_be_committed_after +33 node1_to_be_committed_after +34 node1_to_be_committed_after +35 node1_to_be_committed_after +36 node1_committed_after +37 node1_committed_after +38 node1_committed_after +39 node1_committed_after +40 node1_committed_after +SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; +COUNT(*) = 0 +1 +COMMIT; +connection node_1; +SET AUTOCOMMIT=ON; +SET SESSION wsrep_sync_wait=15; +SELECT COUNT(*) AS EXPECT_35 FROM t1; +EXPECT_35 +35 +SELECT * FROM t1; +id f1 +1 node1_committed_before +2 node1_committed_before +3 node1_committed_before +4 node1_committed_before +5 node1_committed_before +6 node2_committed_before +7 node2_committed_before +8 node2_committed_before +9 node2_committed_before +10 node2_committed_before +11 node1_committed_during +12 node1_committed_during +13 node1_committed_during +14 node1_committed_during +15 node1_committed_during +16 node1_to_be_committed_after +17 node1_to_be_committed_after +18 node1_to_be_committed_after +19 node1_to_be_committed_after +20 node1_to_be_committed_after +26 node2_committed_after +27 node2_committed_after +28 node2_committed_after +29 node2_committed_after +30 node2_committed_after +31 node1_to_be_committed_after +32 node1_to_be_committed_after +33 node1_to_be_committed_after +34 node1_to_be_committed_after +35 node1_to_be_committed_after +36 node1_committed_after +37 node1_committed_after +38 node1_committed_after +39 node1_committed_after +40 node1_committed_after +SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; +COUNT(*) = 0 +1 +DROP TABLE t1; +COMMIT; +include/assert_grep.inc [Using stunnel for SSL encryption] diff --git a/mysql-test/suite/galera/r/galera_sst_rsync_encrypt_with_key.result b/mysql-test/suite/galera/r/galera_sst_rsync_encrypt_with_key.result index b791e580623d1..be8c845bdcf4a 100644 --- a/mysql-test/suite/galera/r/galera_sst_rsync_encrypt_with_key.result +++ b/mysql-test/suite/galera/r/galera_sst_rsync_encrypt_with_key.result @@ -2,8 +2,6 @@ connection node_2; connection node_1; connection node_1; connection node_2; -connection node_2; -CALL mtr.add_suppression("\\[ERROR\\] .*ib_buffer_pool' for reading: No such file or directory"); connection node_1; Performing State Transfer on a server that has been shut down cleanly and restarted connection node_1; diff --git a/mysql-test/suite/galera/r/galera_sst_rsync_encrypt_with_server.result b/mysql-test/suite/galera/r/galera_sst_rsync_encrypt_with_server.result index b791e580623d1..be8c845bdcf4a 100644 --- a/mysql-test/suite/galera/r/galera_sst_rsync_encrypt_with_server.result +++ b/mysql-test/suite/galera/r/galera_sst_rsync_encrypt_with_server.result @@ -2,8 +2,6 @@ connection node_2; connection node_1; connection node_1; connection node_2; -connection node_2; -CALL mtr.add_suppression("\\[ERROR\\] .*ib_buffer_pool' for reading: No such file or directory"); connection node_1; Performing State Transfer on a server that has been shut down cleanly and restarted connection node_1; diff --git a/mysql-test/suite/galera/t/galera_sst_mariabackup_table_options.test b/mysql-test/suite/galera/t/galera_sst_mariabackup_table_options.test index 953a163555977..7a3a6c825c497 100644 --- a/mysql-test/suite/galera/t/galera_sst_mariabackup_table_options.test +++ b/mysql-test/suite/galera/t/galera_sst_mariabackup_table_options.test @@ -66,6 +66,7 @@ COMMIT; --source include/wait_condition.inc --echo Cleaning var directory ... +--remove_file $MYSQLTEST_VARDIR/mysqld.2/data/grastate.dat --remove_files_wildcard $MYSQLTEST_VARDIR/mysqld.2/data/mtr --remove_files_wildcard $MYSQLTEST_VARDIR/mysqld.2/data/performance_schema --remove_files_wildcard $MYSQLTEST_VARDIR/mysqld.2/data/test diff --git a/mysql-test/suite/galera/t/galera_sst_rsync_encrypt_with_capath.cnf b/mysql-test/suite/galera/t/galera_sst_rsync_encrypt_with_capath.cnf new file mode 100644 index 0000000000000..3ab762df013b6 --- /dev/null +++ b/mysql-test/suite/galera/t/galera_sst_rsync_encrypt_with_capath.cnf @@ -0,0 +1,20 @@ +!include ../galera_2nodes.cnf + +[mysqld] +wsrep_sst_method=rsync +ssl-cert=@ENV.MYSQL_TEST_DIR/std_data/server-cert.pem +ssl-key=@ENV.MYSQL_TEST_DIR/std_data/server-key.pem +ssl-capath=@ENV.MYSQL_TEST_DIR/std_data/capath +# We need to turn off the default setting for the duration +# of the test (to test working with a directory instead of +# a file): +ssl-ca= + +[sst] +ssl-mode=VERIFY_CA + +[mysqld.1] +wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcache.size=1;pc.ignore_sb=true' + +[mysqld.2] +wsrep_provider_options='base_port=@mysqld.2.#galera_port;gcache.size=1;pc.ignore_sb=true' diff --git a/mysql-test/suite/galera/t/galera_sst_rsync_encrypt_with_capath.test b/mysql-test/suite/galera/t/galera_sst_rsync_encrypt_with_capath.test new file mode 100644 index 0000000000000..a2d92723ec485 --- /dev/null +++ b/mysql-test/suite/galera/t/galera_sst_rsync_encrypt_with_capath.test @@ -0,0 +1,26 @@ +--source include/big_test.inc +--source include/galera_cluster.inc +--source include/have_debug.inc +--source include/have_stunnel.inc + +# Save original auto_increment_offset values. +--let $node_1=node_1 +--let $node_2=node_2 +--source include/auto_increment_offset_save.inc + +--connection node_1 +--source suite/galera/include/galera_st_shutdown_slave.inc +--source suite/galera/include/galera_st_clean_slave.inc + +--source suite/galera/include/galera_st_kill_slave.inc +--source suite/galera/include/galera_st_kill_slave_ddl.inc + +# Confirm that transfer was SSL-encrypted +--let $assert_text = Using stunnel for SSL encryption +--let $assert_select = Using stunnel for SSL encryption +--let $assert_count = 5 +--let $assert_file = $MYSQLTEST_VARDIR/log/mysqld.1.err +--let $assert_only_after = CURRENT_TEST +--source include/assert_grep.inc + +--source include/auto_increment_offset_restore.inc diff --git a/mysql-test/suite/galera/t/galera_sst_rsync_encrypt_with_key.test b/mysql-test/suite/galera/t/galera_sst_rsync_encrypt_with_key.test index 838c473b9ce12..a2d92723ec485 100644 --- a/mysql-test/suite/galera/t/galera_sst_rsync_encrypt_with_key.test +++ b/mysql-test/suite/galera/t/galera_sst_rsync_encrypt_with_key.test @@ -8,9 +8,6 @@ --let $node_2=node_2 --source include/auto_increment_offset_save.inc ---connection node_2 -CALL mtr.add_suppression("\\[ERROR\\] .*ib_buffer_pool' for reading: No such file or directory"); - --connection node_1 --source suite/galera/include/galera_st_shutdown_slave.inc --source suite/galera/include/galera_st_clean_slave.inc diff --git a/mysql-test/suite/galera/t/galera_sst_rsync_encrypt_with_server.test b/mysql-test/suite/galera/t/galera_sst_rsync_encrypt_with_server.test index 838c473b9ce12..a2d92723ec485 100644 --- a/mysql-test/suite/galera/t/galera_sst_rsync_encrypt_with_server.test +++ b/mysql-test/suite/galera/t/galera_sst_rsync_encrypt_with_server.test @@ -8,9 +8,6 @@ --let $node_2=node_2 --source include/auto_increment_offset_save.inc ---connection node_2 -CALL mtr.add_suppression("\\[ERROR\\] .*ib_buffer_pool' for reading: No such file or directory"); - --connection node_1 --source suite/galera/include/galera_st_shutdown_slave.inc --source suite/galera/include/galera_st_clean_slave.inc diff --git a/mysql-test/suite/galera_3nodes/t/galera_ipv6_mariabackup.test b/mysql-test/suite/galera_3nodes/t/galera_ipv6_mariabackup.test index 51778f40ddfa2..f563392434cb5 100644 --- a/mysql-test/suite/galera_3nodes/t/galera_ipv6_mariabackup.test +++ b/mysql-test/suite/galera_3nodes/t/galera_ipv6_mariabackup.test @@ -1,4 +1,5 @@ --let galera_connection_address=::1 +--source include/big_test.inc --source include/galera_cluster.inc --source include/check_ipv6.inc --source include/have_innodb.inc diff --git a/mysql-test/suite/galera_3nodes/t/galera_ipv6_mariabackup_section.test b/mysql-test/suite/galera_3nodes/t/galera_ipv6_mariabackup_section.test index ad14d4480a6b9..2ed69ea93dcb5 100644 --- a/mysql-test/suite/galera_3nodes/t/galera_ipv6_mariabackup_section.test +++ b/mysql-test/suite/galera_3nodes/t/galera_ipv6_mariabackup_section.test @@ -1,4 +1,5 @@ --let galera_connection_address=::1 +--source include/big_test.inc --source include/galera_cluster.inc --source include/check_ipv6.inc --source include/have_innodb.inc diff --git a/scripts/wsrep_sst_common.sh b/scripts/wsrep_sst_common.sh index f043b56da90da..ba724dc10224c 100644 --- a/scripts/wsrep_sst_common.sh +++ b/scripts/wsrep_sst_common.sh @@ -19,6 +19,9 @@ set -u +# Setting the path for some utilities on CentOS +export PATH="$PATH:/usr/sbin:/usr/bin:/sbin:/bin" + WSREP_SST_OPT_BYPASS=0 WSREP_SST_OPT_BINLOG="" WSREP_SST_OPT_BINLOG_INDEX="" @@ -384,10 +387,8 @@ case "$1" in skip_mysqld_arg=1 ;; '--innodb-force-recovery') - if [ -n "$value" ]; then - if [ "$value" -ne 0 ]; then - INNODB_FORCE_RECOVERY="$value" - fi + if [ -n "$value" -a "$value" != "0" ]; then + INNODB_FORCE_RECOVERY="$value" fi skip_mysqld_arg=1 ;; @@ -584,7 +585,8 @@ get_binlog() if [ -n "$WSREP_SST_OPT_ADDR_PORT" ]; then if [ -n "$WSREP_SST_OPT_PORT" ]; then if [ "$WSREP_SST_OPT_PORT" != "$WSREP_SST_OPT_ADDR_PORT" ]; then - echo "WSREP_SST: [ERROR] port in --port=$WSREP_SST_OPT_PORT differs from port in --address=$WSREP_SST_OPT_ADDR" >&2 + echo "WSREP_SST: [ERROR] port in --port=$WSREP_SST_OPT_PORT" \ + "differs from port in --address=$WSREP_SST_OPT_ADDR" >&2 exit 2 fi else @@ -616,8 +618,19 @@ fi readonly WSREP_SST_OPT_ADDR readonly WSREP_SST_OPT_ADDR_PORT -# try to use my_print_defaults, mysql and mysqldump that come with the sources -# (for MTR suite) +commandex() +{ + if [ -n "$BASH_VERSION" ]; then + command -v "$1" || : + elif [ -x "$1" ]; then + echo "$1" + else + which "$1" || : + fi +} + +# try to use my_print_defaults, mysql and mysqldump that come +# with the sources (for MTR suite): script_binary=$(dirname "$0") SCRIPTS_DIR=$(cd "$script_binary"; pwd -P) EXTRA_DIR="$SCRIPTS_DIR/../extra" @@ -626,13 +639,13 @@ CLIENT_DIR="$SCRIPTS_DIR/../client" if [ -x "$CLIENT_DIR/mariadb" ]; then MYSQL_CLIENT="$CLIENT_DIR/mariadb" else - MYSQL_CLIENT="$(command -v mariadb)" + MYSQL_CLIENT=$(commandex 'mariadb') fi if [ -x "$CLIENT_DIR/mariadb-dump" ]; then MYSQLDUMP="$CLIENT_DIR/mariadb-dump" else - MYSQLDUMP="$(command -v mariadb-dump)" + MYSQLDUMP=$(commandex 'mariadb-dump') fi wsrep_log() @@ -663,7 +676,7 @@ if [ -x "$SCRIPTS_DIR/my_print_defaults" ]; then elif [ -x "$EXTRA_DIR/my_print_defaults" ]; then MY_PRINT_DEFAULTS="$EXTRA_DIR/my_print_defaults" else - MY_PRINT_DEFAULTS="$(command -v my_print_defaults)" + MY_PRINT_DEFAULTS=$(commandex 'my_print_defaults') if [ -z "$MY_PRINT_DEFAULTS" ]; then wsrep_log_error "my_print_defaults not found in path" exit 2 @@ -673,16 +686,16 @@ fi readonly MY_PRINT_DEFAULTS wsrep_defaults="$WSREP_SST_OPT_DEFAULTS" -wsrep_defaults="$wsrep_defaults${wsrep_defaults:+ }$WSREP_SST_OPT_EXTRA_DEFAULTS" -wsrep_defaults="$wsrep_defaults${wsrep_defaults:+ }$WSREP_SST_OPT_SUFFIX_DEFAULT" +wsrep_defaults="$wsrep_defaults${WSREP_SST_OPT_EXTRA_DEFAULTS:+ }$WSREP_SST_OPT_EXTRA_DEFAULTS" +wsrep_defaults="$wsrep_defaults${WSREP_SST_OPT_SUFFIX_DEFAULT:+ }$WSREP_SST_OPT_SUFFIX_DEFAULT" -readonly WSREP_SST_OPT_CONF="$wsrep_defaults" +readonly WSREP_SST_OPT_CONF="${wsrep_defaults:+ }$wsrep_defaults" wsrep_defaults="$WSREP_SST_OPT_DEFAULT" -wsrep_defaults="$wsrep_defaults${wsrep_defaults:+ }$WSREP_SST_OPT_EXTRA_DEFAULT" -wsrep_defaults="$wsrep_defaults${wsrep_defaults:+ }$WSREP_SST_OPT_SUFFIX_DEFAULT" +wsrep_defaults="$wsrep_defaults${WSREP_SST_OPT_EXTRA_DEFAULT:+ }$WSREP_SST_OPT_EXTRA_DEFAULT" +wsrep_defaults="$wsrep_defaults${WSREP_SST_OPT_SUFFIX_DEFAULT:+ }$WSREP_SST_OPT_SUFFIX_DEFAULT" -readonly WSREP_SST_OPT_CONF_UNQUOTED="$wsrep_defaults" +readonly WSREP_SST_OPT_CONF_UNQUOTED="${wsrep_defaults:+ }$wsrep_defaults" # # User can specify mariabackup specific settings that will be used during sst @@ -819,8 +832,7 @@ if wsrep_auth_not_set; then fi # Splitting WSREP_SST_OPT_AUTH as "user:password" pair: -if ! wsrep_auth_not_set -then +if ! wsrep_auth_not_set; then # Extract username as shortest prefix up to first ':' character: WSREP_SST_OPT_AUTH_USER="${WSREP_SST_OPT_AUTH%%:*}" if [ -z "$WSREP_SST_OPT_USER" ]; then @@ -848,8 +860,7 @@ readonly WSREP_SST_OPT_USER readonly WSREP_SST_OPT_PSWD readonly WSREP_SST_OPT_AUTH -if [ -n "$WSREP_SST_OPT_REMOTE_AUTH" ] -then +if [ -n "$WSREP_SST_OPT_REMOTE_AUTH" ]; then # Split auth string at the last ':' readonly WSREP_SST_OPT_REMOTE_USER="${WSREP_SST_OPT_REMOTE_AUTH%%:*}" readonly WSREP_SST_OPT_REMOTE_PSWD="${WSREP_SST_OPT_REMOTE_AUTH#*:}" @@ -860,8 +871,7 @@ fi readonly WSREP_SST_OPT_REMOTE_AUTH -if [ -n "$WSREP_SST_OPT_DATA" ] -then +if [ -n "$WSREP_SST_OPT_DATA" ]; then SST_PROGRESS_FILE="$WSREP_SST_OPT_DATA/sst_in_progress" else SST_PROGRESS_FILE="" @@ -870,13 +880,14 @@ fi wsrep_cleanup_progress_file() { [ -n "$SST_PROGRESS_FILE" -a \ - -f "$SST_PROGRESS_FILE" ] && rm -f "$SST_PROGRESS_FILE" 2>/dev/null || true + -f "$SST_PROGRESS_FILE" ] && \ + rm -f "$SST_PROGRESS_FILE" 2>/dev/null || : } wsrep_check_program() { local prog="$1" - local cmd=$(command -v "$prog") + local cmd=$(commandex "$prog") if [ -z "$cmd" ]; then echo "'$prog' not found in PATH" return 2 # no such file or directory @@ -898,9 +909,9 @@ wsrep_check_programs() wsrep_check_datadir() { - if [ -z "$WSREP_SST_OPT_DATA" ] - then - wsrep_log_error "The '--datadir' parameter must be passed to the SST script" + if [ -z "$WSREP_SST_OPT_DATA" ]; then + wsrep_log_error \ + "The '--datadir' parameter must be passed to the SST script" exit 2 fi } @@ -912,10 +923,10 @@ get_openssl() return fi # Let's look for openssl: - OPENSSL_BINARY="$(command -v openssl)" + OPENSSL_BINARY=$(commandex 'openssl') if [ -z "$OPENSSL_BINARY" ]; then OPENSSL_BINARY='/usr/bin/openssl' - if [ -z "$OPENSSL_BINARY" ]; then + if [ ! -x "$OPENSSL_BINARY" ]; then OPENSSL_BINARY="" fi fi @@ -928,13 +939,12 @@ get_openssl() wsrep_gen_secret() { get_openssl - if [ -n "$OPENSSL_BINARY" ] - then + if [ -n "$OPENSSL_BINARY" ]; then echo $("$OPENSSL_BINARY" rand -hex 16) else printf "%04x%04x%04x%04x%04x%04x%04x%04x" \ - $RANDOM $RANDOM $RANDOM $RANDOM \ - $RANDOM $RANDOM $RANDOM $RANDOM + $RANDOM $RANDOM $RANDOM $RANDOM \ + $RANDOM $RANDOM $RANDOM $RANDOM fi } @@ -968,14 +978,14 @@ is_local_ip() fi # Now let's check if the given address is assigned to # one of the network cards: - local ip_util="$(command -v ip)" + local ip_util=$(commandex 'ip') if [ -n "$ip_util" ]; then # ip address show ouput format is " inet[6]
/": "$ip_util" address show \ | grep -E "^[[:space:]]*inet.? [^[:space:]]+/" -o \ | grep -F " $1/" >/dev/null && return 0 else - local ifconfig_util="$(command -v ifconfig)" + local ifconfig_util=$(commandex 'ifconfig') if [ -n "$ifconfig_util" ]; then # ifconfig output format is " inet[6]
...": "$ifconfig_util" \ @@ -992,15 +1002,15 @@ check_sockets_utils() sockstat_available=0 ss_available=0 - [ -n "$(command -v lsof)" ] && lsof_available=1 - [ -n "$(command -v sockstat)" ] && sockstat_available=1 - [ -n "$(command -v ss)" ] && ss_available=1 + [ -n "$(commandex lsof)" ] && lsof_available=1 + [ -n "$(commandex sockstat)" ] && sockstat_available=1 + [ -n "$(commandex ss)" ] && ss_available=1 if [ $lsof_available -eq 0 -a \ $sockstat_available -eq 0 -a \ $ss_available -eq 0 ] then - wsrep_log_error "Neither lsof, nor sockstat or ss tool was found in " \ + wsrep_log_error "Neither lsof, nor sockstat or ss tool was found in" \ "the PATH. Make sure you have it installed." exit 2 # ENOENT fi @@ -1085,26 +1095,38 @@ check_for_dhparams() # verify_ca_matches_cert() { - local ca="$1" - local cert="$2" - local path=${3:-0} + local cert="$1" + local ca="$2" + local cap="$3" # If the openssl utility is not installed, then # we will not do this certificate check: get_openssl if [ -z "$OPENSSL_BINARY" ]; then + wsrep_log_info "openssl utility not found" return fi - local not_match=0 + local readable=1; [ ! -r "$cert" ] && readable=0 + [ -n "$ca" ] && [ ! -r "$ca" ] && readable=0 + [ -n "$cap" ] && [ ! -r "$cap" ] && readable=0 - if [ $path -eq 0 ]; then - "$OPENSSL_BINARY" verify -verbose -CAfile "$ca" "$cert" >/dev/null 2>&1 || not_match=1 - else - "$OPENSSL_BINARY" verify -verbose -CApath "$ca" "$cert" >/dev/null 2>&1 || not_match=1 + if [ readable -eq 0 ]; then + wsrep_log_error \ + "Both PEM file and CA file (or path) must be readable" + exit 22 fi + local not_match=0 + local errmsg + errmsg=$("$OPENSSL_BINARY" verify -verbose \ + ${ca:+ -CAfile} ${ca:+ "$ca"} \ + ${cap:+ -CApath} ${cap:+ "$cap"} \ + "$cert" 2>&1) || not_match=1 + if [ $not_match -eq 1 ]; then + wsrep_log_info "run: \"$OPENSSL_BINARY\" verify -verbose${ca:+ -CAfile \"$ca\"}${cap:+ -CApath \"$cap\"} \"$cert\"" + wsrep_log_info "output: $errmsg" wsrep_log_error "******** FATAL ERROR ********************************************" wsrep_log_error "* The certifcate and CA (certificate authority) do not match. *" wsrep_log_error "* It does not appear that the certificate was issued by the CA. *" @@ -1124,12 +1146,18 @@ verify_ca_matches_cert() # verify_cert_matches_key() { - local cert_path="$1" - local key_path="$2" + local cert="$1" + local key="$2" + + if [ ! -r "$key" -o ! -r "$cert" ]; then + wsrep_log_error "Both the certificate file and the key file" \ + "must be readable" + exit 22 + fi # If the diff utility is not installed, then # we will not do this certificate check: - if [ -z "$(command -v diff)" ]; then + if [ -z "$(commandex diff)" ]; then return fi @@ -1142,13 +1170,13 @@ verify_cert_matches_key() # Generate the public key from the cert and the key. # They should match (otherwise we can't create an SSL connection). - if ! diff <("$OPENSSL_BINARY" x509 -in "$cert_path" -pubkey -noout 2>/dev/null) \ - <("$OPENSSL_BINARY" pkey -in "$key_path" -pubout 2>/dev/null) >/dev/null 2>&1 + if ! diff <("$OPENSSL_BINARY" x509 -in "$cert" -pubkey -noout 2>/dev/null) \ + <("$OPENSSL_BINARY" pkey -in "$key" -pubout 2>/dev/null) >/dev/null 2>&1 then - wsrep_log_error "******************* FATAL ERROR ****************" - wsrep_log_error "* The certifcate and private key do not match. *" - wsrep_log_error "* Please check your certificate and key files. *" - wsrep_log_error "************************************************" + wsrep_log_error "******************* FATAL ERROR *****************" + wsrep_log_error "* The certificate and private key do not match. *" + wsrep_log_error "* Please check your certificate and key files. *" + wsrep_log_error "*************************************************" exit 22 fi } @@ -1305,9 +1333,9 @@ get_proc() elif [ "$OS" = 'Darwin' -o "$OS" = 'FreeBSD' ]; then nproc=$(sysctl -n hw.ncpu) fi + set -e if [ -z "$nproc" ] || [ $nproc -eq 0 ]; then nproc=1 fi - set -e fi } diff --git a/scripts/wsrep_sst_mariabackup.sh b/scripts/wsrep_sst_mariabackup.sh index b429a9effd562..4bca785fcadb0 100644 --- a/scripts/wsrep_sst_mariabackup.sh +++ b/scripts/wsrep_sst_mariabackup.sh @@ -20,10 +20,11 @@ # https://mariadb.com/kb/en/mariabackup-overview/ # Make sure to read that before proceeding! +OS="$(uname)" + . $(dirname "$0")/wsrep_sst_common wsrep_check_datadir -OS="$(uname)" ealgo="" eformat="" ekey="" @@ -34,7 +35,7 @@ ssyslog="" ssystag="" BACKUP_PID="" tcert="" -tpath=0 +tcap="" tpem="" tkey="" tmode="DISABLED" @@ -88,14 +89,14 @@ readonly SECRET_TAG="secret" # For backup locks it is 1 sent by joiner sst_ver=1 -if [ -n "$(command -v pv)" ] && pv --help | grep -qw -- '-F'; then +if [ -n "$(commandex pv)" ] && pv --help | grep -qw -- '-F'; then pvopts="$pvopts $pvformat" fi pcmd="pv $pvopts" declare -a RC -BACKUP_BIN="$(command -v mariabackup)" -if [ ! -x "$BACKUP_BIN" ]; then +BACKUP_BIN=$(commandex 'mariabackup') +if [ -z "$BACKUP_BIN" ]; then wsrep_log_error 'mariabackup binary not found in path' exit 42 fi @@ -145,14 +146,14 @@ get_keys() if [ $encrypt -eq 0 ]; then if [ -n "$ealgo" -o -n "$ekey" -o -n "$ekeyfile" ]; then - wsrep_log_error "Options for encryption are specified, " \ + wsrep_log_error "Options for encryption are specified," \ "but encryption itself is disabled. SST may fail." fi return fi if [ $sfmt = 'tar' ]; then - wsrep_log_info "NOTE: key-based encryption (encrypt=1) " \ + wsrep_log_info "NOTE: key-based encryption (encrypt=1)" \ "cannot be enabled with tar format" encrypt=-1 return @@ -165,16 +166,18 @@ get_keys() exit 3 fi - if [ -z "$ekey" -a ! -r "$ekeyfile" ]; then - wsrep_log_error "FATAL: Either key must be specified " \ - "or keyfile must be readable" - exit 3 + if [ -z "$ekey" ]; then + if [ ! -r "$ekeyfile" ]; then + wsrep_log_error "FATAL: Either key must be specified" \ + "or keyfile must be readable" + exit 3 + fi fi if [ "$eformat" = 'openssl' ]; then get_openssl if [ -z "$OPENSSL_BINARY" ]; then - wsrep_log_error "If encryption using the openssl is enabled, " \ + wsrep_log_error "If encryption using the openssl is enabled," \ "then you need to install openssl" exit 2 fi @@ -192,12 +195,12 @@ get_keys() ecmd="$ecmd -k '$ekey'" fi elif [ "$eformat" = 'xbcrypt' ]; then - if [ -z "$(command -v xbcrypt)" ]; then - wsrep_log_error "If encryption using the xbcrypt is enabled, " \ + if [ -z "$(commandex xbcrypt)" ]; then + wsrep_log_error "If encryption using the xbcrypt is enabled," \ "then you need to install xbcrypt" exit 2 fi - wsrep_log_info "NOTE: xbcrypt-based encryption, " \ + wsrep_log_info "NOTE: xbcrypt-based encryption," \ "supported only from Xtrabackup 2.1.4" if [ -z "$ekey" ]; then ecmd="xbcrypt --encrypt-algo='$ealgo' --encrypt-key-file='$ekeyfile'" @@ -342,40 +345,34 @@ get_transfer() CN_option=",commonname=''" if [ $encrypt -eq 2 ]; then - wsrep_log_info "Using openssl based encryption with socat: with crt and pem" - if [ -z "$tpem" -o -z "$tcert" ]; then + wsrep_log_info \ + "Using openssl based encryption with socat: with crt and pem" + if [ -z "$tpem" -o -z "$tcert$tcap" ]; then wsrep_log_error \ "Both PEM file and CRT file (or path) are required" exit 22 fi - if [ ! -r "$tpem" -o ! -r "$tcert" ]; then - wsrep_log_error \ - "Both PEM file and CRT file (or path) must be readable" - exit 22 + verify_ca_matches_cert "$tpem" "$tcert" "$tcap" + tcmd="$tcmd,cert='$tpem'" + if [ -n "$tcert" ]; then + tcmd="$tcmd,cafile='$tcert'" fi - verify_ca_matches_cert "$tcert" "$tpem" $tpath - if [ $tpath -eq 0 ]; then - tcmd="$tcmd,cert='$tpem',cafile='$tcert'" - else - tcmd="$tcmd,cert='$tpem',capath='$tcert'" + if [ -n "$tcap" ]; then + tcmd="$tcmd,capath='$tcap'" fi stagemsg="$stagemsg-OpenSSL-Encrypted-2" - wsrep_log_info "$action with cert=$tpem, ca=$tcert" + wsrep_log_info "$action with cert='$tpem', ca='$tcert', capath='$tcap'" elif [ $encrypt -eq 3 -o $encrypt -eq 4 ]; then - wsrep_log_info "Using openssl based encryption with socat: with key and crt" + wsrep_log_info \ + "Using openssl based encryption with socat: with key and crt" if [ -z "$tpem" -o -z "$tkey" ]; then - wsrep_log_error "Both certificate file (or path) " \ - "and key file are required" - exit 22 - fi - if [ ! -r "$tpem" -o ! -r "$tkey" ]; then - wsrep_log_error "Both certificate file (or path) " \ - "and key file must be readable" + wsrep_log_error "Both the certificate file (or path) and" \ + "the key file are required" exit 22 fi verify_cert_matches_key "$tpem" "$tkey" stagemsg="$stagemsg-OpenSSL-Encrypted-3" - if [ -z "$tcert" ]; then + if [ -z "$tcert$tcap" ]; then if [ $encrypt -eq 4 ]; then wsrep_log_error \ "Peer certificate file (or path) required if encrypt=4" @@ -384,14 +381,11 @@ get_transfer() # no verification CN_option="" tcmd="$tcmd,cert='$tpem',key='$tkey',verify=0" - wsrep_log_info "$action with cert=$tpem, key=$tkey, verify=0" + wsrep_log_info \ + "$action with cert='$tpem', key='$tkey', verify=0" else # CA verification - if [ ! -r "$tcert" ]; then - wsrep_log_error "Certificate file or path must be readable" - exit 22 - fi - verify_ca_matches_cert "$tcert" "$tpem" $tpath + verify_ca_matches_cert "$tpem" "$tcert" "$tcap" if [ -n "$WSREP_SST_OPT_REMOTE_USER" ]; then CN_option=",commonname='$WSREP_SST_OPT_REMOTE_USER'" elif [ "$WSREP_SST_OPT_ROLE" = 'joiner' -o $encrypt -eq 4 ] @@ -402,12 +396,15 @@ get_transfer() else CN_option=",commonname='$WSREP_SST_OPT_HOST_UNESCAPED'" fi - if [ $tpath -eq 0 ]; then - tcmd="$tcmd,cert='$tpem',key='$tkey',cafile='$tcert'" - else - tcmd="$tcmd,cert='$tpem',key='$tkey',capath='$tcert'" + tcmd="$tcmd,cert='$tpem',key='$tkey'" + if [ -n "$tcert" ]; then + tcmd="$tcmd,cafile='$tcert'" + fi + if [ -n "$tcap" ]; then + tcmd="$tcmd,capath='$tcap'" fi - wsrep_log_info "$action with cert=$tpem, key=$tkey, ca=$tcert" + wsrep_log_info "$action with cert='$tpem', key='$tkey'," \ + "ca='$tcert', capath='$tcap'" fi else wsrep_log_info "Unknown encryption mode: encrypt=$encrypt" @@ -425,7 +422,9 @@ get_transfer() get_footprint() { pushd "$WSREP_SST_OPT_DATA" 1>/dev/null - payload=$(find . -regex '.*\.ibd$\|.*\.MYI$\|.*\.MYD$\|.*ibdata1$' -type f -print0 | du --files0-from=- --block-size=1 -c -s | awk 'END { print $1 }') + payload=$(find . -regex '.*\.ibd$\|.*\.MYI$\|.*\.MYD$\|.*ibdata1$' \ + -type f -print0 | du --files0-from=- --block-size=1 -c -s | \ + awk 'END { print $1 }') if [ "$compress" != 'none' ]; then # QuickLZ has around 50% compression ratio # When compression/compaction used, the progress is only an approximate. @@ -438,7 +437,7 @@ get_footprint() adjust_progress() { - if [ -z "$(command -v pv)" ]; then + if [ -z "$(commandex pv)" ]; then wsrep_log_error "pv not found in path: $PATH" wsrep_log_error "Disabling all progress/rate-limiting" pcmd="" @@ -470,33 +469,42 @@ check_server_ssl_config() { # backward-compatible behavior: tcert=$(parse_cnf 'sst' 'tca') + tcap=$(parse_cnf 'sst' 'tcapath') tpem=$(parse_cnf 'sst' 'tcert') tkey=$(parse_cnf 'sst' 'tkey') # reading new ssl configuration options: local tcert2=$(parse_cnf "$encgroups" 'ssl-ca') + local tcap2=$(parse_cnf "$encgroups" 'ssl-capath') local tpem2=$(parse_cnf "$encgroups" 'ssl-cert') local tkey2=$(parse_cnf "$encgroups" 'ssl-key') # if there are no old options, then we take new ones: - if [ -z "$tcert" -a -z "$tpem" -a -z "$tkey" ]; then + if [ -z "$tcert" -a -z "$tcap" -a -z "$tpem" -a -z "$tkey" ]; then tcert="$tcert2" + tcap="$tcap2" tpem="$tpem2" tkey="$tkey2" # checking for presence of the new-style SSL configuration: - elif [ -n "$tcert2" -o -n "$tpem2" -o -n "$tkey2" ]; then + elif [ -n "$tcert2" -o -n "$tcap2" -o -n "$tpem2" -o -n "$tkey2" ]; then if [ "$tcert" != "$tcert2" -o \ + "$tcap" != "$tcap2" -o \ "$tpem" != "$tpem2" -o \ "$tkey" != "$tkey2" ] then - wsrep_log_info "new ssl configuration options (ssl-ca, ssl-cert " \ - "and ssl-key) are ignored by SST due to presence " \ - "of the tca, tcert and/or tkey in the [sst] section" + wsrep_log_info \ + "new ssl configuration options (ssl-ca[path], ssl-cert" \ + "and ssl-key) are ignored by SST due to presence" \ + "of the tca[path], tcert and/or tkey in the [sst] section" fi fi if [ -n "$tcert" ]; then - tcert=$(trim_string "$tcert") - if [ "${tcert%/}" != "$tcert" ]; then - tpath=1 - fi + tcert=$(trim_string "$tcert") + if [ "${tcert%/}" != "$tcert" ] || [ -d "$tcert" ]; then + tcap="$tcert" + tcert="" + fi + fi + if [ -n "$tcap" ]; then + tcap=$(trim_string "$tcap") fi } @@ -506,10 +514,10 @@ read_cnf() tfmt=$(parse_cnf sst transferfmt 'socat') encrypt=$(parse_cnf "$encgroups" 'encrypt' 0) - tmode=$(parse_cnf "$encgroups" 'ssl-mode' 'DISABLED' | tr [:lower:] [:upper:]) + tmode=$(parse_cnf "$encgroups" 'ssl-mode' 'DISABLED' | \ + tr [:lower:] [:upper:]) - if [ $encrypt -eq 0 -o $encrypt -ge 2 ] - then + if [ $encrypt -eq 0 -o $encrypt -ge 2 ]; then if [ "$tmode" != 'DISABLED' -o $encrypt -ge 2 ]; then check_server_ssl_config fi @@ -517,11 +525,13 @@ read_cnf() if [ 0 -eq $encrypt -a -n "$tpem" -a -n "$tkey" ] then encrypt=3 # enable cert/key SSL encyption - # avoid CA verification if not set explicitly: - # nodes may happen to have different CA if self-generated - # zeroing up tcert does the trick - [ "${tmode#VERIFY}" != "$tmode" ] || tcert="" + # nodes may happen to have different CA if self-generated, + # zeroing up tcert and tcap does the trick: + if [ "${tmode#VERIFY}" = "$tmode" ]; then + tcert="" + tcap="" + fi fi fi elif [ $encrypt -eq 1 ]; then @@ -535,8 +545,9 @@ read_cnf() fi fi - wsrep_log_info "SSL configuration: CA='$tcert', CERT='$tpem'," \ - "KEY='$tkey', MODE='$tmode', encrypt='$encrypt'" + wsrep_log_info "SSL configuration: CA='$tcert', CAPATH='$tcap'," \ + "CERT='$tpem', KEY='$tkey', MODE='$tmode'," \ + "encrypt='$encrypt'" sockopt=$(parse_cnf sst sockopt "") progress=$(parse_cnf sst progress "") @@ -561,7 +572,8 @@ read_cnf() sstlogarchivedir=$(parse_cnf sst sst-log-archive-dir '/tmp/sst_log_archive') if [ $speciald -eq 0 ]; then - wsrep_log_error "sst-special-dirs equal to 0 is not supported, falling back to 1" + wsrep_log_error \ + "sst-special-dirs equal to 0 is not supported, falling back to 1" speciald=1 fi @@ -589,7 +601,7 @@ get_stream() { if [ "$sfmt" = 'mbstream' -o "$sfmt" = 'xbstream' ]; then sfmt='mbstream' - STREAM_BIN="$(command -v mbstream)" + local STREAM_BIN=$(commandex "$sfmt") if [ -z "$STREAM_BIN" ]; then wsrep_log_error "Streaming with $sfmt, but $sfmt not found in path" exit 42 @@ -621,7 +633,7 @@ cleanup_at_exit() # Since this is invoked just after exit NNN local estatus=$? if [ $estatus -ne 0 ]; then - wsrep_log_error "Cleanup after exit with status:$estatus" + wsrep_log_error "Cleanup after exit with status: $estatus" fi if [ "$WSREP_SST_OPT_ROLE" = 'joiner' ]; then @@ -630,7 +642,8 @@ cleanup_at_exit() else if [ -n "$BACKUP_PID" ]; then if check_pid "$BACKUP_PID" 1; then - wsrep_log_error "mariabackup process is still running. Killing..." + wsrep_log_error \ + "mariabackup process is still running. Killing..." cleanup_pid $CHECK_PID "$BACKUP_PID" fi fi @@ -638,8 +651,8 @@ cleanup_at_exit() fi if [ -n "$progress" -a -p "$progress" ]; then - wsrep_log_info "Cleaning up fifo file $progress" - rm -f "$progress" || true + wsrep_log_info "Cleaning up fifo file: $progress" + rm -f "$progress" || : fi wsrep_log_info "Cleaning up temporary directories" @@ -649,8 +662,8 @@ cleanup_at_exit() [ -d "$STATDIR" ] && rm -rf "$STATDIR" fi else - [ -n "$xtmpdir" -a -d "$xtmpdir" ] && rm -rf "$xtmpdir" || true - [ -n "$itmpdir" -a -d "$itmpdir" ] && rm -rf "$itmpdir" || true + [ -n "$xtmpdir" -a -d "$xtmpdir" ] && rm -rf "$xtmpdir" || : + [ -n "$itmpdir" -a -d "$itmpdir" ] && rm -rf "$itmpdir" || : fi # Final cleanup @@ -662,7 +675,7 @@ cleanup_at_exit() # This means a signal was delivered to the process. # So, more cleanup. if [ $estatus -ge 128 ]; then - kill -KILL -- -$$ || true + kill -KILL -- -$$ || : fi fi @@ -738,7 +751,7 @@ recv_joiner() local ltcmd="$tcmd" if [ $tmt -gt 0 ]; then - if [ -n "$(command -v timeout)" ]; then + if [ -n "$(commandex timeout)" ]; then if timeout --help | grep -qw -- '-k'; then ltcmd="timeout -k $(( tmt+10 )) $tmt $tcmd" else @@ -760,14 +773,14 @@ recv_joiner() popd 1>/dev/null if [ ${RC[0]} -eq 124 ]; then - wsrep_log_error "Possible timeout in receiving first data from " \ + wsrep_log_error "Possible timeout in receiving first data from" \ "donor in gtid stage: exit codes: ${RC[@]}" exit 32 fi for ecode in "${RC[@]}"; do if [ $ecode -ne 0 ]; then - wsrep_log_error "Error while getting data from donor node: " \ + wsrep_log_error "Error while getting data from donor node:" \ "exit codes: ${RC[@]}" exit 32 fi @@ -776,7 +789,7 @@ recv_joiner() if [ $checkf -eq 1 ]; then if [ ! -r "$MAGIC_FILE" ]; then # this message should cause joiner to abort - wsrep_log_error "receiving process ended without creating " \ + wsrep_log_error "receiving process ended without creating" \ "'$MAGIC_FILE'" wsrep_log_info "Contents of datadir" wsrep_log_info $(ls -l "$dir/"*) @@ -784,10 +797,11 @@ recv_joiner() fi # check donor supplied secret - SECRET=$(grep -F -- "$SECRET_TAG " "$MAGIC_FILE" 2>/dev/null | cut -d ' ' -f 2) + SECRET=$(grep -F -- "$SECRET_TAG " "$MAGIC_FILE" 2>/dev/null | \ + cut -d ' ' -f 2) if [ "$SECRET" != "$MY_SECRET" ]; then wsrep_log_error "Donor does not know my secret!" - wsrep_log_info "Donor:'$SECRET', my:'$MY_SECRET'" + wsrep_log_info "Donor: '$SECRET', my: '$MY_SECRET'" exit 32 fi @@ -810,7 +824,7 @@ send_donor() for ecode in "${RC[@]}"; do if [ $ecode -ne 0 ]; then - wsrep_log_error "Error while sending data to joiner node: " \ + wsrep_log_error "Error while sending data to joiner node:" \ "exit codes: ${RC[@]}" exit 32 fi @@ -823,7 +837,9 @@ monitor_process() while true ; do if ! ps -p "$WSREP_SST_OPT_PARENT" >/dev/null 2>&1; then - wsrep_log_error "Parent mysqld process (PID: $WSREP_SST_OPT_PARENT) terminated unexpectedly." + wsrep_log_error \ + "Parent mysqld process (PID: $WSREP_SST_OPT_PARENT)" \ + "terminated unexpectedly." kill -- -"$WSREP_SST_OPT_PARENT" exit 32 fi @@ -845,7 +861,7 @@ read_cnf setup_ports if "$BACKUP_BIN" --help 2>/dev/null | grep -qw -- '--version-check'; then - disver='--no-version-check' + disver=' --no-version-check' fi # if no command line argument and INNODB_DATA_HOME_DIR environment variable @@ -867,7 +883,7 @@ INNODB_DATA_HOME_DIR=$(pwd -P) cd "$OLD_PWD" if [ $ssyslog -eq 1 ]; then - if [ -n "$(command -v logger)" ]; then + if [ -n "$(commandex logger)" ]; then wsrep_log_info "Logging all stderr of SST/mariabackup to syslog" exec 2> >(logger -p daemon.err -t ${ssystag}wsrep-sst-$WSREP_SST_OPT_ROLE) @@ -898,10 +914,8 @@ else fi fi - if [ -e "$INNOAPPLYLOG" ] - then - if [ -n "$sstlogarchivedir" ] - then + if [ -e "$INNOAPPLYLOG" ]; then + if [ -n "$sstlogarchivedir" ]; then newfile=$(basename "$INNOAPPLYLOG") newfile="$sstlogarchivedir/$newfile.$ARCHIVETIMESTAMP" else @@ -912,10 +926,8 @@ else gzip "$newfile" fi - if [ -e "$INNOMOVELOG" ] - then - if [ -n "$sstlogarchivedir" ] - then + if [ -e "$INNOMOVELOG" ]; then + if [ -n "$sstlogarchivedir" ]; then newfile=$(basename "$INNOMOVELOG") newfile="$sstlogarchivedir/$newfile.$ARCHIVETIMESTAMP" else @@ -926,10 +938,8 @@ else gzip "$newfile" fi - if [ -e "$INNOBACKUPLOG" ] - then - if [ -n "$sstlogarchivedir" ] - then + if [ -e "$INNOBACKUPLOG" ]; then + if [ -n "$sstlogarchivedir" ]; then newfile=$(basename "$INNOBACKUPLOG") newfile="$sstlogarchivedir/$newfile.$ARCHIVETIMESTAMP" else @@ -949,15 +959,15 @@ setup_commands() { local mysqld_args="" if [ -n "$WSREP_SST_OPT_MYSQLD" ]; then - mysqld_args="--mysqld-args $WSREP_SST_OPT_MYSQLD" + mysqld_args=" --mysqld-args $WSREP_SST_OPT_MYSQLD" fi - if [ -z "$INNODB_FORCE_RECOVERY" ]; then - INNOAPPLY="$BACKUP_BIN --prepare $disver $iapts $INNOEXTRA --target-dir='$DATA' --datadir='$DATA' $mysqld_args $INNOAPPLY" - else - INNOAPPLY="$BACKUP_BIN --prepare $disver $iapts $INNOEXTRA --innodb-force-recovery=$INNODB_FORCE_RECOVERY --target-dir='$DATA' --datadir='$DATA' $mysqld_args $INNOAPPLY" + local recovery="" + if [ -n "$INNODB_FORCE_RECOVERY" ]; then + recovery=" --innodb-force-recovery=$INNODB_FORCE_RECOVERY" fi - INNOMOVE="$BACKUP_BIN $WSREP_SST_OPT_CONF --move-back $disver $impts --force-non-empty-directories --target-dir='$DATA' --datadir='${TDATA:-$DATA}' $INNOMOVE" - INNOBACKUP="$BACKUP_BIN $WSREP_SST_OPT_CONF --backup $disver $iopts $tmpopts $INNOEXTRA --galera-info --stream=$sfmt --target-dir='$itmpdir' --datadir='$DATA' $mysqld_args $INNOBACKUP" + INNOAPPLY="$BACKUP_BIN --prepare$disver$recovery${iapts:+ }$iapts$INNOEXTRA --target-dir='$DATA' --datadir='$DATA'$mysqld_args $INNOAPPLY" + INNOMOVE="$BACKUP_BIN$WSREP_SST_OPT_CONF --move-back$disver${impts:+ }$impts --force-non-empty-directories --target-dir='$DATA' --datadir='${TDATA:-$DATA}' $INNOMOVE" + INNOBACKUP="$BACKUP_BIN$WSREP_SST_OPT_CONF --backup$disver${iopts:+ }$iopts $tmpopts$INNOEXTRA --galera-info --stream=$sfmt --target-dir='$itmpdir' --datadir='$DATA'$mysqld_args $INNOBACKUP" } get_stream @@ -1055,27 +1065,28 @@ then tcmd="$ecmd | $tcmd" fi - iopts="--databases-exclude='lost+found' $iopts" + iopts="--databases-exclude='lost+found'${iopts:+ }$iopts" if [ ${FORCE_FTWRL:-0} -eq 1 ]; then - wsrep_log_info "Forcing FTWRL due to environment variable FORCE_FTWRL equal to $FORCE_FTWRL" - iopts="--no-backup-locks $iopts" + wsrep_log_info "Forcing FTWRL due to environment variable" \ + "FORCE_FTWRL equal to $FORCE_FTWRL" + iopts="--no-backup-locks${iopts:+ }$iopts" fi # if compression is enabled for backup files, then add the # appropriate options to the mariabackup command line: if [ "$compress" != 'none' ]; then - iopts="--compress${compress:+=$compress} $iopts" + iopts="--compress${compress:+=$compress}${iopts:+ }$iopts" if [ -n "$compress_threads" ]; then - iopts="--compress-threads=$compress_threads $iopts" + iopts="--compress-threads=$compress_threads${iopts:+ }$iopts" fi if [ -n "$compress_chunk" ]; then - iopts="--compress-chunk-size=$compress_chunk $iopts" + iopts="--compress-chunk-size=$compress_chunk${iopts:+ }$iopts" fi fi if [ -n "$backup_threads" ]; then - iopts="--parallel=$backup_threads $iopts" + iopts="--parallel=$backup_threads${iopts:+ }$iopts" fi setup_commands @@ -1084,7 +1095,7 @@ then set -e if [ ${RC[0]} -ne 0 ]; then - wsrep_log_error "mariabackup finished with error: ${RC[0]}. " \ + wsrep_log_error "mariabackup finished with error: ${RC[0]}." \ "Check syslog or '$INNOBACKUPLOG' for details" exit 22 elif [ ${RC[$(( ${#RC[@]}-1 ))]} -eq 1 ]; then @@ -1125,7 +1136,8 @@ then elif [ "$WSREP_SST_OPT_ROLE" = 'joiner' ] then - [ -e "$SST_PROGRESS_FILE" ] && wsrep_log_info "Stale sst_in_progress file: $SST_PROGRESS_FILE" + [ -e "$SST_PROGRESS_FILE" ] && \ + wsrep_log_info "Stale sst_in_progress file: $SST_PROGRESS_FILE" [ -n "$SST_PROGRESS_FILE" ] && touch "$SST_PROGRESS_FILE" ib_home_dir="$INNODB_DATA_HOME_DIR" @@ -1146,7 +1158,7 @@ then ib_undo_dir="$INNODB_UNDO_DIR" if [ -n "$backup_threads" ]; then - impts="--parallel=$backup_threads $impts" + impts="--parallel=$backup_threads${impts:+ }$impts" fi stagemsg='Joiner-Recv' @@ -1165,15 +1177,15 @@ then ADDR="$WSREP_SST_OPT_ADDR" - if [ "${tmode#VERIFY}" != "$tmode" ] - then # backward-incompatible behavior + if [ "${tmode#VERIFY}" != "$tmode" ]; then + # backward-incompatible behavior: CN="" - if [ -n "$tpem" ] - then + if [ -n "$tpem" ]; then # find out my Common Name get_openssl if [ -z "$OPENSSL_BINARY" ]; then - wsrep_log_error 'openssl not found but it is required for authentication' + wsrep_log_error \ + 'openssl not found but it is required for authentication' exit 42 fi CN=$("$OPENSSL_BINARY" x509 -noout -subject -in "$tpem" | \ @@ -1213,15 +1225,17 @@ then if ! ps -p "$WSREP_SST_OPT_PARENT" >/dev/null 2>&1 then - wsrep_log_error "Parent mysqld process (PID: $WSREP_SST_OPT_PARENT) terminated unexpectedly." + wsrep_log_error "Parent mysqld process (PID: $WSREP_SST_OPT_PARENT)" \ + "terminated unexpectedly." exit 32 fi - if [ ! -r "$STATDIR/$IST_FILE" ] - then + if [ ! -r "$STATDIR/$IST_FILE" ]; then if [ -d "$DATA/.sst" ]; then - wsrep_log_info "WARNING: Stale temporary SST directory: '$DATA/.sst' from previous state transfer. Removing" + wsrep_log_info \ + "WARNING: Stale temporary SST directory:" \ + "'$DATA/.sst' from previous state transfer, removing..." rm -rf "$DATA/.sst" fi mkdir -p "$DATA/.sst" @@ -1229,17 +1243,20 @@ then jpid=$! wsrep_log_info "Proceeding with SST" - wsrep_log_info "Cleaning the existing datadir and innodb-data/log directories" + wsrep_log_info \ + "Cleaning the existing datadir and innodb-data/log directories" if [ "$OS" = 'FreeBSD' ]; then find -E ${ib_home_dir:+"$ib_home_dir"} \ ${ib_undo_dir:+"$ib_undo_dir"} \ ${ib_log_dir:+"$ib_log_dir"} \ - "$DATA" -mindepth 1 -prune -regex "$cpat" -o -exec rm -rfv {} 1>&2 \+ + "$DATA" -mindepth 1 -prune -regex "$cpat" \ + -o -exec rm -rfv {} 1>&2 \+ else find ${ib_home_dir:+"$ib_home_dir"} \ ${ib_undo_dir:+"$ib_undo_dir"} \ ${ib_log_dir:+"$ib_log_dir"} \ - "$DATA" -mindepth 1 -prune -regex "$cpat" -o -exec rm -rfv {} 1>&2 \+ + "$DATA" -mindepth 1 -prune -regex "$cpat" \ + -o -exec rm -rfv {} 1>&2 \+ fi get_binlog @@ -1248,9 +1265,9 @@ then binlog_dir=$(dirname "$WSREP_SST_OPT_BINLOG") cd "$binlog_dir" wsrep_log_info "Cleaning the binlog directory $binlog_dir as well" - rm -fv "$WSREP_SST_OPT_BINLOG".[0-9]* 1>&2 \+ || true + rm -fv "$WSREP_SST_OPT_BINLOG".[0-9]* 1>&2 \+ || : [ -f "$WSREP_SST_OPT_BINLOG_INDEX" ] && \ - rm -fv "$WSREP_SST_OPT_BINLOG_INDEX" 1>&2 \+ || true + rm -fv "$WSREP_SST_OPT_BINLOG_INDEX" 1>&2 \+ || : cd "$OLD_PWD" fi @@ -1262,7 +1279,8 @@ then monitor_process $jpid if [ ! -s "$DATA/xtrabackup_checkpoints" ]; then - wsrep_log_error "xtrabackup_checkpoints missing, failed mariabackup/SST on donor" + wsrep_log_error "xtrabackup_checkpoints missing," \ + "failed mariabackup/SST on donor" exit 2 fi @@ -1277,7 +1295,7 @@ then if [ -n "$qpfiles" ]; then wsrep_log_info "Compressed qpress files found" - if [ -z "$(command -v qpress)" ]; then + if [ -z "$(commandex qpress)" ]; then wsrep_log_error "qpress utility not found in the path" exit 22 fi @@ -1300,14 +1318,17 @@ then # Decompress the qpress files wsrep_log_info "Decompression with $nproc threads" - timeit "Joiner-Decompression" "find '$DATA' -type f -name '*.qp' -printf '%p\n%h\n' | $dcmd" + timeit "Joiner-Decompression" \ + "find '$DATA' -type f -name '*.qp' -printf '%p\n%h\n' | $dcmd" extcode=$? if [ $extcode -eq 0 ]; then wsrep_log_info "Removing qpress files after decompression" find "$DATA" -type f -name '*.qp' -delete if [ $? -ne 0 ]; then - wsrep_log_error "Something went wrong with deletion of qpress files. Investigate" + wsrep_log_error \ + "Something went wrong with deletion of qpress files." \ + "Investigate" fi else wsrep_log_error "Decompression failed. Exit code: $extcode" @@ -1321,7 +1342,7 @@ then BINLOG_FILENAME=$(basename "$WSREP_SST_OPT_BINLOG") # To avoid comparing data directory and BINLOG_DIRNAME - mv "$DATA/$BINLOG_FILENAME".* "$BINLOG_DIRNAME/" 2>/dev/null || true + mv "$DATA/$BINLOG_FILENAME".* "$BINLOG_DIRNAME/" 2>/dev/null || : cd "$BINLOG_DIRNAME" for bfile in $(ls -1 "$BINLOG_FILENAME".[0-9]*); do @@ -1336,7 +1357,8 @@ then timeit "mariabackup prepare stage" "$INNOAPPLY" if [ $? -ne 0 ]; then - wsrep_log_error "mariabackup apply finished with errors. Check syslog or '$INNOAPPLYLOG' for details" + wsrep_log_error "mariabackup apply finished with errors." \ + "Check syslog or '$INNOAPPLYLOG' for details." exit 22 fi diff --git a/scripts/wsrep_sst_mysqldump.sh b/scripts/wsrep_sst_mysqldump.sh index 798bee1ac100d..bed2cac0a9a9d 100644 --- a/scripts/wsrep_sst_mysqldump.sh +++ b/scripts/wsrep_sst_mysqldump.sh @@ -19,7 +19,6 @@ # This is a reference script for mysqldump-based state snapshot tansfer . $(dirname "$0")/wsrep_sst_common -PATH=$PATH:/usr/sbin:/usr/bin:/sbin:/bin EINVAL=22 @@ -93,8 +92,7 @@ DROP PREPARE stmt;" SET_START_POSITION="SET GLOBAL wsrep_start_position='$WSREP_SST_OPT_GTID';" SET_WSREP_GTID_DOMAIN_ID="" -if [ -n $WSREP_SST_OPT_GTID_DOMAIN_ID ] -then +if [ -n $WSREP_SST_OPT_GTID_DOMAIN_ID ]; then SET_WSREP_GTID_DOMAIN_ID=" SET @val = (SELECT GLOBAL_VALUE FROM INFORMATION_SCHEMA.SYSTEM_VARIABLES WHERE VARIABLE_NAME = 'WSREP_GTID_STRICT_MODE' AND GLOBAL_VALUE > 0); SET @stmt = IF (@val IS NOT NULL, 'SET GLOBAL WSREP_GTID_DOMAIN_ID=$WSREP_SST_OPT_GTID_DOMAIN_ID', 'SET @dummy = 0'); @@ -103,7 +101,7 @@ then DROP PREPARE stmt;" fi -MYSQL="$MYSQL_CLIENT $WSREP_SST_OPT_CONF_UNQUOTED "\ +MYSQL="$MYSQL_CLIENT$WSREP_SST_OPT_CONF_UNQUOTED "\ "$AUTH -h$WSREP_SST_OPT_HOST_UNESCAPED "\ "-P$WSREP_SST_OPT_PORT --disable-reconnect --connect_timeout=10" @@ -125,8 +123,7 @@ SET_GTID_BINLOG_STATE="" SQL_LOG_BIN_OFF="" # Safety check -if [ ${SERVER_VERSION%%.*} -gt 5 ] -then +if [ ${SERVER_VERSION%%.*} -gt 5 ]; then # If binary logging is enabled on the joiner node, we need to copy donor's # gtid_binlog_state to joiner. In order to do that, a RESET MASTER must be # executed to erase binary logs (if any). Binary logging should also be @@ -140,7 +137,7 @@ then fi # NOTE: we don't use --routines here because we're dumping mysql.proc table -MYSQLDUMP="$MYSQLDUMP $WSREP_SST_OPT_CONF_UNQUOTED $AUTH -S$WSREP_SST_OPT_SOCKET \ +MYSQLDUMP="$MYSQLDUMP$WSREP_SST_OPT_CONF_UNQUOTED $AUTH -S$WSREP_SST_OPT_SOCKET \ --add-drop-database --add-drop-table --skip-add-locks --create-options \ --disable-keys --extended-insert --skip-lock-tables --quick --set-charset \ --skip-comments --flush-privileges --all-databases --events" diff --git a/scripts/wsrep_sst_rsync.sh b/scripts/wsrep_sst_rsync.sh index 29c9cd4347026..b0cc8cb30664d 100644 --- a/scripts/wsrep_sst_rsync.sh +++ b/scripts/wsrep_sst_rsync.sh @@ -25,9 +25,6 @@ STUNNEL_REAL_PID=0 # stunnel process id OS="$(uname)" [ "$OS" = 'Darwin' ] && export -n LD_LIBRARY_PATH -# Setting the path for lsof on CentOS -export PATH="/usr/sbin:/sbin:$PATH" - . $(dirname "$0")/wsrep_sst_common wsrep_check_datadir @@ -37,7 +34,8 @@ cleanup_joiner() { local failure=0 - wsrep_log_info "Joiner cleanup: rsync PID=$RSYNC_REAL_PID, stunnel PID=$STUNNEL_REAL_PID" + wsrep_log_info "Joiner cleanup: rsync PID=$RSYNC_REAL_PID," \ + "stunnel PID=$STUNNEL_REAL_PID" if [ -n "$STUNNEL" ]; then if cleanup_pid $STUNNEL_REAL_PID "$STUNNEL_PID" "$STUNNEL_CONF"; then @@ -87,7 +85,7 @@ check_pid_and_port() if [ $lsof_available -ne 0 ]; then port_info=$(lsof -Pnl -i ":$port" 2>/dev/null | \ - grep -F '(LISTEN)') + grep -F '(LISTEN)') echo "$port_info" | \ grep -q -E "[[:space:]](\\*|\\[?::\\]?):$port[[:space:]]" && busy=1 else @@ -124,7 +122,7 @@ check_pid_and_port() fi if ! check_port "$pid" "$port" "$utils"; then - wsrep_log_error "rsync or stunnel daemon port '$port' " \ + wsrep_log_error "rsync or stunnel daemon port '$port'" \ "has been taken by another program" exit 16 # EBUSY fi @@ -223,6 +221,7 @@ FILTER="-f '- /lost+found' SSTKEY=$(parse_cnf 'sst' 'tkey') SSTCERT=$(parse_cnf 'sst' 'tcert') SSTCA=$(parse_cnf 'sst' 'tca') +SSTCAP=$(parse_cnf 'sst' 'tcapath') SST_SECTIONS="--mysqld|sst" @@ -231,28 +230,34 @@ check_server_ssl_config() SSTKEY=$(parse_cnf "$SST_SECTIONS" 'ssl-key') SSTCERT=$(parse_cnf "$SST_SECTIONS" 'ssl-cert') SSTCA=$(parse_cnf "$SST_SECTIONS" 'ssl-ca') + SSTCAP=$(parse_cnf "$SST_SECTIONS" 'ssl-capath') } SSLMODE=$(parse_cnf "$SST_SECTIONS" 'ssl-mode' | tr [:lower:] [:upper:]) # no old-style SSL config in [sst], check for new one: -if [ -z "$SSTKEY" -a -z "$SSTCERT" -a -z "$SSTCA" ]; then +if [ -z "$SSTKEY" -a -z "$SSTCERT" -a -z "$SSTCA" -a -z "$SSTCAP" ]; then check_server_ssl_config fi -SSTPATH=0 if [ -n "$SSTCA" ]; then - SSTCA=$(trim_string "$SSTCA") - if [ "${SSTCA%/}" != "$SSTCA" ]; then - SSTPATH=1 - fi + SSTCA=$(trim_string "$SSTCA") + if [ "${SSTCA%/}" != "$SSTCA" ] || [ -d "$SSTCA" ]; then + SSTCAP="$SSTCA" + SSTCA="" + fi +fi + +if [ -n "$SSTCAP" ]; then + SSTCAP=$(trim_string "$SSTCAP") fi if [ -z "$SSLMODE" ]; then # Implicit verification if CA is set and the SSL mode # is not specified by user: - if [ -n "$SSTCA" ]; then - if [ -n "$(command -v stunnel)" ]; then + if [ -n "$SSTCA$SSTCAP" ]; then + STUNNEL_BIN=$(commandex 'stunnel') + if [ -n "$STUNNEL_BIN" ]; then SSLMODE='VERIFY_CA' fi # Require SSL by default if SSL key and cert are present: @@ -265,17 +270,18 @@ if [ -n "$SSTCERT" -a -n "$SSTKEY" ]; then verify_cert_matches_key "$SSTCERT" "$SSTKEY" fi -if [ -n "$SSTCA" ]; then - if [ $SSTPATH -eq 0 ]; then +CAFILE_OPT="" +CAPATH_OPT="" +if [ -n "$SSTCA$SSTCAP" ]; then + if [ -n "$SSTCA" ]; then CAFILE_OPT="CAfile = $SSTCA" - else - CAFILE_OPT="CApath = $SSTCA" + fi + if [ -n "$SSTCAP" ]; then + CAPATH_OPT="CApath = $SSTCAP" fi if [ -n "$SSTCERT" ]; then - verify_ca_matches_cert "$SSTCA" "$SSTCERT" $SSTPATH + verify_ca_matches_cert "$SSTCERT" "$SSTCA" "$SSTCAP" fi -else - CAFILE_OPT="" fi VERIFY_OPT="" @@ -295,7 +301,7 @@ then exit 22 # EINVAL ;; esac - if [ -z "$SSTCA" ]; then + if [ -z "$SSTCA$SSTCAP" ]; then wsrep_log_error "Can't have ssl-mode='$SSLMODE' without CA file or path" exit 22 # EINVAL fi @@ -318,9 +324,12 @@ fi STUNNEL="" if [ -n "$SSLMODE" -a "$SSLMODE" != 'DISABLED' ]; then - STUNNEL_BIN="$(command -v stunnel)" + if [ -z "${STUNNEL_BIN+x}" ]; then + STUNNEL_BIN=$(commandex 'stunnel') + fi if [ -n "$STUNNEL_BIN" ]; then - wsrep_log_info "Using stunnel for SSL encryption: CA: '$SSTCA', ssl-mode='$SSLMODE'" + wsrep_log_info "Using stunnel for SSL encryption: CA: '$SSTCA'," \ + "CAPATH='$SSTCAP', ssl-mode='$SSLMODE'" STUNNEL="$STUNNEL_BIN $STUNNEL_CONF" fi fi @@ -340,6 +349,7 @@ then key = $SSTKEY cert = $SSTCERT ${CAFILE_OPT} +${CAPATH_OPT} foreground = yes pid = $STUNNEL_PID debug = warning @@ -392,8 +402,8 @@ EOF # Prepare binlog files cd "$BINLOG_DIRNAME" - binlog_files_full=$(tail -n $BINLOG_N_FILES "$WSREP_SST_OPT_BINLOG_INDEX") - + binlog_files_full=$(tail -n $BINLOG_N_FILES \ + "$WSREP_SST_OPT_BINLOG_INDEX") binlog_files="" for ii in $binlog_files_full do @@ -417,9 +427,10 @@ EOF WHOLE_FILE_OPT="--whole-file" fi - # first, the normal directories, so that we can detect incompatible protocol + # first, the normal directories, so that we can detect + # incompatible protocol: RC=0 - eval rsync ${STUNNEL:+"'--rsh=$STUNNEL'"} \ + eval rsync ${STUNNEL:+"--rsh='$STUNNEL'"} \ --owner --group --perms --links --specials \ --ignore-times --inplace --dirs --delete --quiet \ $WHOLE_FILE_OPT $FILTER "'$WSREP_SST_OPT_DATA/'" \ @@ -430,8 +441,9 @@ EOF case $RC in 12) RC=71 # EPROTO wsrep_log_error \ - "rsync server on the other end has incompatible protocol. " \ - "Make sure you have the same version of rsync on all nodes." + "rsync server on the other end has incompatible" \ + "protocol. Make sure you have the same version of" \ + "rsync on all nodes." ;; 22) RC=12 # ENOMEM ;; @@ -481,9 +493,9 @@ EOF find . -maxdepth 1 -mindepth 1 -type d -not -name 'lost+found' \ -not -name '.zfs' -print0 | xargs -I{} -0 -P $backup_threads \ rsync ${STUNNEL:+--rsh="$STUNNEL"} \ - --owner --group --perms --links --specials \ - --ignore-times --inplace --recursive --delete --quiet \ - $WHOLE_FILE_OPT --exclude '*/ib_logfile*' --exclude '*/aria_log.*' \ + --owner --group --perms --links --specials --ignore-times \ + --inplace --recursive --delete --quiet $WHOLE_FILE_OPT \ + --exclude '*/ib_logfile*' --exclude '*/aria_log.*' \ --exclude '*/aria_log_control' "$WSREP_SST_OPT_DATA/{}/" \ "rsync://$WSREP_SST_OPT_ADDR/{}" >&2 || RC=$? @@ -514,7 +526,8 @@ EOF fi rsync ${STUNNEL:+--rsh="$STUNNEL"} \ - --archive --quiet --checksum "$MAGIC_FILE" "rsync://$WSREP_SST_OPT_ADDR" + --archive --quiet --checksum "$MAGIC_FILE" \ + "rsync://$WSREP_SST_OPT_ADDR" echo "done $STATE" @@ -546,7 +559,8 @@ then check_round=0 while check_pid "$STUNNEL_PID" 1 do - wsrep_log_info "lingering stunnel daemon found at startup, waiting for it to exit" + wsrep_log_info "Lingering stunnel daemon found at startup," \ + "waiting for it to exit" check_round=$(( check_round + 1 )) if [ $check_round -eq 10 ]; then wsrep_log_error "stunnel daemon already running." @@ -563,7 +577,8 @@ then check_round=0 while check_pid "$RSYNC_PID" 1 do - wsrep_log_info "lingering rsync daemon found at startup, waiting for it to exit" + wsrep_log_info "Lingering rsync daemon found at startup," \ + "waiting for it to exit" check_round=$(( check_round + 1 )) if [ $check_round -eq 10 ]; then wsrep_log_error "rsync daemon already running." @@ -575,9 +590,7 @@ then [ -f "$MAGIC_FILE" ] && rm -f "$MAGIC_FILE" [ -f "$BINLOG_TAR_FILE" ] && rm -f "$BINLOG_TAR_FILE" - if [ -z "$STUNNEL" ]; then - [ -f "$STUNNEL_CONF" ] && rm -f "$STUNNEL_CONF" - fi + [ -z "$STUNNEL" ] && [ -f "$STUNNEL_CONF" ] && rm -f "$STUNNEL_CONF" ADDR="$WSREP_SST_OPT_ADDR" RSYNC_PORT="$WSREP_SST_OPT_PORT" @@ -628,19 +641,21 @@ EOF echo $$ > "$SST_PID" - if [ -z "$STUNNEL" ] - then - rsync --daemon --no-detach --port "$RSYNC_PORT" --config "$RSYNC_CONF" $RSYNC_EXTRA_ARGS & + if [ -z "$STUNNEL" ]; then + rsync --daemon --no-detach --port "$RSYNC_PORT" \ + --config "$RSYNC_CONF" $RSYNC_EXTRA_ARGS & RSYNC_REAL_PID=$! TRANSFER_REAL_PID=$RSYNC_REAL_PID TRANSFER_PID="$RSYNC_PID" else # Let's check if the path to the config file contains a space? + RSYNC_BIN=$(commandex 'rsync') if [ "${RSYNC_CONF#* }" = "$RSYNC_CONF" ]; then cat << EOF > "$STUNNEL_CONF" key = $SSTKEY cert = $SSTCERT ${CAFILE_OPT} +${CAPATH_OPT} foreground = yes pid = $STUNNEL_PID debug = warning @@ -650,17 +665,18 @@ ${CHECK_OPT} ${CHECK_OPT_LOCAL} [rsync] accept = $STUNNEL_ACCEPT -exec = $(command -v rsync) +exec = $RSYNC_BIN execargs = rsync --server --daemon --config=$RSYNC_CONF . EOF else # The path contains a space, so we will run it via # shell with "eval" command: - export RSYNC_CMD="eval $(command -v rsync) --server --daemon --config='$RSYNC_CONF' ." + export RSYNC_CMD="eval '$RSYNC_BIN' --server --daemon --config='$RSYNC_CONF' ." cat << EOF > "$STUNNEL_CONF" key = $SSTKEY cert = $SSTCERT ${CAFILE_OPT} +${CAPATH_OPT} foreground = yes pid = $STUNNEL_PID debug = warning @@ -688,7 +704,8 @@ EOF # find out my Common Name get_openssl if [ -z "$OPENSSL_BINARY" ]; then - wsrep_log_error 'openssl not found but it is required for authentication' + wsrep_log_error \ + 'openssl not found but it is required for authentication' exit 42 fi CN=$("$OPENSSL_BINARY" x509 -noout -subject -in "$SSTCERT" | \ @@ -703,7 +720,8 @@ EOF ADDR="$WSREP_SST_OPT_HOST" fi - until check_pid_and_port "$TRANSFER_PID" $TRANSFER_REAL_PID "$RSYNC_ADDR_UNESCAPED" "$RSYNC_PORT" + until check_pid_and_port "$TRANSFER_PID" $TRANSFER_REAL_PID \ + "$RSYNC_ADDR_UNESCAPED" "$RSYNC_PORT" do sleep 0.2 done @@ -722,7 +740,7 @@ EOF if ! ps -p $MYSQLD_PID >/dev/null 2>&1 then wsrep_log_error \ - "Parent mysqld process (PID: $MYSQLD_PID) terminated unexpectedly." + "Parent mysqld process (PID: $MYSQLD_PID) terminated unexpectedly." kill -- -$MYSQLD_PID sleep 1 exit 32 @@ -768,10 +786,11 @@ EOF if [ -r "$MAGIC_FILE" ]; then if [ -n "$MY_SECRET" ]; then # check donor supplied secret - SECRET=$(grep -F -- "$SECRET_TAG " "$MAGIC_FILE" 2>/dev/null | cut -d ' ' -f 2) + SECRET=$(grep -F -- "$SECRET_TAG " "$MAGIC_FILE" 2>/dev/null | \ + cut -d ' ' -f 2) if [ "$SECRET" != "$MY_SECRET" ]; then wsrep_log_error "Donor does not know my secret!" - wsrep_log_info "Donor:'$SECRET', my:'$MY_SECRET'" + wsrep_log_info "Donor: '$SECRET', my: '$MY_SECRET'" exit 32 fi # remove secret from the magic file, and output diff --git a/vio/viosslfactories.c b/vio/viosslfactories.c index d9fcc942a7173..fbf75729cc62b 100644 --- a/vio/viosslfactories.c +++ b/vio/viosslfactories.c @@ -232,6 +232,12 @@ new_VioSSLFd(const char *key_file, const char *cert_file, struct st_VioSSLFd *ssl_fd; long ssl_ctx_options; DBUG_ENTER("new_VioSSLFd"); + + if (ca_file && ! ca_file[0]) ca_file = NULL; + if (ca_path && ! ca_path[0]) ca_path = NULL; + if (crl_file && ! crl_file[0]) crl_file = NULL; + if (crl_path && ! crl_path[0]) crl_path = NULL; + DBUG_PRINT("enter", ("key_file: '%s' cert_file: '%s' ca_file: '%s' ca_path: '%s' " "cipher: '%s' crl_file: '%s' crl_path: '%s'", @@ -379,6 +385,11 @@ new_VioSSLConnectorFd(const char *key_file, const char *cert_file, struct st_VioSSLFd *ssl_fd; int verify= SSL_VERIFY_PEER; + if (ca_file && ! ca_file[0]) ca_file = NULL; + if (ca_path && ! ca_path[0]) ca_path = NULL; + if (crl_file && ! crl_file[0]) crl_file = NULL; + if (crl_path && ! crl_path[0]) crl_path = NULL; + /* Turn off verification of servers certificate if both ca_file and ca_path is set to NULL @@ -411,6 +422,12 @@ new_VioSSLAcceptorFd(const char *key_file, const char *cert_file, { struct st_VioSSLFd *ssl_fd; int verify= SSL_VERIFY_PEER | SSL_VERIFY_CLIENT_ONCE; + + if (ca_file && ! ca_file[0]) ca_file = NULL; + if (ca_path && ! ca_path[0]) ca_path = NULL; + if (crl_file && ! crl_file[0]) crl_file = NULL; + if (crl_path && ! crl_path[0]) crl_path = NULL; + if (!(ssl_fd= new_VioSSLFd(key_file, cert_file, ca_file, ca_path, cipher, FALSE, error, crl_file, crl_path, tls_version))) From ef9517eb81cf6c278e88622b3fa4a668a8bcb13f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Wed, 15 Dec 2021 14:17:55 +0200 Subject: [PATCH 20/65] MDEV-27268 Failed InnoDB initialization leaves garbage files behind create_log_files(): Check log_set_capacity() before modifying or creating any log files. innobase_start_or_create_for_mysql(): If create_log_files() fails and we were initializing a new database, delete the system tablespace files before exiting. --- mysql-test/suite/innodb/r/log_file.result | 1 - mysql-test/suite/innodb/t/log_file.test | 3 --- storage/innobase/srv/srv0start.cc | 15 +++++++++++---- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/mysql-test/suite/innodb/r/log_file.result b/mysql-test/suite/innodb/r/log_file.result index b93bfc0d02b2d..952b9f3a3afd6 100644 --- a/mysql-test/suite/innodb/r/log_file.result +++ b/mysql-test/suite/innodb/r/log_file.result @@ -14,7 +14,6 @@ WHERE engine = 'innodb' AND support IN ('YES', 'DEFAULT', 'ENABLED'); ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS FOUND 1 /File .path.to.non-existent.*ib_logfile101: 'create' returned OS error \d+/ in mysqld.1.err -# Remove ibdata1 & ibdata2 # Successfully let InnoDB create tablespaces SELECT COUNT(*) `1` FROM INFORMATION_SCHEMA.ENGINES WHERE engine='innodb' diff --git a/mysql-test/suite/innodb/t/log_file.test b/mysql-test/suite/innodb/t/log_file.test index 8a82ab7f29fa7..7aca2336de602 100644 --- a/mysql-test/suite/innodb/t/log_file.test +++ b/mysql-test/suite/innodb/t/log_file.test @@ -67,9 +67,6 @@ eval $check_no_innodb; let SEARCH_PATTERN=File .path.to.non-existent.*ib_logfile101: 'create' returned OS error \d+; --source include/search_pattern_in_file.inc ---echo # Remove ibdata1 & ibdata2 ---remove_file $bugdir/ibdata1 ---remove_file $bugdir/ibdata2 --list_files $bugdir --echo # Successfully let InnoDB create tablespaces diff --git a/storage/innobase/srv/srv0start.cc b/storage/innobase/srv/srv0start.cc index 9548730b359f3..9fc18272a2aec 100644 --- a/storage/innobase/srv/srv0start.cc +++ b/storage/innobase/srv/srv0start.cc @@ -3,7 +3,7 @@ Copyright (c) 1996, 2017, Oracle and/or its affiliates. All rights reserved. Copyright (c) 2008, Google Inc. Copyright (c) 2009, Percona Inc. -Copyright (c) 2013, 2020, MariaDB Corporation. +Copyright (c) 2013, 2021, MariaDB Corporation. Portions of this file contain modifications contributed and copyrighted by Google, Inc. Those modifications are gratefully acknowledged and are described @@ -426,6 +426,10 @@ create_log_files( return(DB_READ_ONLY); } + if (!log_set_capacity(srv_log_file_size_requested)) { + return(DB_ERROR); + } + /* Crashing after deleting the first file should be recoverable. The buffer pool was clean, and we can simply create all log files from the scratch. */ @@ -482,9 +486,6 @@ create_log_files( } log_init(srv_n_log_files); - if (!log_set_capacity(srv_log_file_size_requested)) { - return(DB_ERROR); - } fil_open_log_and_system_tablespace_files(); @@ -1936,6 +1937,12 @@ innobase_start_or_create_for_mysql() logfilename, dirnamelen, flushed_lsn, logfile0); if (err != DB_SUCCESS) { + for (Tablespace::const_iterator + i = srv_sys_space.begin(); + i != srv_sys_space.end(); i++) { + os_file_delete(innodb_data_file_key, + i->filepath()); + } return(srv_init_abort(err)); } } else { From 3691cc15751b01afaa807de1fb6f83b75668c479 Mon Sep 17 00:00:00 2001 From: Monty Date: Wed, 15 Dec 2021 16:28:01 +0200 Subject: [PATCH 21/65] MDEV-18187 Aria engine: Redo phase failed with "error 192 when executing record redo_index_new_page" upon startup on a restored datadir The issue is that when recovery is about to create a new data or index page it check if the page already exits. If the page does not exists (file is too short) or contains wrong checksum, then the recovery code will recreate the page. The bug was that the code that checked if the page existed didn't take into account encrypted pages. Fixed by adding a check if page could not be encrypted solved the issue. I also added some code to silence decryption errors for new pages. Test case and some inspiration for how to solve this come from the pull request by alexandr.miloslavsky --- .../r/maria_recover_encrypted.result | 53 +++++++++++ .../t/maria_recover_encrypted.test | 90 +++++++++++++++++++ storage/maria/ma_blockrec.c | 10 ++- storage/maria/ma_check.c | 6 +- storage/maria/ma_crypt.c | 18 ++-- storage/maria/ma_key_recover.c | 3 +- storage/maria/maria_def.h | 1 + 7 files changed, 171 insertions(+), 10 deletions(-) create mode 100644 mysql-test/suite/large_tests/r/maria_recover_encrypted.result create mode 100644 mysql-test/suite/large_tests/t/maria_recover_encrypted.test diff --git a/mysql-test/suite/large_tests/r/maria_recover_encrypted.result b/mysql-test/suite/large_tests/r/maria_recover_encrypted.result new file mode 100644 index 0000000000000..a7293d45db609 --- /dev/null +++ b/mysql-test/suite/large_tests/r/maria_recover_encrypted.result @@ -0,0 +1,53 @@ +DROP TABLE IF EXISTS t1; +DROP PROCEDURE IF EXISTS proc_insert_many; +CREATE TABLE t1 ( +field1 INTEGER NOT NULL, +field2 INTEGER NOT NULL, +field3 INTEGER NOT NULL, +KEY i_1 (field1), +KEY i_2 (field2), +KEY i_3 (field3), +KEY i_12 (field1, field2), +KEY i_13 (field1, field3), +KEY i_21 (field2, field1), +KEY i_23 (field2, field3), +KEY i_31 (field3, field1), +KEY i_32 (field3, field2), +KEY i_123 (field1, field2, field3), +KEY i_132 (field1, field3, field2), +KEY i_213 (field2, field1, field3), +KEY i_231 (field2, field3, field1), +KEY i_312 (field3, field1, field2), +KEY i_321 (field3, field2, field1) +) ENGINE=Aria; +CREATE PROCEDURE proc_insert_many() +BEGIN +DECLARE iRow INT DEFAULT 0; +insertRows: LOOP +IF (iRow = 70000) THEN +LEAVE insertRows; +END IF; +INSERT INTO t1 VALUES (1000000+iRow,2000000+iRow,3000000+iRow); +SET iRow = iRow + 1; +END LOOP insertRows; +END| +LOCK TABLES t1 WRITE; +CALL proc_insert_many(); +UNLOCK TABLES; +SET debug_dbug="d,crash_shutdown"; +shutdown; +ERROR HY000: Lost connection to MySQL server during query +SELECT * FROM t1 ORDER BY 1 DESC LIMIT 10; +field1 field2 field3 +1069999 2069999 3069999 +1069998 2069998 3069998 +1069997 2069997 3069997 +1069996 2069996 3069996 +1069995 2069995 3069995 +1069994 2069994 3069994 +1069993 2069993 3069993 +1069992 2069992 3069992 +1069991 2069991 3069991 +1069990 2069990 3069990 +DROP TABLE IF EXISTS t1; +DROP PROCEDURE IF EXISTS proc_insert_many; diff --git a/mysql-test/suite/large_tests/t/maria_recover_encrypted.test b/mysql-test/suite/large_tests/t/maria_recover_encrypted.test new file mode 100644 index 0000000000000..4c590e5e1f93f --- /dev/null +++ b/mysql-test/suite/large_tests/t/maria_recover_encrypted.test @@ -0,0 +1,90 @@ +# MDEV-18187: If server crashes before flushing index pages in an +# encrypted Aria table, it could permanently fail to repair the table + +--source include/have_maria.inc +--source include/default_charset.inc + +# Cleanup +--disable_warnings +DROP TABLE IF EXISTS t1; +DROP PROCEDURE IF EXISTS proc_insert_many; +--enable_warnings + +# -------- + +# Configure encryption +--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect +--shutdown_server +--source include/wait_until_disconnected.inc + +--write_file $MYSQLTEST_VARDIR/key.txt +1;76025E3ADC78D74819927DB02AAA4C35 +EOF + +--exec echo "restart:--aria-encrypt-tables=1 --plugin-load-add=file_key_management --file-key-management --file-key-management-filename=$MYSQLTEST_VARDIR/key.txt" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect +--enable_reconnect +--source include/wait_until_connected_again.inc + +# Create table with many indexes so that its index size grows quickly +# and it can be grown to needed size without too many inserts +CREATE TABLE t1 ( + field1 INTEGER NOT NULL, + field2 INTEGER NOT NULL, + field3 INTEGER NOT NULL, + KEY i_1 (field1), + KEY i_2 (field2), + KEY i_3 (field3), + KEY i_12 (field1, field2), + KEY i_13 (field1, field3), + KEY i_21 (field2, field1), + KEY i_23 (field2, field3), + KEY i_31 (field3, field1), + KEY i_32 (field3, field2), + KEY i_123 (field1, field2, field3), + KEY i_132 (field1, field3, field2), + KEY i_213 (field2, field1, field3), + KEY i_231 (field2, field3, field1), + KEY i_312 (field3, field1, field2), + KEY i_321 (field3, field2, field1) +) ENGINE=Aria; + +# Create procedures to insert many rows. +DELIMITER |; +CREATE PROCEDURE proc_insert_many() +BEGIN + DECLARE iRow INT DEFAULT 0; + insertRows: LOOP + IF (iRow = 70000) THEN + LEAVE insertRows; + END IF; + + INSERT INTO t1 VALUES (1000000+iRow,2000000+iRow,3000000+iRow); + SET iRow = iRow + 1; + END LOOP insertRows; +END| +DELIMITER ;| + +# Call the procedure to insert rows. +# Use 'LOCK TABLES' to make things a lot faster. +# Note that his code doesn't reproduce for some reason: +# INSERT INTO t1 SELECT 1000000+seq,2000000+seq,3000000+seq FROM seq_1_to_70000; +LOCK TABLES t1 WRITE; +CALL proc_insert_many(); +UNLOCK TABLES; + +# Crash and restart the server while it's still flushing index +--exec echo "restart:--aria-encrypt-tables=1 --plugin-load-add=file_key_management --file-key-management --file-key-management-filename=$MYSQLTEST_VARDIR/key.txt" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect +SET debug_dbug="d,crash_shutdown"; +--error 2013 +shutdown; +--enable_reconnect +--source include/wait_until_connected_again.inc + +# Access the table to trigger repair; validate repaired data +SELECT * FROM t1 ORDER BY 1 DESC LIMIT 10; + +# -------- + +# Cleanup +DROP TABLE IF EXISTS t1; +DROP PROCEDURE IF EXISTS proc_insert_many; diff --git a/storage/maria/ma_blockrec.c b/storage/maria/ma_blockrec.c index 592aab6da4167..667cc26758d1e 100644 --- a/storage/maria/ma_blockrec.c +++ b/storage/maria/ma_blockrec.c @@ -6379,16 +6379,19 @@ uint _ma_apply_redo_insert_row_head_or_tail(MARIA_HA *info, LSN lsn, pin_method= PAGECACHE_PIN_LEFT_PINNED; share->pagecache->readwrite_flags&= ~MY_WME; + share->silence_encryption_errors= 1; buff= pagecache_read(share->pagecache, &info->dfile, page, 0, 0, PAGECACHE_PLAIN_PAGE, PAGECACHE_LOCK_WRITE, &page_link.link); share->pagecache->readwrite_flags= share->pagecache->org_readwrite_flags; + share->silence_encryption_errors= 0; if (!buff) { /* Skip errors when reading outside of file and uninitialized pages */ if (!new_page || (my_errno != HA_ERR_FILE_TOO_SHORT && - my_errno != HA_ERR_WRONG_CRC)) + my_errno != HA_ERR_WRONG_CRC && + my_errno != HA_ERR_DECRYPTION_FAILED)) { DBUG_PRINT("error", ("Error %d when reading page", (int) my_errno)); goto err; @@ -6880,6 +6883,7 @@ uint _ma_apply_redo_insert_row_blobs(MARIA_HA *info, else { share->pagecache->readwrite_flags&= ~MY_WME; + share->silence_encryption_errors= 1; buff= pagecache_read(share->pagecache, &info->dfile, page, 0, 0, @@ -6887,10 +6891,12 @@ uint _ma_apply_redo_insert_row_blobs(MARIA_HA *info, PAGECACHE_LOCK_WRITE, &page_link.link); share->pagecache->readwrite_flags= share->pagecache-> org_readwrite_flags; + share->silence_encryption_errors= 0; if (!buff) { if (my_errno != HA_ERR_FILE_TOO_SHORT && - my_errno != HA_ERR_WRONG_CRC) + my_errno != HA_ERR_WRONG_CRC && + my_errno != HA_ERR_DECRYPTION_FAILED) { /* If not read outside of file */ pagecache_unlock_by_link(share->pagecache, page_link.link, diff --git a/storage/maria/ma_check.c b/storage/maria/ma_check.c index 3a65cd61d08d0..98f9c49b9fabb 100644 --- a/storage/maria/ma_check.c +++ b/storage/maria/ma_check.c @@ -4931,7 +4931,8 @@ static int sort_get_next_record(MARIA_SORT_PARAM *sort_param) DBUG_RETURN(-1); } /* Retry only if wrong record, not if disk error */ - if (flag != HA_ERR_WRONG_IN_RECORD && flag != HA_ERR_WRONG_CRC) + if (flag != HA_ERR_WRONG_IN_RECORD && flag != HA_ERR_WRONG_CRC && + flag != HA_ERR_DECRYPTION_FAILED) { retry_if_quick(sort_param, flag); DBUG_RETURN(flag); @@ -6741,7 +6742,8 @@ static int _ma_safe_scan_block_record(MARIA_SORT_INFO *sort_info, PAGECACHE_READ_UNKNOWN_PAGE, PAGECACHE_LOCK_LEFT_UNLOCKED, 0))) { - if (my_errno == HA_ERR_WRONG_CRC) + if (my_errno == HA_ERR_WRONG_CRC || + my_errno == HA_ERR_DECRYPTION_FAILED) { /* Don't give errors for zero filled blocks. These can diff --git a/storage/maria/ma_crypt.c b/storage/maria/ma_crypt.c index 564edb4bbe896..33cf72b0b1efa 100644 --- a/storage/maria/ma_crypt.c +++ b/storage/maria/ma_crypt.c @@ -345,7 +345,14 @@ static my_bool ma_crypt_index_post_read_hook(int res, const uint block_size= share->block_size; const uint page_used= _ma_get_page_used(share, args->page); - if (res == 0 && page_used <= block_size - CRC_SIZE) + if (res || + page_used < share->keypage_header || + page_used >= block_size - CRC_SIZE) + { + res= 1; + my_errno= HA_ERR_DECRYPTION_FAILED; + } + else { const uchar *src= args->page; uchar* dst= args->crypt_buf; @@ -506,10 +513,11 @@ static int ma_decrypt(MARIA_SHARE *share, MARIA_CRYPT_DATA *crypt_data, if (! (rc == MY_AES_OK && dstlen == size)) { my_errno= HA_ERR_DECRYPTION_FAILED; - my_printf_error(HA_ERR_DECRYPTION_FAILED, - "failed to decrypt '%s' rc: %d dstlen: %u size: %u\n", - MYF(ME_FATAL|ME_ERROR_LOG), - share->open_file_name.str, rc, dstlen, size); + if (!share->silence_encryption_errors) + my_printf_error(HA_ERR_DECRYPTION_FAILED, + "failed to decrypt '%s' rc: %d dstlen: %u size: %u\n", + MYF(ME_FATAL|ME_ERROR_LOG), + share->open_file_name.str, rc, dstlen, size); return 1; } return 0; diff --git a/storage/maria/ma_key_recover.c b/storage/maria/ma_key_recover.c index afa69fce4440d..2f28ec8d175ee 100644 --- a/storage/maria/ma_key_recover.c +++ b/storage/maria/ma_key_recover.c @@ -767,7 +767,8 @@ uint _ma_apply_redo_index_new_page(MARIA_HA *info, LSN lsn, &page_link.link))) { if (my_errno != HA_ERR_FILE_TOO_SHORT && - my_errno != HA_ERR_WRONG_CRC) + my_errno != HA_ERR_WRONG_CRC && + my_errno != HA_ERR_DECRYPTION_FAILED) { result= 1; goto err; diff --git a/storage/maria/maria_def.h b/storage/maria/maria_def.h index 6c9649ede45b2..c51ae2b95f76f 100644 --- a/storage/maria/maria_def.h +++ b/storage/maria/maria_def.h @@ -502,6 +502,7 @@ typedef struct st_maria_share my_bool key_del_used; /* != 0 if key_del is locked */ my_bool deleting; /* we are going to delete this table */ my_bool redo_error_given; /* Used during recovery */ + my_bool silence_encryption_errors; /* Used during recovery */ THR_LOCK lock; void (*lock_restore_status)(void *); /** From f1ca949f2bcb3a0bd32fbb2c0eed7ba7dd1e099f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Lindstr=C3=B6m?= Date: Wed, 15 Dec 2021 13:16:29 +0200 Subject: [PATCH 22/65] Disable following tests from galera_3nodes suite * galera_pc_bootstrap * galera_ipv6_mariabackup * galera_ipv6_mariabackup_section * galera_ipv6_rsync * galera_ipv6_rsync_section * galera_ssl_reload * galera_toi_vote * galera_wsrep_schema_init because MTR sporadaically fails: Failed to start mysqld or mysql_shutdown failed --- mysql-test/suite/galera_3nodes/disabled.def | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/mysql-test/suite/galera_3nodes/disabled.def b/mysql-test/suite/galera_3nodes/disabled.def index 9100db4d44184..bbeddc8dcd8ad 100644 --- a/mysql-test/suite/galera_3nodes/disabled.def +++ b/mysql-test/suite/galera_3nodes/disabled.def @@ -15,6 +15,14 @@ galera_gtid_2_cluster : MDEV-23775 Galera test failure on galera_3nodes.galera_g galera_ist_gcache_rollover : MDEV-23578 WSREP: exception caused by message: {v=0,t=1,ut=255,o=4,s=0,sr=0,as=1,f=6,src=50524cfe,srcvid=view_id(REG,50524cfe,4),insvid=view_id(UNKNOWN,00000000,0),ru=00000000,r=[-1,-1],fs=75,nl=(} galera_load_data_ist : MDEV-24639 galera_3nodes.galera_load_data_ist MTR failed with SIGABRT: query 'reap' failed: 2013: Lost connection to MySQL server during query galera_load_data_ist : MDEV-24639 galera_3nodes.galera_load_data_ist MTR failed with SIGABRT: query 'reap' failed: 2013: Lost connection to MySQL server during query +galera_pc_bootstrap : MDEV-24097 MTR sporadaically fails: Failed to start mysqld or mysql_shutdown failed galera_safe_to_bootstrap : MDEV-24097 galera_3nodes.galera_safe_to_bootstrap MTR sporadaically fails: Failed to start mysqld or mysql_shutdown failed galera_slave_options_do : MDEV-8798 galera_slave_options_ignore : MDEV-8798 +galera_ipv6_mariabackup : MDEV-24097 MTR sporadaically fails: Failed to start mysqld or mysql_shutdown failed +galera_ipv6_mariabackup_section : MDEV-24097 MTR sporadaically fails: Failed to start mysqld or mysql_shutdown failed +galera_ipv6_rsync : MDEV-24097 MTR sporadaically fails: Failed to start mysqld or mysql_shutdown failed +galera_ipv6_rsync_section : MDEV-24097 MTR sporadaically fails: Failed to start mysqld or mysql_shutdown failed +galera_ssl_reload : MDEV-24097 MTR sporadaically fails: Failed to start mysqld or mysql_shutdown failed +galera_toi_vote : MDEV-24097 MTR sporadaically fails: Failed to start mysqld or mysql_shutdown failed +galera_wsrep_schema_init : MDEV-24097 MTR sporadaically fails: Failed to start mysqld or mysql_shutdown failed From 607b14c4dc3e052238ba58498607f70883f54a20 Mon Sep 17 00:00:00 2001 From: Monty Date: Tue, 19 Oct 2021 16:41:45 +0300 Subject: [PATCH 23/65] Add --optimizer_trace option to mysqltest This enables optimizer_trace output for the next SQL command. Identical as if one would have done: - Store value of @@optimizer_trace - Set @optimizer_trace="enabled=on" - Run query - SELECT * from OPTIMIZER_TRACE - Restore value of @@optimizer_trace This is a great time saver when one wants to quickly check the optimizer trace for a query in a mtr test. --- client/mysqltest.cc | 102 ++++++++++++++++++++++++++++++- mysql-test/main/opt_trace.result | 2 - mysql-test/main/opt_trace.test | 4 +- 3 files changed, 102 insertions(+), 6 deletions(-) diff --git a/client/mysqltest.cc b/client/mysqltest.cc index 3ea279218eb16..ad2eca21ec954 100644 --- a/client/mysqltest.cc +++ b/client/mysqltest.cc @@ -132,6 +132,7 @@ static my_bool disable_info= 1; static my_bool abort_on_error= 1, opt_continue_on_error= 0; static my_bool server_initialized= 0; static my_bool is_windows= 0; +static my_bool optimizer_trace_active= 0; static char **default_argv; static const char *load_default_groups[]= { "mysqltest", "mariadb-test", "client", "client-server", "client-mariadb", @@ -388,6 +389,7 @@ enum enum_commands { Q_MOVE_FILE, Q_REMOVE_FILES_WILDCARD, Q_SEND_EVAL, Q_ENABLE_PREPARE_WARNINGS, Q_DISABLE_PREPARE_WARNINGS, Q_RESET_CONNECTION, + Q_OPTIMIZER_TRACE, Q_UNKNOWN, /* Unknown command. */ Q_COMMENT, /* Comments, ignored. */ Q_COMMENT_WITH_COMMAND, @@ -498,7 +500,7 @@ const char *command_names[]= "enable_prepare_warnings", "disable_prepare_warnings", "reset_connection", - + "optimizer_trace", 0 }; @@ -643,6 +645,9 @@ void free_all_replace(){ } void var_set_int(const char* name, int value); +void enable_optimizer_trace(struct st_connection *con); +void display_optimizer_trace(struct st_connection *con, + DYNAMIC_STRING *ds); class LogFile { @@ -1541,6 +1546,8 @@ static void die(const char *fmt, ...) { char buff[DIE_BUFF_SIZE]; va_list args; + DBUG_ENTER("die"); + va_start(args, fmt); make_error_message(buff, sizeof(buff), fmt, args); really_die(buff); @@ -7841,7 +7848,7 @@ static void handle_no_active_connection(struct st_command *command, */ void run_query_normal(struct st_connection *cn, struct st_command *command, - int flags, char *query, size_t query_len, + int flags, const char *query, size_t query_len, DYNAMIC_STRING *ds, DYNAMIC_STRING *ds_warnings) { MYSQL_RES *res= 0; @@ -7960,6 +7967,7 @@ void run_query_normal(struct st_connection *cn, struct st_command *command, /* If we come here the query is both executed and read successfully */ handle_no_error(command); + display_optimizer_trace(cn, ds); revert_properties(); end: @@ -9580,6 +9588,9 @@ int main(int argc, char **argv) case Q_RESET_CONNECTION: do_reset_connection(); break; + case Q_OPTIMIZER_TRACE: + enable_optimizer_trace(cur_con); + break; case Q_SEND_SHUTDOWN: handle_command_error(command, mysql_shutdown(cur_con->mysql, @@ -11238,3 +11249,90 @@ char *mysql_authentication_dialog_ask(MYSQL *mysql, int type, return buf; } + +/* + Enable optimizer trace for the next command +*/ + +LEX_CSTRING enable_optimizer_trace_query= +{ + STRING_WITH_LEN("set @mysqltest_save_optimzer_trace=@@optimizer_trace,@@optimizer_trace=\"enabled=on\"") +}; + +LEX_CSTRING restore_optimizer_trace_query= +{ + STRING_WITH_LEN("set @@optimizer_trace=@mysqltest_save_optimzer_trace") +}; + + +LEX_CSTRING display_optimizer_trace_query +{ + STRING_WITH_LEN("SELECT * from information_schema.optimizer_trace") +}; + + +void enable_optimizer_trace(struct st_connection *con) +{ + MYSQL *mysql= con->mysql; + my_bool save_ps_protocol_enabled= ps_protocol_enabled; + my_bool save_view_protocol_enabled= view_protocol_enabled; + DYNAMIC_STRING ds_result; + DYNAMIC_STRING ds_warnings; + struct st_command command; + DBUG_ENTER("enable_optimizer_trace"); + + if (!mysql) + DBUG_VOID_RETURN; + ps_protocol_enabled= view_protocol_enabled= 0; + + init_dynamic_string(&ds_result, NULL, 0, 256); + init_dynamic_string(&ds_warnings, NULL, 0, 256); + bzero(&command, sizeof(command)); + + run_query_normal(con, &command, QUERY_SEND_FLAG | QUERY_REAP_FLAG, + enable_optimizer_trace_query.str, + enable_optimizer_trace_query.length, + &ds_result, &ds_warnings); + dynstr_free(&ds_result); + dynstr_free(&ds_warnings); + ps_protocol_enabled= save_ps_protocol_enabled; + view_protocol_enabled= save_view_protocol_enabled; + optimizer_trace_active= 1; + DBUG_VOID_RETURN; +} + + +void display_optimizer_trace(struct st_connection *con, + DYNAMIC_STRING *ds) +{ + my_bool save_ps_protocol_enabled= ps_protocol_enabled; + my_bool save_view_protocol_enabled= view_protocol_enabled; + DYNAMIC_STRING ds_result; + DYNAMIC_STRING ds_warnings; + struct st_command command; + DBUG_ENTER("display_optimizer_trace"); + + if (!optimizer_trace_active) + DBUG_VOID_RETURN; + + optimizer_trace_active= 0; + ps_protocol_enabled= view_protocol_enabled= 0; + + init_dynamic_string(&ds_result, NULL, 0, 256); + init_dynamic_string(&ds_warnings, NULL, 0, 256); + bzero(&command, sizeof(command)); + + run_query_normal(con, &command, QUERY_SEND_FLAG | QUERY_REAP_FLAG, + display_optimizer_trace_query.str, + display_optimizer_trace_query.length, + ds, &ds_warnings); + run_query_normal(con, &command, QUERY_SEND_FLAG | QUERY_REAP_FLAG, + restore_optimizer_trace_query.str, + restore_optimizer_trace_query.length, + ds, &ds_warnings); + dynstr_free(&ds_result); + dynstr_free(&ds_warnings); + ps_protocol_enabled= save_ps_protocol_enabled; + view_protocol_enabled= save_view_protocol_enabled; + DBUG_VOID_RETURN; +} diff --git a/mysql-test/main/opt_trace.result b/mysql-test/main/opt_trace.result index f2b69fb1eaa85..0e4477e1fd938 100644 --- a/mysql-test/main/opt_trace.result +++ b/mysql-test/main/opt_trace.result @@ -571,7 +571,6 @@ create view v2 as select a from t2; explain select * from v2 ; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t2 ALL NULL NULL NULL NULL 10 -select * from information_schema.OPTIMIZER_TRACE; QUERY TRACE MISSING_BYTES_BEYOND_MAX_MEM_SIZE INSUFFICIENT_PRIVILEGES explain select * from v2 { "steps": [ @@ -685,7 +684,6 @@ explain select * from v1 ; id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY ALL NULL NULL NULL NULL 10 2 DERIVED t1 ALL NULL NULL NULL NULL 10 Using temporary; Using filesort -select * from information_schema.OPTIMIZER_TRACE; QUERY TRACE MISSING_BYTES_BEYOND_MAX_MEM_SIZE INSUFFICIENT_PRIVILEGES explain select * from v1 { "steps": [ diff --git a/mysql-test/main/opt_trace.test b/mysql-test/main/opt_trace.test index 2084940fbc55f..9d4794855e0c5 100644 --- a/mysql-test/main/opt_trace.test +++ b/mysql-test/main/opt_trace.test @@ -48,12 +48,12 @@ create view v1 as select a from t1 group by b; create view v2 as select a from t2; --echo # Mergeable view +--optimizer_trace explain select * from v2 ; -select * from information_schema.OPTIMIZER_TRACE; --echo # Non-Mergeable view +--optimizer_trace explain select * from v1 ; -select * from information_schema.OPTIMIZER_TRACE; drop table t1,t2; drop view v1,v2; From 136bcfdf7504092e7e49eba95e8be010da44c594 Mon Sep 17 00:00:00 2001 From: Sergei Petrunia Date: Wed, 15 Dec 2021 15:12:06 +0300 Subject: [PATCH 24/65] MDEV-27270: Wrong query plan with Range Checked for Each Record and ORDER BY ... LIMIT Followup to fix for MDEV-25858: When test_if_skip_sort_order() decides to use an index to satisfy ORDER BY ... LIMIT clause, it should disable "Range Checked for Each Record" optimization. Do this in all cases. --- mysql-test/r/order_by_innodb.result | 23 +++++++++++++++++++++++ mysql-test/t/order_by_innodb.test | 22 ++++++++++++++++++++++ sql/sql_select.cc | 8 ++++++++ 3 files changed, 53 insertions(+) diff --git a/mysql-test/r/order_by_innodb.result b/mysql-test/r/order_by_innodb.result index 14b9b861a142d..28922ef65f27a 100644 --- a/mysql-test/r/order_by_innodb.result +++ b/mysql-test/r/order_by_innodb.result @@ -198,5 +198,28 @@ id id 1 NULL 2 1 3 3 +# +# MDEV-27270: Wrong query plan with Range Checked for Each Record and ORDER BY ... LIMIT +# +# This must NOT have "Range checked for each record" without any +# provisions to produce rows in the required ordering: +explain +select +t1.id,t2.id +from +t1 left join +t2 on t2.id2 = t1.id and +t2.id = (select dd.id +from t2 dd +where +dd.id2 = t1.id and +d1 > '2019-02-06 00:00:00' + order by +dd.d1, dd.d2, dd.id limit 1 +); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 index NULL PRIMARY 4 NULL # Using index +1 PRIMARY t2 eq_ref PRIMARY,id2 PRIMARY 4 func # Using where +2 DEPENDENT SUBQUERY dd range id2,for_latest_sort for_latest_sort 6 NULL # Using where drop table t1,t2; # End of 10.2 tests diff --git a/mysql-test/t/order_by_innodb.test b/mysql-test/t/order_by_innodb.test index 97c043b8dbce6..af12644c07357 100644 --- a/mysql-test/t/order_by_innodb.test +++ b/mysql-test/t/order_by_innodb.test @@ -184,6 +184,28 @@ from order by dd.d1 desc, dd.d2 desc, dd.id desc limit 1 ); + +--echo # +--echo # MDEV-27270: Wrong query plan with Range Checked for Each Record and ORDER BY ... LIMIT +--echo # + +--echo # This must NOT have "Range checked for each record" without any +--echo # provisions to produce rows in the required ordering: +--replace_column 9 # +explain +select + t1.id,t2.id +from + t1 left join + t2 on t2.id2 = t1.id and + t2.id = (select dd.id + from t2 dd + where + dd.id2 = t1.id and + d1 > '2019-02-06 00:00:00' + order by + dd.d1, dd.d2, dd.id limit 1 + ); drop table t1,t2; --echo # End of 10.2 tests diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 47422116e389a..3079145c1b94c 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -21986,7 +21986,15 @@ test_if_skip_sort_order(JOIN_TAB *tab,ORDER *order,ha_rows select_limit, } } else if (select && select->quick) + { + /* Cancel "Range checked for each record" */ + if (tab->use_quick == 2) + { + tab->use_quick= 1; + tab->read_first_record= join_init_read_record; + } select->quick->need_sorted_output(); + } tab->read_record.unlock_row= (tab->type == JT_EQ_REF) ? join_read_key_unlock_row : rr_unlock_row; From 20f22dfa2f2d5bb5a1511d42a5bb18fbf469e812 Mon Sep 17 00:00:00 2001 From: Monty Date: Wed, 15 Dec 2021 23:29:04 +0200 Subject: [PATCH 25/65] Fixed some tests that failes when built with valgrind Example build: ./BUILD/compile-pentium64-valgrind-max Fixes: - sp-no-valgrind failed if binary was built for valgrind as in this case mem_root is allocated in very small hunks which the test cannot handle. Fixed by testing of valgrind build - truncate_notembedded failed in reap because of more memory used. Fixed by allowing reap to fail too --- mysql-test/include/not_valgrind_build.inc | 4 ++++ mysql-test/main/sp-no-valgrind.test | 2 +- mysql-test/main/truncate_notembedded.test | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 mysql-test/include/not_valgrind_build.inc diff --git a/mysql-test/include/not_valgrind_build.inc b/mysql-test/include/not_valgrind_build.inc new file mode 100644 index 0000000000000..2b60f11bfc703 --- /dev/null +++ b/mysql-test/include/not_valgrind_build.inc @@ -0,0 +1,4 @@ +if (`select version() like '%valgrind%'`) +{ + skip Does not run with binaries built with valgrind; +} diff --git a/mysql-test/main/sp-no-valgrind.test b/mysql-test/main/sp-no-valgrind.test index 89f8250bf726c..21e52f2d3d555 100644 --- a/mysql-test/main/sp-no-valgrind.test +++ b/mysql-test/main/sp-no-valgrind.test @@ -1,5 +1,5 @@ ---source include/not_valgrind.inc +--source include/not_valgrind_build.inc --echo # MDEV-20699 do not cache SP in SHOW CREATE --echo # Warmup round, this might allocate some memory for session variable diff --git a/mysql-test/main/truncate_notembedded.test b/mysql-test/main/truncate_notembedded.test index c1fab2d3609a3..8b6d2becfa9da 100644 --- a/mysql-test/main/truncate_notembedded.test +++ b/mysql-test/main/truncate_notembedded.test @@ -18,6 +18,7 @@ SELECT * FROM t1; UNLOCK TABLES; --connection con1 +--error 0,ER_OPTION_PREVENTS_STATEMENT --reap # This may work or fail as different servers uses different amount of # memory and the statement may work or not. What is important is that we From 2776635cb98d35867447d375fdc04a44ef11a697 Mon Sep 17 00:00:00 2001 From: Daniel Black Date: Wed, 19 May 2021 14:56:09 +1000 Subject: [PATCH 26/65] MDEV-24788: mariadbd --help Can't lock aria control file ... '/var/lib/mysql/aria_log_control' for exclusive use, error: 11 As such don't lock under aria_readonly (which is set by opt_help in the handler initialization. Fixes: 8eba777c2bbad7721c818936a3a0ced3b2fcd59c --- mysql-test/main/mysqld--help-aria.result | 4 ---- mysql-test/main/mysqld--help-aria.test | 7 +------ storage/maria/ma_control_file.c | 4 ++-- 3 files changed, 3 insertions(+), 12 deletions(-) diff --git a/mysql-test/main/mysqld--help-aria.result b/mysql-test/main/mysqld--help-aria.result index 70e7d8930c4f8..fb44c3ea3eeff 100644 --- a/mysql-test/main/mysqld--help-aria.result +++ b/mysql-test/main/mysqld--help-aria.result @@ -1,7 +1,3 @@ -[ERROR] mariadbd: Can't lock aria aria_log_control for exclusive use, error: #. Will retry for 0 seconds -[ERROR] Plugin 'Aria' init function returned error. -[ERROR] Plugin 'Aria' registration as a STORAGE ENGINE failed. -[Warning] Could not open mysql.plugin table: "Unknown storage engine 'Aria'". Some options may be missing from the help text # # Check that we don't write any data to wrong or not existing datadir # diff --git a/mysql-test/main/mysqld--help-aria.test b/mysql-test/main/mysqld--help-aria.test index 253a46492f02e..55131e9e4eb51 100644 --- a/mysql-test/main/mysqld--help-aria.test +++ b/mysql-test/main/mysqld--help-aria.test @@ -2,15 +2,10 @@ # Check errors from mysqld--help when providing different datadir # -# We can't run this test on windows as windows doesn't provide file locking -# which the first exec requires. - ---source include/not_windows.inc - --let $args=--table-cache=5 --max-connections=10 --log-warnings=1 --silent-startup --lower-case-table-names=1 --help --verbose --exec $MYSQLD_CMD $args > $MYSQL_TMP_DIR/mysqld--help2.txt 2> $MYSQL_TMP_DIR/mysqld--help2.err ---replace_regex /mysqld/mariadbd/ /\d\d\d\d-\d*-\d* *\d*:\d*:\d* \d* // /control file '.*aria_log_control'/aria_log_control/ /error: \d+/error: #/ +--replace_regex /mysqld/mariadbd/ /\d\d\d\d-\d*-\d* *\d*:\d*:\d* \d* // --cat_file $MYSQL_TMP_DIR/mysqld--help2.err --echo # diff --git a/storage/maria/ma_control_file.c b/storage/maria/ma_control_file.c index 65b8b0922aa92..af1708c72b240 100644 --- a/storage/maria/ma_control_file.c +++ b/storage/maria/ma_control_file.c @@ -314,7 +314,7 @@ CONTROL_FILE_ERROR ma_control_file_open(my_bool create_if_missing, errmsg= "Can't create file"; goto err; } - if (lock_control_file(name, wait_for_lock)) + if (!aria_readonly && lock_control_file(name, wait_for_lock)) { error= CONTROL_FILE_LOCKED; errmsg= lock_failed_errmsg; @@ -332,7 +332,7 @@ CONTROL_FILE_ERROR ma_control_file_open(my_bool create_if_missing, } /* lock it before reading content */ - if (lock_control_file(name, wait_for_lock)) + if (!aria_readonly && lock_control_file(name, wait_for_lock)) { error= CONTROL_FILE_LOCKED; errmsg= lock_failed_errmsg; From fff8ac2e966ac123a091a3e1be22b59cbc1c7e9b Mon Sep 17 00:00:00 2001 From: Dmitry Shulga Date: Mon, 8 Nov 2021 15:22:06 +0700 Subject: [PATCH 27/65] MDEV-21866: Assertion `!result' failed in convert_const_to_int upon 2nd execution of PS Consider the following use case: MariaDB [test]> CREATE TABLE t1 (field1 BIGINT DEFAULT -1); MariaDB [test]> CREATE VIEW v1 AS SELECT DISTINCT field1 FROM t1; Repeated execution of the following query as a Prepared Statement MariaDB [test]> PREPARE stmt FROM 'SELECT * FROM v1 WHERE field1 <=> NULL'; MariaDB [test]> EXECUTE stmt; results in a crash for a server built with DEBUG. MariaDB [test]> EXECUTE stmt; ERROR 2013 (HY000): Lost connection to MySQL server during query Assertion failed: (!result), function convert_const_to_int, file item_cmpfunc.cc, line 476. Abort trap: 6 (core dumped) The crash inside the function convert_const_to_int() happens by the reason that the value -1 is stored in an instance of the class Field_longlong on restoring its original value in the statement result= field->store(orig_field_val, TRUE); that leads to assigning the value 1 to the variable 'result' with subsequent crash in the DBUG_ASSERT statement following it DBUG_ASSERT(!result); The main matter here is why this assertion failure happens on the second execution of the prepared statement and doens't on the first one. On first handling of the statement 'EXECUTE stmt;' a temporary table is created for serving the query involving the view 'v1'. The table is created by the function create_tmp_table() in the following calls trace: (trace #1) JOIN::prepare (at sql_select.cc:725) st_select_lex::handle_derived LEX::handle_list_of_derived TABLE_LIST::handle_derived mysql_handle_single_derived mysql_derived_prepare select_union::create_result_table create_tmp_table Note, that the data member TABLE::status of a TABLE instance returned by the function create_tmp_table() has the value 0. Later the function setup_table_map() is called on the TABLE instance just created for the sake of the temporary table (calls trace #2 is below): JOIN::prepare (at sql_select.cc:737) setup_tables_and_check_access setup_tables setup_table_map where the data member TABLE::status is set to the value STATUS_NO_RECORD. After that when execution of the method JOIN::prepare reaches calling of the function setup_without_group() the following calls trace is invoked JOIN::prepare setup_without_group setup_conds Item_func::fix_fields Item_func_equal::fix_length_and_dec Item_bool_rowready_func2::fix_length_and_dec Item_func::setup_args_and_comparator Item_func::convert_const_compared_to_int_field convert_const_to_int There is the following code snippet in the function convert_const_to_int() at the line item_cmpfunc.cc:448 bool save_field_value= (field_item->const_item() || !(field->table->status & STATUS_NO_RECORD)); Since field->table->status has bits STATUS_NO_RECORD set the variable save_field_value is false and therefore neither the method Field_longlong::val_int() nor the method Field_longlong::store is called on the Field instance that has the numeric value -1. That is the reason why first execution of the Prepared Statement for the query 'SELECT * FROM v1 WHERE field1 <=> NULL' is successful. On second running of the statement 'EXECUTE stmt' a new temporary tables is also created by running the calls trace #1 but the trace #2 is not executed by the reason that data member SELECT_LEX::first_cond_optimization has been set to false on first execution of the prepared statemet (in the method JOIN::optimize_inner()). As a consequence, the data member TABLE::status for a temporary table just created doesn't have the flags STATUS_NO_RECORD set and therefore on re-execution of the prepared statement the methods Field_longlong::val_int() and Field_longlong::store() are called for the field having the value -1 and the DBUG_ASSERT(!result) is fired. To fix the issue the data member TABLE::status has to be assigned the value STATUS_NO_RECORD in every place where the macros empty_record() is called to emptify a record for just instantiated TABLE object created on behalf the new temporary table. --- mysql-test/r/ps.result | 13 +++++++++++++ mysql-test/t/ps.test | 16 ++++++++++++++++ sql/sql_select.cc | 3 ++- 3 files changed, 31 insertions(+), 1 deletion(-) diff --git a/mysql-test/r/ps.result b/mysql-test/r/ps.result index f1f779ef03fbe..1cd41e5b3a461 100644 --- a/mysql-test/r/ps.result +++ b/mysql-test/r/ps.result @@ -5474,5 +5474,18 @@ id select_type table type possible_keys key key_len ref rows filtered Extra 2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables DEALLOCATE PREPARE stmt; DROP TABLE t1, t2, t3; +# +# MDEV-21866: Assertion `!result' failed in convert_const_to_int upon 2nd execution of PS +# +CREATE TABLE t1 (a BIGINT DEFAULT -1); +CREATE VIEW v1 AS SELECT DISTINCT a FROM t1; +PREPARE stmt FROM 'SELECT * FROM v1 WHERE a <=> NULL'; +EXECUTE stmt; +a +EXECUTE stmt; +a +DEALLOCATE PREPARE stmt; +DROP VIEW v1; +DROP TABLE t1; # End of 10.2 tests # diff --git a/mysql-test/t/ps.test b/mysql-test/t/ps.test index 2e7b43ad74885..4097d28a949f2 100644 --- a/mysql-test/t/ps.test +++ b/mysql-test/t/ps.test @@ -4961,5 +4961,21 @@ EXECUTE stmt; DEALLOCATE PREPARE stmt; DROP TABLE t1, t2, t3; +--echo # +--echo # MDEV-21866: Assertion `!result' failed in convert_const_to_int upon 2nd execution of PS +--echo # + +CREATE TABLE t1 (a BIGINT DEFAULT -1); +CREATE VIEW v1 AS SELECT DISTINCT a FROM t1; +PREPARE stmt FROM 'SELECT * FROM v1 WHERE a <=> NULL'; +EXECUTE stmt; +EXECUTE stmt; + +# Cleanup +DEALLOCATE PREPARE stmt; +DROP VIEW v1; +DROP TABLE t1; + + --echo # End of 10.2 tests --echo # diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 3079145c1b94c..a331f4f3dbc2a 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -17556,7 +17556,7 @@ create_tmp_table(THD *thd, TMP_TABLE_PARAM *param, List &fields, // Make empty record so random data is not written to disk empty_record(table); - + table->status= STATUS_NO_RECORD; thd->mem_root= mem_root_save; DBUG_RETURN(table); @@ -18557,6 +18557,7 @@ bool instantiate_tmp_table(TABLE *table, KEY *keyinfo, return TRUE; // Make empty record so random data is not written to disk empty_record(table); + table->status= STATUS_NO_RECORD; } if (open_tmp_table(table)) return TRUE; From a65d01a4cf04c744f9355bec186430540ce6ba08 Mon Sep 17 00:00:00 2001 From: Dmitry Shulga Date: Wed, 20 Oct 2021 19:24:31 +0700 Subject: [PATCH 28/65] MDEV-23182: Server crashes in Item::fix_fields_if_needed / table_value_constr::prepare upon 2nd execution of PS Repeating execution of a query containing the clause IN with string literals in environment where the server variable in_predicate_conversion_threshold is set results in server abnormal termination in case the query is run as a Prepared Statement and conversion of charsets for string values in the query are required. The reason for server abnormal termination is that instances of the class Item_string created on transforming the IN clause into subquery were created on runtime memory root that is deallocated on finishing execution of Prepared statement. On the other hand, references to Items placed on deallocated memory root still exist in objects of the class table_value_constr. Subsequent running of the same prepared statement leads to dereferencing of pointers to already deallocated memory that could lead to undefined behaviour. To fix the issue the values being pushed into a values list for TVC are created by cloning their original items. This way the cloned items are allocate on the PS memroot and as consequences no dangling pointer does more exist. --- mysql-test/main/table_value_constr.result | 42 +++++++++++++++++++++ mysql-test/main/table_value_constr.test | 46 +++++++++++++++++++++++ sql/sql_tvc.cc | 8 +++- 3 files changed, 94 insertions(+), 2 deletions(-) diff --git a/mysql-test/main/table_value_constr.result b/mysql-test/main/table_value_constr.result index 1d1cd05455649..7ff5fb7fa5ea0 100644 --- a/mysql-test/main/table_value_constr.result +++ b/mysql-test/main/table_value_constr.result @@ -3100,4 +3100,46 @@ select * from (values (3),(7),(1) union values (2),(4) order by 1 limit 2) as dt 1 2 drop table t1; +# +# MDEV-23182: Server crashes in +# Item::fix_fields_if_needed / table_value_constr::prepare upon 2nd execution of PS +# +SET @save_in_predicate_conversion_threshold=@@in_predicate_conversion_threshold; +SET in_predicate_conversion_threshold=2; +CREATE TABLE t1 (c VARCHAR(10)) DEFAULT CHARSET=utf8; +PREPARE stmt FROM "SELECT * FROM t1 WHERE c IN ('10','20')"; +EXECUTE stmt; +c +# Without the patch second execution of the prepared statement 'stmt' +# results in crash. +EXECUTE stmt; +c +DEALLOCATE PREPARE stmt; +DROP TABLE t1; +# Check that the query without conversion doesn't crash server +CREATE TABLE t1 (c VARCHAR(10)); +PREPARE stmt FROM "SELECT * FROM t1 WHERE c IN ('10','20')"; +EXECUTE stmt; +c +EXECUTE stmt; +c +DEALLOCATE PREPARE stmt; +DROP TABLE t1; +# Test case for a row expression in the left part of the IN clause +CREATE TABLE t1 (a VARCHAR(3), b VARCHAR(3)) DEFAULT CHARSET=utf8; +PREPARE stmt FROM "SELECT * FROM t1 WHERE (a, b) IN (('10', '10'), ('20', '20'))"; +EXECUTE stmt; +a b +EXECUTE stmt; +a b +DROP TABLE t1; +# Check that the query without conversion is handled successfully +CREATE TABLE t1 (a VARCHAR(3), b VARCHAR(3)); +PREPARE stmt FROM "SELECT * FROM t1 WHERE (a, b) IN (('10', '10'), ('20', '20'))"; +EXECUTE stmt; +a b +EXECUTE stmt; +a b +DROP TABLE t1; +SET @@in_predicate_conversion_threshold = @save_in_predicate_conversion_threshold; End of 10.3 tests diff --git a/mysql-test/main/table_value_constr.test b/mysql-test/main/table_value_constr.test index d13962579cc1d..673e7dcdc6ebc 100644 --- a/mysql-test/main/table_value_constr.test +++ b/mysql-test/main/table_value_constr.test @@ -1650,4 +1650,50 @@ select * from (values (3),(7),(1) union values (2),(4) order by 1 limit 2) as dt drop table t1; +--echo # +--echo # MDEV-23182: Server crashes in +--echo # Item::fix_fields_if_needed / table_value_constr::prepare upon 2nd execution of PS +--echo # +SET @save_in_predicate_conversion_threshold=@@in_predicate_conversion_threshold; +SET in_predicate_conversion_threshold=2; + +CREATE TABLE t1 (c VARCHAR(10)) DEFAULT CHARSET=utf8; +PREPARE stmt FROM "SELECT * FROM t1 WHERE c IN ('10','20')"; +EXECUTE stmt; +--echo # Without the patch second execution of the prepared statement 'stmt' +--echo # results in crash. +EXECUTE stmt; +DEALLOCATE PREPARE stmt; + +DROP TABLE t1; + +--echo # Check that the query without conversion doesn't crash server +CREATE TABLE t1 (c VARCHAR(10)); +PREPARE stmt FROM "SELECT * FROM t1 WHERE c IN ('10','20')"; +EXECUTE stmt; +EXECUTE stmt; +DEALLOCATE PREPARE stmt; + +DROP TABLE t1; + +--echo # Test case for a row expression in the left part of the IN clause +CREATE TABLE t1 (a VARCHAR(3), b VARCHAR(3)) DEFAULT CHARSET=utf8; +PREPARE stmt FROM "SELECT * FROM t1 WHERE (a, b) IN (('10', '10'), ('20', '20'))"; + +EXECUTE stmt; +EXECUTE stmt; + +DROP TABLE t1; + +--echo # Check that the query without conversion is handled successfully +CREATE TABLE t1 (a VARCHAR(3), b VARCHAR(3)); +PREPARE stmt FROM "SELECT * FROM t1 WHERE (a, b) IN (('10', '10'), ('20', '20'))"; + +EXECUTE stmt; +EXECUTE stmt; + +DROP TABLE t1; + +SET @@in_predicate_conversion_threshold = @save_in_predicate_conversion_threshold; + --echo End of 10.3 tests diff --git a/sql/sql_tvc.cc b/sql/sql_tvc.cc index 96c5223ee6a49..3866b7c9352f7 100644 --- a/sql/sql_tvc.cc +++ b/sql/sql_tvc.cc @@ -539,7 +539,10 @@ bool Item_func_in::create_value_list_for_tvc(THD *thd, if (is_list_of_rows) { - Item_row *row_list= (Item_row *)(args[i]); + Item_row *row_list= (Item_row *)(args[i]->build_clone(thd)); + + if (!row_list) + return true; for (uint j=0; j < row_list->cols(); j++) { @@ -561,7 +564,8 @@ bool Item_func_in::create_value_list_for_tvc(THD *thd, sprintf(col_name, "_col_%i", 1); args[i]->set_name(thd, col_name, strlen(col_name), thd->charset()); } - if (tvc_value->push_back(args[i]->real_item())) + Item *arg_clone= args[i]->build_clone(thd); + if (!arg_clone || tvc_value->push_back(arg_clone)) return true; } From 946dafb260fc5683e1ec1410a801f2235ba2313a Mon Sep 17 00:00:00 2001 From: Vladislav Vaintroub Date: Thu, 16 Dec 2021 19:16:04 +0100 Subject: [PATCH 29/65] MDEV-26925 add test that there are no triggers in sys schema. --- mysql-test/suite/sysschema/r/t_sys_config.result | 3 +++ mysql-test/suite/sysschema/t/t_sys_config.test | 3 +-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/mysql-test/suite/sysschema/r/t_sys_config.result b/mysql-test/suite/sysschema/r/t_sys_config.result index 1def6b1f52b51..f13196c6503cf 100644 --- a/mysql-test/suite/sysschema/r/t_sys_config.result +++ b/mysql-test/suite/sysschema/r/t_sys_config.result @@ -1,3 +1,6 @@ +SELECT COUNT(*) FROM INFORMATION_SCHEMA.TRIGGERS WHERE TRIGGER_SCHEMA='sys'; +COUNT(*) +0 DESC sys.sys_config; Field Type Null Key Default Extra variable varchar(128) NO PRI NULL diff --git a/mysql-test/suite/sysschema/t/t_sys_config.test b/mysql-test/suite/sysschema/t/t_sys_config.test index 0c87d2eb95dc2..d78f8c9fd119a 100644 --- a/mysql-test/suite/sysschema/t/t_sys_config.test +++ b/mysql-test/suite/sysschema/t/t_sys_config.test @@ -1,7 +1,7 @@ -- source include/not_embedded.inc # Tests for sys schema # Verify the sys.sys_config table is as expected - +SELECT COUNT(*) FROM INFORMATION_SCHEMA.TRIGGERS WHERE TRIGGER_SCHEMA='sys'; DESC sys.sys_config; SELECT variable, value, set_by FROM sys.sys_config ORDER BY 1; @@ -11,7 +11,6 @@ UPDATE sys.sys_config SET value = 128 WHERE variable = 'statement_truncate_len'; SELECT variable, value, set_by FROM sys.sys_config ORDER BY 1; -# Ensure the sys.sys_config_insert_set_user trigger functions correctly INSERT INTO sys.sys_config (variable, value) VALUES ('foo', 'bar'); SELECT variable, value, set_by FROM sys.sys_config ORDER BY 1; From 3fd80d08740d3ad2426bfb8eb9debc40d96e2a20 Mon Sep 17 00:00:00 2001 From: Aleksey Midenkov Date: Thu, 16 Dec 2021 23:13:45 +0300 Subject: [PATCH 30/65] MDEV-27244 Table corruption upon adding serial data type MDEV-25803 excluded some cases from key sort upon alter table. That particularly depends on ALTER_ADD_INDEX flag. Creating a column of SERIAL data type missed that flag. Though equivalent operation alter table t1 add x bigint unsigned not null auto_increment unique; has ALTER_ADD_INDEX flag. --- mysql-test/suite/versioning/r/partition.result | 9 +++++++++ mysql-test/suite/versioning/t/partition.test | 10 ++++++++++ sql/sql_yacc.yy | 1 + sql/sql_yacc_ora.yy | 1 + 4 files changed, 21 insertions(+) diff --git a/mysql-test/suite/versioning/r/partition.result b/mysql-test/suite/versioning/r/partition.result index 6472c0480c387..8344e91a34f72 100644 --- a/mysql-test/suite/versioning/r/partition.result +++ b/mysql-test/suite/versioning/r/partition.result @@ -746,4 +746,13 @@ explain partitions select * from t1; id select_type table partitions type possible_keys key key_len ref rows Extra 1 SIMPLE t1 pn # NULL NULL NULL NULL # # drop table t1; +# +# MDEV-27244 Table corruption upon adding serial data type +# +create table t1 (f int, key(f)) with system versioning +partition by system_time limit 10 (partition p0 history, partition pn current); +alter table t1 add x serial; +alter table t1 add partition (partition p1 history); +alter table t1 add partition (partition p2 history); +drop table t1; # End of 10.3 tests diff --git a/mysql-test/suite/versioning/t/partition.test b/mysql-test/suite/versioning/t/partition.test index c5f6b242b530b..6eeb305c2182f 100644 --- a/mysql-test/suite/versioning/t/partition.test +++ b/mysql-test/suite/versioning/t/partition.test @@ -727,6 +727,16 @@ explain partitions select * from t1 for system_time as of '2000-01-01 02:00:00'; explain partitions select * from t1; drop table t1; +--echo # +--echo # MDEV-27244 Table corruption upon adding serial data type +--echo # +create table t1 (f int, key(f)) with system versioning +partition by system_time limit 10 (partition p0 history, partition pn current); +alter table t1 add x serial; +alter table t1 add partition (partition p1 history); +alter table t1 add partition (partition p2 history); +drop table t1; + --echo # End of 10.3 tests --source suite/versioning/common_finish.inc diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index b26ddcbb9e58e..01e3922040b03 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -6783,6 +6783,7 @@ field_type_or_serial: Lex->last_field->set_handler(&type_handler_longlong); Lex->last_field->flags|= AUTO_INCREMENT_FLAG | NOT_NULL_FLAG | UNSIGNED_FLAG | UNIQUE_KEY_FLAG; + Lex->alter_info.flags|= ALTER_ADD_INDEX; } opt_serial_attribute ; diff --git a/sql/sql_yacc_ora.yy b/sql/sql_yacc_ora.yy index 93315add399e4..5e17e41a94071 100644 --- a/sql/sql_yacc_ora.yy +++ b/sql/sql_yacc_ora.yy @@ -6625,6 +6625,7 @@ field_type_or_serial: Lex->last_field->set_handler(&type_handler_longlong); Lex->last_field->flags|= AUTO_INCREMENT_FLAG | NOT_NULL_FLAG | UNSIGNED_FLAG | UNIQUE_KEY_FLAG; + Lex->alter_info.flags|= ALTER_ADD_INDEX; } opt_serial_attribute ; From 85defc4764860613742af23acf954cfdd9397553 Mon Sep 17 00:00:00 2001 From: Julius Goryavsky Date: Fri, 17 Dec 2021 04:44:43 +0100 Subject: [PATCH 31/65] MDEV-27181 fixup: compatibility with Windows + small corrections 1) Removed symlinks that are not very well supported in tar under Windows. 2) Added comment + changed code formatting in viosslfactories.c 3) Fixed a small bug in the yassl code. 4) Fixed a typo in the script code. --- extra/yassl/src/ssl.cpp | 2 +- mysql-test/std_data/capath/3106f582.0 | 80 +++++++++++++++++++++++++- mysql-test/std_data/capath/cacert.pem | 79 -------------------------- mysql-test/std_data/capath/ed1f42db.0 | 80 +++++++++++++++++++++++++- scripts/wsrep_sst_common.sh | 2 +- vio/viosslfactories.c | 81 +++++++++++++++++++++++---- 6 files changed, 229 insertions(+), 95 deletions(-) mode change 120000 => 100644 mysql-test/std_data/capath/3106f582.0 delete mode 100644 mysql-test/std_data/capath/cacert.pem mode change 120000 => 100644 mysql-test/std_data/capath/ed1f42db.0 diff --git a/extra/yassl/src/ssl.cpp b/extra/yassl/src/ssl.cpp index c4adb4692bea6..eac691315b744 100644 --- a/extra/yassl/src/ssl.cpp +++ b/extra/yassl/src/ssl.cpp @@ -773,7 +773,7 @@ void SSL_CTX_set_verify(SSL_CTX* ctx, int mode, VerifyCallback vc) int SSL_CTX_load_verify_locations(SSL_CTX* ctx, const char* file, const char* path) { - int ret = SSL_FAILURE; + int ret = SSL_SUCCESS; if (file) ret = read_file(ctx, file, SSL_FILETYPE_PEM, CA); diff --git a/mysql-test/std_data/capath/3106f582.0 b/mysql-test/std_data/capath/3106f582.0 deleted file mode 120000 index 1310cfcff205a..0000000000000 --- a/mysql-test/std_data/capath/3106f582.0 +++ /dev/null @@ -1 +0,0 @@ -cacert.pem \ No newline at end of file diff --git a/mysql-test/std_data/capath/3106f582.0 b/mysql-test/std_data/capath/3106f582.0 new file mode 100644 index 0000000000000..23dda2318e150 --- /dev/null +++ b/mysql-test/std_data/capath/3106f582.0 @@ -0,0 +1,79 @@ +Certificate: + Data: + Version: 3 (0x2) + Serial Number: + d0:4d:23:85:ee:59:b3:fa + Signature Algorithm: sha256WithRSAEncryption + Issuer: CN=cacert, C=FI, ST=Helsinki, L=Helsinki, O=MariaDB + Validity + Not Before: Jan 27 10:11:10 2019 GMT + Not After : Jan 22 10:11:10 2039 GMT + Subject: CN=cacert, C=FI, ST=Helsinki, L=Helsinki, O=MariaDB + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + Public-Key: (2048 bit) + Modulus: + 00:e8:0e:a7:84:d3:75:30:06:30:b2:10:b9:d1:88: + 36:2b:5e:f8:c8:44:57:cb:67:72:ab:96:95:33:d5: + 88:d1:8f:23:50:98:ba:6d:20:00:80:bd:35:d5:c1: + bf:98:49:c4:0a:15:4a:34:a6:21:9b:2e:8c:15:09: + f0:63:81:02:c2:7c:e2:53:e0:f7:a1:1a:40:5e:8f: + 41:4a:4c:56:d4:20:f1:d5:a7:c1:53:2e:ff:7e:37: + 17:cc:7e:74:bd:e2:22:33:ce:8c:77:62:a4:c5:3f: + 44:35:7b:7e:b9:f5:7d:8c:7a:27:58:fd:2c:42:86: + 2e:e7:6b:01:99:7b:fe:7d:a7:a1:4f:3e:39:39:54: + 1f:61:de:74:66:d1:77:4f:43:1b:66:70:29:85:de: + fc:8f:8e:1b:7b:a2:66:48:26:7f:9b:a6:fd:4a:e4: + dc:eb:ed:bd:f8:e3:f1:57:98:13:6f:f1:a3:2a:e3: + 73:bd:8d:7c:6f:4b:59:35:bc:b5:42:3e:99:a7:13: + 8d:be:2e:5c:9a:c6:5b:ab:ae:bf:00:e9:c8:ee:05: + 22:8e:d5:67:1a:47:9a:6d:9c:f9:42:3e:15:34:f8: + 31:ec:b4:7e:d3:92:95:b0:b8:f9:66:f3:bd:1d:31: + 2c:b1:90:62:a1:f8:4e:a6:5d:26:22:f0:e1:fe:16: + 2b:69 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Subject Key Identifier: + CA:71:99:89:F0:72:AB:75:66:BB:65:6A:03:04:72:A5:7B:95:A6:93 + X509v3 Authority Key Identifier: + keyid:CA:71:99:89:F0:72:AB:75:66:BB:65:6A:03:04:72:A5:7B:95:A6:93 + + X509v3 Basic Constraints: + CA:TRUE + Signature Algorithm: sha256WithRSAEncryption + df:fd:74:29:5b:5e:9a:8b:09:02:40:59:73:cb:71:47:3f:97: + 3d:a9:fd:c4:8c:01:29:c9:86:b8:71:55:ff:72:0e:50:dc:c8: + b5:e6:91:41:52:47:21:30:cc:4d:e7:3b:4b:db:55:ea:7d:46: + eb:53:e0:b7:1b:80:7c:b1:0c:d3:d1:bc:a0:73:ae:96:1f:fd: + 05:52:7e:54:d5:03:52:69:7b:34:5f:27:d7:98:da:98:76:73: + e6:bb:50:59:2a:94:90:67:03:1c:a4:76:2f:ee:ef:59:60:09: + 48:33:03:2b:52:ed:83:42:f8:71:19:7f:d8:be:40:ed:20:01: + 90:3c:7e:1c:8b:d2:9f:f3:2f:09:1f:50:c8:10:e1:8a:d9:a5: + 49:9c:0b:74:17:b9:2b:68:f6:1e:73:c2:73:10:38:b3:35:e2: + 87:91:1b:a1:d1:9b:81:9d:1b:32:cc:03:6e:4c:82:95:81:11: + 42:56:e2:16:2b:22:65:db:40:2c:ca:dc:03:f4:d5:07:cf:f5: + 13:b2:cf:51:5b:24:cd:c7:d1:9b:42:8e:f9:df:5d:1e:5a:09: + a3:4f:a9:0b:f4:21:c5:bb:ff:02:93:67:e8:2d:ee:ab:d9:59: + 76:03:2c:a1:bd:fb:dc:af:b6:82:94:71:85:53:a8:18:0d:3a: + 9e:42:eb:59 +-----BEGIN CERTIFICATE----- +MIIDfzCCAmegAwIBAgIJANBNI4XuWbP6MA0GCSqGSIb3DQEBCwUAMFYxDzANBgNV +BAMMBmNhY2VydDELMAkGA1UEBhMCRkkxETAPBgNVBAgMCEhlbHNpbmtpMREwDwYD +VQQHDAhIZWxzaW5raTEQMA4GA1UECgwHTWFyaWFEQjAeFw0xOTAxMjcxMDExMTBa +Fw0zOTAxMjIxMDExMTBaMFYxDzANBgNVBAMMBmNhY2VydDELMAkGA1UEBhMCRkkx +ETAPBgNVBAgMCEhlbHNpbmtpMREwDwYDVQQHDAhIZWxzaW5raTEQMA4GA1UECgwH +TWFyaWFEQjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOgOp4TTdTAG +MLIQudGINite+MhEV8tncquWlTPViNGPI1CYum0gAIC9NdXBv5hJxAoVSjSmIZsu +jBUJ8GOBAsJ84lPg96EaQF6PQUpMVtQg8dWnwVMu/343F8x+dL3iIjPOjHdipMU/ +RDV7frn1fYx6J1j9LEKGLudrAZl7/n2noU8+OTlUH2HedGbRd09DG2ZwKYXe/I+O +G3uiZkgmf5um/Urk3Ovtvfjj8VeYE2/xoyrjc72NfG9LWTW8tUI+macTjb4uXJrG +W6uuvwDpyO4FIo7VZxpHmm2c+UI+FTT4Mey0ftOSlbC4+WbzvR0xLLGQYqH4TqZd +JiLw4f4WK2kCAwEAAaNQME4wHQYDVR0OBBYEFMpxmYnwcqt1ZrtlagMEcqV7laaT +MB8GA1UdIwQYMBaAFMpxmYnwcqt1ZrtlagMEcqV7laaTMAwGA1UdEwQFMAMBAf8w +DQYJKoZIhvcNAQELBQADggEBAN/9dClbXpqLCQJAWXPLcUc/lz2p/cSMASnJhrhx +Vf9yDlDcyLXmkUFSRyEwzE3nO0vbVep9RutT4LcbgHyxDNPRvKBzrpYf/QVSflTV +A1JpezRfJ9eY2ph2c+a7UFkqlJBnAxykdi/u71lgCUgzAytS7YNC+HEZf9i+QO0g +AZA8fhyL0p/zLwkfUMgQ4YrZpUmcC3QXuSto9h5zwnMQOLM14oeRG6HRm4GdGzLM +A25MgpWBEUJW4hYrImXbQCzK3AP01QfP9ROyz1FbJM3H0ZtCjvnfXR5aCaNPqQv0 +IcW7/wKTZ+gt7qvZWXYDLKG9+9yvtoKUcYVTqBgNOp5C61k= +-----END CERTIFICATE----- diff --git a/mysql-test/std_data/capath/cacert.pem b/mysql-test/std_data/capath/cacert.pem deleted file mode 100644 index 23dda2318e150..0000000000000 --- a/mysql-test/std_data/capath/cacert.pem +++ /dev/null @@ -1,79 +0,0 @@ -Certificate: - Data: - Version: 3 (0x2) - Serial Number: - d0:4d:23:85:ee:59:b3:fa - Signature Algorithm: sha256WithRSAEncryption - Issuer: CN=cacert, C=FI, ST=Helsinki, L=Helsinki, O=MariaDB - Validity - Not Before: Jan 27 10:11:10 2019 GMT - Not After : Jan 22 10:11:10 2039 GMT - Subject: CN=cacert, C=FI, ST=Helsinki, L=Helsinki, O=MariaDB - Subject Public Key Info: - Public Key Algorithm: rsaEncryption - Public-Key: (2048 bit) - Modulus: - 00:e8:0e:a7:84:d3:75:30:06:30:b2:10:b9:d1:88: - 36:2b:5e:f8:c8:44:57:cb:67:72:ab:96:95:33:d5: - 88:d1:8f:23:50:98:ba:6d:20:00:80:bd:35:d5:c1: - bf:98:49:c4:0a:15:4a:34:a6:21:9b:2e:8c:15:09: - f0:63:81:02:c2:7c:e2:53:e0:f7:a1:1a:40:5e:8f: - 41:4a:4c:56:d4:20:f1:d5:a7:c1:53:2e:ff:7e:37: - 17:cc:7e:74:bd:e2:22:33:ce:8c:77:62:a4:c5:3f: - 44:35:7b:7e:b9:f5:7d:8c:7a:27:58:fd:2c:42:86: - 2e:e7:6b:01:99:7b:fe:7d:a7:a1:4f:3e:39:39:54: - 1f:61:de:74:66:d1:77:4f:43:1b:66:70:29:85:de: - fc:8f:8e:1b:7b:a2:66:48:26:7f:9b:a6:fd:4a:e4: - dc:eb:ed:bd:f8:e3:f1:57:98:13:6f:f1:a3:2a:e3: - 73:bd:8d:7c:6f:4b:59:35:bc:b5:42:3e:99:a7:13: - 8d:be:2e:5c:9a:c6:5b:ab:ae:bf:00:e9:c8:ee:05: - 22:8e:d5:67:1a:47:9a:6d:9c:f9:42:3e:15:34:f8: - 31:ec:b4:7e:d3:92:95:b0:b8:f9:66:f3:bd:1d:31: - 2c:b1:90:62:a1:f8:4e:a6:5d:26:22:f0:e1:fe:16: - 2b:69 - Exponent: 65537 (0x10001) - X509v3 extensions: - X509v3 Subject Key Identifier: - CA:71:99:89:F0:72:AB:75:66:BB:65:6A:03:04:72:A5:7B:95:A6:93 - X509v3 Authority Key Identifier: - keyid:CA:71:99:89:F0:72:AB:75:66:BB:65:6A:03:04:72:A5:7B:95:A6:93 - - X509v3 Basic Constraints: - CA:TRUE - Signature Algorithm: sha256WithRSAEncryption - df:fd:74:29:5b:5e:9a:8b:09:02:40:59:73:cb:71:47:3f:97: - 3d:a9:fd:c4:8c:01:29:c9:86:b8:71:55:ff:72:0e:50:dc:c8: - b5:e6:91:41:52:47:21:30:cc:4d:e7:3b:4b:db:55:ea:7d:46: - eb:53:e0:b7:1b:80:7c:b1:0c:d3:d1:bc:a0:73:ae:96:1f:fd: - 05:52:7e:54:d5:03:52:69:7b:34:5f:27:d7:98:da:98:76:73: - e6:bb:50:59:2a:94:90:67:03:1c:a4:76:2f:ee:ef:59:60:09: - 48:33:03:2b:52:ed:83:42:f8:71:19:7f:d8:be:40:ed:20:01: - 90:3c:7e:1c:8b:d2:9f:f3:2f:09:1f:50:c8:10:e1:8a:d9:a5: - 49:9c:0b:74:17:b9:2b:68:f6:1e:73:c2:73:10:38:b3:35:e2: - 87:91:1b:a1:d1:9b:81:9d:1b:32:cc:03:6e:4c:82:95:81:11: - 42:56:e2:16:2b:22:65:db:40:2c:ca:dc:03:f4:d5:07:cf:f5: - 13:b2:cf:51:5b:24:cd:c7:d1:9b:42:8e:f9:df:5d:1e:5a:09: - a3:4f:a9:0b:f4:21:c5:bb:ff:02:93:67:e8:2d:ee:ab:d9:59: - 76:03:2c:a1:bd:fb:dc:af:b6:82:94:71:85:53:a8:18:0d:3a: - 9e:42:eb:59 ------BEGIN CERTIFICATE----- -MIIDfzCCAmegAwIBAgIJANBNI4XuWbP6MA0GCSqGSIb3DQEBCwUAMFYxDzANBgNV -BAMMBmNhY2VydDELMAkGA1UEBhMCRkkxETAPBgNVBAgMCEhlbHNpbmtpMREwDwYD -VQQHDAhIZWxzaW5raTEQMA4GA1UECgwHTWFyaWFEQjAeFw0xOTAxMjcxMDExMTBa -Fw0zOTAxMjIxMDExMTBaMFYxDzANBgNVBAMMBmNhY2VydDELMAkGA1UEBhMCRkkx -ETAPBgNVBAgMCEhlbHNpbmtpMREwDwYDVQQHDAhIZWxzaW5raTEQMA4GA1UECgwH -TWFyaWFEQjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOgOp4TTdTAG -MLIQudGINite+MhEV8tncquWlTPViNGPI1CYum0gAIC9NdXBv5hJxAoVSjSmIZsu -jBUJ8GOBAsJ84lPg96EaQF6PQUpMVtQg8dWnwVMu/343F8x+dL3iIjPOjHdipMU/ -RDV7frn1fYx6J1j9LEKGLudrAZl7/n2noU8+OTlUH2HedGbRd09DG2ZwKYXe/I+O -G3uiZkgmf5um/Urk3Ovtvfjj8VeYE2/xoyrjc72NfG9LWTW8tUI+macTjb4uXJrG -W6uuvwDpyO4FIo7VZxpHmm2c+UI+FTT4Mey0ftOSlbC4+WbzvR0xLLGQYqH4TqZd -JiLw4f4WK2kCAwEAAaNQME4wHQYDVR0OBBYEFMpxmYnwcqt1ZrtlagMEcqV7laaT -MB8GA1UdIwQYMBaAFMpxmYnwcqt1ZrtlagMEcqV7laaTMAwGA1UdEwQFMAMBAf8w -DQYJKoZIhvcNAQELBQADggEBAN/9dClbXpqLCQJAWXPLcUc/lz2p/cSMASnJhrhx -Vf9yDlDcyLXmkUFSRyEwzE3nO0vbVep9RutT4LcbgHyxDNPRvKBzrpYf/QVSflTV -A1JpezRfJ9eY2ph2c+a7UFkqlJBnAxykdi/u71lgCUgzAytS7YNC+HEZf9i+QO0g -AZA8fhyL0p/zLwkfUMgQ4YrZpUmcC3QXuSto9h5zwnMQOLM14oeRG6HRm4GdGzLM -A25MgpWBEUJW4hYrImXbQCzK3AP01QfP9ROyz1FbJM3H0ZtCjvnfXR5aCaNPqQv0 -IcW7/wKTZ+gt7qvZWXYDLKG9+9yvtoKUcYVTqBgNOp5C61k= ------END CERTIFICATE----- diff --git a/mysql-test/std_data/capath/ed1f42db.0 b/mysql-test/std_data/capath/ed1f42db.0 deleted file mode 120000 index 1310cfcff205a..0000000000000 --- a/mysql-test/std_data/capath/ed1f42db.0 +++ /dev/null @@ -1 +0,0 @@ -cacert.pem \ No newline at end of file diff --git a/mysql-test/std_data/capath/ed1f42db.0 b/mysql-test/std_data/capath/ed1f42db.0 new file mode 100644 index 0000000000000..23dda2318e150 --- /dev/null +++ b/mysql-test/std_data/capath/ed1f42db.0 @@ -0,0 +1,79 @@ +Certificate: + Data: + Version: 3 (0x2) + Serial Number: + d0:4d:23:85:ee:59:b3:fa + Signature Algorithm: sha256WithRSAEncryption + Issuer: CN=cacert, C=FI, ST=Helsinki, L=Helsinki, O=MariaDB + Validity + Not Before: Jan 27 10:11:10 2019 GMT + Not After : Jan 22 10:11:10 2039 GMT + Subject: CN=cacert, C=FI, ST=Helsinki, L=Helsinki, O=MariaDB + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + Public-Key: (2048 bit) + Modulus: + 00:e8:0e:a7:84:d3:75:30:06:30:b2:10:b9:d1:88: + 36:2b:5e:f8:c8:44:57:cb:67:72:ab:96:95:33:d5: + 88:d1:8f:23:50:98:ba:6d:20:00:80:bd:35:d5:c1: + bf:98:49:c4:0a:15:4a:34:a6:21:9b:2e:8c:15:09: + f0:63:81:02:c2:7c:e2:53:e0:f7:a1:1a:40:5e:8f: + 41:4a:4c:56:d4:20:f1:d5:a7:c1:53:2e:ff:7e:37: + 17:cc:7e:74:bd:e2:22:33:ce:8c:77:62:a4:c5:3f: + 44:35:7b:7e:b9:f5:7d:8c:7a:27:58:fd:2c:42:86: + 2e:e7:6b:01:99:7b:fe:7d:a7:a1:4f:3e:39:39:54: + 1f:61:de:74:66:d1:77:4f:43:1b:66:70:29:85:de: + fc:8f:8e:1b:7b:a2:66:48:26:7f:9b:a6:fd:4a:e4: + dc:eb:ed:bd:f8:e3:f1:57:98:13:6f:f1:a3:2a:e3: + 73:bd:8d:7c:6f:4b:59:35:bc:b5:42:3e:99:a7:13: + 8d:be:2e:5c:9a:c6:5b:ab:ae:bf:00:e9:c8:ee:05: + 22:8e:d5:67:1a:47:9a:6d:9c:f9:42:3e:15:34:f8: + 31:ec:b4:7e:d3:92:95:b0:b8:f9:66:f3:bd:1d:31: + 2c:b1:90:62:a1:f8:4e:a6:5d:26:22:f0:e1:fe:16: + 2b:69 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Subject Key Identifier: + CA:71:99:89:F0:72:AB:75:66:BB:65:6A:03:04:72:A5:7B:95:A6:93 + X509v3 Authority Key Identifier: + keyid:CA:71:99:89:F0:72:AB:75:66:BB:65:6A:03:04:72:A5:7B:95:A6:93 + + X509v3 Basic Constraints: + CA:TRUE + Signature Algorithm: sha256WithRSAEncryption + df:fd:74:29:5b:5e:9a:8b:09:02:40:59:73:cb:71:47:3f:97: + 3d:a9:fd:c4:8c:01:29:c9:86:b8:71:55:ff:72:0e:50:dc:c8: + b5:e6:91:41:52:47:21:30:cc:4d:e7:3b:4b:db:55:ea:7d:46: + eb:53:e0:b7:1b:80:7c:b1:0c:d3:d1:bc:a0:73:ae:96:1f:fd: + 05:52:7e:54:d5:03:52:69:7b:34:5f:27:d7:98:da:98:76:73: + e6:bb:50:59:2a:94:90:67:03:1c:a4:76:2f:ee:ef:59:60:09: + 48:33:03:2b:52:ed:83:42:f8:71:19:7f:d8:be:40:ed:20:01: + 90:3c:7e:1c:8b:d2:9f:f3:2f:09:1f:50:c8:10:e1:8a:d9:a5: + 49:9c:0b:74:17:b9:2b:68:f6:1e:73:c2:73:10:38:b3:35:e2: + 87:91:1b:a1:d1:9b:81:9d:1b:32:cc:03:6e:4c:82:95:81:11: + 42:56:e2:16:2b:22:65:db:40:2c:ca:dc:03:f4:d5:07:cf:f5: + 13:b2:cf:51:5b:24:cd:c7:d1:9b:42:8e:f9:df:5d:1e:5a:09: + a3:4f:a9:0b:f4:21:c5:bb:ff:02:93:67:e8:2d:ee:ab:d9:59: + 76:03:2c:a1:bd:fb:dc:af:b6:82:94:71:85:53:a8:18:0d:3a: + 9e:42:eb:59 +-----BEGIN CERTIFICATE----- +MIIDfzCCAmegAwIBAgIJANBNI4XuWbP6MA0GCSqGSIb3DQEBCwUAMFYxDzANBgNV +BAMMBmNhY2VydDELMAkGA1UEBhMCRkkxETAPBgNVBAgMCEhlbHNpbmtpMREwDwYD +VQQHDAhIZWxzaW5raTEQMA4GA1UECgwHTWFyaWFEQjAeFw0xOTAxMjcxMDExMTBa +Fw0zOTAxMjIxMDExMTBaMFYxDzANBgNVBAMMBmNhY2VydDELMAkGA1UEBhMCRkkx +ETAPBgNVBAgMCEhlbHNpbmtpMREwDwYDVQQHDAhIZWxzaW5raTEQMA4GA1UECgwH +TWFyaWFEQjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOgOp4TTdTAG +MLIQudGINite+MhEV8tncquWlTPViNGPI1CYum0gAIC9NdXBv5hJxAoVSjSmIZsu +jBUJ8GOBAsJ84lPg96EaQF6PQUpMVtQg8dWnwVMu/343F8x+dL3iIjPOjHdipMU/ +RDV7frn1fYx6J1j9LEKGLudrAZl7/n2noU8+OTlUH2HedGbRd09DG2ZwKYXe/I+O +G3uiZkgmf5um/Urk3Ovtvfjj8VeYE2/xoyrjc72NfG9LWTW8tUI+macTjb4uXJrG +W6uuvwDpyO4FIo7VZxpHmm2c+UI+FTT4Mey0ftOSlbC4+WbzvR0xLLGQYqH4TqZd +JiLw4f4WK2kCAwEAAaNQME4wHQYDVR0OBBYEFMpxmYnwcqt1ZrtlagMEcqV7laaT +MB8GA1UdIwQYMBaAFMpxmYnwcqt1ZrtlagMEcqV7laaTMAwGA1UdEwQFMAMBAf8w +DQYJKoZIhvcNAQELBQADggEBAN/9dClbXpqLCQJAWXPLcUc/lz2p/cSMASnJhrhx +Vf9yDlDcyLXmkUFSRyEwzE3nO0vbVep9RutT4LcbgHyxDNPRvKBzrpYf/QVSflTV +A1JpezRfJ9eY2ph2c+a7UFkqlJBnAxykdi/u71lgCUgzAytS7YNC+HEZf9i+QO0g +AZA8fhyL0p/zLwkfUMgQ4YrZpUmcC3QXuSto9h5zwnMQOLM14oeRG6HRm4GdGzLM +A25MgpWBEUJW4hYrImXbQCzK3AP01QfP9ROyz1FbJM3H0ZtCjvnfXR5aCaNPqQv0 +IcW7/wKTZ+gt7qvZWXYDLKG9+9yvtoKUcYVTqBgNOp5C61k= +-----END CERTIFICATE----- diff --git a/scripts/wsrep_sst_common.sh b/scripts/wsrep_sst_common.sh index 5c84aa7c17f57..040cd31caa9a2 100644 --- a/scripts/wsrep_sst_common.sh +++ b/scripts/wsrep_sst_common.sh @@ -1111,7 +1111,7 @@ verify_ca_matches_cert() [ -n "$ca" ] && [ ! -r "$ca" ] && readable=0 [ -n "$cap" ] && [ ! -r "$cap" ] && readable=0 - if [ readable -eq 0 ]; then + if [ $readable -eq 0 ]; then wsrep_log_error \ "Both PEM file and CA file (or path) must be readable" exit 22 diff --git a/vio/viosslfactories.c b/vio/viosslfactories.c index 08f0905e04416..fe98032273657 100644 --- a/vio/viosslfactories.c +++ b/vio/viosslfactories.c @@ -179,10 +179,29 @@ new_VioSSLFd(const char *key_file, const char *cert_file, long ssl_ctx_options= SSL_OP_NO_SSLv2 | SSL_OP_NO_SSLv3; DBUG_ENTER("new_VioSSLFd"); - if (ca_file && ! ca_file[0]) ca_file = NULL; - if (ca_path && ! ca_path[0]) ca_path = NULL; - if (crl_file && ! crl_file[0]) crl_file = NULL; - if (crl_path && ! crl_path[0]) crl_path = NULL; + /* + If some optional parameters indicate empty strings, then + for compatibility with SSL libraries, replace them with NULL, + otherwise these libraries will try to open files with an empty + name, etc., and they will return an error code instead performing + the necessary operations: + */ + if (ca_file && !ca_file[0]) + { + ca_file = NULL; + } + if (ca_path && !ca_path[0]) + { + ca_path = NULL; + } + if (crl_file && !crl_file[0]) + { + crl_file = NULL; + } + if (crl_path && !crl_path[0]) + { + crl_path = NULL; + } DBUG_PRINT("enter", ("key_file: '%s' cert_file: '%s' ca_file: '%s' ca_path: '%s' " @@ -314,10 +333,29 @@ new_VioSSLConnectorFd(const char *key_file, const char *cert_file, struct st_VioSSLFd *ssl_fd; int verify= SSL_VERIFY_PEER; - if (ca_file && ! ca_file[0]) ca_file = NULL; - if (ca_path && ! ca_path[0]) ca_path = NULL; - if (crl_file && ! crl_file[0]) crl_file = NULL; - if (crl_path && ! crl_path[0]) crl_path = NULL; + /* + If some optional parameters indicate empty strings, then + for compatibility with SSL libraries, replace them with NULL, + otherwise these libraries will try to open files with an empty + name, etc., and they will return an error code instead performing + the necessary operations: + */ + if (ca_file && !ca_file[0]) + { + ca_file = NULL; + } + if (ca_path && !ca_path[0]) + { + ca_path = NULL; + } + if (crl_file && !crl_file[0]) + { + crl_file = NULL; + } + if (crl_path && !crl_path[0]) + { + crl_path = NULL; + } /* Turn off verification of servers certificate if both @@ -351,10 +389,29 @@ new_VioSSLAcceptorFd(const char *key_file, const char *cert_file, struct st_VioSSLFd *ssl_fd; int verify= SSL_VERIFY_PEER | SSL_VERIFY_CLIENT_ONCE; - if (ca_file && ! ca_file[0]) ca_file = NULL; - if (ca_path && ! ca_path[0]) ca_path = NULL; - if (crl_file && ! crl_file[0]) crl_file = NULL; - if (crl_path && ! crl_path[0]) crl_path = NULL; + /* + If some optional parameters indicate empty strings, then + for compatibility with SSL libraries, replace them with NULL, + otherwise these libraries will try to open files with an empty + name, etc., and they will return an error code instead performing + the necessary operations: + */ + if (ca_file && !ca_file[0]) + { + ca_file = NULL; + } + if (ca_path && !ca_path[0]) + { + ca_path = NULL; + } + if (crl_file && !crl_file[0]) + { + crl_file = NULL; + } + if (crl_path && !crl_path[0]) + { + crl_path = NULL; + } if (!(ssl_fd= new_VioSSLFd(key_file, cert_file, ca_file, ca_path, cipher, FALSE, error, From c1846c4fcfb04cb628c73b95516deefeb8ee0e19 Mon Sep 17 00:00:00 2001 From: sjaakola Date: Thu, 9 Dec 2021 18:12:20 +0200 Subject: [PATCH 32/65] MDEV-26803 PA unsafety with FK cascade delete operation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit has a mtr test where two two transactions delete a row from two separate tables, which will cascade a FK delete for the same row in a third table. Second replica node is configured with 2 applier threads, and the test will fail if these two transactions are applied in parallel. The actual fix, in this commit, is to mark a transaction as unsafe for parallel applying when it traverses into cascade delete operation. Reviewed-by: Jan Lindström --- include/mysql/service_wsrep.h | 4 + .../galera/r/galera_fk_cascade_delete.result | 110 +++++++++++ .../galera/t/galera_fk_cascade_delete.test | 186 ++++++++++++++++++ sql/service_wsrep.cc | 8 + sql/sql_plugin_services.ic | 3 +- sql/wsrep_dummy.cc | 4 + sql/wsrep_thd.h | 2 - storage/innobase/handler/ha_innodb.cc | 29 ++- storage/innobase/row/row0ins.cc | 39 ++-- 9 files changed, 354 insertions(+), 31 deletions(-) diff --git a/include/mysql/service_wsrep.h b/include/mysql/service_wsrep.h index 10c70c790e91b..1e6aaa1b9b96a 100644 --- a/include/mysql/service_wsrep.h +++ b/include/mysql/service_wsrep.h @@ -88,6 +88,7 @@ extern struct wsrep_service_st { unsigned long long trx_id); void (*wsrep_thd_kill_LOCK_func)(const MYSQL_THD thd); void (*wsrep_thd_kill_UNLOCK_func)(const MYSQL_THD thd); + void (*wsrep_thd_set_wsrep_PA_unsafe_func)(MYSQL_THD thd); } *wsrep_service; #define MYSQL_SERVICE_WSREP_INCLUDED @@ -131,6 +132,7 @@ extern struct wsrep_service_st { #define wsrep_thd_is_applying(T) wsrep_service->wsrep_thd_is_applying_func(T) #define wsrep_thd_set_wsrep_aborter(T) wsrep_service->wsrep_thd_set_wsrep_aborter_func(T1, T2) #define wsrep_report_bf_lock_wait(T,I) wsrep_service->wsrep_report_bf_lock_wait(T,I) +#define wsrep_thd_set_PA_unsafe(T) wsrep_service->wsrep_thd_set_PA_unsafe_func(T) #else #define MYSQL_SERVICE_WSREP_STATIC_INCLUDED @@ -229,5 +231,7 @@ extern "C" my_bool wsrep_thd_is_applying(const MYSQL_THD thd); extern "C" bool wsrep_thd_set_wsrep_aborter(MYSQL_THD bf_thd, MYSQL_THD victim_thd); extern "C" void wsrep_report_bf_lock_wait(const THD *thd, unsigned long long trx_id); +/* declare parallel applying unsafety for the THD */ +extern "C" void wsrep_thd_set_PA_unsafe(MYSQL_THD thd); #endif #endif /* MYSQL_SERVICE_WSREP_INCLUDED */ diff --git a/mysql-test/suite/galera/r/galera_fk_cascade_delete.result b/mysql-test/suite/galera/r/galera_fk_cascade_delete.result index 808e32b8cb2cf..9bb004d0ed855 100644 --- a/mysql-test/suite/galera/r/galera_fk_cascade_delete.result +++ b/mysql-test/suite/galera/r/galera_fk_cascade_delete.result @@ -48,3 +48,113 @@ id parent_id DROP TABLE child; DROP TABLE parent; DROP TABLE grandparent; + +Scenario 2, testing PA applying with FK cascade delete + +CREATE TABLE p1 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; +CREATE TABLE p2 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; +CREATE TABLE c (f1 INTEGER PRIMARY KEY, p1_id INTEGER, p2_id INTEGER, +f2 INTEGER, +CONSTRAINT fk_1 FOREIGN KEY (p1_id) REFERENCES p1 (f1) +ON DELETE CASCADE, +CONSTRAINT fk_2 FOREIGN KEY (p2_id) REFERENCES p2 (f1) +ON DELETE CASCADE); +connection node_2; +set global wsrep_slave_threads=DEFAULT; +SELECT * FROM p1; +f1 f2 +SELECT * FROM p2; +f1 f2 +SELECT * FROM c; +f1 p1_id p2_id f2 +connection node_1; +DROP TABLE c; +DROP TABLE p1,p2; + +Scenario 4, testing PA applying with FK cascade delete on +more than one level + +CREATE TABLE gp1 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; +CREATE TABLE gp2 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; +CREATE TABLE p1 (f1 INTEGER PRIMARY KEY, p1_id INTEGER, p2_id INTEGER, +f2 INTEGER, +CONSTRAINT pfk_3 FOREIGN KEY (p1_id) REFERENCES gp1 (f1) +ON DELETE CASCADE +) ENGINE=INNODB; +CREATE TABLE p2 (f1 INTEGER PRIMARY KEY,p1_id INTEGER, p2_id INTEGER, +f2 INTEGER, +CONSTRAINT pfk_4 FOREIGN KEY (p1_id) REFERENCES gp2 (f1) +ON DELETE CASCADE +) ENGINE=INNODB; +CREATE TABLE c (f1 INTEGER PRIMARY KEY, p1_id INTEGER, p2_id INTEGER, +f2 INTEGER, +CONSTRAINT fk_1 FOREIGN KEY (p1_id) REFERENCES p1 (f1) +ON DELETE CASCADE, +CONSTRAINT fk_2 FOREIGN KEY (p2_id) REFERENCES p2 (f1) +ON DELETE CASCADE) ENGINE=INNODB; +connection node_2; +set global wsrep_slave_threads=DEFAULT; +SELECT * FROM gp1; +f1 f2 +SELECT * FROM gp2; +f1 f2 +SELECT * FROM p1; +f1 p1_id p2_id f2 +SELECT * FROM p2; +f1 p1_id p2_id f2 +SELECT * FROM c; +f1 p1_id p2_id f2 +connection node_1; +DROP TABLE c; +DROP TABLE p1,p2; +DROP TABLE gp1,gp2; + +Scenario 3, testing PA applying with FK cascade delete on +more than one level in a diamond topology + +CREATE TABLE ggp1 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; +CREATE TABLE gp1 (f1 INTEGER PRIMARY KEY, p1_id INTEGER, p2_id INTEGER, +f2 INTEGER, +CONSTRAINT pfk_6 FOREIGN KEY (p1_id) REFERENCES ggp1 (f1) +ON DELETE CASCADE +) ENGINE=INNODB; +CREATE TABLE gp2 (f1 INTEGER PRIMARY KEY, p1_id INTEGER, p2_id INTEGER, +f2 INTEGER, +CONSTRAINT pfk_5 FOREIGN KEY (p1_id) REFERENCES ggp1 (f1) +ON DELETE CASCADE +) ENGINE=INNODB; +CREATE TABLE p1 (f1 INTEGER PRIMARY KEY, p1_id INTEGER, p2_id INTEGER, +f2 INTEGER, +CONSTRAINT pfk_3 FOREIGN KEY (p1_id) REFERENCES gp1 (f1) +ON DELETE CASCADE +) ENGINE=INNODB; +CREATE TABLE p2 (f1 INTEGER PRIMARY KEY,p1_id INTEGER, p2_id INTEGER, +f2 INTEGER, +CONSTRAINT pfk_4 FOREIGN KEY (p1_id) REFERENCES gp2 (f1) +ON DELETE CASCADE +) ENGINE=INNODB; +CREATE TABLE c (f1 INTEGER PRIMARY KEY, p1_id INTEGER, p2_id INTEGER, +f2 INTEGER, +CONSTRAINT fk_1 FOREIGN KEY (p1_id) REFERENCES p1 (f1) +ON DELETE CASCADE, +CONSTRAINT fk_2 FOREIGN KEY (p2_id) REFERENCES p2 (f1) +ON DELETE CASCADE) ENGINE=INNODB; +connection node_2; +set global wsrep_slave_threads=DEFAULT; +SELECT * FROM ggp1; +f1 f2 +SELECT * FROM gp2; +f1 p1_id p2_id f2 +SELECT * FROM gp1; +f1 p1_id p2_id f2 +SELECT * FROM p1; +f1 p1_id p2_id f2 +SELECT * FROM p2; +f1 p1_id p2_id f2 +SELECT * FROM c; +f1 p1_id p2_id f2 +connection node_1; +DROP TABLE c; +DROP TABLE p1,p2; +DROP TABLE gp1,gp2; +DROP TABLE ggp1; diff --git a/mysql-test/suite/galera/t/galera_fk_cascade_delete.test b/mysql-test/suite/galera/t/galera_fk_cascade_delete.test index 49b54f0f7f035..901fc1fc6d14f 100644 --- a/mysql-test/suite/galera/t/galera_fk_cascade_delete.test +++ b/mysql-test/suite/galera/t/galera_fk_cascade_delete.test @@ -68,3 +68,189 @@ SELECT * FROM child; DROP TABLE child; DROP TABLE parent; DROP TABLE grandparent; + +--echo +--echo Scenario 2, testing PA applying with FK cascade delete +--echo + +CREATE TABLE p1 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; +CREATE TABLE p2 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; +CREATE TABLE c (f1 INTEGER PRIMARY KEY, p1_id INTEGER, p2_id INTEGER, + f2 INTEGER, + CONSTRAINT fk_1 FOREIGN KEY (p1_id) REFERENCES p1 (f1) + ON DELETE CASCADE, + CONSTRAINT fk_2 FOREIGN KEY (p2_id) REFERENCES p2 (f1) + ON DELETE CASCADE); + +--let $count = 100 +--disable_query_log +while ($count) +{ + --eval INSERT INTO p1 VALUES ($count, 0); + --eval INSERT INTO p2 VALUES ($count, 0); + --eval INSERT INTO c VALUES ($count, $count, $count, 0); + --dec $count +} + +--connection node_2 +set global wsrep_slave_threads=2; + +--connection node_1 +--let $count = 100 +while ($count) +{ + --eval DELETE FROM p2 WHERE f1=$count; + --eval DELETE FROM p1 WHERE f1=$count; + +--dec $count +} +--enable_query_log + +--connection node_2 +set global wsrep_slave_threads=DEFAULT; + + +SELECT * FROM p1; +SELECT * FROM p2; +SELECT * FROM c; + +--connection node_1 +DROP TABLE c; +DROP TABLE p1,p2; + +--echo +--echo Scenario 4, testing PA applying with FK cascade delete on +--echo more than one level +--echo +CREATE TABLE gp1 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; +CREATE TABLE gp2 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; +CREATE TABLE p1 (f1 INTEGER PRIMARY KEY, p1_id INTEGER, p2_id INTEGER, + f2 INTEGER, + CONSTRAINT pfk_3 FOREIGN KEY (p1_id) REFERENCES gp1 (f1) + ON DELETE CASCADE + ) ENGINE=INNODB; +CREATE TABLE p2 (f1 INTEGER PRIMARY KEY,p1_id INTEGER, p2_id INTEGER, + f2 INTEGER, + CONSTRAINT pfk_4 FOREIGN KEY (p1_id) REFERENCES gp2 (f1) + ON DELETE CASCADE + ) ENGINE=INNODB; +CREATE TABLE c (f1 INTEGER PRIMARY KEY, p1_id INTEGER, p2_id INTEGER, + f2 INTEGER, + CONSTRAINT fk_1 FOREIGN KEY (p1_id) REFERENCES p1 (f1) + ON DELETE CASCADE, + CONSTRAINT fk_2 FOREIGN KEY (p2_id) REFERENCES p2 (f1) + ON DELETE CASCADE) ENGINE=INNODB; + +--let $count = 100 +--disable_query_log +while ($count) +{ + --eval INSERT INTO gp1 VALUES ($count, 0); + --eval INSERT INTO gp2 VALUES ($count, 0); + --eval INSERT INTO p1 VALUES ($count, $count, $count, 0); + --eval INSERT INTO p2 VALUES ($count, $count, $count, 0); + --eval INSERT INTO c VALUES ($count, $count, $count, 0); + --dec $count +} + +--connection node_2 +set global wsrep_slave_threads=2; + +--connection node_1 +--let $count = 100 +while ($count) +{ + --eval DELETE FROM gp1 WHERE f1=$count; + --eval DELETE FROM gp2 WHERE f1=$count; + +--dec $count +} +--enable_query_log + +--connection node_2 +set global wsrep_slave_threads=DEFAULT; + +SELECT * FROM gp1; +SELECT * FROM gp2; +SELECT * FROM p1; +SELECT * FROM p2; +SELECT * FROM c; + +--connection node_1 +DROP TABLE c; +DROP TABLE p1,p2; +DROP TABLE gp1,gp2; + +--echo +--echo Scenario 3, testing PA applying with FK cascade delete on +--echo more than one level in a diamond topology +--echo +CREATE TABLE ggp1 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; +CREATE TABLE gp1 (f1 INTEGER PRIMARY KEY, p1_id INTEGER, p2_id INTEGER, + f2 INTEGER, + CONSTRAINT pfk_6 FOREIGN KEY (p1_id) REFERENCES ggp1 (f1) + ON DELETE CASCADE + ) ENGINE=INNODB; +CREATE TABLE gp2 (f1 INTEGER PRIMARY KEY, p1_id INTEGER, p2_id INTEGER, + f2 INTEGER, + CONSTRAINT pfk_5 FOREIGN KEY (p1_id) REFERENCES ggp1 (f1) + ON DELETE CASCADE + ) ENGINE=INNODB; +CREATE TABLE p1 (f1 INTEGER PRIMARY KEY, p1_id INTEGER, p2_id INTEGER, + f2 INTEGER, + CONSTRAINT pfk_3 FOREIGN KEY (p1_id) REFERENCES gp1 (f1) + ON DELETE CASCADE + ) ENGINE=INNODB; +CREATE TABLE p2 (f1 INTEGER PRIMARY KEY,p1_id INTEGER, p2_id INTEGER, + f2 INTEGER, + CONSTRAINT pfk_4 FOREIGN KEY (p1_id) REFERENCES gp2 (f1) + ON DELETE CASCADE + ) ENGINE=INNODB; +CREATE TABLE c (f1 INTEGER PRIMARY KEY, p1_id INTEGER, p2_id INTEGER, + f2 INTEGER, + CONSTRAINT fk_1 FOREIGN KEY (p1_id) REFERENCES p1 (f1) + ON DELETE CASCADE, + CONSTRAINT fk_2 FOREIGN KEY (p2_id) REFERENCES p2 (f1) + ON DELETE CASCADE) ENGINE=INNODB; + +--let $count = 100 +--disable_query_log +while ($count) +{ + --eval INSERT INTO ggp1 VALUES ($count, 0); + --eval INSERT INTO gp1 VALUES ($count, $count, $count, 0); + --eval INSERT INTO gp2 VALUES ($count, $count, $count, 0); + --eval INSERT INTO p1 VALUES ($count, $count, $count, 0); + --eval INSERT INTO p2 VALUES ($count, $count, $count, 0); + --eval INSERT INTO c VALUES ($count, $count, $count, 0); + --dec $count +} + +--connection node_2 +set global wsrep_slave_threads=2; + +--connection node_1 +--let $count = 100 +while ($count) +{ + --eval DELETE FROM ggp1 WHERE f1=$count; + +--dec $count +} +--enable_query_log + +--connection node_2 +set global wsrep_slave_threads=DEFAULT; + +SELECT * FROM ggp1; +SELECT * FROM gp2; +SELECT * FROM gp1; +SELECT * FROM p1; +SELECT * FROM p2; +SELECT * FROM c; + +--connection node_1 +DROP TABLE c; +DROP TABLE p1,p2; +DROP TABLE gp1,gp2; +DROP TABLE ggp1; diff --git a/sql/service_wsrep.cc b/sql/service_wsrep.cc index 18067a4d0ecc0..fd2a5c301f278 100644 --- a/sql/service_wsrep.cc +++ b/sql/service_wsrep.cc @@ -381,3 +381,11 @@ extern "C" void wsrep_report_bf_lock_wait(const THD *thd, wsrep_thd_query(thd)); } } + +extern "C" void wsrep_thd_set_PA_unsafe(THD *thd) +{ + if (thd && thd->wsrep_cs().mark_transaction_pa_unsafe()) + { + WSREP_DEBUG("session does not have active transaction, can not mark as PA unsafe"); + } +} diff --git a/sql/sql_plugin_services.ic b/sql/sql_plugin_services.ic index 740569dc76e68..60ba38eae61d5 100644 --- a/sql/sql_plugin_services.ic +++ b/sql/sql_plugin_services.ic @@ -176,7 +176,8 @@ static struct wsrep_service_st wsrep_handler = { wsrep_thd_set_wsrep_aborter, wsrep_report_bf_lock_wait, wsrep_thd_kill_LOCK, - wsrep_thd_kill_UNLOCK + wsrep_thd_kill_UNLOCK, + wsrep_thd_set_PA_unsafe }; static struct thd_specifics_service_st thd_specifics_handler= diff --git a/sql/wsrep_dummy.cc b/sql/wsrep_dummy.cc index 129df8e15778b..83bf4778d1031 100644 --- a/sql/wsrep_dummy.cc +++ b/sql/wsrep_dummy.cc @@ -147,3 +147,7 @@ bool wsrep_thd_set_wsrep_aborter(THD*, THD*) void wsrep_report_bf_lock_wait(const THD*, unsigned long long) {} + +void wsrep_thd_set_PA_unsafe(THD*) +{} + diff --git a/sql/wsrep_thd.h b/sql/wsrep_thd.h index 560dbbdab442f..40e5ed98e9b62 100644 --- a/sql/wsrep_thd.h +++ b/sql/wsrep_thd.h @@ -90,8 +90,6 @@ void wsrep_create_rollbacker(); bool wsrep_bf_abort(THD* bf_thd, THD* victim_thd); int wsrep_abort_thd(THD *bf_thd_ptr, THD *victim_thd_ptr, my_bool signal); -extern void wsrep_thd_set_PA_safe(void *thd_ptr, my_bool safe); - /* Helper methods to deal with thread local storage. The purpose of these methods is to hide the details of thread diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index 23df38c64ab03..257074ae56de4 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -10220,12 +10220,20 @@ wsrep_append_foreign_key( dict_foreign_t* foreign, /*!< in: foreign key constraint */ const rec_t* rec, /*!is_wsrep() || !wsrep_thd_is_local(trx->mysql_thd)) { + ut_ad(trx->is_wsrep()); + + if (!wsrep_thd_is_local(trx->mysql_thd)) return DB_SUCCESS; + + if (upd_node && wsrep_protocol_version < 4) { + key_type = WSREP_SERVICE_KEY_SHARED; } THD* thd = trx->mysql_thd; @@ -10286,8 +10294,7 @@ wsrep_append_foreign_key( WSREP_WARN("FK: %s missing in query: %s", (!foreign->referenced_table) ? "referenced table" : "foreign table", - (wsrep_thd_query(thd)) ? - wsrep_thd_query(thd) : "void"); + wsrep_thd_query(thd)); return DB_ERROR; } @@ -10365,20 +10372,24 @@ wsrep_append_foreign_key( wkey_part, (size_t*)&wkey.key_parts_num)) { WSREP_WARN("key prepare failed for cascaded FK: %s", - (wsrep_thd_query(thd)) ? - wsrep_thd_query(thd) : "void"); + wsrep_thd_query(thd)); return DB_ERROR; } + rcode = wsrep_thd_append_key(thd, &wkey, 1, key_type); + if (rcode) { - DBUG_PRINT("wsrep", ("row key failed: " ULINTPF, rcode)); WSREP_ERROR("Appending cascaded fk row key failed: %s, " ULINTPF, - (wsrep_thd_query(thd)) ? - wsrep_thd_query(thd) : "void", rcode); + wsrep_thd_query(thd), + rcode); return DB_ERROR; } + if (pa_disable) { + wsrep_thd_set_PA_unsafe(trx->mysql_thd); + } + return DB_SUCCESS; } diff --git a/storage/innobase/row/row0ins.cc b/storage/innobase/row/row0ins.cc index a63dd90e9c2b1..a1f5e55d8f4fd 100644 --- a/storage/innobase/row/row0ins.cc +++ b/storage/innobase/row/row0ins.cc @@ -970,7 +970,9 @@ dberr_t wsrep_append_foreign_key(trx_t *trx, dict_foreign_t* foreign, const rec_t* clust_rec, dict_index_t* clust_index, - ibool referenced, + bool referenced, + upd_node_t* upd_node, + bool pa_disable, Wsrep_service_key_type key_type); #endif /* WITH_WSREP */ @@ -1322,11 +1324,13 @@ row_ins_foreign_check_on_constraint( } #ifdef WITH_WSREP - err = wsrep_append_foreign_key(trx, foreign, clust_rec, clust_index, - FALSE, WSREP_SERVICE_KEY_EXCLUSIVE); - if (err != DB_SUCCESS) { - ib::info() << "WSREP: foreign key append failed: " << err; - goto nonstandard_exit_func; + if (trx->is_wsrep()) { + err = wsrep_append_foreign_key(trx, foreign, clust_rec, clust_index, + false, NULL, true, + WSREP_SERVICE_KEY_EXCLUSIVE); + if (err != DB_SUCCESS) { + goto nonstandard_exit_func; + } } #endif /* WITH_WSREP */ mtr_commit(mtr); @@ -1722,19 +1726,16 @@ row_ins_check_foreign_constraint( if (check_ref) { err = DB_SUCCESS; #ifdef WITH_WSREP - err = wsrep_append_foreign_key( - thr_get_trx(thr), - foreign, - rec, - check_index, - check_ref, - (upd_node != NULL - && wsrep_protocol_version < 4) - ? WSREP_SERVICE_KEY_SHARED - : WSREP_SERVICE_KEY_REFERENCE); - if (err != DB_SUCCESS) { - fprintf(stderr, - "WSREP: foreign key append failed: %d\n", err); + if (trx->is_wsrep()) { + err = wsrep_append_foreign_key( + thr_get_trx(thr), + foreign, + rec, + check_index, + check_ref, + upd_node, + false, + WSREP_SERVICE_KEY_REFERENCE); } #endif /* WITH_WSREP */ goto end_scan; From 53de922ae5185b71fdb52e813ac5fb0c51079361 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Lindstr=C3=B6m?= Date: Fri, 17 Dec 2021 09:55:01 +0200 Subject: [PATCH 33/65] Enable galera_sr.GCF-1060 test case as it is now fixed. --- mysql-test/suite/galera_sr/disabled.def | 1 - 1 file changed, 1 deletion(-) diff --git a/mysql-test/suite/galera_sr/disabled.def b/mysql-test/suite/galera_sr/disabled.def index d52ee32f61073..932b48eaae41b 100644 --- a/mysql-test/suite/galera_sr/disabled.def +++ b/mysql-test/suite/galera_sr/disabled.def @@ -10,5 +10,4 @@ # ############################################################################## -GCF-1060 : MDEV-20848 galera_sr.GCF_1060 galera-features#56 : MDEV-24896 From 32692140e1a4f9aa87359f3ef6efe4a615119e71 Mon Sep 17 00:00:00 2001 From: Sergei Petrunia Date: Sun, 19 Dec 2021 17:19:02 +0300 Subject: [PATCH 34/65] MDEV-27306: SET STATEMENT optimizer_trace=1 Doesn't save the trace In mysql_execute_command(), move optimizer trace initialization to be after run_set_statement_if_requested() call. Unfortunately, mysql_execute_command() code uses "goto error" a lot, and this means optimizer trace code cannot use RAII objects. Work this around by: - Make Opt_trace_start a non-RAII object, add init() method. - Move the code that writes the top-level object and array into Opt_trace_start::init(). --- mysql-test/main/opt_trace.result | 17 +++++++++++++++++ mysql-test/main/opt_trace.test | 8 ++++++++ sql/opt_trace.cc | 20 ++++++++++++++------ sql/opt_trace.h | 18 +++++++++++------- sql/sp_head.cc | 7 +++---- sql/sql_parse.cc | 11 +++++------ sql/sql_prepare.cc | 6 +++--- 7 files changed, 61 insertions(+), 26 deletions(-) diff --git a/mysql-test/main/opt_trace.result b/mysql-test/main/opt_trace.result index b0c2a9ca4d9f9..477c1f31095be 100644 --- a/mysql-test/main/opt_trace.result +++ b/mysql-test/main/opt_trace.result @@ -9248,5 +9248,22 @@ json_detailed(json_extract(trace, '$**.best_join_order')) ] ] DROP TABLE t1; +# +# MDEV-27306: SET STATEMENT optimizer_trace=1 Doesn't save the trace +# +set optimizer_trace=0; +set statement optimizer_trace=1 for select * from seq_1_to_10 where seq<2; +seq +1 +# The trace must not be empty: +select left(trace, 100) from information_schema.optimizer_trace; +left(trace, 100) +{ + "steps": [ + { + "join_preparation": { + "select_id": 1, + "steps": [ + # End of 10.6 tests set optimizer_trace='enabled=off'; diff --git a/mysql-test/main/opt_trace.test b/mysql-test/main/opt_trace.test index 402caf2a16531..9a7aa017cd419 100644 --- a/mysql-test/main/opt_trace.test +++ b/mysql-test/main/opt_trace.test @@ -865,5 +865,13 @@ select json_detailed(json_extract(trace, '$**.best_join_order')) from information_schema.OPTIMIZER_TRACE; DROP TABLE t1; +--echo # +--echo # MDEV-27306: SET STATEMENT optimizer_trace=1 Doesn't save the trace +--echo # +set optimizer_trace=0; +set statement optimizer_trace=1 for select * from seq_1_to_10 where seq<2; +--echo # The trace must not be empty: +select left(trace, 100) from information_schema.optimizer_trace; + --echo # End of 10.6 tests set optimizer_trace='enabled=off'; diff --git a/sql/opt_trace.cc b/sql/opt_trace.cc index ba9220cac4415..4bc493940fb82 100644 --- a/sql/opt_trace.cc +++ b/sql/opt_trace.cc @@ -471,12 +471,14 @@ void Opt_trace_context::end() current_trace= NULL; } -Opt_trace_start::Opt_trace_start(THD *thd, TABLE_LIST *tbl, - enum enum_sql_command sql_command, - List *set_vars, - const char *query, - size_t query_length, - const CHARSET_INFO *query_charset):ctx(&thd->opt_trace) + +void Opt_trace_start::init(THD *thd, + TABLE_LIST *tbl, + enum enum_sql_command sql_command, + List *set_vars, + const char *query, + size_t query_length, + const CHARSET_INFO *query_charset) { /* if optimizer trace is enabled and the statment we have is traceable, @@ -496,6 +498,9 @@ Opt_trace_start::Opt_trace_start(THD *thd, TABLE_LIST *tbl, ctx->set_query(query, query_length, query_charset); traceable= TRUE; opt_trace_disable_if_no_tables_access(thd, tbl); + Json_writer *w= ctx->get_current_json(); + w->start_object(); + w->add_member("steps").start_array(); } } @@ -503,6 +508,9 @@ Opt_trace_start::~Opt_trace_start() { if (traceable) { + Json_writer *w= ctx->get_current_json(); + w->end_array(); + w->end_object(); ctx->end(); traceable= FALSE; } diff --git a/sql/opt_trace.h b/sql/opt_trace.h index 101fb5f707ed1..1ee23a33591a6 100644 --- a/sql/opt_trace.h +++ b/sql/opt_trace.h @@ -72,14 +72,18 @@ struct Opt_trace_info */ -class Opt_trace_start { +class Opt_trace_start +{ public: - Opt_trace_start(THD *thd_arg, TABLE_LIST *tbl, - enum enum_sql_command sql_command, - List *set_vars, - const char *query, - size_t query_length, - const CHARSET_INFO *query_charset); + Opt_trace_start(THD *thd_arg): ctx(&thd_arg->opt_trace), traceable(false) {} + + void init(THD *thd, TABLE_LIST *tbl, + enum enum_sql_command sql_command, + List *set_vars, + const char *query, + size_t query_length, + const CHARSET_INFO *query_charset); + ~Opt_trace_start(); private: diff --git a/sql/sp_head.cc b/sql/sp_head.cc index 641c88de8263f..97905f6a5b4ad 100644 --- a/sql/sp_head.cc +++ b/sql/sp_head.cc @@ -3489,10 +3489,9 @@ sp_lex_keeper::reset_lex_and_exec_core(THD *thd, uint *nextp, thd->lex->safe_to_cache_query= 0; #endif - Opt_trace_start ots(thd, m_lex->query_tables, - SQLCOM_SELECT, &m_lex->var_list, - NULL, 0, - thd->variables.character_set_client); + Opt_trace_start ots(thd); + ots.init(thd, m_lex->query_tables, SQLCOM_SELECT, &m_lex->var_list, + NULL, 0, thd->variables.character_set_client); Json_writer_object trace_command(thd); Json_writer_array trace_command_steps(thd, "steps"); diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 2a48c8fb1ce9e..0886fc8515188 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -3644,12 +3644,7 @@ mysql_execute_command(THD *thd, bool is_called_from_prepared_stmt) #ifdef HAVE_REPLICATION } /* endif unlikely slave */ #endif - Opt_trace_start ots(thd, all_tables, lex->sql_command, &lex->var_list, - thd->query(), thd->query_length(), - thd->variables.character_set_client); - - Json_writer_object trace_command(thd); - Json_writer_array trace_command_steps(thd, "steps"); + Opt_trace_start ots(thd); /* store old value of binlog format */ enum_binlog_format orig_binlog_format,orig_current_stmt_binlog_format; @@ -3715,6 +3710,10 @@ mysql_execute_command(THD *thd, bool is_called_from_prepared_stmt) if (run_set_statement_if_requested(thd, lex)) goto error; + /* After SET STATEMENT is done, we can initialize the Optimizer Trace: */ + ots.init(thd, all_tables, lex->sql_command, &lex->var_list, thd->query(), + thd->query_length(), thd->variables.character_set_client); + if (thd->lex->mi.connection_name.str == NULL) thd->lex->mi.connection_name= thd->variables.default_master_connection; diff --git a/sql/sql_prepare.cc b/sql/sql_prepare.cc index 4ead77c225f8e..670321425911a 100644 --- a/sql/sql_prepare.cc +++ b/sql/sql_prepare.cc @@ -2437,9 +2437,9 @@ static bool check_prepared_statement(Prepared_statement *stmt) For the optimizer trace, this is the symmetric, for statement preparation, of what is done at statement execution (in mysql_execute_command()). */ - Opt_trace_start ots(thd, tables, lex->sql_command, &lex->var_list, - thd->query(), thd->query_length(), - thd->variables.character_set_client); + Opt_trace_start ots(thd); + ots.init(thd, tables, lex->sql_command, &lex->var_list, thd->query(), + thd->query_length(), thd->variables.character_set_client); Json_writer_object trace_command(thd); Json_writer_array trace_command_steps(thd, "steps"); From 4b25790eb3d09404230bb873d3e963b1eb600974 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Lindstr=C3=B6m?= Date: Mon, 20 Dec 2021 08:32:11 +0200 Subject: [PATCH 35/65] Update wsrep-lib submodule --- wsrep-lib | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wsrep-lib b/wsrep-lib index 14b3612a30813..6fd1fdf69044b 160000 --- a/wsrep-lib +++ b/wsrep-lib @@ -1 +1 @@ -Subproject commit 14b3612a308132d819237bba322f3373ac5a5135 +Subproject commit 6fd1fdf69044bb6a08c488cec52668bbb31dd8aa From 49791cbc6f76c4f4c1bb436dbe26cec6177ee279 Mon Sep 17 00:00:00 2001 From: sjaakola Date: Wed, 15 Dec 2021 22:29:32 +0200 Subject: [PATCH 36/65] 10.4-MDEV-27275 CREATE TABLE with FK not safe for PA MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit contains a fix, where the replication write set for a CREATE TABLE will contain, as certification keys, table names for all FK references. With this, all DML for the FK parent tables will conflict with the CREATE TABLE statement. There is also new test galera.MDEV-27276 to verify the fix. Reviewed-by: Jan Lindström --- include/wsrep.h | 2 +- mysql-test/suite/galera/r/MDEV-22051.result | 1 + mysql-test/suite/galera/r/MDEV-27276.result | 36 +++++++++++++++ .../suite/galera/r/galera_split_brain.result | 1 + mysql-test/suite/galera/t/MDEV-22051.test | 1 + mysql-test/suite/galera/t/MDEV-27276.test | 44 +++++++++++++++++++ .../suite/galera/t/galera_split_brain.test | 1 + .../suite/galera/t/mysql-wsrep#332.test | 1 + sql/sql_table.cc | 14 +++--- sql/wsrep_mysqld.cc | 5 +-- 10 files changed, 96 insertions(+), 10 deletions(-) create mode 100644 mysql-test/suite/galera/r/MDEV-27276.result create mode 100644 mysql-test/suite/galera/t/MDEV-27276.test diff --git a/include/wsrep.h b/include/wsrep.h index 2a9036956cc68..1b645207f00f2 100644 --- a/include/wsrep.h +++ b/include/wsrep.h @@ -68,7 +68,7 @@ //#define WSREP_WARN(...) #define WSREP_ERROR(...) #define WSREP_TO_ISOLATION_BEGIN(db_, table_, table_list_) do { } while(0) -#define WSREP_TO_ISOLATION_BEGIN_ALTER(db_, table_, table_list_, alter_info_) +#define WSREP_TO_ISOLATION_BEGIN_ALTER(db_, table_, table_list_, alter_info_, fk_tables_) #define WSREP_TO_ISOLATION_END #define WSREP_TO_ISOLATION_BEGIN_WRTCHK(db_, table_, table_list_) #define WSREP_SYNC_WAIT(thd_, before_) diff --git a/mysql-test/suite/galera/r/MDEV-22051.result b/mysql-test/suite/galera/r/MDEV-22051.result index 0e9756dd20e7e..229e26fd32a00 100644 --- a/mysql-test/suite/galera/r/MDEV-22051.result +++ b/mysql-test/suite/galera/r/MDEV-22051.result @@ -18,3 +18,4 @@ INSERT INTO t1 VALUES (1); ERROR HY000: Can't execute the query because you have a conflicting read lock UNLOCK TABLES; DROP TABLE t1; +CALL mtr.add_suppression("CREATE TABLE isolation failure"); diff --git a/mysql-test/suite/galera/r/MDEV-27276.result b/mysql-test/suite/galera/r/MDEV-27276.result new file mode 100644 index 0000000000000..7e5b29fad7e2a --- /dev/null +++ b/mysql-test/suite/galera/r/MDEV-27276.result @@ -0,0 +1,36 @@ +connection node_2; +connection node_1; +connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1; +connection node_1; +CREATE TABLE p (id INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; +connection node_1; +SET AUTOCOMMIT=ON; +START TRANSACTION; +INSERT INTO p VALUES(1,0); +connection node_1a; +SET SESSION wsrep_sync_wait = 0; +SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync'; +connection node_2; +CREATE TABLE c(id INT NOT NULL PRIMARY KEY, p_id INT, FOREIGN KEY (p_id) REFERENCES p(id) ON DELETE CASCADE) ENGINE=InnoDB; +connection node_1a; +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_master_enter_sync'; +connection node_1; +COMMIT; +connection node_1a; +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_master_enter_sync'; +SET GLOBAL wsrep_provider_options = 'dbug='; +connection node_1; +ERROR 40001: Deadlock found when trying to get lock; try restarting transaction +connection node_2; +SELECT * FROM p; +id f2 +SELECT * FROM c; +id p_id +DROP TABLE c; +DROP TABLE p; diff --git a/mysql-test/suite/galera/r/galera_split_brain.result b/mysql-test/suite/galera/r/galera_split_brain.result index 08f9060d2a9fc..374fb31afd13f 100644 --- a/mysql-test/suite/galera/r/galera_split_brain.result +++ b/mysql-test/suite/galera/r/galera_split_brain.result @@ -4,6 +4,7 @@ connection node_1; connection node_2; call mtr.add_suppression("WSREP: TO isolation failed for: "); connection node_1; +call mtr.add_suppression("CREATE TABLE isolation failure"); connection node_2; Killing server ... connection node_1; diff --git a/mysql-test/suite/galera/t/MDEV-22051.test b/mysql-test/suite/galera/t/MDEV-22051.test index b7332c47d69e9..a5f05f5cf3baf 100644 --- a/mysql-test/suite/galera/t/MDEV-22051.test +++ b/mysql-test/suite/galera/t/MDEV-22051.test @@ -31,3 +31,4 @@ INSERT INTO t1 VALUES (1); UNLOCK TABLES; DROP TABLE t1; +CALL mtr.add_suppression("CREATE TABLE isolation failure"); diff --git a/mysql-test/suite/galera/t/MDEV-27276.test b/mysql-test/suite/galera/t/MDEV-27276.test new file mode 100644 index 0000000000000..1c589c9e85bec --- /dev/null +++ b/mysql-test/suite/galera/t/MDEV-27276.test @@ -0,0 +1,44 @@ +--source include/galera_cluster.inc +--source include/have_innodb.inc +--source include/have_debug_sync.inc +--source include/galera_have_debug_sync.inc + +# +# Testing CREATE TABLE statement having foreign key constraint, +# while having concurrent DML for the referenced parent table. +# +# The replication of CREATE TABLE should have all referenced table names +# appended in the key set, and DML on the parent table should be considered as +# conflicting. +# +# There are related test scenarios in test mysql-wsrep#332, where a regular table +# is altered by adding new foreign key reference. +# +# We use concurrency facility of test MW-369 to setup the conflict between DDL and DML +# + +# Open connection node_1a here, MW-369.inc will use it later +--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1 + +# create FK parent table +--connection node_1 +CREATE TABLE p (id INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; + +# setup conflicting queries +--let $mw_369_parent_query = INSERT INTO p VALUES(1,0) +--let $mw_369_child_query = CREATE TABLE c(id INT NOT NULL PRIMARY KEY, p_id INT, FOREIGN KEY (p_id) REFERENCES p(id) ON DELETE CASCADE) ENGINE=InnoDB + +# execute above queries through separate nodes +--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; diff --git a/mysql-test/suite/galera/t/galera_split_brain.test b/mysql-test/suite/galera/t/galera_split_brain.test index ccdfd3fd5061c..b1ea9c9b4ab79 100644 --- a/mysql-test/suite/galera/t/galera_split_brain.test +++ b/mysql-test/suite/galera/t/galera_split_brain.test @@ -17,6 +17,7 @@ call mtr.add_suppression("WSREP: TO isolation failed for: "); --connection node_1 --let $wsrep_cluster_address_orig = `SELECT @@wsrep_cluster_address` +call mtr.add_suppression("CREATE TABLE isolation failure"); --connection node_2 --source include/kill_galera.inc diff --git a/mysql-test/suite/galera/t/mysql-wsrep#332.test b/mysql-test/suite/galera/t/mysql-wsrep#332.test index 674a5c3de52cf..e216dfe79d477 100644 --- a/mysql-test/suite/galera/t/mysql-wsrep#332.test +++ b/mysql-test/suite/galera/t/mysql-wsrep#332.test @@ -111,3 +111,4 @@ SELECT * FROM c; DROP TABLE c; DROP TABLE p1; DROP TABLE p2; + diff --git a/sql/sql_table.cc b/sql/sql_table.cc index 4409360cd8fb0..9a51ce49248f4 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -11624,7 +11624,14 @@ bool Sql_cmd_create_table_like::execute(THD *thd) (!thd->is_current_stmt_binlog_format_row() || !create_info.tmp_table())) { - WSREP_TO_ISOLATION_BEGIN(create_table->db.str, create_table->table_name.str, NULL); +#ifdef WITH_WSREP + WSREP_TO_ISOLATION_BEGIN_ALTER(create_table->db.str, create_table->table_name.str, + first_table, &alter_info, NULL) + { + WSREP_WARN("CREATE TABLE isolation failure"); + DBUG_RETURN(true); + } +#endif /* WITH_WSREP */ } /* Regular CREATE TABLE */ res= mysql_create_table(thd, create_table, &create_info, &alter_info); @@ -11646,9 +11653,4 @@ bool Sql_cmd_create_table_like::execute(THD *thd) end_with_restore_list: DBUG_RETURN(res); - -#ifdef WITH_WSREP -wsrep_error_label: - DBUG_RETURN(true); -#endif } diff --git a/sql/wsrep_mysqld.cc b/sql/wsrep_mysqld.cc index a2856b5034d9a..1e4eff831c22c 100644 --- a/sql/wsrep_mysqld.cc +++ b/sql/wsrep_mysqld.cc @@ -1405,7 +1405,7 @@ static bool wsrep_prepare_keys_for_isolation(THD* thd, goto err; } - if (alter_info && (alter_info->flags & (ALTER_ADD_FOREIGN_KEY))) + if (alter_info) { if (!wsrep_prepare_keys_for_alter_add_fk(table_list->db.str, alter_info, ka)) goto err; @@ -1538,7 +1538,7 @@ wsrep::key_array wsrep_prepare_keys_for_toi(const char* db, ret.push_back(wsrep_prepare_key_for_toi(table->db.str, table->table_name.str, wsrep::key::exclusive)); } - if (alter_info && (alter_info->flags & ALTER_ADD_FOREIGN_KEY)) + if (alter_info) { wsrep::key_array fk(wsrep_prepare_keys_for_alter_add_fk(table_list->db.str, alter_info)); if (!fk.empty()) @@ -1803,7 +1803,6 @@ static bool wsrep_can_run_in_toi(THD *thd, const char *db, const char *table, switch (lex->sql_command) { case SQLCOM_CREATE_TABLE: - DBUG_ASSERT(!table_list); if (thd->lex->create_info.options & HA_LEX_CREATE_TMP_TABLE) { return false; From 3b33593f80442214640eefb2ce75c34698c8043b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Tue, 21 Dec 2021 11:07:25 +0200 Subject: [PATCH 37/65] MDEV-27332 SIGSEGV in fetch_data_into_cache() Since commit fb335b48b5e3263698b7d9a74ff3f20ef406df9f we may have a null pointer in purge_sys.query when fetch_data_into_cache() is invoked and innodb_force_recovery>4. This is because the call to purge_sys.create() would be skipped. fetch_data_into_cache(): Load the purge_sys pseudo transaction pointer to a local variable (null pointer if purge_sys is not initialized). --- .../suite/innodb/r/read_only_recover_committed.result | 7 +++++++ mysql-test/suite/innodb/t/read_only_recover_committed.test | 7 +++++++ storage/innobase/trx/trx0i_s.cc | 4 +++- 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/mysql-test/suite/innodb/r/read_only_recover_committed.result b/mysql-test/suite/innodb/r/read_only_recover_committed.result index 278905a976b69..0bfba662c1561 100644 --- a/mysql-test/suite/innodb/r/read_only_recover_committed.result +++ b/mysql-test/suite/innodb/r/read_only_recover_committed.result @@ -63,6 +63,13 @@ SELECT * FROM t; a 3 20 +# +# MDEV-27332 SIGSEGV in fetch_data_into_cache +# +BEGIN; +SELECT trx_state FROM information_schema.innodb_trx; +trx_state +COMMIT; SELECT * FROM t; a 3 diff --git a/mysql-test/suite/innodb/t/read_only_recover_committed.test b/mysql-test/suite/innodb/t/read_only_recover_committed.test index 9ad09bb9b3a06..439f57e9fada6 100644 --- a/mysql-test/suite/innodb/t/read_only_recover_committed.test +++ b/mysql-test/suite/innodb/t/read_only_recover_committed.test @@ -78,6 +78,13 @@ SET TRANSACTION ISOLATION LEVEL SERIALIZABLE; SELECT * FROM t; SET TRANSACTION ISOLATION LEVEL READ COMMITTED; SELECT * FROM t; + +--echo # +--echo # MDEV-27332 SIGSEGV in fetch_data_into_cache +--echo # +BEGIN; +SELECT trx_state FROM information_schema.innodb_trx; +COMMIT; --let $restart_parameters= --source include/restart_mysqld.inc SELECT * FROM t; diff --git a/storage/innobase/trx/trx0i_s.cc b/storage/innobase/trx/trx0i_s.cc index afd644f3c703e..951770e5bb73e 100644 --- a/storage/innobase/trx/trx0i_s.cc +++ b/storage/innobase/trx/trx0i_s.cc @@ -1275,6 +1275,8 @@ static void fetch_data_into_cache_low(trx_i_s_cache_t *cache, const trx_t *trx) static void fetch_data_into_cache(trx_i_s_cache_t *cache) { + const trx_t *const purge_trx= purge_sys.query ? purge_sys.query->trx : NULL; + ut_ad(lock_mutex_own()); trx_i_s_cache_clear(cache); @@ -1284,7 +1286,7 @@ static void fetch_data_into_cache(trx_i_s_cache_t *cache) trx != NULL; trx= UT_LIST_GET_NEXT(trx_list, trx)) { - if (trx->state != TRX_STATE_NOT_STARTED && trx != purge_sys.query->trx) + if (trx != purge_trx && trx->state != TRX_STATE_NOT_STARTED) { mutex_enter(&trx->mutex); if (trx->state != TRX_STATE_NOT_STARTED) From 61a66d81b2bfc3a7c8c9a07d8c82d921eacba284 Mon Sep 17 00:00:00 2001 From: sjaakola Date: Mon, 20 Dec 2021 12:07:20 +0200 Subject: [PATCH 38/65] MDEV-27297 wsrep error log messages drop last character MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit vsnprintf takes the space need for trailing '\0' in consideration, and copies only n-1 characters to destination buffer. With the old code, only sizeof(buf)-2 characters were copied, this caused that last character of message could be lost. Reviewed-by: Jan Lindström --- sql/wsrep_mysqld.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/wsrep_mysqld.cc b/sql/wsrep_mysqld.cc index 1e4eff831c22c..f2b043933408b 100644 --- a/sql/wsrep_mysqld.cc +++ b/sql/wsrep_mysqld.cc @@ -288,7 +288,7 @@ void WSREP_LOG(void (*fun)(const char* fmt, ...), const char* fmt, ...) char msg[128] = {'\0'}; va_list arglist; va_start(arglist, fmt); - int n= vsnprintf(msg, sizeof(msg) - 1, fmt, arglist); + int n= vsnprintf(msg, sizeof(msg), fmt, arglist); va_end(arglist); if (n < 0) { From 8e5f09a6ed15cda6a413c59b84999d91e8eafb76 Mon Sep 17 00:00:00 2001 From: Thirunarayanan Balathandayuthapani Date: Tue, 21 Dec 2021 12:26:03 +0530 Subject: [PATCH 39/65] MDEV-27322 Test innodb.doublewrite crashes when using innodb_flush_method=O_DIRECT - InnoDB fails to write the page0 while trying to attempt recover the page0 from doublewrite buffer and incorrect size is being passed to the os_file_write(). Fix is that InnoDB should proper close the parenthesis for function os_file_write() in deferred_dblwr() and InnoDB should free the newly created tablespace in case of error in deferred_dblwr(). --- storage/innobase/log/log0recv.cc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/storage/innobase/log/log0recv.cc b/storage/innobase/log/log0recv.cc index dd3ce42c79470..674dee0a49ee3 100644 --- a/storage/innobase/log/log0recv.cc +++ b/storage/innobase/log/log0recv.cc @@ -836,13 +836,16 @@ static struct space->free_len= flst_get_len(FSP_HEADER_OFFSET + FSP_FREE + page); fil_node_t *node= UT_LIST_GET_FIRST(space->chain); if (!space->acquire()) + { +free_space: + fil_space_free(it->first, false); goto next_item; + } if (os_file_write(IORequestWrite, node->name, node->handle, - page, 0, fil_space_t::physical_size(flags) != - DB_SUCCESS)) + page, 0, fil_space_t::physical_size(flags)) != DB_SUCCESS) { space->release(); - goto next_item; + goto free_space; } space->release(); it->second.space= space; From db0ea46eabd0f09049c5cb19204f95338e870f5d Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Mon, 20 Dec 2021 17:23:32 +0100 Subject: [PATCH 40/65] MDEV-27261 Change maturity of plugins for 10.7 GA --- plugin/password_reuse_check/password_reuse_check.c | 2 +- plugin/type_mysql_json/type.cc | 2 +- .../type_uuid/mysql-test/type_uuid/func_uuid_plugin.result | 2 +- plugin/type_uuid/plugin.cc | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/plugin/password_reuse_check/password_reuse_check.c b/plugin/password_reuse_check/password_reuse_check.c index f823e7f098b6b..8373b64ea8ac9 100644 --- a/plugin/password_reuse_check/password_reuse_check.c +++ b/plugin/password_reuse_check/password_reuse_check.c @@ -236,6 +236,6 @@ maria_declare_plugin(password_reuse_check) NULL, sysvars, "1.0", - MariaDB_PLUGIN_MATURITY_ALPHA + MariaDB_PLUGIN_MATURITY_BETA } maria_declare_plugin_end; diff --git a/plugin/type_mysql_json/type.cc b/plugin/type_mysql_json/type.cc index 8b79e0391064a..d2d49b20229a5 100644 --- a/plugin/type_mysql_json/type.cc +++ b/plugin/type_mysql_json/type.cc @@ -211,6 +211,6 @@ maria_declare_plugin(type_mysql_json) NULL, NULL, "0.1", - MariaDB_PLUGIN_MATURITY_ALPHA + MariaDB_PLUGIN_MATURITY_BETA } maria_declare_plugin_end; diff --git a/plugin/type_uuid/mysql-test/type_uuid/func_uuid_plugin.result b/plugin/type_uuid/mysql-test/type_uuid/func_uuid_plugin.result index ac7b21b1719b9..8c78be9c6c303 100644 --- a/plugin/type_uuid/mysql-test/type_uuid/func_uuid_plugin.result +++ b/plugin/type_uuid/mysql-test/type_uuid/func_uuid_plugin.result @@ -28,7 +28,7 @@ PLUGIN_TYPE FUNCTION PLUGIN_AUTHOR MariaDB Corporation PLUGIN_DESCRIPTION Function UUID() PLUGIN_LICENSE GPL -PLUGIN_MATURITY Beta +PLUGIN_MATURITY Gamma PLUGIN_AUTH_VERSION 1.0 # # End of 10.5 tests diff --git a/plugin/type_uuid/plugin.cc b/plugin/type_uuid/plugin.cc index 6e7df8897fbcc..62728799ae5cb 100644 --- a/plugin/type_uuid/plugin.cc +++ b/plugin/type_uuid/plugin.cc @@ -87,7 +87,7 @@ maria_declare_plugin(type_uuid) NULL, // Status variables NULL, // System variables "1.0", // String version representation - MariaDB_PLUGIN_MATURITY_BETA // Maturity(see include/mysql/plugin.h)*/ + MariaDB_PLUGIN_MATURITY_GAMMA // Maturity(see include/mysql/plugin.h)*/ }, { MariaDB_FUNCTION_PLUGIN, // the plugin type (see include/mysql/plugin.h) @@ -102,7 +102,7 @@ maria_declare_plugin(type_uuid) NULL, // Status variables NULL, // System variables "1.0", // String version representation - MariaDB_PLUGIN_MATURITY_BETA // Maturity(see include/mysql/plugin.h)*/ + MariaDB_PLUGIN_MATURITY_GAMMA // Maturity(see include/mysql/plugin.h)*/ }, { MariaDB_FUNCTION_PLUGIN, // the plugin type (see include/mysql/plugin.h) @@ -117,6 +117,6 @@ maria_declare_plugin(type_uuid) NULL, // Status variables NULL, // System variables "1.0", // String version representation - MariaDB_PLUGIN_MATURITY_BETA // Maturity(see include/mysql/plugin.h)*/ + MariaDB_PLUGIN_MATURITY_GAMMA // Maturity(see include/mysql/plugin.h)*/ } maria_declare_plugin_end; From 1b8f0d4b674dd7f9414778054ef714f0fed71ccc Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Mon, 20 Dec 2021 18:14:36 +0100 Subject: [PATCH 41/65] bump up server's maturity --- VERSION | 2 +- mysql-test/suite/sys_vars/r/sysvars_star.result | 2 +- plugin/type_uuid/mysql-test/type_uuid/type_uuid_plugin.result | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/VERSION b/VERSION index 19228679d8c16..c60a3f96635b7 100644 --- a/VERSION +++ b/VERSION @@ -1,4 +1,4 @@ MYSQL_VERSION_MAJOR=10 MYSQL_VERSION_MINOR=7 MYSQL_VERSION_PATCH=2 -SERVER_MATURITY=gamma +SERVER_MATURITY=stable diff --git a/mysql-test/suite/sys_vars/r/sysvars_star.result b/mysql-test/suite/sys_vars/r/sysvars_star.result index 54af0aa301424..eede5c17b36f2 100644 --- a/mysql-test/suite/sys_vars/r/sysvars_star.result +++ b/mysql-test/suite/sys_vars/r/sysvars_star.result @@ -60,7 +60,7 @@ VARIABLE_NAME PLUGIN_MATURITY SESSION_VALUE NULL GLOBAL_VALUE alpha GLOBAL_VALUE_ORIGIN CONFIG -DEFAULT_VALUE beta +DEFAULT_VALUE gamma VARIABLE_SCOPE GLOBAL VARIABLE_TYPE ENUM VARIABLE_COMMENT The lowest desirable plugin maturity. Plugins less mature than that will not be installed or loaded diff --git a/plugin/type_uuid/mysql-test/type_uuid/type_uuid_plugin.result b/plugin/type_uuid/mysql-test/type_uuid/type_uuid_plugin.result index 9166bcffc3b55..d954832ef7f2a 100644 --- a/plugin/type_uuid/mysql-test/type_uuid/type_uuid_plugin.result +++ b/plugin/type_uuid/mysql-test/type_uuid/type_uuid_plugin.result @@ -24,7 +24,7 @@ PLUGIN_TYPE DATA TYPE PLUGIN_AUTHOR MariaDB Corporation PLUGIN_DESCRIPTION Data type UUID PLUGIN_LICENSE GPL -PLUGIN_MATURITY Beta +PLUGIN_MATURITY Gamma PLUGIN_AUTH_VERSION 1.0 # # End of 10.5 tests From 6487b8e33060b54612981e81b663aff15724fbdf Mon Sep 17 00:00:00 2001 From: Alexander Barkov Date: Tue, 21 Dec 2021 11:59:08 +0400 Subject: [PATCH 42/65] MDEV-27307 main.ctype_utf8mb4_uca_allkeys tests fail with Valgrind/MSAN In case when filesort does not use addon field packing (because of too small potential savings) and uses fixed width addon fields instead, the field->pack() call can store less bytes when the field maximum possible field length, e.g. in case of VARCHAR(). The memory between the packed length and addonf->length (the maximum length) stayed uninitialized, which was reported by Valgrind/MSAN. The problem was introduced by f52bf92014efae6a1da9c2f26a7e3792ed5f5396 in 10.5, which removed the tail initialization (probably unintentionally). Restoring the bzero() in the fixed length branch, so in case when pack() stores less bytes than addonf->length says, the trailing bytes gets initialized. Note, before f52bf92014efae6a1da9c2f26a7e3792ed5f5396, the bzero() was under HAVE_valgrind conditional compilation. Now it's being added unconditionally: - MSAN also reported the problem, so it's not only Valgrind specific. - As Serg proposed, conditional initialization is bad - it can have potentional security problems as the non-initialized memory fragments can store various pieces of essential information, e.g. passwords. --- mysql-test/main/filesort_pack.result | 29 ++++++++++++++++ mysql-test/main/filesort_pack.test | 51 ++++++++++++++++++++++++++++ sql/filesort.cc | 7 +++- 3 files changed, 86 insertions(+), 1 deletion(-) create mode 100644 mysql-test/main/filesort_pack.result create mode 100644 mysql-test/main/filesort_pack.test diff --git a/mysql-test/main/filesort_pack.result b/mysql-test/main/filesort_pack.result new file mode 100644 index 0000000000000..c067e0620b942 --- /dev/null +++ b/mysql-test/main/filesort_pack.result @@ -0,0 +1,29 @@ +# +# Start of 10.5 tests +# +# +# MDEV-27307 main.ctype_utf8mb4_uca_allkeys tests fail with Valgrind/MSAN +# +# In this scenario packing is fully disabled: +# - The sortkey is of a fixed width data type +# - The addon fields have too small potential savings +SET NAMES latin1; +CREATE TABLE t1 ( +code INT NOT NULL, +str VARCHAR(5) CHARACTER SET latin1 NOT NULL +) ENGINE=MyISAM; +FOR i IN 0..50 +DO +INSERT INTO t1 VALUES (i, REPEAT('a',1)); +END FOR; +$$ +SELECT COUNT(*) FROM t1; +COUNT(*) +51 +SET sort_buffer_size=1024; +SELECT HEX(code), HEX(str) FROM t1 ORDER BY HEX(str); +SET sort_buffer_size=DEFAULT; +DROP TABLE t1; +# +# End of 10.5 tests +# diff --git a/mysql-test/main/filesort_pack.test b/mysql-test/main/filesort_pack.test new file mode 100644 index 0000000000000..6765778904ed9 --- /dev/null +++ b/mysql-test/main/filesort_pack.test @@ -0,0 +1,51 @@ +# +# Tests related to pack modes of the sortkey and addon fields. +# Fields can be either packed or fixed length. +# +# See the comment in filesort.cc: +# +# Heuristic: skip packing if potential savings are less than 10 bytes. +# + +--echo # +--echo # Start of 10.5 tests +--echo # + +--echo # +--echo # MDEV-27307 main.ctype_utf8mb4_uca_allkeys tests fail with Valgrind/MSAN +--echo # +--echo # In this scenario packing is fully disabled: +--echo # - The sortkey is of a fixed width data type +--echo # - The addon fields have too small potential savings + +SET NAMES latin1; + +CREATE TABLE t1 ( + code INT NOT NULL, + str VARCHAR(5) CHARACTER SET latin1 NOT NULL +) ENGINE=MyISAM; + +DELIMITER $$; +FOR i IN 0..50 +DO + INSERT INTO t1 VALUES (i, REPEAT('a',1)); +END FOR; +$$ +DELIMITER ;$$ +SELECT COUNT(*) FROM t1; + +# The result is not very interesting, let's suppress it. +# We just make sure there are no Valgrind/MSAN warnings about +# not initialized memory being written to disk. + +SET sort_buffer_size=1024; +--disable_result_log +SELECT HEX(code), HEX(str) FROM t1 ORDER BY HEX(str); +--enable_result_log +SET sort_buffer_size=DEFAULT; + +DROP TABLE t1; + +--echo # +--echo # End of 10.5 tests +--echo # diff --git a/sql/filesort.cc b/sql/filesort.cc index 766415f58fb1a..4e5aeccb78e87 100644 --- a/sql/filesort.cc +++ b/sql/filesort.cc @@ -1376,12 +1376,17 @@ static uint make_sortkey(Sort_param *param, uchar *to, uchar *ref_pos, else { uchar *end= field->pack(to, field->ptr); - int sz= static_cast(end - to); + DBUG_ASSERT(end >= to); + uint sz= static_cast(end - to); res_len += sz; if (packed_addon_fields) to+= sz; else + { + if (addonf->length > sz) + bzero(end, addonf->length - sz); // Make Valgrind/MSAN happy to+= addonf->length; + } } } if (packed_addon_fields) From 14521992b012c4f108be062b9e672910a5308923 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Tue, 21 Dec 2021 17:33:26 +0200 Subject: [PATCH 43/65] MDEV-27336 Crash on DROP DATABASE due to out-of-bounds result from InnoDB SUBSTR() eval_substr(): Do not allow the string buffer of the first argument to be extended. Trim the length of the returned result if it would exceed the end of the buffer. --- mysql-test/suite/innodb/r/dropdb.result | 10 ++++++++++ mysql-test/suite/innodb/t/dropdb.test | 11 +++++++++++ storage/innobase/eval/eval0eval.cc | 15 +++++++++++++-- 3 files changed, 34 insertions(+), 2 deletions(-) diff --git a/mysql-test/suite/innodb/r/dropdb.result b/mysql-test/suite/innodb/r/dropdb.result index e612b02b4c8cc..e1ff475b304dd 100644 --- a/mysql-test/suite/innodb/r/dropdb.result +++ b/mysql-test/suite/innodb/r/dropdb.result @@ -10,3 +10,13 @@ create table `#mysql50#q.q` select 1; ERROR 42000: Incorrect table name '#mysql50#q.q' create table `#mysql50#q·q` select 1; drop database `b`; +# +# MDEV-27336 Crash on DROP DATABASE due to out-of-bounds result +# from InnoDB SUBSTR() function +# +USE test; +CREATE TABLE t1(a INT PRIMARY KEY) ENGINE=InnoDB; +CREATE TABLE t2(a INT PRIMARY KEY REFERENCES t1(a)) ENGINE=InnoDB; +CREATE DATABASE somewhat_longer_name_to_cause_trouble; +DROP DATABASE somewhat_longer_name_to_cause_trouble; +DROP TABLE t2,t1; diff --git a/mysql-test/suite/innodb/t/dropdb.test b/mysql-test/suite/innodb/t/dropdb.test index 5e45e8608c2f7..f27aede78ec44 100644 --- a/mysql-test/suite/innodb/t/dropdb.test +++ b/mysql-test/suite/innodb/t/dropdb.test @@ -14,3 +14,14 @@ use `b`; create table `#mysql50#q.q` select 1; create table `#mysql50#q·q` select 1; drop database `b`; + +--echo # +--echo # MDEV-27336 Crash on DROP DATABASE due to out-of-bounds result +--echo # from InnoDB SUBSTR() function +--echo # +USE test; +CREATE TABLE t1(a INT PRIMARY KEY) ENGINE=InnoDB; +CREATE TABLE t2(a INT PRIMARY KEY REFERENCES t1(a)) ENGINE=InnoDB; +CREATE DATABASE somewhat_longer_name_to_cause_trouble; +DROP DATABASE somewhat_longer_name_to_cause_trouble; +DROP TABLE t2,t1; diff --git a/storage/innobase/eval/eval0eval.cc b/storage/innobase/eval/eval0eval.cc index 193a5814a7818..73ab113cff528 100644 --- a/storage/innobase/eval/eval0eval.cc +++ b/storage/innobase/eval/eval0eval.cc @@ -1,7 +1,7 @@ /***************************************************************************** Copyright (c) 1997, 2016, Oracle and/or its affiliates. All Rights Reserved. -Copyright (c) 2019, MariaDB Corporation. +Copyright (c) 2019, 2021, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -378,12 +378,23 @@ eval_substr( str1 = static_cast(dfield_get_data(que_node_get_val(arg1))); + const ulint str1_len = dfield_get_len(que_node_get_val(arg1)); + len1 = (ulint) eval_node_get_int_val(arg2); len2 = (ulint) eval_node_get_int_val(arg3); dfield = que_node_get_val(func_node); - dfield_set_data(dfield, str1 + len1, len2); + if (len1 > str1_len) { + len2 = 0; + } else { + str1 += len1; + if (len2 > str1_len - len1) { + len2 = str1_len - len1; + } + } + + dfield_set_data(dfield, str1, len2); } /*****************************************************************//** From a5ef74e7eb4bab09c9bda4fcd7fab12302526ea4 Mon Sep 17 00:00:00 2001 From: Alexander Barkov Date: Wed, 22 Dec 2021 13:12:40 +0400 Subject: [PATCH 44/65] MDEV-27195 SIGSEGV in Table_scope_and_contents_source_st::vers_check_system_fields The old code erroneously used default_charset_info to compare field names. default_charset_info can point to any arbitrary collation, including ucs2*, utf16*, utf32*, including those that do not support strcasecmp(). my_charset_utf8mb4_unicode_ci, which is used in this scenario: CREATE TABLE t1 ENGINE=InnoDB WITH SYSTEM VERSIONING AS SELECT 0; does not support strcasecmp(). Fixing the code to use Lex_ident::streq(), which uses system_charset_info instead of default_charset_info. --- mysql-test/main/ctype_utf8mb4_unicode_ci_def.opt | 1 + .../main/ctype_utf8mb4_unicode_ci_def.result | 11 +++++++++++ mysql-test/main/ctype_utf8mb4_unicode_ci_def.test | 15 +++++++++++++++ sql/handler.cc | 3 +-- 4 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 mysql-test/main/ctype_utf8mb4_unicode_ci_def.opt create mode 100644 mysql-test/main/ctype_utf8mb4_unicode_ci_def.result create mode 100644 mysql-test/main/ctype_utf8mb4_unicode_ci_def.test diff --git a/mysql-test/main/ctype_utf8mb4_unicode_ci_def.opt b/mysql-test/main/ctype_utf8mb4_unicode_ci_def.opt new file mode 100644 index 0000000000000..e430a45c10ebf --- /dev/null +++ b/mysql-test/main/ctype_utf8mb4_unicode_ci_def.opt @@ -0,0 +1 @@ +--character-set-server=utf8mb4,latin1 --collation-server=utf8mb4_unicode_ci diff --git a/mysql-test/main/ctype_utf8mb4_unicode_ci_def.result b/mysql-test/main/ctype_utf8mb4_unicode_ci_def.result new file mode 100644 index 0000000000000..2e15931248bb7 --- /dev/null +++ b/mysql-test/main/ctype_utf8mb4_unicode_ci_def.result @@ -0,0 +1,11 @@ +# +# Start of 10.3 tests +# +# +# MDEV-27195 SIGSEGV in Table_scope_and_contents_source_st::vers_check_system_fields +# +CREATE TABLE t1 ENGINE=MyISAM WITH SYSTEM VERSIONING AS SELECT 0; +DROP TABLE t1; +# +# End of 10.3 tests +# diff --git a/mysql-test/main/ctype_utf8mb4_unicode_ci_def.test b/mysql-test/main/ctype_utf8mb4_unicode_ci_def.test new file mode 100644 index 0000000000000..fb7fbe04e3b33 --- /dev/null +++ b/mysql-test/main/ctype_utf8mb4_unicode_ci_def.test @@ -0,0 +1,15 @@ +--echo # +--echo # Start of 10.3 tests +--echo # + +--echo # +--echo # MDEV-27195 SIGSEGV in Table_scope_and_contents_source_st::vers_check_system_fields +--echo # + +CREATE TABLE t1 ENGINE=MyISAM WITH SYSTEM VERSIONING AS SELECT 0; +DROP TABLE t1; + + +--echo # +--echo # End of 10.3 tests +--echo # diff --git a/sql/handler.cc b/sql/handler.cc index 11a387fb4e32d..f8702c27a393d 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -7264,8 +7264,7 @@ bool Table_scope_and_contents_source_st::vers_check_system_fields( { List_iterator dup_it(alter_info->create_list); for (Create_field *dup= dup_it++; !is_dup && dup != f; dup= dup_it++) - is_dup= my_strcasecmp(default_charset_info, - dup->field_name.str, f->field_name.str) == 0; + is_dup= Lex_ident(dup->field_name).streq(f->field_name); } if (!(f->flags & VERS_UPDATE_UNVERSIONED_FLAG) && !is_dup) From 3c1cde864e686349168521e7d98cf93e19be6c00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Wed, 22 Dec 2021 15:53:55 +0200 Subject: [PATCH 45/65] MDEV-27181 fixup: Replace symlinks Some tools on Microsoft Windows refuse to work with symbolic links. Let us simply copy the relatively small files instead. --- mysql-test/std_data/capath/3106f582.0 | 80 ++++++++++++++++++++++++++- mysql-test/std_data/capath/ed1f42db.0 | 80 ++++++++++++++++++++++++++- 2 files changed, 158 insertions(+), 2 deletions(-) mode change 120000 => 100644 mysql-test/std_data/capath/3106f582.0 mode change 120000 => 100644 mysql-test/std_data/capath/ed1f42db.0 diff --git a/mysql-test/std_data/capath/3106f582.0 b/mysql-test/std_data/capath/3106f582.0 deleted file mode 120000 index 1310cfcff205a..0000000000000 --- a/mysql-test/std_data/capath/3106f582.0 +++ /dev/null @@ -1 +0,0 @@ -cacert.pem \ No newline at end of file diff --git a/mysql-test/std_data/capath/3106f582.0 b/mysql-test/std_data/capath/3106f582.0 new file mode 100644 index 0000000000000..23dda2318e150 --- /dev/null +++ b/mysql-test/std_data/capath/3106f582.0 @@ -0,0 +1,79 @@ +Certificate: + Data: + Version: 3 (0x2) + Serial Number: + d0:4d:23:85:ee:59:b3:fa + Signature Algorithm: sha256WithRSAEncryption + Issuer: CN=cacert, C=FI, ST=Helsinki, L=Helsinki, O=MariaDB + Validity + Not Before: Jan 27 10:11:10 2019 GMT + Not After : Jan 22 10:11:10 2039 GMT + Subject: CN=cacert, C=FI, ST=Helsinki, L=Helsinki, O=MariaDB + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + Public-Key: (2048 bit) + Modulus: + 00:e8:0e:a7:84:d3:75:30:06:30:b2:10:b9:d1:88: + 36:2b:5e:f8:c8:44:57:cb:67:72:ab:96:95:33:d5: + 88:d1:8f:23:50:98:ba:6d:20:00:80:bd:35:d5:c1: + bf:98:49:c4:0a:15:4a:34:a6:21:9b:2e:8c:15:09: + f0:63:81:02:c2:7c:e2:53:e0:f7:a1:1a:40:5e:8f: + 41:4a:4c:56:d4:20:f1:d5:a7:c1:53:2e:ff:7e:37: + 17:cc:7e:74:bd:e2:22:33:ce:8c:77:62:a4:c5:3f: + 44:35:7b:7e:b9:f5:7d:8c:7a:27:58:fd:2c:42:86: + 2e:e7:6b:01:99:7b:fe:7d:a7:a1:4f:3e:39:39:54: + 1f:61:de:74:66:d1:77:4f:43:1b:66:70:29:85:de: + fc:8f:8e:1b:7b:a2:66:48:26:7f:9b:a6:fd:4a:e4: + dc:eb:ed:bd:f8:e3:f1:57:98:13:6f:f1:a3:2a:e3: + 73:bd:8d:7c:6f:4b:59:35:bc:b5:42:3e:99:a7:13: + 8d:be:2e:5c:9a:c6:5b:ab:ae:bf:00:e9:c8:ee:05: + 22:8e:d5:67:1a:47:9a:6d:9c:f9:42:3e:15:34:f8: + 31:ec:b4:7e:d3:92:95:b0:b8:f9:66:f3:bd:1d:31: + 2c:b1:90:62:a1:f8:4e:a6:5d:26:22:f0:e1:fe:16: + 2b:69 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Subject Key Identifier: + CA:71:99:89:F0:72:AB:75:66:BB:65:6A:03:04:72:A5:7B:95:A6:93 + X509v3 Authority Key Identifier: + keyid:CA:71:99:89:F0:72:AB:75:66:BB:65:6A:03:04:72:A5:7B:95:A6:93 + + X509v3 Basic Constraints: + CA:TRUE + Signature Algorithm: sha256WithRSAEncryption + df:fd:74:29:5b:5e:9a:8b:09:02:40:59:73:cb:71:47:3f:97: + 3d:a9:fd:c4:8c:01:29:c9:86:b8:71:55:ff:72:0e:50:dc:c8: + b5:e6:91:41:52:47:21:30:cc:4d:e7:3b:4b:db:55:ea:7d:46: + eb:53:e0:b7:1b:80:7c:b1:0c:d3:d1:bc:a0:73:ae:96:1f:fd: + 05:52:7e:54:d5:03:52:69:7b:34:5f:27:d7:98:da:98:76:73: + e6:bb:50:59:2a:94:90:67:03:1c:a4:76:2f:ee:ef:59:60:09: + 48:33:03:2b:52:ed:83:42:f8:71:19:7f:d8:be:40:ed:20:01: + 90:3c:7e:1c:8b:d2:9f:f3:2f:09:1f:50:c8:10:e1:8a:d9:a5: + 49:9c:0b:74:17:b9:2b:68:f6:1e:73:c2:73:10:38:b3:35:e2: + 87:91:1b:a1:d1:9b:81:9d:1b:32:cc:03:6e:4c:82:95:81:11: + 42:56:e2:16:2b:22:65:db:40:2c:ca:dc:03:f4:d5:07:cf:f5: + 13:b2:cf:51:5b:24:cd:c7:d1:9b:42:8e:f9:df:5d:1e:5a:09: + a3:4f:a9:0b:f4:21:c5:bb:ff:02:93:67:e8:2d:ee:ab:d9:59: + 76:03:2c:a1:bd:fb:dc:af:b6:82:94:71:85:53:a8:18:0d:3a: + 9e:42:eb:59 +-----BEGIN CERTIFICATE----- +MIIDfzCCAmegAwIBAgIJANBNI4XuWbP6MA0GCSqGSIb3DQEBCwUAMFYxDzANBgNV +BAMMBmNhY2VydDELMAkGA1UEBhMCRkkxETAPBgNVBAgMCEhlbHNpbmtpMREwDwYD +VQQHDAhIZWxzaW5raTEQMA4GA1UECgwHTWFyaWFEQjAeFw0xOTAxMjcxMDExMTBa +Fw0zOTAxMjIxMDExMTBaMFYxDzANBgNVBAMMBmNhY2VydDELMAkGA1UEBhMCRkkx +ETAPBgNVBAgMCEhlbHNpbmtpMREwDwYDVQQHDAhIZWxzaW5raTEQMA4GA1UECgwH +TWFyaWFEQjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOgOp4TTdTAG +MLIQudGINite+MhEV8tncquWlTPViNGPI1CYum0gAIC9NdXBv5hJxAoVSjSmIZsu +jBUJ8GOBAsJ84lPg96EaQF6PQUpMVtQg8dWnwVMu/343F8x+dL3iIjPOjHdipMU/ +RDV7frn1fYx6J1j9LEKGLudrAZl7/n2noU8+OTlUH2HedGbRd09DG2ZwKYXe/I+O +G3uiZkgmf5um/Urk3Ovtvfjj8VeYE2/xoyrjc72NfG9LWTW8tUI+macTjb4uXJrG +W6uuvwDpyO4FIo7VZxpHmm2c+UI+FTT4Mey0ftOSlbC4+WbzvR0xLLGQYqH4TqZd +JiLw4f4WK2kCAwEAAaNQME4wHQYDVR0OBBYEFMpxmYnwcqt1ZrtlagMEcqV7laaT +MB8GA1UdIwQYMBaAFMpxmYnwcqt1ZrtlagMEcqV7laaTMAwGA1UdEwQFMAMBAf8w +DQYJKoZIhvcNAQELBQADggEBAN/9dClbXpqLCQJAWXPLcUc/lz2p/cSMASnJhrhx +Vf9yDlDcyLXmkUFSRyEwzE3nO0vbVep9RutT4LcbgHyxDNPRvKBzrpYf/QVSflTV +A1JpezRfJ9eY2ph2c+a7UFkqlJBnAxykdi/u71lgCUgzAytS7YNC+HEZf9i+QO0g +AZA8fhyL0p/zLwkfUMgQ4YrZpUmcC3QXuSto9h5zwnMQOLM14oeRG6HRm4GdGzLM +A25MgpWBEUJW4hYrImXbQCzK3AP01QfP9ROyz1FbJM3H0ZtCjvnfXR5aCaNPqQv0 +IcW7/wKTZ+gt7qvZWXYDLKG9+9yvtoKUcYVTqBgNOp5C61k= +-----END CERTIFICATE----- diff --git a/mysql-test/std_data/capath/ed1f42db.0 b/mysql-test/std_data/capath/ed1f42db.0 deleted file mode 120000 index 1310cfcff205a..0000000000000 --- a/mysql-test/std_data/capath/ed1f42db.0 +++ /dev/null @@ -1 +0,0 @@ -cacert.pem \ No newline at end of file diff --git a/mysql-test/std_data/capath/ed1f42db.0 b/mysql-test/std_data/capath/ed1f42db.0 new file mode 100644 index 0000000000000..23dda2318e150 --- /dev/null +++ b/mysql-test/std_data/capath/ed1f42db.0 @@ -0,0 +1,79 @@ +Certificate: + Data: + Version: 3 (0x2) + Serial Number: + d0:4d:23:85:ee:59:b3:fa + Signature Algorithm: sha256WithRSAEncryption + Issuer: CN=cacert, C=FI, ST=Helsinki, L=Helsinki, O=MariaDB + Validity + Not Before: Jan 27 10:11:10 2019 GMT + Not After : Jan 22 10:11:10 2039 GMT + Subject: CN=cacert, C=FI, ST=Helsinki, L=Helsinki, O=MariaDB + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + Public-Key: (2048 bit) + Modulus: + 00:e8:0e:a7:84:d3:75:30:06:30:b2:10:b9:d1:88: + 36:2b:5e:f8:c8:44:57:cb:67:72:ab:96:95:33:d5: + 88:d1:8f:23:50:98:ba:6d:20:00:80:bd:35:d5:c1: + bf:98:49:c4:0a:15:4a:34:a6:21:9b:2e:8c:15:09: + f0:63:81:02:c2:7c:e2:53:e0:f7:a1:1a:40:5e:8f: + 41:4a:4c:56:d4:20:f1:d5:a7:c1:53:2e:ff:7e:37: + 17:cc:7e:74:bd:e2:22:33:ce:8c:77:62:a4:c5:3f: + 44:35:7b:7e:b9:f5:7d:8c:7a:27:58:fd:2c:42:86: + 2e:e7:6b:01:99:7b:fe:7d:a7:a1:4f:3e:39:39:54: + 1f:61:de:74:66:d1:77:4f:43:1b:66:70:29:85:de: + fc:8f:8e:1b:7b:a2:66:48:26:7f:9b:a6:fd:4a:e4: + dc:eb:ed:bd:f8:e3:f1:57:98:13:6f:f1:a3:2a:e3: + 73:bd:8d:7c:6f:4b:59:35:bc:b5:42:3e:99:a7:13: + 8d:be:2e:5c:9a:c6:5b:ab:ae:bf:00:e9:c8:ee:05: + 22:8e:d5:67:1a:47:9a:6d:9c:f9:42:3e:15:34:f8: + 31:ec:b4:7e:d3:92:95:b0:b8:f9:66:f3:bd:1d:31: + 2c:b1:90:62:a1:f8:4e:a6:5d:26:22:f0:e1:fe:16: + 2b:69 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Subject Key Identifier: + CA:71:99:89:F0:72:AB:75:66:BB:65:6A:03:04:72:A5:7B:95:A6:93 + X509v3 Authority Key Identifier: + keyid:CA:71:99:89:F0:72:AB:75:66:BB:65:6A:03:04:72:A5:7B:95:A6:93 + + X509v3 Basic Constraints: + CA:TRUE + Signature Algorithm: sha256WithRSAEncryption + df:fd:74:29:5b:5e:9a:8b:09:02:40:59:73:cb:71:47:3f:97: + 3d:a9:fd:c4:8c:01:29:c9:86:b8:71:55:ff:72:0e:50:dc:c8: + b5:e6:91:41:52:47:21:30:cc:4d:e7:3b:4b:db:55:ea:7d:46: + eb:53:e0:b7:1b:80:7c:b1:0c:d3:d1:bc:a0:73:ae:96:1f:fd: + 05:52:7e:54:d5:03:52:69:7b:34:5f:27:d7:98:da:98:76:73: + e6:bb:50:59:2a:94:90:67:03:1c:a4:76:2f:ee:ef:59:60:09: + 48:33:03:2b:52:ed:83:42:f8:71:19:7f:d8:be:40:ed:20:01: + 90:3c:7e:1c:8b:d2:9f:f3:2f:09:1f:50:c8:10:e1:8a:d9:a5: + 49:9c:0b:74:17:b9:2b:68:f6:1e:73:c2:73:10:38:b3:35:e2: + 87:91:1b:a1:d1:9b:81:9d:1b:32:cc:03:6e:4c:82:95:81:11: + 42:56:e2:16:2b:22:65:db:40:2c:ca:dc:03:f4:d5:07:cf:f5: + 13:b2:cf:51:5b:24:cd:c7:d1:9b:42:8e:f9:df:5d:1e:5a:09: + a3:4f:a9:0b:f4:21:c5:bb:ff:02:93:67:e8:2d:ee:ab:d9:59: + 76:03:2c:a1:bd:fb:dc:af:b6:82:94:71:85:53:a8:18:0d:3a: + 9e:42:eb:59 +-----BEGIN CERTIFICATE----- +MIIDfzCCAmegAwIBAgIJANBNI4XuWbP6MA0GCSqGSIb3DQEBCwUAMFYxDzANBgNV +BAMMBmNhY2VydDELMAkGA1UEBhMCRkkxETAPBgNVBAgMCEhlbHNpbmtpMREwDwYD +VQQHDAhIZWxzaW5raTEQMA4GA1UECgwHTWFyaWFEQjAeFw0xOTAxMjcxMDExMTBa +Fw0zOTAxMjIxMDExMTBaMFYxDzANBgNVBAMMBmNhY2VydDELMAkGA1UEBhMCRkkx +ETAPBgNVBAgMCEhlbHNpbmtpMREwDwYDVQQHDAhIZWxzaW5raTEQMA4GA1UECgwH +TWFyaWFEQjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOgOp4TTdTAG +MLIQudGINite+MhEV8tncquWlTPViNGPI1CYum0gAIC9NdXBv5hJxAoVSjSmIZsu +jBUJ8GOBAsJ84lPg96EaQF6PQUpMVtQg8dWnwVMu/343F8x+dL3iIjPOjHdipMU/ +RDV7frn1fYx6J1j9LEKGLudrAZl7/n2noU8+OTlUH2HedGbRd09DG2ZwKYXe/I+O +G3uiZkgmf5um/Urk3Ovtvfjj8VeYE2/xoyrjc72NfG9LWTW8tUI+macTjb4uXJrG +W6uuvwDpyO4FIo7VZxpHmm2c+UI+FTT4Mey0ftOSlbC4+WbzvR0xLLGQYqH4TqZd +JiLw4f4WK2kCAwEAAaNQME4wHQYDVR0OBBYEFMpxmYnwcqt1ZrtlagMEcqV7laaT +MB8GA1UdIwQYMBaAFMpxmYnwcqt1ZrtlagMEcqV7laaTMAwGA1UdEwQFMAMBAf8w +DQYJKoZIhvcNAQELBQADggEBAN/9dClbXpqLCQJAWXPLcUc/lz2p/cSMASnJhrhx +Vf9yDlDcyLXmkUFSRyEwzE3nO0vbVep9RutT4LcbgHyxDNPRvKBzrpYf/QVSflTV +A1JpezRfJ9eY2ph2c+a7UFkqlJBnAxykdi/u71lgCUgzAytS7YNC+HEZf9i+QO0g +AZA8fhyL0p/zLwkfUMgQ4YrZpUmcC3QXuSto9h5zwnMQOLM14oeRG6HRm4GdGzLM +A25MgpWBEUJW4hYrImXbQCzK3AP01QfP9ROyz1FbJM3H0ZtCjvnfXR5aCaNPqQv0 +IcW7/wKTZ+gt7qvZWXYDLKG9+9yvtoKUcYVTqBgNOp5C61k= +-----END CERTIFICATE----- From 12087d67579e641cfc07ee6b8c46b75171e9708c Mon Sep 17 00:00:00 2001 From: Daniel Black Date: Wed, 22 Dec 2021 01:05:18 +0100 Subject: [PATCH 46/65] MDEV-23175: my_timer_milliseconds clock_gettime for multiple platfomrs Small postfix to MDEV-23175 to ensure faster option on FreeBSD and compatibility to Solaris that isn't high resolution. ftime is left as a backup in case an implementation doesn't contain any of these clocks. FreeBSD $ ./unittest/mysys/my_rdtsc-t 1..11 # ----- Routine --------------- # myt.cycles.routine : 5 # myt.nanoseconds.routine : 11 # myt.microseconds.routine : 13 # myt.milliseconds.routine : 11 # myt.ticks.routine : 17 # ----- Frequency ------------- # myt.cycles.frequency : 3610295566 # myt.nanoseconds.frequency : 1000000000 # myt.microseconds.frequency : 1000000 # myt.milliseconds.frequency : 899 # myt.ticks.frequency : 136 # ----- Resolution ------------ # myt.cycles.resolution : 1 # myt.nanoseconds.resolution : 1 # myt.microseconds.resolution : 1 # myt.milliseconds.resolution : 7 # myt.ticks.resolution : 1 # ----- Overhead -------------- # myt.cycles.overhead : 26 # myt.nanoseconds.overhead : 19140 # myt.microseconds.overhead : 19036 # myt.milliseconds.overhead : 578 # myt.ticks.overhead : 21544 ok 1 - my_timer_init() did not crash ok 2 - The cycle timer is strictly increasing ok 3 - The cycle timer is implemented ok 4 - The nanosecond timer is increasing ok 5 - The nanosecond timer is implemented ok 6 - The microsecond timer is increasing ok 7 - The microsecond timer is implemented ok 8 - The millisecond timer is increasing ok 9 - The millisecond timer is implemented ok 10 - The tick timer is increasing ok 11 - The tick timer is implemented --- mysys/my_rdtsc.c | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/mysys/my_rdtsc.c b/mysys/my_rdtsc.c index b020e224a59f1..605ac20350c6c 100644 --- a/mysys/my_rdtsc.c +++ b/mysys/my_rdtsc.c @@ -356,9 +356,29 @@ ulonglong my_timer_microseconds(void) milliseconds. */ +#if defined(HAVE_CLOCK_GETTIME) +#if defined(CLOCK_MONOTONIC_FAST) +/* FreeBSD */ +#define MY_CLOCK_ID CLOCK_MONOTONIC_FAST +#elif defined(CLOCK_MONOTONIC_COARSE) +/* Linux */ +#define MY_CLOCK_ID CLOCK_MONOTONIC_COARSE +#elif defined(CLOCK_MONOTONIC) +/* POSIX (includes OSX) */ +#define MY_CLOCK_ID CLOCK_MONOTONIC +#elif defined(CLOCK_REALTIME) +/* Solaris (which doesn't seem to have MONOTONIC) */ +#define MY_CLOCK_ID CLOCK_REALTIME +#endif +#endif + ulonglong my_timer_milliseconds(void) { -#if defined(HAVE_SYS_TIMEB_H) && defined(HAVE_FTIME) +#if defined(MY_CLOCK_ID) + struct timespec tp; + clock_gettime(MY_CLOCK_ID, &tp); + return (ulonglong)tp.tv_sec * 1000 + (ulonglong)tp.tv_nsec / 1000000; +#elif defined(HAVE_SYS_TIMEB_H) && defined(HAVE_FTIME) /* ftime() is obsolete but maybe the platform is old */ struct timeb ft; ftime(&ft); @@ -631,7 +651,9 @@ void my_timer_init(MY_TIMER_INFO *mti) /* milliseconds */ mti->milliseconds.frequency= 1000; /* initial assumption */ -#if defined(HAVE_SYS_TIMEB_H) && defined(HAVE_FTIME) +#ifdef MY_CLOCK_ID + mti->milliseconds.routine= MY_TIMER_ROUTINE_CLOCK_GETTIME; +#elif defined(HAVE_SYS_TIMEB_H) && defined(HAVE_FTIME) mti->milliseconds.routine= MY_TIMER_ROUTINE_FTIME; #elif defined(_WIN32) mti->milliseconds.routine= MY_TIMER_ROUTINE_GETSYSTEMTIMEASFILETIME; From 4eec6b99e177a644650057f2c14d2f10ddd0ada4 Mon Sep 17 00:00:00 2001 From: Daniel Black Date: Wed, 15 Jul 2020 11:23:19 +1000 Subject: [PATCH 47/65] MDEV-23175: my_timer_milliseconds clock_gettime for multiple platfomrs Small postfix to MDEV-23175 to ensure faster option on FreeBSD and compatibility to Solaris that isn't high resolution. ftime is left as a backup in case an implementation doesn't contain any of these clocks. FreeBSD $ ./unittest/mysys/my_rdtsc-t 1..11 # ----- Routine --------------- # myt.cycles.routine : 5 # myt.nanoseconds.routine : 11 # myt.microseconds.routine : 13 # myt.milliseconds.routine : 11 # myt.ticks.routine : 17 # ----- Frequency ------------- # myt.cycles.frequency : 3610295566 # myt.nanoseconds.frequency : 1000000000 # myt.microseconds.frequency : 1000000 # myt.milliseconds.frequency : 899 # myt.ticks.frequency : 136 # ----- Resolution ------------ # myt.cycles.resolution : 1 # myt.nanoseconds.resolution : 1 # myt.microseconds.resolution : 1 # myt.milliseconds.resolution : 7 # myt.ticks.resolution : 1 # ----- Overhead -------------- # myt.cycles.overhead : 26 # myt.nanoseconds.overhead : 19140 # myt.microseconds.overhead : 19036 # myt.milliseconds.overhead : 578 # myt.ticks.overhead : 21544 ok 1 - my_timer_init() did not crash ok 2 - The cycle timer is strictly increasing ok 3 - The cycle timer is implemented ok 4 - The nanosecond timer is increasing ok 5 - The nanosecond timer is implemented ok 6 - The microsecond timer is increasing ok 7 - The microsecond timer is implemented ok 8 - The millisecond timer is increasing ok 9 - The millisecond timer is implemented ok 10 - The tick timer is increasing ok 11 - The tick timer is implemented --- mysys/my_rdtsc.c | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/mysys/my_rdtsc.c b/mysys/my_rdtsc.c index c707588da0184..1503a5db44259 100644 --- a/mysys/my_rdtsc.c +++ b/mysys/my_rdtsc.c @@ -173,9 +173,29 @@ ulonglong my_timer_microseconds(void) milliseconds. */ +#if defined(HAVE_CLOCK_GETTIME) +#if defined(CLOCK_MONOTONIC_FAST) +/* FreeBSD */ +#define MY_CLOCK_ID CLOCK_MONOTONIC_FAST +#elif defined(CLOCK_MONOTONIC_COARSE) +/* Linux */ +#define MY_CLOCK_ID CLOCK_MONOTONIC_COARSE +#elif defined(CLOCK_MONOTONIC) +/* POSIX (includes OSX) */ +#define MY_CLOCK_ID CLOCK_MONOTONIC +#elif defined(CLOCK_REALTIME) +/* Solaris (which doesn't seem to have MONOTONIC) */ +#define MY_CLOCK_ID CLOCK_REALTIME +#endif +#endif + ulonglong my_timer_milliseconds(void) { -#if defined(HAVE_SYS_TIMEB_H) && defined(HAVE_FTIME) +#if defined(MY_CLOCK_ID) + struct timespec tp; + clock_gettime(MY_CLOCK_ID, &tp); + return (ulonglong)tp.tv_sec * 1000 + (ulonglong)tp.tv_nsec / 1000000; +#elif defined(HAVE_SYS_TIMEB_H) && defined(HAVE_FTIME) /* ftime() is obsolete but maybe the platform is old */ struct timeb ft; ftime(&ft); @@ -428,7 +448,9 @@ void my_timer_init(MY_TIMER_INFO *mti) /* milliseconds */ mti->milliseconds.frequency= 1000; /* initial assumption */ -#if defined(HAVE_SYS_TIMEB_H) && defined(HAVE_FTIME) +#ifdef MY_CLOCK_ID + mti->milliseconds.routine= MY_TIMER_ROUTINE_CLOCK_GETTIME; +#elif defined(HAVE_SYS_TIMEB_H) && defined(HAVE_FTIME) mti->milliseconds.routine= MY_TIMER_ROUTINE_FTIME; #elif defined(_WIN32) mti->milliseconds.routine= MY_TIMER_ROUTINE_GETSYSTEMTIMEASFILETIME; From be20b3b03f9c522d17b3454214981506549063eb Mon Sep 17 00:00:00 2001 From: Brandon Nesterenko Date: Tue, 21 Dec 2021 16:22:33 -0700 Subject: [PATCH 48/65] MDEV-26919: binlog.binlog_truncate_active_log fails in bb with valgrind, Conditional jump or move depends on uninitialised value Problem: ======== When writing an XA based event to the binary log, an assert was always referencing thd->lex->xa_opt. This variable, however, is only set when using XA START, XA END, and XA COMMIT. When an XA PREPARE statement is being processed, it is not guaranteed that the xa_opt variable will be set (e.g. if existing within a stored procedure). This caused valgrind to complain about accessing an uninitialized variable. Solution: ======== Before referencing xa_opt, ensure the context is valid such that it is set. Reviewed By: ============ Andrei Elkin --- sql/log_event_server.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sql/log_event_server.cc b/sql/log_event_server.cc index 093adebf536ff..7c4ea488f9e50 100644 --- a/sql/log_event_server.cc +++ b/sql/log_event_server.cc @@ -3281,7 +3281,8 @@ Gtid_log_event::Gtid_log_event(THD *thd_arg, uint64 seq_no_arg, (thd->lex->sql_command == SQLCOM_XA_PREPARE || xid_state.get_state_code() == XA_PREPARED)) { - DBUG_ASSERT(thd->lex->xa_opt != XA_ONE_PHASE); + DBUG_ASSERT(!(thd->lex->sql_command == SQLCOM_XA_COMMIT && + thd->lex->xa_opt == XA_ONE_PHASE)); flags2|= thd->lex->sql_command == SQLCOM_XA_PREPARE ? FL_PREPARED_XA : FL_COMPLETED_XA; From ca2ea4ff4178d097ac2d939b8fd88ea658ed64dc Mon Sep 17 00:00:00 2001 From: Monty Date: Tue, 19 May 2020 20:15:00 +0300 Subject: [PATCH 49/65] Only apply wsrep_trx_fragment_size to InnoDB tables MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit MDEV-22617 Galera node crashes when trying to log to slow_log table in streaming replication mode Other things: - Changed name of wsrep_after_row(two arguments) to wsrep_after_row_internal(one argument) to not depended on the function signature with unused arguments. Reviewed-by: Jan Lindström Added test case --- mysql-test/suite/galera_sr/r/galera_sr_slow.result | 13 +++++++++++++ mysql-test/suite/galera_sr/t/galera_sr_slow.test | 11 +++++++++++ sql/handler.cc | 11 +++++++---- sql/wsrep_trans_observer.h | 2 +- 4 files changed, 32 insertions(+), 5 deletions(-) create mode 100644 mysql-test/suite/galera_sr/r/galera_sr_slow.result create mode 100644 mysql-test/suite/galera_sr/t/galera_sr_slow.test diff --git a/mysql-test/suite/galera_sr/r/galera_sr_slow.result b/mysql-test/suite/galera_sr/r/galera_sr_slow.result new file mode 100644 index 0000000000000..a03aac0d085b1 --- /dev/null +++ b/mysql-test/suite/galera_sr/r/galera_sr_slow.result @@ -0,0 +1,13 @@ +connection node_2; +connection node_1; +connection node_1; +SET GLOBAL wsrep_trx_fragment_unit='bytes'; +SET GLOBAL wsrep_trx_fragment_size=10240000; +SET GLOBAL slow_query_log=ON; +SET GLOBAL log_output='TABLE'; +SELECT SLEEP(10); +SLEEP(10) +0 +SET GLOBAL wsrep_trx_fragment_unit=DEFAULT; +SET GLOBAL wsrep_trx_fragment_size=DEFAULT; +SET GLOBAL log_output=DEFAULT; diff --git a/mysql-test/suite/galera_sr/t/galera_sr_slow.test b/mysql-test/suite/galera_sr/t/galera_sr_slow.test new file mode 100644 index 0000000000000..d98305102fc9d --- /dev/null +++ b/mysql-test/suite/galera_sr/t/galera_sr_slow.test @@ -0,0 +1,11 @@ +--source include/galera_cluster.inc + +--connection node_1 +SET GLOBAL wsrep_trx_fragment_unit='bytes'; +SET GLOBAL wsrep_trx_fragment_size=10240000; +SET GLOBAL slow_query_log=ON; +SET GLOBAL log_output='TABLE'; +SELECT SLEEP(10); +SET GLOBAL wsrep_trx_fragment_unit=DEFAULT; +SET GLOBAL wsrep_trx_fragment_size=DEFAULT; +SET GLOBAL log_output=DEFAULT; diff --git a/sql/handler.cc b/sql/handler.cc index 812de48fa686f..82472bcadde51 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -6579,7 +6579,7 @@ static int wsrep_after_row(THD *thd) my_message(ER_ERROR_DURING_COMMIT, "wsrep_max_ws_rows exceeded", MYF(0)); DBUG_RETURN(ER_ERROR_DURING_COMMIT); } - else if (wsrep_after_row(thd, false)) + else if (wsrep_after_row_internal(thd)) { DBUG_RETURN(ER_LOCK_DEADLOCK); } @@ -6778,7 +6778,8 @@ int handler::ha_write_row(const uchar *buf) error= binlog_log_row(table, 0, buf, log_func); #ifdef WITH_WSREP if (table_share->tmp_table == NO_TMP_TABLE && - WSREP(ha_thd()) && (error= wsrep_after_row(ha_thd()))) + WSREP(ha_thd()) && ht->flags & HTON_WSREP_REPLICATION && + !error && (error= wsrep_after_row(ha_thd()))) { DBUG_RETURN(error); } @@ -6836,7 +6837,8 @@ int handler::ha_update_row(const uchar *old_data, const uchar *new_data) } } if (table_share->tmp_table == NO_TMP_TABLE && - is_wsrep && (error= wsrep_after_row(thd))) + is_wsrep && ht->flags & HTON_WSREP_REPLICATION && + !error && (error= wsrep_after_row(thd))) { return error; } @@ -6911,7 +6913,8 @@ int handler::ha_delete_row(const uchar *buf) } } if (table_share->tmp_table == NO_TMP_TABLE && - is_wsrep && (error= wsrep_after_row(thd))) + is_wsrep && ht->flags & HTON_WSREP_REPLICATION && + !error && (error= wsrep_after_row(thd))) { return error; } diff --git a/sql/wsrep_trans_observer.h b/sql/wsrep_trans_observer.h index 55beb6ebe7c1e..837bad4c50fd5 100644 --- a/sql/wsrep_trans_observer.h +++ b/sql/wsrep_trans_observer.h @@ -158,7 +158,7 @@ static inline int wsrep_start_trx_if_not_started(THD* thd) Return zero on succes, non-zero on failure. */ -static inline int wsrep_after_row(THD* thd, bool) +static inline int wsrep_after_row_internal(THD* thd) { if (thd->wsrep_cs().state() != wsrep::client_state::s_none && wsrep_thd_is_local(thd)) From 0165a0632256a30fcb5b55b677ca5927478d1212 Mon Sep 17 00:00:00 2001 From: Leandro Pacheco Date: Mon, 13 Sep 2021 11:20:22 -0300 Subject: [PATCH 50/65] result of wsrep logic in queue_for_group_commit was being ignored MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This could cause out of order wsrep checkpoints due wsrep specific leader code not being executed in `MYSQL_BIN_LOG::write_transaction_to_binlog_events`. Move original result assignment to before wsrep logic to prevent that. Reviewed-by: Jan Lindström --- sql/log.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sql/log.cc b/sql/log.cc index fbe7c78c4ac96..c5a192d56d3e0 100644 --- a/sql/log.cc +++ b/sql/log.cc @@ -7768,6 +7768,8 @@ MYSQL_BIN_LOG::queue_for_group_commit(group_commit_entry *orig_entry) cur= entry->thd->wait_for_commit_ptr; } + result= orig_queue == NULL; + #ifdef WITH_WSREP if (wsrep_is_active(entry->thd) && wsrep_run_commit_hook(entry->thd, entry->all)) @@ -7791,7 +7793,6 @@ MYSQL_BIN_LOG::queue_for_group_commit(group_commit_entry *orig_entry) DBUG_PRINT("info", ("Queued for group commit as %s", (orig_queue == NULL) ? "leader" : "participant")); - result= orig_queue == NULL; end: if (backup_lock_released) From 397f5cf71ee9424373febe0cb8fb0bce1e02e504 Mon Sep 17 00:00:00 2001 From: Sergei Petrunia Date: Thu, 23 Dec 2021 12:00:05 +0300 Subject: [PATCH 51/65] MDEV-27238: Assertion `got_name == named_item_expected()' failed in Json_writer make_join_select() calls const_cond->val_int(). There are edge cases where const_cond may have a not-yet optimized subquery. (The subquery will have used_tables() covered by join->const_tables. It will still have const_item()==false, so other parts of the optimizer will not try to evaluate it. We should probably mark such subqueries as constant but that is outside the scope of this MDEV) --- mysql-test/main/opt_trace.result | 27 +++++++++++++++++++++------ mysql-test/main/opt_trace.test | 10 ++++++++++ sql/sql_select.cc | 6 +++++- 3 files changed, 36 insertions(+), 7 deletions(-) diff --git a/mysql-test/main/opt_trace.result b/mysql-test/main/opt_trace.result index 0e4477e1fd938..34683d037ea30 100644 --- a/mysql-test/main/opt_trace.result +++ b/mysql-test/main/opt_trace.result @@ -2393,7 +2393,8 @@ select t1.a from t1 left join t2 on t1.a=t2.a { "best_join_order": ["t2", "t1"] }, { - "condition_on_constant_tables": "1" + "condition_on_constant_tables": "1", + "computing_condition": [] }, { "attaching_conditions_to_tables": { @@ -2550,7 +2551,8 @@ explain select * from t1 left join t2 on t2.a=t1.a { "best_join_order": ["t1", "t2"] }, { - "condition_on_constant_tables": "1" + "condition_on_constant_tables": "1", + "computing_condition": [] }, { "attaching_conditions_to_tables": { @@ -2708,7 +2710,8 @@ explain select t1.a from t1 left join (t2 join t3 on t2.b=t3.b) on t2.a=t1.a and "best_join_order": ["t3", "t2", "t1"] }, { - "condition_on_constant_tables": "1" + "condition_on_constant_tables": "1", + "computing_condition": [] }, { "attaching_conditions_to_tables": { @@ -3021,7 +3024,8 @@ explain extended select * from t1 where a in (select pk from t10) { "best_join_order": ["t1", ""] }, { - "condition_on_constant_tables": "1" + "condition_on_constant_tables": "1", + "computing_condition": [] }, { "attaching_conditions_to_tables": { @@ -4719,7 +4723,8 @@ explain select * from t1 where a in (select t_inner_1.a from t1 t_inner_1, t1 t_ "best_join_order": ["t1", ""] }, { - "condition_on_constant_tables": "1" + "condition_on_constant_tables": "1", + "computing_condition": [] }, { "attaching_conditions_to_tables": { @@ -7365,7 +7370,8 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) { ] }, { - "condition_on_constant_tables": "1" + "condition_on_constant_tables": "1", + "computing_condition": [] }, { "attaching_conditions_to_tables": { @@ -8632,5 +8638,14 @@ SELECT 'a\0' LIMIT 0 { } SET optimizer_trace=DEFAULT; # +# MDEV-27238: Assertion `got_name == named_item_expected()' failed in Json_writer::on_start_object +# +CREATE TABLE t1 (a INT KEY,b INT,KEY(b)) ENGINE=MEMORY; +SET optimizer_trace=1; +INSERT INTO t1 VALUES (0,0); +SELECT a FROM t1 WHERE (a,b) in (SELECT @c,@d); +a +DROP TABLE t1; +# # End of 10.4 tests # diff --git a/mysql-test/main/opt_trace.test b/mysql-test/main/opt_trace.test index 9d4794855e0c5..855ce11aaf501 100644 --- a/mysql-test/main/opt_trace.test +++ b/mysql-test/main/opt_trace.test @@ -643,6 +643,16 @@ SELECT 'a\0' LIMIT 0; SELECT query, trace FROM INFORMATION_SCHEMA.OPTIMIZER_TRACE; SET optimizer_trace=DEFAULT; +--echo # +--echo # MDEV-27238: Assertion `got_name == named_item_expected()' failed in Json_writer::on_start_object +--echo # + +CREATE TABLE t1 (a INT KEY,b INT,KEY(b)) ENGINE=MEMORY; +SET optimizer_trace=1; +INSERT INTO t1 VALUES (0,0); +SELECT a FROM t1 WHERE (a,b) in (SELECT @c,@d); +DROP TABLE t1; + --echo # --echo # End of 10.4 tests --echo # diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 27fc27f242a2c..35925c0cd4439 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -11409,7 +11409,11 @@ make_join_select(JOIN *join,SQL_SELECT *select,COND *cond) } else { - const bool const_cond_result = const_cond->val_int() != 0; + bool const_cond_result; + { + Json_writer_array a(thd, "computing_condition"); + const_cond_result= const_cond->val_int() != 0; + } if (!const_cond_result) { DBUG_PRINT("info",("Found impossible WHERE condition")); From 4b020bfd9a10f991845b995780db4879f8c9f61d Mon Sep 17 00:00:00 2001 From: Sergei Petrunia Date: Thu, 23 Dec 2021 12:03:09 +0300 Subject: [PATCH 52/65] Fix typos in optimizer trace output --- sql/sql_select.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 35925c0cd4439..cfd1fbb327521 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -11404,7 +11404,7 @@ make_join_select(JOIN *join,SQL_SELECT *select,COND *cond) trace_const_cond.add("condition_on_constant_tables", const_cond); if (const_cond->is_expensive()) { - trace_const_cond.add("evalualted", "false") + trace_const_cond.add("evaluated", "false") .add("cause", "expensive cond"); } else @@ -11417,7 +11417,7 @@ make_join_select(JOIN *join,SQL_SELECT *select,COND *cond) if (!const_cond_result) { DBUG_PRINT("info",("Found impossible WHERE condition")); - trace_const_cond.add("evalualted", "true") + trace_const_cond.add("evaluated", "true") .add("found", "impossible where"); join->exec_const_cond= NULL; DBUG_RETURN(1); From b5cbe50604046647b52c1ed6b5af596483a120be Mon Sep 17 00:00:00 2001 From: Julius Goryavsky Date: Thu, 23 Dec 2021 14:19:45 +0100 Subject: [PATCH 53/65] MDEV-24097: galera[_3nodes] suite tests in MTR sporadically fails This is the first part of the fixes for MDEV-24097. This commit contains the fixes for instability when testing Galera and when restarting nodes quickly: 1) Protection against a "stuck" old SST process during the execution of the new SST (after restarting the node) is now implemented for mariabackup / xtrabackup, which should help to avoid almost all conflicts due to the use of the same ports - both during testing with mtr, so and when restarting nodes quickly in a production environment. 2) Added more protection to scripts against unexpected return of the rc != 0 (in the commands for deleting temporary files, etc). 3) Added protection against unexpected crashes during binlog transfer (in SST scripts for rsync). 4) Spaces and some special characters in binlog filenames shouldn't be a problem now (at the script level). 5) Daemon process termination tracking has been made more robust against crashes due to unexpected termination of the previous SST process while new scripts are running. 6) Reading ssl encryption parameters has been moved from specific SST scripts to a common wsrep_sst_common.sh script, which allows unified error handling, unified diagnostics and simplifies script revisions in the future. 7) Improved diagnostics of errors related to the use of openssl. 8) Corrections have been made for xtrabackup-v2 (both in tests and in the script code) that restore the work of xtrabackup with updated versions of innodb. 9) Fixed some tests for galera_3nodes, although the complete solution for the problem of starting three nodes at the same time on fast machines will be done in a separate commit. No additional tests are required as this commit fixes problems with existing tests. --- mysql-test/suite/galera/disabled.def | 2 - .../galera_sst_xtrabackup-v2_data_dir.result | 26 +++ .../t/galera_autoinc_sst_xtrabackup.cnf | 1 + .../galera/t/galera_ist_xtrabackup-v2.cnf | 1 + .../t/galera_sst_xtrabackup-v2-options.cnf | 1 + .../galera/t/galera_sst_xtrabackup-v2.cnf | 1 + .../t/galera_sst_xtrabackup-v2_data_dir.cnf | 1 + ...era_sst_xtrabackup-v2_encrypt_with_key.cnf | 1 + .../r/galera_ist_gcache_rollover.result | 4 +- .../t/galera_ist_gcache_rollover.test | 10 +- scripts/wsrep_sst_common.sh | 142 ++++++++++----- scripts/wsrep_sst_mariabackup.sh | 109 +++++------- scripts/wsrep_sst_rsync.sh | 161 ++++++++---------- scripts/wsrep_sst_xtrabackup-v2.sh | 117 +++++-------- 14 files changed, 292 insertions(+), 285 deletions(-) diff --git a/mysql-test/suite/galera/disabled.def b/mysql-test/suite/galera/disabled.def index 955a2c82ebcf3..84babda2fa009 100644 --- a/mysql-test/suite/galera/disabled.def +++ b/mysql-test/suite/galera/disabled.def @@ -28,5 +28,3 @@ query_cache: MDEV-15805 Test failure on galera.query_cache versioning_trx_id: MDEV-18590: galera.versioning_trx_id: Test failure: mysqltest: Result content mismatch galera_wsrep_provider_unset_set: wsrep_provider is read-only for security reasons pxc-421: wsrep_provider is read-only for security reasons -galera_sst_xtrabackup-v2: Test fails due to innodb issues -galera_sst_xtrabackup-v2_data_dir: Test fails due to innodb issues diff --git a/mysql-test/suite/galera/r/galera_sst_xtrabackup-v2_data_dir.result b/mysql-test/suite/galera/r/galera_sst_xtrabackup-v2_data_dir.result index cec0f21ee22ae..ff85a7d6c0fe8 100644 --- a/mysql-test/suite/galera/r/galera_sst_xtrabackup-v2_data_dir.result +++ b/mysql-test/suite/galera/r/galera_sst_xtrabackup-v2_data_dir.result @@ -1,4 +1,7 @@ +connection node_1; +connection node_2; Performing State Transfer on a server that has been shut down cleanly and restarted +connection node_1; CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB; SET AUTOCOMMIT=OFF; START TRANSACTION; @@ -8,6 +11,7 @@ INSERT INTO t1 VALUES ('node1_committed_before'); INSERT INTO t1 VALUES ('node1_committed_before'); INSERT INTO t1 VALUES ('node1_committed_before'); COMMIT; +connection node_2; SET AUTOCOMMIT=OFF; START TRANSACTION; INSERT INTO t1 VALUES ('node2_committed_before'); @@ -17,6 +21,7 @@ INSERT INTO t1 VALUES ('node2_committed_before'); INSERT INTO t1 VALUES ('node2_committed_before'); COMMIT; Shutting down server ... +connection node_1; SET AUTOCOMMIT=OFF; START TRANSACTION; INSERT INTO t1 VALUES ('node1_committed_during'); @@ -31,6 +36,7 @@ INSERT INTO t1 VALUES ('node1_to_be_committed_after'); INSERT INTO t1 VALUES ('node1_to_be_committed_after'); INSERT INTO t1 VALUES ('node1_to_be_committed_after'); INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +connect node_1a_galera_st_shutdown_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1; SET AUTOCOMMIT=OFF; START TRANSACTION; INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); @@ -38,6 +44,7 @@ INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +connection node_2; Starting server ... SET AUTOCOMMIT=OFF; START TRANSACTION; @@ -47,6 +54,7 @@ INSERT INTO t1 VALUES ('node2_committed_after'); INSERT INTO t1 VALUES ('node2_committed_after'); INSERT INTO t1 VALUES ('node2_committed_after'); COMMIT; +connection node_1; INSERT INTO t1 VALUES ('node1_to_be_committed_after'); INSERT INTO t1 VALUES ('node1_to_be_committed_after'); INSERT INTO t1 VALUES ('node1_to_be_committed_after'); @@ -61,6 +69,7 @@ INSERT INTO t1 VALUES ('node1_committed_after'); INSERT INTO t1 VALUES ('node1_committed_after'); INSERT INTO t1 VALUES ('node1_committed_after'); COMMIT; +connection node_1a_galera_st_shutdown_slave; INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); @@ -75,6 +84,7 @@ COUNT(*) = 0 1 COMMIT; SET AUTOCOMMIT=ON; +connection node_1; SELECT COUNT(*) = 35 FROM t1; COUNT(*) = 35 1 @@ -86,6 +96,7 @@ COMMIT; SET AUTOCOMMIT=ON; Performing State Transfer on a server that starts from a clean var directory This is accomplished by shutting down node #2 and removing its var directory before restarting it +connection node_1; CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB; SET AUTOCOMMIT=OFF; START TRANSACTION; @@ -95,6 +106,7 @@ INSERT INTO t1 VALUES ('node1_committed_before'); INSERT INTO t1 VALUES ('node1_committed_before'); INSERT INTO t1 VALUES ('node1_committed_before'); COMMIT; +connection node_2; SET AUTOCOMMIT=OFF; START TRANSACTION; INSERT INTO t1 VALUES ('node2_committed_before'); @@ -104,6 +116,7 @@ INSERT INTO t1 VALUES ('node2_committed_before'); INSERT INTO t1 VALUES ('node2_committed_before'); COMMIT; Shutting down server ... +connection node_1; Cleaning var directory ... SET AUTOCOMMIT=OFF; START TRANSACTION; @@ -119,6 +132,7 @@ INSERT INTO t1 VALUES ('node1_to_be_committed_after'); INSERT INTO t1 VALUES ('node1_to_be_committed_after'); INSERT INTO t1 VALUES ('node1_to_be_committed_after'); INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +connect node_1a_galera_st_clean_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1; SET AUTOCOMMIT=OFF; START TRANSACTION; INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); @@ -126,6 +140,7 @@ INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +connection node_2; Starting server ... SET AUTOCOMMIT=OFF; START TRANSACTION; @@ -135,6 +150,7 @@ INSERT INTO t1 VALUES ('node2_committed_after'); INSERT INTO t1 VALUES ('node2_committed_after'); INSERT INTO t1 VALUES ('node2_committed_after'); COMMIT; +connection node_1; INSERT INTO t1 VALUES ('node1_to_be_committed_after'); INSERT INTO t1 VALUES ('node1_to_be_committed_after'); INSERT INTO t1 VALUES ('node1_to_be_committed_after'); @@ -149,6 +165,7 @@ INSERT INTO t1 VALUES ('node1_committed_after'); INSERT INTO t1 VALUES ('node1_committed_after'); INSERT INTO t1 VALUES ('node1_committed_after'); COMMIT; +connection node_1a_galera_st_clean_slave; INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); @@ -163,6 +180,7 @@ COUNT(*) = 0 1 COMMIT; SET AUTOCOMMIT=ON; +connection node_1; SELECT COUNT(*) = 35 FROM t1; COUNT(*) = 35 1 @@ -173,6 +191,7 @@ DROP TABLE t1; COMMIT; SET AUTOCOMMIT=ON; Performing State Transfer on a server that has been killed and restarted +connection node_1; CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB; SET AUTOCOMMIT=OFF; START TRANSACTION; @@ -182,6 +201,7 @@ INSERT INTO t1 VALUES ('node1_committed_before'); INSERT INTO t1 VALUES ('node1_committed_before'); INSERT INTO t1 VALUES ('node1_committed_before'); COMMIT; +connection node_2; SET AUTOCOMMIT=OFF; START TRANSACTION; INSERT INTO t1 VALUES ('node2_committed_before'); @@ -191,6 +211,7 @@ INSERT INTO t1 VALUES ('node2_committed_before'); INSERT INTO t1 VALUES ('node2_committed_before'); COMMIT; Killing server ... +connection node_1; SET AUTOCOMMIT=OFF; START TRANSACTION; INSERT INTO t1 VALUES ('node1_committed_during'); @@ -205,6 +226,7 @@ INSERT INTO t1 VALUES ('node1_to_be_committed_after'); INSERT INTO t1 VALUES ('node1_to_be_committed_after'); INSERT INTO t1 VALUES ('node1_to_be_committed_after'); INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +connect node_1a_galera_st_kill_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1; SET AUTOCOMMIT=OFF; START TRANSACTION; INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); @@ -212,6 +234,7 @@ INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +connection node_2; Performing --wsrep-recover ... Starting server ... Using --wsrep-start-position when starting mysqld ... @@ -223,6 +246,7 @@ INSERT INTO t1 VALUES ('node2_committed_after'); INSERT INTO t1 VALUES ('node2_committed_after'); INSERT INTO t1 VALUES ('node2_committed_after'); COMMIT; +connection node_1; INSERT INTO t1 VALUES ('node1_to_be_committed_after'); INSERT INTO t1 VALUES ('node1_to_be_committed_after'); INSERT INTO t1 VALUES ('node1_to_be_committed_after'); @@ -237,6 +261,7 @@ INSERT INTO t1 VALUES ('node1_committed_after'); INSERT INTO t1 VALUES ('node1_committed_after'); INSERT INTO t1 VALUES ('node1_committed_after'); COMMIT; +connection node_1a_galera_st_kill_slave; INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); @@ -251,6 +276,7 @@ COUNT(*) = 0 1 COMMIT; SET AUTOCOMMIT=ON; +connection node_1; SELECT COUNT(*) = 35 FROM t1; COUNT(*) = 35 1 diff --git a/mysql-test/suite/galera/t/galera_autoinc_sst_xtrabackup.cnf b/mysql-test/suite/galera/t/galera_autoinc_sst_xtrabackup.cnf index 2e25ecae317d1..f6ee3c56e5e6c 100644 --- a/mysql-test/suite/galera/t/galera_autoinc_sst_xtrabackup.cnf +++ b/mysql-test/suite/galera/t/galera_autoinc_sst_xtrabackup.cnf @@ -4,6 +4,7 @@ wsrep_sst_method=xtrabackup-v2 wsrep_sst_auth="root:" innodb_safe_truncate=OFF +# innodb_undo_logs=1 [mysqld.1] wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcache.size=1;pc.ignore_sb=true' diff --git a/mysql-test/suite/galera/t/galera_ist_xtrabackup-v2.cnf b/mysql-test/suite/galera/t/galera_ist_xtrabackup-v2.cnf index 5b35701aeab11..7242606fe0598 100644 --- a/mysql-test/suite/galera/t/galera_ist_xtrabackup-v2.cnf +++ b/mysql-test/suite/galera/t/galera_ist_xtrabackup-v2.cnf @@ -4,6 +4,7 @@ wsrep_sst_method=xtrabackup-v2 wsrep_sst_auth=root: innodb_safe_truncate=OFF +innodb_undo_logs=1 [mysqld.1] wsrep_provider_options='base_port=@mysqld.1.#galera_port;pc.ignore_sb=true' diff --git a/mysql-test/suite/galera/t/galera_sst_xtrabackup-v2-options.cnf b/mysql-test/suite/galera/t/galera_sst_xtrabackup-v2-options.cnf index af3a7aecec491..ec83659296519 100644 --- a/mysql-test/suite/galera/t/galera_sst_xtrabackup-v2-options.cnf +++ b/mysql-test/suite/galera/t/galera_sst_xtrabackup-v2-options.cnf @@ -5,6 +5,7 @@ wsrep_sst_method=xtrabackup-v2 wsrep_sst_auth="root:" wsrep_debug=ON innodb_safe_truncate=OFF +innodb_undo_logs=1 [xtrabackup] backup-locks diff --git a/mysql-test/suite/galera/t/galera_sst_xtrabackup-v2.cnf b/mysql-test/suite/galera/t/galera_sst_xtrabackup-v2.cnf index e347e2598977d..ad99bd909b8db 100644 --- a/mysql-test/suite/galera/t/galera_sst_xtrabackup-v2.cnf +++ b/mysql-test/suite/galera/t/galera_sst_xtrabackup-v2.cnf @@ -5,6 +5,7 @@ wsrep_sst_method=xtrabackup-v2 wsrep_sst_auth="root:" wsrep_debug=ON innodb_safe_truncate=OFF +innodb_undo_logs=1 [mysqld.1] wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcache.size=1;pc.ignore_sb=true' diff --git a/mysql-test/suite/galera/t/galera_sst_xtrabackup-v2_data_dir.cnf b/mysql-test/suite/galera/t/galera_sst_xtrabackup-v2_data_dir.cnf index 43180173425d7..8665c517629cd 100644 --- a/mysql-test/suite/galera/t/galera_sst_xtrabackup-v2_data_dir.cnf +++ b/mysql-test/suite/galera/t/galera_sst_xtrabackup-v2_data_dir.cnf @@ -5,6 +5,7 @@ wsrep_sst_method=xtrabackup-v2 wsrep_sst_auth="root:" wsrep_debug=ON innodb_safe_truncate=OFF +innodb_undo_logs=1 [mysqld.1] wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcache.size=1;pc.ignore_sb=true' diff --git a/mysql-test/suite/galera/t/galera_sst_xtrabackup-v2_encrypt_with_key.cnf b/mysql-test/suite/galera/t/galera_sst_xtrabackup-v2_encrypt_with_key.cnf index 7a98fd2aa5813..984d040c6abfd 100644 --- a/mysql-test/suite/galera/t/galera_sst_xtrabackup-v2_encrypt_with_key.cnf +++ b/mysql-test/suite/galera/t/galera_sst_xtrabackup-v2_encrypt_with_key.cnf @@ -5,6 +5,7 @@ wsrep_sst_method=xtrabackup-v2 wsrep_sst_auth="root:" wsrep_debug=ON innodb_safe_truncate=OFF +innodb_undo_logs=1 [SST] tkey=@ENV.MYSQL_TEST_DIR/std_data/cakey.pem diff --git a/mysql-test/suite/galera_3nodes/r/galera_ist_gcache_rollover.result b/mysql-test/suite/galera_3nodes/r/galera_ist_gcache_rollover.result index aa3e349eda789..996363a1ea851 100644 --- a/mysql-test/suite/galera_3nodes/r/galera_ist_gcache_rollover.result +++ b/mysql-test/suite/galera_3nodes/r/galera_ist_gcache_rollover.result @@ -6,10 +6,10 @@ CREATE TABLE t1 (f1 INTEGER PRIMARY KEY); INSERT INTO t1 VALUES (01), (02), (03), (04), (05); connection node_2; Unloading wsrep provider ... -SET GLOBAL wsrep_provider = 'none'; +SET GLOBAL wsrep_cluster_address = ''; connection node_3; Unloading wsrep provider ... -SET GLOBAL wsrep_provider = 'none'; +SET GLOBAL wsrep_cluster_address = ''; connection node_1; INSERT INTO t1 VALUES (11), (12), (13), (14), (15); INSERT INTO t1 VALUES (21), (22), (23), (24), (25); diff --git a/mysql-test/suite/galera_3nodes/t/galera_ist_gcache_rollover.test b/mysql-test/suite/galera_3nodes/t/galera_ist_gcache_rollover.test index 0032f8d6ee1af..2719316fb84c2 100644 --- a/mysql-test/suite/galera_3nodes/t/galera_ist_gcache_rollover.test +++ b/mysql-test/suite/galera_3nodes/t/galera_ist_gcache_rollover.test @@ -29,9 +29,11 @@ INSERT INTO t1 VALUES (01), (02), (03), (04), (05); # Disconnect nodes #2 and #3 --connection node_2 +--let $wsrep_cluster_address_orig2 = `select @@wsrep_cluster_address` --source suite/galera/include/galera_stop_replication.inc --connection node_3 +--let $wsrep_cluster_address_orig3 = `select @@wsrep_cluster_address` --source suite/galera/include/galera_stop_replication.inc --connection node_1 @@ -51,8 +53,8 @@ INSERT INTO t1 VALUES (21), (22), (23), (24), (25); # ... and restart providers to force IST --connection node_2 --disable_query_log ---eval SET GLOBAL wsrep_provider = '$wsrep_provider_orig'; ---eval SET GLOBAL wsrep_cluster_address = '$wsrep_cluster_address_orig'; +SET GLOBAL wsrep_cluster_address=''; +--eval SET GLOBAL wsrep_cluster_address = '$wsrep_cluster_address_orig2'; --enable_query_log --connection node_1 @@ -60,8 +62,8 @@ INSERT INTO t1 VALUES (31), (32), (33), (34), (35); --connection node_3 --disable_query_log ---eval SET GLOBAL wsrep_provider = '$wsrep_provider_orig'; ---eval SET GLOBAL wsrep_cluster_address = '$wsrep_cluster_address_orig'; +SET GLOBAL wsrep_cluster_address=''; +--eval SET GLOBAL wsrep_cluster_address = '$wsrep_cluster_address_orig3'; --enable_query_log --connection node_1 diff --git a/scripts/wsrep_sst_common.sh b/scripts/wsrep_sst_common.sh index 040cd31caa9a2..deebe7cf82028 100644 --- a/scripts/wsrep_sst_common.sh +++ b/scripts/wsrep_sst_common.sh @@ -17,7 +17,7 @@ # This is a common command line parser to be sourced by other SST scripts -set -u +set -ue # Setting the path for some utilities on CentOS export PATH="$PATH:/usr/sbin:/usr/bin:/sbin:/bin" @@ -879,9 +879,9 @@ fi wsrep_cleanup_progress_file() { - [ -n "$SST_PROGRESS_FILE" -a \ - -f "$SST_PROGRESS_FILE" ] && \ - rm -f "$SST_PROGRESS_FILE" 2>/dev/null || : + if [ -n "$SST_PROGRESS_FILE" -a -f "$SST_PROGRESS_FILE" ]; then + rm -f "$SST_PROGRESS_FILE" 2>/dev/null || : + fi } wsrep_check_program() @@ -897,13 +897,10 @@ wsrep_check_program() wsrep_check_programs() { local ret=0 - - while [ $# -gt 0 ] - do + while [ $# -gt 0 ]; do wsrep_check_program "$1" || ret=$? shift done - return $ret } @@ -1028,11 +1025,11 @@ check_sockets_utils() # check_port() { - local pid="$1" + local pid="${1:-0}" local port="$2" local utils="$3" - [ -z "$pid" ] || [ $pid -eq 0 ] && pid='[0-9]+' + [ $pid -le 0 ] && pid='[0-9]+' local rc=1 @@ -1070,14 +1067,20 @@ check_for_dhparams() if [ ! -r "$ssl_dhparams" ]; then get_openssl if [ -n "$OPENSSL_BINARY" ]; then - wsrep_log_info "Could not find dhparams file, creating $ssl_dhparams" - if ! "$OPENSSL_BINARY" dhparam -out "$ssl_dhparams" 2048 >/dev/null 2>&1 - then + wsrep_log_info \ + "Could not find dhparams file, creating $ssl_dhparams" + local bug=0 + local errmsg + errmsg=$("$OPENSSL_BINARY" \ + dhparam -out "$ssl_dhparams" 2048 2>&1) || bug=1 + if [ $bug -ne 0 ]; then + wsrep_log_info "run: \"$OPENSSL_BINARY\" dhparam -out \"$ssl_dhparams\" 2048" + wsrep_log_info "output: $errmsg" wsrep_log_error "******** ERROR *****************************************" wsrep_log_error "* Could not create the dhparams.pem file with OpenSSL. *" wsrep_log_error "********************************************************" ssl_dhparams="" - fi + fi else # Rollback: if openssl is not installed, then use # the default parameters: @@ -1099,17 +1102,9 @@ verify_ca_matches_cert() local ca="$2" local cap="$3" - # If the openssl utility is not installed, then - # we will not do this certificate check: - get_openssl - if [ -z "$OPENSSL_BINARY" ]; then - wsrep_log_info "openssl utility not found" - return - fi - local readable=1; [ ! -r "$cert" ] && readable=0 - [ -n "$ca" ] && [ ! -r "$ca" ] && readable=0 - [ -n "$cap" ] && [ ! -r "$cap" ] && readable=0 + [ -n "$ca" -a ! -r "$ca" ] && readable=0 + [ -n "$cap" -a ! -r "$cap" ] && readable=0 if [ $readable -eq 0 ]; then wsrep_log_error \ @@ -1117,12 +1112,20 @@ verify_ca_matches_cert() exit 22 fi + # If the openssl utility is not installed, then + # we will not do this certificate check: + get_openssl + if [ -z "$OPENSSL_BINARY" ]; then + wsrep_log_info "openssl utility not found" + return + fi + local not_match=0 local errmsg errmsg=$("$OPENSSL_BINARY" verify -verbose \ - ${ca:+ -CAfile} ${ca:+ "$ca"} \ - ${cap:+ -CApath} ${cap:+ "$cap"} \ - "$cert" 2>&1) || not_match=1 + ${ca:+ -CAfile} ${ca:+ "$ca"} \ + ${cap:+ -CApath} ${cap:+ "$cap"} \ + "$cert" 2>&1) || not_match=1 if [ $not_match -eq 1 ]; then wsrep_log_info "run: \"$OPENSSL_BINARY\" verify -verbose${ca:+ -CAfile \"$ca\"}${cap:+ -CApath \"$cap\"} \"$cert\"" @@ -1158,6 +1161,7 @@ verify_cert_matches_key() # If the diff utility is not installed, then # we will not do this certificate check: if [ -z "$(commandex diff)" ]; then + wsrep_log_info "diff utility not found" return fi @@ -1165,6 +1169,7 @@ verify_cert_matches_key() # we will not do this certificate check: get_openssl if [ -z "$OPENSSL_BINARY" ]; then + wsrep_log_info "openssl utility not found" return fi @@ -1253,18 +1258,18 @@ check_pid() { local pid_file="$1" if [ -r "$pid_file" ]; then - local pid=$(cat "$pid_file" 2>/dev/null) + local pid=$(cat "$pid_file" 2>/dev/null || :) if [ -n "$pid" ]; then - if [ $pid -ne 0 ]; then - if ps -p "$pid" >/dev/null 2>&1; then + if [ $pid -gt 0 ]; then + if ps -p $pid >/dev/null 2>&1; then CHECK_PID=$pid return 0 fi fi fi local remove=${2:-0} - if [ $remove -eq 1 ]; then - rm -f "$pid_file" + if [ $remove -ne 0 ]; then + rm -f "$pid_file" || : fi fi CHECK_PID=0 @@ -1289,25 +1294,25 @@ cleanup_pid() local pid_file="${2:-}" local config="${3:-}" - if [ $pid -ne 0 ]; then + if [ $pid -gt 0 ]; then if ps -p $pid >/dev/null 2>&1; then if kill $pid >/dev/null 2>&1; then sleep 0.5 local round=0 local force=0 while ps -p $pid >/dev/null 2>&1; do - sleep 1 - round=$(( round+1 )) - if [ $round -eq 16 ]; then - if [ $force -eq 0 ]; then - round=8 - force=1 - kill -9 $pid >/dev/null 2>&1 - sleep 0.5 - else - return 1 - fi - fi + sleep 1 + round=$(( round+1 )) + if [ $round -eq 16 ]; then + if [ $force -eq 0 ]; then + round=8 + force=1 + kill -9 $pid >/dev/null 2>&1 || : + sleep 0.5 + else + return 1 + fi + fi done elif ps -p $pid >/dev/null 2>&1; then wsrep_log_warning "Unable to kill PID=$pid ($pid_file)" @@ -1316,8 +1321,8 @@ cleanup_pid() fi fi - [ -n "$pid_file" ] && [ -f "$pid_file" ] && rm -f "$pid_file" - [ -n "$config" ] && [ -f "$config" ] && rm -f "$config" + [ -n "$pid_file" -a -f "$pid_file" ] && rm -f "$pid_file" || : + [ -n "$config" -a -f "$config" ] && rm -f "$config" || : return 0 } @@ -1339,3 +1344,46 @@ get_proc() fi fi } + +check_server_ssl_config() +{ + # backward-compatible behavior: + tcert=$(parse_cnf 'sst' 'tca') + tcap=$(parse_cnf 'sst' 'tcapath') + tpem=$(parse_cnf 'sst' 'tcert') + tkey=$(parse_cnf 'sst' 'tkey') + # reading new ssl configuration options: + local tcert2=$(parse_cnf "$encgroups" 'ssl-ca') + local tcap2=$(parse_cnf "$encgroups" 'ssl-capath') + local tpem2=$(parse_cnf "$encgroups" 'ssl-cert') + local tkey2=$(parse_cnf "$encgroups" 'ssl-key') + # if there are no old options, then we take new ones: + if [ -z "$tcert" -a -z "$tcap" -a -z "$tpem" -a -z "$tkey" ]; then + tcert="$tcert2" + tcap="$tcap2" + tpem="$tpem2" + tkey="$tkey2" + # checking for presence of the new-style SSL configuration: + elif [ -n "$tcert2" -o -n "$tcap2" -o -n "$tpem2" -o -n "$tkey2" ]; then + if [ "$tcert" != "$tcert2" -o \ + "$tcap" != "$tcap2" -o \ + "$tpem" != "$tpem2" -o \ + "$tkey" != "$tkey2" ] + then + wsrep_log_info \ + "new ssl configuration options (ssl-ca[path], ssl-cert" \ + "and ssl-key) are ignored by SST due to presence" \ + "of the tca[path], tcert and/or tkey in the [sst] section" + fi + fi + if [ -n "$tcert" ]; then + tcert=$(trim_string "$tcert") + if [ "${tcert%/}" != "$tcert" -o -d "$tcert" ]; then + tcap="$tcert" + tcert="" + fi + fi + if [ -n "$tcap" ]; then + tcap=$(trim_string "$tcap") + fi +} diff --git a/scripts/wsrep_sst_mariabackup.sh b/scripts/wsrep_sst_mariabackup.sh index 4bca785fcadb0..aa9442b0601c6 100644 --- a/scripts/wsrep_sst_mariabackup.sh +++ b/scripts/wsrep_sst_mariabackup.sh @@ -30,7 +30,6 @@ eformat="" ekey="" ekeyfile="" encrypt=0 -ecode=0 ssyslog="" ssystag="" BACKUP_PID="" @@ -465,49 +464,6 @@ adjust_progress() encgroups='--mysqld|sst|xtrabackup' -check_server_ssl_config() -{ - # backward-compatible behavior: - tcert=$(parse_cnf 'sst' 'tca') - tcap=$(parse_cnf 'sst' 'tcapath') - tpem=$(parse_cnf 'sst' 'tcert') - tkey=$(parse_cnf 'sst' 'tkey') - # reading new ssl configuration options: - local tcert2=$(parse_cnf "$encgroups" 'ssl-ca') - local tcap2=$(parse_cnf "$encgroups" 'ssl-capath') - local tpem2=$(parse_cnf "$encgroups" 'ssl-cert') - local tkey2=$(parse_cnf "$encgroups" 'ssl-key') - # if there are no old options, then we take new ones: - if [ -z "$tcert" -a -z "$tcap" -a -z "$tpem" -a -z "$tkey" ]; then - tcert="$tcert2" - tcap="$tcap2" - tpem="$tpem2" - tkey="$tkey2" - # checking for presence of the new-style SSL configuration: - elif [ -n "$tcert2" -o -n "$tcap2" -o -n "$tpem2" -o -n "$tkey2" ]; then - if [ "$tcert" != "$tcert2" -o \ - "$tcap" != "$tcap2" -o \ - "$tpem" != "$tpem2" -o \ - "$tkey" != "$tkey2" ] - then - wsrep_log_info \ - "new ssl configuration options (ssl-ca[path], ssl-cert" \ - "and ssl-key) are ignored by SST due to presence" \ - "of the tca[path], tcert and/or tkey in the [sst] section" - fi - fi - if [ -n "$tcert" ]; then - tcert=$(trim_string "$tcert") - if [ "${tcert%/}" != "$tcert" ] || [ -d "$tcert" ]; then - tcap="$tcert" - tcert="" - fi - fi - if [ -n "$tcap" ]; then - tcap=$(trim_string "$tcap") - fi -} - read_cnf() { sfmt=$(parse_cnf sst streamfmt 'mbstream') @@ -647,7 +603,7 @@ cleanup_at_exit() cleanup_pid $CHECK_PID "$BACKUP_PID" fi fi - [ -f "$DATA/$IST_FILE" ] && rm -f "$DATA/$IST_FILE" + [ -f "$DATA/$IST_FILE" ] && rm -f "$DATA/$IST_FILE" || : fi if [ -n "$progress" -a -p "$progress" ]; then @@ -658,27 +614,31 @@ cleanup_at_exit() wsrep_log_info "Cleaning up temporary directories" if [ "$WSREP_SST_OPT_ROLE" = 'joiner' ]; then - if [ -n "$STATDIR" ]; then - [ -d "$STATDIR" ] && rm -rf "$STATDIR" - fi + [ -n "$STATDIR" -a -d "$STATDIR" ] && rm -rf "$STATDIR" || : else [ -n "$xtmpdir" -a -d "$xtmpdir" ] && rm -rf "$xtmpdir" || : [ -n "$itmpdir" -a -d "$itmpdir" ] && rm -rf "$itmpdir" || : fi # Final cleanup - pgid=$(ps -o pgid= $$ | grep -o '[0-9]*') + pgid=$(ps -o pgid= $$ 2>/dev/null | grep -o '[0-9]*' || :) # This means no setsid done in mysqld. # We don't want to kill mysqld here otherwise. - if [ $$ -eq $pgid ]; then - # This means a signal was delivered to the process. - # So, more cleanup. - if [ $estatus -ge 128 ]; then - kill -KILL -- -$$ || : + if [ -n "$pgid" ]; then + if [ $$ -eq $pgid ]; then + # This means a signal was delivered to the process. + # So, more cleanup. + if [ $estatus -ge 128 ]; then + kill -KILL -- -$$ || : + fi fi fi + if [ -n "${SST_PID:-}" ]; then + [ -f "$SST_PID" ] && rm -f "$SST_PID" || : + fi + exit $estatus } @@ -967,7 +927,7 @@ setup_commands() fi INNOAPPLY="$BACKUP_BIN --prepare$disver$recovery${iapts:+ }$iapts$INNOEXTRA --target-dir='$DATA' --datadir='$DATA'$mysqld_args $INNOAPPLY" INNOMOVE="$BACKUP_BIN$WSREP_SST_OPT_CONF --move-back$disver${impts:+ }$impts --force-non-empty-directories --target-dir='$DATA' --datadir='${TDATA:-$DATA}' $INNOMOVE" - INNOBACKUP="$BACKUP_BIN$WSREP_SST_OPT_CONF --backup$disver${iopts:+ }$iopts $tmpopts$INNOEXTRA --galera-info --stream=$sfmt --target-dir='$itmpdir' --datadir='$DATA'$mysqld_args $INNOBACKUP" + INNOBACKUP="$BACKUP_BIN$WSREP_SST_OPT_CONF --backup$disver${iopts:+ }$iopts$tmpopts$INNOEXTRA --galera-info --stream=$sfmt --target-dir='$itmpdir' --datadir='$DATA'$mysqld_args $INNOBACKUP" } get_stream @@ -995,7 +955,7 @@ then fi wsrep_log_info "Using '$xtmpdir' as mariabackup temporary directory" - tmpopts="--tmpdir='$xtmpdir'" + tmpopts=" --tmpdir='$xtmpdir'" itmpdir="$(mktemp -d)" wsrep_log_info "Using '$itmpdir' as mariabackup working directory" @@ -1161,10 +1121,23 @@ then impts="--parallel=$backup_threads${impts:+ }$impts" fi - stagemsg='Joiner-Recv' + SST_PID="$WSREP_SST_OPT_DATA/wsrep_sst.pid" + + # give some time for previous SST to complete: + check_round=0 + while check_pid "$SST_PID" 0; do + wsrep_log_info "previous SST is not completed, waiting for it to exit" + check_round=$(( check_round + 1 )) + if [ $check_round -eq 10 ]; then + wsrep_log_error "previous SST script still running." + exit 114 # EALREADY + fi + sleep 1 + done + + echo $$ > "$SST_PID" - sencrypted=1 - nthreads=1 + stagemsg='Joiner-Recv' MODULE="xtrabackup_sst" @@ -1208,7 +1181,7 @@ then fi get_keys - if [ $encrypt -eq 1 -a $sencrypted -eq 1 ]; then + if [ $encrypt -eq 1 ]; then strmcmd="$ecmd | $strmcmd" fi @@ -1263,12 +1236,14 @@ then if [ -n "$WSREP_SST_OPT_BINLOG" ]; then binlog_dir=$(dirname "$WSREP_SST_OPT_BINLOG") - cd "$binlog_dir" - wsrep_log_info "Cleaning the binlog directory $binlog_dir as well" - rm -fv "$WSREP_SST_OPT_BINLOG".[0-9]* 1>&2 \+ || : - [ -f "$WSREP_SST_OPT_BINLOG_INDEX" ] && \ - rm -fv "$WSREP_SST_OPT_BINLOG_INDEX" 1>&2 \+ || : - cd "$OLD_PWD" + if [ -d "$binlog_dir" ]; then + cd "$binlog_dir" + wsrep_log_info "Cleaning the binlog directory $binlog_dir as well" + rm -fv "$WSREP_SST_OPT_BINLOG".[0-9]* 1>&2 \+ || : + [ -f "$WSREP_SST_OPT_BINLOG_INDEX" ] && \ + rm -fv "$WSREP_SST_OPT_BINLOG_INDEX" 1>&2 \+ + cd "$OLD_PWD" + fi fi TDATA="$DATA" @@ -1285,7 +1260,7 @@ then fi # Compact backups are not supported by mariabackup - if grep -q -F 'compact = 1' "$DATA/xtrabackup_checkpoints"; then + if grep -qw -F 'compact = 1' "$DATA/xtrabackup_checkpoints"; then wsrep_log_info "Index compaction detected" wsrel_log_error "Compact backups are not supported by mariabackup" exit 2 diff --git a/scripts/wsrep_sst_rsync.sh b/scripts/wsrep_sst_rsync.sh index b0cc8cb30664d..28dfed1821816 100644 --- a/scripts/wsrep_sst_rsync.sh +++ b/scripts/wsrep_sst_rsync.sh @@ -17,7 +17,7 @@ # Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston # MA 02110-1335 USA. -# This is a reference script for rsync-based state snapshot tansfer +# This is a reference script for rsync-based state snapshot transfer RSYNC_REAL_PID=0 # rsync process id STUNNEL_REAL_PID=0 # stunnel process id @@ -41,7 +41,7 @@ cleanup_joiner() if cleanup_pid $STUNNEL_REAL_PID "$STUNNEL_PID" "$STUNNEL_CONF"; then if [ $RSYNC_REAL_PID -eq 0 ]; then if [ -r "$RSYNC_PID" ]; then - RSYNC_REAL_PID=$(cat "$RSYNC_PID" 2>/dev/null) + RSYNC_REAL_PID=$(cat "$RSYNC_PID" 2>/dev/null || :) if [ -z "$RSYNC_REAL_PID" ]; then RSYNC_REAL_PID=0 fi @@ -79,7 +79,7 @@ check_pid_and_port() local utils='rsync|stunnel' - if ! check_port "$pid" "$port" "$utils"; then + if ! check_port $pid "$port" "$utils"; then local port_info local busy=0 @@ -90,7 +90,7 @@ check_pid_and_port() grep -q -E "[[:space:]](\\*|\\[?::\\]?):$port[[:space:]]" && busy=1 else local filter='([^[:space:]]+[[:space:]]+){4}[^[:space:]]+' - if [ $sockstat_available -eq 1 ]; then + if [ $sockstat_available -ne 0 ]; then local opts='-p' if [ "$OS" = 'FreeBSD' ]; then # sockstat on FreeBSD requires the "-s" option @@ -110,18 +110,20 @@ check_pid_and_port() fi if [ $busy -eq 0 ]; then - if echo "$port_info" | grep -qw -F "[$addr]:$port" || \ - echo "$port_info" | grep -qw -F -- "$addr:$port" + if ! echo "$port_info" | grep -qw -F "[$addr]:$port" && \ + ! echo "$port_info" | grep -qw -F -- "$addr:$port" then - busy=1 + if ! ps -p $pid >/dev/null 2>&1; then + wsrep_log_error \ + "rsync or stunnel daemon (PID: $pid)" \ + "terminated unexpectedly." + exit 16 # EBUSY + fi + return 1 fi fi - if [ $busy -eq 0 ]; then - return 1 - fi - - if ! check_port "$pid" "$port" "$utils"; then + if ! check_port $pid "$port" "$utils"; then wsrep_log_error "rsync or stunnel daemon port '$port'" \ "has been taken by another program" exit 16 # EBUSY @@ -197,60 +199,16 @@ INNODB_UNDO_DIR=$(pwd -P) cd "$OLD_PWD" -# Old filter - include everything except selected -# FILTER=(--exclude '*.err' --exclude '*.pid' --exclude '*.sock' \ -# --exclude '*.conf' --exclude core --exclude 'galera.*' \ -# --exclude grastate.txt --exclude '*.pem' \ -# --exclude '*.[0-9][0-9][0-9][0-9][0-9][0-9]' --exclude '*.index') - -# New filter - exclude everything except dirs (schemas) and innodb files -FILTER="-f '- /lost+found' - -f '- /.zfs' - -f '- /.fseventsd' - -f '- /.Trashes' - -f '- /.pid' - -f '- /.conf' - -f '+ /wsrep_sst_binlog.tar' - -f '- $INNODB_DATA_HOME_DIR/ib_lru_dump' - -f '- $INNODB_DATA_HOME_DIR/ibdata*' - -f '+ $INNODB_UNDO_DIR/undo*' - -f '+ /*/' - -f '- /*'" - -# old-style SSL config -SSTKEY=$(parse_cnf 'sst' 'tkey') -SSTCERT=$(parse_cnf 'sst' 'tcert') -SSTCA=$(parse_cnf 'sst' 'tca') -SSTCAP=$(parse_cnf 'sst' 'tcapath') +encgroups='--mysqld|sst' -SST_SECTIONS="--mysqld|sst" +check_server_ssl_config -check_server_ssl_config() -{ - SSTKEY=$(parse_cnf "$SST_SECTIONS" 'ssl-key') - SSTCERT=$(parse_cnf "$SST_SECTIONS" 'ssl-cert') - SSTCA=$(parse_cnf "$SST_SECTIONS" 'ssl-ca') - SSTCAP=$(parse_cnf "$SST_SECTIONS" 'ssl-capath') -} +SSTKEY="$tkey" +SSTCERT="$tpem" +SSTCA="$tcert" +SSTCAP="$tcap" -SSLMODE=$(parse_cnf "$SST_SECTIONS" 'ssl-mode' | tr [:lower:] [:upper:]) - -# no old-style SSL config in [sst], check for new one: -if [ -z "$SSTKEY" -a -z "$SSTCERT" -a -z "$SSTCA" -a -z "$SSTCAP" ]; then - check_server_ssl_config -fi - -if [ -n "$SSTCA" ]; then - SSTCA=$(trim_string "$SSTCA") - if [ "${SSTCA%/}" != "$SSTCA" ] || [ -d "$SSTCA" ]; then - SSTCAP="$SSTCA" - SSTCA="" - fi -fi - -if [ -n "$SSTCAP" ]; then - SSTCAP=$(trim_string "$SSTCAP") -fi +SSLMODE=$(parse_cnf "$encgroups" 'ssl-mode' | tr [:lower:] [:upper:]) if [ -z "$SSLMODE" ]; then # Implicit verification if CA is set and the SSL mode @@ -266,7 +224,7 @@ if [ -z "$SSLMODE" ]; then fi fi -if [ -n "$SSTCERT" -a -n "$SSTKEY" ]; then +if [ -n "$SSTKEY" -a -n "$SSTCERT" ]; then verify_cert_matches_key "$SSTCERT" "$SSTKEY" fi @@ -287,8 +245,7 @@ fi VERIFY_OPT="" CHECK_OPT="" CHECK_OPT_LOCAL="" -if [ "${SSLMODE#VERIFY}" != "$SSLMODE" ] -then +if [ "${SSLMODE#VERIFY}" != "$SSLMODE" ]; then case "$SSLMODE" in 'VERIFY_IDENTITY') VERIFY_OPT='verifyPeer = yes' @@ -364,8 +321,9 @@ EOF [ -f "$STUNNEL_CONF" ] && rm -f "$STUNNEL_CONF" fi - if [ $WSREP_SST_OPT_BYPASS -eq 0 ] - then + RC=0 + + if [ $WSREP_SST_OPT_BYPASS -eq 0 ]; then FLUSHED="$WSREP_SST_OPT_DATA/tables_flushed" ERROR="$WSREP_SST_OPT_DATA/sst_error" @@ -380,11 +338,11 @@ EOF # (b) Cluster state ID & wsrep_gtid_domain_id to be written to the file, OR # (c) ERROR file, in case flush tables operation failed. - while [ ! -r "$FLUSHED" ] && ! grep -q -F ':' "$FLUSHED" >/dev/null 2>&1 + while [ ! -r "$FLUSHED" ] && \ + ! grep -q -F ':' '--' "$FLUSHED" >/dev/null 2>&1 do # Check whether ERROR file exists. - if [ -f "$ERROR" ] - then + if [ -f "$ERROR" ]; then # Flush tables operation failed. rm -f "$ERROR" exit 255 @@ -397,7 +355,7 @@ EOF sync - if [ -n "$WSREP_SST_OPT_BINLOG" ] + if [ -n "$WSREP_SST_OPT_BINLOG" -a -d "${BINLOG_DIRNAME:-}" ] then # Prepare binlog files cd "$BINLOG_DIRNAME" @@ -405,16 +363,14 @@ EOF binlog_files_full=$(tail -n $BINLOG_N_FILES \ "$WSREP_SST_OPT_BINLOG_INDEX") binlog_files="" - for ii in $binlog_files_full - do - binlog_file=$(basename "$ii") - binlog_files="$binlog_files $binlog_file" + for file in $binlog_files_full; do + binlog_file=$(basename "$file") + binlog_files="$binlog_files${binlog_files:+ }'$binlog_file'" done - if [ -n "$binlog_files" ] - then + if [ -n "$binlog_files" ]; then wsrep_log_info "Preparing binlog files for transfer:" - tar -cvf "$BINLOG_TAR_FILE" $binlog_files >&2 + eval tar -cvf "'$BINLOG_TAR_FILE'" $binlog_files >&2 fi cd "$OLD_PWD" @@ -427,9 +383,28 @@ EOF WHOLE_FILE_OPT="--whole-file" fi +# Old filter - include everything except selected +# FILTER=(--exclude '*.err' --exclude '*.pid' --exclude '*.sock' \ +# --exclude '*.conf' --exclude core --exclude 'galera.*' \ +# --exclude grastate.txt --exclude '*.pem' \ +# --exclude '*.[0-9][0-9][0-9][0-9][0-9][0-9]' --exclude '*.index') + +# New filter - exclude everything except dirs (schemas) and innodb files +FILTER="-f '- /lost+found' + -f '- /.zfs' + -f '- /.fseventsd' + -f '- /.Trashes' + -f '- /.pid' + -f '- /.conf' + -f '+ /wsrep_sst_binlog.tar' + -f '- $INNODB_DATA_HOME_DIR/ib_lru_dump' + -f '- $INNODB_DATA_HOME_DIR/ibdata*' + -f '+ $INNODB_UNDO_DIR/undo*' + -f '+ /*/' + -f '- /*'" + # first, the normal directories, so that we can detect # incompatible protocol: - RC=0 eval rsync ${STUNNEL:+"--rsh='$STUNNEL'"} \ --owner --group --perms --links --specials \ --ignore-times --inplace --dirs --delete --quiet \ @@ -484,7 +459,7 @@ EOF cd "$WSREP_SST_OPT_DATA" - backup_threads=$(parse_cnf "--mysqld|sst" 'backup-threads') + backup_threads=$(parse_cnf '--mysqld|sst' 'backup-threads') if [ -z "$backup_threads" ]; then get_proc backup_threads=$nproc @@ -527,7 +502,12 @@ EOF rsync ${STUNNEL:+--rsh="$STUNNEL"} \ --archive --quiet --checksum "$MAGIC_FILE" \ - "rsync://$WSREP_SST_OPT_ADDR" + "rsync://$WSREP_SST_OPT_ADDR" >&2 || RC=$? + + if [ $RC -ne 0 ]; then + wsrep_log_error "rsync $MAGIC_FILE returned code $RC:" + exit 255 # unknown error + fi echo "done $STATE" @@ -540,12 +520,11 @@ elif [ "$WSREP_SST_OPT_ROLE" = 'joiner' ] then check_sockets_utils - SST_PID="$WSREP_SST_OPT_DATA/wsrep_rsync_sst.pid" + SST_PID="$WSREP_SST_OPT_DATA/wsrep_sst.pid" # give some time for previous SST to complete: check_round=0 - while check_pid "$SST_PID" 0 - do + while check_pid "$SST_PID" 0 'wsrep_sst_'; do wsrep_log_info "previous SST is not completed, waiting for it to exit" check_round=$(( check_round + 1 )) if [ $check_round -eq 10 ]; then @@ -555,10 +534,11 @@ then sleep 1 done + echo $$ > "$SST_PID" + # give some time for stunnel from the previous SST to complete: check_round=0 - while check_pid "$STUNNEL_PID" 1 - do + while check_pid "$STUNNEL_PID" 1; do wsrep_log_info "Lingering stunnel daemon found at startup," \ "waiting for it to exit" check_round=$(( check_round + 1 )) @@ -575,8 +555,7 @@ then # give some time for rsync from the previous SST to complete: check_round=0 - while check_pid "$RSYNC_PID" 1 - do + while check_pid "$RSYNC_PID" 1; do wsrep_log_info "Lingering rsync daemon found at startup," \ "waiting for it to exit" check_round=$(( check_round + 1 )) @@ -590,7 +569,7 @@ then [ -f "$MAGIC_FILE" ] && rm -f "$MAGIC_FILE" [ -f "$BINLOG_TAR_FILE" ] && rm -f "$BINLOG_TAR_FILE" - [ -z "$STUNNEL" ] && [ -f "$STUNNEL_CONF" ] && rm -f "$STUNNEL_CONF" + [ -z "$STUNNEL" -a -f "$STUNNEL_CONF" ] && rm -f "$STUNNEL_CONF" ADDR="$WSREP_SST_OPT_ADDR" RSYNC_PORT="$WSREP_SST_OPT_PORT" @@ -639,8 +618,6 @@ EOF RSYNC_ADDR="*" fi - echo $$ > "$SST_PID" - if [ -z "$STUNNEL" ]; then rsync --daemon --no-detach --port "$RSYNC_PORT" \ --config "$RSYNC_CONF" $RSYNC_EXTRA_ARGS & diff --git a/scripts/wsrep_sst_xtrabackup-v2.sh b/scripts/wsrep_sst_xtrabackup-v2.sh index d5c978c414736..569d5084c9833 100644 --- a/scripts/wsrep_sst_xtrabackup-v2.sh +++ b/scripts/wsrep_sst_xtrabackup-v2.sh @@ -31,7 +31,6 @@ eformat="" ekey="" ekeyfile="" encrypt=0 -ecode=0 ssyslog="" ssystag="" BACKUP_PID="" @@ -160,7 +159,7 @@ get_keys() return fi - wsrep_log_info "Key based encryption enabled in my.cnf - supported only from Xtrabackup 2.1.4" + wsrep_log_info "Key based encryption enabled in my.cnf" if [ -z "$ealgo" ]; then wsrep_log_error "FATAL: Encryption algorithm empty from my.cnf, bailing out" @@ -470,49 +469,6 @@ adjust_progress() encgroups='--mysqld|sst|xtrabackup' -check_server_ssl_config() -{ - # backward-compatible behavior: - tcert=$(parse_cnf 'sst' 'tca') - tcap=$(parse_cnf 'sst' 'tcapath') - tpem=$(parse_cnf 'sst' 'tcert') - tkey=$(parse_cnf 'sst' 'tkey') - # reading new ssl configuration options: - local tcert2=$(parse_cnf "$encgroups" 'ssl-ca') - local tcap2=$(parse_cnf "$encgroups" 'ssl-capath') - local tpem2=$(parse_cnf "$encgroups" 'ssl-cert') - local tkey2=$(parse_cnf "$encgroups" 'ssl-key') - # if there are no old options, then we take new ones: - if [ -z "$tcert" -a -z "$tcap" -a -z "$tpem" -a -z "$tkey" ]; then - tcert="$tcert2" - tcap="$tcap2" - tpem="$tpem2" - tkey="$tkey2" - # checking for presence of the new-style SSL configuration: - elif [ -n "$tcert2" -o -n "$tcap2" -o -n "$tpem2" -o -n "$tkey2" ]; then - if [ "$tcert" != "$tcert2" -o \ - "$tcap" != "$tcap2" -o \ - "$tpem" != "$tpem2" -o \ - "$tkey" != "$tkey2" ] - then - wsrep_log_info \ - "new ssl configuration options (ssl-ca[path], ssl-cert" \ - "and ssl-key) are ignored by SST due to presence" \ - "of the tca[path], tcert and/or tkey in the [sst] section" - fi - fi - if [ -n "$tcert" ]; then - tcert=$(trim_string "$tcert") - if [ "${tcert%/}" != "$tcert" ] || [ -d "$tcert" ]; then - tcap="$tcert" - tcert="" - fi - fi - if [ -n "$tcap" ]; then - tcap=$(trim_string "$tcap") - fi -} - read_cnf() { sfmt=$(parse_cnf sst streamfmt 'xbstream') @@ -659,7 +615,7 @@ cleanup_at_exit() cleanup_pid $CHECK_PID "$BACKUP_PID" fi fi - [ -f "$DATA/$IST_FILE" ] && rm -f "$DATA/$IST_FILE" + [ -f "$DATA/$IST_FILE" ] && rm -f "$DATA/$IST_FILE" || : fi if [ -n "$progress" -a -p "$progress" ]; then @@ -670,27 +626,31 @@ cleanup_at_exit() wsrep_log_info "Cleaning up temporary directories" if [ "$WSREP_SST_OPT_ROLE" = 'joiner' ]; then - if [ -n "$STATDIR" ]; then - [ -d "$STATDIR" ] && rm -rf "$STATDIR" - fi + [ -n "$STATDIR" -a -d "$STATDIR" ] && rm -rf "$STATDIR" || : else [ -n "$xtmpdir" -a -d "$xtmpdir" ] && rm -rf "$xtmpdir" || : [ -n "$itmpdir" -a -d "$itmpdir" ] && rm -rf "$itmpdir" || : fi # Final cleanup - pgid=$(ps -o pgid= $$ | grep -o '[0-9]*') + pgid=$(ps -o pgid= $$ 2>/dev/null | grep -o '[0-9]*' || :) # This means no setsid done in mysqld. # We don't want to kill mysqld here otherwise. - if [ $$ -eq $pgid ]; then - # This means a signal was delivered to the process. - # So, more cleanup. - if [ $estatus -ge 128 ]; then - kill -KILL -- -$$ || : + if [ -n "$pgid" ]; then + if [ $$ -eq $pgid ]; then + # This means a signal was delivered to the process. + # So, more cleanup. + if [ $estatus -ge 128 ]; then + kill -KILL -- -$$ || : + fi fi fi + if [ -n "${SST_PID:-}" ]; then + [ -f "$SST_PID" ] && rm -f "$SST_PID" || : + fi + exit $estatus } @@ -862,7 +822,7 @@ monitor_process() done } -# check the version, we require XB-2.4 to ensure that we can pass the +# check the version, we require XB-2.3.5 to ensure that we can pass the # datadir via the command-line option XB_REQUIRED_VERSION="2.3.5" @@ -992,13 +952,13 @@ setup_commands() if [ -n "$INNODB_FORCE_RECOVERY" ]; then recovery=" --innodb-force-recovery=$INNODB_FORCE_RECOVERY" fi - INNOAPPLY="$BACKUP_BIN$disver$recovery${iapts:+ }$iapts$INNOEXTRA --apply-log $rebuildcmd '$DATA' $INNOAPPLY" - INNOMOVE="$BACKUP_BIN$WSREP_SST_OPT_CONF --move-back$disver${impts:+ }$impts --force-non-empty-directories '$DATA' $INNOMOVE" + INNOAPPLY="$BACKUP_BIN$disver$recovery${iapts:+ }$iapts$INNOEXTRA --apply-log${rebuildcmd:+ }$rebuildcmd --datadir='$DATA' '$DATA' $INNOAPPLY" + INNOMOVE="$BACKUP_BIN$WSREP_SST_OPT_CONF --move-back$disver${impts:+ }$impts --force-non-empty-directories --datadir='${TDATA:-$DATA}' '$DATA' $INNOMOVE" local sfmt_work="$sfmt" if [ "$sfmt" = 'mbstream' ]; then sfmt_work='xbstream' fi - INNOBACKUP="$BACKUP_BIN$WSREP_SST_OPT_CONF$disver${iopts:+ }$iopts $tmpopts$INNOEXTRA --galera-info --stream=$sfmt_work '$itmpdir' $INNOBACKUP" + INNOBACKUP="$BACKUP_BIN$WSREP_SST_OPT_CONF$disver${iopts:+ }$iopts$tmpopts$INNOEXTRA --galera-info --stream=$sfmt_work --datadir='$DATA' '$itmpdir' $INNOBACKUP" } get_stream @@ -1026,7 +986,7 @@ then fi wsrep_log_info "Using '$xtmpdir' as xtrabackup temporary directory" - tmpopts="--tmpdir='$xtmpdir'" + tmpopts=" --tmpdir='$xtmpdir'" itmpdir="$(mktemp -d)" wsrep_log_info "Using '$itmpdir' as xtrabackup working directory" @@ -1192,10 +1152,23 @@ then impts="--parallel=$backup_threads${impts:+ }$impts" fi - stagemsg='Joiner-Recv' + SST_PID="$WSREP_SST_OPT_DATA/wsrep_sst.pid" + + # give some time for previous SST to complete: + check_round=0 + while check_pid "$SST_PID" 0; do + wsrep_log_info "previous SST is not completed, waiting for it to exit" + check_round=$(( check_round + 1 )) + if [ $check_round -eq 10 ]; then + wsrep_log_error "previous SST script still running." + exit 114 # EALREADY + fi + sleep 1 + done + + echo $$ > "$SST_PID" - sencrypted=1 - nthreads=1 + stagemsg='Joiner-Recv' MODULE="xtrabackup_sst" @@ -1239,7 +1212,7 @@ then fi get_keys - if [ $encrypt -eq 1 -a $sencrypted -eq 1 ]; then + if [ $encrypt -eq 1 ]; then strmcmd="$ecmd | $strmcmd" fi @@ -1294,12 +1267,14 @@ then if [ -n "$WSREP_SST_OPT_BINLOG" ]; then binlog_dir=$(dirname "$WSREP_SST_OPT_BINLOG") - cd "$binlog_dir" - wsrep_log_info "Cleaning the binlog directory $binlog_dir as well" - rm -fv "$WSREP_SST_OPT_BINLOG".[0-9]* 1>&2 \+ || : - [ -f "$WSREP_SST_OPT_BINLOG_INDEX" ] && \ - rm -fv "$WSREP_SST_OPT_BINLOG_INDEX" 1>&2 \+ || : - cd "$OLD_PWD" + if [ -d "$binlog_dir" ]; then + cd "$binlog_dir" + wsrep_log_info "Cleaning the binlog directory $binlog_dir as well" + rm -fv "$WSREP_SST_OPT_BINLOG".[0-9]* 1>&2 \+ || : + [ -f "$WSREP_SST_OPT_BINLOG_INDEX" ] && \ + rm -fv "$WSREP_SST_OPT_BINLOG_INDEX" 1>&2 \+ + cd "$OLD_PWD" + fi fi TDATA="$DATA" @@ -1316,7 +1291,7 @@ then fi # Rebuild indexes for compact backups - if grep -q -F 'compact = 1' "$DATA/xtrabackup_checkpoints"; then + if grep -qw -F 'compact = 1' "$DATA/xtrabackup_checkpoints"; then wsrep_log_info "Index compaction detected" get_proc nthreads=$(parse_cnf "$encgroups" 'rebuild-threads' $nproc) From dc74d234821b67ab83257fba643acc37dfbafe20 Mon Sep 17 00:00:00 2001 From: Nayuta Yanagisawa Date: Thu, 23 Dec 2021 21:07:28 +0900 Subject: [PATCH 54/65] MDEV-27184 Assertion `(old_top == initial_top (av) && old_size == 0) || ((unsigned long) (old_size) >= MINSIZE && prev_inuse (old_top) && ((unsigned long) old_end & (pagesize - 1)) == 0)' failed, Assertion `str.alloced_length() >= str.length() + data_len' failed Spider crashes on a query that inserts some rows including float. This is because Spider allocates a string of insufficient length. --- .../spider/bugfix/r/mdev_27184.result | 21 +++++++++++++ .../mysql-test/spider/bugfix/t/mdev_27184.cnf | 2 ++ .../spider/bugfix/t/mdev_27184.test | 31 +++++++++++++++++++ storage/spider/spd_db_mysql.cc | 2 +- 4 files changed, 55 insertions(+), 1 deletion(-) create mode 100644 storage/spider/mysql-test/spider/bugfix/r/mdev_27184.result create mode 100644 storage/spider/mysql-test/spider/bugfix/t/mdev_27184.cnf create mode 100644 storage/spider/mysql-test/spider/bugfix/t/mdev_27184.test diff --git a/storage/spider/mysql-test/spider/bugfix/r/mdev_27184.result b/storage/spider/mysql-test/spider/bugfix/r/mdev_27184.result new file mode 100644 index 0000000000000..8a3d9da1dc4ad --- /dev/null +++ b/storage/spider/mysql-test/spider/bugfix/r/mdev_27184.result @@ -0,0 +1,21 @@ +# +# MDEV-27184 Assertion `(old_top == initial_top (av) && old_size == 0) || +# ((unsigned long) (old_size) >= MINSIZE && prev_inuse (old_top) && +# ((unsigned long) old_end & (pagesize - 1)) == 0)' failed, +# Assertion `str.alloced_length() >= str.length() + data_len' failed +# +for master_1 +for child2 +for child3 +connection master_1; +CREATE DATABASE auto_test_remote; +USE auto_test_remote; +CREATE TABLE tbl_a (a FLOAT) ENGINE=SPIDER; +INSERT INTO tbl_a VALUES +(0xF5A7),(0xF5A8),(0xF5A9),(0xF5AA),(0xF5AB),(0xF5AC),(0xF5AD),(0xF5AE), +(0xF5A7),(0xF5A8),(0xF5A9),(0xF5AA),(0xF5AB),(0xF5AC),(0xF5AD),(0xF5AE); +ERROR HY000: Unable to connect to foreign data source: localhost +DROP DATABASE auto_test_remote; +for master_1 +for child2 +for child3 diff --git a/storage/spider/mysql-test/spider/bugfix/t/mdev_27184.cnf b/storage/spider/mysql-test/spider/bugfix/t/mdev_27184.cnf new file mode 100644 index 0000000000000..b0853e32654d9 --- /dev/null +++ b/storage/spider/mysql-test/spider/bugfix/t/mdev_27184.cnf @@ -0,0 +1,2 @@ +!include include/default_mysqld.cnf +!include ../my_1_1.cnf diff --git a/storage/spider/mysql-test/spider/bugfix/t/mdev_27184.test b/storage/spider/mysql-test/spider/bugfix/t/mdev_27184.test new file mode 100644 index 0000000000000..9d3922b2c48e6 --- /dev/null +++ b/storage/spider/mysql-test/spider/bugfix/t/mdev_27184.test @@ -0,0 +1,31 @@ +--echo # +--echo # MDEV-27184 Assertion `(old_top == initial_top (av) && old_size == 0) || +--echo # ((unsigned long) (old_size) >= MINSIZE && prev_inuse (old_top) && +--echo # ((unsigned long) old_end & (pagesize - 1)) == 0)' failed, +--echo # Assertion `str.alloced_length() >= str.length() + data_len' failed +--echo # + +--disable_query_log +--disable_result_log +--source ../../t/test_init.inc +--enable_result_log +--enable_query_log + +--connection master_1 +CREATE DATABASE auto_test_remote; +USE auto_test_remote; + +CREATE TABLE tbl_a (a FLOAT) ENGINE=SPIDER; + +--error ER_CONNECT_TO_FOREIGN_DATA_SOURCE +INSERT INTO tbl_a VALUES + (0xF5A7),(0xF5A8),(0xF5A9),(0xF5AA),(0xF5AB),(0xF5AC),(0xF5AD),(0xF5AE), + (0xF5A7),(0xF5A8),(0xF5A9),(0xF5AA),(0xF5AB),(0xF5AC),(0xF5AD),(0xF5AE); + +DROP DATABASE auto_test_remote; + +--disable_query_log +--disable_result_log +--source ../../t/test_deinit.inc +--enable_result_log +--enable_query_log diff --git a/storage/spider/spd_db_mysql.cc b/storage/spider/spd_db_mysql.cc index 62e6e2f1245d9..03dc1ebd49f5f 100644 --- a/storage/spider/spd_db_mysql.cc +++ b/storage/spider/spd_db_mysql.cc @@ -4388,7 +4388,7 @@ int spider_db_mariadb_util::append_column_value( } else if (float_value) { if (str->reserve(SPIDER_SQL_CAST_LEN + ptr->length() + - SPIDER_SQL_AS_FLOAT_LEN, SPIDER_SQL_CLOSE_PAREN_LEN)) + SPIDER_SQL_AS_FLOAT_LEN + SPIDER_SQL_CLOSE_PAREN_LEN)) { DBUG_RETURN(HA_ERR_OUT_OF_MEM); } From 9f2a6bbe6ba03ca5297cd37b75301d05eb44e044 Mon Sep 17 00:00:00 2001 From: Thirunarayanan Balathandayuthapani Date: Thu, 23 Dec 2021 12:50:00 +0530 Subject: [PATCH 55/65] MDEV-27316 Assertion `!(index)->is_spatial()' failed This issue is caused by MDEV-24621 (commit 045757af4c301757ba449269351cc27b1691a7d6). InnoDB tries to insert the number of rows into an empty spatial index table, but it fails to apply the buffered insert. InnoDB should insert into the spatial index directly instead of buffering the insert operation. --- mysql-test/suite/innodb/r/insert_into_empty.result | 9 +++++++++ mysql-test/suite/innodb/t/insert_into_empty.test | 9 +++++++++ storage/innobase/include/dict0mem.h | 7 +++++++ storage/innobase/row/row0ins.cc | 11 +++++++---- storage/innobase/row/row0merge.cc | 12 ++++++------ 5 files changed, 38 insertions(+), 10 deletions(-) diff --git a/mysql-test/suite/innodb/r/insert_into_empty.result b/mysql-test/suite/innodb/r/insert_into_empty.result index f33bef890fd80..31bf91595e7ca 100644 --- a/mysql-test/suite/innodb/r/insert_into_empty.result +++ b/mysql-test/suite/innodb/r/insert_into_empty.result @@ -222,3 +222,12 @@ ALTER TABLE t1 ADD COLUMN row_start BIGINT UNSIGNED AS ROW START, ADD COLUMN row_end BIGINT UNSIGNED AS ROW END, ADD PERIOD FOR SYSTEM_TIME(row_start,row_end), WITH SYSTEM VERSIONING; DROP TABLE t1; +# +# MDEV-27316 Assertion `!(index)->is_spatial()' failed. +# +CREATE TABLE t (c POINT NOT NULL, SPATIAL INDEX(c)) ENGINE=InnoDB; +INSERT INTO t VALUES (POINT(1, 1)); +SELECT COUNT(*) FROM t WHERE MBRWithin(t.c, POINT(1,1)); +COUNT(*) +1 +DROP TABLE t; diff --git a/mysql-test/suite/innodb/t/insert_into_empty.test b/mysql-test/suite/innodb/t/insert_into_empty.test index 7719ae68d7b6c..bfcf96d854cfe 100644 --- a/mysql-test/suite/innodb/t/insert_into_empty.test +++ b/mysql-test/suite/innodb/t/insert_into_empty.test @@ -1,4 +1,5 @@ --source include/have_innodb.inc + --source include/have_sequence.inc --source include/maybe_debug.inc --source include/have_partition.inc @@ -233,3 +234,11 @@ ALTER TABLE t1 ADD COLUMN row_start BIGINT UNSIGNED AS ROW START, ADD COLUMN row_end BIGINT UNSIGNED AS ROW END, ADD PERIOD FOR SYSTEM_TIME(row_start,row_end), WITH SYSTEM VERSIONING; DROP TABLE t1; + +--echo # +--echo # MDEV-27316 Assertion `!(index)->is_spatial()' failed. +--echo # +CREATE TABLE t (c POINT NOT NULL, SPATIAL INDEX(c)) ENGINE=InnoDB; +INSERT INTO t VALUES (POINT(1, 1)); +SELECT COUNT(*) FROM t WHERE MBRWithin(t.c, POINT(1,1)); +DROP TABLE t; diff --git a/storage/innobase/include/dict0mem.h b/storage/innobase/include/dict0mem.h index 919dd48a03244..744ef5316ef5d 100644 --- a/storage/innobase/include/dict0mem.h +++ b/storage/innobase/include/dict0mem.h @@ -1184,6 +1184,13 @@ struct dict_index_t { /** @return whether this is the change buffer */ bool is_ibuf() const { return UNIV_UNLIKELY(type & DICT_IBUF); } + /** @return whether this is a normal B-tree index + (not the change buffer, not SPATIAL or FULLTEXT) */ + bool is_btree() const { + return UNIV_LIKELY(!(type & (DICT_IBUF | DICT_SPATIAL + | DICT_FTS | DICT_CORRUPT))); + } + /** @return whether the index includes virtual columns */ bool has_virtual() const { return type & DICT_VIRTUAL; } diff --git a/storage/innobase/row/row0ins.cc b/storage/innobase/row/row0ins.cc index c2c87cf3a78da..711a2ff02d5b6 100644 --- a/storage/innobase/row/row0ins.cc +++ b/storage/innobase/row/row0ins.cc @@ -3370,10 +3370,13 @@ row_ins_index_entry( DBUG_SET("-d,row_ins_index_entry_timeout"); return(DB_LOCK_WAIT);}); - if (auto t= trx->check_bulk_buffer(index->table)) { - /* MDEV-25036 FIXME: check also foreign key constraints */ - ut_ad(!trx->check_foreigns); - return t->bulk_insert_buffered(*entry, *index, trx); + if (index->is_btree()) { + if (auto t= trx->check_bulk_buffer(index->table)) { + /* MDEV-25036 FIXME: check also foreign key + constraints */ + ut_ad(!trx->check_foreigns); + return t->bulk_insert_buffered(*entry, *index, trx); + } } if (index->is_primary()) { diff --git a/storage/innobase/row/row0merge.cc b/storage/innobase/row/row0merge.cc index 4a5b8ffb2716b..f693a9ec96ed1 100644 --- a/storage/innobase/row/row0merge.cc +++ b/storage/innobase/row/row0merge.cc @@ -4986,7 +4986,7 @@ row_merge_bulk_t::row_merge_bulk_t(dict_table_t *table) for (dict_index_t *index= UT_LIST_GET_FIRST(table->indexes); index; index= UT_LIST_GET_NEXT(indexes, index)) { - if (index->type & DICT_FTS) + if (!index->is_btree()) continue; n_index++; } @@ -4998,7 +4998,7 @@ row_merge_bulk_t::row_merge_bulk_t(dict_table_t *table) for (dict_index_t *index= UT_LIST_GET_FIRST(table->indexes); index; index= UT_LIST_GET_NEXT(indexes, index)) { - if (index->type & DICT_FTS) + if (!index->is_btree()) continue; mem_heap_t *heap= mem_heap_create(100); @@ -5019,7 +5019,7 @@ row_merge_bulk_t::~row_merge_bulk_t() for (dict_index_t *index= UT_LIST_GET_FIRST(table->indexes); index; index= UT_LIST_GET_NEXT(indexes, index)) { - if (index->type & DICT_FTS) + if (!index->is_btree()) continue; row_merge_buf_free(&m_merge_buf[i]); if (m_merge_files) @@ -5049,7 +5049,7 @@ void row_merge_bulk_t::init_tmp_file() for (dict_index_t *index= UT_LIST_GET_FIRST(table->indexes); index; index= UT_LIST_GET_NEXT(indexes, index)) { - if (index->type & DICT_FTS) + if (!index->is_btree()) continue; n_index++; } @@ -5112,7 +5112,7 @@ dberr_t row_merge_bulk_t::bulk_insert_buffered(const dtuple_t &row, for (dict_index_t *index= UT_LIST_GET_FIRST(ind.table->indexes); index; index= UT_LIST_GET_NEXT(indexes, index)) { - if (index->type & DICT_FTS) + if (!index->is_btree()) continue; if (index != &ind) @@ -5210,7 +5210,7 @@ dberr_t row_merge_bulk_t::write_to_table(dict_table_t *table, trx_t *trx) for (dict_index_t *index= UT_LIST_GET_FIRST(table->indexes); index; index= UT_LIST_GET_NEXT(indexes, index)) { - if (index->type & DICT_FTS) + if (!index->is_btree()) continue; dberr_t err= write_to_index(i, trx); From 5045509b724cbfe0311366fd2bbc36c7753e0852 Mon Sep 17 00:00:00 2001 From: Nayuta Yanagisawa Date: Thu, 23 Dec 2021 21:07:28 +0900 Subject: [PATCH 56/65] MDEV-27184 Assertion `(old_top == initial_top (av) && old_size == 0) || ((unsigned long) (old_size) >= MINSIZE && prev_inuse (old_top) && ((unsigned long) old_end & (pagesize - 1)) == 0)' failed, Assertion `str.alloced_length() >= str.length() + data_len' failed Spider crashes on a query that inserts some rows including float. This is because Spider allocates a string of insufficient length. --- .../spider/bugfix/r/mdev_27184.result | 21 +++++++++++++ .../mysql-test/spider/bugfix/t/mdev_27184.cnf | 2 ++ .../spider/bugfix/t/mdev_27184.test | 31 +++++++++++++++++++ storage/spider/spd_db_mysql.cc | 2 +- 4 files changed, 55 insertions(+), 1 deletion(-) create mode 100644 storage/spider/mysql-test/spider/bugfix/r/mdev_27184.result create mode 100644 storage/spider/mysql-test/spider/bugfix/t/mdev_27184.cnf create mode 100644 storage/spider/mysql-test/spider/bugfix/t/mdev_27184.test diff --git a/storage/spider/mysql-test/spider/bugfix/r/mdev_27184.result b/storage/spider/mysql-test/spider/bugfix/r/mdev_27184.result new file mode 100644 index 0000000000000..8a3d9da1dc4ad --- /dev/null +++ b/storage/spider/mysql-test/spider/bugfix/r/mdev_27184.result @@ -0,0 +1,21 @@ +# +# MDEV-27184 Assertion `(old_top == initial_top (av) && old_size == 0) || +# ((unsigned long) (old_size) >= MINSIZE && prev_inuse (old_top) && +# ((unsigned long) old_end & (pagesize - 1)) == 0)' failed, +# Assertion `str.alloced_length() >= str.length() + data_len' failed +# +for master_1 +for child2 +for child3 +connection master_1; +CREATE DATABASE auto_test_remote; +USE auto_test_remote; +CREATE TABLE tbl_a (a FLOAT) ENGINE=SPIDER; +INSERT INTO tbl_a VALUES +(0xF5A7),(0xF5A8),(0xF5A9),(0xF5AA),(0xF5AB),(0xF5AC),(0xF5AD),(0xF5AE), +(0xF5A7),(0xF5A8),(0xF5A9),(0xF5AA),(0xF5AB),(0xF5AC),(0xF5AD),(0xF5AE); +ERROR HY000: Unable to connect to foreign data source: localhost +DROP DATABASE auto_test_remote; +for master_1 +for child2 +for child3 diff --git a/storage/spider/mysql-test/spider/bugfix/t/mdev_27184.cnf b/storage/spider/mysql-test/spider/bugfix/t/mdev_27184.cnf new file mode 100644 index 0000000000000..b0853e32654d9 --- /dev/null +++ b/storage/spider/mysql-test/spider/bugfix/t/mdev_27184.cnf @@ -0,0 +1,2 @@ +!include include/default_mysqld.cnf +!include ../my_1_1.cnf diff --git a/storage/spider/mysql-test/spider/bugfix/t/mdev_27184.test b/storage/spider/mysql-test/spider/bugfix/t/mdev_27184.test new file mode 100644 index 0000000000000..9d3922b2c48e6 --- /dev/null +++ b/storage/spider/mysql-test/spider/bugfix/t/mdev_27184.test @@ -0,0 +1,31 @@ +--echo # +--echo # MDEV-27184 Assertion `(old_top == initial_top (av) && old_size == 0) || +--echo # ((unsigned long) (old_size) >= MINSIZE && prev_inuse (old_top) && +--echo # ((unsigned long) old_end & (pagesize - 1)) == 0)' failed, +--echo # Assertion `str.alloced_length() >= str.length() + data_len' failed +--echo # + +--disable_query_log +--disable_result_log +--source ../../t/test_init.inc +--enable_result_log +--enable_query_log + +--connection master_1 +CREATE DATABASE auto_test_remote; +USE auto_test_remote; + +CREATE TABLE tbl_a (a FLOAT) ENGINE=SPIDER; + +--error ER_CONNECT_TO_FOREIGN_DATA_SOURCE +INSERT INTO tbl_a VALUES + (0xF5A7),(0xF5A8),(0xF5A9),(0xF5AA),(0xF5AB),(0xF5AC),(0xF5AD),(0xF5AE), + (0xF5A7),(0xF5A8),(0xF5A9),(0xF5AA),(0xF5AB),(0xF5AC),(0xF5AD),(0xF5AE); + +DROP DATABASE auto_test_remote; + +--disable_query_log +--disable_result_log +--source ../../t/test_deinit.inc +--enable_result_log +--enable_query_log diff --git a/storage/spider/spd_db_mysql.cc b/storage/spider/spd_db_mysql.cc index ee3c25d914cef..3425a97049f67 100644 --- a/storage/spider/spd_db_mysql.cc +++ b/storage/spider/spd_db_mysql.cc @@ -4243,7 +4243,7 @@ int spider_db_mariadb_util::append_column_value( } else if (float_value) { if (str->reserve(SPIDER_SQL_CAST_LEN + ptr->length() + - SPIDER_SQL_AS_FLOAT_LEN, SPIDER_SQL_CLOSE_PAREN_LEN)) + SPIDER_SQL_AS_FLOAT_LEN + SPIDER_SQL_CLOSE_PAREN_LEN)) { DBUG_RETURN(HA_ERR_OUT_OF_MEM); } From 89a0364fc88efa7d91d02839a25fa22e4b276995 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Fri, 24 Dec 2021 22:16:10 +0100 Subject: [PATCH 57/65] MDEV-27304 SHOW ... result columns are right-aligned --version=value was setting sys_var::CONFIG (meaning, the value came from the config file), but the filename was left as NULL. --- mysql-test/suite/sys_vars/r/version.result | 16 ++++++++++++++++ mysql-test/suite/sys_vars/t/version.test | 1 + sql/mysqld.cc | 3 ++- sql/set_var.cc | 4 +++- sql/set_var.h | 3 ++- storage/perfschema/unittest/pfs_server_stubs.cc | 2 +- 6 files changed, 25 insertions(+), 4 deletions(-) diff --git a/mysql-test/suite/sys_vars/r/version.result b/mysql-test/suite/sys_vars/r/version.result index 29a2fb8c7e95c..5dafd8e0d931e 100644 --- a/mysql-test/suite/sys_vars/r/version.result +++ b/mysql-test/suite/sys_vars/r/version.result @@ -2,3 +2,19 @@ SELECT @@version; @@version my_favorite_version 1 +select * from information_schema.system_variables where variable_name='version'; +VARIABLE_NAME VERSION +SESSION_VALUE NULL +GLOBAL_VALUE my_favorite_version +GLOBAL_VALUE_ORIGIN COMMAND-LINE +DEFAULT_VALUE NULL +VARIABLE_SCOPE GLOBAL +VARIABLE_TYPE VARCHAR +VARIABLE_COMMENT Server version number. It may also include a suffix with configuration or build information. -debug indicates debugging support was enabled on the server, and -log indicates at least one of the binary log, general log or slow query log are enabled, for example 10.1.1-MariaDB-mariadb1precise-log. +NUMERIC_MIN_VALUE NULL +NUMERIC_MAX_VALUE NULL +NUMERIC_BLOCK_SIZE NULL +ENUM_VALUE_LIST NULL +READ_ONLY YES +COMMAND_LINE_ARGUMENT NULL +GLOBAL_VALUE_PATH NULL diff --git a/mysql-test/suite/sys_vars/t/version.test b/mysql-test/suite/sys_vars/t/version.test index daa95386fd4ac..35067a434067e 100644 --- a/mysql-test/suite/sys_vars/t/version.test +++ b/mysql-test/suite/sys_vars/t/version.test @@ -4,3 +4,4 @@ perl; grep /my_favorite_version/, `$ENV{MYSQL} -e status`; print "$cnt\n"; EOF +query_vertical select * from information_schema.system_variables where variable_name='version'; diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 5775902c4766b..80aa87a5410a9 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -7967,7 +7967,8 @@ mysqld_get_one_option(const struct my_option *opt, const char *argument, if (argument) { strmake(server_version, argument, sizeof(server_version) - 1); - set_sys_var_value_origin(&server_version_ptr, sys_var::CONFIG); + set_sys_var_value_origin(&server_version_ptr, + *filename ? sys_var::CONFIG : sys_var::COMMAND_LINE, filename); using_custom_server_version= true; } #ifndef EMBEDDED_LIBRARY diff --git a/sql/set_var.cc b/sql/set_var.cc index 9744f0f6f3938..861db2c1b8d0d 100644 --- a/sql/set_var.cc +++ b/sql/set_var.cc @@ -1278,7 +1278,8 @@ int fill_sysvars(THD *thd, TABLE_LIST *tables, COND *cond) and update it directly. */ -void set_sys_var_value_origin(void *ptr, enum sys_var::where here) +void set_sys_var_value_origin(void *ptr, enum sys_var::where here, + const char *filename) { bool found __attribute__((unused))= false; DBUG_ASSERT(!mysqld_server_started); // only to be used during startup @@ -1289,6 +1290,7 @@ void set_sys_var_value_origin(void *ptr, enum sys_var::where here) if (var->option.value == ptr) { found= true; + var->origin_filename= filename; var->value_origin= here; /* don't break early, search for all matches */ } diff --git a/sql/set_var.h b/sql/set_var.h index 2d5386248259b..611f16e8bbbc1 100644 --- a/sql/set_var.h +++ b/sql/set_var.h @@ -450,7 +450,8 @@ int sql_set_variables(THD *thd, List *var_list, bool free); } \ } while(0) -void set_sys_var_value_origin(void *ptr, enum sys_var::where here); +void set_sys_var_value_origin(void *ptr, enum sys_var::where here, + const char *filename= NULL); enum sys_var::where get_sys_var_value_origin(void *ptr); inline bool IS_SYSVAR_AUTOSIZE(void *ptr) diff --git a/storage/perfschema/unittest/pfs_server_stubs.cc b/storage/perfschema/unittest/pfs_server_stubs.cc index 5a855b2c14795..ca7b23007975a 100644 --- a/storage/perfschema/unittest/pfs_server_stubs.cc +++ b/storage/perfschema/unittest/pfs_server_stubs.cc @@ -51,7 +51,7 @@ void sql_print_warning(const char *format, ...) } class sys_var { public: enum where { AUTO }; }; -void set_sys_var_value_origin(void *ptr, enum sys_var::where here) +void set_sys_var_value_origin(void *, enum sys_var::where, const char *) { } From a48d2ec866751e9da76066bf3a30f99da9031ab0 Mon Sep 17 00:00:00 2001 From: Monty Date: Tue, 28 Dec 2021 16:37:14 +0200 Subject: [PATCH 58/65] Add --valgrind to VERSION() string for valgrind builds Fixes main.sp-no-valgrind for valgrind builds not done with BUILD scripts --- sql/mysqld.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sql/mysqld.cc b/sql/mysqld.cc index af68d28dd9ff2..310dcada671e6 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -9038,10 +9038,12 @@ void set_server_version(char *buf, size_t size) { bool is_log= opt_log || global_system_variables.sql_log_slow || opt_bin_log; bool is_debug= IF_DBUG(!strstr(MYSQL_SERVER_SUFFIX_STR, "-debug"), 0); + bool is_valgrind= IF_VALGRIND(!strstr(MYSQL_SERVER_SUFFIX_STR, "-valgrind"), 0); strxnmov(buf, size - 1, MYSQL_SERVER_VERSION, MYSQL_SERVER_SUFFIX_STR, IF_EMBEDDED("-embedded", ""), + is_valgrind ? "-valgrind" : "", is_debug ? "-debug" : "", is_log ? "-log" : "", NullS); From 3e0304884b45d143e4194b3244d6e77a663680fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs=20Mar=C3=ADn?= <74543075+jesusaplsoftware@users.noreply.github.com> Date: Tue, 29 Dec 2020 11:59:01 +0000 Subject: [PATCH 59/65] Update errmsg-utf8.txt (spa) Cambiar mysql por maria --- sql/share/errmsg-utf8.txt | 1412 ++++++++++++++++++++++++++++++------- 1 file changed, 1163 insertions(+), 249 deletions(-) diff --git a/sql/share/errmsg-utf8.txt b/sql/share/errmsg-utf8.txt index 205f42f50a0fe..e1d6bda6fd075 100644 --- a/sql/share/errmsg-utf8.txt +++ b/sql/share/errmsg-utf8.txt @@ -50,7 +50,7 @@ ER_YES rus "ДА" serbian "DA" slo "Áno" - spa "SI" + spa "SÍ" ukr "ТАК" ER_CANT_CREATE_FILE cze "Nemohu vytvořit soubor '%-.200s' (chybový kód: %M)" @@ -74,7 +74,7 @@ ER_CANT_CREATE_FILE rus "Невозможно создать файл '%-.200s' (ошибка: %M)" serbian "Ne mogu da kreiram file '%-.200s' (errno: %M)" slo "Nemôžem vytvoriť súbor '%-.200s' (chybový kód: %M)" - spa "No puedo crear archivo '%-.200s' (Error: %M)" + spa "No puedo crear el fichero '%-.200s' (Error: %M)" swe "Kan inte skapa filen '%-.200s' (Felkod: %M)" ukr "Не можу створити файл '%-.200s' (помилка: %M)" ER_CANT_CREATE_TABLE @@ -100,7 +100,7 @@ ER_CANT_CREATE_TABLE rus "Невозможно создать таблицу %`s.%`s (ошибка: %M)" serbian "Ne mogu da kreiram tabelu %`s.%`s (errno: %M)" slo "Nemôžem vytvoriť tabuľku %`s.%`s (chybový kód: %M)" - spa "No puedo crear tabla %`s.%`s (Error: %M)" + spa "No puedo crear la tabla %`s.%`s (Error: %M)" swe "Kan inte skapa tabellen %`s.%`s (Felkod: %M)" ukr "Не можу створити таблицю %`s.%`s (помилка: %M)" ER_CANT_CREATE_DB @@ -125,7 +125,7 @@ ER_CANT_CREATE_DB rus "Невозможно создать базу данных '%-.192s' (ошибка: %M)" serbian "Ne mogu da kreiram bazu '%-.192s' (errno: %M)" slo "Nemôžem vytvoriť databázu '%-.192s' (chybový kód: %M)" - spa "No puedo crear base de datos '%-.192s' (Error: %M)" + spa "No puedo crear la base de datos '%-.192s' (Error: %M)" swe "Kan inte skapa databasen '%-.192s' (Felkod: %M)" ukr "Не можу створити базу данних '%-.192s' (помилка: %M)" ER_DB_CREATE_EXISTS @@ -150,7 +150,7 @@ ER_DB_CREATE_EXISTS rus "Невозможно создать базу данных '%-.192s'. База данных уже существует" serbian "Ne mogu da kreiram bazu '%-.192s'; baza već postoji" slo "Nemôžem vytvoriť databázu '%-.192s'; databáza existuje" - spa "No puedo crear base de datos '%-.192s'; la base de datos ya existe" + spa "No puedo crear la base de datos '%-.192s'; la base de datos ya existe" swe "Databasen '%-.192s' existerar redan" ukr "Не можу створити базу данних '%-.192s'. База данних існує" ER_DB_DROP_EXISTS @@ -175,7 +175,7 @@ ER_DB_DROP_EXISTS rus "Невозможно удалить базу данных '%-.192s'. Такой базы данных нет" serbian "Ne mogu da izbrišem bazu '%-.192s'; baza ne postoji" slo "Nemôžem zmazať databázu '%-.192s'; databáza neexistuje" - spa "No puedo eliminar base de datos '%-.192s'; la base de datos no existe" + spa "No puedo eliminar la base de datos '%-.192s'; la base de datos no existe" swe "Kan inte radera databasen '%-.192s'; databasen finns inte" ukr "Не можу видалити базу данних '%-.192s'. База данних не існує" ER_DB_DROP_DELETE @@ -200,7 +200,7 @@ ER_DB_DROP_DELETE rus "Ошибка при удалении базы данных (невозможно удалить '%-.192s', ошибка: %M)" serbian "Ne mogu da izbrišem bazu (ne mogu da izbrišem '%-.192s', errno: %M)" slo "Chyba pri mazaní databázy (nemôžem zmazať '%-.192s', chybový kód: %M)" - spa "Error eliminando la base de datos(no puedo borrar '%-.192s', error %M)" + spa "Error eliminando la base de datos (no puedo borrar '%-.192s', error %M)" swe "Fel vid radering av databasen (Kan inte radera '%-.192s'. Felkod: %M)" ukr "Не можу видалити базу данних (Не можу видалити '%-.192s', помилка: %M)" ER_DB_DROP_RMDIR @@ -225,7 +225,7 @@ ER_DB_DROP_RMDIR rus "Невозможно удалить базу данных (невозможно удалить каталог '%-.192s', ошибка: %M)" serbian "Ne mogu da izbrišem bazu (ne mogu da izbrišem direktorijum '%-.192s', errno: %M)" slo "Chyba pri mazaní databázy (nemôžem vymazať adresár '%-.192s', chybový kód: %M)" - spa "Error eliminando la base de datos (No puedo borrar directorio '%-.192s', error %M)" + spa "Error eliminando la base de datos (No puedo borrar el directorio '%-.192s', error %M)" swe "Fel vid radering av databasen (Kan inte radera biblioteket '%-.192s'. Felkod: %M)" ukr "Не можу видалити базу данних (Не можу видалити теку '%-.192s', помилка: %M)" ER_CANT_DELETE_FILE @@ -325,7 +325,7 @@ ER_CANT_GET_WD rus "Невозможно определить рабочий каталог (ошибка: %M)" serbian "Ne mogu da dobijem trenutni direktorijum (errno: %M)" slo "Nemôžem zistiť pracovný adresár (chybový kód: %M)" - spa "No puedo acceder al directorio (Error: %M)" + spa "No puedo obtener directorio de trabajo (Error: %M)" swe "Kan inte inte läsa aktivt bibliotek. (Felkod: %M)" ukr "Не можу визначити робочу теку (помилка: %M)" ER_CANT_LOCK @@ -350,7 +350,7 @@ ER_CANT_LOCK rus "Невозможно поставить блокировку на файле (ошибка: %M)" serbian "Ne mogu da zaključam file (errno: %M)" slo "Nemôžem zamknúť súbor (chybový kód: %M)" - spa "No puedo bloquear archivo: (Error: %M)" + spa "No puedo bloquear fichero: (Error: %M)" swe "Kan inte låsa filen. (Felkod: %M)" ukr "Не можу заблокувати файл (помилка: %M)" ER_CANT_OPEN_FILE @@ -375,7 +375,7 @@ ER_CANT_OPEN_FILE rus "Невозможно открыть файл: '%-.200s' (ошибка: %M)" serbian "Ne mogu da otvorim file: '%-.200s' (errno: %M)" slo "Nemôžem otvoriť súbor: '%-.200s' (chybový kód: %M)" - spa "No puedo abrir archivo: '%-.200s' (Error: %M)" + spa "No puedo abrir el fichero: '%-.200s' (Error: %M)" swe "Kan inte använda '%-.200s' (Felkod: %M)" ukr "Не можу відкрити файл: '%-.200s' (помилка: %M)" ER_FILE_NOT_FOUND @@ -400,7 +400,7 @@ ER_FILE_NOT_FOUND rus "Невозможно найти файл: '%-.200s' (ошибка: %M)" serbian "Ne mogu da pronađem file: '%-.200s' (errno: %M)" slo "Nemôžem nájsť súbor: '%-.200s' (chybový kód: %M)" - spa "No puedo encontrar archivo: '%-.200s' (Error: %M)" + spa "No puedo hallar el fichero: '%-.200s' (Error: %M)" swe "Hittar inte filen '%-.200s' (Felkod: %M)" ukr "Не можу знайти файл: '%-.200s' (помилка: %M)" ER_CANT_READ_DIR @@ -450,7 +450,7 @@ ER_CANT_SET_WD rus "Невозможно перейти в каталог '%-.192s' (ошибка: %M)" serbian "Ne mogu da promenim direktorijum na '%-.192s' (errno: %M)" slo "Nemôžem vojsť do adresára '%-.192s' (chybový kód: %M)" - spa "No puedo cambiar al directorio de '%-.192s' (Error: %M)" + spa "No puedo cambiar al directorio a '%-.192s' (Error: %M)" swe "Kan inte byta till '%-.192s' (Felkod: %M)" ukr "Не можу перейти у теку '%-.192s' (помилка: %M)" ER_CHECKREAD @@ -500,7 +500,7 @@ ER_DISK_FULL rus "Диск заполнен. (%s). Ожидаем, пока кто-то не уберет после себя мусор... (ошибка: %M)" serbian "Disk je pun (%s). Čekam nekoga da dođe i oslobodi nešto mesta... (errno: %M)" slo "Disk je plný (%s), čakám na uvoľnenie miesta... (chybový kód: %M)" - spa "Disco lleno (%s). Esperando para que se libere algo de espacio... (Error: %M)" + spa "Disco lleno (%s). Esperando a que alguien libere algo de espacio... (Error: %M)" swe "Disken är full (%s). Väntar tills det finns ledigt utrymme... (Felkod: %M)" ukr "Диск заповнений (%s). Вичикую, доки звільниться трохи місця... (помилка: %M)" ER_DUP_KEY 23000 @@ -625,7 +625,7 @@ ER_ERROR_ON_WRITE rus "Ошибка записи в файл '%-.200s' (ошибка: %M)" serbian "Greška pri upisu '%-.200s' (errno: %M)" slo "Chyba pri zápise do súboru '%-.200s' (chybový kód: %M)" - spa "Error escribiendo el archivo '%-.200s' (Error: %M)" + spa "Error escribiendo el fichero '%-.200s' (Error: %M)" swe "Fick fel vid skrivning till '%-.200s' (Felkod %M)" ukr "Не можу записати файл '%-.200s' (помилка: %M)" ER_FILE_USED @@ -675,7 +675,7 @@ ER_FILSORT_ABORT rus "Сортировка прервана" serbian "Sortiranje je prekinuto" slo "Triedenie prerušené" - spa "Ordeancion cancelada" + spa "Ordenación cancelada" swe "Sorteringen avbruten" ukr "Сортування перервано" ER_FORM_NOT_FOUND @@ -717,7 +717,7 @@ ER_GET_ERRNO por "Obteve erro %M no manipulador de tabelas %s" rum "Eroarea %M obtinuta din handlerul tabelei %s" rus "Получена ошибка %M от обработчика таблиц %s" - spa "Error %M desde el manejador de la tabla %s" + spa "Obtenido error %M desde el motor de almacenaje %s" swe "Fick felkod %M från databashanteraren %s" ukr "Отримано помилку %M від дескриптора таблиці %s" ER_ILLEGAL_HA @@ -725,6 +725,7 @@ ER_ILLEGAL_HA ger "Diese Option gibt es nicht in Speicher-Engine %s für %`s.%`s" hindi "स्टोरेज इंजन %s में यह विकल्प उपलब्ध नहीं है (टेबल: %`s.%`s)" rus "Обработчик %s таблицы %`s.%`s не поддерживает эту возможность" + spa "El motor de almacenaje %s de la tabla %`s.%`s no contiene esta opción" ukr "Дескриптор %s таблиці %`s.%`s не має цієї властивості" ER_KEY_NOT_FOUND cze "Nemohu najít záznam v '%-.192s'" @@ -773,7 +774,7 @@ ER_NOT_FORM_FILE rus "Некорректная информация в файле '%-.200s'" serbian "Pogrešna informacija u file-u: '%-.200s'" slo "Nesprávna informácia v súbore: '%-.200s'" - spa "Informacion erronea en el archivo: '%-.200s'" + spa "Información incorrecta en el fichero: '%-.200s'" swe "Felaktig fil: '%-.200s'" ukr "Хибна інформація у файлі: '%-.200s'" ER_NOT_KEYFILE @@ -798,7 +799,7 @@ ER_NOT_KEYFILE rus "Некорректный индексный файл для таблицы: '%-.200s'. Попробуйте восстановить его" serbian "Pogrešan key file za tabelu: '%-.200s'; probajte da ga ispravite" slo "Nesprávny kľúč pre tabuľku '%-.200s'; pokúste sa ho opraviť" - spa "Clave de archivo erronea para la tabla: '%-.200s'; intente repararlo" + spa "El índice para la tabla: '%-.200s' está corrupto; intente repararlo" swe "Fatalt fel vid hantering av register '%-.200s'; kör en reparation" ukr "Хибний файл ключей для таблиці: '%-.200s'; Спробуйте його відновити" ER_OLD_KEYFILE @@ -823,7 +824,7 @@ ER_OLD_KEYFILE rus "Старый индексный файл для таблицы '%-.192s'; отремонтируйте его!" serbian "Zastareo key file za tabelu '%-.192s'; ispravite ga" slo "Starý kľúčový súbor pre '%-.192s'; opravte ho!" - spa "Clave de archivo antigua para la tabla '%-.192s'; reparelo!" + spa "Clave antigua de fichero para la tabla '%-.192s'; ¡repárela!" swe "Gammal nyckelfil '%-.192s'; reparera registret" ukr "Старий файл ключей для таблиці '%-.192s'; Відновіть його!" ER_OPEN_AS_READONLY @@ -848,7 +849,7 @@ ER_OPEN_AS_READONLY rus "Таблица '%-.192s' предназначена только для чтения" serbian "Tabelu '%-.192s' je dozvoljeno samo čitati" slo "'%-.192s' is čítať only" - spa "'%-.192s' es de solo lectura" + spa "La tabla '%-.192s' es de sólo lectura" swe "'%-.192s' är skyddad mot förändring" ukr "Таблиця '%-.192s' тільки для читання" ER_OUTOFMEMORY HY001 S1001 @@ -872,7 +873,7 @@ ER_OUTOFMEMORY HY001 S1001 rus "Недостаточно памяти. Перезапустите сервер и попробуйте еще раз (нужно %d байт)" serbian "Nema memorije. Restartujte MariaDB server i probajte ponovo (potrebno je %d byte-ova)" slo "Málo pamäti. Reštartujte daemona a skúste znova (je potrebných %d bytov)" - spa "Memoria insuficiente. Reinicie el demonio e intentelo otra vez (necesita %d bytes)" + spa "Memoria insuficiente. Reinicie el servicio e inténtelo otra vez (necesita %d bytes)" swe "Oväntat slut på minnet, starta om programmet och försök på nytt (Behövde %d bytes)" ukr "Брак пам'яті. Рестартуйте сервер та спробуйте знову (потрібно %d байтів)" ER_OUT_OF_SORTMEMORY HY001 S1001 @@ -896,7 +897,7 @@ ER_OUT_OF_SORTMEMORY HY001 S1001 rus "Недостаточно памяти для сортировки. Увеличьте размер буфера сортировки на сервере" serbian "Nema memorije za sortiranje. Povećajte veličinu sort buffer-a MariaDB server-u" slo "Málo pamäti pre triedenie, zvýšte veľkosť triediaceho bufferu" - spa "Memoria de ordenacion insuficiente. Incremente el tamano del buffer de ordenacion" + spa "Memoria de ordenación insuficiente. Considere el incrementar el tamaño del búfer de ordenación del servidor" swe "Sorteringsbufferten räcker inte till. Kontrollera startparametrarna" ukr "Брак пам'яті для сортування. Треба збільшити розмір буфера сортування у сервера" ER_UNEXPECTED_EOF @@ -920,7 +921,7 @@ ER_UNEXPECTED_EOF rus "Неожиданный конец файла '%-.192s' (ошибка: %M)" serbian "Neočekivani kraj pri čitanju file-a '%-.192s' (errno: %M)" slo "Neočakávaný koniec súboru pri čítaní '%-.192s' (chybový kód: %M)" - spa "Inesperado fin de ficheroU mientras leiamos el archivo '%-.192s' (Error: %M)" + spa "Inesperado fin de fichero mientras leíamos el fichero '%-.192s' (Error: %M)" swe "Oväntat filslut vid läsning från '%-.192s' (Felkod: %M)" ukr "Хибний кінець файлу '%-.192s' (помилка: %M)" ER_CON_COUNT_ERROR 08004 @@ -969,7 +970,7 @@ ER_OUT_OF_RESOURCES rus "Недостаточно памяти." serbian "Nema memorije." slo "Málo miesta-pamäti pre vlákno" - spa "Memoria/espacio de tranpaso insuficiente" + spa "Memoria agotada" swe "Fick slut på minnet." ukr "Брак пам'яті." ER_BAD_HOST_ERROR 08S01 @@ -994,7 +995,7 @@ ER_BAD_HOST_ERROR 08S01 rus "Невозможно получить имя хоста для вашего адреса" serbian "Ne mogu da dobijem ime host-a za vašu IP adresu" slo "Nemôžem zistiť meno hostiteľa pre vašu adresu" - spa "No puedo obtener el nombre de maquina de tu direccion" + spa "No puedo obtener el nombre de equipo de tu dirección" swe "Kan inte hitta 'hostname' för din adress" ukr "Не можу визначити ім'я хосту для вашої адреси" ER_HANDSHAKE_ERROR 08S01 @@ -1018,7 +1019,7 @@ ER_HANDSHAKE_ERROR 08S01 rus "Некорректное приветствие" serbian "Loš početak komunikacije (handshake)" slo "Chyba pri nadväzovaní spojenia" - spa "Protocolo erroneo" + spa "Mal apretón de manos (handshake)" swe "Fel vid initiering av kommunikationen med klienten" ukr "Невірна установка зв'язку" ER_DBACCESS_DENIED_ERROR 42000 @@ -1043,7 +1044,7 @@ ER_DBACCESS_DENIED_ERROR 42000 rus "Для пользователя '%s'@'%s' доступ к базе данных '%-.192s' закрыт" serbian "Pristup je zabranjen korisniku '%s'@'%s' za bazu '%-.192s'" slo "Zakázaný prístup pre užívateľa: '%s'@'%s' k databázi '%-.192s'" - spa "Acceso negado para usuario: '%s'@'%s' para la base de datos '%-.192s'" + spa "Acceso denegado para usuario: '%s'@'%s' a la base de datos '%-.192s'" swe "Användare '%s'@'%s' är ej berättigad att använda databasen %-.192s" ukr "Доступ заборонено для користувача: '%s'@'%s' до бази данних '%-.192s'" ER_ACCESS_DENIED_ERROR 28000 @@ -1068,7 +1069,7 @@ ER_ACCESS_DENIED_ERROR 28000 rus "Доступ закрыт для пользователя '%s'@'%s' (был использован пароль: %s)" serbian "Pristup je zabranjen korisniku '%s'@'%s' (koristi lozinku: '%s')" slo "Zakázaný prístup pre užívateľa: '%s'@'%s' (použitie hesla: %s)" - spa "Acceso negado para usuario: '%s'@'%s' (Usando clave: %s)" + spa "Acceso denegado para usuario: '%s'@'%s' (Usando contraseña: %s)" swe "Användare '%s'@'%s' är ej berättigad att logga in (Använder lösen: %s)" ukr "Доступ заборонено для користувача: '%s'@'%s' (Використано пароль: %s)" ER_NO_DB_ERROR 3D000 @@ -1168,7 +1169,7 @@ ER_BAD_DB_ERROR 42000 rus "Неизвестная база данных '%-.192s'" serbian "Nepoznata baza '%-.192s'" slo "Neznáma databáza '%-.192s'" - spa "Base de datos desconocida '%-.192s'" + spa "Base de datos '%-.192s' desconocida" swe "Okänd databas: '%-.192s'" ukr "Невідома база данних '%-.192s'" ER_TABLE_EXISTS_ERROR 42S01 @@ -1193,7 +1194,7 @@ ER_TABLE_EXISTS_ERROR 42S01 rus "Таблица '%-.192s' уже существует" serbian "Tabela '%-.192s' već postoji" slo "Tabuľka '%-.192s' už existuje" - spa "La tabla '%-.192s' ya existe" + spa "La tabla '%-.192s' ya existe" swe "Tabellen '%-.192s' finns redan" ukr "Таблиця '%-.192s' вже існує" ER_BAD_TABLE_ERROR 42S02 @@ -1218,7 +1219,7 @@ ER_BAD_TABLE_ERROR 42S02 rus "Неизвестная таблица '%-.100T'" serbian "Nepoznata tabela '%-.100T'" slo "Neznáma tabuľka '%-.100T'" - spa "Tabla '%-.100T' desconocida" + spa "Tabla '%-.100T' no reconocida" swe "Okänd tabell '%-.100T'" ukr "Невідома таблиця '%-.100T'" ER_NON_UNIQ_ERROR 23000 @@ -1268,7 +1269,7 @@ ER_SERVER_SHUTDOWN 08S01 rus "Сервер находится в процессе остановки" serbian "Gašenje servera je u toku" slo "Prebieha ukončovanie práce servera" - spa "Desconexion de servidor en proceso" + spa "Desconexión de servidor en proceso" swe "Servern går nu ned" ukr "Завершується работа сервера" ER_BAD_FIELD_ERROR 42S22 S0022 @@ -1293,7 +1294,7 @@ ER_BAD_FIELD_ERROR 42S22 S0022 rus "Неизвестный столбец '%-.192s' в '%-.192s'" serbian "Nepoznata kolona '%-.192s' u '%-.192s'" slo "Neznáme pole '%-.192s' v '%-.192s'" - spa "La columna '%-.192s' en %-.192s es desconocida" + spa "No se reconoce la columna '%-.192s' en %-.192s" swe "Okänd kolumn '%-.192s' i %-.192s" ukr "Невідомий стовбець '%-.192s' у '%-.192s'" ER_WRONG_FIELD_WITH_GROUP 42000 S1009 @@ -1318,7 +1319,7 @@ ER_WRONG_FIELD_WITH_GROUP 42000 S1009 rus "'%-.192s' не присутствует в GROUP BY" serbian "Entitet '%-.192s' nije naveden u komandi 'GROUP BY'" slo "Použité '%-.192s' nebolo v 'group by'" - spa "Usado '%-.192s' el cual no esta group by" + spa "'%-.192s' no se encuentra en GROUP BY" swe "'%-.192s' finns inte i GROUP BY" ukr "'%-.192s' не є у GROUP BY" ER_WRONG_GROUP_FIELD 42000 S1009 @@ -1366,7 +1367,7 @@ ER_WRONG_SUM_SELECT 42000 S1009 rus "Выражение содержит групповые функции и столбцы, но не включает GROUP BY. А как вы умудрились получить это сообщение об ошибке?" serbian "Izraz ima 'SUM' agregatnu funkciju i kolone u isto vreme" slo "Príkaz obsahuje zároveň funkciu 'sum' a poľa" - spa "El estamento tiene funciones de suma y columnas en el mismo estamento" + spa "La sentencia tiene funciones de suma y columnas en la misma sentencia" swe "Kommandot har både sum functions och enkla funktioner" ukr "У виразі використано підсумовуючі функції поряд з іменами стовбців" ER_WRONG_VALUE_COUNT 21S01 @@ -1390,7 +1391,7 @@ ER_WRONG_VALUE_COUNT 21S01 rus "Количество столбцов не совпадает с количеством значений" serbian "Broj kolona ne odgovara broju vrednosti" slo "Počet polí nezodpovedá zadanej hodnote" - spa "La columna con count no tiene valores para contar" + spa "El contador de columnas no coincide con el contador de valores" swe "Antalet kolumner motsvarar inte antalet värden" ukr "Кількість стовбців не співпадає з кількістю значень" ER_TOO_LONG_IDENT 42000 S1009 @@ -1440,7 +1441,7 @@ ER_DUP_FIELDNAME 42S21 S1009 rus "Дублирующееся имя столбца '%-.192s'" serbian "Duplirano ime kolone '%-.192s'" slo "Opakované meno poľa '%-.192s'" - spa "Nombre de columna duplicado '%-.192s'" + spa "Nombre duplicado de columna '%-.192s'" swe "Kolumnnamn '%-.192s finns flera gånger" ukr "Дублююче ім'я стовбця '%-.192s'" ER_DUP_KEYNAME 42000 S1009 @@ -1465,7 +1466,7 @@ ER_DUP_KEYNAME 42000 S1009 rus "Дублирующееся имя ключа '%-.192s'" serbian "Duplirano ime ključa '%-.192s'" slo "Opakované meno kľúča '%-.192s'" - spa "Nombre de clave duplicado '%-.192s'" + spa "Nombre duplicado de clave '%-.192s'" swe "Nyckelnamn '%-.192s' finns flera gånger" ukr "Дублююче ім'я ключа '%-.192s'" # When using this error code, please use ER(ER_DUP_ENTRY_WITH_KEY_NAME) @@ -1479,7 +1480,7 @@ ER_DUP_ENTRY 23000 S1009 fre "Duplicata du champ '%-.192T' pour la clef %d" ger "Doppelter Eintrag '%-.192T' für Schlüssel %d" greek "Διπλή εγγραφή '%-.192T' για το κλειδί %d" - hindi "सामान प्रवेश '%-.192T' KEY %d के लिए" + hindi "सामान प्रवेश '%-.192T' KEY %d के लिए" hun "Duplikalt bejegyzes '%-.192T' a %d kulcs szerint" ita "Valore duplicato '%-.192T' per la chiave %d" jpn "'%-.192T' は索引 %d で重複しています。" @@ -1517,7 +1518,7 @@ ER_WRONG_FIELD_SPEC 42000 S1009 rus "Некорректный определитель столбца для столбца '%-.192s'" serbian "Pogrešan naziv kolone za kolonu '%-.192s'" slo "Chyba v špecifikácii poľa '%-.192s'" - spa "Especificador de columna erroneo para la columna '%-.192s'" + spa "Especificador de columna incorrecto para la columna '%-.192s'" swe "Felaktigt kolumntyp för kolumn '%-.192s'" ukr "Невірний специфікатор стовбця '%-.192s'" ER_PARSE_ERROR 42000 s1009 @@ -1542,7 +1543,7 @@ ER_PARSE_ERROR 42000 s1009 rus "%s около '%-.80T' на строке %d" serbian "'%s' u iskazu '%-.80T' na liniji %d" slo "%s blízko '%-.80T' na riadku %d" - spa "%s cerca '%-.80T' en la linea %d" + spa "%s cerca de '%-.80T' en la línea %d" swe "%s nära '%-.80T' på rad %d" ukr "%s біля '%-.80T' в строці %d" ER_EMPTY_QUERY 42000 @@ -1567,7 +1568,7 @@ ER_EMPTY_QUERY 42000 rus "Запрос оказался пустым" serbian "Upit je bio prazan" slo "Výsledok požiadavky bol prázdny" - spa "La query estaba vacia" + spa "La consulta (query) estaba vacia" swe "Frågan var tom" ukr "Пустий запит" ER_NONUNIQ_TABLE 42000 S1009 @@ -1592,7 +1593,7 @@ ER_NONUNIQ_TABLE 42000 S1009 rus "Повторяющаяся таблица/псевдоним '%-.192s'" serbian "Tabela ili alias nisu bili jedinstveni: '%-.192s'" slo "Nie jednoznačná tabuľka/alias: '%-.192s'" - spa "Tabla/alias: '%-.192s' es no unica" + spa "La tabla/alias: '%-.192s' no es única" swe "Icke unikt tabell/alias: '%-.192s'" ukr "Неунікальна таблиця/псевдонім: '%-.192s'" ER_INVALID_DEFAULT 42000 S1009 @@ -1617,7 +1618,7 @@ ER_INVALID_DEFAULT 42000 S1009 rus "Некорректное значение по умолчанию для '%-.192s'" serbian "Loša default vrednost za '%-.192s'" slo "Chybná implicitná hodnota pre '%-.192s'" - spa "Valor por defecto invalido para '%-.192s'" + spa "Valor por defecto inválido para '%-.192s'" swe "Ogiltigt DEFAULT värde för '%-.192s'" ukr "Невірне значення по замовчуванню для '%-.192s'" ER_MULTIPLE_PRI_KEY 42000 S1009 @@ -1642,7 +1643,7 @@ ER_MULTIPLE_PRI_KEY 42000 S1009 rus "Указано несколько первичных ключей" serbian "Definisani višestruki primarni ključevi" slo "Zadefinovaných viac primárnych kľúčov" - spa "Multiples claves primarias definidas" + spa "Múltiples claves primarias definidas" swe "Flera PRIMARY KEY använda" ukr "Первинного ключа визначено неодноразово" ER_TOO_MANY_KEYS 42000 S1009 @@ -1667,7 +1668,7 @@ ER_TOO_MANY_KEYS 42000 S1009 rus "Указано слишком много ключей. Разрешается указывать не более %d ключей" serbian "Navedeno je previše ključeva. Maksimum %d ključeva je dozvoljeno" slo "Zadaných ríliš veľa kľúčov. Najviac %d kľúčov je povolených" - spa "Demasiadas claves primarias declaradas. Un maximo de %d claves son permitidas" + spa "Demasiadas claves primarias declaradas. Se permite un máximo de %d claves" swe "För många nycklar använda. Man får ha högst %d nycklar" ukr "Забагато ключів зазначено. Дозволено не більше %d ключів" ER_TOO_MANY_KEY_PARTS 42000 S1009 @@ -1692,7 +1693,7 @@ ER_TOO_MANY_KEY_PARTS 42000 S1009 rus "Указано слишком много частей составного ключа. Разрешается указывать не более %d частей" serbian "Navedeno je previše delova ključa. Maksimum %d delova je dozvoljeno" slo "Zadaných ríliš veľa častí kľúčov. Je povolených najviac %d častí" - spa "Demasiadas partes de clave declaradas. Un maximo de %d partes son permitidas" + spa "Demasiadas partes de clave declaradas. Se permite un máximo de %d partes" swe "För många nyckeldelar använda. Man får ha högst %d nyckeldelar" ukr "Забагато частин ключа зазначено. Дозволено не більше %d частин" ER_TOO_LONG_KEY 42000 S1009 @@ -1717,7 +1718,7 @@ ER_TOO_LONG_KEY 42000 S1009 rus "Указан слишком длинный ключ. Максимальная длина ключа составляет %d байт" serbian "Navedeni ključ je predug. Maksimalna dužina ključa je %d" slo "Zadaný kľúč je príliš dlhý, najväčšia dĺžka kľúča je %d" - spa "Declaracion de clave demasiado larga. La maxima longitud de clave es %d" + spa "Declaración de clave demasiado larga. La máxima longitud de clave es de %d" swe "För lång nyckel. Högsta tillåtna nyckellängd är %d" ukr "Зазначений ключ задовгий. Найбільша довжина ключа %d байтів" ER_KEY_COLUMN_DOES_NOT_EXITS 42000 S1009 @@ -1742,7 +1743,7 @@ ER_KEY_COLUMN_DOES_NOT_EXITS 42000 S1009 rus "Ключевой столбец '%-.192s' в таблице не существует" serbian "Ključna kolona '%-.192s' ne postoji u tabeli" slo "Kľúčový stĺpec '%-.192s' v tabuľke neexistuje" - spa "La columna clave '%-.192s' no existe en la tabla" + spa "La columna de clave '%-.192s' no existe en la tabla" swe "Nyckelkolumn '%-.192s' finns inte" ukr "Ключовий стовбець '%-.192s' не існує у таблиці" ER_BLOB_USED_AS_KEY 42000 S1009 @@ -1773,7 +1774,7 @@ ER_TOO_BIG_FIELDLENGTH 42000 S1009 rus "Слишком большая длина столбца '%-.192s' (максимум = %lu). Используйте тип BLOB или TEXT вместо текущего" serbian "Previše podataka za kolonu '%-.192s' (maksimum je %lu). Upotrebite BLOB polje" slo "Príliš veľká dĺžka pre pole '%-.192s' (maximum = %lu). Použite BLOB" - spa "Longitud de columna demasiado grande para la columna '%-.192s' (maximo = %lu).Usar BLOB en su lugar" + spa "Longitud de columna demasiado grande para la columna '%-.192s' (máximo = %lu). Use BLOB o TEXT en su lugar" swe "För stor kolumnlängd angiven för '%-.192s' (max= %lu). Använd en BLOB instället" ukr "Задовга довжина стовбця '%-.192s' (max = %lu). Використайте тип BLOB" ER_WRONG_AUTO_KEY 42000 S1009 @@ -1798,11 +1799,12 @@ ER_WRONG_AUTO_KEY 42000 S1009 rus "Некорректное определение таблицы: может существовать только один автоинкрементный столбец, и он должен быть определен как ключ" serbian "Pogrešna definicija tabele; U tabeli može postojati samo jedna 'AUTO' kolona i ona mora biti istovremeno definisana kao kolona ključa" slo "Môžete mať iba jedno AUTO pole a to musí byť definované ako kľúč" - spa "Puede ser solamente un campo automatico y este debe ser definido como una clave" + spa "Definición incorrecta de tabla; sólo puede haber una columna automática y ésta debe de ser definida como una clave" swe "Det får finnas endast ett AUTO_INCREMENT-fält och detta måste vara en nyckel" ukr "Хибне визначення таблиці; Може бути лише один автоматичний стовбець, що повинен бути визначений як ключ" ER_BINLOG_CANT_DELETE_GTID_DOMAIN eng "Could not delete gtid domain. Reason: %s." + spa "No pude borrar el dominio gtid. Motivo: %s." ukr "Не можу видалити домен gtid. Причина: %s." ER_NORMAL_SHUTDOWN cze "%s (%s): normální ukončení" @@ -1851,7 +1853,7 @@ ER_GOT_SIGNAL rus "%s: Получен сигнал %d. Прекращаем!\n" serbian "%s: Dobio signal %d. Prekidam!\n" slo "%s: prijatý signál %d, ukončenie (Abort)!\n" - spa "%s: Recibiendo signal %d. Abortando!\n" + spa "%s: Obtenida señal %d. ¡Abortando!\n" swe "%s: Fick signal %d. Avslutar!\n" ukr "%s: Отримано сигнал %d. Перериваюсь!\n" ER_SHUTDOWN_COMPLETE @@ -1901,7 +1903,7 @@ ER_FORCING_CLOSE 08S01 rus "%s: Принудительно закрываем поток %ld пользователя: '%-.48s'\n" serbian "%s: Usiljeno gašenje thread-a %ld koji pripada korisniku: '%-.48s'\n" slo "%s: násilné ukončenie vlákna %ld užívateľa '%-.48s'\n" - spa "%s: Forzando a cerrar el thread %ld usuario: '%-.48s'\n" + spa "%s: Forzando a cerrar el hilo (thread) %ld usuario: '%-.48s'\n" swe "%s: Stänger av tråd %ld; användare: '%-.48s'\n" ukr "%s: Прискорюю закриття гілки %ld користувача: '%-.48s'\n" ER_IPSOCK_ERROR 08S01 @@ -1951,7 +1953,7 @@ ER_NO_SUCH_INDEX 42S12 S1009 rus "В таблице '%-.192s' нет такого индекса, как в CREATE INDEX. Создайте таблицу заново" serbian "Tabela '%-.192s' nema isti indeks kao onaj upotrebljen pri komandi 'CREATE INDEX'. Napravite tabelu ponovo" slo "Tabuľka '%-.192s' nemá index zodpovedajúci CREATE INDEX. Vytvorte tabulku znova" - spa "La tabla '%-.192s' no tiene indice como el usado en CREATE INDEX. Crea de nuevo la tabla" + spa "La tabla '%-.192s' no tiene un índice como el usado en CREATE INDEX. Crea de nuevo la tabla" swe "Tabellen '%-.192s' har inget index som motsvarar det angivna i CREATE INDEX. Skapa om tabellen" ukr "Таблиця '%-.192s' має індекс, що не співпадає з вказанним у CREATE INDEX. Створіть таблицю знову" ER_WRONG_FIELD_TERMINATORS 42000 S1009 @@ -2001,7 +2003,7 @@ ER_BLOBS_AND_NO_TERMINATED 42000 S1009 rus "Фиксированный размер записи с полями типа BLOB использовать нельзя, применяйте 'fields terminated by'" serbian "Ne možete koristiti fiksnu veličinu sloga kada imate BLOB polja. Molim koristite 'fields terminated by' opciju" slo "Nie je možné použiť fixnú dĺžku s BLOBom. Použite 'fields terminated by'" - spa "No puedes usar longitudes de filas fijos con BLOBs. Por favor usa 'campos terminados por '" + spa "No puedes usar longitudes fijas de filas con BLOBs. Por favor, usa 'campos terminados por'" swe "Man kan inte använda fast radlängd med blobs. Använd 'fields terminated by'" ukr "Не можна використовувати сталу довжину строки з BLOB. Зкористайтеся 'fields terminated by'" ER_TEXTFILE_NOT_READABLE @@ -2026,7 +2028,7 @@ ER_TEXTFILE_NOT_READABLE rus "Файл '%-.128s' должен находиться в том же каталоге, что и база данных, или быть общедоступным для чтения" serbian "File '%-.128s' mora biti u direktorijumu gde su file-ovi baze i mora imati odgovarajuća prava pristupa" slo "Súbor '%-.128s' musí byť v adresári databázy, alebo čitateľný pre všetkých" - spa "El archivo '%-.128s' debe estar en el directorio de la base de datos o ser de lectura por todos" + spa "El fichero '%-.128s' debe de estar en el directorio de la base de datos o de ser legible por todos" swe "Textfilen '%-.128s' måste finnas i databasbiblioteket eller vara läsbar för alla" ukr "Файл '%-.128s' повинен бути у теці бази данних або мати встановлене право на читання для усіх" ER_FILE_EXISTS_ERROR @@ -2051,7 +2053,7 @@ ER_FILE_EXISTS_ERROR rus "Файл '%-.200s' уже существует" serbian "File '%-.200s' već postoji" slo "Súbor '%-.200s' už existuje" - spa "El archivo '%-.200s' ya existe" + spa "El fichero '%-.200s' ya existe" swe "Filen '%-.200s' existerar redan" ukr "Файл '%-.200s' вже існує" ER_LOAD_INFO @@ -2076,7 +2078,7 @@ ER_LOAD_INFO rus "Записей: %ld Удалено: %ld Пропущено: %ld Предупреждений: %ld" serbian "Slogova: %ld Izbrisano: %ld Preskočeno: %ld Upozorenja: %ld" slo "Záznamov: %ld Zmazaných: %ld Preskočených: %ld Varovania: %ld" - spa "Registros: %ld Borrados: %ld Saltados: %ld Peligros: %ld" + spa "Registros: %ld Borrados: %ld Saltados: %ld Avisos: %ld" swe "Rader: %ld Bortagna: %ld Dubletter: %ld Varningar: %ld" ukr "Записів: %ld Видалено: %ld Пропущено: %ld Застережень: %ld" ER_ALTER_INFO @@ -2125,7 +2127,7 @@ ER_WRONG_SUB_KEY rus "Некорректная часть ключа. Используемая часть ключа не является строкой, указанная длина больше, чем длина части ключа, или обработчик таблицы не поддерживает уникальные части ключа" serbian "Pogrešan pod-ključ dela ključa. Upotrebljeni deo ključa nije string, upotrebljena dužina je veća od dela ključa ili handler tabela ne podržava jedinstvene pod-ključeve" slo "Incorrect prefix key; the used key part isn't a string or the used length is longer than the key part" - spa "Parte de la clave es erronea. Una parte de la clave no es una cadena o la longitud usada es tan grande como la parte de la clave" + spa "Prefijo incorrecto de clave; la parte utilizada de la clave no es una cadena, la longitud usada es mayor que la parte de la clave o el motor de almacenaje no soporta claves con prefijo único" swe "Felaktig delnyckel. Nyckeldelen är inte en sträng eller den angivna längden är längre än kolumnlängden" ukr "Невірна частина ключа. Використана частина ключа не є строкою, задовга або вказівник таблиці не підтримує унікальних частин ключей" ER_CANT_REMOVE_ALL_FIELDS 42000 @@ -2150,7 +2152,7 @@ ER_CANT_REMOVE_ALL_FIELDS 42000 rus "Нельзя удалить все столбцы с помощью ALTER TABLE. Используйте DROP TABLE" serbian "Ne možete da izbrišete sve kolone pomoću komande 'ALTER TABLE'. Upotrebite komandu 'DROP TABLE' ako želite to da uradite" slo "One nemôžem zmazať all fields with ALTER TABLE; use DROP TABLE instead" - spa "No puede borrar todos los campos con ALTER TABLE. Usa DROP TABLE para hacerlo" + spa "No se pueden borrar todas las columnas con ALTER TABLE. Usa DROP TABLE para hacerlo" swe "Man kan inte radera alla fält med ALTER TABLE. Använd DROP TABLE istället" ukr "Не можливо видалити всі стовбці за допомогою ALTER TABLE. Для цього скористайтеся DROP TABLE" ER_CANT_DROP_FIELD_OR_KEY 42000 @@ -2173,7 +2175,7 @@ ER_CANT_DROP_FIELD_OR_KEY 42000 rus "Невозможно удалить (DROP %s) %`-.192s. Убедитесь что он действительно существует" serbian "Ne mogu da izvršim komandu drop 'DROP %s' na %`-.192s. Proverite da li ta kolona (odnosno ključ) postoji" slo "Nemôžem zrušiť (DROP %s) %`-.192s. Skontrolujte, či neexistujú záznamy/kľúče" - spa "No puedo eliminar (DROP %s) %`-.192s. compuebe que el campo/clave existe" + spa "No puedo eliminar %s %`-.192s; compueba que existe" swe "Kan inte ta bort (DROP %s) %`-.192s. Kontrollera att begränsningen/fältet/nyckel finns" ukr "Не можу DROP %s %`-.192s. Перевірте, чи він існує" ER_INSERT_INFO @@ -2198,7 +2200,7 @@ ER_INSERT_INFO rus "Записей: %ld Дубликатов: %ld Предупреждений: %ld" serbian "Slogova: %ld Duplikata: %ld Upozorenja: %ld" slo "Záznamov: %ld Opakovaných: %ld Varovania: %ld" - spa "Registros: %ld Duplicados: %ld Peligros: %ld" + spa "Registros: %ld Duplicados: %ld Avisos: %ld" swe "Rader: %ld Dubletter: %ld Varningar: %ld" ukr "Записів: %ld Дублікатів: %ld Застережень: %ld" ER_UPDATE_TABLE_USED @@ -2227,7 +2229,7 @@ ER_NO_SUCH_THREAD rus "Неизвестный номер потока: %lu" serbian "Nepoznat thread identifikator: %lu" slo "Neznáma identifikácia vlákna: %lu" - spa "Identificador del thread: %lu desconocido" + spa "Identificador del hilo (thread): %lu desconocido" swe "Finns ingen tråd med id %lu" ukr "Невідомий ідентифікатор гілки: %lu" ER_KILL_DENIED_ERROR @@ -2252,7 +2254,7 @@ ER_KILL_DENIED_ERROR rus "Вы не являетесь владельцем потока %lu" serbian "Vi niste vlasnik thread-a %lu" slo "Nie ste vlastníkom vlákna %lu" - spa "Tu no eres el propietario del thread%lu" + spa "No eres el propietario del hilo (thread) %lu" swe "Du är inte ägare till tråd %lu" ukr "Ви не володар гілки %lu" ER_NO_TABLES_USED @@ -2277,7 +2279,7 @@ ER_NO_TABLES_USED rus "Никакие таблицы не использованы" serbian "Nema upotrebljenih tabela" slo "Nie je použitá žiadna tabuľka" - spa "No ha tablas usadas" + spa "No se están usando tablas" swe "Inga tabeller angivna" ukr "Не використано таблиць" ER_TOO_BIG_SET @@ -2301,7 +2303,7 @@ ER_TOO_BIG_SET rus "Слишком много значений для столбца %-.192s в SET" serbian "Previše string-ova za kolonu '%-.192s' i komandu 'SET'" slo "Príliš mnoho reťazcov pre pole %-.192s a SET" - spa "Muchas strings para columna %-.192s y SET" + spa "Demasiadas cadenas para la columna %-.192s y SET" swe "För många alternativ till kolumn %-.192s för SET" ukr "Забагато строк для стовбця %-.192s та SET" ER_NO_UNIQUE_LOGFILE @@ -2326,7 +2328,7 @@ ER_NO_UNIQUE_LOGFILE rus "Невозможно создать уникальное имя файла журнала %-.200s.(1-999)\n" serbian "Ne mogu da generišem jedinstveno ime log-file-a: '%-.200s.(1-999)'\n" slo "Nemôžem vytvoriť unikátne meno log-súboru %-.200s.(1-999)\n" - spa "No puede crear un unico archivo log %-.200s.(1-999)\n" + spa "No puedo generar un único fichero de historial (log) llamado %-.200s.(1-999)\n" swe "Kan inte generera ett unikt filnamn %-.200s.(1-999)\n" ukr "Не можу згенерувати унікальне ім'я log-файлу %-.200s.(1-999)\n" ER_TABLE_NOT_LOCKED_FOR_WRITE @@ -2351,7 +2353,7 @@ ER_TABLE_NOT_LOCKED_FOR_WRITE rus "Таблица '%-.192s' заблокирована уровнем READ lock и не может быть изменена" serbian "Tabela '%-.192s' je zaključana READ lock-om; iz nje se može samo čitati ali u nju se ne može pisati" slo "Tabuľka '%-.192s' bola zamknutá s READ a nemôže byť zmenená" - spa "Tabla '%-.192s' fue trabada con un READ lock y no puede ser actualizada" + spa "La tabla '%-.192s' ha sido bloqueada con un READ lock y no puede ser actualizada" swe "Tabell '%-.192s' kan inte uppdateras emedan den är låst för läsning" ukr "Таблицю '%-.192s' заблоковано тільки для читання, тому її не можна оновити" ER_TABLE_NOT_LOCKED @@ -2376,11 +2378,12 @@ ER_TABLE_NOT_LOCKED rus "Таблица '%-.192s' не была заблокирована с помощью LOCK TABLES" serbian "Tabela '%-.192s' nije bila zaključana komandom 'LOCK TABLES'" slo "Tabuľka '%-.192s' nebola zamknutá s LOCK TABLES" - spa "Tabla '%-.192s' no fue trabada con LOCK TABLES" + spa "La tabla '%-.192s' no fue bloqueada con LOCK TABLES" swe "Tabell '%-.192s' är inte låst med LOCK TABLES" ukr "Таблицю '%-.192s' не було блоковано з LOCK TABLES" ER_UNUSED_17 eng "You should never see it" + spa "Nunca deberías de ver esto" ER_WRONG_DB_NAME 42000 cze "Nepřípustné jméno databáze '%-.100T'" dan "Ugyldigt database navn '%-.100T'" @@ -2403,7 +2406,7 @@ ER_WRONG_DB_NAME 42000 rus "Некорректное имя базы данных '%-.100T'" serbian "Pogrešno ime baze '%-.100T'" slo "Neprípustné meno databázy '%-.100T'" - spa "Nombre de base de datos ilegal '%-.100T'" + spa "Nombre incorrecto de base de datos '%-.100T'" swe "Felaktigt databasnamn '%-.100T'" ukr "Невірне ім'я бази данних '%-.100T'" ER_WRONG_TABLE_NAME 42000 @@ -2428,7 +2431,7 @@ ER_WRONG_TABLE_NAME 42000 rus "Некорректное имя таблицы '%-.100s'" serbian "Pogrešno ime tabele '%-.100s'" slo "Neprípustné meno tabuľky '%-.100s'" - spa "Nombre de tabla ilegal '%-.100s'" + spa "Nombre incorrecto de tabla '%-.100s'" swe "Felaktigt tabellnamn '%-.100s'" ukr "Невірне ім'я таблиці '%-.100s'" ER_TOO_BIG_SELECT 42000 @@ -2453,7 +2456,7 @@ ER_TOO_BIG_SELECT 42000 rus "Для такой выборки SELECT должен будет просмотреть слишком много записей и, видимо, это займет очень много времени. Проверьте ваше указание WHERE, и, если в нем все в порядке, укажите SET SQL_BIG_SELECTS=1" serbian "Komanda 'SELECT' će ispitati previše slogova i potrošiti previše vremena. Proverite vaš 'WHERE' filter i upotrebite 'SET OPTION SQL_BIG_SELECTS=1' ako želite baš ovakvu komandu" slo "Zadaná požiadavka SELECT by prechádzala príliš mnoho záznamov a trvala by príliš dlho. Skontrolujte tvar WHERE a ak je v poriadku, použite SET SQL_BIG_SELECTS=1" - spa "El SELECT puede examinar muchos registros y probablemente con mucho tiempo. Verifique tu WHERE y usa SET SQL_BIG_SELECTS=1 si el SELECT esta correcto" + spa "El SELECT debería de examinar más de MAX_JOIN_SIZE filas; revisa tu WHERE y utiliza SET SQL_BIG_SELECTS=1 o SET MAX_JOIN_SIZE=# si el SELECT está ok" swe "Den angivna frågan skulle läsa mer än MAX_JOIN_SIZE rader. Kontrollera din WHERE och använd SET SQL_BIG_SELECTS=1 eller SET MAX_JOIN_SIZE=# ifall du vill hantera stora joins" ukr "Запиту SELECT потрібно обробити багато записів, що, певне, займе дуже багато часу. Перевірте ваше WHERE та використовуйте SET SQL_BIG_SELECTS=1, якщо цей запит SELECT є вірним" ER_UNKNOWN_ERROR @@ -2527,7 +2530,7 @@ ER_WRONG_PARAMCOUNT_TO_PROCEDURE 42000 rus "Некорректное количество параметров для процедуры '%-.192s'" serbian "Pogrešan broj parametara za proceduru '%-.192s'" slo "Chybný počet parametrov procedúry '%-.192s'" - spa "Equivocado parametro count para procedimiento %-.192s" + spa "Contador de parámetros incorrecto para procedimiento %-.192s" swe "Felaktigt antal parametrar till procedur %-.192s" ukr "Хибна кількість параметрів процедури '%-.192s'" ER_WRONG_PARAMETERS_TO_PROCEDURE @@ -2552,7 +2555,7 @@ ER_WRONG_PARAMETERS_TO_PROCEDURE rus "Некорректные параметры для процедуры '%-.192s'" serbian "Pogrešni parametri prosleđeni proceduri '%-.192s'" slo "Chybné parametre procedúry '%-.192s'" - spa "Equivocados parametros para procedimiento %-.192s" + spa "Parametros incorrectos para procedimiento %-.192s" swe "Felaktiga parametrar till procedur %-.192s" ukr "Хибний параметер процедури '%-.192s'" ER_UNKNOWN_TABLE 42S02 @@ -2577,7 +2580,7 @@ ER_UNKNOWN_TABLE 42S02 rus "Неизвестная таблица '%-.192s' в %-.32s" serbian "Nepoznata tabela '%-.192s' u '%-.32s'" slo "Neznáma tabuľka '%-.192s' v %-.32s" - spa "Tabla desconocida '%-.192s' in %-.32s" + spa "Tabla desconocida '%-.192s' en %-.32s" swe "Okänd tabell '%-.192s' i '%-.32s'" ukr "Невідома таблиця '%-.192s' у %-.32s" ER_FIELD_SPECIFIED_TWICE 42000 @@ -2602,7 +2605,7 @@ ER_FIELD_SPECIFIED_TWICE 42000 rus "Столбец '%-.192s' указан дважды" serbian "Kolona '%-.192s' je navedena dva puta" slo "Pole '%-.192s' je zadané dvakrát" - spa "Campo '%-.192s' especificado dos veces" + spa "Columna '%-.192s' especificada dos veces" swe "Fält '%-.192s' är redan använt" ukr "Стовбець '%-.192s' зазначено двічі" ER_INVALID_GROUP_FUNC_USE @@ -2624,7 +2627,7 @@ ER_INVALID_GROUP_FUNC_USE rus "Неправильное использование групповых функций" serbian "Pogrešna upotreba 'GROUP' funkcije" slo "Nesprávne použitie funkcie GROUP" - spa "Invalido uso de función en grupo" + spa "Inválido uso de función de grupo" swe "Felaktig användning av SQL grupp function" ukr "Хибне використання функції групування" ER_UNSUPPORTED_EXTENSION 42000 @@ -2649,7 +2652,7 @@ ER_UNSUPPORTED_EXTENSION 42000 rus "В таблице '%-.192s' используются возможности, не поддерживаемые в этой версии MariaDB" serbian "Tabela '%-.192s' koristi ekstenziju koje ne postoji u ovoj verziji MariaDB-a" slo "Tabuľka '%-.192s' používa rozšírenie, ktoré v tejto verzii MariaDB nie je" - spa "Tabla '%-.192s' usa una extensión que no existe en esta MariaDB versión" + spa "La tabla '%-.192s' usa una extensión que no existe en esta versión de MariaDB" swe "Tabell '%-.192s' har en extension som inte finns i denna version av MariaDB" ukr "Таблиця '%-.192s' використовує розширення, що не існує у цій версії MariaDB" ER_TABLE_MUST_HAVE_COLUMNS 42000 @@ -2671,7 +2674,7 @@ ER_TABLE_MUST_HAVE_COLUMNS 42000 rus "В таблице должен быть как минимум один столбец" serbian "Tabela mora imati najmanje jednu kolonu" slo "Tabuľka musí mať aspoň 1 pole" - spa "Una tabla debe tener al menos 1 columna" + spa "Una tabla debe de tener al menos 1 columna" swe "Tabeller måste ha minst 1 kolumn" ukr "Таблиця повинна мати хочаб один стовбець" ER_RECORD_FILE_FULL @@ -2737,7 +2740,7 @@ ER_TOO_MANY_TABLES rus "Слишком много таблиц. MariaDB может использовать только %d таблиц в соединении" serbian "Previše tabela. MariaDB može upotrebiti maksimum %d tabela pri 'JOIN' operaciji" slo "Príliš mnoho tabuliek. MariaDB môže použiť len %d v JOIN-e" - spa "Muchas tablas. MariaDB solamente puede usar %d tablas en un join" + spa "Demasiadas tablas. MariaDB solamente puede usar %d tablas en un join" swe "För många tabeller. MariaDB can ha högst %d tabeller i en och samma join" ukr "Забагато таблиць. MariaDB може використовувати лише %d таблиць у об'єднанні" ER_TOO_MANY_FIELDS @@ -2759,7 +2762,7 @@ ER_TOO_MANY_FIELDS rus "Слишком много столбцов" serbian "Previše kolona" slo "Príliš mnoho polí" - spa "Muchos campos" + spa "Demasiadas columnas" swe "För många fält" ukr "Забагато стовбців" ER_TOO_BIG_ROWSIZE 42000 @@ -2780,7 +2783,7 @@ ER_TOO_BIG_ROWSIZE 42000 rus "Слишком большой размер записи. Максимальный размер строки, исключая поля BLOB, - %ld. Возможно, вам следует изменить тип некоторых полей на BLOB" serbian "Prevelik slog. Maksimalna veličina sloga, ne računajući BLOB polja, je %ld. Trebali bi da promenite tip nekih polja u BLOB" slo "Riadok je príliš veľký. Maximálna veľkosť riadku, okrem 'BLOB', je %ld. Musíte zmeniť niektoré položky na BLOB" - spa "Tamaño de línea muy grande. Máximo tamaño de línea, no contando blob, es %ld. Tu tienes que cambiar algunos campos para blob" + spa "Tamaño de fila muy grande. El máximo tamaño de fila para el tipo de tabla usada, sin contar BLOBs, es de %ld. Esto incluye sobrecarga de almacenaje, revisa el manual. Tienes que cambiar algunas columnas a TEXT o BLOBs" swe "För stor total radlängd. Den högst tillåtna radlängden, förutom BLOBs, är %ld. Ändra några av dina fält till BLOB" ukr "Задовга строка. Найбільшою довжиною строки, не рахуючи BLOB, є %ld. Вам потрібно привести деякі стовбці до типу BLOB" ER_STACK_OVERRUN @@ -2800,7 +2803,7 @@ ER_STACK_OVERRUN rus "Стек потоков переполнен: использовано: %ld из %ld стека. Применяйте 'mariadbd --thread_stack=#' для указания большего размера стека, если необходимо" serbian "Prepisivanje thread stack-a: Upotrebljeno: %ld od %ld stack memorije. Upotrebite 'mariadbd --thread_stack=#' da navedete veći stack ako je potrebno" slo "Pretečenie zásobníku vlákna: použité: %ld z %ld. Použite 'mariadbd --thread_stack=#' k zadaniu väčšieho zásobníka" - spa "Sobrecarga de la pila de thread: Usada: %ld de una %ld pila. Use 'mariadbd --thread_stack=#' para especificar una mayor pila si necesario" + spa "Desbordamiento de la pila de hilos (threads): Usado: %ld de una pila de %ld. Considera el incrementar la variable de sistema thread_stack" swe "Trådstacken tog slut: Har använt %ld av %ld bytes. Använd 'mariadbd --thread_stack=#' ifall du behöver en större stack" ukr "Стек гілок переповнено: Використано: %ld з %ld. Використовуйте 'mariadbd --thread_stack=#' аби зазначити більший стек, якщо необхідно" ER_WRONG_OUTER_JOIN 42000 @@ -2820,11 +2823,12 @@ ER_WRONG_OUTER_JOIN 42000 rus "В OUTER JOIN обнаружена перекрестная зависимость. Внимательно проанализируйте свои условия ON" serbian "Unakrsna zavisnost pronađena u komandi 'OUTER JOIN'. Istražite vaše 'ON' uslove" slo "V OUTER JOIN bol nájdený krížový odkaz. Skontrolujte podmienky ON" - spa "Dependencia cruzada encontrada en OUTER JOIN. Examine su condición ON" + spa "Dependencia cruzada hallada en OUTER JOIN. Examina tus condiciones ON" swe "Felaktigt referens i OUTER JOIN. Kontrollera ON-uttrycket" ukr "Перехресна залежність у OUTER JOIN. Перевірте умову ON" ER_NULL_COLUMN_IN_INDEX 42000 eng "Table handler doesn't support NULL in given index. Please change column '%-.192s' to be NOT NULL or use another handler" + spa "El manejador de tabla no soporta NULL en índice suministrado. Por favor, cambia la columna '%-.192s' para que sea NOT NULL o utiliza otro manejador" swe "Tabell hanteraren kan inte indexera NULL kolumner för den givna index typen. Ändra '%-.192s' till NOT NULL eller använd en annan hanterare" ukr "Вказівник таблиці не підтримує NULL у зазначенному індексі. Будь ласка, зменіть стовпчик '%-.192s' на NOT NULL або використайте інший вказівник таблиці." ER_CANT_FIND_UDF @@ -2846,7 +2850,7 @@ ER_CANT_FIND_UDF rus "Невозможно загрузить функцию '%-.192s'" serbian "Ne mogu da učitam funkciju '%-.192s'" slo "Nemôžem načítať funkciu '%-.192s'" - spa "No puedo cargar función '%-.192s'" + spa "No puedo cargar la función '%-.192s'" swe "Kan inte ladda funktionen '%-.192s'" ukr "Не можу завантажити функцію '%-.192s'" ER_CANT_INITIALIZE_UDF @@ -2868,7 +2872,7 @@ ER_CANT_INITIALIZE_UDF rus "Невозможно инициализировать функцию '%-.192s'; %-.80s" serbian "Ne mogu da inicijalizujem funkciju '%-.192s'; %-.80s" slo "Nemôžem inicializovať funkciu '%-.192s'; %-.80s" - spa "No puedo inicializar función '%-.192s'; %-.80s" + spa "No puedo inicializar la función '%-.192s'; %-.80s" swe "Kan inte initialisera funktionen '%-.192s'; '%-.80s'" ukr "Не можу ініціалізувати функцію '%-.192s'; %-.80s" ER_UDF_NO_PATHS @@ -2889,7 +2893,7 @@ ER_UDF_NO_PATHS rus "Недопустимо указывать пути для динамических библиотек" serbian "Ne postoje dozvoljene putanje do share-ovane biblioteke" slo "Neprípustné žiadne cesty k zdieľanej knižnici" - spa "No pasos permitidos para librarias conjugadas" + spa "No existen rutas autorizadas para biblioteca compartida" swe "Man får inte ange sökväg för dynamiska bibliotek" ukr "Не дозволено використовувати путі для розділюваних бібліотек" ER_UDF_EXISTS @@ -2911,7 +2915,7 @@ ER_UDF_EXISTS rus "Функция '%-.192s' уже существует" serbian "Funkcija '%-.192s' već postoji" slo "Funkcia '%-.192s' už existuje" - spa "Función '%-.192s' ya existe" + spa "La función '%-.192s' ya existe" swe "Funktionen '%-.192s' finns redan" ukr "Функція '%-.192s' вже існує" ER_CANT_OPEN_LIBRARY @@ -2935,7 +2939,7 @@ ER_CANT_OPEN_LIBRARY rus "Невозможно открыть динамическую библиотеку '%-.192s' (ошибка: %d, %-.128s)" serbian "Ne mogu da otvorim share-ovanu biblioteku '%-.192s' (errno: %d, %-.128s)" slo "Nemôžem otvoriť zdieľanú knižnicu '%-.192s' (chybový kód: %d, %-.128s)" - spa "No puedo abrir libraria conjugada '%-.192s' (errno: %d, %-.128s)" + spa "No puedo abrir la biblioteca compartida '%-.192s' (error: %d, %-.128s)" swe "Kan inte öppna det dynamiska biblioteket '%-.192s' (Felkod: %d, %-.128s)" ukr "Не можу відкрити розділювану бібліотеку '%-.192s' (помилка: %d, %-.128s)" ER_CANT_FIND_DL_ENTRY @@ -2956,7 +2960,7 @@ ER_CANT_FIND_DL_ENTRY rus "Невозможно отыскать символ '%-.128s' в библиотеке" serbian "Ne mogu da pronadjem funkciju '%-.128s' u biblioteci" slo "Nemôžem nájsť funkciu '%-.128s' v knižnici" - spa "No puedo encontrar función '%-.128s' en libraria" + spa "No puedo encontrar el símbolo '%-.128s' en biblioteca" swe "Hittar inte funktionen '%-.128s' in det dynamiska biblioteket" ukr "Не можу знайти функцію '%-.128s' у бібліотеці" ER_FUNCTION_NOT_DEFINED @@ -2978,7 +2982,7 @@ ER_FUNCTION_NOT_DEFINED rus "Функция '%-.192s' не определена" serbian "Funkcija '%-.192s' nije definisana" slo "Funkcia '%-.192s' nie je definovaná" - spa "Función '%-.192s' no está definida" + spa "La función '%-.192s' no está definida" swe "Funktionen '%-.192s' är inte definierad" ukr "Функцію '%-.192s' не визначено" ER_HOST_IS_BLOCKED @@ -2999,7 +3003,7 @@ ER_HOST_IS_BLOCKED rum "Host-ul '%-.64s' e blocat din cauza multelor erori de conectie. Poti deploca folosind 'mariadb-admin flush-hosts'" rus "Хост '%-.64s' заблокирован из-за слишком большого количества ошибок соединения. Разблокировать его можно с помощью 'mariadb-admin flush-hosts'" serbian "Host '%-.64s' je blokiran zbog previše grešaka u konekciji. Možete ga odblokirati pomoću komande 'mariadb-admin flush-hosts'" - spa "Servidor '%-.64s' está bloqueado por muchos errores de conexión. Desbloquear con 'mariadb-admin flush-hosts'" + spa "El equipo '%-.64s' está bloqueado debido a muchos errores de conexión; desbloquea con 'mariadb-admin flush-hosts'" swe "Denna dator, '%-.64s', är blockerad pga många felaktig paket. Gör 'mariadb-admin flush-hosts' för att ta bort alla blockeringarna" ukr "Хост '%-.64s' заблоковано з причини великої кількості помилок з'єднання. Для розблокування використовуйте 'mariadb-admin flush-hosts'" ER_HOST_NOT_PRIVILEGED @@ -3020,7 +3024,7 @@ ER_HOST_NOT_PRIVILEGED rum "Host-ul '%-.64s' nu este permis a se conecta la aceste server MariaDB" rus "Хосту '%-.64s' не разрешается подключаться к этому серверу MariaDB" serbian "Host-u '%-.64s' nije dozvoljeno da se konektuje na ovaj MariaDB server" - spa "Servidor '%-.64s' no está permitido para conectar con este servidor MariaDB" + spa "El equipo '%-.64s' no está autorizado a conectar con este servidor MariaDB" swe "Denna dator, '%-.64s', har inte privileger att använda denna MariaDB server" ukr "Хосту '%-.64s' не доволено зв'язуватись з цим сервером MariaDB" ER_PASSWORD_ANONYMOUS_USER 42000 @@ -3041,7 +3045,7 @@ ER_PASSWORD_ANONYMOUS_USER 42000 rum "Dumneavoastra folositi MariaDB ca un utilizator anonim si utilizatorii anonimi nu au voie sa schimbe setarile utilizatorilor" rus "Вы используете MariaDB от имени анонимного пользователя, а анонимным пользователям не разрешается менять пароли" serbian "Vi koristite MariaDB kao anonimni korisnik a anonimnim korisnicima nije dozvoljeno da menjaju lozinke" - spa "Tu estás usando MariaDB como un usuario anonimo y usuarios anonimos no tienen permiso para cambiar las claves" + spa "Estás usando MariaDB como un usuario anónimo y lo usuarios anónimos no tienen permiso para cambiar las propiedades de usuario" swe "Du använder MariaDB som en anonym användare och som sådan får du inte ändra ditt lösenord" ukr "Ви використовуєте MariaDB як анонімний користувач, тому вам не дозволено змінювати паролі" ER_PASSWORD_NOT_ALLOWED 42000 @@ -3061,7 +3065,7 @@ ER_PASSWORD_NOT_ALLOWED 42000 rum "Trebuie sa aveti privilegii sa actualizati tabelele in bazele de date mysql ca sa puteti sa schimati parolele altora" rus "Для того чтобы изменять пароли других пользователей, у вас должны быть привилегии на изменение таблиц в базе данных mysql" serbian "Morate imati privilegije da možete da update-ujete određene tabele ako želite da menjate lozinke za druge korisnike" - spa "Tu debes de tener permiso para actualizar tablas en la base de datos mysql para cambiar las claves para otros" + spa "Debes de tener privilegios para actualizar tablas en la base de datos mysql para poder cambiar las contraseñas de otros" swe "För att ändra lösenord för andra måste du ha rättigheter att uppdatera mysql-databasen" ukr "Ви повині мати право на оновлення таблиць у базі данних mysql, аби мати можливість змінювати пароль іншим" ER_PASSWORD_NO_MATCH 28000 @@ -3082,7 +3086,7 @@ ER_PASSWORD_NO_MATCH 28000 rum "Nu pot gasi nici o linie corespunzatoare in tabela utilizatorului" rus "Невозможно отыскать подходящую запись в таблице пользователей" serbian "Ne mogu da pronađem odgovarajući slog u 'user' tabeli" - spa "No puedo encontrar una línea correponsdiente en la tabla user" + spa "No puedo encontrar una fila coincidente en la tabla de usuario" swe "Hittade inte användaren i 'user'-tabellen" ukr "Не можу знайти відповідних записів у таблиці користувача" ER_UPDATE_INFO @@ -3101,7 +3105,7 @@ ER_UPDATE_INFO rum "Linii identificate (matched): %ld Schimbate: %ld Atentionari (warnings): %ld" rus "Совпало записей: %ld Изменено: %ld Предупреждений: %ld" serbian "Odgovarajućih slogova: %ld Promenjeno: %ld Upozorenja: %ld" - spa "Líneas correspondientes: %ld Cambiadas: %ld Avisos: %ld" + spa "Líneas coincidentes: %ld Cambiadas: %ld Avisos: %ld" swe "Rader: %ld Uppdaterade: %ld Varningar: %ld" ukr "Записів відповідає: %ld Змінено: %ld Застережень: %ld" ER_CANT_CREATE_THREAD @@ -3123,7 +3127,7 @@ ER_CANT_CREATE_THREAD rum "Nu pot crea un thread nou (Eroare %M). Daca mai aveti memorie disponibila in sistem, puteti consulta manualul - ar putea exista un potential bug in legatura cu sistemul de operare" rus "Невозможно создать новый поток (ошибка %M). Если это не ситуация, связанная с нехваткой памяти, то вам следует изучить документацию на предмет описания возможной ошибки работы в конкретной ОС" serbian "Ne mogu da kreiram novi thread (errno %M). Ako imate još slobodne memorije, trebali biste da pogledate u priručniku da li je ovo specifična greška vašeg operativnog sistema" - spa "No puedo crear un nuevo thread (errno %M). Si tu está con falta de memoria disponible, tu puedes consultar el Manual para posibles problemas con SO" + spa "No puedo crear un nuevo hilo (thread) (error %M). Si no estás falto de memoria disponible, puedes consultar el manual para posibles problemas con SO" swe "Kan inte skapa en ny tråd (errno %M)" ukr "Не можу створити нову гілку (помилка %M). Якщо ви не використали усю пам'ять, то прочитайте документацію до вашої ОС - можливо це помилка ОС" ER_WRONG_VALUE_COUNT_ON_ROW 21S01 @@ -3141,7 +3145,7 @@ ER_WRONG_VALUE_COUNT_ON_ROW 21S01 rum "Numarul de coloane nu corespunde cu numarul de valori la linia %lu" rus "Количество столбцов не совпадает с количеством значений в записи %lu" serbian "Broj kolona ne odgovara broju vrednosti u slogu %lu" - spa "El número de columnas no corresponde al número en la línea %lu" + spa "El número de columnas no se corresponde con el número de valores en la línea %lu" swe "Antalet kolumner motsvarar inte antalet värden på rad: %lu" ukr "Кількість стовбців не співпадає з кількістю значень у строці %lu" ER_CANT_REOPEN_TABLE @@ -3165,7 +3169,7 @@ ER_CANT_REOPEN_TABLE rus "Невозможно заново открыть таблицу '%-.192s'" serbian "Ne mogu da ponovo otvorim tabelu '%-.192s'" slo "Can't reopen table: '%-.192s" - spa "No puedo reabrir tabla: '%-.192s" + spa "No puedo reabrir la tabla: '%-.192s" swe "Kunde inte stänga och öppna tabell '%-.192s" ukr "Не можу перевідкрити таблицю: '%-.192s'" ER_INVALID_USE_OF_NULL 22004 @@ -3185,7 +3189,7 @@ ER_INVALID_USE_OF_NULL 22004 rum "Folosirea unei value NULL e invalida" rus "Неправильное использование величины NULL" serbian "Pogrešna upotreba vrednosti NULL" - spa "Invalido uso de valor NULL" + spa "Uso inválido del valor NULL" swe "Felaktig använding av NULL" ukr "Хибне використання значення NULL" ER_REGEXP_ERROR 42000 @@ -3205,7 +3209,7 @@ ER_REGEXP_ERROR 42000 rum "Eroarea '%-.64s' obtinuta din expresia regulara (regexp)" rus "Ошибка регулярного выражения: %s" serbian "Funkcija regexp je vratila grešku: %s" - spa "Obtenido error '%-.64s' de regexp" + spa "Obtenido error '%-.64s' desde regexp" swe "Fick fel '%-.64s' från REGEXP" ukr "Помилка регулярного виразу: %s" ER_MIX_OF_GROUP_FUNC_AND_FIELDS 42000 @@ -3224,7 +3228,7 @@ ER_MIX_OF_GROUP_FUNC_AND_FIELDS 42000 rum "Amestecarea de coloane GROUP (MIN(),MAX(),COUNT()...) fara coloane GROUP este ilegala daca nu exista o clauza GROUP BY" rus "Одновременное использование сгруппированных (GROUP) столбцов (MIN(),MAX(),COUNT(),...) с несгруппированными столбцами является некорректным, если в выражении есть GROUP BY" serbian "Upotreba agregatnih funkcija (MIN(),MAX(),COUNT()...) bez 'GROUP' kolona je pogrešna ako ne postoji 'GROUP BY' iskaz" - spa "Mezcla de columnas GROUP (MIN(),MAX(),COUNT()...) con no GROUP columnas es ilegal si no hat la clausula GROUP BY" + spa "La mezcla de columnas GROUP (MIN(),MAX(),COUNT()...) con columnas no GROUP es ilegal si no exite la cláusula GROUP BY" swe "Man får ha både GROUP-kolumner (MIN(),MAX(),COUNT()...) och fält i en fråga om man inte har en GROUP BY-del" ukr "Змішування GROUP стовбців (MIN(),MAX(),COUNT()...) з не GROUP стовбцями є забороненим, якщо не має GROUP BY" ER_NONEXISTING_GRANT 42000 @@ -3243,7 +3247,7 @@ ER_NONEXISTING_GRANT 42000 rum "Nu exista un astfel de grant definit pentru utilzatorul '%-.48s' de pe host-ul '%-.64s'" rus "Такие права не определены для пользователя '%-.48s' на хосте '%-.64s'" serbian "Ne postoji odobrenje za pristup korisniku '%-.48s' na host-u '%-.64s'" - spa "No existe permiso definido para usuario '%-.48s' en el servidor '%-.64s'" + spa "No existe tal concesión (grant) definida para usuario '%-.48s' en el equipo '%-.64s'" swe "Det finns inget privilegium definierat för användare '%-.48s' på '%-.64s'" ukr "Повноважень не визначено для користувача '%-.48s' з хосту '%-.64s'" ER_TABLEACCESS_DENIED_ERROR 42000 @@ -3263,7 +3267,7 @@ ER_TABLEACCESS_DENIED_ERROR 42000 rum "Comanda %-.100T interzisa utilizatorului: '%s'@'%s' pentru tabela '%-.192s'" rus "Команда %-.100T запрещена пользователю '%s'@'%s' для таблицы '%-.192s'" serbian "%-.100T komanda zabranjena za korisnika '%s'@'%s' za tabelu '%-.192s'" - spa "%-.100T comando negado para usuario: '%s'@'%s' para tabla '%-.192s'" + spa "%-.100T comando denegado para usuario: '%s'@'%s' para la tabla '%-.192s'" swe "%-.100T ej tillåtet för '%s'@'%s' för tabell '%-.192s'" ukr "%-.100T команда заборонена користувачу: '%s'@'%s' у таблиці '%-.192s'" ER_COLUMNACCESS_DENIED_ERROR 42000 @@ -3283,7 +3287,7 @@ ER_COLUMNACCESS_DENIED_ERROR 42000 rum "Comanda %-.32s interzisa utilizatorului: '%s'@'%s' pentru coloana '%-.192s' in tabela '%-.192s'" rus "Команда %-.32s запрещена пользователю '%s'@'%s' для столбца '%-.192s' в таблице '%-.192s'" serbian "%-.32s komanda zabranjena za korisnika '%s'@'%s' za kolonu '%-.192s' iz tabele '%-.192s'" - spa "%-.32s comando negado para usuario: '%s'@'%s' para columna '%-.192s' en la tabla '%-.192s'" + spa "%-.32s comando denegado para el usuario: '%s'@'%s' para la columna '%-.192s' en la tabla '%-.192s'" swe "%-.32s ej tillåtet för '%s'@'%s' för kolumn '%-.192s' i tabell '%-.192s'" ukr "%-.32s команда заборонена користувачу: '%s'@'%s' для стовбця '%-.192s' у таблиці '%-.192s'" ER_ILLEGAL_GRANT_FOR_TABLE 42000 @@ -3307,7 +3311,7 @@ ER_ILLEGAL_GRANT_FOR_TABLE 42000 rus "Неверная команда GRANT или REVOKE. Обратитесь к документации, чтобы выяснить, какие привилегии можно использовать" serbian "Pogrešna 'GRANT' odnosno 'REVOKE' komanda. Molim Vas pogledajte u priručniku koje vrednosti mogu biti upotrebljene" slo "Illegal GRANT/REVOKE command; please consult the manual to see which privleges can be used" - spa "Ilegal comando GRANT/REVOKE. Por favor consulte el manual para cuales permisos pueden ser usados" + spa "Comando GRANT/REVOKE ilegal; por favor, consulte el manual ver qué permisos se pueden usar" swe "Felaktigt GRANT-privilegium använt" ukr "Хибна GRANT/REVOKE команда; прочитайте документацію стосовно того, які права можна використовувати" ER_GRANT_WRONG_HOST_OR_USER 42000 @@ -3327,7 +3331,7 @@ ER_GRANT_WRONG_HOST_OR_USER 42000 rum "Argumentul host-ului sau utilizatorului pentru GRANT e prea lung" rus "Слишком длинное имя пользователя/хоста для GRANT" serbian "Argument 'host' ili 'korisnik' prosleđen komandi 'GRANT' je predugačak" - spa "El argumento para servidor o usuario para GRANT es demasiado grande" + spa "El argumento de GRANT para el equipo o usuario es demasiado grande" swe "Felaktigt maskinnamn eller användarnamn använt med GRANT" ukr "Аргумент host або user для GRANT задовгий" ER_NO_SUCH_TABLE 42S02 @@ -3351,7 +3355,7 @@ ER_NO_SUCH_TABLE 42S02 rus "Таблица '%-.192s.%-.192s' не существует" serbian "Tabela '%-.192s.%-.192s' ne postoji" slo "Table '%-.192s.%-.192s' doesn't exist" - spa "Tabla '%-.192s.%-.192s' no existe" + spa "La tabla '%-.192s.%-.192s' no existe" swe "Det finns ingen tabell som heter '%-.192s.%-.192s'" ukr "Таблиця '%-.192s.%-.192s' не існує" ER_NONEXISTING_TABLE_GRANT 42000 @@ -3370,7 +3374,7 @@ ER_NONEXISTING_TABLE_GRANT 42000 rum "Nu exista un astfel de privilegiu (grant) definit pentru utilizatorul '%-.48s' de pe host-ul '%-.64s' pentru tabela '%-.192s'" rus "Такие права не определены для пользователя '%-.48s' на компьютере '%-.64s' для таблицы '%-.192s'" serbian "Ne postoji odobrenje za pristup korisniku '%-.48s' na host-u '%-.64s' tabeli '%-.192s'" - spa "No existe tal permiso definido para usuario '%-.48s' en el servidor '%-.64s' en la tabla '%-.192s'" + spa "No existe tal concesión (grant) definida para el usuario '%-.48s' en el equipo '%-.64s' en la tabla '%-.192s'" swe "Det finns inget privilegium definierat för användare '%-.48s' på '%-.64s' för tabell '%-.192s'" ukr "Повноважень не визначено для користувача '%-.48s' з хосту '%-.64s' для таблиці '%-.192s'" ER_NOT_ALLOWED_COMMAND 42000 @@ -3390,7 +3394,7 @@ ER_NOT_ALLOWED_COMMAND 42000 rum "Comanda folosita nu este permisa pentru aceasta versiune de MariaDB" rus "Эта команда не допускается в данной версии MariaDB" serbian "Upotrebljena komanda nije dozvoljena sa ovom verzijom MariaDB servera" - spa "El comando usado no es permitido con esta versión de MariaDB" + spa "El comando usado no está permitido con esta versión de MariaDB" swe "Du kan inte använda detta kommando med denna MariaDB version" ukr "Використовувана команда не дозволена у цій версії MariaDB" ER_SYNTAX_ERROR 42000 @@ -3415,7 +3419,7 @@ ER_SYNTAX_ERROR 42000 rus "У вас ошибка в запросе. Изучите документацию по используемой версии MariaDB на предмет корректного синтаксиса" serbian "Imate grešku u vašoj SQL sintaksi" slo "Something is wrong in your syntax" - spa "Algo está equivocado en su sintax" + spa "Existe un error en tu sintaxis SQL; revisa el manual que se corresponde con tu versión del servidor MariaDB para averiguar la sintaxis correcta a utilizar" swe "Du har något fel i din syntax" ukr "У вас помилка у синтаксисі SQL" ER_DELAYED_CANT_CHANGE_LOCK @@ -3434,7 +3438,7 @@ ER_DELAYED_CANT_CHANGE_LOCK rum "Thread-ul pentru inserarea aminata nu a putut obtine lacatul (lock) pentru tabela %-.192s" rus "Поток, обслуживающий отложенную вставку (delayed insert), не смог получить запрашиваемую блокировку на таблицу %-.192s" serbian "Prolongirani 'INSERT' thread nije mogao da dobije traženo zaključavanje tabele '%-.192s'" - spa "Thread de inserción retarda no pudiendo bloquear para la tabla %-.192s" + spa "El hilo (thread) de inserción retardada no pudo obtener bloqueo requerido para la tabla %-.192s" swe "DELAYED INSERT-tråden kunde inte låsa tabell '%-.192s'" ukr "Гілка для INSERT DELAYED не може отримати блокування для таблиці %-.192s" ER_TOO_MANY_DELAYED_THREADS @@ -3454,7 +3458,7 @@ ER_TOO_MANY_DELAYED_THREADS rum "Prea multe threaduri aminate care sint in uz" rus "Слишком много потоков, обслуживающих отложенную вставку (delayed insert)" serbian "Previše prolongiranih thread-ova je u upotrebi" - spa "Muchos threads retardados en uso" + spa "Demasiados hilos (threads) retardados en uso" swe "Det finns redan 'max_delayed_threads' trådar i använding" ukr "Забагато затриманих гілок використовується" ER_ABORTING_CONNECTION 08S01 @@ -3477,7 +3481,7 @@ ER_ABORTING_CONNECTION 08S01 rus "Прервано соединение %ld к базе данных '%-.192s' пользователя '%-.48s' (%-.64s)" serbian "Prekinuta konekcija broj %ld ka bazi: '%-.192s' korisnik je bio: '%-.48s' (%-.64s)" slo "Aborted connection %ld to db: '%-.192s' user: '%-.48s' (%-.64s)" - spa "Conexión abortada %ld para db: '%-.192s' usuario: '%-.48s' (%-.64s)" + spa "Conexión %ld abortada para la base de datos: '%-.192s' usuario: '%-.48s' (%-.64s)" swe "Avbröt länken för tråd %ld till db '%-.192s', användare '%-.48s' (%-.64s)" ukr "Перервано з'єднання %ld до бази данних: '%-.192s' користувача: '%-.48s' (%-.64s)" ER_NET_PACKET_TOO_LARGE 08S01 @@ -3497,7 +3501,7 @@ ER_NET_PACKET_TOO_LARGE 08S01 rum "Un packet mai mare decit 'max_allowed_packet' a fost primit" rus "Полученный пакет больше, чем 'max_allowed_packet'" serbian "Primio sam mrežni paket veći od definisane vrednosti 'max_allowed_packet'" - spa "Obtenido un paquete mayor que 'max_allowed_packet'" + spa "Obtenido un paquete mayor de 'max_allowed_packet' bytes" swe "Kommunkationspaketet är större än 'max_allowed_packet'" ukr "Отримано пакет більший ніж max_allowed_packet" ER_NET_READ_ERROR_FROM_PIPE 08S01 @@ -3517,7 +3521,7 @@ ER_NET_READ_ERROR_FROM_PIPE 08S01 rum "Eroare la citire din cauza lui 'connection pipe'" rus "Получена ошибка чтения от потока соединения (connection pipe)" serbian "Greška pri čitanju podataka sa pipe-a" - spa "Obtenido un error de lectura de la conexión pipe" + spa "Obtenido un error de lectura desde la tubería de la conexión" swe "Fick läsfel från klienten vid läsning från 'PIPE'" ukr "Отримано помилку читання з комунікаційного каналу" ER_NET_FCNTL_ERROR 08S01 @@ -3557,7 +3561,7 @@ ER_NET_PACKETS_OUT_OF_ORDER 08S01 rum "Packets care nu sint ordonati au fost gasiti" rus "Пакеты получены в неверном порядке" serbian "Primio sam mrežne pakete van reda" - spa "Obtenido paquetes desordenados" + spa "Obtenidos paquetes desordenados" swe "Kommunikationspaketen kom i fel ordning" ukr "Отримано пакети у неналежному порядку" ER_NET_UNCOMPRESS_ERROR 08S01 @@ -3577,7 +3581,7 @@ ER_NET_UNCOMPRESS_ERROR 08S01 rum "Nu s-a putut decompresa pachetul de comunicatie (communication packet)" rus "Невозможно распаковать пакет, полученный через коммуникационный протокол" serbian "Ne mogu da dekompresujem mrežne pakete" - spa "No puedo descomprimir paquetes de comunicación" + spa "No pude descomprimir paquete de comunicación" swe "Kunde inte packa up kommunikationspaketet" ukr "Не можу декомпресувати комунікаційний пакет" ER_NET_READ_ERROR 08S01 @@ -3617,7 +3621,7 @@ ER_NET_READ_INTERRUPTED 08S01 rum "Timeout obtinut citind pachetele de comunicatie (communication packets)" rus "Получен таймаут ожидания пакета через коммуникационный протокол " serbian "Vremenski limit za čitanje mrežnih paketa je istekao" - spa "Obtenido timeout leyendo paquetes de comunicación" + spa "Obtenido tiempo agotado (timeout) leyendo paquetes de comunicación" swe "Fick 'timeout' vid läsning från klienten" ukr "Отримано затримку читання комунікаційних пакетів" ER_NET_ERROR_ON_WRITE 08S01 @@ -3637,7 +3641,7 @@ ER_NET_ERROR_ON_WRITE 08S01 rum "Eroare in scrierea pachetelor de comunicatie (communication packets)" rus "Получена ошибка при передаче пакета через коммуникационный протокол " serbian "Greška pri slanju mrežnih paketa" - spa "Obtenido un error de escribiendo paquetes de comunicación" + spa "Obtenido un error escribiendo paquetes de comunicación" swe "Fick ett fel vid skrivning till klienten" ukr "Отримано помилку запису комунікаційних пакетів" ER_NET_WRITE_INTERRUPTED 08S01 @@ -3657,7 +3661,7 @@ ER_NET_WRITE_INTERRUPTED 08S01 rum "Timeout obtinut scriind pachetele de comunicatie (communication packets)" rus "Получен таймаут в процессе передачи пакета через коммуникационный протокол " serbian "Vremenski limit za slanje mrežnih paketa je istekao" - spa "Obtenido timeout escribiendo paquetes de comunicación" + spa "Obtenido tiempo agotado (timeout) escribiendo paquetes de comunicación" swe "Fick 'timeout' vid skrivning till klienten" ukr "Отримано затримку запису комунікаційних пакетів" ER_TOO_LONG_STRING 42000 @@ -3677,7 +3681,7 @@ ER_TOO_LONG_STRING 42000 rum "Sirul rezultat este mai lung decit 'max_allowed_packet'" rus "Результирующая строка больше, чем 'max_allowed_packet'" serbian "Rezultujuči string je duži nego što to dozvoljava parametar servera 'max_allowed_packet'" - spa "La string resultante es mayor que max_allowed_packet" + spa "La cadena resultante es mayor de max_allowed_packet bytes" swe "Resultatsträngen är längre än max_allowed_packet" ukr "Строка результату довша ніж max_allowed_packet" ER_TABLE_CANT_HANDLE_BLOB 42000 @@ -3696,7 +3700,7 @@ ER_TABLE_CANT_HANDLE_BLOB 42000 rum "Tipul de tabela folosit (%s) nu suporta coloane de tip BLOB/TEXT" rus "%s таблицы не поддерживают типы BLOB/TEXT" serbian "Iskorišteni tip tabele (%s) ne podržava kolone tipa 'BLOB' odnosno 'TEXT'" - spa "El tipo de tabla usada (%s) no permite soporte para columnas BLOB/TEXT" + spa "El motor de almacenaje (%s) no soporta columnas de tipo BLOB/TEXT" swe "Den använda tabelltypen (%s) kan inte hantera BLOB/TEXT-kolumner" ukr "%s таблиці не підтримують BLOB/TEXT стовбці" ER_TABLE_CANT_HANDLE_AUTO_INCREMENT 42000 @@ -3715,7 +3719,7 @@ ER_TABLE_CANT_HANDLE_AUTO_INCREMENT 42000 rum "Tipul de tabela folosit (%s) nu suporta coloane de tip AUTO_INCREMENT" rus "%s таблицы не поддерживают автоинкрементные столбцы" serbian "Iskorišteni tip tabele (%s) ne podržava kolone tipa 'AUTO_INCREMENT'" - spa "El tipo de tabla usada (%s) no permite soporte para columnas AUTO_INCREMENT" + spa "El motor de almacenaje (%s) no soporta columnas AUTO_INCREMENT" swe "Den använda tabelltypen (%s) kan inte hantera AUTO_INCREMENT-kolumner" ukr "%s таблиці не підтримують AUTO_INCREMENT стовбці" ER_DELAYED_INSERT_TABLE_LOCKED @@ -3739,7 +3743,7 @@ ER_DELAYED_INSERT_TABLE_LOCKED rus "Нельзя использовать INSERT DELAYED для таблицы '%-.192s', потому что она заблокирована с помощью LOCK TABLES" serbian "Komanda 'INSERT DELAYED' ne može biti iskorištena u tabeli '%-.192s', zbog toga što je zaključana komandom 'LOCK TABLES'" slo "INSERT DELAYED can't be used with table '%-.192s', because it is locked with LOCK TABLES" - spa "INSERT DELAYED no puede ser usado con tablas '%-.192s', porque esta bloqueada con LOCK TABLES" + spa "INSERT DELAYED no puede ser usado con la tabla '%-.192s' porque esta bloqueada con LOCK TABLES" swe "INSERT DELAYED kan inte användas med tabell '%-.192s', emedan den är låst med LOCK TABLES" ukr "INSERT DELAYED не може бути використано з таблицею '%-.192s', тому що її заблоковано з LOCK TABLES" ER_WRONG_COLUMN_NAME 42000 @@ -3758,7 +3762,7 @@ ER_WRONG_COLUMN_NAME 42000 rum "Nume increct de coloana '%-.100s'" rus "Неверное имя столбца '%-.100s'" serbian "Pogrešno ime kolone '%-.100s'" - spa "Incorrecto nombre de columna '%-.100s'" + spa "Nombre Incorrecto de columna '%-.100s'" swe "Felaktigt kolumnnamn '%-.100s'" ukr "Невірне ім'я стовбця '%-.100s'" ER_WRONG_KEY_COLUMN 42000 @@ -3766,6 +3770,7 @@ ER_WRONG_KEY_COLUMN 42000 ger "Die Speicher-Engine %s kann die Spalte %`s nicht indizieren" hindi "स्टोरेज इंजन %s, कॉलम %`s को इंडेक्स नहीं कर सकता" rus "Обработчик таблиц %s не может проиндексировать столбец %`s" + spa "El motor de almacenaje %s no puede indizar la columna %`s" ukr "Вказівник таблиц %s не може індексувати стовбець %`s" ER_WRONG_MRG_TABLE cze "Všechny tabulky v MERGE tabulce nejsou definovány stejně" @@ -3787,7 +3792,7 @@ ER_WRONG_MRG_TABLE rus "Не все таблицы в MERGE определены одинаково" serbian "Tabele iskorištene u 'MERGE' tabeli nisu definisane na isti način" slo "All tables in the MERGE table are not defined identically" - spa "Todas las tablas en la MERGE tabla no estan definidas identicamente" + spa "Incapaz de abrir la tabla subyacente por estar definida de forma diferente o por no ser del tipo no-MyISAM o por no existir" swe "Tabellerna i MERGE-tabellen är inte identiskt definierade" ukr "Таблиці у MERGE TABLE мають різну структуру" ER_DUP_UNIQUE 23000 @@ -3805,7 +3810,7 @@ ER_DUP_UNIQUE 23000 rum "Nu pot scrie pe hard-drive, din cauza constraintului unic (unique constraint) pentru tabela '%-.192s'" rus "Невозможно записать в таблицу '%-.192s' из-за ограничений уникального ключа" serbian "Zbog provere jedinstvenosti ne mogu da upišem podatke u tabelu '%-.192s'" - spa "No puedo escribir, debido al único constraint, para tabla '%-.192s'" + spa "No puedo grabar, debido a restricción única, en la tabla '%-.192s'" swe "Kan inte skriva till tabell '%-.192s'; UNIQUE-test" ukr "Не можу записати до таблиці '%-.192s', з причини вимог унікальності" ER_BLOB_KEY_WITHOUT_LENGTH 42000 @@ -3829,7 +3834,7 @@ ER_BLOB_KEY_WITHOUT_LENGTH 42000 rus "Столбец типа BLOB '%-.192s' был указан в определении ключа без указания длины ключа" serbian "BLOB kolona '%-.192s' je upotrebljena u specifikaciji ključa bez navođenja dužine ključa" slo "BLOB column '%-.192s' used in key specification without a key length" - spa "Columna BLOB column '%-.192s' usada en especificación de clave sin tamaño de la clave" + spa "Columna BLOB/TEXT '%-.192s', usada en especificación de clave, sin tamaño" swe "Du har inte angett någon nyckellängd för BLOB '%-.192s'" ukr "Стовбець BLOB '%-.192s' використано у визначенні ключа без вказання довжини ключа" ER_PRIMARY_CANT_HAVE_NULL 42000 @@ -3848,7 +3853,7 @@ ER_PRIMARY_CANT_HAVE_NULL 42000 rum "Toate partile unei chei primare (PRIMARY KEY) trebuie sa fie NOT NULL; Daca aveti nevoie de NULL in vreo cheie, folositi UNIQUE in schimb" rus "Все части первичного ключа (PRIMARY KEY) должны быть определены как NOT NULL; Если вам нужна поддержка величин NULL в ключе, воспользуйтесь индексом UNIQUE" serbian "Svi delovi primarnog ključa moraju biti različiti od NULL; Ako Vam ipak treba NULL vrednost u ključu, upotrebite 'UNIQUE'" - spa "Todas las partes de un PRIMARY KEY deben ser NOT NULL; Si necesitas NULL en una clave, use UNIQUE" + spa "Todas las partes de una PRIMARY KEY deben de ser NOT NULL; si necesitas NULL en una clave, usa UNIQUE en su lugar" swe "Alla delar av en PRIMARY KEY måste vara NOT NULL; Om du vill ha en nyckel med NULL, använd UNIQUE istället" ukr "Усі частини PRIMARY KEY повинні бути NOT NULL; Якщо ви потребуєте NULL у ключі, скористайтеся UNIQUE" ER_TOO_MANY_ROWS 42000 @@ -3867,7 +3872,7 @@ ER_TOO_MANY_ROWS 42000 rum "Resultatul constista din mai multe linii" rus "В результате возвращена более чем одна строка" serbian "Rezultat je sačinjen od više slogova" - spa "Resultado compuesto de mas que una línea" + spa "Resultado compuesto de más de una fila" swe "Resultet bestod av mera än en rad" ukr "Результат знаходиться у більше ніж одній строці" ER_REQUIRES_PRIMARY_KEY 42000 @@ -3886,7 +3891,7 @@ ER_REQUIRES_PRIMARY_KEY 42000 rum "Aceast tip de tabela are nevoie de o cheie primara" rus "Этот тип таблицы требует определения первичного ключа" serbian "Ovaj tip tabele zahteva da imate definisan primarni ključ" - spa "Este tipo de tabla necesita de una primary key" + spa "Este tipo de tabla necesita de una clave primaria" swe "Denna tabelltyp kräver en PRIMARY KEY" ukr "Цей тип таблиці потребує первинного ключа" ER_NO_RAID_COMPILED @@ -3905,7 +3910,7 @@ ER_NO_RAID_COMPILED rum "Aceasta versiune de MariaDB, nu a fost compilata cu suport pentru RAID" rus "Эта версия MariaDB скомпилирована без поддержки RAID" serbian "Ova verzija MariaDB servera nije kompajlirana sa podrškom za RAID uređaje" - spa "Esta versión de MariaDB no es compilada con soporte RAID" + spa "Esta versión de MariaDB no ha sido compilada con soporte para RAID" swe "Denna version av MariaDB är inte kompilerad med RAID" ukr "Ця версія MariaDB не зкомпільована з підтримкою RAID" ER_UPDATE_WITHOUT_KEY_IN_SAFE_MODE @@ -3922,7 +3927,7 @@ ER_UPDATE_WITHOUT_KEY_IN_SAFE_MODE por "Você está usando modo de atualização seguro e tentou atualizar uma tabela sem uma cláusula WHERE que use uma coluna chave" rus "Вы работаете в режиме безопасных обновлений (safe update mode) и попробовали изменить таблицу без использования ключевого столбца в части WHERE" serbian "Vi koristite safe update mod servera, a probali ste da promenite podatke bez 'WHERE' komande koja koristi kolonu ključa" - spa "Tu estás usando modo de actualización segura y tentado actualizar una tabla sin un WHERE que usa una KEY columna" + spa "Estás usando modo de actualización segura y has intentado actualizar una tabla sin un WHERE que use una columna KEY" swe "Du använder 'säker uppdateringsmod' och försökte uppdatera en tabell utan en WHERE-sats som använder sig av en nyckel" ukr "Ви у режимі безпечного оновлення та намагаєтесь оновити таблицю без оператора WHERE, що використовує KEY стовбець" ER_KEY_DOES_NOT_EXISTS 42000 S1009 @@ -3940,7 +3945,7 @@ ER_KEY_DOES_NOT_EXISTS 42000 S1009 por "Chave '%-.192s' não existe na tabela '%-.192s'" rus "Ключ '%-.192s' не существует в таблице '%-.192s'" serbian "Ključ '%-.192s' ne postoji u tabeli '%-.192s'" - spa "Clave '%-.192s' no existe en la tabla '%-.192s'" + spa "La clave '%-.192s' no existe en la tabla '%-.192s'" swe "Nyckel '%-.192s' finns inte in tabell '%-.192s'" ukr "Ключ '%-.192s' не існує в таблиці '%-.192s'" ER_CHECK_NO_SUCH_TABLE 42000 @@ -3983,7 +3988,7 @@ ER_CHECK_NOT_IMPLEMENTED 42000 rus "Обработчик таблицы не поддерживает этого: %s" serbian "Handler za ovu tabelu ne dozvoljava %s komande" slo "The handler for the table doesn't support %s" - spa "El manipulador de la tabla no permite soporte para %s" + spa "El motor de almacenaje para la tabla no soporta %s" swe "Tabellhanteraren för denna tabell kan inte göra %s" ukr "Вказівник таблиці не підтримуе %s" ER_CANT_DO_THIS_DURING_AN_TRANSACTION 25000 @@ -4000,7 +4005,7 @@ ER_CANT_DO_THIS_DURING_AN_TRANSACTION 25000 por "Não lhe é permitido executar este comando em uma transação" rus "Вам не разрешено выполнять эту команду в транзакции" serbian "Nije Vam dozvoljeno da izvršite ovu komandu u transakciji" - spa "No tienes el permiso para ejecutar este comando en una transición" + spa "No tienes el permiso para ejecutar este comando en una transacción" swe "Du får inte utföra detta kommando i en transaktion" ukr "Вам не дозволено виконувати цю команду в транзакції" ER_ERROR_DURING_COMMIT @@ -4088,11 +4093,12 @@ ER_NEW_ABORTING_CONNECTION 08S01 por "Conexão %lld abortada para banco de dados '%-.192s' - usuário '%-.48s' - 'host' '%-.64s' ('%-.64s')" rus "Прервано соединение %lld к базе данных '%-.192s' пользователя '%-.48s' с хоста '%-.64s' (%-.64s)" serbian "Prekinuta konekcija broj %lld ka bazi: '%-.192s' korisnik je bio: '%-.48s' a host: '%-.64s' (%-.64s)" - spa "Abortada conexión %lld para db: '%-.192s' usuario: '%-.48s' servidor: '%-.64s' (%-.64s)" + spa "Abortada conexión %lld a la base de datos: '%-.192s' usuario: '%-.48s'equipo: '%-.64s' (%-.64s)" swe "Avbröt länken för tråd %lld till db '%-.192s', användare '%-.48s', host '%-.64s' (%-.64s)" ukr "Перервано з'єднання %lld до бази данних: '%-.192s' користувач: '%-.48s' хост: '%-.64s' (%-.64s)" ER_UNUSED_10 eng "You should never see it" + spa "Nunca lo deberías de ver" ER_FLUSH_MASTER_BINLOG_CLOSED eng "Binlog closed, cannot RESET MASTER" ger "Binlog geschlossen. Kann RESET MASTER nicht ausführen" @@ -4100,6 +4106,7 @@ ER_FLUSH_MASTER_BINLOG_CLOSED por "Binlog fechado. Não pode fazer RESET MASTER" rus "Двоичный журнал обновления закрыт, невозможно выполнить RESET MASTER" serbian "Binarni log file zatvoren, ne mogu da izvršim komandu 'RESET MASTER'" + spa "Binlog cerrado, no puedo hacer RESET MASTER" ukr "Реплікаційний лог закрито, не можу виконати RESET MASTER" ER_INDEX_REBUILD cze "Přebudování indexu dumpnuté tabulky '%-.192s' nebylo úspěšné" @@ -4115,7 +4122,7 @@ ER_INDEX_REBUILD por "Falhou na reconstrução do índice da tabela 'dumped' '%-.192s'" rus "Ошибка перестройки индекса сохраненной таблицы '%-.192s'" serbian "Izgradnja indeksa dump-ovane tabele '%-.192s' nije uspela" - spa "Falla reconstruyendo el indice de la tabla dumped '%-.192s'" + spa "Fallo reconstruyendo el índice del volcado de la tabla '%-.192s'" ukr "Невдале відновлення індекса переданої таблиці '%-.192s'" ER_MASTER cze "Chyba masteru: '%-.64s'" @@ -4129,7 +4136,7 @@ ER_MASTER por "Erro no 'master' '%-.64s'" rus "Ошибка от головного сервера: '%-.64s'" serbian "Greška iz glavnog servera '%-.64s' u klasteru" - spa "Error del master: '%-.64s'" + spa "Error del maestro (master): '%-.64s'" swe "Fel från master: '%-.64s'" ukr "Помилка від головного: '%-.64s'" ER_MASTER_NET_READ 08S01 @@ -4144,7 +4151,7 @@ ER_MASTER_NET_READ 08S01 por "Erro de rede lendo do 'master'" rus "Возникла ошибка чтения в процессе коммуникации с головным сервером" serbian "Greška u primanju mrežnih paketa sa glavnog servera u klasteru" - spa "Error de red leyendo del master" + spa "Error de red leyendo del maestro (master)" swe "Fick nätverksfel vid läsning från master" ukr "Мережева помилка читання від головного" ER_MASTER_NET_WRITE 08S01 @@ -4159,7 +4166,7 @@ ER_MASTER_NET_WRITE 08S01 por "Erro de rede gravando no 'master'" rus "Возникла ошибка записи в процессе коммуникации с головным сервером" serbian "Greška u slanju mrežnih paketa na glavni server u klasteru" - spa "Error de red escribiendo para el master" + spa "Error de red grabando en maestro (master)" swe "Fick nätverksfel vid skrivning till master" ukr "Мережева помилка запису до головного" ER_FT_MATCHING_KEY_NOT_FOUND @@ -4175,7 +4182,7 @@ ER_FT_MATCHING_KEY_NOT_FOUND por "Não pode encontrar um índice para o texto todo que combine com a lista de colunas" rus "Невозможно отыскать полнотекстовый (FULLTEXT) индекс, соответствующий списку столбцов" serbian "Ne mogu da pronađem 'FULLTEXT' indeks koli odgovara listi kolona" - spa "No puedo encontrar índice FULLTEXT correspondiendo a la lista de columnas" + spa "No puedo encontrar índice FULLTEXT coincidente con la lista de columnas" swe "Hittar inte ett FULLTEXT-index i kolumnlistan" ukr "Не можу знайти FULLTEXT індекс, що відповідає переліку стовбців" ER_LOCK_OR_ACTIVE_TRANSACTION @@ -4191,7 +4198,7 @@ ER_LOCK_OR_ACTIVE_TRANSACTION por "Não pode executar o comando dado porque você tem tabelas ativas travadas ou uma transação ativa" rus "Невозможно выполнить указанную команду, поскольку у вас присутствуют активно заблокированные таблица или открытая транзакция" serbian "Ne mogu da izvršim datu komandu zbog toga što su tabele zaključane ili je transakcija u toku" - spa "No puedo ejecutar el comando dado porque tienes tablas bloqueadas o una transición activa" + spa "No puedo ejecutar el comando dado porque tienes tablas activas bloqueadas o una transacción activa" swe "Kan inte utföra kommandot emedan du har en låst tabell eller an aktiv transaktion" ukr "Не можу виконати подану команду тому, що таблиця заблокована або виконується транзакція" ER_UNKNOWN_SYSTEM_VARIABLE @@ -4208,7 +4215,7 @@ ER_UNKNOWN_SYSTEM_VARIABLE por "Variável de sistema '%-.*s' desconhecida" rus "Неизвестная системная переменная '%-.*s'" serbian "Nepoznata sistemska promenljiva '%-.*s'" - spa "Desconocida variable de sistema '%-.*s'" + spa "Variable de sistema '%-.*s' desconocida" swe "Okänd systemvariabel: '%-.*s'" ukr "Невідома системна змінна '%-.*s'" ER_CRASHED_ON_USAGE @@ -4224,7 +4231,7 @@ ER_CRASHED_ON_USAGE por "Tabela '%-.192s' está marcada como danificada e deve ser reparada" rus "Таблица '%-.192s' помечена как испорченная и должна пройти проверку и ремонт" serbian "Tabela '%-.192s' je markirana kao oštećena i trebala bi biti popravljena" - spa "Tabla '%-.192s' está marcada como crashed y debe ser reparada" + spa "La tabla '%-.192s' está marcada como estropeada y debe de ser reparada" swe "Tabell '%-.192s' är trasig och bör repareras med REPAIR TABLE" ukr "Таблицю '%-.192s' марковано як зіпсовану та її потрібно відновити" ER_CRASHED_ON_REPAIR @@ -4240,7 +4247,7 @@ ER_CRASHED_ON_REPAIR por "Tabela '%-.192s' está marcada como danificada e a última reparação (automática?) falhou" rus "Таблица '%-.192s' помечена как испорченная и последний (автоматический?) ремонт не был успешным" serbian "Tabela '%-.192s' je markirana kao oštećena, a zadnja (automatska?) popravka je bila neuspela" - spa "Tabla '%-.192s' está marcada como crashed y la última reparación (automactica?) falló" + spa "La tabla '%-.192s' está marcada como estropeada y la última reparación (¿automática?) falló" swe "Tabell '%-.192s' är trasig och senast (automatiska?) reparation misslyckades" ukr "Таблицю '%-.192s' марковано як зіпсовану та останнє (автоматичне?) відновлення не вдалося" ER_WARNING_NOT_COMPLETE_ROLLBACK @@ -4255,7 +4262,7 @@ ER_WARNING_NOT_COMPLETE_ROLLBACK por "Aviso: Algumas tabelas não-transacionais alteradas não puderam ser reconstituídas (rolled back)" rus "Внимание: по некоторым измененным нетранзакционным таблицам невозможно будет произвести откат транзакции" serbian "Upozorenje: Neke izmenjene tabele ne podržavaju komandu 'ROLLBACK'" - spa "Aviso: Algunas tablas no transancionales no pueden tener rolled back" + spa "Algunas tablas no transaccionales ya cambiadas no pueden ser retrocedidas (rolled back)" swe "Warning: Några icke transaktionella tabeller kunde inte återställas vid ROLLBACK" ukr "Застереження: Деякі нетранзакційні зміни таблиць не можна буде повернути" ER_TRANS_CACHE_FULL @@ -4269,7 +4276,7 @@ ER_TRANS_CACHE_FULL jpn "複数ステートメントから成るトランザクションが 'max_binlog_cache_size' 以上の容量を必要としました。このシステム変数を増加して、再試行してください。" por "Transações multi-declaradas (multi-statement transactions) requeriram mais do que o valor limite (max_binlog_cache_size) de bytes para armazenagem. Aumente o valor desta variável do mariadbd e tente novamente" rus "Транзакции, включающей большое количество команд, потребовалось более чем 'max_binlog_cache_size' байт. Увеличьте эту переменную сервера mariadbd и попробуйте еще раз" - spa "Multipla transición necesita mas que 'max_binlog_cache_size' bytes de almacenamiento. Aumente esta variable mariadbd y tente de nuevo" + spa "Transacción multi-sentencia requirió de más de 'max_binlog_cache_size' bytes de almacenamiento" swe "Transaktionen krävde mera än 'max_binlog_cache_size' minne. Öka denna mariadbd-variabel och försök på nytt" ukr "Транзакція з багатьма виразами вимагає більше ніж 'max_binlog_cache_size' байтів для зберігання. Збільште цю змінну mariadbd та спробуйте знову" ER_SLAVE_MUST_STOP @@ -4282,7 +4289,7 @@ ER_SLAVE_MUST_STOP por "Esta operação não pode ser realizada com um 'slave' '%2$*1$s' em execução. Execute STOP SLAVE '%2$*1$s' primeiro" rus "Эту операцию невозможно выполнить при работающем потоке подчиненного сервера %2$*1$s. Сначала выполните STOP SLAVE '%2$*1$s'" serbian "Ova operacija ne može biti izvršena dok je aktivan podređeni '%2$*1$s' server. Zadajte prvo komandu 'STOP SLAVE '%2$*1$s'' da zaustavite podređeni server" - spa "Esta operación no puede ser hecha con el esclavo '%2$*1$s' funcionando, primero use STOP SLAVE '%2$*1$s'" + spa "Esta operación no puede ser realizada con el esclavo '%2$*1$s' en marcha; primero ejecute STOP SLAVE '%2$*1$s'" swe "Denna operation kan inte göras under replikering; Du har en aktiv förbindelse till '%2$*1$s'. Gör STOP SLAVE '%2$*1$s' först" ukr "Операція не може бути виконана з запущеним підлеглим '%2$*1$s', спочатку виконайте STOP SLAVE '%2$*1$s'" ER_SLAVE_NOT_RUNNING @@ -4296,7 +4303,7 @@ ER_SLAVE_NOT_RUNNING por "Esta operação requer um 'slave' em execução. Configure o 'slave' e execute START SLAVE" rus "Для этой операции требуется работающий подчиненный сервер. Сначала выполните START SLAVE" serbian "Ova operacija zahteva da je aktivan podređeni server. Konfigurišite prvo podređeni server i onda izvršite komandu 'START SLAVE'" - spa "Esta operación necesita el esclavo funcionando, configure esclavo y haga el START SLAVE" + spa "Esta operación requiere de un esclavo funcionando, configure el esclavo y haga el START SLAVE" swe "Denna operation kan endast göras under replikering; Konfigurera slaven och gör START SLAVE" ukr "Операція вимагає запущеного підлеглого, зконфігуруйте підлеглого та виконайте START SLAVE" ER_BAD_SLAVE @@ -4310,7 +4317,7 @@ ER_BAD_SLAVE por "O servidor não está configurado como 'slave'. Acerte o arquivo de configuração ou use CHANGE MASTER TO" rus "Этот сервер не настроен как подчиненный. Внесите исправления в конфигурационном файле или с помощью CHANGE MASTER TO" serbian "Server nije konfigurisan kao podređeni server, ispravite konfiguracioni file ili na njemu izvršite komandu 'CHANGE MASTER TO'" - spa "El servidor no está configurado como esclavo, edite el archivo config file o con CHANGE MASTER TO" + spa "El servidor no está configurado como esclavo; arréglelo en el fichero de configuración o con CHANGE MASTER TO" swe "Servern är inte konfigurerade som en replikationsslav. Ändra konfigurationsfilen eller gör CHANGE MASTER TO" ukr "Сервер не зконфігуровано як підлеглий, виправте це у файлі конфігурації або з CHANGE MASTER TO" ER_MASTER_INFO @@ -4319,6 +4326,7 @@ ER_MASTER_INFO ger "Konnte Master-Info-Struktur '%.*s' nicht initialisieren. Weitere Fehlermeldungen können im MariaDB-Error-Log eingesehen werden" jpn "'master info '%.*s''構造体の初期化ができませんでした。MariaDBエラーログでエラーメッセージを確認してください。" serbian "Nisam mogao da inicijalizujem informacionu strukturu glavnog servera, proverite da li imam privilegije potrebne za pristup file-u 'master.info' '%.*s'" + spa "No pude inicializar estructura info de maestro (master) para '%.*s'; se pueden ver más mensajes de error en el historial (log) de errores de MariaDB" swe "Kunde inte initialisera replikationsstrukturerna för '%.*s'. See MariaDB fel fil för mera information" ukr "Інформаційна структура з'єднання головного і підлеглого (master.info) для '%.*s' не може бути ініціалізована" ER_SLAVE_THREAD @@ -4332,7 +4340,7 @@ ER_SLAVE_THREAD por "Não conseguiu criar 'thread' de 'slave'. Verifique os recursos do sistema" rus "Невозможно создать поток подчиненного сервера. Проверьте системные ресурсы" serbian "Nisam mogao da startujem thread za podređeni server, proverite sistemske resurse" - spa "No puedo crear el thread esclavo, verifique recursos del sistema" + spa "No puedo crear el hilo (thread) esclavo, verifique recursos del sistema" swe "Kunde inte starta en tråd för replikering" ukr "Не можу створити підлеглу гілку, перевірте системні ресурси" ER_TOO_MANY_USER_CONNECTIONS 42000 @@ -4348,7 +4356,7 @@ ER_TOO_MANY_USER_CONNECTIONS 42000 por "Usuário '%-.64s' já possui mais que o valor máximo de conexões (max_user_connections) ativas" rus "У пользователя %-.64s уже больше чем 'max_user_connections' активных соединений" serbian "Korisnik %-.64s već ima više aktivnih konekcija nego što je to određeno 'max_user_connections' promenljivom" - spa "Usario %-.64s ya tiene mas que 'max_user_connections' conexiones activas" + spa "El usuario %-.64s ya tiene más de 'max_user_connections' conexiones activas" swe "Användare '%-.64s' har redan 'max_user_connections' aktiva inloggningar" ukr "Користувач %-.64s вже має більше ніж 'max_user_connections' активних з'єднань" ER_SET_CONSTANTS_ONLY @@ -4364,7 +4372,7 @@ ER_SET_CONSTANTS_ONLY por "Você pode usar apenas expressões constantes com SET" rus "С этой командой вы можете использовать только константные выражения" serbian "Možete upotrebiti samo konstantan iskaz sa komandom 'SET'" - spa "Tu solo debes usar expresiones constantes con SET" + spa "Sólo puedes usar expresiones constantes en esta sentencia" swe "Man kan endast använda konstantuttryck med SET" ukr "Можна використовувати лише вирази зі сталими у SET" ER_LOCK_WAIT_TIMEOUT @@ -4379,7 +4387,7 @@ ER_LOCK_WAIT_TIMEOUT por "Tempo de espera (timeout) de travamento excedido. Tente reiniciar a transação" rus "Таймаут ожидания блокировки истек; попробуйте перезапустить транзакцию" serbian "Vremenski limit za zaključavanje tabele je istekao; Probajte da ponovo startujete transakciju" - spa "Tiempo de bloqueo de espera excedido" + spa "Tiempo de espera de bloqueo excedido; intente rearrancar la transacción" swe "Fick inte ett lås i tid ; Försök att starta om transaktionen" ukr "Затримку очікування блокування вичерпано" ER_LOCK_TABLE_FULL @@ -4410,7 +4418,7 @@ ER_READ_ONLY_TRANSACTION 25000 por "Travamentos de atualização não podem ser obtidos durante uma transação de tipo READ UNCOMMITTED" rus "Блокировки обновлений нельзя получить в процессе чтения не принятой (в режиме READ UNCOMMITTED) транзакции" serbian "Zaključavanja izmena ne mogu biti realizovana sve dok traje 'READ UNCOMMITTED' transakcija" - spa "Bloqueos de actualización no pueden ser adqueridos durante una transición READ UNCOMMITTED" + spa "No se pueden adquirir bloqueos de actualización durante una transacción READ UNCOMMITTED" swe "Updateringslås kan inte göras när man använder READ UNCOMMITTED" ukr "Оновити блокування не можливо на протязі транзакції READ UNCOMMITTED" ER_DROP_DB_WITH_READ_LOCK @@ -4425,7 +4433,7 @@ ER_DROP_DB_WITH_READ_LOCK por "DROP DATABASE não permitido enquanto uma 'thread' está mantendo um travamento global de leitura" rus "Не допускается DROP DATABASE, пока поток держит глобальную блокировку чтения" serbian "Komanda 'DROP DATABASE' nije dozvoljena dok thread globalno zaključava čitanje podataka" - spa "DROP DATABASE no permitido mientras un thread está ejerciendo un bloqueo de lectura global" + spa "DROP DATABASE no permitido mientras un hilo (thread) está ejerciendo un bloqueo de lectura global" swe "DROP DATABASE är inte tillåtet när man har ett globalt läslås" ukr "DROP DATABASE не дозволено доки гілка перебуває під загальним блокуванням читання" ER_CREATE_DB_WITH_READ_LOCK @@ -4440,7 +4448,7 @@ ER_CREATE_DB_WITH_READ_LOCK por "CREATE DATABASE não permitido enquanto uma 'thread' está mantendo um travamento global de leitura" rus "Не допускается CREATE DATABASE, пока поток держит глобальную блокировку чтения" serbian "Komanda 'CREATE DATABASE' nije dozvoljena dok thread globalno zaključava čitanje podataka" - spa "CREATE DATABASE no permitido mientras un thread está ejerciendo un bloqueo de lectura global" + spa "CREATE DATABASE no permitido mientras un hilo (thread) está manteniendo un bloqueo de lectura global" swe "CREATE DATABASE är inte tillåtet när man har ett globalt läslås" ukr "CREATE DATABASE не дозволено доки гілка перебуває під загальним блокуванням читання" ER_WRONG_ARGUMENTS @@ -4455,7 +4463,7 @@ ER_WRONG_ARGUMENTS por "Argumentos errados para %s" rus "Неверные параметры для %s" serbian "Pogrešni argumenti prosleđeni na %s" - spa "Argumentos errados para %s" + spa "Argumentos incorrectos para %s" swe "Felaktiga argument till %s" ukr "Хибний аргумент для %s" ER_NO_PERMISSION_TO_CREATE_USER 42000 @@ -4469,7 +4477,7 @@ ER_NO_PERMISSION_TO_CREATE_USER 42000 por "Não é permitido a '%s'@'%s' criar novos usuários" rus "'%s'@'%s' не разрешается создавать новых пользователей" serbian "Korisniku '%s'@'%s' nije dozvoljeno da kreira nove korisnike" - spa "'%s'@'%s' no es permitido para crear nuevos usuarios" + spa "'%s'@'%s' no está permitido para crear nuevos usuarios" swe "'%s'@'%s' har inte rättighet att skapa nya användare" ukr "Користувачу '%s'@'%s' не дозволено створювати нових користувачів" ER_UNION_TABLES_IN_DIFFERENT_DIR @@ -4483,7 +4491,7 @@ ER_UNION_TABLES_IN_DIFFERENT_DIR por "Definição incorreta da tabela. Todas as tabelas contidas na junção devem estar no mesmo banco de dados" rus "Неверное определение таблицы; Все таблицы в MERGE должны принадлежать одной и той же базе данных" serbian "Pogrešna definicija tabele; sve 'MERGE' tabele moraju biti u istoj bazi podataka" - spa "Incorrecta definición de la tabla; Todas las tablas MERGE deben estar en el mismo banco de datos" + spa "Definición incorrecta de la tabla; Todas las tablas MERGE deben de estar en la misma base de datos" swe "Felaktig tabelldefinition; alla tabeller i en MERGE-tabell måste vara i samma databas" ukr "Хибне визначення таблиці; всі MERGE-таблиці повинні належити до однієї бази ланних." ER_LOCK_DEADLOCK 40001 @@ -4497,7 +4505,7 @@ ER_LOCK_DEADLOCK 40001 por "Encontrado um travamento fatal (deadlock) quando tentava obter uma trava. Tente reiniciar a transação" rus "Возникла тупиковая ситуация в процессе получения блокировки; Попробуйте перезапустить транзакцию" serbian "Unakrsno zaključavanje pronađeno kada sam pokušao da dobijem pravo na zaključavanje; Probajte da restartujete transakciju" - spa "Encontrado deadlock cuando tentando obtener el bloqueo; Tente recomenzar la transición" + spa "Encontrado estancamiento (deadlock) al intentar obtener el bloqueo; intenta volver a comenzar la transacción" swe "Fick 'DEADLOCK' vid låsförsök av block/rad. Försök att starta om transaktionen" ukr "Взаємне блокування знайдено під час спроби отримати блокування; спробуйте перезапустити транзакцію." ER_TABLE_CANT_HANDLE_FT @@ -4511,7 +4519,7 @@ ER_TABLE_CANT_HANDLE_FT por "O tipo de tabela utilizado (%s) não suporta índices de texto completo (fulltext indexes)" rus "Используемый тип таблиц (%s) не поддерживает полнотекстовых индексов" serbian "Upotrebljeni tip tabele (%s) ne podržava 'FULLTEXT' indekse" - spa "El tipo de tabla usada (%s) no soporta índices FULLTEXT" + spa "El motor de almacenaje %s no soporta índices FULLTEXT" swe "Tabelltypen (%s) har inte hantering av FULLTEXT-index" ukr "Використаний тип таблиці (%s) не підтримує FULLTEXT індексів" ER_CANNOT_ADD_FOREIGN @@ -4524,7 +4532,7 @@ ER_CANNOT_ADD_FOREIGN por "Não pode acrescentar uma restrição de chave estrangeira para `%s`" rus "Невозможно добавить ограничения внешнего ключа для `%s`" serbian "Ne mogu da dodam proveru spoljnog ključa na `%s`" - spa "No puede adicionar clave extranjera constraint para `%s`" + spa "No puedo añadir restricción de clave foránea para `%s`" swe "Kan inte lägga till 'FOREIGN KEY constraint' för `%s`'" ukr "Не можу додати обмеження зовнішнього ключа Ha `%s`" ER_NO_REFERENCED_ROW 23000 @@ -4539,7 +4547,7 @@ ER_NO_REFERENCED_ROW 23000 norwegian-ny "Cannot add a child row: a foreign key constraint fails" por "Não pode acrescentar uma linha filha: uma restrição de chave estrangeira falhou" rus "Невозможно добавить или обновить дочернюю строку: проверка ограничений внешнего ключа не выполняется" - spa "No puede adicionar una línea hijo: falla de clave extranjera constraint" + spa "No puedo añadir o actualizar una fila hija: ha fallado una restrición de clave foránea" swe "FOREIGN KEY-konflikt: Kan inte skriva barn" ukr "Не вдається додати або оновити дочірній рядок: невдала перевірка обмеження зовнішнього ключа" ER_ROW_IS_REFERENCED 23000 @@ -4553,7 +4561,7 @@ ER_ROW_IS_REFERENCED 23000 por "Não pode apagar uma linha pai: uma restrição de chave estrangeira falhou" rus "Невозможно удалить или обновить родительскую строку: проверка ограничений внешнего ключа не выполняется" serbian "Ne mogu da izbrišem roditeljski slog: provera spoljnog ključa je neuspela" - spa "No puede deletar una línea padre: falla de clave extranjera constraint" + spa "No puedo borrar o actualizar una fila padre: ha fallado una restrición de clave foránea" swe "FOREIGN KEY-konflikt: Kan inte radera fader" ER_CONNECT_TO_MASTER 08S01 nla "Fout bij opbouwen verbinding naar master: %-.128s" @@ -4563,7 +4571,7 @@ ER_CONNECT_TO_MASTER 08S01 jpn "マスターへの接続エラー: %-.128s" por "Erro conectando com o master: %-.128s" rus "Ошибка соединения с головным сервером: %-.128s" - spa "Error de coneccion a master: %-.128s" + spa "Error conectando al maestro (master): %-.128s" swe "Fick fel vid anslutning till master: %-.128s" ER_QUERY_ON_MASTER nla "Fout bij uitvoeren query op master: %-.128s" @@ -4573,7 +4581,7 @@ ER_QUERY_ON_MASTER jpn "マスターでのクエリ実行エラー: %-.128s" por "Erro rodando consulta no master: %-.128s" rus "Ошибка выполнения запроса на головном сервере: %-.128s" - spa "Error executando el query en master: %-.128s" + spa "Error ejecutando consulta (query) en maestro (master): %-.128s" swe "Fick fel vid utförande av command på mastern: %-.128s" ER_ERROR_WHEN_EXECUTING_COMMAND nla "Fout tijdens uitvoeren van commando %s: %-.128s" @@ -4585,7 +4593,7 @@ ER_ERROR_WHEN_EXECUTING_COMMAND por "Erro quando executando comando %s: %-.128s" rus "Ошибка при выполнении команды %s: %-.128s" serbian "Greška pri izvršavanju komande %s: %-.128s" - spa "Error de %s: %-.128s" + spa "Error al ejecutar comando %s: %-.128s" swe "Fick fel vid utförande av %s: %-.128s" ER_WRONG_USAGE nla "Foutief gebruik van %s en %s" @@ -4597,7 +4605,7 @@ ER_WRONG_USAGE por "Uso errado de %s e %s" rus "Неверное использование %s и %s" serbian "Pogrešna upotreba %s i %s" - spa "Equivocado uso de %s y %s" + spa "Uso incorrecto de %s y %s" swe "Felaktig använding av %s and %s" ukr "Wrong usage of %s and %s" ER_WRONG_NUMBER_OF_COLUMNS_IN_SELECT 21000 @@ -4610,7 +4618,7 @@ ER_WRONG_NUMBER_OF_COLUMNS_IN_SELECT 21000 por "Os comandos SELECT usados têm diferente número de colunas" rus "Использованные операторы выборки (SELECT) дают разное количество столбцов" serbian "Upotrebljene 'SELECT' komande adresiraju različit broj kolona" - spa "El comando SELECT usado tiene diferente número de columnas" + spa "Las sentencias SELECT usadas tienen un número diferente de columnas" swe "SELECT-kommandona har olika antal kolumner" ER_CANT_UPDATE_WITH_READLOCK nla "Kan de query niet uitvoeren vanwege een conflicterende read lock" @@ -4622,7 +4630,7 @@ ER_CANT_UPDATE_WITH_READLOCK por "Não posso executar a consulta porque você tem um conflito de travamento de leitura" rus "Невозможно исполнить запрос, поскольку у вас установлены конфликтующие блокировки чтения" serbian "Ne mogu da izvršim upit zbog toga što imate zaključavanja čitanja podataka u konfliktu" - spa "No puedo ejecutar el query porque usted tiene conflicto de traba de lectura" + spa "No puedo ejecutar la consulta (query) porque tienes un conflicto de bloqueo de lectura" swe "Kan inte utföra kommandot emedan du har ett READ-lås" ER_MIXING_NOT_ALLOWED nla "Het combineren van transactionele en niet-transactionele tabellen is uitgeschakeld" @@ -4634,7 +4642,7 @@ ER_MIXING_NOT_ALLOWED por "Mistura de tabelas transacional e não-transacional está desabilitada" rus "Использование транзакционных таблиц наряду с нетранзакционными запрещено" serbian "Mešanje tabela koje podržavaju transakcije i onih koje ne podržavaju transakcije je isključeno" - spa "Mezla de transancional y no-transancional tablas está deshabilitada" + spa "Desactivada la mezcla de tablas transaccionales y no transaccionales" swe "Blandning av transaktionella och icke-transaktionella tabeller är inaktiverat" ER_DUP_ARGUMENT nla "Optie '%s' tweemaal gebruikt in opdracht" @@ -4645,7 +4653,7 @@ ER_DUP_ARGUMENT jpn "オプション '%s' が2度使用されています。" por "Opção '%s' usada duas vezes no comando" rus "Опция '%s' дважды использована в выражении" - spa "Opción '%s' usada dos veces en el comando" + spa "Opción '%s' usada dos veces en la sentencia" swe "Option '%s' användes två gånger" ER_USER_LIMIT_REACHED 42000 nla "Gebruiker '%-.64s' heeft het maximale gebruik van de '%s' faciliteit overschreden (huidige waarde: %ld)" @@ -4655,7 +4663,7 @@ ER_USER_LIMIT_REACHED 42000 jpn "ユーザー '%-.64s' はリソースの上限 '%s' に達しました。(現在値: %ld)" por "Usuário '%-.64s' tem excedido o '%s' recurso (atual valor: %ld)" rus "Пользователь '%-.64s' превысил использование ресурса '%s' (текущее значение: %ld)" - spa "Usuario '%-.64s' ha excedido el recurso '%s' (actual valor: %ld)" + spa "El usuario '%-.64s' ha excedido el recurso '%s' (valor actual: %ld)" swe "Användare '%-.64s' har överskridit '%s' (nuvarande värde: %ld)" ER_SPECIFIC_ACCESS_DENIED_ERROR 42000 nla "Toegang geweigerd. U moet het %-.128s privilege hebben voor deze operatie" @@ -4665,7 +4673,7 @@ ER_SPECIFIC_ACCESS_DENIED_ERROR 42000 jpn "アクセスは拒否されました。この操作には %-.128s 権限が(複数の場合はどれか1つ)必要です。" por "Acesso negado. Você precisa o privilégio %-.128s para essa operação" rus "В доступе отказано. Вам нужны привилегии %-.128s для этой операции" - spa "Acceso negado. Usted necesita el privilegio %-.128s para esta operación" + spa "Acceso denegado. Usted necesita (al menos un(os)) privilegio(s) %-.128s para esta operación" swe "Du har inte privlegiet '%-.128s' som behövs för denna operation" ukr "Access denied. You need the %-.128s privilege for this operation" ER_LOCAL_VARIABLE @@ -4676,7 +4684,7 @@ ER_LOCAL_VARIABLE jpn "変数 '%-.64s' はセッション変数です。SET GLOBALでは使用できません。" por "Variável '%-.64s' é uma SESSION variável e não pode ser usada com SET GLOBAL" rus "Переменная '%-.64s' является потоковой (SESSION) переменной и не может быть изменена с помощью SET GLOBAL" - spa "Variable '%-.64s' es una SESSION variable y no puede ser usada con SET GLOBAL" + spa "La variable '%-.64s' es una variable de SESSION y no puede ser usada con SET GLOBAL" swe "Variabel '%-.64s' är en SESSION variabel och kan inte ändrad med SET GLOBAL" ER_GLOBAL_VARIABLE nla "Variabele '%-.64s' is GLOBAL en dient te worden gewijzigd met SET GLOBAL" @@ -4686,7 +4694,7 @@ ER_GLOBAL_VARIABLE jpn "変数 '%-.64s' はグローバル変数です。SET GLOBALを使用してください。" por "Variável '%-.64s' é uma GLOBAL variável e deve ser configurada com SET GLOBAL" rus "Переменная '%-.64s' является глобальной (GLOBAL) переменной, и ее следует изменять с помощью SET GLOBAL" - spa "Variable '%-.64s' es una GLOBAL variable y no puede ser configurada con SET GLOBAL" + spa "La variable '%-.64s' es una variable GLOBAL y debería de ser configurada con SET GLOBAL" swe "Variabel '%-.64s' är en GLOBAL variabel och bör sättas med SET GLOBAL" ER_NO_DEFAULT 42000 nla "Variabele '%-.64s' heeft geen standaard waarde" @@ -4696,7 +4704,7 @@ ER_NO_DEFAULT 42000 jpn "変数 '%-.64s' にはデフォルト値がありません。" por "Variável '%-.64s' não tem um valor padrão" rus "Переменная '%-.64s' не имеет значения по умолчанию" - spa "Variable '%-.64s' no tiene un valor patrón" + spa "La variable '%-.64s' no tiene un valor por defecto" swe "Variabel '%-.64s' har inte ett DEFAULT-värde" ER_WRONG_VALUE_FOR_VAR 42000 nla "Variabele '%-.64s' kan niet worden gewijzigd naar de waarde '%-.200T'" @@ -4706,7 +4714,7 @@ ER_WRONG_VALUE_FOR_VAR 42000 jpn "変数 '%-.64s' に値 '%-.200T' を設定できません。" por "Variável '%-.64s' não pode ser configurada para o valor de '%-.200T'" rus "Переменная '%-.64s' не может быть установлена в значение '%-.200T'" - spa "Variable '%-.64s' no puede ser configurada para el valor de '%-.200T'" + spa "La variable '%-.64s' no puede ser configurada para el valor de '%-.200T'" swe "Variabel '%-.64s' kan inte sättas till '%-.200T'" ER_WRONG_TYPE_FOR_VAR 42000 nla "Foutief argumenttype voor variabele '%-.64s'" @@ -4716,7 +4724,7 @@ ER_WRONG_TYPE_FOR_VAR 42000 jpn "変数 '%-.64s' への値の型が不正です。" por "Tipo errado de argumento para variável '%-.64s'" rus "Неверный тип аргумента для переменной '%-.64s'" - spa "Tipo de argumento equivocado para variable '%-.64s'" + spa "Tipo de argumento incorrecto para variable '%-.64s'" swe "Fel typ av argument till variabel '%-.64s'" ER_VAR_CANT_BE_READ nla "Variabele '%-.64s' kan alleen worden gewijzigd, niet gelezen" @@ -4726,7 +4734,7 @@ ER_VAR_CANT_BE_READ jpn "変数 '%-.64s' は書き込み専用です。読み込みはできません。" por "Variável '%-.64s' somente pode ser configurada, não lida" rus "Переменная '%-.64s' может быть только установлена, но не считана" - spa "Variable '%-.64s' solamente puede ser configurada, no leída" + spa "La variable '%-.64s' solamente puede ser configurada, no leída" swe "Variabeln '%-.64s' kan endast sättas, inte läsas" ER_CANT_USE_OPTION_HERE 42000 nla "Foutieve toepassing/plaatsing van '%s'" @@ -4736,7 +4744,7 @@ ER_CANT_USE_OPTION_HERE 42000 jpn "'%s' の使用法または場所が不正です。" por "Errado uso/colocação de '%s'" rus "Неверное использование или в неверном месте указан '%s'" - spa "Equivocado uso/colocación de '%s'" + spa "Incorrecto uso/colocación de '%s'" swe "Fel använding/placering av '%s'" ER_NOT_SUPPORTED_YET 42000 nla "Deze versie van MariaDB ondersteunt nog geen '%s'" @@ -4746,7 +4754,7 @@ ER_NOT_SUPPORTED_YET 42000 jpn "このバージョンのMariaDBでは、まだ '%s' を利用できません。" por "Esta versão de MariaDB não suporta ainda '%s'" rus "Эта версия MariaDB пока еще не поддерживает '%s'" - spa "Esta versión de MariaDB no soporta todavia '%s'" + spa "Esta versión de MariaDB no soporta todavía '%s'" swe "Denna version av MariaDB kan ännu inte utföra '%s'" ER_MASTER_FATAL_ERROR_READING_BINLOG nla "Kreeg fatale fout %d: '%-.320s' van master tijdens lezen van data uit binaire log" @@ -4756,7 +4764,7 @@ ER_MASTER_FATAL_ERROR_READING_BINLOG jpn "致命的なエラー %d: '%-.320s' がマスターでバイナリログ読み込み中に発生しました。" por "Obteve fatal erro %d: '%-.320s' do master quando lendo dados do binary log" rus "Получена неисправимая ошибка %d: '%-.320s' от головного сервера в процессе выборки данных из двоичного журнала" - spa "Recibió fatal error %d: '%-.320s' del master cuando leyendo datos del binary log" + spa "Obtenido error fatal %d del maestro (master) al leer datos del historial (log) binario: '%-.320s'" swe "Fick fatalt fel %d: '%-.320s' från master vid läsning av binärloggen" ER_SLAVE_IGNORED_TABLE eng "Slave SQL thread ignored the query because of replicate-*-table rules" @@ -4764,7 +4772,7 @@ ER_SLAVE_IGNORED_TABLE jpn "replicate-*-table ルールに従って、スレーブSQLスレッドはクエリを無視しました。" nla "Slave SQL thread negeerde de query vanwege replicate-*-table opties" por "Slave SQL thread ignorado a consulta devido às normas de replicação-*-tabela" - spa "Slave SQL thread ignorado el query debido a las reglas de replicación-*-tabla" + spa "Hilo (thread) SQL esclavo ha ignorado la consulta (query) debido a las reglas de replicar-*-tabla" swe "Slav SQL tråden ignorerade frågan pga en replicate-*-table regel" ER_INCORRECT_GLOBAL_LOCAL_VAR eng "Variable '%-.192s' is a %s variable" @@ -4772,7 +4780,7 @@ ER_INCORRECT_GLOBAL_LOCAL_VAR ger "Variable '%-.192s' ist eine %s-Variable" jpn "変数 '%-.192s' は %s 変数です。" nla "Variabele '%-.192s' is geen %s variabele" - spa "Variable '%-.192s' es una %s variable" + spa "La variable '%-.192s' es una variable %s" swe "Variabel '%-.192s' är av typ %s" ER_WRONG_FK_DEF 42000 eng "Incorrect foreign key definition for '%-.192s': %s" @@ -4780,7 +4788,7 @@ ER_WRONG_FK_DEF 42000 jpn "外部キー '%-.192s' の定義の不正: %s" nla "Incorrecte foreign key definitie voor '%-.192s': %s" por "Definição errada da chave estrangeira para '%-.192s': %s" - spa "Equivocada definición de llave extranjera para '%-.192s': %s" + spa "Definición de clave foránea incorrecta para '%-.192s': %s" swe "Felaktig FOREIGN KEY-definition för '%-.192s': %s" ER_KEY_REF_DO_NOT_MATCH_TABLE_REF eng "Key reference and table reference don't match" @@ -4788,7 +4796,7 @@ ER_KEY_REF_DO_NOT_MATCH_TABLE_REF jpn "外部キーの参照表と定義が一致しません。" nla "Sleutel- en tabelreferentie komen niet overeen" por "Referência da chave e referência da tabela não coincidem" - spa "Referencia de llave y referencia de tabla no coinciden" + spa "La referencia de clave y la referencia de tabla no coinciden" swe "Nyckelreferensen och tabellreferensen stämmer inte överens" ER_OPERAND_COLUMNS 21000 eng "Operand should contain %d column(s)" @@ -4796,7 +4804,7 @@ ER_OPERAND_COLUMNS 21000 jpn "オペランドに %d 個の列が必要です。" nla "Operand behoort %d kolommen te bevatten" rus "Операнд должен содержать %d колонок" - spa "Operando debe tener %d columna(s)" + spa "El operando debería de contener %d columna(s)" ukr "Операнд має складатися з %d стовбців" ER_SUBQUERY_NO_1_ROW 21000 eng "Subquery returns more than 1 row" @@ -4805,7 +4813,7 @@ ER_SUBQUERY_NO_1_ROW 21000 nla "Subquery retourneert meer dan 1 rij" por "Subconsulta retorna mais que 1 registro" rus "Подзапрос возвращает более одной записи" - spa "Subconsulta retorna mas que 1 línea" + spa "La subconsulta (subquery) devuelve más de 1 fila" swe "Subquery returnerade mer än 1 rad" ukr "Підзапит повертає більш нiж 1 запис" ER_UNKNOWN_STMT_HANDLER @@ -4815,7 +4823,7 @@ ER_UNKNOWN_STMT_HANDLER jpn "'%.*s' はプリペアードステートメントの不明なハンドルです。(%s で指定されました)" nla "Onebekende prepared statement handler (%.*s) voor %s aangegeven" por "Desconhecido manipulador de declaração preparado (%.*s) determinado para %s" - spa "Desconocido preparado comando handler (%.*s) dado para %s" + spa "Manejador desconocido de sentencia preparada (%.*s) dado para %s" swe "Okänd PREPARED STATEMENT id (%.*s) var given till %s" ukr "Unknown prepared statement handler (%.*s) given to %s" ER_CORRUPT_HELP_DB @@ -4824,7 +4832,7 @@ ER_CORRUPT_HELP_DB jpn "ヘルプデータベースは壊れているか存在しません。" nla "Help database is beschadigd of bestaat niet" por "Banco de dado de ajuda corrupto ou não existente" - spa "Base de datos Help está corrupto o no existe" + spa "O la Base de datos de Ayuda está corrupta o no existe" swe "Hjälpdatabasen finns inte eller är skadad" ER_CYCLIC_REFERENCE eng "Cyclic reference on subqueries" @@ -4833,7 +4841,7 @@ ER_CYCLIC_REFERENCE nla "Cyclische verwijzing in subqueries" por "Referência cíclica em subconsultas" rus "Циклическая ссылка на подзапрос" - spa "Cíclica referencia en subconsultas" + spa "Referencia cíclica en subconsultas (subqueries)" swe "Cyklisk referens i subqueries" ukr "Циклічне посилання на підзапит" ER_AUTO_CONVERT @@ -4843,7 +4851,7 @@ ER_AUTO_CONVERT nla "Veld '%s' wordt van %s naar %s geconverteerd" por "Convertendo coluna '%s' de %s para %s" rus "Преобразование поля '%s' из %s в %s" - spa "Convirtiendo columna '%s' de %s para %s" + spa "Convirtiendo la columna '%s' de %s a %s" swe "Konvertar kolumn '%s' från %s till %s" ukr "Перетворення стовбца '%s' з %s у %s" ER_ILLEGAL_REFERENCE 42S22 @@ -4862,7 +4870,7 @@ ER_DERIVED_MUST_HAVE_ALIAS 42000 jpn "導出表には別名が必須です。" nla "Voor elke afgeleide tabel moet een unieke alias worden gebruikt" por "Cada tabela derivada deve ter seu próprio alias" - spa "Cada tabla derivada debe tener su propio alias" + spa "Cada tabla derivada debe de tener su propio alias" swe "Varje 'derived table' måste ha sitt eget alias" ER_SELECT_REDUCED 01000 eng "Select %u was reduced during optimization" @@ -4871,7 +4879,7 @@ ER_SELECT_REDUCED 01000 nla "Select %u werd geredureerd tijdens optimtalisatie" por "Select %u foi reduzido durante otimização" rus "Select %u был упразднен в процессе оптимизации" - spa "Select %u fué reducido durante optimización" + spa "La selección %u fué reducida durante optimización" swe "Select %u reducerades vid optimiering" ukr "Select %u was скасовано при оптимiзацii" ER_TABLENAME_NOT_ALLOWED_HERE 42000 @@ -4880,7 +4888,7 @@ ER_TABLENAME_NOT_ALLOWED_HERE 42000 jpn "特定のSELECTのみで使用の表 '%-.192s' は %-.32s では使用できません。" nla "Tabel '%-.192s' uit een van de SELECTS kan niet in %-.32s gebruikt worden" por "Tabela '%-.192s' de um dos SELECTs não pode ser usada em %-.32s" - spa "Tabla '%-.192s' de uno de los SELECT no puede ser usada en %-.32s" + spa "La tabla '%-.192s' de uno de los SELECT no puede ser usada en %-.32s" swe "Tabell '%-.192s' från en SELECT kan inte användas i %-.32s" ER_NOT_SUPPORTED_AUTH_MODE 08004 eng "Client does not support authentication protocol requested by server; consider upgrading MariaDB client" @@ -4888,7 +4896,7 @@ ER_NOT_SUPPORTED_AUTH_MODE 08004 jpn "クライアントはサーバーが要求する認証プロトコルに対応できません。MariaDBクライアントのアップグレードを検討してください。" nla "Client ondersteunt het door de server verwachtte authenticatieprotocol niet. Overweeg een nieuwere MariaDB client te gebruiken" por "Cliente não suporta o protocolo de autenticação exigido pelo servidor; considere a atualização do cliente MariaDB" - spa "Cliente no soporta protocolo de autenticación solicitado por el servidor; considere actualizar el cliente MariaDB" + spa "El cliente no soporta protocolo de autenticación requerido por el servidor; considere actualizar el cliente MariaDB" swe "Klienten stöder inte autentiseringsprotokollet som begärts av servern; överväg uppgradering av klientprogrammet" ER_SPATIAL_CANT_HAVE_NULL 42000 eng "All parts of a SPATIAL index must be NOT NULL" @@ -4896,7 +4904,7 @@ ER_SPATIAL_CANT_HAVE_NULL 42000 jpn "空間索引のキー列は NOT NULL でなければいけません。" nla "Alle delete van een SPATIAL index dienen als NOT NULL gedeclareerd te worden" por "Todas as partes de uma SPATIAL index devem ser NOT NULL" - spa "Todas las partes de una SPATIAL index deben ser NOT NULL" + spa "Todas las partes de un índice SPATIAL deben de ser NOT NULL" swe "Alla delar av en SPATIAL index måste vara NOT NULL" ER_COLLATION_CHARSET_MISMATCH 42000 eng "COLLATION '%s' is not valid for CHARACTER SET '%s'" @@ -4904,7 +4912,7 @@ ER_COLLATION_CHARSET_MISMATCH 42000 jpn "COLLATION '%s' は CHARACTER SET '%s' に適用できません。" nla "COLLATION '%s' is niet geldig voor CHARACTER SET '%s'" por "COLLATION '%s' não é válida para CHARACTER SET '%s'" - spa "COLLATION '%s' no es válido para CHARACTER SET '%s'" + spa "El COTEJO (COLLATION) '%s' no es válido para CHARACTER SET '%s'" swe "COLLATION '%s' är inte tillåtet för CHARACTER SET '%s'" ER_SLAVE_WAS_RUNNING eng "Slave is already running" @@ -4912,7 +4920,7 @@ ER_SLAVE_WAS_RUNNING jpn "スレーブはすでに稼働中です。" nla "Slave is reeds actief" por "O slave já está rodando" - spa "Slave ya está funcionando" + spa "El esclavo ya está funcionando" swe "Slaven har redan startat" ER_SLAVE_WAS_NOT_RUNNING eng "Slave already has been stopped" @@ -4920,7 +4928,7 @@ ER_SLAVE_WAS_NOT_RUNNING jpn "スレーブはすでに停止しています。" nla "Slave is reeds gestopt" por "O slave já está parado" - spa "Slave ya fué parado" + spa "El esclavo ya fué parado" swe "Slaven har redan stoppat" ER_TOO_BIG_FOR_UNCOMPRESS eng "Uncompressed data size too large; the maximum size is %d (probably, length of uncompressed data was corrupted)" @@ -4928,144 +4936,147 @@ ER_TOO_BIG_FOR_UNCOMPRESS jpn "展開後のデータが大きすぎます。最大サイズは %d です。(展開後データの長さ情報が壊れている可能性もあります。)" nla "Ongecomprimeerder data is te groot; de maximum lengte is %d (waarschijnlijk, de lengte van de gecomprimeerde data was beschadigd)" por "Tamanho muito grande dos dados des comprimidos. O máximo tamanho é %d. (provavelmente, o comprimento dos dados descomprimidos está corrupto)" - spa "Tamaño demasiado grande para datos descomprimidos. El máximo tamaño es %d. (probablemente, extensión de datos descomprimidos fué corrompida)" + spa "Tamaño demasiado grande para datos descomprimidos. El máximo tamaño es %d. (probablemente, el tamaño de datos descomprimidos fué corrompido)" ER_ZLIB_Z_MEM_ERROR eng "ZLIB: Not enough memory" ger "ZLIB: Nicht genug Speicher" jpn "ZLIB: メモリ不足です。" nla "ZLIB: Onvoldoende geheugen" por "ZLIB: Não suficiente memória disponível" - spa "Z_MEM_ERROR: No suficiente memoria para zlib" + spa "ZLIB: No hay suficiente memoria" ER_ZLIB_Z_BUF_ERROR eng "ZLIB: Not enough room in the output buffer (probably, length of uncompressed data was corrupted)" ger "ZLIB: Im Ausgabepuffer ist nicht genug Platz vorhanden (wahrscheinlich wurde die Länge der unkomprimierten Daten beschädigt)" jpn "ZLIB: 出力バッファに十分な空きがありません。(展開後データの長さ情報が壊れている可能性もあります。)" nla "ZLIB: Onvoldoende ruimte in uitgaande buffer (waarschijnlijk, de lengte van de ongecomprimeerde data was beschadigd)" por "ZLIB: Não suficiente espaço no buffer emissor (provavelmente, o comprimento dos dados descomprimidos está corrupto)" - spa "Z_BUF_ERROR: No suficiente espacio en el búfer de salida para zlib (probablemente, extensión de datos descomprimidos fué corrompida)" + spa "ZLIB: No hay suficiente espacio en el búfer de salida (probablemente, el tamaño de datos descomprimidos fué corrompido)" ER_ZLIB_Z_DATA_ERROR eng "ZLIB: Input data corrupted" ger "ZLIB: Eingabedaten beschädigt" jpn "ZLIB: 入力データが壊れています。" nla "ZLIB: Invoer data beschadigd" por "ZLIB: Dados de entrada está corrupto" - spa "ZLIB: Dato de entrada fué corrompido para zlib" + spa "ZLIB: Dato de entrada corrupto" ER_CUT_VALUE_GROUP_CONCAT eng "Row %u was cut by %s)" + spa "La fila %u ha sido cortada por %s)" ER_WARN_TOO_FEW_RECORDS 01000 eng "Row %lu doesn't contain data for all columns" ger "Zeile %lu enthält nicht für alle Felder Daten" jpn "行 %lu はすべての列へのデータを含んでいません。" nla "Rij %lu bevat niet de data voor alle kolommen" por "Conta de registro é menor que a conta de coluna na linha %lu" - spa "Línea %lu no contiene datos para todas las columnas" + spa "La fila %lu no contiene datos para todas las columnas" ER_WARN_TOO_MANY_RECORDS 01000 eng "Row %lu was truncated; it contained more data than there were input columns" ger "Zeile %lu gekürzt, die Zeile enthielt mehr Daten, als es Eingabefelder gibt" jpn "行 %lu はデータを切り捨てられました。列よりも多いデータを含んでいました。" nla "Regel %lu ingekort, bevatte meer data dan invoer kolommen" por "Conta de registro é maior que a conta de coluna na linha %lu" - spa "Línea %lu fué truncada; La misma contine mas datos que las que existen en las columnas de entrada" + spa "La fila %lu fué truncada; contenía más datos que columnas de entrada" ER_WARN_NULL_TO_NOTNULL 22004 eng "Column set to default value; NULL supplied to NOT NULL column '%s' at row %lu" ger "Feld auf Vorgabewert gesetzt, da NULL für NOT-NULL-Feld '%s' in Zeile %lu angegeben" jpn "列にデフォルト値が設定されました。NOT NULLの列 '%s' に 行 %lu で NULL が与えられました。" por "Dado truncado, NULL fornecido para NOT NULL coluna '%s' na linha %lu" - spa "Datos truncado, NULL suministrado para NOT NULL columna '%s' en la línea %lu" + spa "Columna puesta a valor por defecto; NULL suministrado para columna NOT NULL '%s' en la fila %lu" ER_WARN_DATA_OUT_OF_RANGE 22003 eng "Out of range value for column '%s' at row %lu" + spa "Valor fuera de rango para la columna '%s' en la fila %lu" WARN_DATA_TRUNCATED 01000 eng "Data truncated for column '%s' at row %lu" ger "Daten abgeschnitten für Feld '%s' in Zeile %lu" jpn "列 '%s' の 行 %lu でデータが切り捨てられました。" por "Dado truncado para coluna '%s' na linha %lu" - spa "Datos truncados para columna '%s' en la línea %lu" + spa "Datos truncados para la columna '%s' en la fila %lu" ER_WARN_USING_OTHER_HANDLER eng "Using storage engine %s for table '%s'" ger "Speicher-Engine %s wird für Tabelle '%s' benutzt" hindi "स्टोरेज इंजन %s का इस्तेमाल टेबल '%s' के लिए किया जा रहा है" jpn "ストレージエンジン %s が表 '%s' に利用されています。" por "Usando engine de armazenamento %s para tabela '%s'" - spa "Usando motor de almacenamiento %s para tabla '%s'" + spa "Usando motor de almacenaje %s para la tabla '%s'" swe "Använder handler %s för tabell '%s'" ER_CANT_AGGREGATE_2COLLATIONS eng "Illegal mix of collations (%s,%s) and (%s,%s) for operation '%s'" ger "Unerlaubte Mischung von Sortierreihenfolgen (%s, %s) und (%s, %s) für Operation '%s'" jpn "照合順序 (%s,%s) と (%s,%s) の混在は操作 '%s' では不正です。" por "Combinação ilegal de collations (%s,%s) e (%s,%s) para operação '%s'" - spa "Ilegal mezcla de collations (%s,%s) y (%s,%s) para operación '%s'" + spa "Mezcla ilegal de cotejos (collations) (%s,%s) y (%s,%s) para la operación '%s'" ER_DROP_USER eng "Cannot drop one or more of the requested users" ger "Kann einen oder mehrere der angegebenen Benutzer nicht löschen" + spa "No puedo eliminar uno o más de los usuarios solicitados" ER_REVOKE_GRANTS eng "Can't revoke all privileges for one or more of the requested users" ger "Kann nicht alle Berechtigungen widerrufen, die für einen oder mehrere Benutzer gewährt wurden" jpn "指定されたユーザーから指定された全ての権限を剥奪することができませんでした。" por "Não pode revocar todos os privilégios, grant para um ou mais dos usuários pedidos" - spa "No puede revocar todos los privilegios, derecho para uno o mas de los usuarios solicitados" + spa "No puedo revocar todos los privilegios para uno o más de los usuarios solicitados" ER_CANT_AGGREGATE_3COLLATIONS eng "Illegal mix of collations (%s,%s), (%s,%s), (%s,%s) for operation '%s'" ger "Unerlaubte Mischung von Sortierreihenfolgen (%s, %s), (%s, %s), (%s, %s) für Operation '%s'" jpn "照合順序 (%s,%s), (%s,%s), (%s,%s) の混在は操作 '%s' では不正です。" por "Ilegal combinação de collations (%s,%s), (%s,%s), (%s,%s) para operação '%s'" - spa "Ilegal mezcla de collations (%s,%s), (%s,%s), (%s,%s) para operación '%s'" + spa "Mezcla ilegal de cotejos (collations) (%s,%s), (%s,%s), (%s,%s) para la operación '%s'" ER_CANT_AGGREGATE_NCOLLATIONS eng "Illegal mix of collations for operation '%s'" ger "Unerlaubte Mischung von Sortierreihenfolgen für Operation '%s'" jpn "操作 '%s' では不正な照合順序の混在です。" por "Ilegal combinação de collations para operação '%s'" - spa "Ilegal mezcla de collations para operación '%s'" + spa "Mezcla ilegal de cotejos (collations) para la operación '%s'" ER_VARIABLE_IS_NOT_STRUCT eng "Variable '%-.64s' is not a variable component (can't be used as XXXX.variable_name)" ger "Variable '%-.64s' ist keine Variablen-Komponente (kann nicht als XXXX.variablen_name verwendet werden)" jpn "変数 '%-.64s' は構造変数の構成要素ではありません。(XXXX.変数名 という指定はできません。)" por "Variável '%-.64s' não é uma variável componente (Não pode ser usada como XXXX.variável_nome)" - spa "Variable '%-.64s' no es una variable componente (No puede ser usada como XXXX.variable_name)" + spa "La variable '%-.64s' no es un componente variable (No puede ser usada como XXXX.variable_name)" ER_UNKNOWN_COLLATION eng "Unknown collation: '%-.64s'" ger "Unbekannte Sortierreihenfolge: '%-.64s'" jpn "不明な照合順序: '%-.64s'" por "Collation desconhecida: '%-.64s'" - spa "Collation desconocida: '%-.64s'" + spa "Cotejo (Collations) desconocido: '%-.64s'" ER_SLAVE_IGNORED_SSL_PARAMS eng "SSL parameters in CHANGE MASTER are ignored because this MariaDB slave was compiled without SSL support; they can be used later if MariaDB slave with SSL is started" ger "SSL-Parameter in CHANGE MASTER werden ignoriert, weil dieser MariaDB-Slave ohne SSL-Unterstützung kompiliert wurde. Sie können aber später verwendet werden, wenn ein MariaDB-Slave mit SSL gestartet wird" jpn "このMariaDBスレーブはSSLサポートを含めてコンパイルされていないので、CHANGE MASTER のSSLパラメータは無視されました。今後SSLサポートを持つMariaDBスレーブを起動する際に利用されます。" por "SSL parâmetros em CHANGE MASTER são ignorados porque este escravo MariaDB foi compilado sem o SSL suporte. Os mesmos podem ser usados mais tarde quando o escravo MariaDB com SSL seja iniciado." - spa "Parametros SSL en CHANGE MASTER son ignorados porque este slave MariaDB fue compilado sin soporte SSL; pueden ser usados despues cuando el slave MariaDB con SSL sea inicializado" + spa "Los parámetros SSL en CHANGE MASTER son ignorados porque este esclavo MariaDB fue compilado sin soporte SSL; pueden ser usados después cuando el esclavo MariaDB con SSL sea arrancado" ER_SERVER_IS_IN_SECURE_AUTH_MODE eng "Server is running in --secure-auth mode, but '%s'@'%s' has a password in the old format; please change the password to the new format" ger "Server läuft im Modus --secure-auth, aber '%s'@'%s' hat ein Passwort im alten Format. Bitte Passwort ins neue Format ändern" jpn "サーバーは --secure-auth モードで稼働しています。しかし '%s'@'%s' は古い形式のパスワードを使用しています。新しい形式のパスワードに変更してください。" por "Servidor está rodando em --secure-auth modo, porêm '%s'@'%s' tem senha no formato antigo; por favor troque a senha para o novo formato" rus "Сервер запущен в режиме --secure-auth (безопасной авторизации), но для пользователя '%s'@'%s' пароль сохранён в старом формате; необходимо обновить формат пароля" - spa "Servidor está rodando en modo --secure-auth, pero '%s'@'%s' tiene clave en el antiguo formato; por favor cambie la clave para el nuevo formato" + spa "El servidor se está ejecutando en modo --secure-auth, pero '%s'@'%s' tiene una contraseña con formato antiguo formato; por favor cambie la contraseña al nuevo formato" ER_WARN_FIELD_RESOLVED eng "Field or reference '%-.192s%s%-.192s%s%-.192s' of SELECT #%d was resolved in SELECT #%d" ger "Feld oder Verweis '%-.192s%s%-.192s%s%-.192s' im SELECT-Befehl Nr. %d wurde im SELECT-Befehl Nr. %d aufgelöst" jpn "フィールドまたは参照 '%-.192s%s%-.192s%s%-.192s' は SELECT #%d ではなく、SELECT #%d で解決されました。" por "Campo ou referência '%-.192s%s%-.192s%s%-.192s' de SELECT #%d foi resolvido em SELECT #%d" rus "Поле или ссылка '%-.192s%s%-.192s%s%-.192s' из SELECTа #%d была найдена в SELECTе #%d" - spa "Campo o referencia '%-.192s%s%-.192s%s%-.192s' de SELECT #%d fue resolvido en SELECT #%d" + spa "El campo o la referencia '%-.192s%s%-.192s%s%-.192s' de SELECT #%d fue resuelto en SELECT #%d" ukr "Стовбець або посилання '%-.192s%s%-.192s%s%-.192s' із SELECTу #%d було знайдене у SELECTі #%d" ER_BAD_SLAVE_UNTIL_COND eng "Incorrect parameter or combination of parameters for START SLAVE UNTIL" ger "Falscher Parameter oder falsche Kombination von Parametern für START SLAVE UNTIL" jpn "START SLAVE UNTIL へのパラメータまたはその組み合わせが不正です。" por "Parâmetro ou combinação de parâmetros errado para START SLAVE UNTIL" - spa "Parametro equivocado o combinación de parametros para START SLAVE UNTIL" + spa "Parámetro incorrecto o combinación de parametros para START SLAVE UNTIL" ER_MISSING_SKIP_SLAVE eng "It is recommended to use --skip-slave-start when doing step-by-step replication with START SLAVE UNTIL; otherwise, you will get problems if you get an unexpected slave's mariadbd restart" ger "Es wird empfohlen, mit --skip-slave-start zu starten, wenn mit START SLAVE UNTIL eine Schritt-für-Schritt-Replikation ausgeführt wird. Ansonsten gibt es Probleme, wenn ein Slave-Server unerwartet neu startet" jpn "START SLAVE UNTIL で段階的にレプリケーションを行う際には、--skip-slave-start オプションを使うことを推奨します。使わない場合、スレーブのmariadbdが不慮の再起動をすると問題が発生します。" por "É recomendado para rodar com --skip-slave-start quando fazendo replicação passo-por-passo com START SLAVE UNTIL, de outra forma você não está seguro em caso de inesperada reinicialição do mariadbd escravo" - spa "Es recomendado rodar con --skip-slave-start cuando haciendo replicación step-by-step con START SLAVE UNTIL, a menos que usted no esté seguro en caso de inesperada reinicialización del mariadbd slave" + spa "Se recomienda usar --skip-slave-start al hacer réplica paso a paso con START SLAVE UNTIL; en caso contrario, obtendrás problemas si tiene lugar un rearranque inesperado del esclavo mariadb" ER_UNTIL_COND_IGNORED eng "SQL thread is not to be started so UNTIL options are ignored" ger "SQL-Thread soll nicht gestartet werden. Daher werden UNTIL-Optionen ignoriert" jpn "スレーブSQLスレッドが開始されないため、UNTILオプションは無視されました。" por "Thread SQL não pode ser inicializado tal que opções UNTIL são ignoradas" - spa "SQL thread no es inicializado tal que opciones UNTIL son ignoradas" + spa "Un hilo (thread) SQL no ha de ser arrancado de esa manera HASTA que las opciones sean ignordas" ER_WRONG_NAME_FOR_INDEX 42000 eng "Incorrect index name '%-.100s'" ger "Falscher Indexname '%-.100s'" @@ -5078,14 +5089,14 @@ ER_WRONG_NAME_FOR_CATALOG 42000 ger "Falscher Katalogname '%-.100s'" jpn "カタログ名 '%-.100s' は不正です。" por "Incorreto nome de catálogo '%-.100s'" - spa "Nombre de catalog incorrecto '%-.100s'" + spa "Nombre de catálogo incorrecto '%-.100s'" swe "Felaktigt katalog namn '%-.100s'" ER_WARN_QC_RESIZE eng "Query cache failed to set size %llu; new query cache size is %lu" ger "Änderung der Query-Cache-Größe auf %llu fehlgeschlagen; neue Query-Cache-Größe ist %lu" por "Falha em Query cache para configurar tamanho %llu, novo tamanho de query cache é %lu" rus "Кеш запросов не может установить размер %llu, новый размер кеша зпросов - %lu" - spa "Query cache fallada para configurar tamaño %llu, nuevo tamaño de query cache es %lu" + spa "La caché de consulta (query) ha fallado al poner el tamaño %llu; el nuevo tamaño de caché de consulta (query) es %lu" swe "Storleken av "Query cache" kunde inte sättas till %llu, ny storlek är %lu" ukr "Кеш запитів неспроможен встановити розмір %llu, новий розмір кеша запитів - %lu" ER_BAD_FT_COLUMN @@ -5093,34 +5104,34 @@ ER_BAD_FT_COLUMN ger "Feld '%-.192s' kann nicht Teil eines FULLTEXT-Index sein" jpn "列 '%-.192s' は全文索引のキーにはできません。" por "Coluna '%-.192s' não pode ser parte de índice FULLTEXT" - spa "Columna '%-.192s' no puede ser parte de FULLTEXT index" + spa "La columna '%-.192s' no puede format parte de índice FULLTEXT" swe "Kolumn '%-.192s' kan inte vara del av ett FULLTEXT index" ER_UNKNOWN_KEY_CACHE eng "Unknown key cache '%-.100s'" ger "Unbekannter Schlüssel-Cache '%-.100s'" jpn "'%-.100s' は不明なキーキャッシュです。" por "Key cache desconhecida '%-.100s'" - spa "Desconocida key cache '%-.100s'" + spa "Caché de clave desconocida '%-.100s'" swe "Okänd nyckel cache '%-.100s'" ER_WARN_HOSTNAME_WONT_WORK eng "MariaDB is started in --skip-name-resolve mode; you must restart it without this switch for this grant to work" ger "MariaDB wurde mit --skip-name-resolve gestartet. Diese Option darf nicht verwendet werden, damit diese Rechtevergabe möglich ist" jpn "MariaDBは --skip-name-resolve モードで起動しています。このオプションを外して再起動しなければ、この権限操作は機能しません。" por "MariaDB foi inicializado em modo --skip-name-resolve. Você necesita reincializá-lo sem esta opção para este grant funcionar" - spa "MariaDB esta inicializado en modo --skip-name-resolve. Usted necesita reinicializarlo sin esta opción para este derecho funcionar" + spa "MariaDB ha sido arrancada en modo --skip-name-resolve. Usted necesita reinicializarla sin esta opción para que esta concesión funcione" ER_UNKNOWN_STORAGE_ENGINE 42000 eng "Unknown storage engine '%s'" ger "Unbekannte Speicher-Engine '%s'" hindi "अज्ञात स्टोरेज इंजन '%s'" jpn "'%s' は不明なストレージエンジンです。" por "Motor de tabela desconhecido '%s'" - spa "Desconocido motor de tabla '%s'" + spa "Motor de almacenaje '%s' desconocido" ER_WARN_DEPRECATED_SYNTAX eng "'%s' is deprecated and will be removed in a future release. Please use %s instead" ger "'%s' ist veraltet. Bitte benutzen Sie '%s'" jpn "'%s' は将来のリリースで廃止予定です。代わりに %s を使用してください。" por "'%s' é desatualizado. Use '%s' em seu lugar" - spa "'%s' está desaprobado, use '%s' en su lugar" + spa "'%s' está obsoleto y será quitado en una entrega futura, use '%s' en su lugar" ER_NON_UPDATABLE_TABLE eng "The target table %-.100s of the %s is not updatable" ger "Die Zieltabelle %-.100s von %s ist nicht aktualisierbar" @@ -5135,42 +5146,43 @@ ER_FEATURE_DISABLED ger "Das Feature '%s' ist ausgeschaltet, Sie müssen MariaDB mit '%s' übersetzen, damit es verfügbar ist" jpn "機能 '%s' は無効です。利用するためには '%s' を含めてビルドしたMariaDBが必要です。" por "O recurso '%s' foi desativado; você necessita MariaDB construído com '%s' para ter isto funcionando" - spa "El recurso '%s' fue deshabilitado; usted necesita construir MariaDB con '%s' para tener eso funcionando" + spa "La característica '%s' fue deshabilitada; usted necesita construir MariaDB con '%s' para tener eso funcionando" swe "'%s' är inte aktiverad; För att aktivera detta måste du bygga om MariaDB med '%s' definierad" ER_OPTION_PREVENTS_STATEMENT eng "The MariaDB server is running with the %s option so it cannot execute this statement" ger "Der MariaDB-Server läuft mit der Option %s und kann diese Anweisung deswegen nicht ausführen" jpn "MariaDBサーバーが %s オプションで実行されているので、このステートメントは実行できません。" por "O servidor MariaDB está rodando com a opção %s razão pela qual não pode executar esse commando" - spa "El servidor MariaDB está rodando con la opción %s tal que no puede ejecutar este comando" + spa "El servidor MariaDB se está ejecutando con la opción %s por lo que no puede ejecutar esta sentencia" swe "MariaDB är startad med %s. Pga av detta kan du inte använda detta kommando" ER_DUPLICATED_VALUE_IN_TYPE eng "Column '%-.100s' has duplicated value '%-.64s' in %s" ger "Feld '%-.100s' hat doppelten Wert '%-.64s' in %s" jpn "列 '%-.100s' で、重複する値 '%-.64s' が %s に指定されています。" por "Coluna '%-.100s' tem valor duplicado '%-.64s' em %s" - spa "Columna '%-.100s' tiene valor doblado '%-.64s' en %s" + spa "La columna '%-.100s' tiene valor duplicado '%-.64s' en %s" ER_TRUNCATED_WRONG_VALUE 22007 eng "Truncated incorrect %-.32T value: '%-.128T'" ger "Falscher %-.32T-Wert gekürzt: '%-.128T'" jpn "不正な %-.32T の値が切り捨てられました。: '%-.128T'" por "Truncado errado %-.32T valor: '%-.128T'" - spa "Equivocado truncado %-.32T valor: '%-.128T'" + spa "Truncado incorrecto %-.32T valor: '%-.128T'" ER_TOO_MUCH_AUTO_TIMESTAMP_COLS eng "Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause" ger "Fehlerhafte Tabellendefinition. Es kann nur eine einzige TIMESTAMP-Spalte mit CURRENT_TIMESTAMP als DEFAULT oder in einer ON-UPDATE-Klausel geben" jpn "不正な表定義です。DEFAULT句またはON UPDATE句に CURRENT_TIMESTAMP をともなうTIMESTAMP型の列は1つまでです。" por "Incorreta definição de tabela; Pode ter somente uma coluna TIMESTAMP com CURRENT_TIMESTAMP em DEFAULT ou ON UPDATE cláusula" - spa "Incorrecta definición de tabla; Solamente debe haber una columna TIMESTAMP con CURRENT_TIMESTAMP en DEFAULT o ON UPDATE cláusula" + spa "Definición incorrecta de tabla; Solamente puede haber una columna TIMESTAMP con CURRENT_TIMESTAMP en DEFAULT o en cláusula ON UPDATE" ER_INVALID_ON_UPDATE eng "Invalid ON UPDATE clause for '%-.192s' column" ger "Ungültige ON-UPDATE-Klausel für Spalte '%-.192s'" jpn "列 '%-.192s' に ON UPDATE句は無効です。" por "Inválida cláusula ON UPDATE para campo '%-.192s'" - spa "Inválido ON UPDATE cláusula para campo '%-.192s'" + spa "Cláusula ON UPDATE inválida para la columna '%-.192s'" ER_UNSUPPORTED_PS eng "This command is not supported in the prepared statement protocol yet" ger "Dieser Befehl wird im Protokoll für vorbereitete Anweisungen noch nicht unterstützt" + spa "Este comando no se encuentra soportado para protocolo de sentencia preparada, aún" ER_GET_ERRMSG dan "Modtog fejl %d '%-.200s' fra %s" eng "Got error %d '%-.200s' from %s" @@ -5178,6 +5190,7 @@ ER_GET_ERRMSG jpn "エラー %d '%-.200s' が %s から返されました。" nor "Mottok feil %d '%-.200s' fa %s" norwegian-ny "Mottok feil %d '%-.200s' fra %s" + spa "Obtenido error %d '%-.200s' desde %s" ER_GET_TEMPORARY_ERRMSG dan "Modtog temporary fejl %d '%-.200s' fra %s" eng "Got temporary error %d '%-.200s' from %s" @@ -5185,192 +5198,245 @@ ER_GET_TEMPORARY_ERRMSG ger "Temporärer Fehler %d '%-.200s' von %s" nor "Mottok temporary feil %d '%-.200s' fra %s" norwegian-ny "Mottok temporary feil %d '%-.200s' fra %s" + spa "Obtenido error temporal %d '%-.200s' desde %s" ER_UNKNOWN_TIME_ZONE eng "Unknown or incorrect time zone: '%-.64s'" ger "Unbekannte oder falsche Zeitzone: '%-.64s'" + spa "Zona temporal desconocida o incorrecta: '%-.64s'" ER_WARN_INVALID_TIMESTAMP eng "Invalid TIMESTAMP value in column '%s' at row %lu" ger "Ungültiger TIMESTAMP-Wert in Feld '%s', Zeile %lu" + spa "Valor inválido de SELLO TEMPORAL (TIMESTAMP) en la columna '%s' de la fila %lu" ER_INVALID_CHARACTER_STRING eng "Invalid %s character string: '%.64T'" ger "Ungültiger %s-Zeichen-String: '%.64T'" + spa "Cadena de carácter %s inválida: '%.64T'" ER_WARN_ALLOWED_PACKET_OVERFLOWED eng "Result of %s() was larger than max_allowed_packet (%ld) - truncated" ger "Ergebnis von %s() war größer als max_allowed_packet (%ld) Bytes und wurde deshalb gekürzt" + spa "El resultado de %s() ha sido mayor que max_allowed_packet (%ld) - truncado" ER_CONFLICTING_DECLARATIONS eng "Conflicting declarations: '%s%s' and '%s%s'" ger "Widersprüchliche Deklarationen: '%s%s' und '%s%s'" + spa "Declaraciones conflictivas: '%s%s' y '%s%s'" ER_SP_NO_RECURSIVE_CREATE 2F003 eng "Can't create a %s from within another stored routine" ger "Kann kein %s innerhalb einer anderen gespeicherten Routine erzeugen" + spa "No puedo crear una %s desde dentro de otra rutina almacenada" ER_SP_ALREADY_EXISTS 42000 eng "%s %s already exists" ger "%s %s existiert bereits" hindi "%s %s पहले से ही मौजूद है" + spa "%s %s ya existe" ER_SP_DOES_NOT_EXIST 42000 eng "%s %s does not exist" ger "%s %s existiert nicht" hindi "%s %s मौजूद नहीं है" + spa "%s %s no existe" ER_SP_DROP_FAILED eng "Failed to DROP %s %s" ger "DROP %s %s ist fehlgeschlagen" hindi "%s %s को ड्रॉप करने में असफल रहे" + spa "No pude ELIMINAR (DROP) %s %s" ER_SP_STORE_FAILED eng "Failed to CREATE %s %s" ger "CREATE %s %s ist fehlgeschlagen" hindi "%s %s को बनाने में असफल रहे" + spa "No pude CREAR %s %s" ER_SP_LILABEL_MISMATCH 42000 eng "%s with no matching label: %s" ger "%s ohne passende Marke: %s" + spa "%s sin etiqueta coincidente: %s" ER_SP_LABEL_REDEFINE 42000 eng "Redefining label %s" ger "Neudefinition der Marke %s" + spa "Redefiniendo etiqueta %s" ER_SP_LABEL_MISMATCH 42000 eng "End-label %s without match" ger "Ende-Marke %s ohne zugehörigen Anfang" + spa "Etiqueta-Final %s sin coincidencia" ER_SP_UNINIT_VAR 01000 eng "Referring to uninitialized variable %s" ger "Zugriff auf nichtinitialisierte Variable %s" + spa "Refiriéndose a variable %s sin inicializar" ER_SP_BADSELECT 0A000 eng "PROCEDURE %s can't return a result set in the given context" ger "PROCEDURE %s kann im gegebenen Kontext keine Ergebnismenge zurückgeben" + spa "El PROCEDIMIENTO (PROCEDURE) %s no puede devolver un conjunto de resultados en el contexto dado" ER_SP_BADRETURN 42000 eng "RETURN is only allowed in a FUNCTION" ger "RETURN ist nur innerhalb einer FUNCTION erlaubt" hindi "RETURN को केवल FUNCTION में इस्तेमाल किया जा सकता है" + spa "RETURN sólo se permite dentro de una FUNCIÓN" ER_SP_BADSTATEMENT 0A000 eng "%s is not allowed in stored procedures" ger "%s ist in gespeicherten Prozeduren nicht erlaubt" hindi "%s को STORED PROCEDURE में इस्तेमाल नहीं किया जा सकता है" + spa "%s no permitido en procedimientos almacenados" ER_UPDATE_LOG_DEPRECATED_IGNORED 42000 eng "The update log is deprecated and replaced by the binary log; SET SQL_LOG_UPDATE has been ignored. This option will be removed in MariaDB 5.6" ger "Das Update-Log ist veraltet und wurde durch das Binär-Log ersetzt. SET SQL_LOG_UPDATE wird ignoriert. Diese Option wird in MariaDB 5.6 entfernt" + spa "El historial (log) de actualización se encuentra obsoleto y reemplazado por el historial binario; SET SQL_LOG_UPDATE ha sido ignorado. Esta opción será quitada en MariaDB 5.6" ER_UPDATE_LOG_DEPRECATED_TRANSLATED 42000 eng "The update log is deprecated and replaced by the binary log; SET SQL_LOG_UPDATE has been translated to SET SQL_LOG_BIN. This option will be removed in MariaDB 5.6" ger "Das Update-Log ist veraltet und wurde durch das Binär-Log ersetzt. SET SQL_LOG_UPDATE wurde in SET SQL_LOG_BIN übersetzt. Diese Option wird in MariaDB 5.6 entfernt" + spa "El historial (log) de actualización se encuentra obsoleto y reemplazado por el historial binario; SET SQL_LOG_UPDATE ha sido traducido a SET SQL_LOG_BIN. Esta opción será quitada en MariaDB 5.6" ER_QUERY_INTERRUPTED 70100 eng "Query execution was interrupted" ger "Ausführung der Abfrage wurde unterbrochen" + spa "Se ha interrumpido la ejecución de la consulta (query)" ER_SP_WRONG_NO_OF_ARGS 42000 eng "Incorrect number of arguments for %s %s; expected %u, got %u" ger "Falsche Anzahl von Argumenten für %s %s; erwarte %u, erhalte %u" + spa "Número incorrecto de argumentos para %s %s; se esperaba %u, se obtuvo %u" ER_SP_COND_MISMATCH 42000 eng "Undefined CONDITION: %s" ger "Undefinierte CONDITION: %s" + spa "CONDICIÓN no definida: %s" ER_SP_NORETURN 42000 eng "No RETURN found in FUNCTION %s" ger "Kein RETURN in FUNCTION %s gefunden" hindi "FUNCTION %s में कोई RETURN है" + spa "No se hallado RETURN en FUNCIÓN %s" ER_SP_NORETURNEND 2F005 eng "FUNCTION %s ended without RETURN" ger "FUNCTION %s endete ohne RETURN" hindi "FUNCTION %s RETURN के बिना समाप्त हो गया" + spa "La FUNCIÓN %s termina sin RETURN" ER_SP_BAD_CURSOR_QUERY 42000 eng "Cursor statement must be a SELECT" ger "Cursor-Anweisung muss ein SELECT sein" + spa "La sentencia de cursor debe de ser un SELECT" ER_SP_BAD_CURSOR_SELECT 42000 eng "Cursor SELECT must not have INTO" ger "Cursor-SELECT darf kein INTO haben" + spa "El SELECT de cursor no debe de tener INTO" ER_SP_CURSOR_MISMATCH 42000 eng "Undefined CURSOR: %s" ger "Undefinierter CURSOR: %s" hindi "CURSOR %s अपरिभाषित है" + spa "CURSOR indefinido: %s" ER_SP_CURSOR_ALREADY_OPEN 24000 eng "Cursor is already open" ger "Cursor ist schon geöffnet" hindi "CURSOR पहले से ही खुला है" + spa "Cursor ya abierto" ER_SP_CURSOR_NOT_OPEN 24000 eng "Cursor is not open" ger "Cursor ist nicht geöffnet" + spa "Cursor no abierto" ER_SP_UNDECLARED_VAR 42000 eng "Undeclared variable: %s" ger "Nicht deklarierte Variable: %s" + spa "Variable sin declarar: %s" ER_SP_WRONG_NO_OF_FETCH_ARGS eng "Incorrect number of FETCH variables" ger "Falsche Anzahl von FETCH-Variablen" + spa "Incorrecto número de variables FETCH" ER_SP_FETCH_NO_DATA 02000 eng "No data - zero rows fetched, selected, or processed" ger "Keine Daten - null Zeilen geholt (fetch), ausgewählt oder verarbeitet" + spa "No hay datos - cero filas logradas, seleccionadas o procesadas" ER_SP_DUP_PARAM 42000 eng "Duplicate parameter: %s" ger "Doppelter Parameter: %s" + spa "Parámetro duplicado: %s" ER_SP_DUP_VAR 42000 eng "Duplicate variable: %s" ger "Doppelte Variable: %s" + spa "Variable duplicada: %s" ER_SP_DUP_COND 42000 eng "Duplicate condition: %s" ger "Doppelte Bedingung: %s" + spa "Condición duplicada: %s" ER_SP_DUP_CURS 42000 eng "Duplicate cursor: %s" ger "Doppelter Cursor: %s" + spa "Cursor duplicado: %s" ER_SP_CANT_ALTER eng "Failed to ALTER %s %s" ger "ALTER %s %s fehlgeschlagen" hindi "%s %s को ALTER करने में असफल रहे" + spa "Fallo en ALTER %s %s" ER_SP_SUBSELECT_NYI 0A000 eng "Subquery value not supported" ger "Subquery-Wert wird nicht unterstützt" + spa "Valor de Subconsulta (subquery) no soportado" ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG 0A000 eng "%s is not allowed in stored function or trigger" ger "%s ist in gespeicherten Funktionen und in Triggern nicht erlaubt" + spa "%s no permitido en función almacenada o en disparador" ER_SP_VARCOND_AFTER_CURSHNDLR 42000 eng "Variable or condition declaration after cursor or handler declaration" ger "Deklaration einer Variablen oder einer Bedingung nach der Deklaration eines Cursors oder eines Handlers" + spa "Declaración de variable o condición tras declaración de cursor o manejador" ER_SP_CURSOR_AFTER_HANDLER 42000 eng "Cursor declaration after handler declaration" ger "Deklaration eines Cursors nach der Deklaration eines Handlers" + spa "Declaración de cursor tras declaración de manejador" ER_SP_CASE_NOT_FOUND 20000 eng "Case not found for CASE statement" ger "Fall für CASE-Anweisung nicht gefunden" + spa "Caso no hallado para sentencia CASE" ER_FPARSER_TOO_BIG_FILE eng "Configuration file '%-.192s' is too big" ger "Konfigurationsdatei '%-.192s' ist zu groß" rus "Слишком большой конфигурационный файл '%-.192s'" + spa "El fichero de configuración '%-.192s' es demasiado grande" ukr "Занадто великий конфігураційний файл '%-.192s'" ER_FPARSER_BAD_HEADER eng "Malformed file type header in file '%-.192s'" ger "Nicht wohlgeformter Dateityp-Header in Datei '%-.192s'" rus "Неверный заголовок типа файла '%-.192s'" + spa "Cabecera malformada de tipo de fichero en fichero '%-.192s'" ukr "Невірний заголовок типу у файлі '%-.192s'" ER_FPARSER_EOF_IN_COMMENT eng "Unexpected end of file while parsing comment '%-.200s'" ger "Unerwartetes Dateiende beim Parsen des Kommentars '%-.200s'" rus "Неожиданный конец файла в коментарии '%-.200s'" + spa "Inesperado fin de fichero mientras se analizaba comentario '%-.200s'" ukr "Несподіванний кінець файлу у коментарі '%-.200s'" ER_FPARSER_ERROR_IN_PARAMETER eng "Error while parsing parameter '%-.192s' (line: '%-.192s')" ger "Fehler beim Parsen des Parameters '%-.192s' (Zeile: '%-.192s')" rus "Ошибка при распознавании параметра '%-.192s' (строка: '%-.192s')" + spa "Error mientras se analizaba parámetro '%-.192s' (línea: '%-.192s')" ukr "Помилка в роспізнаванні параметру '%-.192s' (рядок: '%-.192s')" ER_FPARSER_EOF_IN_UNKNOWN_PARAMETER eng "Unexpected end of file while skipping unknown parameter '%-.192s'" ger "Unerwartetes Dateiende beim Überspringen des unbekannten Parameters '%-.192s'" rus "Неожиданный конец файла при пропуске неизвестного параметра '%-.192s'" + spa "Inesperado fin de fichero mientras se saltaba parámetro desconocido '%-.192s'" ukr "Несподіванний кінець файлу у спробі проминути невідомий параметр '%-.192s'" ER_VIEW_NO_EXPLAIN eng "ANALYZE/EXPLAIN/SHOW can not be issued; lacking privileges for underlying table" ger "ANALYZE/EXPLAIN/SHOW kann nicht verlangt werden. Rechte für zugrunde liegende Tabelle fehlen" rus "ANALYZE/EXPLAIN/SHOW не может быть выполнено; недостаточно прав на таблицы запроса" + spa "ANALYZE/EXPLAIN/SHOW no puede ser emitdo; privilegios insuficientes para tabla subyacente" ukr "ANALYZE/EXPLAIN/SHOW не може бути виконано; немає прав на таблиці запиту" ER_FRM_UNKNOWN_TYPE eng "File '%-.192s' has unknown type '%-.64s' in its header" ger "Datei '%-.192s' hat unbekannten Typ '%-.64s' im Header" rus "Файл '%-.192s' содержит неизвестный тип '%-.64s' в заголовке" + spa "El fichero '%-.192s' es de un tipo desconocido '%-.64s' en su cabecera" ukr "Файл '%-.192s' має невідомий тип '%-.64s' у заголовку" ER_WRONG_OBJECT eng "'%-.192s.%-.192s' is not of type '%s'" ger "'%-.192s.%-.192s' ist nicht %s" rus "'%-.192s.%-.192s' - не %s" + spa "'%-.192s.%-.192s' no es %s" ukr "'%-.192s.%-.192s' не є %s" ER_NONUPDATEABLE_COLUMN eng "Column '%-.192s' is not updatable" ger "Feld '%-.192s' ist nicht aktualisierbar" rus "Столбец '%-.192s' не обновляемый" + spa "La columna '%-.192s' no es actualiable" ukr "Стовбець '%-.192s' не може бути зминений" ER_VIEW_SELECT_DERIVED eng "View's SELECT contains a subquery in the FROM clause" ger "SELECT der View enthält eine Subquery in der FROM-Klausel" rus "View SELECT содержит подзапрос в конструкции FROM" + spa "El SELECT de la vista contiene una subconsulta (subquery) en la cláusula FROM" ukr "View SELECT має підзапит у конструкції FROM" # Not used any more, syntax error is returned instead @@ -5378,799 +5444,1035 @@ ER_VIEW_SELECT_CLAUSE eng "View's SELECT contains a '%s' clause" ger "SELECT der View enthält eine '%s'-Klausel" rus "View SELECT содержит конструкцию '%s'" + spa "El SELECT de la vista contiene una cláusula '%s'" ukr "View SELECT має конструкцію '%s'" ER_VIEW_SELECT_VARIABLE eng "View's SELECT contains a variable or parameter" ger "SELECT der View enthält eine Variable oder einen Parameter" rus "View SELECT содержит переменную или параметр" + spa "El SELECT de la vista contiene una variable o un parámetro" ukr "View SELECT має зминну або параметер" ER_VIEW_SELECT_TMPTABLE eng "View's SELECT refers to a temporary table '%-.192s'" ger "SELECT der View verweist auf eine temporäre Tabelle '%-.192s'" rus "View SELECT содержит ссылку на временную таблицу '%-.192s'" + spa "El SELECT de la vista se refiere a una tabla temporal '%-.192s'" ukr "View SELECT використовує тимчасову таблицю '%-.192s'" ER_VIEW_WRONG_LIST eng "View's SELECT and view's field list have different column counts" ger "SELECT- und Feldliste der Views haben unterschiedliche Anzahlen von Spalten" rus "View SELECT и список полей view имеют разное количество столбцов" + spa "El SELECT de la vista y la lista de campos de la vista tienen un contador diferente de columnas" ukr "View SELECT і перелік стовбців view мають різну кількість сковбців" ER_WARN_VIEW_MERGE eng "View merge algorithm can't be used here for now (assumed undefined algorithm)" ger "View-Merge-Algorithmus kann hier momentan nicht verwendet werden (undefinierter Algorithmus wird angenommen)" rus "Алгоритм слияния view не может быть использован сейчас (алгоритм будет неопеределенным)" + spa "El algoritmo de fusión de la vista no se puede usar aquí por ahora (se asume algoritmo indefinido)" ukr "Алгоритм зливання view не може бути використаний зараз (алгоритм буде невизначений)" ER_WARN_VIEW_WITHOUT_KEY eng "View being updated does not have complete key of underlying table in it" ger "Die aktualisierte View enthält nicht den vollständigen Schlüssel der zugrunde liegenden Tabelle" rus "Обновляемый view не содержит ключа использованных(ой) в нем таблиц(ы)" + spa "La vista que se está actualizando no tiene clave completa de la tabla subyacente que contiene" ukr "View, що оновлюеться, не містить повного ключа таблиці(ь), що викорістана в ньюому" ER_VIEW_INVALID eng "View '%-.192s.%-.192s' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them" + spa "La vista '%-.192s.%-.192s' hace referencia a tabla(s) invalida(s)) o columna(s) o funcion(es) o definidor/invocador de vista le faltan derechos para usarlos" ER_SP_NO_DROP_SP eng "Can't drop or alter a %s from within another stored routine" ger "Kann eine %s nicht von innerhalb einer anderen gespeicherten Routine löschen oder ändern" + spa "No puedo eliminar o alterar una %s desde dentro de otra rutina almacenada" ER_SP_GOTO_IN_HNDLR eng "GOTO is not allowed in a stored procedure handler" ger "GOTO ist im Handler einer gespeicherten Prozedur nicht erlaubt" + spa "GOTO no permitido en manejador de procedimiento almacenado" ER_TRG_ALREADY_EXISTS eng "Trigger '%s' already exists" ger "Trigger '%s' existiert bereits" hindi "TRIGGER '%s' पहले से मौजूद है" + spa "Ya existe el disparador '%s'" ER_TRG_DOES_NOT_EXIST eng "Trigger does not exist" ger "Trigger existiert nicht" hindi "TRIGGER मौजूद नहीं है" + spa "El disparador no existe" ER_TRG_ON_VIEW_OR_TEMP_TABLE eng "Trigger's '%-.192s' is view or temporary table" ger "'%-.192s' des Triggers ist View oder temporäre Tabelle" + spa "El disparador '%-.192s' es una vista o tabla temporal" ER_TRG_CANT_CHANGE_ROW eng "Updating of %s row is not allowed in %strigger" ger "Aktualisieren einer %s-Zeile ist in einem %s-Trigger nicht erlaubt" + spa "Actualizar la fila %s no está permitido en disparador %s" ER_TRG_NO_SUCH_ROW_IN_TRG eng "There is no %s row in %s trigger" ger "Es gibt keine %s-Zeile im %s-Trigger" + spa "No hay fila %s en disparador %s" ER_NO_DEFAULT_FOR_FIELD eng "Field '%-.192s' doesn't have a default value" ger "Feld '%-.192s' hat keinen Vorgabewert" + spa "El campo '%-.192s' no tiene un valor por defecto" ER_DIVISION_BY_ZERO 22012 eng "Division by 0" ger "Division durch 0" hindi "0 से विभाजन" + spa "División por 0" ER_TRUNCATED_WRONG_VALUE_FOR_FIELD 22007 eng "Incorrect %-.32s value: '%-.128T' for column `%.192s`.`%.192s`.`%.192s` at row %lu" ger "Falscher %-.32s-Wert: '%-.128T' für Feld '`%.192s`.`%.192s`.`%.192s` in Zeile %lu" + spa "Incorrecto %-.32s valor: '%-.128T' para columna `%.192s`.`%.192s`.`%.192s` en la fila %lu" ER_ILLEGAL_VALUE_FOR_TYPE 22007 eng "Illegal %s '%-.192T' value found during parsing" ger "Nicht zulässiger %s-Wert '%-.192T' beim Parsen gefunden" + spa "Hallado valor ilegal %s '%-.192T' durante el análisi" ER_VIEW_NONUPD_CHECK eng "CHECK OPTION on non-updatable view %`-.192s.%`-.192s" ger "CHECK OPTION auf nicht-aktualisierbarem View %`-.192s.%`-.192s" rus "CHECK OPTION для необновляемого VIEW %`-.192s.%`-.192s" + spa "CHECK OPTION en vista no actualizable %`-.192s.%`-.192s" ukr "CHECK OPTION для VIEW %`-.192s.%`-.192s що не може бути оновленним" ER_VIEW_CHECK_FAILED 44000 eng "CHECK OPTION failed %`-.192s.%`-.192s" ger "CHECK OPTION fehlgeschlagen: %`-.192s.%`-.192s" rus "Проверка CHECK OPTION для VIEW %`-.192s.%`-.192s провалилась" + spa "CHECK OPTION falló %`-.192s.%`-.192s" ukr "Перевірка CHECK OPTION для VIEW %`-.192s.%`-.192s не пройшла" ER_PROCACCESS_DENIED_ERROR 42000 eng "%-.32s command denied to user '%s'@'%s' for routine '%-.192s'" ger "Befehl %-.32s nicht zulässig für Benutzer '%s'@'%s' in Routine '%-.192s'" + spa "Comando %-.32s denegado para el usuario '%s'@'%s' para rutina '%-.192s'" ER_RELAY_LOG_FAIL eng "Failed purging old relay logs: %s" ger "Bereinigen alter Relais-Logs fehlgeschlagen: %s" + spa "Falló la purga de viejos historiales (logs) de reenvío: %s" ER_PASSWD_LENGTH eng "Password hash should be a %d-digit hexadecimal number" ger "Passwort-Hash sollte eine Hexdaezimalzahl mit %d Stellen sein" + spa "El valor calculado de la contraseña debería de ser un número hexadecimal de %d-dígitos" ER_UNKNOWN_TARGET_BINLOG eng "Target log not found in binlog index" ger "Ziel-Log im Binlog-Index nicht gefunden" + spa "Historial (log) de destino no hallado en índice binlog" ER_IO_ERR_LOG_INDEX_READ eng "I/O error reading log index file" ger "Fehler beim Lesen der Log-Index-Datei" + spa "Error de E/S leyendo fichero índice de historial (log)" ER_BINLOG_PURGE_PROHIBITED eng "Server configuration does not permit binlog purge" ger "Server-Konfiguration erlaubt keine Binlog-Bereinigung" + spa "La configuración del servidor no permite purgar binlog" ER_FSEEK_FAIL eng "Failed on fseek()" ger "fseek() fehlgeschlagen" hindi "fseek() विफल रहा" + spa "Fallo en fseek()" ER_BINLOG_PURGE_FATAL_ERR eng "Fatal error during log purge" ger "Schwerwiegender Fehler bei der Log-Bereinigung" + spa "Error fatal durante la purga del historial (log)" ER_LOG_IN_USE eng "A purgeable log is in use, will not purge" ger "Ein zu bereinigendes Log wird gerade benutzt, daher keine Bereinigung" + spa "Se encuentra en uso un historial purgable, no lo purgaré" ER_LOG_PURGE_UNKNOWN_ERR eng "Unknown error during log purge" ger "Unbekannter Fehler bei Log-Bereinigung" + spa "Error desconocido durante la purga del historial (log)" ER_RELAY_LOG_INIT eng "Failed initializing relay log position: %s" ger "Initialisierung der Relais-Log-Position fehlgeschlagen: %s" + spa "Fallo inicializando la posición del historial de reenvío: %s" ER_NO_BINARY_LOGGING eng "You are not using binary logging" ger "Sie verwenden keine Binärlogs" + spa "No estás usando historial (log) binario" ER_RESERVED_SYNTAX eng "The '%-.64s' syntax is reserved for purposes internal to the MariaDB server" ger "Die Schreibweise '%-.64s' ist für interne Zwecke des MariaDB-Servers reserviert" + spa "La sintaxis '%-.64s' está reservada para propósitos internos del servidor MariaDB" ER_WSAS_FAILED eng "WSAStartup Failed" ger "WSAStartup fehlgeschlagen" + spa "Falló WSAStartup" ER_DIFF_GROUPS_PROC eng "Can't handle procedures with different groups yet" ger "Kann Prozeduren mit unterschiedlichen Gruppen noch nicht verarbeiten" + spa "No puedo manejar procedimientos con grupos diferentes, aún" ER_NO_GROUP_FOR_PROC eng "Select must have a group with this procedure" ger "SELECT muss bei dieser Prozedur ein GROUP BY haben" + spa "La selección debe de tener un grupo con este procedimiento" ER_ORDER_WITH_PROC eng "Can't use ORDER clause with this procedure" ger "Kann bei dieser Prozedur keine ORDER-BY-Klausel verwenden" + spa "No puedo usar la cláusula ORDER con este procedimiento" ER_LOGGING_PROHIBIT_CHANGING_OF eng "Binary logging and replication forbid changing the global server %s" ger "Binärlogs und Replikation verhindern Wechsel des globalen Servers %s" + spa "El historial (log) binario y la réplica prohibe cambiar el servidor global %s" ER_NO_FILE_MAPPING eng "Can't map file: %-.200s, errno: %M" ger "Kann Datei nicht abbilden: %-.200s, Fehler: %M" + spa "No puedo mapear fichero: %-.200s, error: %M" ER_WRONG_MAGIC eng "Wrong magic in %-.64s" ger "Falsche magische Zahlen in %-.64s" + spa "Magia equivocada en %-.64s" ER_PS_MANY_PARAM eng "Prepared statement contains too many placeholders" ger "Vorbereitete Anweisung enthält zu viele Platzhalter" + spa "Sentencia preparada contiene demasiados marcadores de posición" ER_KEY_PART_0 eng "Key part '%-.192s' length cannot be 0" ger "Länge des Schlüsselteils '%-.192s' kann nicht 0 sein" + spa "El tamaño de trozo de clave '%-.192s' no puede ser 0" ER_VIEW_CHECKSUM eng "View text checksum failed" ger "View-Text-Prüfsumme fehlgeschlagen" rus "Проверка контрольной суммы текста VIEW провалилась" + spa "Ha fallado la suma de comprobación del texto de la vista" ukr "Перевірка контрольної суми тексту VIEW не пройшла" ER_VIEW_MULTIUPDATE eng "Can not modify more than one base table through a join view '%-.192s.%-.192s'" ger "Kann nicht mehr als eine Basistabelle über Join-View '%-.192s.%-.192s' ändern" rus "Нельзя изменить больше чем одну базовую таблицу используя многотабличный VIEW '%-.192s.%-.192s'" + spa "No puedo modificar más de una tabla base a través de una vista de unión '%-.192s.%-.192s'" ukr "Неможливо оновити більш ниж одну базову таблицю выкористовуючи VIEW '%-.192s.%-.192s', що містіть декілька таблиць" ER_VIEW_NO_INSERT_FIELD_LIST eng "Can not insert into join view '%-.192s.%-.192s' without fields list" ger "Kann nicht ohne Feldliste in Join-View '%-.192s.%-.192s' einfügen" rus "Нельзя вставлять записи в многотабличный VIEW '%-.192s.%-.192s' без списка полей" + spa "No puedo insertar dentro de vista de unión '%-.192s.%-.192s' sin lista de campos" ukr "Неможливо уставити рядки у VIEW '%-.192s.%-.192s', що містить декілька таблиць, без списку стовбців" ER_VIEW_DELETE_MERGE_VIEW eng "Can not delete from join view '%-.192s.%-.192s'" ger "Kann nicht aus Join-View '%-.192s.%-.192s' löschen" rus "Нельзя удалять из многотабличного VIEW '%-.192s.%-.192s'" + spa "No puedo borrar desde vista de unión '%-.192s.%-.192s'" ukr "Неможливо видалити рядки у VIEW '%-.192s.%-.192s', що містить декілька таблиць" ER_CANNOT_USER eng "Operation %s failed for %.256s" ger "Operation %s schlug fehl für %.256s" norwegian-ny "Operation %s failed for '%.256s'" + spa "Ha fallado la operación %s para %.256s" ER_XAER_NOTA XAE04 eng "XAER_NOTA: Unknown XID" ger "XAER_NOTA: Unbekannte XID" + spa "XAER_NOTA: XID desconocido" ER_XAER_INVAL XAE05 eng "XAER_INVAL: Invalid arguments (or unsupported command)" ger "XAER_INVAL: Ungültige Argumente (oder nicht unterstützter Befehl)" + spa "XAER_INVAL: Argumentos inválidos (o comando no soportado)" ER_XAER_RMFAIL XAE07 eng "XAER_RMFAIL: The command cannot be executed when global transaction is in the %.64s state" ger "XAER_RMFAIL: DEr Befehl kann nicht ausgeführt werden, wenn die globale Transaktion im Zustand %.64s ist" rus "XAER_RMFAIL: эту команду нельзя выполнять когда глобальная транзакция находится в состоянии '%.64s'" + spa "XAER_RMFAIL: El comando no se puede ejecutar cuando la transacción global se encuentra en estado %.64s" ER_XAER_OUTSIDE XAE09 eng "XAER_OUTSIDE: Some work is done outside global transaction" ger "XAER_OUTSIDE: Einige Arbeiten werden außerhalb der globalen Transaktion verrichtet" + spa "XAER_OUTSIDE: Algún trabajo se ha realizado fuera de la transacción global" ER_XAER_RMERR XAE03 eng "XAER_RMERR: Fatal error occurred in the transaction branch - check your data for consistency" ger "XAER_RMERR: Schwerwiegender Fehler im Transaktionszweig - prüfen Sie Ihre Daten auf Konsistenz" + spa "XAER_RMERR: Ha ocurrido un error fatal en la rama de la transacción - revisa la consitencia de tus datos" ER_XA_RBROLLBACK XA100 eng "XA_RBROLLBACK: Transaction branch was rolled back" ger "XA_RBROLLBACK: Transaktionszweig wurde zurückgerollt" + spa "XA_RBROLLBACK: La rama de la transacción ha sido retrocedida (rolled back)" ER_NONEXISTING_PROC_GRANT 42000 eng "There is no such grant defined for user '%-.48s' on host '%-.64s' on routine '%-.192s'" ger "Es gibt diese Berechtigung für Benutzer '%-.48s' auf Host '%-.64s' für Routine '%-.192s' nicht" + spa "No existe tal concesión definida para el usuario '%-.48s' en equipo '%-.64s' en rutina '%-.192s'" ER_PROC_AUTO_GRANT_FAIL eng "Failed to grant EXECUTE and ALTER ROUTINE privileges" ger "Gewährung von EXECUTE- und ALTER-ROUTINE-Rechten fehlgeschlagen" + spa "Fallo al conceder privilegios de EXECUTE y ALTER ROUTINE" ER_PROC_AUTO_REVOKE_FAIL eng "Failed to revoke all privileges to dropped routine" ger "Rücknahme aller Rechte für die gelöschte Routine fehlgeschlagen" + spa "Fallo al rescindir todos los privilegios de la rutina anulada" ER_DATA_TOO_LONG 22001 eng "Data too long for column '%s' at row %lu" ger "Daten zu lang für Feld '%s' in Zeile %lu" + spa "Datos demasiado largos para la columna '%s' en la fila %lu" ER_SP_BAD_SQLSTATE 42000 eng "Bad SQLSTATE: '%s'" ger "Ungültiger SQLSTATE: '%s'" + spa "Mal SQLSTATE: '%s'" ER_STARTUP eng "%s: ready for connections.\nVersion: '%s' socket: '%s' port: %d %s" ger "%s: bereit für Verbindungen.\nVersion: '%s' Socket: '%s' Port: %d %s" + spa "%s: preparada para conexiones.\nVersión: '%s' conector: '%s' puerto: %d %s" ER_LOAD_FROM_FIXED_SIZE_ROWS_TO_VAR eng "Can't load value from file with fixed size rows to variable" ger "Kann Wert aus Datei mit Zeilen fester Größe nicht in Variable laden" + spa "No puedo cargar valor desde fichero con filas de tamaño en variable" ER_CANT_CREATE_USER_WITH_GRANT 42000 eng "You are not allowed to create a user with GRANT" ger "Sie dürfen keinen Benutzer mit GRANT anlegen" + spa "No estás autorizado a crear un usuario con GRANT" ER_WRONG_VALUE_FOR_TYPE eng "Incorrect %-.32s value: '%-.128T' for function %-.32s" ger "Falscher %-.32s-Wert: '%-.128T' für Funktion %-.32s" + spa "Incorrecto %-.32s valor: '%-.128T' para la función %-.32s" ER_TABLE_DEF_CHANGED eng "Table definition has changed, please retry transaction" ger "Tabellendefinition wurde geändert, bitte starten Sie die Transaktion neu" + spa "Ha cambiado la definición de la tabla, por favor reintente la transacción" ER_SP_DUP_HANDLER 42000 eng "Duplicate handler declared in the same block" ger "Doppelter Handler im selben Block deklariert" + spa "Manejador duplicado declarado en mismo bloque" ER_SP_NOT_VAR_ARG 42000 eng "OUT or INOUT argument %d for routine %s is not a variable or NEW pseudo-variable in BEFORE trigger" ger "OUT- oder INOUT-Argument %d für Routine %s ist keine Variable" + spa "El argumento %d OUT o INOUT para la rutina %s no es una variable o pseudo-variable NEW en disparador BEFORE" ER_SP_NO_RETSET 0A000 eng "Not allowed to return a result set from a %s" ger "Rückgabe einer Ergebnismenge aus einer %s ist nicht erlaubt" + spa "No autorizado a devolver un conjunto de resultados desde un %s" ER_CANT_CREATE_GEOMETRY_OBJECT 22003 eng "Cannot get geometry object from data you send to the GEOMETRY field" ger "Kann kein Geometrieobjekt aus den Daten machen, die Sie dem GEOMETRY-Feld übergeben haben" + spa "No puedo obtener objeto de geometría desde los datos que envías al campo GEOMETRY" ER_FAILED_ROUTINE_BREAK_BINLOG eng "A routine failed and has neither NO SQL nor READS SQL DATA in its declaration and binary logging is enabled; if non-transactional tables were updated, the binary log will miss their changes" ger "Eine Routine, die weder NO SQL noch READS SQL DATA in der Deklaration hat, schlug fehl und Binärlogging ist aktiv. Wenn Nicht-Transaktions-Tabellen aktualisiert wurden, enthält das Binärlog ihre Änderungen nicht" + spa "Ha fallado una rutina y no tiene ni NO SQL ni READS SQL DATA en su declaración y el historial (log) binario se encuentra activado; si han sido actualizadas tablas no transaccionales, el fichero binario de historial (log) perderá sus cambios" ER_BINLOG_UNSAFE_ROUTINE eng "This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable)" ger "Diese Routine hat weder DETERMINISTIC, NO SQL noch READS SQL DATA in der Deklaration und Binärlogging ist aktiv (*vielleicht* sollten Sie die weniger sichere Variable log_bin_trust_function_creators verwenden)" + spa "Esta función no tiene nada de DETERMINISTIC, NO SQL, o READS SQL DATA en su declaración y está activado el historial binario (*podrías* querer usar la variable menos segura log_bin_trust_function_creators)" ER_BINLOG_CREATE_ROUTINE_NEED_SUPER eng "You do not have the SUPER privilege and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable)" ger "Sie haben keine SUPER-Berechtigung und Binärlogging ist aktiv (*vielleicht* sollten Sie die weniger sichere Variable log_bin_trust_function_creators verwenden)" + spa "No tienes en privilegio SUPER y está activado el historial binario (*podrías* querer usar la vriable menos segura log_bin_trust_function_creators)" ER_EXEC_STMT_WITH_OPEN_CURSOR eng "You can't execute a prepared statement which has an open cursor associated with it. Reset the statement to re-execute it" ger "Sie können keine vorbereitete Anweisung ausführen, die mit einem geöffneten Cursor verknüpft ist. Setzen Sie die Anweisung zurück, um sie neu auszuführen" + spa "No puedes ejecutar una sentencia preparada que tiene abierto un cursor asociado con ella. Renueva la sentencia para re-ejecutarla" ER_STMT_HAS_NO_OPEN_CURSOR eng "The statement (%lu) has no open cursor" ger "Die Anweisung (%lu) hat keinen geöffneten Cursor" + spa "La sentencia (%lu) no tiene cursor abierto" ER_COMMIT_NOT_ALLOWED_IN_SF_OR_TRG eng "Explicit or implicit commit is not allowed in stored function or trigger" ger "Explizites oder implizites Commit ist in gespeicherten Funktionen und in Triggern nicht erlaubt" + spa "Comisión (commit) implícita o explícita no permitida en funciones almacenadas o en disparadores" ER_NO_DEFAULT_FOR_VIEW_FIELD eng "Field of view '%-.192s.%-.192s' underlying table doesn't have a default value" ger "Ein Feld der dem View '%-.192s.%-.192s' zugrundeliegenden Tabelle hat keinen Vorgabewert" + spa "El campo de tabla subyacente de vista '%-.192s.%-.192s' no tiene valor por defecto" ER_SP_NO_RECURSION eng "Recursive stored functions and triggers are not allowed" ger "Rekursive gespeicherte Routinen und Triggers sind nicht erlaubt" + spa "No autorizadas funciones almacenadas recursivas ni disparadores" ER_TOO_BIG_SCALE 42000 S1009 eng "Too big scale %llu specified for '%-.192s'. Maximum is %u" ger "Zu großer Skalierungsfaktor %llu für '%-.192s' angegeben. Maximum ist %u" + spa "Escala demasiado grande %llu especificada para '%-.192s'. El máximo es de %u" ER_TOO_BIG_PRECISION 42000 S1009 eng "Too big precision %llu specified for '%-.192s'. Maximum is %u" ger "Zu große Genauigkeit %llu für '%-.192s' angegeben. Maximum ist %u" + spa "Precisión demasiado grande %llu especificada para '%-.192s'. El máximo es de %u" ER_M_BIGGER_THAN_D 42000 S1009 eng "For float(M,D), double(M,D) or decimal(M,D), M must be >= D (column '%-.192s')" ger "Für FLOAT(M,D), DOUBLE(M,D) oder DECIMAL(M,D) muss M >= D sein (Feld '%-.192s')" + spa "Para flotante(M,D), doble(M,D) o decimal(M,D), M debe de ser >= D (columna '%-.192s')" ER_WRONG_LOCK_OF_SYSTEM_TABLE eng "You can't combine write-locking of system tables with other tables or lock types" - ger "Sie können Schreibsperren auf der Systemtabelle nicht mit anderen Tabellen kombinieren" + ger "Sie können Schreibsperren auf der Systemtabelle nicht mit anderen Tabellen kombinieren" + spa "No puedes combinar bloqueo de escritura de tablas de sistema con otras tablas o tipos de bloqueo" ER_CONNECT_TO_FOREIGN_DATA_SOURCE eng "Unable to connect to foreign data source: %.64s" ger "Kann nicht mit Fremddatenquelle verbinden: %.64s" + spa "No puedo conectar a fuente foránea de datos: %.64s" ER_QUERY_ON_FOREIGN_DATA_SOURCE eng "There was a problem processing the query on the foreign data source. Data source error: %-.64s" ger "Bei der Verarbeitung der Abfrage ist in der Fremddatenquelle ein Problem aufgetreten. Datenquellenfehlermeldung: %-.64s" + spa "Hubo un problema procesando la consulta (query) en la fuente foránea de datos. Error de fuente de datos: %-.64s" ER_FOREIGN_DATA_SOURCE_DOESNT_EXIST eng "The foreign data source you are trying to reference does not exist. Data source error: %-.64s" ger "Die Fremddatenquelle, auf die Sie zugreifen wollen, existiert nicht. Datenquellenfehlermeldung: %-.64s" + spa "La fuente foránea de datos que intentas referenciar no existe. Error en fuente de datos: %-.64s" ER_FOREIGN_DATA_STRING_INVALID_CANT_CREATE eng "Can't create federated table. The data source connection string '%-.64s' is not in the correct format" ger "Kann föderierte Tabelle nicht erzeugen. Der Datenquellen-Verbindungsstring '%-.64s' hat kein korrektes Format" + spa "No puedo crear tabla federada. La cadena de conexión de la fuente de datos '%-.64s' no tiene el formato correcto" ER_FOREIGN_DATA_STRING_INVALID eng "The data source connection string '%-.64s' is not in the correct format" ger "Der Datenquellen-Verbindungsstring '%-.64s' hat kein korrektes Format" + spa "La cadena de conexón de la fuente de datos '%-.64s' no tiene el formato correcto" ER_CANT_CREATE_FEDERATED_TABLE eng "Can't create federated table. Foreign data src error: %-.64s" ger "Kann föderierte Tabelle nicht erzeugen. Fremddatenquellenfehlermeldung: %-.64s" + spa "No puedo crear tabla federada. Error en fuente de datos foráneos: %-.64s" ER_TRG_IN_WRONG_SCHEMA eng "Trigger in wrong schema" ger "Trigger im falschen Schema" + spa "Disparador en esquema equivocado" ER_STACK_OVERRUN_NEED_MORE eng "Thread stack overrun: %ld bytes used of a %ld byte stack, and %ld bytes needed. Consider increasing the thread_stack system variable." ger "Thread-Stack-Überlauf: %ld Bytes eines %ld-Byte-Stacks in Verwendung, und %ld Bytes benötigt. Verwenden Sie 'mariadbd --thread_stack=#', um einen größeren Stack anzugeben" jpn "スレッドスタック不足です(使用: %ld ; サイズ: %ld ; 要求: %ld)。より大きい値で 'mariadbd --thread_stack=#' の指定をしてください。" + spa "Desbordamiento en pila de hilos (threads): %ld bytes usados de una pila de %ld y son necesarios %ld bytes. Considera el incrementar la variable de sistema --thread_stack=#." ER_TOO_LONG_BODY 42000 S1009 eng "Routine body for '%-.100s' is too long" ger "Routinen-Body für '%-.100s' ist zu lang" + spa "El cuerpo de rutina para '%-.100s' es demasiado largo" ER_WARN_CANT_DROP_DEFAULT_KEYCACHE eng "Cannot drop default keycache" ger "Der vorgabemäßige Schlüssel-Cache kann nicht gelöscht werden" + spa "No puedo eliminar keycache por defecto" ER_TOO_BIG_DISPLAYWIDTH 42000 S1009 eng "Display width out of range for '%-.192s' (max = %lu)" ger "Anzeigebreite außerhalb des zulässigen Bereichs für '%-.192s' (Maximum = %lu)" + spa "Ancho a mostrar fuera de rango para '%-.192s' (máx = %lu)" ER_XAER_DUPID XAE08 eng "XAER_DUPID: The XID already exists" ger "XAER_DUPID: Die XID existiert bereits" + spa "XAER_DUPID: El XID ya existe" ER_DATETIME_FUNCTION_OVERFLOW 22008 eng "Datetime function: %-.32s field overflow" ger "Datetime-Funktion: %-.32s Feldüberlauf" + spa "Función Datetime: %-.32s desbordamiento de campo" ER_CANT_UPDATE_USED_TABLE_IN_SF_OR_TRG eng "Can't update table '%-.192s' in stored function/trigger because it is already used by statement which invoked this stored function/trigger" ger "Kann Tabelle '%-.192s' in gespeicherter Funktion oder Trigger nicht aktualisieren, weil sie bereits von der Anweisung verwendet wird, die diese gespeicherte Funktion oder den Trigger aufrief" + spa "No puedo actualizar tabla '%-.192s' en función almacenada/disparador porque ya está siendo usada por la sentencia que invocó esta función almacenada/disparador" ER_VIEW_PREVENT_UPDATE eng "The definition of table '%-.192s' prevents operation %.192s on table '%-.192s'" ger "Die Definition der Tabelle '%-.192s' verhindert die Operation %.192s auf Tabelle '%-.192s'" + spa "La definición de la tabla '%-.192s' previene la operación %.192s en la tabla '%-.192s'" ER_PS_NO_RECURSION eng "The prepared statement contains a stored routine call that refers to that same statement. It's not allowed to execute a prepared statement in such a recursive manner" ger "Die vorbereitete Anweisung enthält einen Aufruf einer gespeicherten Routine, die auf eben dieselbe Anweisung verweist. Es ist nicht erlaubt, eine vorbereitete Anweisung in solch rekursiver Weise auszuführen" + spa "La sentencia preparada contiene una lamada a rutina almacenada que se refiere a la misma sentencia. No está permitido ejecutar una sentencia preparada de esta manera recursiva" ER_SP_CANT_SET_AUTOCOMMIT eng "Not allowed to set autocommit from a stored function or trigger" ger "Es ist nicht erlaubt, innerhalb einer gespeicherten Funktion oder eines Triggers AUTOCOMMIT zu setzen" + spa "No permitido usar auto acometida (autocommit) desde una función almacenada o disparador" ER_MALFORMED_DEFINER 0L000 eng "Invalid definer" + spa "Definidor inválido" ER_VIEW_FRM_NO_USER eng "View '%-.192s'.'%-.192s' has no definer information (old table format). Current user is used as definer. Please recreate the view!" ger "View '%-.192s'.'%-.192s' hat keine Definierer-Information (altes Tabellenformat). Der aktuelle Benutzer wird als Definierer verwendet. Bitte erstellen Sie den View neu" + spa "La vista '%-.192s'.'%-.192s' no tiene información de definidor (formato viejo de tabla). Se usa el usuario actual como definidor. Por favor, ¡recrea la vista!" ER_VIEW_OTHER_USER eng "You need the SUPER privilege for creation view with '%-.192s'@'%-.192s' definer" ger "Sie brauchen die SUPER-Berechtigung, um einen View mit dem Definierer '%-.192s'@'%-.192s' zu erzeugen" + spa "Necesita el privilegio SUPER para la creación de la vista con definidor '%-.192s'@'%-.192s'" ER_NO_SUCH_USER eng "The user specified as a definer ('%-.64s'@'%-.64s') does not exist" ger "Der als Definierer angegebene Benutzer ('%-.64s'@'%-.64s') existiert nicht" + spa "El usuario especificado como definidor ('%-.64s'@'%-.64s') no existe" ER_FORBID_SCHEMA_CHANGE eng "Changing schema from '%-.192s' to '%-.192s' is not allowed" ger "Wechsel des Schemas von '%-.192s' auf '%-.192s' ist nicht erlaubt" + spa "No está autorizado cambiar el esquema de '%-.192s' a '%-.192s'" ER_ROW_IS_REFERENCED_2 23000 eng "Cannot delete or update a parent row: a foreign key constraint fails (%.192s)" ger "Kann Eltern-Zeile nicht löschen oder aktualisieren: eine Fremdschlüsselbedingung schlägt fehl (%.192s)" + spa "No puedo borrar o actualizar una fila padre: falla una restricción de clave foránea (%.192s)" ER_NO_REFERENCED_ROW_2 23000 eng "Cannot add or update a child row: a foreign key constraint fails (%.192s)" ger "Kann Kind-Zeile nicht hinzufügen oder aktualisieren: eine Fremdschlüsselbedingung schlägt fehl (%.192s)" + spa "No puedo añadir o actualizar una fila hija: falla una restricción de clave foránea (%.192s)" ER_SP_BAD_VAR_SHADOW 42000 eng "Variable '%-.64s' must be quoted with `...`, or renamed" ger "Variable '%-.64s' muss mit `...` geschützt oder aber umbenannt werden" + spa "La variable '%-.64s' debe de ser entrecomillada con `...` o renombrada" ER_TRG_NO_DEFINER eng "No definer attribute for trigger '%-.192s'.'%-.192s'. The trigger will be activated under the authorization of the invoker, which may have insufficient privileges. Please recreate the trigger" ger "Kein Definierer-Attribut für Trigger '%-.192s'.'%-.192s'. Der Trigger wird mit der Autorisierung des Aufrufers aktiviert, der möglicherweise keine zureichenden Berechtigungen hat. Bitte legen Sie den Trigger neu an" + spa "No hay atributo de definidor para disparador '%-.192s'.'%-.192s'. El disparador será activado bajo la autorización del invocador, el cual puede tener insuficientes privilegios. Por favor, vuelve a crear el disparador" ER_OLD_FILE_FORMAT eng "'%-.192s' has an old format, you should re-create the '%s' object(s)" ger "'%-.192s' hat altes Format, Sie sollten die '%s'-Objekt(e) neu erzeugen" + spa "'%-.192s' tiene un formato viejo, deberías de volver a crear el/los objeto(s) '%s'" ER_SP_RECURSION_LIMIT eng "Recursive limit %d (as set by the max_sp_recursion_depth variable) was exceeded for routine %.192s" ger "Rekursionsgrenze %d (durch Variable max_sp_recursion_depth gegeben) wurde für Routine %.192s überschritten" + spa "El límite recursivo %d (según se indica mediante la variable max_sp_recursion_depth) se ha excedido para la rutina %.192s" ER_SP_PROC_TABLE_CORRUPT eng "Failed to load routine %-.192s (internal code %d). For more details, run SHOW WARNINGS" ger "Routine %-.192s (interner Code %d) konnte nicht geladen werden. Weitere Einzelheiten erhalten Sie, wenn Sie SHOW WARNINGS ausführen" ukr "Невдала спроба завантажити процедуру %-.192s (внутрішний код %d). Для отримання детальної інформації використовуйте SHOW WARNINGS" + spa "No pude cargar la rutina %-.192s (código interno %d). Para más detalles, ejecute SHOW WARNINGS" ER_SP_WRONG_NAME 42000 eng "Incorrect routine name '%-.192s'" ger "Ungültiger Routinenname '%-.192s'" + spa "Nombre incorrecto de rutina '%-.192s'" ER_TABLE_NEEDS_UPGRADE eng "Upgrade required. Please do \"REPAIR %s %`s\" or dump/reload to fix it!" ger "Aktualisierung erforderlich. Bitte zum Reparieren \"REPAIR %s %`s\" eingeben!" + spa "Es necesaria una mejora. Por favor, ¡haga \"REPAIR %s %`s\" o vuelque/recargue para arreglarlo!" ER_SP_NO_AGGREGATE 42000 eng "AGGREGATE is not supported for stored functions" ger "AGGREGATE wird bei gespeicherten Funktionen nicht unterstützt" + spa "AGGREGATE no está soportado en funciones almacenadas" ER_MAX_PREPARED_STMT_COUNT_REACHED 42000 eng "Can't create more than max_prepared_stmt_count statements (current value: %u)" ger "Kann nicht mehr Anweisungen als max_prepared_stmt_count erzeugen (aktueller Wert: %u)" + spa "No puedo crear más de max_prepared_stmt_count sentencias (valor en curso: %u)" ER_VIEW_RECURSIVE eng "%`s.%`s contains view recursion" ger "%`s.%`s enthält View-Rekursion" + spa "`%-.192s`.`%-.192s` contiene recursividad de vista"" ER_NON_GROUPING_FIELD_USED 42000 eng "Non-grouping field '%-.192s' is used in %-.64s clause" ger "In der %-.192s-Klausel wird das die Nicht-Gruppierungsspalte '%-.64s' verwendet" + spa "No hay campo agrupado '%-.192s' usado en cláusula %-.64s" ER_TABLE_CANT_HANDLE_SPKEYS eng "The storage engine %s doesn't support SPATIAL indexes" ger "Der verwendete Tabellentyp (%s) unterstützt keine SPATIAL-Indizes" + spa "El motor de almacenaje %s no soporta índices SPATIAL" ER_NO_TRIGGERS_ON_SYSTEM_SCHEMA eng "Triggers can not be created on system tables" ger "Trigger können nicht auf Systemtabellen erzeugt werden" + spa "Los disparadores no pueden ser creados en las tablas del sistema" ER_REMOVED_SPACES eng "Leading spaces are removed from name '%s'" ger "Führende Leerzeichen werden aus dem Namen '%s' entfernt" + spa "Se quitan los espacios iniciales del nombre '%s'" ER_AUTOINC_READ_FAILED eng "Failed to read auto-increment value from storage engine" ger "Lesen des Autoincrement-Werts von der Speicher-Engine fehlgeschlagen" hindi "स्टोरेज इंजन से auto-increment का मान पढ़ने में असफल रहे" + spa "No pude leer valor de auto-incremento del motor de almacenaje" ER_USERNAME eng "user name" ger "Benutzername" hindi "यूज़र का नाम" + spa "nombre de usuario" ER_HOSTNAME eng "host name" ger "Hostname" hindi "होस्ट का नाम" + spa "nombre de equipo" ER_WRONG_STRING_LENGTH eng "String '%-.70T' is too long for %s (should be no longer than %d)" ger "String '%-.70T' ist zu lang für %s (sollte nicht länger sein als %d)" + spa "La cadena '%-.70T' es demasiado larga para %s (no debería de ser mayor de %d)" ER_NON_INSERTABLE_TABLE eng "The target table %-.100s of the %s is not insertable-into" ger "Die Zieltabelle %-.100s von %s ist nicht einfügbar" jpn "対象表 %-.100s は挿入可能ではないので、%s を行えません。" + spa "La tabla destino %-.100s de la %s no es insertable-dentro" ER_ADMIN_WRONG_MRG_TABLE eng "Table '%-.64s' is differently defined or of non-MyISAM type or doesn't exist" ger "Tabelle '%-.64s' ist unterschiedlich definiert, nicht vom Typ MyISAM oder existiert nicht" + spa "La tabla '%-.64s' está definida de forma diferente o es del tipo no-MyISAM o no existe" ER_TOO_HIGH_LEVEL_OF_NESTING_FOR_SELECT eng "Too high level of nesting for select" ger "Zu tief verschachtelte SELECT-Anweisungen" + spa "Demasiado alto el nivel de anidamiento para la selección" ER_NAME_BECOMES_EMPTY eng "Name '%-.64s' has become ''" ger "Name '%-.64s' wurde zu ''" + spa "El nombre '%-.64s' ha pasado a ser ''" ER_AMBIGUOUS_FIELD_TERM eng "First character of the FIELDS TERMINATED string is ambiguous; please use non-optional and non-empty FIELDS ENCLOSED BY" ger "Das erste Zeichen der Zeichenkette FIELDS TERMINATED ist mehrdeutig; bitte benutzen Sie nicht optionale und nicht leere FIELDS ENCLOSED BY" + spa "El primer carácter de la cadena de los FIELDS TERMINATED es ambigua; por favor, usa FIELDS ENCLOSED BY no opcionales y no vacíos" ER_FOREIGN_SERVER_EXISTS eng "The foreign server, %s, you are trying to create already exists" ger "Der entfernte Server %s, den Sie versuchen zu erzeugen, existiert schon" + spa "El servidor foráneo %s que intentas crear ya existe" ER_FOREIGN_SERVER_DOESNT_EXIST eng "The foreign server name you are trying to reference does not exist. Data source error: %-.64s" - ger "Die externe Verbindung, auf die Sie zugreifen wollen, existiert nicht. Datenquellenfehlermeldung: %-.64s" + ger "Die externe Verbindung, auf die Sie zugreifen wollen, existiert nicht. Datenquellenfehlermeldung: %-.64s" + spa "El nombre del servidor foráneo que intentas referenciar no existe. Error en fuentes de datos: %-.64s" ER_ILLEGAL_HA_CREATE_OPTION eng "Table storage engine '%-.64s' does not support the create option '%.64s'" ger "Speicher-Engine '%-.64s' der Tabelle unterstützt die Option '%.64s' nicht" + spa "El motor de almacenaje de la tabla '%-.64s' no soporta la opción de creación '%.64s'" ER_PARTITION_REQUIRES_VALUES_ERROR eng "Syntax error: %-.64s PARTITIONING requires definition of VALUES %-.64s for each partition" ger "Fehler in der SQL-Syntax: %-.64s-PARTITIONierung erfordert Definition von VALUES %-.64s für jede Partition" + spa "Error de sintaxis: %-.64s PARTITIONING requiere de la definición de VALUES %-.64s para cada partición" swe "Syntaxfel: %-.64s PARTITIONering kräver definition av VALUES %-.64s för varje partition" ER_PARTITION_WRONG_VALUES_ERROR eng "Only %-.64s PARTITIONING can use VALUES %-.64s in partition definition" ger "Nur %-.64s-PARTITIONierung kann VALUES %-.64s in der Partitionsdefinition verwenden" + spa "Sólo %-.64s PARTITIONING puede usar VALUES %-.64s en la definición de la partición" swe "Endast %-.64s partitionering kan använda VALUES %-.64s i definition av partitionen" ER_PARTITION_MAXVALUE_ERROR eng "MAXVALUE can only be used in last partition definition" ger "MAXVALUE kann nur für die Definition der letzten Partition verwendet werden" + spa "MAXVALUE sólo se puede usar en la definición de la última partición" swe "MAXVALUE kan bara användas i definitionen av den sista partitionen" ER_PARTITION_SUBPARTITION_ERROR eng "Subpartitions can only be hash partitions and by key" ger "Unterpartitionen dürfen nur HASH- oder KEY-Partitionen sein" + spa "Las Subparticiones sólo pueden ser particiones calculadas y mediante clave" swe "Subpartitioner kan bara vara hash och key partitioner" ER_PARTITION_SUBPART_MIX_ERROR eng "Must define subpartitions on all partitions if on one partition" ger "Wenn Sie Unterpartitionen auf einer Partition definieren, müssen Sie das für alle Partitionen tun" + spa "Se deben de definir subparticiones en todas las particiones si se está en una partición" swe "Subpartitioner måste definieras på alla partitioner om på en" ER_PARTITION_WRONG_NO_PART_ERROR eng "Wrong number of partitions defined, mismatch with previous setting" ger "Falsche Anzahl von Partitionen definiert, stimmt nicht mit vorherigen Einstellungen überein" + spa "Definido un número equivocado de particiones, no coincide con configuración previa" swe "Antal partitioner definierade och antal partitioner är inte lika" ER_PARTITION_WRONG_NO_SUBPART_ERROR eng "Wrong number of subpartitions defined, mismatch with previous setting" ger "Falsche Anzahl von Unterpartitionen definiert, stimmt nicht mit vorherigen Einstellungen überein" + spa "Definido un número equivocado de subparticiones, no coincide con configuración previa" swe "Antal subpartitioner definierade och antal subpartitioner är inte lika" ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR eng "Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed" ger "Konstante oder Random-Ausdrücke in (Unter-)Partitionsfunktionen sind nicht erlaubt" + spa "Las expresiones constantes, al azar o dependientes de zona en función de (sub)particionado no están permitidas" swe "Konstanta uttryck eller slumpmässiga uttryck är inte tillåtna (sub)partitioneringsfunktioner" ER_NOT_CONSTANT_EXPRESSION eng "Expression in %s must be constant" ger "Ausdrücke in %s müssen konstant sein" + spa "Las expresiones incluidas en %s deben de ser constantes" swe "Uttryck i %s måste vara ett konstant uttryck" ER_FIELD_NOT_FOUND_PART_ERROR eng "Field in list of fields for partition function not found in table" ger "Felder in der Feldliste der Partitionierungsfunktion wurden in der Tabelle nicht gefunden" + spa "Campo en la lista de campos para función de partición no hallado en tabla" swe "Fält i listan av fält för partitionering med key inte funnen i tabellen" ER_LIST_OF_FIELDS_ONLY_IN_HASH_ERROR eng "List of fields is only allowed in KEY partitions" ger "Eine Feldliste ist nur in KEY-Partitionen erlaubt" + spa "Lista de campos sólo se permite en particiones KEY" swe "En lista av fält är endast tillåtet för KEY partitioner" ER_INCONSISTENT_PARTITION_INFO_ERROR eng "The partition info in the frm file is not consistent with what can be written into the frm file" ger "Die Partitionierungsinformationen in der frm-Datei stimmen nicht mit dem überein, was in die frm-Datei geschrieben werden kann" + spa "La información de partición en el fichero frm no es consistente con lo que se puede grabar en un fichero frm" swe "Partitioneringsinformationen i frm-filen är inte konsistent med vad som kan skrivas i frm-filen" ER_PARTITION_FUNC_NOT_ALLOWED_ERROR eng "The %-.192s function returns the wrong type" ger "Die %-.192s-Funktion gibt einen falschen Typ zurück" + spa "La función %-.192s devueve un tipo equivocado" swe "%-.192s-funktionen returnerar felaktig typ" ER_PARTITIONS_MUST_BE_DEFINED_ERROR eng "For %-.64s partitions each partition must be defined" ger "Für %-.64s-Partitionen muss jede Partition definiert sein" + spa "Para las particiones %-.64s, se debe de definir cada partición" swe "För %-.64s partitionering så måste varje partition definieras" ER_RANGE_NOT_INCREASING_ERROR eng "VALUES LESS THAN value must be strictly increasing for each partition" ger "Werte in VALUES LESS THAN müssen für jede Partition strikt aufsteigend sein" + spa "El valor VALUES LESS THAN debe de ser estrictamente incremental para cada partición" swe "Värden i VALUES LESS THAN måste vara strikt växande för varje partition" ER_INCONSISTENT_TYPE_OF_FUNCTIONS_ERROR eng "VALUES value must be of same type as partition function" ger "VALUES-Werte müssen vom selben Typ wie die Partitionierungsfunktion sein" + spa "El valor VALUES debe de ser del mismo tipo que la función de partición" swe "Värden i VALUES måste vara av samma typ som partitioneringsfunktionen" ER_MULTIPLE_DEF_CONST_IN_LIST_PART_ERROR eng "Multiple definition of same constant in list partitioning" ger "Mehrfachdefinition derselben Konstante bei Listen-Partitionierung" + spa "Definición múltiple de la misma constante en el particionamiento de la lista" swe "Multipel definition av samma konstant i list partitionering" ER_PARTITION_ENTRY_ERROR eng "Partitioning can not be used stand-alone in query" ger "Partitionierung kann in einer Abfrage nicht alleinstehend benutzt werden" + spa "El particionado no puede ser usado de forma autónoma en consulta (query)" swe "Partitioneringssyntax kan inte användas på egen hand i en SQL-fråga" ER_MIX_HANDLER_ERROR eng "The mix of handlers in the partitions is not allowed in this version of MariaDB" ger "Das Vermischen von Handlern in Partitionen ist in dieser Version von MariaDB nicht erlaubt" + spa "La mezcla de manejadores en las particiones no está autorizada en esta versión de MariaDB" swe "Denna mix av lagringsmotorer är inte tillåten i denna version av MariaDB" ER_PARTITION_NOT_DEFINED_ERROR eng "For the partitioned engine it is necessary to define all %-.64s" ger "Für die partitionierte Engine müssen alle %-.64s definiert sein" + spa "Para el motor de particionado es necesario definir todas %-.64s" swe "För partitioneringsmotorn så är det nödvändigt att definiera alla %-.64s" ER_TOO_MANY_PARTITIONS_ERROR eng "Too many partitions (including subpartitions) were defined" ger "Es wurden zu vielen Partitionen (einschließlich Unterpartitionen) definiert" + spa "Definidas demasiadas particiones (incluyendo las subparticiones)" swe "För många partitioner (inkluderande subpartitioner) definierades" ER_SUBPARTITION_ERROR eng "It is only possible to mix RANGE/LIST partitioning with HASH/KEY partitioning for subpartitioning" ger "RANGE/LIST-Partitionierung kann bei Unterpartitionen nur zusammen mit HASH/KEY-Partitionierung verwendet werden" + spa "Sólo es posible mezclar particionado RANGE/LIST con particionado HASH/KEY para el subparticionado" swe "Det är endast möjligt att blanda RANGE/LIST partitionering med HASH/KEY partitionering för subpartitionering" ER_CANT_CREATE_HANDLER_FILE eng "Failed to create specific handler file" ger "Erzeugen einer spezifischen Handler-Datei fehlgeschlagen" + spa "No pude crear fichero de manejador específico" swe "Misslyckades med att skapa specifik fil i lagringsmotor" ER_BLOB_FIELD_IN_PART_FUNC_ERROR eng "A BLOB field is not allowed in partition function" ger "In der Partitionierungsfunktion sind BLOB-Spalten nicht erlaubt" + spa "No se autoriza campo BLOB en la función de partición" swe "Ett BLOB-fält är inte tillåtet i partitioneringsfunktioner" ER_UNIQUE_KEY_NEED_ALL_FIELDS_IN_PF eng "A %-.192s must include all columns in the table's partitioning function" + spa "Un %-.192s debe de incluir todas las columnas en la función de particionado de la tabla" ER_NO_PARTS_ERROR eng "Number of %-.64s = 0 is not an allowed value" ger "Eine Anzahl von %-.64s = 0 ist kein erlaubter Wert" + spa "El número de %-.64s = 0 no es un valor autorizado" swe "Antal %-.64s = 0 är inte ett tillåten värde" ER_PARTITION_MGMT_ON_NONPARTITIONED eng "Partition management on a not partitioned table is not possible" ger "Partitionsverwaltung einer nicht partitionierten Tabelle ist nicht möglich" + spa "La gestión de particiones en una tabla no particionada no es posible" swe "Partitioneringskommando på en opartitionerad tabell är inte möjligt" ER_FEATURE_NOT_SUPPORTED_WITH_PARTITIONING eng "Partitioned tables do not support %s" + spa "Las tablas particionadas no soportan %s" ER_DROP_PARTITION_NON_EXISTENT eng "Error in list of partitions to %-.64s" ger "Fehler in der Partitionsliste bei %-.64s" + spa "Error en lista de particiones para %-.64s" swe "Fel i listan av partitioner att %-.64s" ER_DROP_LAST_PARTITION eng "Cannot remove all partitions, use DROP TABLE instead" ger "Es lassen sich nicht sämtliche Partitionen löschen, benutzen Sie statt dessen DROP TABLE" + spa "No puedo quitar todas las particiones, usa DROP TABLE en su lugar" swe "Det är inte tillåtet att ta bort alla partitioner, använd DROP TABLE istället" ER_COALESCE_ONLY_ON_HASH_PARTITION eng "COALESCE PARTITION can only be used on HASH/KEY partitions" ger "COALESCE PARTITION kann nur auf HASH- oder KEY-Partitionen benutzt werden" + spa "COALESCE PARTITION sólo se puede usar en particiones HASH/KEY" swe "COALESCE PARTITION kan bara användas på HASH/KEY partitioner" ER_REORG_HASH_ONLY_ON_SAME_NO eng "REORGANIZE PARTITION can only be used to reorganize partitions not to change their numbers" ger "REORGANIZE PARTITION kann nur zur Reorganisation von Partitionen verwendet werden, nicht, um ihre Nummern zu ändern" + spa "REORGANIZE PARTITION sólo se puede usar para reorganizar particiones no para cambiar sus números" swe "REORGANIZE PARTITION kan bara användas för att omorganisera partitioner, inte för att ändra deras antal" ER_REORG_NO_PARAM_ERROR eng "REORGANIZE PARTITION without parameters can only be used on auto-partitioned tables using HASH PARTITIONs" ger "REORGANIZE PARTITION ohne Parameter kann nur für auto-partitionierte Tabellen verwendet werden, die HASH-Partitionierung benutzen" + spa "REORGANIZE PARTITION sin parámetros sólo se puede usar en tablas auto-particionadas usando HASH PARTITIONs" swe "REORGANIZE PARTITION utan parametrar kan bara användas på auto-partitionerade tabeller som använder HASH partitionering" ER_ONLY_ON_RANGE_LIST_PARTITION eng "%-.64s PARTITION can only be used on RANGE/LIST partitions" ger "%-.64s PARTITION kann nur für RANGE- oder LIST-Partitionen verwendet werden" + spa "%-.64s PARTITION sólo puede ser usada en particiones RANGE/LIST" swe "%-.64s PARTITION kan bara användas på RANGE/LIST-partitioner" ER_ADD_PARTITION_SUBPART_ERROR eng "Trying to Add partition(s) with wrong number of subpartitions" ger "Es wurde versucht, eine oder mehrere Partitionen mit der falschen Anzahl von Unterpartitionen hinzuzufügen" + spa "Intentando añadir particion(es) usando un número equivocado de subparticiones" swe "ADD PARTITION med fel antal subpartitioner" ER_ADD_PARTITION_NO_NEW_PARTITION eng "At least one partition must be added" ger "Es muss zumindest eine Partition hinzugefügt werden" + spa "Se debe de añadir una partición, al menos" swe "Åtminstone en partition måste läggas till vid ADD PARTITION" ER_COALESCE_PARTITION_NO_PARTITION eng "At least one partition must be coalesced" ger "Zumindest eine Partition muss mit COALESCE PARTITION zusammengefügt werden" + spa "Se debe de fusionar una partición, al menos" swe "Åtminstone en partition måste slås ihop vid COALESCE PARTITION" ER_REORG_PARTITION_NOT_EXIST eng "More partitions to reorganize than there are partitions" ger "Es wurde versucht, mehr Partitionen als vorhanden zu reorganisieren" + spa "Hay más particiones a reorganizar que las que existen" swe "Fler partitioner att reorganisera än det finns partitioner" ER_SAME_NAME_PARTITION eng "Duplicate partition name %-.192s" ger "Doppelter Partitionsname: %-.192s" + spa "Nombre de partición duplicado %-.192s" swe "Duplicerat partitionsnamn %-.192s" ER_NO_BINLOG_ERROR eng "It is not allowed to shut off binlog on this command" ger "Es es nicht erlaubt, bei diesem Befehl binlog abzuschalten" + spa "No se autoriza a apagar binlog en este comando" swe "Det är inte tillåtet att stänga av binlog på detta kommando" ER_CONSECUTIVE_REORG_PARTITIONS eng "When reorganizing a set of partitions they must be in consecutive order" ger "Bei der Reorganisation eines Satzes von Partitionen müssen diese in geordneter Reihenfolge vorliegen" + spa "Para reorganizar un conjunto de particiones, éstas deben de estar ordenadas consecutivamente" swe "När ett antal partitioner omorganiseras måste de vara i konsekutiv ordning" ER_REORG_OUTSIDE_RANGE eng "Reorganize of range partitions cannot change total ranges except for last partition where it can extend the range" ger "Die Reorganisation von RANGE-Partitionen kann Gesamtbereiche nicht verändern, mit Ausnahme der letzten Partition, die den Bereich erweitern kann" + spa "El reorganizar un rango de particiones no puede cambiar los rangos totales excepto para la última partición donde se puede extender el rango" swe "Reorganisering av rangepartitioner kan inte ändra den totala intervallet utom för den sista partitionen där intervallet kan utökas" ER_PARTITION_FUNCTION_FAILURE eng "Partition function not supported in this version for this handler" ger "Partitionsfunktion in dieser Version dieses Handlers nicht unterstützt" + spa "Función de partición no soportada en esta versión para este manejador" ER_PART_STATE_ERROR eng "Partition state cannot be defined from CREATE/ALTER TABLE" ger "Partitionszustand kann nicht von CREATE oder ALTER TABLE aus definiert werden" + spa "El estado de una partición no se puede definir desde CREATE/ALTER TABLE" swe "Partition state kan inte definieras från CREATE/ALTER TABLE" ER_LIMITED_PART_RANGE eng "The %-.64s handler only supports 32 bit integers in VALUES" ger "Der Handler %-.64s unterstützt in VALUES nur 32-Bit-Integers" + spa "El manejador %-.64s sólo soporta enteros de 32 bit en VALUES" swe "%-.64s stödjer endast 32 bitar i integers i VALUES" ER_PLUGIN_IS_NOT_LOADED eng "Plugin '%-.192s' is not loaded" ger "Plugin '%-.192s' ist nicht geladen" + spa "Enchufe (plugin) '%-.192s' no cargado" ER_WRONG_VALUE eng "Incorrect %-.32s value: '%-.128T'" ger "Falscher %-.32s-Wert: '%-.128T'" + spa "Incorrecto %-.32s valor: '%-.128T'" ER_NO_PARTITION_FOR_GIVEN_VALUE eng "Table has no partition for value %-.64s" ger "Tabelle hat für den Wert %-.64s keine Partition" + spa "La tabla no tiene partición para valor %-.64s" ER_FILEGROUP_OPTION_ONLY_ONCE eng "It is not allowed to specify %s more than once" ger "%s darf nicht mehr als einmal angegegeben werden" + spa "No se permite especificar %s más de unva vez" ER_CREATE_FILEGROUP_FAILED eng "Failed to create %s" ger "Anlegen von %s fehlgeschlagen" hindi "%s को बनाने में असफल रहे" + spa "No pude crear %s" ER_DROP_FILEGROUP_FAILED eng "Failed to drop %s" ger "Löschen von %s fehlgeschlagen" hindi "%s को हटाने में असफल रहे" + spa "No pude eliminar %s" ER_TABLESPACE_AUTO_EXTEND_ERROR eng "The handler doesn't support autoextend of tablespaces" ger "Der Handler unterstützt keine automatische Erweiterung (Autoextend) von Tablespaces" + spa "El manejador no soporta autoextensión de espacios de tabla" ER_WRONG_SIZE_NUMBER eng "A size parameter was incorrectly specified, either number or on the form 10M" ger "Ein Größen-Parameter wurde unkorrekt angegeben, muss entweder Zahl sein oder im Format 10M" + spa "Se ha especificado de forma incorrecta un parámetro de medida o el número o en la forma 10M" ER_SIZE_OVERFLOW_ERROR eng "The size number was correct but we don't allow the digit part to be more than 2 billion" ger "Die Zahl für die Größe war korrekt, aber der Zahlanteil darf nicht größer als 2 Milliarden sein" + spa "El número de medida es correcto pero no permitimos que la parte del dígito tenga más de 2 billones" ER_ALTER_FILEGROUP_FAILED eng "Failed to alter: %s" ger "Änderung von %s fehlgeschlagen" hindi "%s को ALTER करने में असफल रहे" + spa "No pude alterar: %s" ER_BINLOG_ROW_LOGGING_FAILED eng "Writing one row to the row-based binary log failed" ger "Schreiben einer Zeilen ins zeilenbasierte Binärlog fehlgeschlagen" + spa "Ha fallado el grabar una fila en historial (log) binario basado en fila" ER_BINLOG_ROW_WRONG_TABLE_DEF eng "Table definition on master and slave does not match: %s" ger "Tabellendefinition auf Master und Slave stimmt nicht überein: %s" + spa "La definición de tabla en maestro (master) y esclavo no coincide: %s" ER_BINLOG_ROW_RBR_TO_SBR eng "Slave running with --log-slave-updates must use row-based binary logging to be able to replicate row-based binary log events" ger "Slave, die mit --log-slave-updates laufen, müssen zeilenbasiertes Loggen verwenden, um zeilenbasierte Binärlog-Ereignisse loggen zu können" + spa "La ejecución esclava con --log-slave-updates debe de usar un historial (log) binario basado en fila para que pueda replicar eventos de historial (log) binario basados en fila" ER_EVENT_ALREADY_EXISTS eng "Event '%-.192s' already exists" ger "Event '%-.192s' existiert bereits" + spa "El evento '%-.192s' ya existe" ER_EVENT_STORE_FAILED eng "Failed to store event %s. Error code %M from storage engine" ger "Speichern von Event %s fehlgeschlagen. Fehlercode der Speicher-Engine: %M" + spa "No pude almacenar evento %s. Código de error %M desde motor de almacenaje" ER_EVENT_DOES_NOT_EXIST eng "Unknown event '%-.192s'" ger "Unbekanntes Event '%-.192s'" + spa "Evento desconocido '%-.192s'" ER_EVENT_CANT_ALTER eng "Failed to alter event '%-.192s'" ger "Ändern des Events '%-.192s' fehlgeschlagen" hindi "'%-.192s' EVENT को ALTER करने में असफल रहे" + spa "No pude alterar evento '%-.192s'" ER_EVENT_DROP_FAILED eng "Failed to drop %s" ger "Löschen von %s fehlgeschlagen" hindi "%s को हटाने में असफल रहे" + spa "No pude eliminar %s" ER_EVENT_INTERVAL_NOT_POSITIVE_OR_TOO_BIG eng "INTERVAL is either not positive or too big" ger "INTERVAL ist entweder nicht positiv oder zu groß" + spa "O INTERVAL no es positivo o es demasiado grande" ER_EVENT_ENDS_BEFORE_STARTS eng "ENDS is either invalid or before STARTS" ger "ENDS ist entweder ungültig oder liegt vor STARTS" + spa "O ENDS es inválido o anterior a STARTS" ER_EVENT_EXEC_TIME_IN_THE_PAST eng "Event execution time is in the past. Event has been disabled" ger "Ausführungszeit des Events liegt in der Vergangenheit. Event wurde deaktiviert" + spa "El tiempo de ejecución de evento se encuentra en el pasado. El evento ha sido desactivado" ER_EVENT_OPEN_TABLE_FAILED eng "Failed to open mysql.event" ger "Öffnen von mysql.event fehlgeschlagen" hindi "mysql.event को खोलने में असफल रहे" + spa "No puede abrir mysql.event" ER_EVENT_NEITHER_M_EXPR_NOR_M_AT eng "No datetime expression provided" ger "Kein DATETIME-Ausdruck angegeben" + spa "No se ha suministrado expresión datetime" ER_UNUSED_2 eng "You should never see it" + spa "No lo deberías de ver nunca" ER_UNUSED_3 eng "You should never see it" + spa "No lo deberías de ver nunca" ER_EVENT_CANNOT_DELETE eng "Failed to delete the event from mysql.event" ger "Löschen des Events aus mysql.event fehlgeschlagen" hindi "EVENT को mysql.event से हटाने मैं असफल रहे" + spa "No pude borrar el evento desde mysql.event" ER_EVENT_COMPILE_ERROR eng "Error during compilation of event's body" ger "Fehler beim Kompilieren des Event-Bodys" + spa "Error durante compilación de cuerpo de evento" ER_EVENT_SAME_NAME eng "Same old and new event name" ger "Alter und neuer Event-Name sind gleich" + spa "Mismo nombre de evento viejo y nuevo" ER_EVENT_DATA_TOO_LONG eng "Data for column '%s' too long" ger "Daten der Spalte '%s' zu lang" + spa "Datos demasiado largos para la columna '%s'" ER_DROP_INDEX_FK eng "Cannot drop index '%-.192s': needed in a foreign key constraint" ger "Kann Index '%-.192s' nicht löschen: wird für eine Fremdschlüsselbeschränkung benötigt" + spa "No puedo eliminar índice '%-.192s': necesario en una restricción de clave foránea" # When using this error message, use the ER_WARN_DEPRECATED_SYNTAX error # code. ER_WARN_DEPRECATED_SYNTAX_WITH_VER eng "The syntax '%s' is deprecated and will be removed in MariaDB %s. Please use %s instead" ger "Die Syntax '%s' ist veraltet und wird in MariaDB %s entfernt. Bitte benutzen Sie statt dessen %s" + spa "La sintaxis '%s' está obsoleta y será quitada en MariaDB %s. Por favor, use %s en su lugar" ER_CANT_WRITE_LOCK_LOG_TABLE eng "You can't write-lock a log table. Only read access is possible" ger "Eine Log-Tabelle kann nicht schreibgesperrt werden. Es ist ohnehin nur Lesezugriff möglich" + spa "No puedes hacer bloqueo de escritura en una tabla de historial (log). Sólo es posible acceso de lectura" ER_CANT_LOCK_LOG_TABLE eng "You can't use locks with log tables" ger "Log-Tabellen können nicht gesperrt werden" + spa "No puedes usar bloqueos con tablas de historial (log)" ER_UNUSED_4 eng "You should never see it" + spa "Nunca deberías de ver esto" ER_COL_COUNT_DOESNT_MATCH_PLEASE_UPDATE eng "Column count of mysql.%s is wrong. Expected %d, found %d. Created with MariaDB %d, now running %d. Please use mariadb-upgrade to fix this error" ger "Spaltenanzahl von mysql.%s falsch. %d erwartet, aber %d erhalten. Erzeugt mit MariaDB %d, jetzt unter %d. Bitte benutzen Sie mariadb-upgrade, um den Fehler zu beheben" + spa "El contador de columnas de mysql.%s está equivocado. Se esperaba %d, hallado %d. Creado con MariaDB %d, ahora ejecuando %d. Por favor, use mariadb-upgrade para solucionar este error" ER_TEMP_TABLE_PREVENTS_SWITCH_OUT_OF_RBR eng "Cannot switch out of the row-based binary log format when the session has open temporary tables" ger "Kann nicht aus dem zeilenbasierten Binärlog-Format herauswechseln, wenn die Sitzung offene temporäre Tabellen hat" + spa "No puedo conmutar fuera del formato de historial (log) binario basado en fila cuando la sesión ha abierto tablas temporales" ER_STORED_FUNCTION_PREVENTS_SWITCH_BINLOG_FORMAT eng "Cannot change the binary logging format inside a stored function or trigger" ger "Das Binärlog-Format kann innerhalb einer gespeicherten Funktion oder eines Triggers nicht geändert werden" + spa "No puedo cambiar el formato de historial (log) binario dentro de funciones almacenadas o disparadores" ER_UNUSED_13 eng "You should never see it" + spa "Nunca deberías de ver esto" ER_PARTITION_NO_TEMPORARY eng "Cannot create temporary table with partitions" ger "Anlegen temporärer Tabellen mit Partitionen nicht möglich" hindi "अस्थाई टेबल को पार्टिशन्स के साथ नहीं बनाया जा सकता" + spa "No puedo crear tabla temporal con particiones" ER_PARTITION_CONST_DOMAIN_ERROR eng "Partition constant is out of partition function domain" ger "Partitionskonstante liegt außerhalb der Partitionsfunktionsdomäne" + spa "La constante de partición está fuera del dominio de función de partición" swe "Partitionskonstanten är utanför partitioneringsfunktionens domän" ER_PARTITION_FUNCTION_IS_NOT_ALLOWED eng "This partition function is not allowed" ger "Diese Partitionierungsfunktion ist nicht erlaubt" + spa "Esta función de partición no está permitida" swe "Denna partitioneringsfunktion är inte tillåten" ER_DDL_LOG_ERROR eng "Error in DDL log" ger "Fehler im DDL-Log" hindi "DDL लॉग में त्रुटि हुई" + spa "Error en historial (log) DDL" ER_NULL_IN_VALUES_LESS_THAN eng "Not allowed to use NULL value in VALUES LESS THAN" ger "In VALUES LESS THAN dürfen keine NULL-Werte verwendet werden" + spa "No autorizado a usar valor NULL en VALUES LESS THAN" swe "Det är inte tillåtet att använda NULL-värden i VALUES LESS THAN" ER_WRONG_PARTITION_NAME eng "Incorrect partition name" ger "Falscher Partitionsname" hindi "पार्टीशन का नाम गलत है" + spa "Nombre incorrecto de partición" swe "Felaktigt partitionsnamn" ER_CANT_CHANGE_TX_CHARACTERISTICS 25001 eng "Transaction characteristics can't be changed while a transaction is in progress" + spa "No se pueden cambiar las característias de transacción mientras que una transacción se ecuentre en proceso" ER_DUP_ENTRY_AUTOINCREMENT_CASE eng "ALTER TABLE causes auto_increment resequencing, resulting in duplicate entry '%-.192T' for key '%-.192s'" ger "ALTER TABLE führt zur Neusequenzierung von auto_increment, wodurch der doppelte Eintrag '%-.192T' für Schlüssel '%-.192s' auftritt" + spa "ALTER TABLE causa resecuenciado de auto_incremento resultando en entrada duplicada '%-.192T' para la clave '%-.192s'" ER_EVENT_MODIFY_QUEUE_ERROR eng "Internal scheduler error %d" ger "Interner Scheduler-Fehler %d" + spa "Error en organizador interno %d" ER_EVENT_SET_VAR_ERROR eng "Error during starting/stopping of the scheduler. Error code %M" ger "Fehler während des Startens oder Anhalten des Schedulers. Fehlercode %M" + spa "Error durante arranque/parada del organizador. Código de error %M" ER_PARTITION_MERGE_ERROR eng "Engine cannot be used in partitioned tables" ger "Engine kann in partitionierten Tabellen nicht verwendet werden" + spa "No se puede usar el motor en tablas particionadas" swe "Engine inte användas i en partitionerad tabell" ER_CANT_ACTIVATE_LOG eng "Cannot activate '%-.64s' log" ger "Kann Logdatei '%-.64s' nicht aktivieren" + spa "No puedo activar historial (log) '%-.64s'" ER_RBR_NOT_AVAILABLE eng "The server was not built with row-based replication" ger "Der Server wurde nicht mit zeilenbasierter Replikation gebaut" + spa "El servidor no ha sido construido con réplica basada en fila" ER_BASE64_DECODE_ERROR eng "Decoding of base64 string failed" - swe "Avkodning av base64 sträng misslyckades" ger "Der Server hat keine zeilenbasierte Replikation" + spa "Ha fallado la decodificación de cadena base64" + swe "Avkodning av base64 sträng misslyckades" ER_EVENT_RECURSION_FORBIDDEN eng "Recursion of EVENT DDL statements is forbidden when body is present" ger "Rekursivität von EVENT-DDL-Anweisungen ist unzulässig wenn ein Hauptteil (Body) existiert" + spa "Se prohiben sentencias de EVENT DDL cuando se encuentra presente el cuerpo" ER_EVENTS_DB_ERROR eng "Cannot proceed, because event scheduler is disabled" ger "Die Operation kann nicht fortgesetzt werden, da Event Scheduler deaktiviert ist." + spa "No puedo proceder porque el organizado de eventos está desactivado" ER_ONLY_INTEGERS_ALLOWED eng "Only integers allowed as number here" ger "An dieser Stelle sind nur Ganzzahlen zulässig" + spa "Sólo se permiten enteros como número aquí" ER_UNSUPORTED_LOG_ENGINE eng "Storage engine %s cannot be used for log tables" ger "Speicher-Engine %s kann für Logtabellen nicht verwendet werden" hindi "स्टोरेज इंजन %s को लॉग टेबल्स के लिए इस्तेमाल नहीं किया जा सकता है" + spa "No se puede usar el motor de almacenaje %s para tablas de historial (log)" ER_BAD_LOG_STATEMENT eng "You cannot '%s' a log table if logging is enabled" ger "Sie können eine Logtabelle nicht '%s', wenn Loggen angeschaltet ist" + spa "No puedes '%s' una tabla de historial (log) cuando se encuentra activado el llevar historial (log)" ER_CANT_RENAME_LOG_TABLE eng "Cannot rename '%s'. When logging enabled, rename to/from log table must rename two tables: the log table to an archive table and another table back to '%s'" ger "Kann '%s' nicht umbenennen. Wenn Loggen angeschaltet ist, müssen zwei Tabellen umbenannt werden: die Logtabelle zu einer Archivtabelle, und eine weitere Tabelle zu '%s'" + spa "No puedo renombrar '%s'. Si se encuentra activo el llevar historial (log), el renombrar a/desde tabla de historial (log) debe de renombrar dos tablas: la tabla de historial (log) a una tabla archivo y otra tabla de vuelta a '%s'" ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT 42000 eng "Incorrect parameter count in the call to native function '%-.192s'" ger "Falsche Anzahl von Parametern beim Aufruf der nativen Funktion '%-.192s'" + spa "Contador de parámetro incorrecto en la llamada a función nativa '%-.192s'" ER_WRONG_PARAMETERS_TO_NATIVE_FCT 42000 eng "Incorrect parameters in the call to native function '%-.192s'" ger "Falscher Parameter beim Aufruf der nativen Funktion '%-.192s'" + spa "Parámetros incorrectos en la llamada a función nativa '%-.192s'" ER_WRONG_PARAMETERS_TO_STORED_FCT 42000 eng "Incorrect parameters in the call to stored function '%-.192s'" ger "Falsche Parameter beim Aufruf der gespeicherten Funktion '%-.192s'" + spa "Parámetros incorrectos en la llamada a función almacenada '%-.192s'" ER_NATIVE_FCT_NAME_COLLISION eng "This function '%-.192s' has the same name as a native function" ger "Die Funktion '%-.192s' hat denselben Namen wie eine native Funktion" + spa "Esta función '%-.192s' tiene el mismo nombre que una función nativa" # When using this error message, use the ER_DUP_ENTRY error code. See, for # example, code in handler.cc. ER_DUP_ENTRY_WITH_KEY_NAME 23000 S1009 @@ -6200,136 +6502,180 @@ ER_DUP_ENTRY_WITH_KEY_NAME 23000 S1009 ER_BINLOG_PURGE_EMFILE eng "Too many files opened, please execute the command again" ger "Zu viele offene Dateien, bitte führen Sie den Befehl noch einmal aus" + spa "Demasiados ficheros abiertos. Por favor, ejecute el comando otra vez" ER_EVENT_CANNOT_CREATE_IN_THE_PAST eng "Event execution time is in the past and ON COMPLETION NOT PRESERVE is set. The event was dropped immediately after creation" ger "Ausführungszeit des Events liegt in der Vergangenheit, und es wurde ON COMPLETION NOT PRESERVE gesetzt. Das Event wurde unmittelbar nach Erzeugung gelöscht" + spa "El tiempo de jecución del evento se encuentra en el pasado y está configurado ON COMPLETION NOT PRESERVE. El evento fue eliminado inmediatamente tras su creación" ER_EVENT_CANNOT_ALTER_IN_THE_PAST eng "Event execution time is in the past and ON COMPLETION NOT PRESERVE is set. The event was not changed. Specify a time in the future" ger "Execution Zeitpunkt des Ereignisses in der Vergangenheit liegt, und es war NACH ABSCHLUSS Set nicht erhalten. Die Veranstaltung wurde nicht verändert. Geben Sie einen Zeitpunkt in der Zukunft" + spa "El tiempo de jecución del evento se encuentra en el pasado y está configurado ON COMPLETION NOT PRESERVE. El evento no fue cambiado. Especifique un tiempo del futuro" ER_SLAVE_INCIDENT eng "The incident %s occurred on the master. Message: %-.64s" ger "Der Vorfall %s passierte auf dem Master. Meldung: %-.64s" + spa "Ha ocurrido un incidente %s en el maestro (master). Mensaje: %-.64s" ER_NO_PARTITION_FOR_GIVEN_VALUE_SILENT eng "Table has no partition for some existing values" ger "Tabelle hat für einige bestehende Werte keine Partition" + spa "La tabla no tiene partición para algunos valores existentes" ER_BINLOG_UNSAFE_STATEMENT eng "Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. %s" - swe "Detta är inte säkert att logga i statement-format, för BINLOG_FORMAT = STATEMENT. %s" ger "Unsichere Anweisung ins Binärlog geschrieben, weil Anweisungsformat BINLOG_FORMAT = STATEMENT. %s" + spa "Se ha grabado una sentencia no segura en historial (log) binario usando el formato de sentencia desde BINLOG_FORMAT = STATEMENT. %s" + swe "Detta är inte säkert att logga i statement-format, för BINLOG_FORMAT = STATEMENT. %s" ER_SLAVE_FATAL_ERROR eng "Fatal error: %s" ger "Fataler Fehler: %s" + spa "Error fatal: %s" ER_SLAVE_RELAY_LOG_READ_FAILURE eng "Relay log read failure: %s" ger "Relaylog-Lesefehler: %s" + spa "Fallo de lectura en historial (log) de reenvío: %s" ER_SLAVE_RELAY_LOG_WRITE_FAILURE eng "Relay log write failure: %s" ger "Relaylog-Schreibfehler: %s" + spa "Fallo de grabación en historial (log) de reenvío: %s" ER_SLAVE_CREATE_EVENT_FAILURE eng "Failed to create %s" ger "Erzeugen von %s fehlgeschlagen" hindi "%s को बनाने मैं असफल रहे" + spa "Fallo al crear %s" ER_SLAVE_MASTER_COM_FAILURE eng "Master command %s failed: %s" ger "Master-Befehl %s fehlgeschlagen: %s" + spa "El comando maestro (master) %s ha fallado: %s" ER_BINLOG_LOGGING_IMPOSSIBLE eng "Binary logging not possible. Message: %s" ger "Binärlogging nicht möglich. Meldung: %s" + spa "No es posible llevar historial (log) binario. Mensaje: %s" ER_VIEW_NO_CREATION_CTX eng "View %`s.%`s has no creation context" ger "View %`s.%`s hat keinen Erzeugungskontext" + spa "La vista `%-.64s`.`%-.64s` no tiene contexto de creación" ER_VIEW_INVALID_CREATION_CTX eng "Creation context of view %`s.%`s is invalid" ger "Erzeugungskontext des Views%`s.%`s ist ungültig" + spa "El contexto de creación de la vista `%-.64s`.`%-.64s' es inválido" ER_SR_INVALID_CREATION_CTX eng "Creation context of stored routine %`s.%`s is invalid" ger "Erzeugungskontext der gespeicherten Routine%`s.%`s ist ungültig" + spa "El contexto de creación de la rutina almacenada `%-.64s`.`%-.64s` es inválido" ER_TRG_CORRUPTED_FILE eng "Corrupted TRG file for table %`s.%`s" ger "Beschädigte TRG-Datei für Tabelle %`s.%`s" + spa "Fichero TRG estropeado para la tabla `%-.64s`.`%-.64s`" ER_TRG_NO_CREATION_CTX eng "Triggers for table %`s.%`s have no creation context" ger "Trigger für Tabelle %`s.%`s haben keinen Erzeugungskontext" + spa "Los disparadores para la tabla `%-.64s`.`%-.64s` no tienen contexto de creación" ER_TRG_INVALID_CREATION_CTX eng "Trigger creation context of table %`s.%`s is invalid" ger "Trigger-Erzeugungskontext der Tabelle %`s.%`s ist ungültig" + spa "El contexto de creación del disparador de la tabla `%-.64s`.`%-.64s` es inválido" ER_EVENT_INVALID_CREATION_CTX eng "Creation context of event %`s.%`s is invalid" ger "Erzeugungskontext des Events %`s.%`s ist ungültig" + spa "El contexto de creación del evento `%-.64s`.`%-.64s` es inválido" ER_TRG_CANT_OPEN_TABLE eng "Cannot open table for trigger %`s.%`s" ger "Kann Tabelle für den Trigger %`s.%`s nicht öffnen" + spa "No puedo abrir tabla para disparador `%-.64s`.`%-.64s`" ER_CANT_CREATE_SROUTINE eng "Cannot create stored routine %`s. Check warnings" ger "Kann gespeicherte Routine %`s nicht erzeugen. Beachten Sie die Warnungen" + spa "No puedo crear rutina alnacenada `%-.64s`. Evisa los avisos" ER_UNUSED_11 eng "You should never see it" + spa "Nunca deberías de ver esto" ER_NO_FORMAT_DESCRIPTION_EVENT_BEFORE_BINLOG_STATEMENT eng "The BINLOG statement of type %s was not preceded by a format description BINLOG statement" ger "Der BINLOG-Anweisung vom Typ %s ging keine BINLOG-Anweisung zur Formatbeschreibung voran" + spa "La sentencia BINLOG del tipo `%s` no ha sido precedida por una sentencia de descripción de formato BINLOG" ER_SLAVE_CORRUPT_EVENT eng "Corrupted replication event was detected" ger "Beschädigtes Replikationsereignis entdeckt" + spa "Se ha detectado un evento de réplica estropeado" ER_LOAD_DATA_INVALID_COLUMN eng "Invalid column reference (%-.64s) in LOAD DATA" ger "Ungültige Spaltenreferenz (%-.64s) bei LOAD DATA" + spa "Referencia inválida a columna (%-.64s) en LOAD DATA" ER_LOG_PURGE_NO_FILE eng "Being purged log %s was not found" ger "Zu bereinigende Logdatei %s wurde nicht gefunden" + spa "No ha sido hallado historial (log) %s siendo purgado" ER_XA_RBTIMEOUT XA106 eng "XA_RBTIMEOUT: Transaction branch was rolled back: took too long" ger "XA_RBTIMEOUT: Transaktionszweig wurde zurückgerollt: Zeitüberschreitung" + spa "XA_RBTIMEOUT: Rama de transacción ha sido retrocedida (rolled back): transcurrido demasiado tiempo" ER_XA_RBDEADLOCK XA102 eng "XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected" ger "XA_RBDEADLOCK: Transaktionszweig wurde zurückgerollt: Deadlock entdeckt" + spa "XA_RBDEADLOCK: Rama de transacción ha dido retrocedida (rolled back): se ha detectado estancamiento (deadlock)" ER_NEED_REPREPARE eng "Prepared statement needs to be re-prepared" ger "Vorbereitete Anweisungen müssen noch einmal vorbereitet werden" + spa "Sentencia preparada necesita volver a ser preparada" ER_DELAYED_NOT_SUPPORTED eng "DELAYED option not supported for table '%-.192s'" ger "Die DELAYED-Option wird für Tabelle '%-.192s' nicht unterstützt" + spa "Opción DELAYED no soportada para la tabla '%-.192s'" WARN_NO_MASTER_INFO eng "There is no master connection '%.*s'" ger "Die Master-Info-Struktur existiert nicht '%.*s'" + spa "No existe conexión maestra '%.*s'" WARN_OPTION_IGNORED eng "<%-.64s> option ignored" ger "Option <%-.64s> ignoriert" + spa "Opción <%-.64s> ignorada" ER_PLUGIN_DELETE_BUILTIN eng "Built-in plugins cannot be deleted" ger "Eingebaute Plugins können nicht gelöscht werden" + spa "No se puede borrar los enchufes internos" WARN_PLUGIN_BUSY eng "Plugin is busy and will be uninstalled on shutdown" ger "Plugin wird verwendet und wird erst beim Herunterfahren deinstalliert" + spa "El enchufe está ocupado y será desinstalado o apagado" ER_VARIABLE_IS_READONLY eng "%s variable '%s' is read-only. Use SET %s to assign the value" ger "%s Variable '%s' ist nur lesbar. Benutzen Sie SET %s, um einen Wert zuzuweisen" + spa "%s variable '%s' es de sólo lectura. Use SET %s para asignar el valor" ER_WARN_ENGINE_TRANSACTION_ROLLBACK eng "Storage engine %s does not support rollback for this statement. Transaction rolled back and must be restarted" ger "Speicher-Engine %s unterstützt für diese Anweisung kein Rollback. Transaktion wurde zurückgerollt und muss neu gestartet werden" + spa "El motor de almacenaje %s no soporta retroceso (rollback) para esta sentencia. Transacción retrocedida (rolled back) y debe de ser rearrancada" ER_SLAVE_HEARTBEAT_FAILURE eng "Unexpected master's heartbeat data: %s" ger "Unerwartete Daten vom Heartbeat des Masters: %s" + spa "Datos inesperados de latido (heartbeat) de maestro (master): %s" ER_SLAVE_HEARTBEAT_VALUE_OUT_OF_RANGE eng "The requested value for the heartbeat period is either negative or exceeds the maximum allowed (%u seconds)" + spa "El valor requerido para el período de latido o es negativo o excede al máximo permitido (%u segundos)" ER_UNUSED_14 eng "You should never see it" + spa "Nunca deberías de ver esto" ER_CONFLICT_FN_PARSE_ERROR eng "Error in parsing conflict function. Message: %-.64s" ger "Fehler beim Parsen einer Konflikt-Funktion. Meldung: %-.64s" + spa "Error al analizar función de conflicto. Mensaje: %-.64s" ER_EXCEPTIONS_WRITE_ERROR eng "Write to exceptions table failed. Message: %-.128s"" ger "Schreiben in Ausnahme-Tabelle fehlgeschlagen. Meldung: %-.128s"" + spa "Ha fallado el grabar en tabla de excepciones. Mensaje: %-.128s"" ER_TOO_LONG_TABLE_COMMENT eng "Comment for table '%-.64s' is too long (max = %u)" por "Comentário para a tabela '%-.64s' é longo demais (max = %u)" ger "Kommentar für Tabelle '%-.64s' ist zu lang (max = %u)" + spa "El comentario para tabla '%-.64s' es demasiado largo (máx = %u)" ER_TOO_LONG_FIELD_COMMENT eng "Comment for field '%-.64s' is too long (max = %u)" por "Comentário para o campo '%-.64s' é longo demais (max = %u)" ger "Kommentar für Feld '%-.64s' ist zu lang (max = %u)" + spa "El comentario para el campo '%-.64s' es demasiado largo (máx = %u)" ER_FUNC_INEXISTENT_NAME_COLLISION 42000 eng "FUNCTION %s does not exist. Check the 'Function Name Parsing and Resolution' section in the Reference Manual" ger "FUNCTION %s existiert nicht. Erläuterungen im Abschnitt 'Function Name Parsing and Resolution' im Referenzhandbuch" + spa "La FUNCTION %s no existe. Revisa la sección de 'Function Name Parsing and Resolution' en el Manual de Referencia" # When updating these, please update EXPLAIN_FILENAME_MAX_EXTRA_LENGTH in # sql_table.h with the new maximal additional length for explain_filename. ER_DATABASE_NAME @@ -6337,199 +6683,266 @@ ER_DATABASE_NAME swe "Databas" ger "Datenbank" hindi "डेटाबेस" + spa "Base de datos" ER_TABLE_NAME eng "Table" swe "Tabell" ger "Tabelle" hindi "टेबल" + spa "Tabla" ER_PARTITION_NAME eng "Partition" swe "Partition" ger "Partition" hindi "पार्टीशन" + spa "Partición" ER_SUBPARTITION_NAME eng "Subpartition" swe "Subpartition" ger "Unterpartition" hindi "सब-पार्टीशन" + spa "Subpartición" ER_TEMPORARY_NAME eng "Temporary" swe "Temporär" ger "Temporär" hindi "अस्थायी" + spa "Temporal" ER_RENAMED_NAME eng "Renamed" swe "Namnändrad" ger "Umbenannt" + spa "Renombrado" ER_TOO_MANY_CONCURRENT_TRXS eng "Too many active concurrent transactions" ger "Zu viele aktive simultane Transaktionen" + spa "Demasiadas transacciones concurrentes activas" WARN_NON_ASCII_SEPARATOR_NOT_IMPLEMENTED eng "Non-ASCII separator arguments are not fully supported" ger "Nicht-ASCII-Trennargumente werden nicht vollständig unterstützt" + spa "Los argumentos con separador No ASCII no están completamente soportados" ER_DEBUG_SYNC_TIMEOUT eng "debug sync point wait timed out" ger "Debug Sync Point Wartezeit überschritten" + spa "agotado tiempo de espera de punto de sincronización de depuración" ER_DEBUG_SYNC_HIT_LIMIT eng "debug sync point hit limit reached" ger "Debug Sync Point Hit Limit erreicht" + spa "alcanzado límite de punto de sincronización de depuración" ER_DUP_SIGNAL_SET 42000 eng "Duplicate condition information item '%s'" ger "Informationselement '%s' für Duplikatbedingung" + spa "Duplicado elemento de información de condición '%s'" # Note that the SQLSTATE is not 01000, it is provided by SIGNAL/RESIGNAL ER_SIGNAL_WARN 01000 eng "Unhandled user-defined warning condition" ger "Unbehandelte benutzerdefinierte Warnbedingung" + spa "Condición de aviso definida por usuario sin manejar" # Note that the SQLSTATE is not 02000, it is provided by SIGNAL/RESIGNAL ER_SIGNAL_NOT_FOUND 02000 eng "Unhandled user-defined not found condition" ger "Unbehandelte benutzerdefinierte Nicht-gefunden-Bedingung" + spa "Condición de no hallado definida por usuario sin manejar" # Note that the SQLSTATE is not HY000, it is provided by SIGNAL/RESIGNAL ER_SIGNAL_EXCEPTION HY000 eng "Unhandled user-defined exception condition" ger "Unbehandelte benutzerdefinierte Ausnahmebedingung" + spa "Condición de excepción definida por usuario sin manejar" ER_RESIGNAL_WITHOUT_ACTIVE_HANDLER 0K000 eng "RESIGNAL when handler not active" ger "RESIGNAL bei nicht aktivem Handler" + spa "RESIGNAL no activa con manejador" ER_SIGNAL_BAD_CONDITION_TYPE eng "SIGNAL/RESIGNAL can only use a CONDITION defined with SQLSTATE" ger "SIGNAL/RESIGNAL kann nur mit einer Bedingung (CONDITION) benutzt werden, die bei SQLSTATE definiert wurde" + spa "SIGNAL/RESIGNAL sólo pueden usar una CONDITION definida mediante SQLSTATE" WARN_COND_ITEM_TRUNCATED eng "Data truncated for condition item '%s'" ger "Daten gekürzt für Bedingungselement '%s'" + spa "Datos truncados para elemento de condición '%s'" ER_COND_ITEM_TOO_LONG eng "Data too long for condition item '%s'" ger "Daten zu lang für Bedingungselement '%s'" + spa "Datos demasiados largos para elemento de condición '%s'" ER_UNKNOWN_LOCALE eng "Unknown locale: '%-.64s'" ger "Unbekannte Locale: '%-.64s'" + spa "Localización (locale) desconocida: '%-.64s'" ER_SLAVE_IGNORE_SERVER_IDS eng "The requested server id %d clashes with the slave startup option --replicate-same-server-id" ger "Die angeforderte Server-ID %d steht im Konflikt mit der Startoption --replicate-same-server-id für den Slave" + spa "La id %d del servidor requerido choca con la opción de arranque del esclavo --replicate-same-server-id" ER_QUERY_CACHE_DISABLED eng "Query cache is disabled; set query_cache_type to ON or DEMAND to enable it" + spa "Caché de consulta (query) desactivada; configura query_cache_type a ON o DEMAND para activarla" ER_SAME_NAME_PARTITION_FIELD eng "Duplicate partition field name '%-.192s'" ger "Partitionsfeld '%-.192s' ist ein Duplikat" + spa "Nombre de campo de partición duplicado '%-.192s'" ER_PARTITION_COLUMN_LIST_ERROR eng "Inconsistency in usage of column lists for partitioning" ger "Inkonsistenz bei der Benutzung von Spaltenlisten für Partitionierung" + spa "Inconsistencia en uso de listas de columna para particionar" ER_WRONG_TYPE_COLUMN_VALUE_ERROR eng "Partition column values of incorrect type" ger "Partitionsspaltenwerte sind vom falschen Typ" + spa "Valores de columna de partición de tipo incorrecto" ER_TOO_MANY_PARTITION_FUNC_FIELDS_ERROR eng "Too many fields in '%-.192s'" ger "Zu viele Felder in '%-.192s'" + spa "Demasiados campos en '%-.192s'" ER_MAXVALUE_IN_VALUES_IN eng "Cannot use MAXVALUE as value in VALUES IN" ger "MAXVALUE kann nicht als Wert in VALUES IN verwendet werden" + spa "No puedo usar MAXVALUE como valor en VALUES IN" ER_TOO_MANY_VALUES_ERROR eng "Cannot have more than one value for this type of %-.64s partitioning" ger "Für den Partionierungstyp %-.64s darf es nicht mehr als einen Wert geben" + spa "No puedo tener más de un valor para este tipo de particionamiento %-.64s" ER_ROW_SINGLE_PARTITION_FIELD_ERROR eng "Row expressions in VALUES IN only allowed for multi-field column partitioning" ger "Zeilenausdrücke in VALUES IN sind nur für Mehrfeld-Spaltenpartionierung erlaubt" + spa "Expresiones de fila en VALUES IN sólo permitidas para particionamiento de columna multi-campo" ER_FIELD_TYPE_NOT_ALLOWED_AS_PARTITION_FIELD eng "Field '%-.192s' is of a not allowed type for this type of partitioning" ger "Feld '%-.192s' ist für diese Art von Partitionierung von einem nicht zulässigen Typ" + spa "El campo '%-.192s' es de un tipo no permitido para este tipo de particionado" ER_PARTITION_FIELDS_TOO_LONG eng "The total length of the partitioning fields is too large" ger "Die Gesamtlänge der Partitionsfelder ist zu groß" + spa "El tamaño total de los campos de particionado es demasiado grande" ER_BINLOG_ROW_ENGINE_AND_STMT_ENGINE eng "Cannot execute statement: impossible to write to binary log since both row-incapable engines and statement-incapable engines are involved" + spa "No puedo ejecutar sentencia: imposible grabar historial (log) binario ya que ambos motores de fila-incapaz y de sentencia-incapaz están involucrados" ER_BINLOG_ROW_MODE_AND_STMT_ENGINE eng "Cannot execute statement: impossible to write to binary log since BINLOG_FORMAT = ROW and at least one table uses a storage engine limited to statement-based logging" + spa "No puedo ejecutar sentencia: imposible grabar historial (log) binario ya que BINLOG_FORMAT = ROW y al menos una tabla utilizan motor de almacenaje limitado a historiales basados en sentencia" ER_BINLOG_UNSAFE_AND_STMT_ENGINE eng "Cannot execute statement: impossible to write to binary log since statement is unsafe, storage engine is limited to statement-based logging, and BINLOG_FORMAT = MIXED. %s" + spa "No puedo ejecutar sentencia: imposible grabar historial (log) binario ya que la sentencia no es segura, el motor de almacenaje está limitado a historial basado en sentencia y BINLOG_FORMAT = MIXED. %s" ER_BINLOG_ROW_INJECTION_AND_STMT_ENGINE eng "Cannot execute statement: impossible to write to binary log since statement is in row format and at least one table uses a storage engine limited to statement-based logging" + spa "No puedo ejecutar sentencia: imposible grabar historial (log) binario ya que la sentencia está en un formato de fila y al menos una tabla utiliza un motor de almacenaje limitado a historial basado en sentencia" ER_BINLOG_STMT_MODE_AND_ROW_ENGINE eng "Cannot execute statement: impossible to write to binary log since BINLOG_FORMAT = STATEMENT and at least one table uses a storage engine limited to row-based logging.%s" + spa "No puedo ejecutar sentencia: imposible grabar historial (log) binario ya que BINLOG_FORMAT = STATEMENT y al menos una tabla utilizan un motor de almacenaje limitado a historial basado en fila. %s" ER_BINLOG_ROW_INJECTION_AND_STMT_MODE eng "Cannot execute statement: impossible to write to binary log since statement is in row format and BINLOG_FORMAT = STATEMENT" + spa "No puedo ejecutar sentencia: imposible grabar historial (log) binario ya que la sentencia está en formato de fila y BINLOG_FORMAT = STATEMENT" ER_BINLOG_MULTIPLE_ENGINES_AND_SELF_LOGGING_ENGINE eng "Cannot execute statement: impossible to write to binary log since more than one engine is involved and at least one engine is self-logging" + spa "No puedo ejecutar sentencia: imposible grabar historial (log) binario ya que hay más de un motor involucrado y al menos un motor usa auto-historial" ER_BINLOG_UNSAFE_LIMIT eng "The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted" + spa "La sentencia no es segura debido a usar una cláusula LIMIT. No es segura porque el conjunto incluido de filas no se puede predecir" ER_BINLOG_UNSAFE_INSERT_DELAYED eng "The statement is unsafe because it uses INSERT DELAYED. This is unsafe because the times when rows are inserted cannot be predicted" + spa "La sentencia no es segura debido a usar una INSERT DELAYED. No es segura porque los momentos en que las filas han de insertarse no se pueden predecir" ER_BINLOG_UNSAFE_SYSTEM_TABLE eng "The statement is unsafe because it uses the general log, slow query log, or performance_schema table(s). This is unsafe because system tables may differ on slaves" + spa "La sentencia no es segura debido a usar el historial (log) general, un historial (log) lento o tabla(s) de performance_schema. No es segura porque las tablas de sistema pueden diferir de las esclavas" ER_BINLOG_UNSAFE_AUTOINC_COLUMNS eng "Statement is unsafe because it invokes a trigger or a stored function that inserts into an AUTO_INCREMENT column. Inserted values cannot be logged correctly" + spa "La sentencia no es segura debido a invocar un disparador o una función almacenada que inserta una columna de AUTO_INCREMENT. No se puede llevar historial correcto de Los valores insertados". ER_BINLOG_UNSAFE_UDF eng "Statement is unsafe because it uses a UDF which may not return the same value on the slave" + spa "La sentencia no es segura porque usa un UDF que puede no devolver el mismo valor en el esclavo" ER_BINLOG_UNSAFE_SYSTEM_VARIABLE eng "Statement is unsafe because it uses a system variable that may have a different value on the slave" + spa "La sentencia no es segura porque usa una variable de sistema que puede tener un valor diferente en el esclavo" ER_BINLOG_UNSAFE_SYSTEM_FUNCTION eng "Statement is unsafe because it uses a system function that may return a different value on the slave" + spa "La sentencia no es segura porque usa una función de sistema que puede devolver un valor diferente en el esclavo" ER_BINLOG_UNSAFE_NONTRANS_AFTER_TRANS eng "Statement is unsafe because it accesses a non-transactional table after accessing a transactional table within the same transaction" + spa "La sentencia no es segura porque accede a una tabla no transaccional tras acceder a una transaccional dentro de la misma transacción" ER_MESSAGE_AND_STATEMENT eng "%s Statement: %s" + spa "%s Sentencia: %s" ER_SLAVE_CONVERSION_FAILED eng "Column %d of table '%-.192s.%-.192s' cannot be converted from type '%-.50s' to type '%-.50s'" + spa "La columna %d de la tabla '%-.192s.%-.192s' no puede ser convertida desde el tipo '%-.32s' al tipo '%-.32s'" ER_SLAVE_CANT_CREATE_CONVERSION eng "Can't create conversion table for table '%-.192s.%-.192s'" + spa "No puedo crear tabla de conversión para la tabla '%-.192s.%-.192s'" ER_INSIDE_TRANSACTION_PREVENTS_SWITCH_BINLOG_FORMAT eng "Cannot modify @@session.binlog_format inside a transaction" + spa "No puedo modificar @@session.binlog_format dentro de una transacción" ER_PATH_LENGTH eng "The path specified for %.64T is too long" hindi "%.64T के लिए निर्दिष्ट पथ बहुत लंबा है" + spa "La ruta especificada para %.64T es demasiado larga" ER_WARN_DEPRECATED_SYNTAX_NO_REPLACEMENT eng "'%s' is deprecated and will be removed in a future release" ger "'%s' ist veraltet und wird in einer zukünftigen Version entfernt werden" + spa "'%s' está obsoleto y será quitada en una entrega futura" ER_WRONG_NATIVE_TABLE_STRUCTURE eng "Native table '%-.64s'.'%-.64s' has the wrong structure" + spa "La tabla nativa '%-.64s'.'%-.64s' tiene una estructura equivocada" ER_WRONG_PERFSCHEMA_USAGE eng "Invalid performance_schema usage" hindi "performance_schema का अवैध उपयोग" + spa "Uso inválido de performance_schema" ER_WARN_I_S_SKIPPED_TABLE eng "Table '%s'.'%s' was skipped since its definition is being modified by concurrent DDL statement" + spa "La tabla '%s'.'%s' fue saltada ya que su definición está siendo modificada por la sentencia DDL actual" ER_INSIDE_TRANSACTION_PREVENTS_SWITCH_BINLOG_DIRECT eng "Cannot modify @@session.binlog_direct_non_transactional_updates inside a transaction" + spa "No puedo modificar @@session.binlog_direct_non_transactional_updates dentro de una transacción" ER_STORED_FUNCTION_PREVENTS_SWITCH_BINLOG_DIRECT eng "Cannot change the binlog direct flag inside a stored function or trigger" + spa "No puedo cambiar la bandera directa de binlog dentro de una función almacenada o de un disparador" ER_SPATIAL_MUST_HAVE_GEOM_COL 42000 eng "A SPATIAL index may only contain a geometrical type column" ger "Ein raumbezogener Index (SPATIAL) darf nur Spalten geometrischen Typs enthalten" + spa "Un índice SPATIAL sólo puede contener una columna de tipo geométrico" ER_TOO_LONG_INDEX_COMMENT eng "Comment for index '%-.64s' is too long (max = %lu)" + spa "El comentario para el índice '%-.64s' es demasiado largo (máx = %lu)" ER_LOCK_ABORTED eng "Wait on a lock was aborted due to a pending exclusive lock" + spa "Se ha abortado la espera por un bloqueo debido a bloqueo exclusivo pendiente" ER_DATA_OUT_OF_RANGE 22003 eng "%s value is out of range in '%s'" + spa "%s valor se encuentra fuera de rango '%s'" ER_WRONG_SPVAR_TYPE_IN_LIMIT eng "A variable of a non-integer based type in LIMIT clause" + spa "Una variable de tipo basado en no entero en cláusula LIMIT" ER_BINLOG_UNSAFE_MULTIPLE_ENGINES_AND_SELF_LOGGING_ENGINE eng "Mixing self-logging and non-self-logging engines in a statement is unsafe" + spa "No es segura la mezcla de motores de auto-historial (log) y de no auto-historial en una sentencia" ER_BINLOG_UNSAFE_MIXED_STATEMENT eng "Statement accesses nontransactional table as well as transactional or temporary table, and writes to any of them" + spa "La sentencia accede a tabla no transaccional así como transaccional o tabla temporal y graba en cualquiera de ellas" ER_INSIDE_TRANSACTION_PREVENTS_SWITCH_SQL_LOG_BIN eng "Cannot modify @@session.sql_log_bin inside a transaction" + spa "No puedo modificar @@session.sql_log_bin dentro de una transacción" ER_STORED_FUNCTION_PREVENTS_SWITCH_SQL_LOG_BIN eng "Cannot change the sql_log_bin inside a stored function or trigger" + spa "No puedo cambiar sql_log_bin dentro de una función almacenada o disparador" ER_FAILED_READ_FROM_PAR_FILE eng "Failed to read from the .par file" hindi ".par फ़ाइल से पढ़ने में असफल रहे" + spa "No pude leer desde fichero .par" swe "Misslyckades läsa från .par filen" ER_VALUES_IS_NOT_INT_TYPE_ERROR eng "VALUES value for partition '%-.64s' must have type INT" + spa "El valor VALUES para la partición '%-.64s' debe de tener el tipo INT" swe "Värden i VALUES för partition '%-.64s' måste ha typen INT" ER_ACCESS_DENIED_NO_PASSWORD_ERROR 28000 @@ -6552,98 +6965,127 @@ ER_ACCESS_DENIED_NO_PASSWORD_ERROR 28000 rus "Доступ закрыт для пользователя '%s'@'%s'" serbian "Pristup je zabranjen korisniku '%s'@'%s'" slo "Zakázaný prístup pre užívateľa: '%s'@'%s'" - spa "Acceso negado para usuario: '%s'@'%s'" + spa "Acceso denegado para usuario: '%s'@'%s'" swe "Användare '%s'@'%s' är ej berättigad att logga in" ukr "Доступ заборонено для користувача: '%s'@'%s'" ER_SET_PASSWORD_AUTH_PLUGIN eng "SET PASSWORD is ignored for users authenticating via %s plugin" + spa "SET PASSWORD no tiene significado para usuarios que se autentican vía enchufe %s" ER_GRANT_PLUGIN_USER_EXISTS eng "GRANT with IDENTIFIED WITH is illegal because the user %-.*s already exists" + spa "GRANT con IDENTIFIED WITH es ilegal porque el usuario %-.*s ya existe" ER_TRUNCATE_ILLEGAL_FK 42000 eng "Cannot truncate a table referenced in a foreign key constraint (%.192s)" + spa "No puedo truncar una tabla referenciada en una restricción de clave foránea (%.192s)" ER_PLUGIN_IS_PERMANENT eng "Plugin '%s' is force_plus_permanent and can not be unloaded" + spa "El enchufe '%s' está force_plus_permanent y no puede ser descargado" ER_SLAVE_HEARTBEAT_VALUE_OUT_OF_RANGE_MIN eng "The requested value for the heartbeat period is less than 1 millisecond. The value is reset to 0, meaning that heartbeating will effectively be disabled" + spa "El valor de requerimiento para el período de latido es menor de 1 milisegundo. El valor se vuelve a poner a 0, indicando que el latido será efectivamente desactivado" ER_SLAVE_HEARTBEAT_VALUE_OUT_OF_RANGE_MAX eng "The requested value for the heartbeat period exceeds the value of `slave_net_timeout' seconds. A sensible value for the period should be less than the timeout" + spa "El valor de requerimiento para el período de latido excede el valor de `slave_net_timeout` segundos. Un valor sensible para el período debería de ser menor que el 'tiempo agotado'" ER_STMT_CACHE_FULL eng "Multi-row statements required more than 'max_binlog_stmt_cache_size' bytes of storage." + spa "Las sentencis Multi-fila requieren de más de 'max_binlog_stmt_cache_size' bytes para almacenaje." ER_MULTI_UPDATE_KEY_CONFLICT eng "Primary key/partition key update is not allowed since the table is updated both as '%-.192s' and '%-.192s'" + spa "La actualización de clave primaria de o de partición no está permitida por estar la tabla actualizada como '%-.192s' y '%-.192s'" # When translating this error message make sure to include "ALTER TABLE" in the # message as mariadb-check parses the error message looking for ALTER TABLE. ER_TABLE_NEEDS_REBUILD eng "Table rebuild required. Please do \"ALTER TABLE %`s FORCE\" or dump/reload to fix it!" + spa "Se requiere reconstrucción de la tabla. Por favor, haz un \"ALTER TABLE `%-.32s` FORCE\" o volcado/recarga para ¡solucionarlo!" WARN_OPTION_BELOW_LIMIT eng "The value of '%s' should be no less than the value of '%s'" + spa "El valor de '%s' debería de ser no menor que el valor de '%s'" ER_INDEX_COLUMN_TOO_LONG eng "Index column size too large. The maximum column size is %lu bytes" + spa "El tamaño de índice de columna es demasiado grande. El tamaño máximo de columna es de %lu bytes" ER_ERROR_IN_TRIGGER_BODY eng "Trigger '%-.64s' has an error in its body: '%-.256s'" + spa "El disparador '%-.64s' tiene una error en su cuerpo: '%-.256s'" ER_ERROR_IN_UNKNOWN_TRIGGER_BODY eng "Unknown trigger has an error in its body: '%-.256s'" + spa "El disparador desconocido tiene un error en su cuerpo: '%-.256s'" ER_INDEX_CORRUPT eng "Index %s is corrupted" + spa "El índice %s está estropeado" ER_UNDO_RECORD_TOO_BIG eng "Undo log record is too big" + spa "El registro de historial (log) para deshacer es demasiado grande" ER_BINLOG_UNSAFE_INSERT_IGNORE_SELECT eng "INSERT IGNORE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are ignored. This order cannot be predicted and may differ on master and the slave" + spa "INSERT IGNORE... SELECT es no seguro porque el orden en el que las filas se recuperan por el SELECT determina qué filas (si hay alguna) son ignoradas. Este orden no puede ser predicho y puede diferir entre maestro (master) y esclavo" ER_BINLOG_UNSAFE_INSERT_SELECT_UPDATE eng "INSERT... SELECT... ON DUPLICATE KEY UPDATE is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are updated. This order cannot be predicted and may differ on master and the slave" + spa "INSERT... SELECT... ON DUPLICATE KEY UPDATE no es seguro porque el orden en el que las filas se recuperan por el SELECT determina qué filas (si hay alguna) son actualizadas. Este orden no puede ser predicho y puede diferir entre maestro (master) y esclavo" ER_BINLOG_UNSAFE_REPLACE_SELECT eng "REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave" + spa "REPLACE... SELECT no es seguro porque el orden en el que las filas se recuperan por el SELECT determina qué filas (si hay alguna) son sustituidas. Este orden no puede ser predicho y puede diferir entre maestro (master) y esclavo" ER_BINLOG_UNSAFE_CREATE_IGNORE_SELECT eng "CREATE... IGNORE SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are ignored. This order cannot be predicted and may differ on master and the slave" + spa "CREATE... IGNORE SELECT no es seguro porque el orden en el que las filas se recuperan por el SELECT determina qué filas (si hay alguna) son ignoradas. Este orden no puede ser predicho y puede diferir entre maestro (master) y esclavo" ER_BINLOG_UNSAFE_CREATE_REPLACE_SELECT eng "CREATE... REPLACE SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave" + spa "CREATE... REPLACE SELECT no es seguro porque el orden en el que las filas se recuperan por el SELECT determina qué filas (si hay alguna) son sustituidas. Este orden no puede ser predicho y puede diferir entre maestro (master) y esclavo" ER_BINLOG_UNSAFE_UPDATE_IGNORE eng "UPDATE IGNORE is unsafe because the order in which rows are updated determines which (if any) rows are ignored. This order cannot be predicted and may differ on master and the slave" + spa "UPDATE IGNORE no es seguro porque el orden en el que las filas se recuperan por el SELECT determina qué filas (si hay alguna) son ignoradas. Este orden no puede ser predicho y puede diferir entre maestro (master) y esclavo" ER_UNUSED_15 eng "You should never see it" + spa "Nunca deberías de ver esto" ER_UNUSED_16 eng "You should never see it" + spa "Nunca deberías de ver esto" ER_BINLOG_UNSAFE_WRITE_AUTOINC_SELECT eng "Statements writing to a table with an auto-increment column after selecting from another table are unsafe because the order in which rows are retrieved determines what (if any) rows will be written. This order cannot be predicted and may differ on master and the slave" + spa "Las sentencias que graban en una tabla con columna de auto-incremento tras seleccionar desde otra tabla no son seguras porque el orden en el que las filas son recuperadas determina qué filas (si hay alguna) serán grabadas. Este orden no puede ser predicho y puede diferir entre maestro (master) y esclavo" ER_BINLOG_UNSAFE_CREATE_SELECT_AUTOINC eng "CREATE TABLE... SELECT... on a table with an auto-increment column is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are inserted. This order cannot be predicted and may differ on master and the slave" + spa "CREATE TABKE... SELECT... en una tabla con columna de auto-incremento no es segura porque el orden en el que las filas son recuperadas por el SELECT determina qué filas (si hay alguna) serán insertadas. Este orden no puede ser predicho y puede diferir entre maestro (master) y esclavo" ER_BINLOG_UNSAFE_INSERT_TWO_KEYS eng "INSERT... ON DUPLICATE KEY UPDATE on a table with more than one UNIQUE KEY is unsafe" + spa "INSERT... ON DUPLICATE KEY UPDATE en una tabla con más de una UNIQUE KEY no es segura" ER_UNUSED_28 eng "You should never see it" + spa "Nunca deberías de ver esto" ER_UNUSED_1 eng "You should never see it" + spa "Nunca deberías de ver esto" ER_BINLOG_UNSAFE_AUTOINC_NOT_FIRST eng "INSERT into autoincrement field which is not the first part in the composed primary key is unsafe" + spa "INSERT dentro de campo con autoincremento que no es la primera parte en la clave primaria compuesta no es seguro" # # End of 5.5 error messages. @@ -6652,401 +7094,531 @@ ER_BINLOG_UNSAFE_AUTOINC_NOT_FIRST ER_CANNOT_LOAD_FROM_TABLE_V2 eng "Cannot load from %s.%s. The table is probably corrupted" ger "Kann %s.%s nicht einlesen. Tabelle ist wahrscheinlich beschädigt" + spa "No puedo cargar desde %s.%s. La tabla está probablemente estropeada" ER_MASTER_DELAY_VALUE_OUT_OF_RANGE eng "The requested value %lu for the master delay exceeds the maximum %lu" + spa "El valor requerido %lu para retraso en maestro (master) excede el máximo de %lu" ER_ONLY_FD_AND_RBR_EVENTS_ALLOWED_IN_BINLOG_STATEMENT eng "Only Format_description_log_event and row events are allowed in BINLOG statements (but %s was provided)" + spa "Sólo se permiten Format_description_log_event y eventos de fila en sentencias BINLOG (pero %s fue suministrado)" ER_PARTITION_EXCHANGE_DIFFERENT_OPTION eng "Non matching attribute '%-.64s' between partition and table" + spa "Atributo no coincidente '%-.64s' entre la partición y la tabla" swe "Attributet '%-.64s' är olika mellan partition och tabell" ER_PARTITION_EXCHANGE_PART_TABLE eng "Table to exchange with partition is partitioned: '%-.64s'" + spa "La tabla para intercambiar con la partición está particionada: '%-.64s'" swe "Tabellen att byta ut mot partition är partitionerad: '%-.64s'" ER_PARTITION_EXCHANGE_TEMP_TABLE eng "Table to exchange with partition is temporary: '%-.64s'" + spa "La tabla para intercambiar con la partición es temporal: '%-.64s'" swe "Tabellen att byta ut mot partition är temporär: '%-.64s'" ER_PARTITION_INSTEAD_OF_SUBPARTITION eng "Subpartitioned table, use subpartition instead of partition" + spa "La tabla subparticionada utiliza subpartición en lugar de partición" swe "Subpartitionerad tabell, använd subpartition istället för partition" ER_UNKNOWN_PARTITION eng "Unknown partition '%-.64s' in table '%-.64s'" + spa "Partición desconocida '%-.64s' en la tabla '%-.64s'" swe "Okänd partition '%-.64s' i tabell '%-.64s'" ER_TABLES_DIFFERENT_METADATA eng "Tables have different definitions" + spa "Las tablas tienen diferentes definiciones" swe "Tabellerna har olika definitioner" ER_ROW_DOES_NOT_MATCH_PARTITION eng "Found a row that does not match the partition" + spa "Hallada una fila que no coincide con la partición" swe "Hittade en rad som inte passar i partitionen" ER_BINLOG_CACHE_SIZE_GREATER_THAN_MAX eng "Option binlog_cache_size (%lu) is greater than max_binlog_cache_size (%lu); setting binlog_cache_size equal to max_binlog_cache_size" + spa "La opción binlog_cache_size (%lu) es mayor que max_binlog_cache_size (%lu); configurando binlog_cache_size igual a max_binlog_cache_size" ER_WARN_INDEX_NOT_APPLICABLE eng "Cannot use %-.64s access on index '%-.64s' due to type or collation conversion on field '%-.64s'" + spa "No puedo usar acceso %-.64s en índice '%-.64s' debido al tipo o conversión de cotejo en campo '%-.64s'" ER_PARTITION_EXCHANGE_FOREIGN_KEY eng "Table to exchange with partition has foreign key references: '%-.64s'" + spa "La tabla para intercambiar con la partición tiene referencias a clave foránea: '%-.64s'" swe "Tabellen att byta ut mot partition har foreign key referenser: '%-.64s'" ER_NO_SUCH_KEY_VALUE eng "Key value '%-.192s' was not found in table '%-.192s.%-.192s'" + spa "Valor de clave '%-.192s' no hallado en la tabla '%-.192s.%-.192s'" ER_VALUE_TOO_LONG eng "Too long value for '%s'" + spa "Valor demasiado largo para '%s'" ER_NETWORK_READ_EVENT_CHECKSUM_FAILURE eng "Replication event checksum verification failed while reading from network" + spa "Ha fallado la verificación de la suma de revisión de evento de réplica mientras se leía desde la red" ER_BINLOG_READ_EVENT_CHECKSUM_FAILURE eng "Replication event checksum verification failed while reading from a log file" + spa "Ha fallado la verificación de la suma de revisión de evento de réplica mientras se leía desde fichero de historial (log)" ER_BINLOG_STMT_CACHE_SIZE_GREATER_THAN_MAX eng "Option binlog_stmt_cache_size (%lu) is greater than max_binlog_stmt_cache_size (%lu); setting binlog_stmt_cache_size equal to max_binlog_stmt_cache_size" + spa "La opción binlog_stmt_cache_size (%lu) es mayor que max_binlog_stmt_cache_size (%lu); configurando binlog_stmt_cache_size igual a max_binlog_stmt_cache_size" ER_CANT_UPDATE_TABLE_IN_CREATE_TABLE_SELECT eng "Can't update table '%-.192s' while '%-.192s' is being created" + spa "No puedo actualizar tabla '%-.192s' mientras '%-.192s' está siendo creada" ER_PARTITION_CLAUSE_ON_NONPARTITIONED eng "PARTITION () clause on non partitioned table" + spa "Cláusula PARTITION () en tabla no particionada" swe "PARTITION () klausul för en icke partitionerad tabell" ER_ROW_DOES_NOT_MATCH_GIVEN_PARTITION_SET eng "Found a row not matching the given partition set" + spa "Hallada una fila que no coincide con el conjunto dado de partición" swe "Hittade en rad som inte passar i någon given partition" ER_UNUSED_5 eng "You should never see it" + spa "Nunca deberías de ver esto" ER_CHANGE_RPL_INFO_REPOSITORY_FAILURE eng "Failure while changing the type of replication repository: %s" + spa "Fallo mientras cambiaba el tipo de repositorio de réplica: %s" ER_WARNING_NOT_COMPLETE_ROLLBACK_WITH_CREATED_TEMP_TABLE eng "The creation of some temporary tables could not be rolled back" + spa "La creación de algunas tablas temporales no se pudo retroceder (rolled back)" ER_WARNING_NOT_COMPLETE_ROLLBACK_WITH_DROPPED_TEMP_TABLE eng "Some temporary tables were dropped, but these operations could not be rolled back" + spa "Algunas tablas temporales fueron eliminadas, pero estas operaciones no se pudieron retroceder (rolled back)" ER_MTS_FEATURE_IS_NOT_SUPPORTED eng "%s is not supported in multi-threaded slave mode. %s" + spa "%s no se soporta en modo esclavo multi-hilo (thread). %s" ER_MTS_UPDATED_DBS_GREATER_MAX eng "The number of modified databases exceeds the maximum %d; the database names will not be included in the replication event metadata" + spa "El núermo de bases de datos modificadas excede el máximo de %d; los nombres de base de datos no serán incluidos en los metadatos de eventos de réplica" ER_MTS_CANT_PARALLEL eng "Cannot execute the current event group in the parallel mode. Encountered event %s, relay-log name %s, position %s which prevents execution of this event group in parallel mode. Reason: %s" + spa "No puedo ejecutar el grupo de eventos actual en modo paralelo. Encontrado evento %s, nombre de historial (log) de reenvío %s, posición %s que previene la ejecución de este grupo de eventos en modo paralelo. Motivo: %s" ER_MTS_INCONSISTENT_DATA eng "%s" ER_FULLTEXT_NOT_SUPPORTED_WITH_PARTITIONING eng "FULLTEXT index is not supported for partitioned tables" + spa "El índice FULLTEXT no está soportado para tablas particionadas" swe "FULLTEXT index stöds ej för partitionerade tabeller" ER_DA_INVALID_CONDITION_NUMBER 35000 eng "Invalid condition number" por "Número de condição inválido" + spa "Número inválido de condición" ER_INSECURE_PLAIN_TEXT eng "Sending passwords in plain text without SSL/TLS is extremely insecure" + spa "Enviar contraseñas en texto plano sin SSL/TLS es extremadamente inseguro" ER_INSECURE_CHANGE_MASTER eng "Storing MariaDB user name or password information in the master.info repository is not secure and is therefore not recommended. Please see the MariaDB Manual for more about this issue and possible alternatives" + spa "Almacenar nombre de usuario de MariaDB o información de contraseña en el repositorio master.info no es seguro y por ello no se recomienda. Por favor, mira el manual de MariaDB para saber más acerca de este asunto y sus posibles alternativas" ER_FOREIGN_DUPLICATE_KEY_WITH_CHILD_INFO 23000 S1009 eng "Foreign key constraint for table '%.192s', record '%-.192s' would lead to a duplicate entry in table '%.192s', key '%.192s'" ger "Fremdschlüssel-Beschränkung für Tabelle '%.192s', Datensatz '%-.192s' würde zu einem doppelten Eintrag in Tabelle '%.192s', Schlüssel '%.192s' führen" + spa "La restricción de clave foránea para tabla '%.192s', registro '%-.192s' llevaría a una entrada duplicada en la tabla '%.192s', clave '%.192s'" swe "FOREIGN KEY constraint för tabell '%.192s', posten '%-.192s' kan inte uppdatera barntabell '%.192s' på grund av nyckel '%.192s'" ER_FOREIGN_DUPLICATE_KEY_WITHOUT_CHILD_INFO 23000 S1009 eng "Foreign key constraint for table '%.192s', record '%-.192s' would lead to a duplicate entry in a child table" ger "Fremdschlüssel-Beschränkung für Tabelle '%.192s', Datensatz '%-.192s' würde zu einem doppelten Eintrag in einer Kind-Tabelle führen" + spa "La restricción de clave foránea para tabla '%.192s', registro '%-.192s' llevaría a una entrada duplicada en una tabla hija" swe "FOREIGN KEY constraint för tabell '%.192s', posten '%-.192s' kan inte uppdatera en barntabell på grund av UNIQUE-test" ER_SQLTHREAD_WITH_SECURE_SLAVE eng "Setting authentication options is not possible when only the Slave SQL Thread is being started" + spa "Configurar opciones de autenticación no es posible si sólo se ha arrancado el Hilo (thread) SQL Esclavo" ER_TABLE_HAS_NO_FT eng "The table does not have FULLTEXT index to support this query" + spa "La tabla no tiene índice FULLTEXT que soporte esta consulta (query)" ER_VARIABLE_NOT_SETTABLE_IN_SF_OR_TRIGGER eng "The system variable %.200s cannot be set in stored functions or triggers" + spa "La variable de sistema %.200s no se puede poner en funciones almacenadas o disparadores" ER_VARIABLE_NOT_SETTABLE_IN_TRANSACTION eng "The system variable %.200s cannot be set when there is an ongoing transaction" + spa "La variable de sistema %.200s no se puede poner si hay una transacción en curso" ER_GTID_NEXT_IS_NOT_IN_GTID_NEXT_LIST eng "The system variable @@SESSION.GTID_NEXT has the value %.200s, which is not listed in @@SESSION.GTID_NEXT_LIST" + spa "La variable de sistema @@SESSION.GTID_NEXT tiene el valor %.200s, el cual no está listado en @@SESSION.GTID_NEXT_LIST" ER_CANT_CHANGE_GTID_NEXT_IN_TRANSACTION_WHEN_GTID_NEXT_LIST_IS_NULL eng "When @@SESSION.GTID_NEXT_LIST == NULL, the system variable @@SESSION.GTID_NEXT cannot change inside a transaction" + spa "Cuando @@SESSION.GTID_NEXT_LIST == NULL, la variable de sistema @@SESSION.GTID_NEXT no puede cambiar dentro de una transacción" ER_SET_STATEMENT_CANNOT_INVOKE_FUNCTION eng "The statement 'SET %.200s' cannot invoke a stored function" + spa "La sentencia 'SET %.200s' no puede invocar una función almacenada" ER_GTID_NEXT_CANT_BE_AUTOMATIC_IF_GTID_NEXT_LIST_IS_NON_NULL eng "The system variable @@SESSION.GTID_NEXT cannot be 'AUTOMATIC' when @@SESSION.GTID_NEXT_LIST is non-NULL" + spa "La variable de sistema @@SESSION.GTID_NEXT no puede ser 'AUTOMATIC' si la @@SESSION.GTID_NEXT_LIST es no-NULL" ER_SKIPPING_LOGGED_TRANSACTION eng "Skipping transaction %.200s because it has already been executed and logged" + spa "Saltando transacción %.200s porque ya ha sido ejecutada y puesta en historial (log)" ER_MALFORMED_GTID_SET_SPECIFICATION eng "Malformed GTID set specification '%.200s'" + spa "GTID malformado pone especificación '%.200s'" ER_MALFORMED_GTID_SET_ENCODING eng "Malformed GTID set encoding" + spa "GTID malformado pone codificación" ER_MALFORMED_GTID_SPECIFICATION eng "Malformed GTID specification '%.200s'" + spa "GTID malformado especificación '%.200s'" ER_GNO_EXHAUSTED eng "Impossible to generate Global Transaction Identifier: the integer component reached the maximal value. Restart the server with a new server_uuid" + spa "Imposible generar Identificador Global de Transacción: el componente entero alcanzó el máximo valor. Rearranca el servidor con un nuevo server_uuid" ER_BAD_SLAVE_AUTO_POSITION eng "Parameters MASTER_LOG_FILE, MASTER_LOG_POS, RELAY_LOG_FILE and RELAY_LOG_POS cannot be set when MASTER_AUTO_POSITION is active" + spa "Los parámetros MASTER_LOG_FILE, MASTER_LOG_POS, RELAY_LOG_FILE y RELAY_LOG_POS no pueden ser puestos cuando MASTER_AUTO_POSITION esté activo" ER_AUTO_POSITION_REQUIRES_GTID_MODE_ON eng "CHANGE MASTER TO MASTER_AUTO_POSITION = 1 can only be executed when GTID_MODE = ON" + spa "CHANGE MASTER TO MASTER_AUTO_POSITION = 1 sólo se puede ejecutar cuando GTID_MODE = ON" ER_CANT_DO_IMPLICIT_COMMIT_IN_TRX_WHEN_GTID_NEXT_IS_SET eng "Cannot execute statements with implicit commit inside a transaction when GTID_NEXT != AUTOMATIC or GTID_NEXT_LIST != NULL" + spa "No puedo ejecutar sentencias con acometidas (commit) implícitas dentro de una transacción cuando GTID_NEXT != AUTOMATIC o GTID_NEXT_LIST != NULL" ER_GTID_MODE_2_OR_3_REQUIRES_ENFORCE_GTID_CONSISTENCY_ON eng "GTID_MODE = ON or GTID_MODE = UPGRADE_STEP_2 requires ENFORCE_GTID_CONSISTENCY = 1" + spa "GTID_MODE = ON o GTID_MODE = UPGRADE_STEP_2 requiere que ENFORCE_GTID_CONSISTENCY = 1" ER_GTID_MODE_REQUIRES_BINLOG eng "GTID_MODE = ON or UPGRADE_STEP_1 or UPGRADE_STEP_2 requires --log-bin and --log-slave-updates" + spa "GTID_MODE = ON o UPGRADE_STEP_1 o UPGRADE_STEP_2 requiere --log-bin y --log-slave-updates" ER_CANT_SET_GTID_NEXT_TO_GTID_WHEN_GTID_MODE_IS_OFF eng "GTID_NEXT cannot be set to UUID:NUMBER when GTID_MODE = OFF" + spa "GTID_NEXT no se puede poner a UUID:NUMBER cuando GTID_MODE = OFF" ER_CANT_SET_GTID_NEXT_TO_ANONYMOUS_WHEN_GTID_MODE_IS_ON eng "GTID_NEXT cannot be set to ANONYMOUS when GTID_MODE = ON" + spa "GTID_NEXT no se puede poner como ANONYMOUS cuando GTID_MODE = ON" ER_CANT_SET_GTID_NEXT_LIST_TO_NON_NULL_WHEN_GTID_MODE_IS_OFF eng "GTID_NEXT_LIST cannot be set to a non-NULL value when GTID_MODE = OFF" + spa "GTID_NEXT_LIST no se puede poner como valor no-NULL cuando GTID_MODE = OFF" ER_FOUND_GTID_EVENT_WHEN_GTID_MODE_IS_OFF eng "Found a Gtid_log_event or Previous_gtids_log_event when GTID_MODE = OFF" + spa "Hallado un Gtid_log_event o Previous_gtids_log_event cuando GTID_MODE = OFF" ER_GTID_UNSAFE_NON_TRANSACTIONAL_TABLE eng "When ENFORCE_GTID_CONSISTENCY = 1, updates to non-transactional tables can only be done in either autocommitted statements or single-statement transactions, and never in the same statement as updates to transactional tables" + spa "Cuando ENFORCE_GTID_CONSISTENCY = 1, las actualiaciones a tablas no transaccionales sólo se puede hacer o bien en sentencias autoacometidas o en transacciones de sentencias simples y nunca dentro de la misma sentencia como actualizaciones a tablas transaccionales" ER_GTID_UNSAFE_CREATE_SELECT eng "CREATE TABLE ... SELECT is forbidden when ENFORCE_GTID_CONSISTENCY = 1" + spa "CREATE TABLE ... SELECT está prohibido si ENFORCE_GTID_CONSISTENCY = 1" ER_GTID_UNSAFE_CREATE_DROP_TEMPORARY_TABLE_IN_TRANSACTION eng "When ENFORCE_GTID_CONSISTENCY = 1, the statements CREATE TEMPORARY TABLE and DROP TEMPORARY TABLE can be executed in a non-transactional context only, and require that AUTOCOMMIT = 1" + spa "Cuando ENFORCE_GTID_CONSISTENCY = 1, las sentencias CREATE TEMPORARY TABLE y DROP TEMPORARY TABLE pueden ser ejecutadas sólo en contextos no-transaccionales y requieren que AUTOCOMMIT = 1" ER_GTID_MODE_CAN_ONLY_CHANGE_ONE_STEP_AT_A_TIME eng "The value of GTID_MODE can only change one step at a time: OFF <-> UPGRADE_STEP_1 <-> UPGRADE_STEP_2 <-> ON. Also note that this value must be stepped up or down simultaneously on all servers; see the Manual for instructions." + spa "El valor de GTID_MODE sólo puede cambiar un paso a la vez: OFF <-> UPGRADE_STEP_1 <-> UPGRADE_STEP_2 <-> ON. También ten en cuenta que este valor debe de ser aumentado y disminuido simultaneamente en todos los servidores; mira el Manual para instrucciones." ER_MASTER_HAS_PURGED_REQUIRED_GTIDS eng "The slave is connecting using CHANGE MASTER TO MASTER_AUTO_POSITION = 1, but the master has purged binary logs containing GTIDs that the slave requires" + spa "El esclavo se está conectando usando CHANGE MASTER TO MASTER_AUTO_POSITION = 1, pero el maestro (master) ha purgado los historiales (logs) binarios que contienen GTIDs requeridos por el esclavo" ER_CANT_SET_GTID_NEXT_WHEN_OWNING_GTID eng "GTID_NEXT cannot be changed by a client that owns a GTID. The client owns %s. Ownership is released on COMMIT or ROLLBACK" + spa "GTID_NEXT no se puede cambiar por un cliente que posee un GTID. El cliente posee %s. La propiedad se libera con COMMIT o ROLLBACK" ER_UNKNOWN_EXPLAIN_FORMAT eng "Unknown %s format name: '%s'" rus "Неизвестное имя формата команды %s: '%s'" + spa "Nombre de formato %s desconocido: '%s'" ER_CANT_EXECUTE_IN_READ_ONLY_TRANSACTION 25006 eng "Cannot execute statement in a READ ONLY transaction" + spa "No puedo ejecutar sentencia en una transacción READ ONLY" ER_TOO_LONG_TABLE_PARTITION_COMMENT eng "Comment for table partition '%-.64s' is too long (max = %lu)" + spa "El comentario para partición de tabla '%-.64s' es demasido largo (máx = %lu)" ER_SLAVE_CONFIGURATION eng "Slave is not configured or failed to initialize properly. You must at least set --server-id to enable either a master or a slave. Additional error messages can be found in the MariaDB error log" + spa "El esclavo no está configurado o falló al inicializarse de forma adecuada. Debes de poner al menos --server-id para activar o bien un maestro (master) o un esclavo. Mensajes de error adicionales pueden ser hallados en historial (log) de errores de MariaDB" ER_INNODB_FT_LIMIT eng "InnoDB presently supports one FULLTEXT index creation at a time" + spa "Actualmente InnoDB soporta la creación de un índice FULLTEXT a la vez" ER_INNODB_NO_FT_TEMP_TABLE eng "Cannot create FULLTEXT index on temporary InnoDB table" + spa "No puedo crear índice FULLTEXT en tabla temporal InnoDB" ER_INNODB_FT_WRONG_DOCID_COLUMN eng "Column '%-.192s' is of wrong type for an InnoDB FULLTEXT index" + spa "La columna '%-.192s' es de tipo equivocado para un índice InnoDB FULLTEXT" ER_INNODB_FT_WRONG_DOCID_INDEX eng "Index '%-.192s' is of wrong type for an InnoDB FULLTEXT index" + spa "El índice '%-.192s' es de tipo equivocado para un índice InnoDB FULLTEXT" ER_INNODB_ONLINE_LOG_TOO_BIG eng "Creating index '%-.192s' required more than 'innodb_online_alter_log_max_size' bytes of modification log. Please try again" + spa "La creación de índice '%-.192s' requirió más de 'innodb_online_alter_log_max_size' bytes de historial (log) de modificaciones. Por favor, prueba otra vez" ER_UNKNOWN_ALTER_ALGORITHM eng "Unknown ALGORITHM '%s'" + spa "ALGORITHM desconocido '%s'" ER_UNKNOWN_ALTER_LOCK eng "Unknown LOCK type '%s'" + spa "Tipo de LOCK desconocido '%s'" ER_MTS_CHANGE_MASTER_CANT_RUN_WITH_GAPS eng "CHANGE MASTER cannot be executed when the slave was stopped with an error or killed in MTS mode. Consider using RESET SLAVE or START SLAVE UNTIL" + spa "CHANGE MASTER no se puede ejecutar cuando se ha parado el esclavo con un error o matado en modo MTS. Considera el usar RESET SLAVE o START SLAVE UNTIL" ER_MTS_RECOVERY_FAILURE eng "Cannot recover after SLAVE errored out in parallel execution mode. Additional error messages can be found in the MariaDB error log" + spa "No puedo recuperar después de que SLAVE diera error en modo paralelo de ejecución. Mensajes de error adicionales se pueden hallar en el historial (log) de error de MariaDB" ER_MTS_RESET_WORKERS eng "Cannot clean up worker info tables. Additional error messages can be found in the MariaDB error log" + spa "No puedo limpiar tablas de información de trabajador. Mensajes de error adicionales se pueden hallar en el historial (log) de error de MariaDB" ER_COL_COUNT_DOESNT_MATCH_CORRUPTED_V2 eng "Column count of %s.%s is wrong. Expected %d, found %d. The table is probably corrupted" ger "Spaltenanzahl von %s.%s falsch. %d erwartet, aber %d gefunden. Tabelle ist wahrscheinlich beschädigt" + spa "El contador de columnas %s.%s está equivocado. Se esperaba %d, hallado %d. La tabla está probablemente estropeada" ER_SLAVE_SILENT_RETRY_TRANSACTION eng "Slave must silently retry current transaction" + spa "El esclavo debe de reintentar silenciosamente la transacción en curso" ER_UNUSED_22 eng "You should never see it" + spa "Nunca deberías de ver esto" ER_TABLE_SCHEMA_MISMATCH eng "Schema mismatch (%s)" + spa "Esquema no coincide (%s)" ER_TABLE_IN_SYSTEM_TABLESPACE eng "Table %-.192s in system tablespace" + spa "Tabla %-.192s en espacio de tablas del sitema" ER_IO_READ_ERROR eng "IO Read error: (%lu, %s) %s" + spa "Error de Lectura de E/S: (%lu, %s) %s" ER_IO_WRITE_ERROR eng "IO Write error: (%lu, %s) %s" + spa "Error de Escritura de E/S: (%lu, %s) %s" ER_TABLESPACE_MISSING eng "Tablespace is missing for table '%-.192s'" + spa "Espacio de tabla falta para la tabla '%-.192s'" ER_TABLESPACE_EXISTS eng "Tablespace for table '%-.192s' exists. Please DISCARD the tablespace before IMPORT" + spa "Existe Espacio de tabla para la tabla '%-.192s'. Por favor, haz DISCARD el espacio de tabla antes de hacer IMPORT" ER_TABLESPACE_DISCARDED eng "Tablespace has been discarded for table %`s" + spa "El espacio de tabla ha sido descartado para la tabla %`s" ER_INTERNAL_ERROR eng "Internal error: %-.192s" + spa "Error interno: %-.192s" ER_INNODB_IMPORT_ERROR eng "ALTER TABLE '%-.192s' IMPORT TABLESPACE failed with error %lu : '%s'" + spa "ALTER TABLE '%-.192s' IMPORT TABLESPACE ha fallado con error %lu : '%s'" ER_INNODB_INDEX_CORRUPT eng "Index corrupt: %s" + spa "Índice corrupto: %s" ER_INVALID_YEAR_COLUMN_LENGTH eng "YEAR(%lu) column type is deprecated. Creating YEAR(4) column instead" rus "Тип YEAR(%lu) более не поддерживается, вместо него будет создана колонка с типом YEAR(4)" + spa "El tipo de columna YEAR(%lu) está obsoleto. Creando columna YEAR(4) en su lugar" ER_NOT_VALID_PASSWORD eng "Your password does not satisfy the current policy requirements" + spa "Tu contraseña no satisface los requerimientos de la política en curso" ER_MUST_CHANGE_PASSWORD eng "You must SET PASSWORD before executing this statement" bgn "Трябва първо да си смените паролата със SET PASSWORD за да можете да изпълните тази команда" rum "Trebuie sa iti schimbi parola folosind SET PASSWORD inainte de a executa aceasta comanda" + spa "Debes de poner SET PASSWORD antes de ejecutar esta sentencia" ER_FK_NO_INDEX_CHILD eng "Failed to add the foreign key constaint. Missing index for constraint '%s' in the foreign table '%s'" + spa "No pude añadir la restricción de clave foránea. Falta índice para restricción '%s' en la tabla foránea '%s'" ER_FK_NO_INDEX_PARENT eng "Failed to add the foreign key constaint. Missing index for constraint '%s' in the referenced table '%s'" + spa "No pude añadir la restricción de clave foránea. Falta índice para restricción '%s' en la tabla referenciada '%s'" ER_FK_FAIL_ADD_SYSTEM eng "Failed to add the foreign key constraint '%s' to system tables" + spa "No pude añadir la restricción de clave foránea '%s' a las tablas del sistema" ER_FK_CANNOT_OPEN_PARENT eng "Failed to open the referenced table '%s'" + spa "No pude abrir la tabla referenciada '%s'" ER_FK_INCORRECT_OPTION eng "Failed to add the foreign key constraint on table '%s'. Incorrect options in FOREIGN KEY constraint '%s'" + spa "No pude añadir restricción de clave foránea en la tabla '%s'. Opciones incorrectas en restricción FOREIGN KEY '%s'" ER_DUP_CONSTRAINT_NAME eng "Duplicate %s constraint name '%s'" + spa "Duplicada restricción %s llamada '%s'" ER_PASSWORD_FORMAT eng "The password hash doesn't have the expected format. Check if the correct password algorithm is being used with the PASSWORD() function" + spa "El cálculo de contraseña no tiene el formato esperado. Revisa si se está usando el algoritmo correcto de contraseña con la función PASSWORD()" ER_FK_COLUMN_CANNOT_DROP eng "Cannot drop column '%-.192s': needed in a foreign key constraint '%-.192s'" ger "Kann Spalte '%-.192s' nicht löschen: wird für eine Fremdschlüsselbeschränkung '%-.192s' benötigt" + spa "No puedo eliminar la columna '%-.192s': necesaria en restricción de clave foránea '%-.192s'" ER_FK_COLUMN_CANNOT_DROP_CHILD eng "Cannot drop column '%-.192s': needed in a foreign key constraint '%-.192s' of table %-.192s" ger "Kann Spalte '%-.192s' nicht löschen: wird für eine Fremdschlüsselbeschränkung '%-.192s' der Tabelle %-.192s benötigt" + spa "No puedo eliminar la columna '%-.192s': necesaria en restriccón de clave foránea '%-.192s' de la tabla %-.192s" ER_FK_COLUMN_NOT_NULL eng "Column '%-.192s' cannot be NOT NULL: needed in a foreign key constraint '%-.192s' SET NULL" ger "Spalte '%-.192s' kann nicht NOT NULL sein: wird für eine Fremdschlüsselbeschränkung '%-.192s' SET NULL benötigt" + spa "La columna '%-.192s' no puede ser NOT NULL: necesaria en restricción de clave foránea '%-.192s' SET NULL" ER_DUP_INDEX eng "Duplicate index %`s. This is deprecated and will be disallowed in a future release" + spa "Índice duplicado %`s. Éste está obsoleto y será quitado en entregas futuras" ER_FK_COLUMN_CANNOT_CHANGE eng "Cannot change column '%-.192s': used in a foreign key constraint '%-.192s'" + spa "No puedo cambiar la columna '%-.192s': usada en una restricción de clave foránea '%-.192s'" ER_FK_COLUMN_CANNOT_CHANGE_CHILD eng "Cannot change column '%-.192s': used in a foreign key constraint '%-.192s' of table '%-.192s'" + spa "No puedo cambiar la columna '%-.192s': usada en restricción de clave foránea '%-.192s' de la tabla '%-.192s'" ER_FK_CANNOT_DELETE_PARENT eng "Cannot delete rows from table which is parent in a foreign key constraint '%-.192s' of table '%-.192s'" + spa "No puedo borrar filas de la tabla que es padre en restricción de clave foránea '%-.192s' de la tabla '%-.192s'" ER_MALFORMED_PACKET eng "Malformed communication packet" + spa "Paquete de comunicación malformado" ER_READ_ONLY_MODE eng "Running in read-only mode" + spa "Ejecutando em modo sólo-lectura" ER_GTID_NEXT_TYPE_UNDEFINED_GROUP eng "When GTID_NEXT is set to a GTID, you must explicitly set it again after a COMMIT or ROLLBACK. If you see this error message in the slave SQL thread, it means that a table in the current transaction is transactional on the master and non-transactional on the slave. In a client connection, it means that you executed SET GTID_NEXT before a transaction and forgot to set GTID_NEXT to a different identifier or to 'AUTOMATIC' after COMMIT or ROLLBACK. Current GTID_NEXT is '%s'" + spa "Cuando GTID_NEXT se pone a GTID, debes de ponerlo de nuevo de forma explícita tras un COMMIT o ROLLBACK. Si ves este mensaje de error en el hilo (thread) de SQL esclavo, indica que una tabla de la transacción en curso es transaccional en el maestro (master) y no transaccional en el esclavo. En una conexión cliente, indica que has ejecutado SET GTID_NEXT antes de una transacción y has olvidado poner GTID_NEXT a un identificador diferente o a 'AUTOMATIC' tras COMMIT o ROLLBACK. El GTID_NEXT actual es '%s'" ER_VARIABLE_NOT_SETTABLE_IN_SP eng "The system variable %.200s cannot be set in stored procedures" + spa "La variable de sistema %.200s no se puede poner en procedimentos almacenados" ER_CANT_SET_GTID_PURGED_WHEN_GTID_MODE_IS_OFF eng "GTID_PURGED can only be set when GTID_MODE = ON" + spa "GTID_PURGED sólo se puede usar cuando GTID_MODE = ON" ER_CANT_SET_GTID_PURGED_WHEN_GTID_EXECUTED_IS_NOT_EMPTY eng "GTID_PURGED can only be set when GTID_EXECUTED is empty" + spa "GTID_PURGED sólo se puede poner cuando GTID_EXECUTED está vacío" ER_CANT_SET_GTID_PURGED_WHEN_OWNED_GTIDS_IS_NOT_EMPTY eng "GTID_PURGED can only be set when there are no ongoing transactions (not even in other clients)" + spa "GTID_PURGED sólo se puede poner cuando no hay trasacciones en curso (ni incluso en otros clientes)" ER_GTID_PURGED_WAS_CHANGED eng "GTID_PURGED was changed from '%s' to '%s'" + spa "GTID_PURGED se cambión de '%s' a '%s'" ER_GTID_EXECUTED_WAS_CHANGED eng "GTID_EXECUTED was changed from '%s' to '%s'" + spa "GTID_EXECUTED se cambió de '%s' a '%s'" ER_BINLOG_STMT_MODE_AND_NO_REPL_TABLES eng "Cannot execute statement: impossible to write to binary log since BINLOG_FORMAT = STATEMENT, and both replicated and non replicated tables are written to" + spa "No puedo ejecutar sentencia: imposible escribir en historial (log) binario desde BINLOG_FORMAT = STATEMENT y en tablas replicadas y no replicadas" ER_ALTER_OPERATION_NOT_SUPPORTED 0A000 eng "%s is not supported for this operation. Try %s" + spa "%s no está soportado para esta operación. Prueba %s" ER_ALTER_OPERATION_NOT_SUPPORTED_REASON 0A000 eng "%s is not supported. Reason: %s. Try %s" + spa "%s no está soportado. Motivo: %s. Prueba %s" ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_COPY eng "COPY algorithm requires a lock" + spa "El algoritmo de COPY requiere de un bloqueo" ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_PARTITION eng "Partition specific operations do not yet support LOCK/ALGORITHM" + spa "Las operaciones específicas de partición aún no soportan LOCK/ALGORITHM" ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_FK_RENAME eng "Columns participating in a foreign key are renamed" + spa "Las columnas que participan en una clave foránea son renombradas" ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_COLUMN_TYPE eng "Cannot change column type" + spa "No puedo cambiar el tipo de la columna" ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_FK_CHECK eng "Adding foreign keys needs foreign_key_checks=OFF" + spa "El añadir claves foráneas necesita de foreign_key_checks=OFF" ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_IGNORE eng "Creating unique indexes with IGNORE requires COPY algorithm to remove duplicate rows" + spa "El crear ídices únicos con IGNORE requiere del algoritmo COPY para quitar filas duplicadas" ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_NOPK eng "Dropping a primary key is not allowed without also adding a new primary key" + spa "Eliminar una clave primaria no está permitido sin añadir también una nueva clave primaria" ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_AUTOINC eng "Adding an auto-increment column requires a lock" + spa "Para añadir una columna auto-incrementable se requiere de un bloqueo" ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_HIDDEN_FTS eng "Cannot replace hidden FTS_DOC_ID with a user-visible one" + spa "No puedo reemplazar FTS_DOC_ID oculta con una visible-por-usuario" ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_CHANGE_FTS eng "Cannot drop or rename FTS_DOC_ID" + spa "No puedo eliminar o renombrar FTS_DOC_ID" ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_FTS eng "Fulltext index creation requires a lock" + spa "La creación de un índice Fulltext requiere de un bloqueo" ER_SQL_SLAVE_SKIP_COUNTER_NOT_SETTABLE_IN_GTID_MODE eng "sql_slave_skip_counter can not be set when the server is running with GTID_MODE = ON. Instead, for each transaction that you want to skip, generate an empty transaction with the same GTID as the transaction" + spa "sql_slave_skip_counter no se puede poner cuando el servidor se ejecuta con GTID_MODE = ON. En su lugar, para cada transacción que desees saltar, genera una transacción vacía con el mismo GTID que la transacción" ER_DUP_UNKNOWN_IN_INDEX 23000 cze "Zdvojený klíč (číslo klíče '%-.192s')" @@ -7075,67 +7647,87 @@ ER_DUP_UNKNOWN_IN_INDEX 23000 ER_IDENT_CAUSES_TOO_LONG_PATH eng "Long database name and identifier for object resulted in path length exceeding %d characters. Path: '%s'" + spa "Nombre largo de base de datos e identificador para objeto resultó en que el tamaño de la ruta excedió de %d caracteres. Ruta: '%s'" ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_NOT_NULL eng "cannot convert NULL to non-constant DEFAULT" + spa "no puedo convertir NULL a DEFAULT no-constante" ER_MUST_CHANGE_PASSWORD_LOGIN eng "Your password has expired. To log in you must change it using a client that supports expired passwords" bgn "Паролата ви е изтекла. За да влезете трябва да я смените използвайки клиент който поддрържа такива пароли" rum "Parola ta a expirat. Pentru a te loga, trebuie sa o schimbi folosind un client ce suporta parole expirate" + spa "Tu contraseña ha expirado. Para ingresar, debes de cambiarla usando un cliente que soporte contraseñas expiradas" ER_ROW_IN_WRONG_PARTITION eng "Found a row in wrong partition %s" + spa "Hallada una fila en partición equivocada %s" swe "Hittade en rad i fel partition %s" ER_MTS_EVENT_BIGGER_PENDING_JOBS_SIZE_MAX eng "Cannot schedule event %s, relay-log name %s, position %s to Worker thread because its size %lu exceeds %lu of slave_pending_jobs_size_max" + spa "No puedo organizar evento %s, nombre de historial (log)-reenvío %s, posiciona %s a hilo (thread) de Trabajador porque su tamaño %lu excede %lu de slave_pending_jobs_size_max" ER_INNODB_NO_FT_USES_PARSER eng "Cannot CREATE FULLTEXT INDEX WITH PARSER on InnoDB table" + spa "No puedo CREATE FULLTEXT INDEX WITH PARSER en tabla InnoDB" ER_BINLOG_LOGICAL_CORRUPTION eng "The binary log file '%s' is logically corrupted: %s" + spa "El fichero de historial (log) binario '%s' está lógicamente corrupto: %s" ER_WARN_PURGE_LOG_IN_USE eng "file %s was not purged because it was being read by %d thread(s), purged only %d out of %d files" + spa "el fchero %s no se ha purgado porque estaba siendo leído por hilo(s) (thread) %d, purgado sólo %d de %d ficheros" ER_WARN_PURGE_LOG_IS_ACTIVE eng "file %s was not purged because it is the active log file" + spa "el fichero %s no fue purgado porque es el fichero activo de historial (log)" ER_AUTO_INCREMENT_CONFLICT eng "Auto-increment value in UPDATE conflicts with internally generated values" + spa "Valor de Auto-incremento en UPDATE está en conflicto con valores generados internamente" WARN_ON_BLOCKHOLE_IN_RBR eng "Row events are not logged for %s statements that modify BLACKHOLE tables in row format. Table(s): '%-.192s'" + spa "Los eventos de fila no son puestos en historial (log) para sentencias %s que modifican tablas BLACKHOLE en formato de fila. Tabla(s): '%-.192s'" ER_SLAVE_MI_INIT_REPOSITORY eng "Slave failed to initialize master info structure from the repository" + spa "El esclavo falló al inicializar información de estructura del maestro (master) desde el repositorio" ER_SLAVE_RLI_INIT_REPOSITORY eng "Slave failed to initialize relay log info structure from the repository" + spa "El esclavo falló al inicializar estructura de información de historial (log) de reenvío desde el repositorio" ER_ACCESS_DENIED_CHANGE_USER_ERROR 28000 eng "Access denied trying to change to user '%-.48s'@'%-.64s' (using password: %s). Disconnecting" bgn "Отказан достъп при опит за смяна към потребител %-.48s'@'%-.64s' (използвана парола: %s). Затваряне на връзката" + spa "Acceso denegado intentando cambiar a usuario '%-.48s'@'%-.64s' (usando contraseña: %s). Desconectando" ER_INNODB_READ_ONLY eng "InnoDB is in read only mode" hindi "InnoDB केवल READ-ONLY मोड में है" + spa "InnoDB está en modo de sólo lectura" ER_STOP_SLAVE_SQL_THREAD_TIMEOUT eng "STOP SLAVE command execution is incomplete: Slave SQL thread got the stop signal, thread is busy, SQL thread will stop once the current task is complete" + spa "La ejecución del comando STOP SLAVE está incompleta: El hilo (thread) de SQL esclavo recibió la señal de parada, hilo (thread) ocupado, el hilo (thread) SQL se parará una vez que se complete la tarea actual" ER_STOP_SLAVE_IO_THREAD_TIMEOUT eng "STOP SLAVE command execution is incomplete: Slave IO thread got the stop signal, thread is busy, IO thread will stop once the current task is complete" + spa "La ejecución del comando STOP SLAVE está incompleta: El hilo (thread) de E/S esclavo recibió la señal de parada, hilo (thread) ocupado, el hilo (thread) de E/S se parará una vez que se complete la tarea actual" ER_TABLE_CORRUPT eng "Operation cannot be performed. The table '%-.64s.%-.64s' is missing, corrupt or contains bad data" + spa "La operación no se puede realizar. Falta la tabla '%-.64s.%-.64s', está corrupta o contiene datos malos" ER_TEMP_FILE_WRITE_FAILURE eng "Temporary file write failure" + spa "Fallo al escribir fichero temporal" ER_INNODB_FT_AUX_NOT_HEX_ID eng "Upgrade index name failed, please use create index(alter table) algorithm copy to rebuild index" + spa "Falló la mejora de nombre de índice. Por favor, use una copia del algoritmo de create index(alter table) para reconstruir el índice" # @@ -7155,18 +7747,24 @@ ER_UNUSED_18 eng "" ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED eng "Function or expression '%s' cannot be used in the %s clause of %`s" + spa "La Función o expresión '%s' no se puede usar en la cláusula %s de %`s" ER_UNUSED_19 eng "" ER_PRIMARY_KEY_BASED_ON_GENERATED_COLUMN eng "Primary key cannot be defined upon a generated column" + spa "La clave primaria no se puede definir sobre una columna generada" ER_KEY_BASED_ON_GENERATED_VIRTUAL_COLUMN eng "Key/Index cannot be defined on a virtual generated column" + spa "Key/Index no se puede definir en una columna virtual generada" ER_WRONG_FK_OPTION_FOR_GENERATED_COLUMN eng "Cannot define foreign key with %s clause on a generated column" + spa "No puedo definir clave foránea con cláusula %s en una columna generada" ER_WARNING_NON_DEFAULT_VALUE_FOR_GENERATED_COLUMN eng "The value specified for generated column '%s' in table '%s' has been ignored" + spa "El valor especificado para columna generada '%s' en la tabla '%s' ha sido ignorada" ER_UNSUPPORTED_ACTION_ON_GENERATED_COLUMN eng "This is not yet supported for generated columns" + spa "Esto no está aún soportado para columnas generadas" ER_UNUSED_20 eng "" ER_UNUSED_21 @@ -7174,184 +7772,257 @@ ER_UNUSED_21 ER_UNSUPPORTED_ENGINE_FOR_GENERATED_COLUMNS eng "%s storage engine does not support generated columns" hindi "स्टोरेज इंजन %s COMPUTED कॉलम्स को सपोर्ट नहीं करता" + spa "El motor de almacenaje %s no soporta columnas generadas" ER_UNKNOWN_OPTION eng "Unknown option '%-.64s'" hindi "अज्ञात विकल्प '%-.64s'" + spa "Opción desconocida '%-.64s'" ER_BAD_OPTION_VALUE eng "Incorrect value '%-.64T' for option '%-.64s'" hindi "गलत मान '%-.64T' विकल्प '%-.64s' के लिए" + spa "Valor incorrecto '%-.64T' para opción '%-.64s'" ER_UNUSED_6 eng "You should never see it" + spa "Nunca deberías de ver esto" ER_UNUSED_7 eng "You should never see it" + spa "Nunca deberías de ver esto" ER_UNUSED_8 eng "You should never see it" + spa "Nunca deberías de ver esto" ER_DATA_OVERFLOW 22003 eng "Got overflow when converting '%-.128s' to %-.32s. Value truncated" + spa "Obtenido desbordamiento al convertir '%-.128s' a %-.32s. Valor truncado" ER_DATA_TRUNCATED 22003 eng "Truncated value '%-.128s' when converting to %-.32s" + spa "Valor truncado '%-.128s' al convertir a %-.32s" ER_BAD_DATA 22007 eng "Encountered illegal value '%-.128s' when converting to %-.32s" + spa "Encontrado valor ilegal '%-.128s' al convertir a %-.32s" ER_DYN_COL_WRONG_FORMAT eng "Encountered illegal format of dynamic column string" + spa "Encontrado formato ilegal de cadena en columna dinámica" ER_DYN_COL_IMPLEMENTATION_LIMIT eng "Dynamic column implementation limit reached" + spa "Alcanzado límite de implementación de columna dinámica" ER_DYN_COL_DATA 22007 eng "Illegal value used as argument of dynamic column function" + spa "Valor ilegal usado como argumento de función de columna dinámica" ER_DYN_COL_WRONG_CHARSET eng "Dynamic column contains unknown character set" + spa "Columna dinámica contiene conjunto desconocido de caracteres" ER_ILLEGAL_SUBQUERY_OPTIMIZER_SWITCHES eng "At least one of the 'in_to_exists' or 'materialization' optimizer_switch flags must be 'on'" hindi "कम से कम 'in_to_exists' या 'materialization' optimizer_switch फ्लैग 'ON' होना चाहिए" + spa "Al menos una de las banderas de optimizer_switch 'in_to_exists' o 'materialization' debe de estar a 'on'" ER_QUERY_CACHE_IS_DISABLED eng "Query cache is disabled (resize or similar command in progress); repeat this command later" + spa "Caché de consulta (query) desactivada (el comando ajustar o similar está en proceso); repite este comando más tarde" ER_QUERY_CACHE_IS_GLOBALY_DISABLED eng "Query cache is globally disabled and you can't enable it only for this session" hindi "क्वेरी कैश ग्लोबल स्तर पर DISABLED है और आप इसे केवल सत्र के लिए ENABLE नहीं कर सकते" + spa "La caché de consulta (query) está desactivada de forma global y no puedes activarla sólo para esta sesión" ER_VIEW_ORDERBY_IGNORED eng "View '%-.192s'.'%-.192s' ORDER BY clause ignored because there is other ORDER BY clause already" + spa "Cláusula de vista '%-.192s'.'%-.192s' ORDER BY ignorada porque ya hay otra clásula ORDER BY" ER_CONNECTION_KILLED 70100 eng "Connection was killed" hindi "कनेक्शन को समाप्त कर दिया गया है" + spa "La conexión fue matada" ER_UNUSED_12 eng "You should never see it" + spa "Nunca deberías de ver esto" ER_INSIDE_TRANSACTION_PREVENTS_SWITCH_SKIP_REPLICATION eng "Cannot modify @@session.skip_replication inside a transaction" + spa "No puedo modificar @@session.skip_replication dentro de una transacción" ER_STORED_FUNCTION_PREVENTS_SWITCH_SKIP_REPLICATION eng "Cannot modify @@session.skip_replication inside a stored function or trigger" + spa "No puedo modificar @@session.skip_replication dentro de una función almacenada o disparador" ER_QUERY_EXCEEDED_ROWS_EXAMINED_LIMIT eng "Query execution was interrupted. The query examined at least %llu rows, which exceeds LIMIT ROWS EXAMINED (%llu). The query result may be incomplete" + spa "Se ha interrumpido la ejecución de la consulta (query). La consulta (query) examinó al menos %llu filas, lo cual excede LIMIT ROWS EXAMINED (%llu). El resultado de la consulta (query) puede estar incompleto" ER_NO_SUCH_TABLE_IN_ENGINE 42S02 eng "Table '%-.192s.%-.192s' doesn't exist in engine" hindi "टेबल '%-.192s.%-.192s' इंजन में मौजूद नहीं है" + spa "La tabla '%-.192s.%-.192s' no existe en el motor" swe "Det finns ingen tabell som heter '%-.192s.%-.192s' i handlern" ER_TARGET_NOT_EXPLAINABLE eng "Target is not running an EXPLAINable command" + spa "El objetivo no está ejecutando un comando EXPLAINable" ER_CONNECTION_ALREADY_EXISTS eng "Connection '%.*s' conflicts with existing connection '%.*s'" + spa "Conflicto de conexión '%.*s' con la conexión existente '%.*s'" ER_MASTER_LOG_PREFIX eng "Master '%.*s': " + spa "Maestro (master) '%.*s': " ER_CANT_START_STOP_SLAVE eng "Can't %s SLAVE '%.*s'" + spa "No puedo %s ESCLAVO '%.*s'" ER_SLAVE_STARTED eng "SLAVE '%.*s' started" + spa "ESCLAVO '%.*s' arrancado" ER_SLAVE_STOPPED eng "SLAVE '%.*s' stopped" + spa "ESCLAVO '%.*s' parado" ER_SQL_DISCOVER_ERROR eng "Engine %s failed to discover table %`-.192s.%`-.192s with '%s'" + spa "El motor %s no pudo descubr la tabla %`-.192s.%`-.192s con '%s'" ER_FAILED_GTID_STATE_INIT eng "Failed initializing replication GTID state" + spa "Fallo inicializando estado de réplica GTID" ER_INCORRECT_GTID_STATE eng "Could not parse GTID list" + spa "No pude analizar la lista GTID" ER_CANNOT_UPDATE_GTID_STATE eng "Could not update replication slave gtid state" + spa "No pude actualizar estado gtid de esclavo de réplica" ER_DUPLICATE_GTID_DOMAIN eng "GTID %u-%u-%llu and %u-%u-%llu conflict (duplicate domain id %u)" + spa "Conflicto GTID %u-%u-%llu y %u-%u-%llu (duplicado id de dominio %u)" ER_GTID_OPEN_TABLE_FAILED eng "Failed to open %s.%s" ger "Öffnen von %s.%s fehlgeschlagen" + spa "No pude abrir %s.%s" ER_GTID_POSITION_NOT_FOUND_IN_BINLOG eng "Connecting slave requested to start from GTID %u-%u-%llu, which is not in the master's binlog" + spa "Se ha requerido que conectar esclavo arranque desde GTID %u-%u-%llu, el cual no está en el binlog del maestro (master)" ER_CANNOT_LOAD_SLAVE_GTID_STATE eng "Failed to load replication slave GTID position from table %s.%s" + spa "No pude cargar posición GTID de esclavo de réplica desde la tabla %s.%s" ER_MASTER_GTID_POS_CONFLICTS_WITH_BINLOG eng "Specified GTID %u-%u-%llu conflicts with the binary log which contains a more recent GTID %u-%u-%llu. If MASTER_GTID_POS=CURRENT_POS is used, the binlog position will override the new value of @@gtid_slave_pos" + spa "El especificado GTID %u-%u-%llu está en conflicto con el historial (log) binario el cual contiene un más reciente GTID %u-%u-%llu. Si se usa MASTER_GTID_POS=CURRENT_POS, la posición de binlog sobreescribirá el nuevo valor de @@gtid_slave_pos" ER_MASTER_GTID_POS_MISSING_DOMAIN eng "Specified value for @@gtid_slave_pos contains no value for replication domain %u. This conflicts with the binary log which contains GTID %u-%u-%llu. If MASTER_GTID_POS=CURRENT_POS is used, the binlog position will override the new value of @@gtid_slave_pos" + spa "El valor especificado para @@gtid_slave_pos no contiene valor para dominio de réplica %u. Esto está en conflicto con el historial (log) binario el cual contiene un GTID %u-%u-%llu. Si se usa MASTER_GTID_POS=CURRENT_POS, la posición binlog sobreescribirá el nuevo valor de @@gtid_slave_pos" ER_UNTIL_REQUIRES_USING_GTID eng "START SLAVE UNTIL master_gtid_pos requires that slave is using GTID" + spa "START SLAVE UNTIL master_gtid_pos requiere que esclavo esté usando GTID" ER_GTID_STRICT_OUT_OF_ORDER eng "An attempt was made to binlog GTID %u-%u-%llu which would create an out-of-order sequence number with existing GTID %u-%u-%llu, and gtid strict mode is enabled" + spa "Se ha intentado hacer binlog de GTID %u-%u-%llu lo cual crearía un número de secuencia fuera de orden con el existente GTID %u-%u-%llu y está activado gtid en modo estricto" ER_GTID_START_FROM_BINLOG_HOLE eng "The binlog on the master is missing the GTID %u-%u-%llu requested by the slave (even though a subsequent sequence number does exist), and GTID strict mode is enabled" + spa "Al binlog del maestro (master) le falta el GTID %u-%u-%llu requerido por el esclavo (incluso aunque existe un número posterior de secuencia) y está activado GTID en modo estricto" ER_SLAVE_UNEXPECTED_MASTER_SWITCH eng "Unexpected GTID received from master after reconnect. This normally indicates that the master server was replaced without restarting the slave threads. %s" + spa "Se ha recibido un GTID inesperado desde el maestro (master) tras reconectar. Esto indica normalmente que el servidor maestro (master) ha sido reemplazado sin rearrancar los hilos (threads) del esclavo. %s" ER_INSIDE_TRANSACTION_PREVENTS_SWITCH_GTID_DOMAIN_ID_SEQ_NO eng "Cannot modify @@session.gtid_domain_id or @@session.gtid_seq_no inside a transaction" + spa "No puedo modificar @@session.gtid_domain_id o @@session.gtid_seq_no dentro de una transacción" ER_STORED_FUNCTION_PREVENTS_SWITCH_GTID_DOMAIN_ID_SEQ_NO eng "Cannot modify @@session.gtid_domain_id or @@session.gtid_seq_no inside a stored function or trigger" + spa "No puedo modificar @@session.gtid_domain_id o @@session.gtid_seq_no dengro de una función almacenada o de un disparador" ER_GTID_POSITION_NOT_FOUND_IN_BINLOG2 eng "Connecting slave requested to start from GTID %u-%u-%llu, which is not in the master's binlog. Since the master's binlog contains GTIDs with higher sequence numbers, it probably means that the slave has diverged due to executing extra erroneous transactions" + spa "Se ha requerido arrancar la conexión a esclavo desde GTID %u-%u-%llu, el cual no está en el binlog del maestro (master). Ya que el binlog del maestro (master) contiene GTIDs con números mayores de secuencia, es probable que indique que el esclavo diverge debido a ejecutar transacciones extra erróneas" ER_BINLOG_MUST_BE_EMPTY eng "This operation is not allowed if any GTID has been logged to the binary log. Run RESET MASTER first to erase the log" + spa "Esta operación no está permitida si cualquier GTID ha sido puesto en historial (log) binario. Ejecuta primero RESET MASTER para borrar el historial (log)" ER_NO_SUCH_QUERY eng "Unknown query id: %lld" ger "Unbekannte Abfrage-ID: %lld" hindi "अज्ञात क्वेरी ID: %lld" rus "Неизвестный номер запроса: %lld" + spa "Id desconocido de consulta (query): %lld" ER_BAD_BASE64_DATA eng "Bad base64 data as position %u" + spa "Datos base64 malos en posición %u" ER_INVALID_ROLE OP000 eng "Invalid role specification %`s" hindi "अमान्य रोल विनिर्देश %`s" rum "Rolul %`s este invalid" + spa "Especificación inválida de rol %`s" ER_INVALID_CURRENT_USER 0L000 eng "The current user is invalid" - hindi "वर्तमान यूज़र अमान्य है" + hindi "वर्तमान यूज़र अमान्य है" rum "Utilizatorul curent este invalid" + spa "El usuario en curso no es válido" ER_CANNOT_GRANT_ROLE eng "Cannot grant role '%s' to: %s" - hindi "रोल '%s', %s को प्रदान नहीं कर सकते" + hindi "रोल '%s', %s को प्रदान नहीं कर सकते" rum "Rolul '%s' nu poate fi acordat catre: %s" + spa "No puedo conceder rol '%s' a: %s" ER_CANNOT_REVOKE_ROLE eng "Cannot revoke role '%s' from: %s" - hindi "रोल '%s', %s से हटाया नहीं जा सका" + hindi "रोल '%s', %s से हटाया नहीं जा सका" rum "Rolul '%s' nu poate fi revocat de la: %s" + spa "No puedo revocar rol '%s' desde: %s" ER_CHANGE_SLAVE_PARALLEL_THREADS_ACTIVE eng "Cannot change @@slave_parallel_threads while another change is in progress" + spa "No puedo cambiar @@slave_parallel_threads mientras otro cambio esté en proceso" ER_PRIOR_COMMIT_FAILED eng "Commit failed due to failure of an earlier commit on which this one depends" + spa "Ha fallado la acometida (commit) debido a un fallo previo en acometida (commit) de la que depende ésta" ER_IT_IS_A_VIEW 42S02 eng "'%-.192s' is a view" hindi "'%-.192s' एक VIEW है" + spa "'%-.192s' es una vista" ER_SLAVE_SKIP_NOT_IN_GTID eng "When using parallel replication and GTID with multiple replication domains, @@sql_slave_skip_counter can not be used. Instead, setting @@gtid_slave_pos explicitly can be used to skip to after a given GTID position" + spa "Al usar réplica paralela y GTID con múltiples dominios de réplica, no se puede usar @@sql_slave_skip_counter. En su lugar, poner @@gtid_slave_pos de forma explícita se puede usar para saltar tras una posición GTID dada" ER_TABLE_DEFINITION_TOO_BIG eng "The definition for table %`s is too big" hindi "टेबल %`s की परिभाषा बहुत बड़ी है" + spa "La definición para la tabla %`s es demasiado larga" ER_PLUGIN_INSTALLED eng "Plugin '%-.192s' already installed" hindi "प्लग-इन '%-.192s' पहले से ही इन्स्टॉल्ड है" rus "Плагин '%-.192s' уже установлен" + spa "Ya instalado el enchufe '%-.192s'" ER_STATEMENT_TIMEOUT 70100 eng "Query execution was interrupted (max_statement_time exceeded)" + spa "Se ha interrumpido la ejecución de una consulta (query) (excedido max_statement_time) ER_SUBQUERIES_NOT_SUPPORTED 42000 eng "%s does not support subqueries or stored functions" + spa "%s no soporta subconsultas (subqueries) o funciones almacenadas" ER_SET_STATEMENT_NOT_SUPPORTED 42000 eng "The system variable %.200s cannot be set in SET STATEMENT." + spa "La variable del sistema %.200s no se puede poner en SET STATEMENT." ER_UNUSED_9 eng "You should never see it" + spa "Nunca deberías de ver esto" ER_USER_CREATE_EXISTS eng "Can't create user '%-.64s'@'%-.64s'; it already exists" hindi "यूज़र '%-.64s'@'%-.64s' को नहीं बना सकते; यह पहले से ही मौजूद है" + spa "No puedo crear usuario '%-.64s'@'%-.64s'; ya existe" ER_USER_DROP_EXISTS eng "Can't drop user '%-.64s'@'%-.64s'; it doesn't exist" hindi "यूज़र '%-.64s'@'%-.64s' को ड्रॉप नहीं कर सकते; यह मौजूद नहीं है" + spa "No puedo eliminar usuario '%-.64s'@'%-.64s'; no existe" ER_ROLE_CREATE_EXISTS eng "Can't create role '%-.64s'; it already exists" hindi "रोल '%-.64s' को नहीं बना सकते; यह पहले से ही मौजूद है" + spa "No puedo crear rol '%-.64s'; ya existe" ER_ROLE_DROP_EXISTS eng "Can't drop role '%-.64s'; it doesn't exist" hindi "रोल '%-.64s' को ड्रॉप नहीं कर सकते; यह मौजूद नहीं है" + spa "No puedo eliminar rol '%-.64s'; no existe" ER_CANNOT_CONVERT_CHARACTER eng "Cannot convert '%s' character 0x%-.64s to '%s'" + spa "No puedo convertir '%s' carácter 0x%-.64s a '%s'" ER_INVALID_DEFAULT_VALUE_FOR_FIELD 22007 eng "Incorrect default value '%-.128T' for column '%.192s'" hindi "गलत डिफ़ॉल्ट मान '%-.128T' कॉलम '%.192s' के लिए" + spa "Valor por defecto incorrecto '%-.128T' para columna '%.192s'" ER_KILL_QUERY_DENIED_ERROR eng "You are not owner of query %lu" ger "Sie sind nicht Eigentümer von Abfrage %lu" hindi "आप क्वेरी %lu के OWNER नहीं हैं" rus "Вы не являетесь владельцем запроса %lu" + spa "No eres el propietario de la consulta (query) %lu" ER_NO_EIS_FOR_FIELD eng "Engine-independent statistics are not collected for column '%s'" hindi "Engine-independent सांख्यिकी कॉलम '%s' के लिए एकत्रित नहीं किया जा रहा है" + spa "No se han recolectado estadísticas independientes del motor para la columna '%s'" ukr "Незалежна від типу таблиці статистика не збирається для стовбця '%s'" ER_WARN_AGGFUNC_DEPENDENCE eng "Aggregate function '%-.192s)' of SELECT #%d belongs to SELECT #%d" + spa "La función de agregación '%-.192s)' del SELECT #%d pertenece a SELECT #%d" ukr "Агрегатна функція '%-.192s)' з SELECTу #%d належить до SELECTу #%d" WARN_INNODB_PARTITION_OPTION_IGNORED eng "<%-.64s> option ignored for InnoDB partition" + spa "<%-.64s> opción ignorada para partición InnoDB" # # Internal errors, not used @@ -7363,305 +8034,420 @@ skip-to-error-number 3000 ER_FILE_CORRUPT eng "File %s is corrupted" + spa "El fichero %s está corrupto" ER_ERROR_ON_MASTER eng "Query partially completed on the master (error on master: %d) and was aborted. There is a chance that your master is inconsistent at this point. If you are sure that your master is ok, run this query manually on the slave and then restart the slave with SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; START SLAVE;. Query:'%s'" + spa "Consulta (query) completada de forma parcial en el maestro (master) (error en maestro (master): %d) y se ha abortado. Existe una posibilidad de que tu maestro (master) esté inconsitente en este punto. Si estás seguro de que tu maestro (master) está ok, ejecuta esta consulta (query) de forma manual en el esclavo y luego rearranca el esclavo mediante SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; START SLAVE;. Consulta (query):'%s'" ER_INCONSISTENT_ERROR eng "Query caused different errors on master and slave. Error on master: message (format)='%s' error code=%d; Error on slave:actual message='%s', error code=%d. Default database:'%s'. Query:'%s'" + spa "La consulta (query) ha ocasionado diferentes errores en el maestro (master) y en el esclavo. Error en maestro (master): mensaje (formato)='%s' código de error=%d; Error en esclavo: mensaje actual='%s', código de error=%d. Base de datos por defecto:'%s'. Consulta (query):'%s'" ER_STORAGE_ENGINE_NOT_LOADED eng "Storage engine for table '%s'.'%s' is not loaded." + spa "El motor de almacenaje para la tabla '%s'.'%s' no ha sido cargado." ER_GET_STACKED_DA_WITHOUT_ACTIVE_HANDLER 0Z002 eng "GET STACKED DIAGNOSTICS when handler not active" + spa "GET STACKED DIAGNOSTICS cuando el manejador no está activo" ER_WARN_LEGACY_SYNTAX_CONVERTED eng "%s is no longer supported. The statement was converted to %s." + spa "%s ya no está soportada. Se ha convertido la sentencia a %s." ER_BINLOG_UNSAFE_FULLTEXT_PLUGIN eng "Statement is unsafe because it uses a fulltext parser plugin which may not return the same value on the slave." + spa "La sentencia no es segura porque usa un enchufe analizador de fulltext que puede que no devuelva el mismo valor en el esclavo." ER_CANNOT_DISCARD_TEMPORARY_TABLE eng "Cannot DISCARD/IMPORT tablespace associated with temporary table" + spa "No puedo DISCARD/IMPORT espacio de tabla asociado con tabla temporal" ER_FK_DEPTH_EXCEEDED eng "Foreign key cascade delete/update exceeds max depth of %d." + spa "La cascada borrar/actualizar en clave foránea excede la máxima profundidad de %d." ER_COL_COUNT_DOESNT_MATCH_PLEASE_UPDATE_V2 eng "Column count of %s.%s is wrong. Expected %d, found %d. Created with MariaDB %d, now running %d. Please use mariadb-upgrade to fix this error." ger "Spaltenanzahl von %s.%s falsch. %d erwartet, aber %d erhalten. Erzeugt mit MariaDB %d, jetzt unter %d. Bitte benutzen Sie mariadb-upgrade, um den Fehler zu beheben" + spa "El contador de columna de %s.%s está equivocado. Se esperaba %d, hallado %d, Creado con MariaDB %d, ahora ejecutando %d. Por favor, usa mariadb-upgrade para arreglar este error." ER_WARN_TRIGGER_DOESNT_HAVE_CREATED eng "Trigger %s.%s.%s does not have CREATED attribute." + spa "El disparador %s.%s.%s no tiene el atributo CREATED." ER_REFERENCED_TRG_DOES_NOT_EXIST_MYSQL eng "Referenced trigger '%s' for the given action time and event type does not exist." + spa "El disparador referenciado '%s' para el momento dado de acción y el tipo de evento no existe." ER_EXPLAIN_NOT_SUPPORTED eng "EXPLAIN FOR CONNECTION command is supported only for SELECT/UPDATE/INSERT/DELETE/REPLACE" + spa "El comando EXPLAIN FOR CONNECTION sólo se soporta para SELECT/UPDATE/INSERT/DELETE/REPLACE" ER_INVALID_FIELD_SIZE eng "Invalid size for column '%-.192s'." + spa "Tamaño inválido para columna '%-.192s'." ER_MISSING_HA_CREATE_OPTION eng "Table storage engine '%-.64s' found required create option missing" + spa "El motor hallado de almacenaje de tabla '%-.64s' requería de la opción de crear que falta" ER_ENGINE_OUT_OF_MEMORY eng "Out of memory in storage engine '%-.64s'." + spa "Memoria agotada en motor de almacenaje '%-.64s'." ER_PASSWORD_EXPIRE_ANONYMOUS_USER eng "The password for anonymous user cannot be expired." + spa "La contraseña para usuario anónimo no puede expirar." ER_SLAVE_SQL_THREAD_MUST_STOP eng "This operation cannot be performed with a running slave sql thread; run STOP SLAVE SQL_THREAD first" + spa "Esta operación no se puede realizar con hilo (thread) sql esclavo en ejecución; ejecuta STOP SLAVE SQL_THREAD primero" ER_NO_FT_MATERIALIZED_SUBQUERY eng "Cannot create FULLTEXT index on materialized subquery" + spa "No puedo crear índice FULLTEXT en subconsulta (subquery) materializada" ER_INNODB_UNDO_LOG_FULL eng "Undo Log error: %s" + spa "Error de Historial (log) de Deshacer: %s" ER_INVALID_ARGUMENT_FOR_LOGARITHM 2201E eng "Invalid argument for logarithm" + spa "Argumento inválido para algoritmo" ER_SLAVE_CHANNEL_IO_THREAD_MUST_STOP eng "This operation cannot be performed with a running slave io thread; run STOP SLAVE IO_THREAD FOR CHANNEL '%s' first." + spa "Esta operación no se puede realizar con un hilo (thread) de e/s de esclavo en ejecución; ejecuta STOP SLAVE IO_THREAD FOR CHANNEL '%s' primero." ER_WARN_OPEN_TEMP_TABLES_MUST_BE_ZERO eng "This operation may not be safe when the slave has temporary tables. The tables will be kept open until the server restarts or until the tables are deleted by any replicated DROP statement. Suggest to wait until slave_open_temp_tables = 0." + spa "Esta operación puede no ser segura cuando el esclavo tenga tablas temporales. Las tablas serán mantenidas abiertas hasta que el servidor rearranque o hasta que las tablas sean borradas por cualquier sentencia DROP replicada. Se sugiere esperar hasta slave_open_temp_tables = 0." ER_WARN_ONLY_MASTER_LOG_FILE_NO_POS eng "CHANGE MASTER TO with a MASTER_LOG_FILE clause but no MASTER_LOG_POS clause may not be safe. The old position value may not be valid for the new binary log file." + spa "CHANGE MASTER TO mediante una cláusula MASTER_LOG_FILE pero sin existir cláusula MASTER_LOG_POS puede no ser seguro. El valor viejo de la posición puede no ser válido para el nuevo fichero binario de historial (log)." ER_QUERY_TIMEOUT eng "Query execution was interrupted, maximum statement execution time exceeded" + spa "Se ha interrumpido la ejecución de la consulta (query), se ha excedido el tiempo máximo de ejecución de sentencia" ER_NON_RO_SELECT_DISABLE_TIMER eng "Select is not a read only statement, disabling timer" + spa "Select no es una sentencia de sólo lectura, desactivando cronómetro" ER_DUP_LIST_ENTRY eng "Duplicate entry '%-.192s'." + spa "Entrada duplicada '%-.192s'." ER_SQL_MODE_NO_EFFECT eng "'%s' mode no longer has any effect. Use STRICT_ALL_TABLES or STRICT_TRANS_TABLES instead." + spa "El modo '%s' ya no tiene efecto alguno. Use STRICT_ALL_TABLES o STRICT_TRANS_TABLES en su lugar" ER_AGGREGATE_ORDER_FOR_UNION eng "Expression #%u of ORDER BY contains aggregate function and applies to a UNION" + spa "La expresión #%u de ORDER BY contiene función de agregación y se aplica a UNION" ER_AGGREGATE_ORDER_NON_AGG_QUERY eng "Expression #%u of ORDER BY contains aggregate function and applies to the result of a non-aggregated query" + spa "La expresión #%u de ORDER BY contiene función de agregación y se aplica al resultado de una consulta (query) no agregada" ER_SLAVE_WORKER_STOPPED_PREVIOUS_THD_ERROR eng "Slave worker has stopped after at least one previous worker encountered an error when slave-preserve-commit-order was enabled. To preserve commit order, the last transaction executed by this thread has not been committed. When restarting the slave after fixing any failed threads, you should fix this worker as well." + spa "El trabajador esclavo se ha parado tras al menos encontrar un error en trabajador previo cuando slave-preserve-commit-order fue activado. Para preserver el orden de acometida (commit), la última transacción ejecutada por este hilo (thread) no se ha acometido (commit). Al rearrancar el esclavo tras arreglar cualquier hilo (thread) fallido, deberías de arreglar este trabajador también" ER_DONT_SUPPORT_SLAVE_PRESERVE_COMMIT_ORDER eng "slave_preserve_commit_order is not supported %s." + spa "slave_preserve_commit_order no está soportado %s." ER_SERVER_OFFLINE_MODE eng "The server is currently in offline mode" + spa "El servidor se encuentra actualmente en modo fuera de línea" ER_GIS_DIFFERENT_SRIDS eng "Binary geometry function %s given two geometries of different srids: %u and %u, which should have been identical." + spa "La función binaria de geomertía %s ha dado dos geometrías de diferente gis: %u y %u, que deberían de haber sido idénticas" ER_GIS_UNSUPPORTED_ARGUMENT eng "Calling geometry function %s with unsupported types of arguments." + spa "Llamando a función de geometría %s con tipos de argumento no soportados." ER_GIS_UNKNOWN_ERROR eng "Unknown GIS error occurred in function %s." + spa "Ha ocurrido un error GIS desconocido en función %s." ER_GIS_UNKNOWN_EXCEPTION eng "Unknown exception caught in GIS function %s." + spa "Excepción desconocida capturada en función GIS %s." ER_GIS_INVALID_DATA 22023 eng "Invalid GIS data provided to function %s." + spa "Suministrados datos GIS inválidos a función %s." ER_BOOST_GEOMETRY_EMPTY_INPUT_EXCEPTION eng "The geometry has no data in function %s." + spa "La geometría no tiene datos en función %s." ER_BOOST_GEOMETRY_CENTROID_EXCEPTION eng "Unable to calculate centroid because geometry is empty in function %s." + spa "Imposible calcular centroid porque la geometría está vacía en la función %s." ER_BOOST_GEOMETRY_OVERLAY_INVALID_INPUT_EXCEPTION eng "Geometry overlay calculation error: geometry data is invalid in function %s." + spa "Error de cálculo de superposición de geometría: el dato de geometría es inválido en la función %s." ER_BOOST_GEOMETRY_TURN_INFO_EXCEPTION eng "Geometry turn info calculation error: geometry data is invalid in function %s." + spa "Error de cálculo de información devuelto: los datos de geometría son inválidos en la función %s." ER_BOOST_GEOMETRY_SELF_INTERSECTION_POINT_EXCEPTION eng "Analysis procedures of intersection points interrupted unexpectedly in function %s." + spa "Los procedimientos de análisis de puntos de intersección se interrumpieron inesperadamente en la función %s." ER_BOOST_GEOMETRY_UNKNOWN_EXCEPTION eng "Unknown exception thrown in function %s." + spa "Excepción desconocida lanzada en la función %s." ER_STD_BAD_ALLOC_ERROR eng "Memory allocation error: %-.256s in function %s." + spa "Error en adjudicación de memoria: %-.256s en la función %s." ER_STD_DOMAIN_ERROR eng "Domain error: %-.256s in function %s." + spa "Error en dominio: %-.256s en función %s." ER_STD_LENGTH_ERROR eng "Length error: %-.256s in function %s." + spa "Error de tamaño: %-.256s en función %s." ER_STD_INVALID_ARGUMENT eng "Invalid argument error: %-.256s in function %s." + spa "Error de argumento inválido: %-.256s en función %s." ER_STD_OUT_OF_RANGE_ERROR eng "Out of range error: %-.256s in function %s." + spa "Error de fuera de rango: %-.256s en función %s." ER_STD_OVERFLOW_ERROR eng "Overflow error error: %-.256s in function %s." + spa "Error de desbordamiento: %-.256s en función %s." ER_STD_RANGE_ERROR eng "Range error: %-.256s in function %s." + spa "Error de rango: %-.256s en función %s." ER_STD_UNDERFLOW_ERROR eng "Underflow error: %-.256s in function %s." + spa "Error de refreno (underflow): %-.256s en la función %s." ER_STD_LOGIC_ERROR eng "Logic error: %-.256s in function %s." + spa "Error lógico: %-.256s en la función %s." ER_STD_RUNTIME_ERROR eng "Runtime error: %-.256s in function %s." + spa "Error en tiempo de ejecución: %-.256s en la función %s." ER_STD_UNKNOWN_EXCEPTION eng "Unknown exception: %-.384s in function %s." + spa "Excepción desconocida: %-.384s en la función %s." ER_GIS_DATA_WRONG_ENDIANESS eng "Geometry byte string must be little endian." + spa "La cadena de byte en Geometría debe de ser 'little endian'." ER_CHANGE_MASTER_PASSWORD_LENGTH eng "The password provided for the replication user exceeds the maximum length of 32 characters" + spa "La contraseña suministrada para el usuario de réplica excede el tamaño máximo de 32 caracteres" ER_USER_LOCK_WRONG_NAME 42000 eng "Incorrect user-level lock name '%-.192s'." + spa "Nombre de bloqueo incorrecto a nivel de usuario '%-.192s'." # Should be different from ER_LOCK_DEADLOCK since it doesn't cause implicit # rollback. Should not be mapped to SQLSTATE 40001 for the same reason. ER_USER_LOCK_DEADLOCK eng "Deadlock found when trying to get user-level lock; try rolling back transaction/releasing locks and restarting lock acquisition." + spa "Hallado estancamiento (deadlock) al intentar obtener bloqueo a nivel de usuario; intenta retroceder (roll back) bloqueos de transacción/entrega y rearranca la adquisición de bloqueo." ER_REPLACE_INACCESSIBLE_ROWS eng "REPLACE cannot be executed as it requires deleting rows that are not in the view" + spa "REPLACE no se puede ejecutar ya que requiere borrar filas que no están en la vista" ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_GIS eng "Do not support online operation on table with GIS index" + spa "No soporta operación en línea en tabla con índice GIS" # MariaDB extra error numbers starts from 4000 skip-to-error-number 4000 ER_UNUSED_26 0A000 eng "This error never happens" + spa "Este error nunca ocurre" ER_UNUSED_27 eng "This error never happens" + spa "Este error nunca ocurre" ER_WITH_COL_WRONG_LIST eng "WITH column list and SELECT field list have different column counts" + spa "La lista de columnas de WITH y lista de campos de SELECT tienen diferentes contadores de columna" ER_TOO_MANY_DEFINITIONS_IN_WITH_CLAUSE eng "Too many WITH elements in WITH clause" + spa "Demasiados elementos WITH en cláusua WITH" ER_DUP_QUERY_NAME eng "Duplicate query name %`-.64s in WITH clause" + spa "Nombre de consulta (query) duplicada en cláusula WITH '%s'" ER_RECURSIVE_WITHOUT_ANCHORS eng "No anchors for recursive WITH element '%s'" + spa "No hay anclajes para elemento WITH recursivo '%s'" ER_UNACCEPTABLE_MUTUAL_RECURSION eng "Unacceptable mutual recursion with anchored table '%s'" + spa "Recursión mutua inaceptable con tabla anclada '%s'" ER_REF_TO_RECURSIVE_WITH_TABLE_IN_DERIVED eng "Reference to recursive WITH table '%s' in materialized derived" + spa "Referencia recursiva con WITH tabla '%s' en derivada materializada" ER_NOT_STANDARD_COMPLIANT_RECURSIVE eng "Restrictions imposed on recursive definitions are violated for table '%s'"R_WRONG_WINDOW_SPEC_NAME + spa "Las restricciónes impuestas en definiciones recursivas son violadas para la tabla '%s'" ER_WRONG_WINDOW_SPEC_NAME eng "Window specification with name '%s' is not defined" + spa "Especificación de ventana con nombre '%s' no definida" ER_DUP_WINDOW_NAME eng "Multiple window specifications with the same name '%s'" + spa "Múltiples especificaciones de ventana con el mismo nombre '%s'" ER_PARTITION_LIST_IN_REFERENCING_WINDOW_SPEC eng "Window specification referencing another one '%s' cannot contain partition list" + spa "La especificación de ventana que referencia a otra '%s' no puede contener una lista de partición" ER_ORDER_LIST_IN_REFERENCING_WINDOW_SPEC eng "Referenced window specification '%s' already contains order list" + spa "La especificación de ventana referenciada '%s' ya contiene lista de orden" ER_WINDOW_FRAME_IN_REFERENCED_WINDOW_SPEC eng "Referenced window specification '%s' cannot contain window frame" + spa "La especificación referenciada de ventana '%s' no puede contener marco de ventana" ER_BAD_COMBINATION_OF_WINDOW_FRAME_BOUND_SPECS eng "Unacceptable combination of window frame bound specifications" + spa "Combinación inaceptable de especificaciones ligadas a marco de ventana" ER_WRONG_PLACEMENT_OF_WINDOW_FUNCTION eng "Window function is allowed only in SELECT list and ORDER BY clause" + spa "La función de ventana sólo se permite en lista SELECT y en cláusula ORDER BY" ER_WINDOW_FUNCTION_IN_WINDOW_SPEC eng "Window function is not allowed in window specification" + spa "La función de ventana no está permitida en especificación de ventana" ER_NOT_ALLOWED_WINDOW_FRAME eng "Window frame is not allowed with '%s'" + spa "El marco de ventana no está permitido con '%s'" ER_NO_ORDER_LIST_IN_WINDOW_SPEC eng "No order list in window specification for '%s'" + spa "No exite lista de orden en especificación de ventana para '%s'" ER_RANGE_FRAME_NEEDS_SIMPLE_ORDERBY eng "RANGE-type frame requires ORDER BY clause with single sort key" + spa "El marco tipo-RANGE requiere de la cláusula ORDER BY con clave única de clasificación" ER_WRONG_TYPE_FOR_ROWS_FRAME eng "Integer is required for ROWS-type frame" + spa "Se requiere de un entero para marco tipo-ROWS" ER_WRONG_TYPE_FOR_RANGE_FRAME eng "Numeric datatype is required for RANGE-type frame" + spa "Se requiere de tipo de dato numérico para marco tipo-RANGE" ER_FRAME_EXCLUSION_NOT_SUPPORTED eng "Frame exclusion is not supported yet" + spa "No se seporta aún la exclusión del marco" ER_WINDOW_FUNCTION_DONT_HAVE_FRAME eng "This window function may not have a window frame" + spa "Esta función de ventana puede no tener un marco de ventana" ER_INVALID_NTILE_ARGUMENT eng "Argument of NTILE must be greater than 0" + spa "El argumento de NTILE debe de ser mayor de 0" ER_CONSTRAINT_FAILED 23000 eng "CONSTRAINT %`s failed for %`-.192s.%`-.192s" ger "CONSTRAINT %`s fehlgeschlagen: %`-.192s.%`-.192s" rus "проверка CONSTRAINT %`s для %`-.192s.%`-.192s провалилась" + spa "No se cumple la RESTRICCIÓN %`s para %`-.192s.%`-.192s" ukr "Перевірка CONSTRAINT %`s для %`-.192s.%`-.192s не пройшла" ER_EXPRESSION_IS_TOO_BIG eng "Expression in the %s clause is too big" + spa "La expresión en la cláusula %s es demasiado grande" ER_ERROR_EVALUATING_EXPRESSION eng "Got an error evaluating stored expression %s" + spa "Obtenido error evaluando expresión almacenada %s" ER_CALCULATING_DEFAULT_VALUE eng "Got an error when calculating default value for %`s" + spa "Obtenido un error al calcular valor por defecto para %`s" ER_EXPRESSION_REFERS_TO_UNINIT_FIELD 01000 eng "Expression for field %`-.64s is referring to uninitialized field %`s" + spa "La expresión para campo %`-.64s se refiere a un campo sin inicializar %`s" ER_PARTITION_DEFAULT_ERROR eng "Only one DEFAULT partition allowed" + spa "Sólo se permite una partición DEFAULT" ukr "Припустимо мати тільки один DEFAULT розділ" ER_REFERENCED_TRG_DOES_NOT_EXIST eng "Referenced trigger '%s' for the given action time and event type does not exist" + spa "No existe disparador referenciado '%s' para el momento dado de acción y para el tipo de evento" ER_INVALID_DEFAULT_PARAM eng "Default/ignore value is not supported for such parameter usage" + spa "El valor por defecto/ignorado no está soportado para tal utilización de parámetro" ukr "Значення за замовчуванням або ігнороване значення не підтримано для цього випадку використання параьетра" ER_BINLOG_NON_SUPPORTED_BULK eng "Only row based replication supported for bulk operations" + spa "Sólo la réplica basada en fila es soportada para operaciones enormes" ER_BINLOG_UNCOMPRESS_ERROR eng "Uncompress the compressed binlog failed" + spa "Ha fallado la descompresión del binlog comprimido" ER_JSON_BAD_CHR eng "Broken JSON string in argument %d to function '%s' at position %d" + spa "Cadena JSON rota en argumento %d para función '%s' en posición %d" ER_JSON_NOT_JSON_CHR eng "Character disallowed in JSON in argument %d to function '%s' at position %d" + spa "Carácter no permitido en JSON en argumento %d para función '%s' en la posición %d" ER_JSON_EOS eng "Unexpected end of JSON text in argument %d to function '%s'" + spa "Fin inesperado de texto JSON en argumento %d a función '%s'" ER_JSON_SYNTAX eng "Syntax error in JSON text in argument %d to function '%s' at position %d" + spa "Error de sintaxis en texto JSON en argumento %d a función '%s' en la posición %d" ER_JSON_ESCAPING eng "Incorrect escaping in JSON text in argument %d to function '%s' at position %d" + spa "Incorrecta escapatoria en texto JSON en argumento %d a función '%s' en la posicón %d" ER_JSON_DEPTH eng "Limit of %d on JSON nested strucures depth is reached in argument %d to function '%s' at position %d" + spa "El límite de %d en profundidad de estructuras JSON anidadas se ha alcanzado en argumento %d a función '%s' en la posición %d" ER_JSON_PATH_EOS eng "Unexpected end of JSON path in argument %d to function '%s'" + spa "Fin inesperado de ruta JSON en argumento %d a función '%s'" ER_JSON_PATH_SYNTAX eng "Syntax error in JSON path in argument %d to function '%s' at position %d" + spa "Error de sintaxis en ruta JSON en argumento %d a función '%s' en la posición %d" ER_JSON_PATH_DEPTH eng "Limit of %d on JSON path depth is reached in argument %d to function '%s' at position %d" + spa "El límite de %d en profundidad de ruta JSON se ha alcanzado en argumento %d a función '%s' en la posición %d" ER_JSON_PATH_NO_WILDCARD eng "Wildcards in JSON path not allowed in argument %d to function '%s'" + spa "Comodines en ruta JSON no permitidos en argumento %d a función '%s'" ER_JSON_PATH_ARRAY eng "JSON path should end with an array identifier in argument %d to function '%s'" + spa "La ruta JSON debería de terminar con identificador de arreglo en argumento %d a función '%s'" ER_JSON_ONE_OR_ALL eng "Argument 2 to function '%s' must be "one" or "all"." + spa "El argumento 2 a función '%s' debe de ser "one" o "all"." ER_UNSUPPORTED_COMPRESSED_TABLE eng "InnoDB refuses to write tables with ROW_FORMAT=COMPRESSED or KEY_BLOCK_SIZE." + spa "InnoDB rechaza grabar en tablas con ROW_FORMAT=COMPRESSED o KEY_BLOCK_SIZE." ER_GEOJSON_INCORRECT eng "Incorrect GeoJSON format specified for st_geomfromgeojson function." + spa "Especficado formato GeoJSON incorrecto para función st_geomfromgeojson." ER_GEOJSON_TOO_FEW_POINTS eng "Incorrect GeoJSON format - too few points for linestring specified." + spa "Formato GeoJSON incorrecto - demasiados pocos puntos especificados para linestring." ER_GEOJSON_NOT_CLOSED eng "Incorrect GeoJSON format - polygon not closed." + spa "Formato GeoJSON incorrect - polígono no cerrado." ER_JSON_PATH_EMPTY eng "Path expression '$' is not allowed in argument %d to function '%s'." + spa "La expresión de ruta '$' no está permitida en argumento %d a función '%s'." ER_SLAVE_SAME_ID eng "A slave with the same server_uuid/server_id as this slave has connected to the master" + spa "Un esclavo con el mismo server_uuid/server_id que este esclavo se ha conectado al maestro (master)" ER_FLASHBACK_NOT_SUPPORTED eng "Flashback does not support %s %s" + spa "Retrospectiva no soporta %s %s" @@ -7670,325 +8456,453 @@ ER_FLASHBACK_NOT_SUPPORTED # ER_KEYS_OUT_OF_ORDER eng "Keys are out order during bulk load" + spa "Claves desordenadas durante carga enorme" ER_OVERLAPPING_KEYS eng "Bulk load rows overlap existing rows" + spa "La carga enorme de filas se superpone con filas existentes" ER_REQUIRE_ROW_BINLOG_FORMAT eng "Can't execute updates on master with binlog_format != ROW." + spa "No puedo ejecutar actualizaciones en maestro (master) con binlog_format != ROW." ER_ISOLATION_MODE_NOT_SUPPORTED eng "MyRocks supports only READ COMMITTED and REPEATABLE READ isolation levels. Please change from current isolation level %s" + spa "MyRocks soporta sólo niveles de aislamiento READ COMMITTED y REPEATABLE READ. Por favor, cambie desde nivel de aislamiento actual %s" ER_ON_DUPLICATE_DISABLED eng "When unique checking is disabled in MyRocks, INSERT,UPDATE,LOAD statements with clauses that update or replace the key (i.e. INSERT ON DUPLICATE KEY UPDATE, REPLACE) are not allowed. Query: %s" + spa "Al desactivar chequeo de único en MyRocks, las sentencias INSERT, UPDATE, LOAD con cláusulas que actualizan o reemplazan la clave (p.ej. INSERT ON DUPLICATE KEY UPDATE, REPLACE) no se permiten. Consulta (query): %s" ER_UPDATES_WITH_CONSISTENT_SNAPSHOT eng "Can't execute updates when you started a transaction with START TRANSACTION WITH CONSISTENT [ROCKSDB] SNAPSHOT." + spa "No puedo ejecutar actualizaciones cuando has iniciado una transacción mediante START TRANSACTION WITH CONSISTENT [ROCKSDB] SNAPSHOT." ER_ROLLBACK_ONLY eng "This transaction was rolled back and cannot be committed. Only supported operation is to roll it back, so all pending changes will be discarded. Please restart another transaction." + spa "Esta transacción se ha retrocedido (rolled back) y no puede ser acometida (commit). La única operación soportada es retroceder (roll back), de tal forma que se descartarán todos los cambios pendientes. Por favor, rearranca otra transacción." ER_ROLLBACK_TO_SAVEPOINT eng "MyRocks currently does not support ROLLBACK TO SAVEPOINT if modifying rows." + spa "MyRocks en este momento no soporta ROLLBACK TO SAVEPOINT si se están modificando filas." ER_ISOLATION_LEVEL_WITH_CONSISTENT_SNAPSHOT eng "Only REPEATABLE READ isolation level is supported for START TRANSACTION WITH CONSISTENT SNAPSHOT in RocksDB Storage Engine." + spa "Sólo el nivel de aislamiento REPEATABLE READ se soporta para START TRANSACTION WITH CONSISTENT SNAPSHOT en Motor de Almacenaje RocksDB." ER_UNSUPPORTED_COLLATION eng "Unsupported collation on string indexed column %s.%s Use binary collation (%s)." + spa "Cotejo (collation) no soportado en columna indizada de cadena %s.%s Use cotejo binario (%s)." ER_METADATA_INCONSISTENCY eng "Table '%s' does not exist, but metadata information exists inside MyRocks. This is a sign of data inconsistency. Please check if '%s.frm' exists, and try to restore it if it does not exist." + spa "La tabla '%s' no existe, pero existe información de metadatos dentro de MyRocks. Esto es una señal de datos inconsistentes. Por favor, revisa si existe '%s.frm' e intenta restaurarla si no existe." ER_CF_DIFFERENT eng "Column family ('%s') flag (%d) is different from an existing flag (%d). Assign a new CF flag, or do not change existing CF flag." + spa "La familia de columna ('%s') bandera (%d) es diferente de una bandera existente (%d). Asigna una nueva bandera CF o no cambies la bandera CF." ER_RDB_TTL_DURATION_FORMAT eng "TTL duration (%s) in MyRocks must be an unsigned non-null 64-bit integer." + spa "La duración de TTL (%s) en MyRocks debe de ser un entero sin signo no-null de 64-bit." ER_RDB_STATUS_GENERAL eng "Status error %d received from RocksDB: %s" + spa "Recibido error de estado %d desde RocksDB: %s" ER_RDB_STATUS_MSG eng "%s, Status error %d received from RocksDB: %s" + spa "%s, Recibido error de estado %d desde RocksDB: %s" ER_RDB_TTL_UNSUPPORTED eng "TTL support is currently disabled when table has a hidden PK." + spa "El soporte TTL está desactivado en este momento cuando la tabla tiene una PK oculta." ER_RDB_TTL_COL_FORMAT eng "TTL column (%s) in MyRocks must be an unsigned non-null 64-bit integer, exist inside the table, and have an accompanying ttl duration." + spa "La columna TTL (%s) en MyRocks debe de ser un entero sin signo no-null de 64-bit, debe de existir dentro de la tabla y debe de tener una duración ttl acompañante." ER_PER_INDEX_CF_DEPRECATED eng "The per-index column family option has been deprecated" + spa "La opcion de familia de columna por-índice está obsoleta" ER_KEY_CREATE_DURING_ALTER eng "MyRocks failed creating new key definitions during alter." + spa "MyRocks no pudo crear nuevas definiciones de clave durante 'alter'." ER_SK_POPULATE_DURING_ALTER eng "MyRocks failed populating secondary key during alter." + spa "MyRocks falló al poblar clave secundaria duante el 'alter'." # MyRocks messages end ER_SUM_FUNC_WITH_WINDOW_FUNC_AS_ARG eng "Window functions can not be used as arguments to group functions." + spa "Las funciones de ventana no se pueden usar como argumentos para agrupar funciones." ER_NET_OK_PACKET_TOO_LARGE eng "OK packet too large" + spa "Paquete OK demasiado grande" ER_GEOJSON_EMPTY_COORDINATES eng "Incorrect GeoJSON format - empty 'coordinates' array." + spa "Formato GeoJSON incorrecto - arreglo vacío de coordenadas." ER_MYROCKS_CANT_NOPAD_COLLATION eng "MyRocks doesn't currently support collations with \"No pad\" attribute." + spa "MyRocks no soporta en la actualidad cotejos con atributo \"No pad\"." ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION eng "Illegal parameter data types %s and %s for operation '%s'" + spa "Tipos de datos de parámetro ilegales %s y %s para operación '%s'" ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION eng "Illegal parameter data type %s for operation '%s'" + spa "Tipo de dato %s de parámetro ilegal para operación '%s'" ER_WRONG_PARAMCOUNT_TO_CURSOR 42000 eng "Incorrect parameter count to cursor '%-.192s'" + spa "Contador incorrecto de parámetro para cursor '%-.192s'" rus "Некорректное количество параметров для курсора '%-.192s'" ER_UNKNOWN_STRUCTURED_VARIABLE eng "Unknown structured system variable or ROW routine variable '%-.*s'" + spa "Variable de sistema con estructura desconocida o variable de rutina ROW '%-.*s'" ER_ROW_VARIABLE_DOES_NOT_HAVE_FIELD eng "Row variable '%-.192s' does not have a field '%-.192s'" + spa "La variable de fila '%-.192s' no tiene un campo '%-.192s'" ER_END_IDENTIFIER_DOES_NOT_MATCH eng "END identifier '%-.192s' does not match '%-.192s'" + spa "Identificador END '%-.192s' no coincide con '%-.192s'" ER_SEQUENCE_RUN_OUT eng "Sequence '%-.64s.%-.64s' has run out" + spa "La secuencia '%-.64s.%-.64s' se ha agotado" ER_SEQUENCE_INVALID_DATA eng "Sequence '%-.64s.%-.64s' values are conflicting" + spa "Los valores de secuencia '%-.64s.%-.64s' son conflictivos" ER_SEQUENCE_INVALID_TABLE_STRUCTURE eng "Sequence '%-.64s.%-.64s' table structure is invalid (%s)" + spa "La estuctura de tabla de secuencia '%-.64s.%-.64s' es inválida (%s)" ER_SEQUENCE_ACCESS_ERROR eng "Sequence '%-.64s.%-.64s' access error" + spa "Error en acceso a secuencia '%-.64s.%-.64s'" ER_SEQUENCE_BINLOG_FORMAT eng "Sequences requires binlog_format mixed or row" + spa "Las secuencias requieren binlog_format mixto o fila" ER_NOT_SEQUENCE 42S02 eng "'%-.64s.%-.64s' is not a SEQUENCE" + spa "'%-.64s.%-.64s' no es una SECUENCIA" ER_NOT_SEQUENCE2 42S02 eng "'%-.192s' is not a SEQUENCE" + spa "'%-.192s' no es una SECUENCIA" ER_UNKNOWN_SEQUENCES 42S02 eng "Unknown SEQUENCE: '%-.300s'" + spa "SECUENCIA desconocida: '%-.300s'" ER_UNKNOWN_VIEW 42S02 eng "Unknown VIEW: '%-.300s'" + spa "VISTA desconocida: '%-.300s'" ER_WRONG_INSERT_INTO_SEQUENCE eng "Wrong INSERT into a SEQUENCE. One can only do single table INSERT into a sequence object (like with mariadb-dump). If you want to change the SEQUENCE, use ALTER SEQUENCE instead." + spa "INSERT equivocado dentro de SEQUENCE. Uno sólo puede hacer INSERT único en tabla dentro de un objeto de secuencia (como con volcado-mariadb). Si deseas cambiar la SECUENCIA, usa ALTER SEQUENCE en su lugar." ER_SP_STACK_TRACE eng "At line %u in %s" + spa "En la línea %u en %s" ER_PACKAGE_ROUTINE_IN_SPEC_NOT_DEFINED_IN_BODY eng "Subroutine '%-.192s' is declared in the package specification but is not defined in the package body" + spa "La subrutina '%-.192s' está declarada en la especificación del paquete pero no está definida en el cuerpo del paquete" ER_PACKAGE_ROUTINE_FORWARD_DECLARATION_NOT_DEFINED eng "Subroutine '%-.192s' has a forward declaration but is not defined" + spa "La subrutina '%-.192s' tiene una declaración adelantada pero no está definida" ER_COMPRESSED_COLUMN_USED_AS_KEY eng "Compressed column '%-.192s' can't be used in key specification" + spa "Una columna comprimida '%-.192s' no se puede usar en especificación de clave" ER_UNKNOWN_COMPRESSION_METHOD eng "Unknown compression method: %s" + spa "Método de compresión desconocido: %s" ER_WRONG_NUMBER_OF_VALUES_IN_TVC eng "The used table value constructor has a different number of values" + spa "El constructor del valor de tabla usado tiene un número diferente de valores" ER_FIELD_REFERENCE_IN_TVC eng "Field reference '%-.192s' can't be used in table value constructor" + spa "La referencia a campo '%-.192s' no se puede usar en constructor de valor de tabla" ER_WRONG_TYPE_FOR_PERCENTILE_FUNC eng "Numeric datatype is required for %s function" + spa "Se requiere de tipo de dato numérico para función %s" ER_ARGUMENT_NOT_CONSTANT eng "Argument to the %s function is not a constant for a partition" + spa "El argumento de la funcón %s no es una constante para una partición" ER_ARGUMENT_OUT_OF_RANGE eng "Argument to the %s function does not belong to the range [0,1]" + spa "El argumento de la función %s no pertenee al rango [0,1]" ER_WRONG_TYPE_OF_ARGUMENT eng "%s function only accepts arguments that can be converted to numerical types" + spa "La función %s sólo acepta argumentos que se puedan convertir a tipos numéricos" ER_NOT_AGGREGATE_FUNCTION eng "Aggregate specific instruction (FETCH GROUP NEXT ROW) used in a wrong context" + spa "Instrucción específica de agregación (FETCH GROUP NEXT ROW) usada en contexto equivocado" ER_INVALID_AGGREGATE_FUNCTION eng "Aggregate specific instruction(FETCH GROUP NEXT ROW) missing from the aggregate function" + spa "Falta instrucción específica de agregación (FETCH GROUP NEXT ROW) de la función de agregación" ER_INVALID_VALUE_TO_LIMIT eng "Limit only accepts integer values" + spa "El límite sólo acepta valores enteros" ER_INVISIBLE_NOT_NULL_WITHOUT_DEFAULT eng "Invisible column %`s must have a default value" + spa "Una columna invisible %`s debe de tener valor por defecto" # MariaDB error numbers related to System Versioning ER_UPDATE_INFO_WITH_SYSTEM_VERSIONING eng "Rows matched: %ld Changed: %ld Inserted: %ld Warnings: %ld" + spa "Filas coincidentes: %ld Cambiadas: %ld Insertadas: %ld Avisos: %ld" ER_VERS_FIELD_WRONG_TYPE eng "%`s must be of type %s for system-versioned table %`s" + spa "%`s debe de ser del tipo %s para tabla versionada del sistema %`s" ER_VERS_ENGINE_UNSUPPORTED eng "Transaction-precise system versioning for %`s is not supported" + spa "No se soporta versionado de sistema de transacción precisa para %`s" ER_UNUSED_23 eng "You should never see it" + spa "Nunca deberías de ver esto" ER_PARTITION_WRONG_TYPE eng "Wrong partitioning type, expected type: %`s" + spa "Tipo de partición equivocada, tipo esperado: %`s" WARN_VERS_PART_FULL eng "Versioned table %`s.%`s: last HISTORY partition (%`s) is out of %s, need more HISTORY partitions" + spa "Tabla versionada %`s.%`s: última partición HISTORY (%`s) fuera de %s, necesita de más particiones HISTORY" WARN_VERS_PARAMETERS eng "Maybe missing parameters: %s" + spa "Parámetros que quizás faltan: %s" ER_VERS_DROP_PARTITION_INTERVAL eng "Can only drop oldest partitions when rotating by INTERVAL" + spa "Sólo se pueden eliminar viejas particiones al rotar mediante INTERVAL" ER_UNUSED_25 eng "You should never see it" + spa "Nunca deberías de ver esto" WARN_VERS_PART_NON_HISTORICAL eng "Partition %`s contains non-historical data" + spa "La partición %`s contiene datos no históricos" ER_VERS_ALTER_NOT_ALLOWED eng "Not allowed for system-versioned %`s.%`s. Change @@system_versioning_alter_history to proceed with ALTER." + spa "No permitido para versionado del sistema %`s.%`s. Cambia @@system_versioning_alter_history para proceder con ALTER." ER_VERS_ALTER_ENGINE_PROHIBITED eng "Not allowed for system-versioned %`s.%`s. Change to/from native system versioning engine is not supported." + spa "No permitido para versionado del sistema %`s.%`s. Cambio a/desde motor de versionado nativo no soportado." ER_VERS_RANGE_PROHIBITED eng "SYSTEM_TIME range selector is not allowed" + spa "Selector de rango SYSTEM_TIME no permitido" ER_CONFLICTING_FOR_SYSTEM_TIME eng "Conflicting FOR SYSTEM_TIME clauses in WITH RECURSIVE" + spa "Cláusulas conflictivas FOR SYSTEM_TIME en WITH RECURSIVE" ER_VERS_TABLE_MUST_HAVE_COLUMNS eng "Table %`s must have at least one versioned column" + spa "La tabla %`s debe de tener al menos una columna versionada" ER_VERS_NOT_VERSIONED eng "Table %`s is not system-versioned" + spa "La tabla %`s no es versionada del sistema" ER_MISSING eng "Wrong parameters for %`s: missing '%s'" + spa "Parámetros equivocados para %`s: falta '%s'" ER_VERS_PERIOD_COLUMNS eng "PERIOD FOR SYSTEM_TIME must use columns %`s and %`s" + spa "PERIOD FOR SYSTEM_TIME debe de usar columnas %`s y %`s" ER_PART_WRONG_VALUE eng "Wrong parameters for partitioned %`s: wrong value for '%s'" + spa "Parámetros equivocados para particionado %`s: valor equivocado para '%s'" ER_VERS_WRONG_PARTS eng "Wrong partitions for %`s: must have at least one HISTORY and exactly one last CURRENT" + spa "Particiones equivocadas para %`s: debe de tener al menos una HISTORY y exactamente un último CURRENT" ER_VERS_NO_TRX_ID eng "TRX_ID %llu not found in `mysql.transaction_registry`" + spa "TRX_ID %llu no hallado en `mysql.transaction_registry`" ER_VERS_ALTER_SYSTEM_FIELD eng "Can not change system versioning field %`s" + spa "No puedo cambiar campo de versionado de sistema %`s" ER_DROP_VERSIONING_SYSTEM_TIME_PARTITION eng "Can not DROP SYSTEM VERSIONING for table %`s partitioned BY SYSTEM_TIME" + spa "No puedo DROP SYSTEM VERSIONING para la tabla %`s particionada BY SYSTEM_TIME" ER_VERS_DB_NOT_SUPPORTED eng "System-versioned tables in the %`s database are not supported" + spa "No se soportan las tablas versionadas del sistema en la base de datos %`s" ER_VERS_TRT_IS_DISABLED eng "Transaction registry is disabled" + spa "El registro de transaciones está desactivado" ER_VERS_DUPLICATE_ROW_START_END eng "Duplicate ROW %s column %`s" + spa "Duplicada FILA %s columna %`s" ER_VERS_ALREADY_VERSIONED eng "Table %`s is already system-versioned" + spa "La tabla %`s ya es versionada del sistema" ER_UNUSED_24 eng "You should never see it" + spa "Nunca deberías de ver esto" ER_VERS_NOT_SUPPORTED eng "System-versioned tables do not support %s" + spa "Las tablas versionadas del sistema no soportan %s" ER_VERS_TRX_PART_HISTORIC_ROW_NOT_SUPPORTED eng "Transaction-precise system-versioned tables do not support partitioning by ROW START or ROW END" + spa "Las tablas versionadas del sistemas de transacción precisa no soportan particionado mediante ROW START o ROW END" ER_INDEX_FILE_FULL eng "The index file for table '%-.192s' is full" + spa "El fichero índice para la tabla '%-.192s' está lleno" ER_UPDATED_COLUMN_ONLY_ONCE eng "The column %`s.%`s cannot be changed more than once in a single UPDATE statement" + spa "La columna %`s.%`s no se pude cambiar más de ua vez en una sentencia UPDATE única" ER_EMPTY_ROW_IN_TVC eng "Row with no elements is not allowed in table value constructor in this context" + spa "Fila sin elementos no se permite en constructor de valor de tabla en este contexto" ER_VERS_QUERY_IN_PARTITION eng "SYSTEM_TIME partitions in table %`s does not support historical query" + spa "Las particiones SYSTEM_TIME en la tabla %`s no soportan consulta (query) histórica" ER_KEY_DOESNT_SUPPORT eng "%s index %`s does not support this operation" + spa "%s índice %`s no soporta esta operación" ER_ALTER_OPERATION_TABLE_OPTIONS_NEED_REBUILD eng "Changing table options requires the table to be rebuilt" + spa "Cambiar las opciones de tabla requiere que la tabla sea reconstruida" ER_BACKUP_LOCK_IS_ACTIVE eng "Can't execute the command as you have a BACKUP STAGE active" + spa "No puedo ejecutar el comando cuando tienes activo un BACKUP STAGE" ER_BACKUP_NOT_RUNNING eng "You must start backup with \"BACKUP STAGE START\"" + spa "Debes de arracar respaldo mediante \"BACKUP STAGE START\"" ER_BACKUP_WRONG_STAGE eng "Backup stage '%s' is same or before current backup stage '%s'" + spa "La fase de respaldo '%s' es la misma o anterior a la fase de respaldo actual '%s'" ER_BACKUP_STAGE_FAILED eng "Backup stage '%s' failed" + spa "La fase de respaldo '%s' ha fallado" ER_BACKUP_UNKNOWN_STAGE eng "Unknown backup stage: '%s'. Stage should be one of START, FLUSH, BLOCK_DDL, BLOCK_COMMIT or END" + spa "Fase de respaldo desconocida: '%s'. La fase debería de ser una de START, FLUSH, BLOCK_DDL, BLOCK_COMMIT o END" ER_USER_IS_BLOCKED eng "User is blocked because of too many credential errors; unblock with 'FLUSH PRIVILEGES'" + spa "El usuario está bloqueado a causa de demasiados errores de credenciales; desbloquea mediante 'FLUSH PRIVILEGES'" ER_ACCOUNT_HAS_BEEN_LOCKED eng "Access denied, this account is locked" rum "Acces refuzat, acest cont este blocat" + spa "Acceso denegado, esta cuenta está bloqueada" ER_PERIOD_TEMPORARY_NOT_ALLOWED eng "Application-time period table cannot be temporary" + spa "Una tabla de período de momento-de-aplicación no puede ser temporal" ER_PERIOD_TYPES_MISMATCH eng "Fields of PERIOD FOR %`s have different types" + spa "Los campos de PERIOD FOR %`s tienen tipos diferentes" ER_MORE_THAN_ONE_PERIOD eng "Cannot specify more than one application-time period" + spa "No se puede especificar más de un período de momento de aplicación" ER_PERIOD_FIELD_WRONG_ATTRIBUTES eng "Period field %`s cannot be %s" + spa "El campo de período %`s no puede ser %s" ER_PERIOD_NOT_FOUND eng "Period %`s is not found in table" + spa "El período %`s no se ha hallado en la tabla" ER_PERIOD_COLUMNS_UPDATED eng "Column %`s used in period %`s specified in update SET list" + spa "La columna %`s usada en período %`s especificado en lista de actualizar SET" ER_PERIOD_CONSTRAINT_DROP eng "Can't DROP CONSTRAINT `%s`. Use DROP PERIOD `%s` for this" + spa "No puedo DROP CONSTRAINT `%s`. Usa DROP PERIOD `%s` para esto" ER_TOO_LONG_KEYPART 42000 S1009 eng "Specified key part was too long; max key part length is %u bytes" + spa "La parte de clave especificada es demasiado larga; el tamaño máximo de la parte de clave es de %u bytes" ER_TOO_LONG_DATABASE_COMMENT eng "Comment for database '%-.64s' is too long (max = %u)" + spa "El comentario pra la base de datos '%-.64s' es demasiado largo (máx = %u)" ER_UNKNOWN_DATA_TYPE eng "Unknown data type: '%-.64s'" + spa "Tipo de datos desconocido: '%-.64s'" ER_UNKNOWN_OPERATOR eng "Operator does not exists: '%-.128s'" + spa "El operador no existe: '%-.128s'" ER_WARN_HISTORY_ROW_START_TIME eng "Table `%s.%s` history row start '%s' is later than row end '%s'" + spa "En la historia de la tabla `%s.%s` el inicio de fila '%s' es posterior al fin de fila '%s'" ER_PART_STARTS_BEYOND_INTERVAL eng "%`s: STARTS is later than query time, first history partition may exceed INTERVAL value" + spa "%`s: STARTS es posterior al momento de consulta (query), la primera partición de historia puede exceder el valor INTERVAL" ER_GALERA_REPLICATION_NOT_SUPPORTED eng "Galera replication not supported" + spa "La replicación en Galera no estás soportada" ER_LOAD_INFILE_CAPABILITY_DISABLED eng "The used command is not allowed because the MariaDB server or client has disabled the local infile capability" rum "Comanda folosită nu este permisă deoarece clientul sau serverul MariaDB a dezactivat această capabilitate" + spa "El comando usado no está permitido porque el servidor MariaDB o el cliente han desactivado la capacidad 'infile local'" ER_NO_SECURE_TRANSPORTS_CONFIGURED eng "No secure transports are configured, unable to set --require_secure_transport=ON" + spa "No se han configurado transportes seguros, imposible poner --require_secure_transport=ON" ER_SLAVE_IGNORED_SHARED_TABLE eng "Slave SQL thread ignored the '%s' because table is shared" ger "Slave-SQL-Thread hat die Abfrage '%s' ignoriert" nla "Slave SQL thread negeerde de query '%s'" por "Slave SQL thread ignorado a consulta devido '%s'" - spa "Slave SQL thread ignorado el query '%s'" + spa "Hilo (thread) SQL esclavo ignoró la '%s' porque la tabla está compartida" swe "Slav SQL tråden ignorerade '%s' pga tabellen är delad" ER_NO_AUTOINCREMENT_WITH_UNIQUE eng "AUTO_INCREMENT column %`s cannot be used in the UNIQUE index %`s" + spa "La columna %'s con AUTO_INCREMENT no se puede usar en índice UNIQUE %`s" ER_KEY_CONTAINS_PERIOD_FIELDS eng "Key %`s cannot explicitly include column %`s" + spa "La clave %`s no puede incluir de forma explícita la columna %`s" ER_KEY_CANT_HAVE_WITHOUT_OVERLAPS eng "Key %`s cannot have WITHOUT OVERLAPS" + spa "La clave %`s no puede tener WITHOUT OVERLAPS" ER_NOT_ALLOWED_IN_THIS_CONTEXT eng "'%-.128s' is not allowed in this context" + spa "'%-.128s' no está permitido en este contexto" ER_DATA_WAS_COMMITED_UNDER_ROLLBACK eng "Engine %s does not support rollback. Changes were committed during rollback call" + spa "El motor %s no soporta retroceso (rollback). Los cambios se acometieron (commit) durante la llamada a retroceso (rollback)" ER_PK_INDEX_CANT_BE_IGNORED eng "A primary key cannot be marked as IGNORE" + spa "Una clave primaria no se puede marcar como IGNORE" ER_BINLOG_UNSAFE_SKIP_LOCKED eng "SKIP LOCKED makes this statement unsafe" + spa "SKIP LOCKED hace que esta sentencia sea no segura" ER_JSON_TABLE_ERROR_ON_FIELD eng "Field '%s' can't be set for JSON_TABLE '%s'." + spa "El campo '%s' no se puede poner para JSON_TABLE '%s'." ER_JSON_TABLE_ALIAS_REQUIRED eng "Every table function must have an alias." + spa "Cada función de tabla debe de tener un alias." ER_JSON_TABLE_SCALAR_EXPECTED eng "Can't store an array or an object in the scalar column '%s' of JSON_TABLE '%s'." + spa "No puedo guardar un arreglo o un objeto en la columna escalar '%s' de JSON_TABLE '%s'." ER_JSON_TABLE_MULTIPLE_MATCHES eng "Can't store multiple matches of the path in the column '%s' of JSON_TABLE '%s'." + spa "No puedo guardar múltiples coincidencias de la ruta en la columna '%s' de JSON_TABLE '%s'." ER_WITH_TIES_NEEDS_ORDER eng "FETCH ... WITH TIES requires ORDER BY clause to be present" + spa "FETCH ... WITH TIES requiere que esté presente la cláusula ORDER BY" ER_REMOVED_ORPHAN_TRIGGER eng "Dropped orphan trigger '%-.64s', originally created for table: '%-.192s'" + spa "Eliminado disparador huérfano '%-.64s', creado originálmente para la tabla: '%-.192s'" ER_STORAGE_ENGINE_DISABLED eng "Storage engine %s is disabled" + spa "El motor de almacenaje %s está desactivado" From c14dd0d19d95460ad48f2657cf35c0cf26596ba0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Mon, 3 Jan 2022 07:23:18 +0200 Subject: [PATCH 60/65] Cleanup: Remove RECV_READ_AHEAD_AREA Let us directly use the constant 32 in recv_read_in_area(). --- storage/innobase/log/log0recv.cc | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/storage/innobase/log/log0recv.cc b/storage/innobase/log/log0recv.cc index dfadd9df37f15..b600817b25d41 100644 --- a/storage/innobase/log/log0recv.cc +++ b/storage/innobase/log/log0recv.cc @@ -2,7 +2,7 @@ Copyright (c) 1997, 2017, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2012, Facebook Inc. -Copyright (c) 2013, 2021, MariaDB Corporation. +Copyright (c) 2013, 2022, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -56,9 +56,6 @@ Created 9/20/1997 Heikki Tuuri #include "srv0start.h" #include "fil0pagecompress.h" -/** Read-ahead area in applying log records to file pages */ -#define RECV_READ_AHEAD_AREA 32U - /** The recovery system */ recv_sys_t recv_sys; /** TRUE when recv_init_crash_recovery() has been called. */ @@ -2519,11 +2516,9 @@ page number. @param[in] page_id page id */ static void recv_read_in_area(page_id_t page_id) { - uint32_t page_nos[RECV_READ_AHEAD_AREA]; - compile_time_assert(ut_is_2pow(RECV_READ_AHEAD_AREA)); - page_id.set_page_no(ut_2pow_round(page_id.page_no(), - RECV_READ_AHEAD_AREA)); - const ulint up_limit = page_id.page_no() + RECV_READ_AHEAD_AREA; + uint32_t page_nos[32]; + page_id.set_page_no(ut_2pow_round(page_id.page_no(), 32U)); + const uint32_t up_limit = page_id.page_no() + 32; uint32_t* p = page_nos; for (recv_sys_t::map::iterator i= recv_sys.pages.lower_bound(page_id); From 1df05a0854bcde53fb8f73f9348ab54330e812e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Mon, 3 Jan 2022 07:23:39 +0200 Subject: [PATCH 61/65] Correct some copyright messages Most of the Facebook contribution mysql/mysql-server@72d656acdf082d5ead1cc1be84f2fd68ab6a65a9 was removed in commit 5bea43f5e03225327cd04e0c302f613600f06081 (MDEV-12353). Mainly the configuration parameter innodb_compression_level remains. It had been renamed to page_zip_level in mysql/mysql-server@5b38f2a712a7077c994c00787b891a7d4ee328df. --- storage/innobase/include/mtr0mtr.h | 3 +-- storage/innobase/include/page0zip.ic | 3 +-- storage/innobase/log/log0recv.cc | 1 - 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/storage/innobase/include/mtr0mtr.h b/storage/innobase/include/mtr0mtr.h index e253038e1ee0e..263c9945e6520 100644 --- a/storage/innobase/include/mtr0mtr.h +++ b/storage/innobase/include/mtr0mtr.h @@ -1,8 +1,7 @@ /***************************************************************************** Copyright (c) 1995, 2017, Oracle and/or its affiliates. All Rights Reserved. -Copyright (c) 2012, Facebook Inc. -Copyright (c) 2013, 2021, MariaDB Corporation. +Copyright (c) 2013, 2022, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software diff --git a/storage/innobase/include/page0zip.ic b/storage/innobase/include/page0zip.ic index ede61283f33bf..b0622ba79c334 100644 --- a/storage/innobase/include/page0zip.ic +++ b/storage/innobase/include/page0zip.ic @@ -1,8 +1,7 @@ /***************************************************************************** Copyright (c) 2005, 2016, Oracle and/or its affiliates. All Rights Reserved. -Copyright (c) 2012, Facebook Inc. -Copyright (c) 2017, 2020, MariaDB Corporation. +Copyright (c) 2017, 2022, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software diff --git a/storage/innobase/log/log0recv.cc b/storage/innobase/log/log0recv.cc index b600817b25d41..68bbf06ca49f6 100644 --- a/storage/innobase/log/log0recv.cc +++ b/storage/innobase/log/log0recv.cc @@ -1,7 +1,6 @@ /***************************************************************************** Copyright (c) 1997, 2017, Oracle and/or its affiliates. All Rights Reserved. -Copyright (c) 2012, Facebook Inc. Copyright (c) 2013, 2022, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under From 30b917d34adc27e55a1326406a22e2a6d0a87817 Mon Sep 17 00:00:00 2001 From: Andrei Date: Mon, 27 Dec 2021 12:36:51 +0200 Subject: [PATCH 62/65] MDEV-27039 Trying to lock mutex ... when the mutex was already locked The reason of the double lock was an extraneous ha_flush_logs(). Unlike the upstream it is unnecessary in Mariadb that exploits a binlog checkpoint mechanism for not letting PURGE or RESET-MASTER to trouble transaction recovery. That is in case should a trx be prepared but its binlog file gone, the trx then is committed on disk too. Those facts have been always verified by existing tests of binlog.binlog_{checkpoint,xa_recover}.test. A regression test for the bug is included though. --- sql/log.cc | 1 - .../mysql-test/spider/r/spider_fixes.result | 7 +++++++ .../spider/mysql-test/spider/t/spider_fixes.test | 15 +++++++++++++++ 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/sql/log.cc b/sql/log.cc index 41eed80ef66a7..8df7c3f527568 100644 --- a/sql/log.cc +++ b/sql/log.cc @@ -7029,7 +7029,6 @@ void MYSQL_BIN_LOG::purge() DBUG_EXECUTE_IF("expire_logs_always", { purge_time = my_time(0); }); if (purge_time >= 0) { - ha_flush_logs(); purge_logs_before_date(purge_time); } DEBUG_SYNC(current_thd, "after_purge_logs_before_date"); diff --git a/storage/spider/mysql-test/spider/r/spider_fixes.result b/storage/spider/mysql-test/spider/r/spider_fixes.result index 1db31ca9f95a0..b2a2fad5238c4 100644 --- a/storage/spider/mysql-test/spider/r/spider_fixes.result +++ b/storage/spider/mysql-test/spider/r/spider_fixes.result @@ -596,6 +596,13 @@ connection child2_1; DROP DATABASE IF EXISTS auto_test_remote; connection child2_2; DROP DATABASE IF EXISTS auto_test_remote2; +connection master_1; +SET @@global.expire_logs_days=11; +connect master_purge, localhost, root, , , $MASTER_1_MYPORT, $MASTER_1_MYSOCK; +SET @@global.binlog_checksum=NONE; +SET @@global.binlog_checksum=$binlog_checksum; +SET @@global.expire_logs_days=$expire_logs_days; +disconnect master_purge; for slave1_1 for master_1 for child2 diff --git a/storage/spider/mysql-test/spider/t/spider_fixes.test b/storage/spider/mysql-test/spider/t/spider_fixes.test index 9f7ada052ed2a..56e143060e683 100644 --- a/storage/spider/mysql-test/spider/t/spider_fixes.test +++ b/storage/spider/mysql-test/spider/t/spider_fixes.test @@ -1410,6 +1410,21 @@ if ($USE_CHILD_GROUP2) --connection child2_2 DROP DATABASE IF EXISTS auto_test_remote2; } + + +# MDEV-27039 LOCK_global_system_variables attempted to re-acquire +# The test proves no assert anymore. +--connection master_1 +--let $binlog_checksum=`SELECT @@global.binlog_checksum` +--let $expire_logs_days=`SELECT @@global.expire_logs_days` +SET @@global.expire_logs_days=11; + +--connect (master_purge, localhost, root, , , $MASTER_1_MYPORT, $MASTER_1_MYSOCK) +SET @@global.binlog_checksum=NONE; +--evalp SET @@global.binlog_checksum=$binlog_checksum +--evalp SET @@global.expire_logs_days=$expire_logs_days +--disconnect master_purge + --disable_query_log --disable_result_log --source slave_test_deinit.inc From c410f7aaea400eb98f13552725b685a2513aafcb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Mon, 3 Jan 2022 17:42:13 +0200 Subject: [PATCH 63/65] MDEV-27414 Server may hang when innodb_undo_log_truncate=ON trx_purge_truncate_history(): Avoid a deadlock with buf_pool_t::release_freed_page(). Page latches are not supposed to be waited for while holding a mutex like buf_pool.mutex or buf_pool.flush_list_mutex. This regression was caused by commit aaef2e1d8c843d1e40b1ce0c5199c3abb3c5da28 (MDEV-27058). Before that, trx_purge_truncate_history() would buffer-fix the block, release buf_pool.flush_list_mutex, and then wait for the exclusive page latch. This bug led to occasional failures of the test innodb.undo_truncate_recover. --- storage/innobase/trx/trx0purge.cc | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/storage/innobase/trx/trx0purge.cc b/storage/innobase/trx/trx0purge.cc index fe62593a313f4..657a1e3a2d469 100644 --- a/storage/innobase/trx/trx0purge.cc +++ b/storage/innobase/trx/trx0purge.cc @@ -1,7 +1,7 @@ /***************************************************************************** Copyright (c) 1996, 2017, Oracle and/or its affiliates. All Rights Reserved. -Copyright (c) 2017, 2021, MariaDB Corporation. +Copyright (c) 2017, 2022, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -705,7 +705,16 @@ TRANSACTIONAL_TARGET static void trx_purge_truncate_history() { auto block= reinterpret_cast(bpage); ut_ad(buf_pool.is_uncompressed(block)); - bpage->lock.x_lock(); + if (!bpage->lock.x_lock_try()) + { + /* Let buf_pool_t::release_freed_page() proceed. */ + mysql_mutex_unlock(&buf_pool.flush_list_mutex); + std::this_thread::yield(); + mysql_mutex_lock(&buf_pool.flush_list_mutex); + rescan: + bpage= UT_LIST_GET_LAST(buf_pool.flush_list); + continue; + } buf_pool.flush_hp.set(prev); mysql_mutex_unlock(&buf_pool.flush_list_mutex); @@ -728,11 +737,8 @@ TRANSACTIONAL_TARGET static void trx_purge_truncate_history() } if (prev != buf_pool.flush_hp.get()) - { /* Rescan, because we may have lost the position. */ - bpage= UT_LIST_GET_LAST(buf_pool.flush_list); - continue; - } + goto rescan; } bpage= prev; From eab89f14ab0069a3f74e80bdf13aa70d85738c79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Otto=20Kek=C3=A4l=C3=A4inen?= Date: Fri, 31 Dec 2021 23:12:54 +0200 Subject: [PATCH 64/65] Deb: Adapt custom build steps to be compatible with latest Salsa-CI Upstream Salsa-CI refactored the build process in https://salsa.debian.org/salsa-ci-team/pipeline/-/commit/58880fcef5b742cb9c661121a8c8707bf392b3b5 This broke our custom direct invocation of install-build-deps.sh as the Salsa-CI images no longer contain them. Adapt the .build-script equivalent to follow new Salsa-CI method so builds work again. --- debian/salsa-ci.yml | 49 +++++---------------------------------------- 1 file changed, 5 insertions(+), 44 deletions(-) diff --git a/debian/salsa-ci.yml b/debian/salsa-ci.yml index c95efe0de3afd..60fdc3d654488 100644 --- a/debian/salsa-ci.yml +++ b/debian/salsa-ci.yml @@ -32,11 +32,11 @@ build: # Run Salsa-CI .build-before-script equivalent - mkdir -p ${WORKING_DIR} ${CCACHE_WORK_DIR} - mv ${CCACHE_WORK_DIR} ${CCACHE_TMP_DIR} - # Run Salsa-CI .build-script equivalent - - export CCACHE_DIR="${CCACHE_TMP_DIR}" - - apt-get update && eatmydata apt-get install --yes --no-install-recommends aptitude devscripts ccache equivs + # Run Salsa-CI .build-script equivalent, with extra devscripts so autobake-deb.sh can run 'dch' + - export CCACHE_DIR=${CCACHE_TMP_DIR} + - apt-get update && eatmydata apt-get install --no-install-recommends -y ccache fakeroot build-essential devscripts - cd ${WORKING_DIR}/${SOURCE_DIR} - - eatmydata install-build-deps.sh . + - eatmydata apt-get build-dep --no-install-recommends -y . - update-ccache-symlinks; ccache -z # Zero out ccache counters - while true; do sleep 600; echo "10 minutes passed" >&2; done & # Progress keeper since build is long and silent - debian/autobake-deb.sh |& tail -n 10000 # Keep Gitlab-CI output under 4 MB @@ -44,7 +44,7 @@ build: - rm -rf ${WORKING_DIR}/${SOURCE_DIR} - du -shc ${WORKING_DIR}/* # Show total file size of artifacts. Must stay are under 100 MB. - ccache -s # Show ccache stats to validate it worked - - mv ${CCACHE_TMP_DIR} ${CCACHE_WORK_DIR} || true + - mv ${CCACHE_TMP_DIR} ${CCACHE_WORK_DIR} build bullseye-backports: extends: .build-package @@ -77,45 +77,6 @@ build i386: build native deb: extends: .build-package - script: &buildpackage-script | - mkdir -p ${WORKING_DIR} ${CCACHE_WORK_DIR} - mv ${CCACHE_WORK_DIR} ${CCACHE_TMP_DIR} - export CCACHE_DIR=${CCACHE_TMP_DIR} - # Add deb-src entries - sed -n '/^deb\s/s//deb-src /p' /etc/apt/sources.list > /etc/apt/sources.list.d/deb-src.list - apt-get update && eatmydata apt-get install --no-install-recommends -y \ - aptitude \ - devscripts \ - ccache \ - equivs \ - build-essential \ - python3 - # Enter source package dir - cd ${WORKING_DIR}/${SOURCE_DIR} - # Install package build dependencies - eatmydata install-build-deps.sh . - # Generate ccache links - dpkg-reconfigure ccache - PATH="/usr/lib/ccache/:${PATH}" - # Reset ccache stats - ccache -z - # Create salsaci user and fix permissions - useradd salsaci - chown -R salsaci. ${WORKING_DIR} ${CCACHE_DIR} - # Define buildlog filename - BUILD_LOGFILE_SOURCE=$(dpkg-parsechangelog -S Source) - BUILD_LOGFILE_VERSION=$(dpkg-parsechangelog -S Version) - BUILD_LOGFILE_VERSION=${BUILD_LOGFILE_VERSION#*:} - BUILD_LOGFILE_ARCH=$(dpkg --print-architecture) - BUILD_LOGFILE="${WORKING_DIR}/${BUILD_LOGFILE_SOURCE}_${BUILD_LOGFILE_VERSION}_${BUILD_LOGFILE_ARCH}.build" - # Build package as user salsaci - su salsaci -c "eatmydata dpkg-buildpackage ${DB_BUILD_PARAM}" |& OUTPUT_FILENAME=${BUILD_LOGFILE} filter-output - # Restore PWD to ${WORKING_DIR} - cd ${WORKING_DIR} - rm -rf ${WORKING_DIR}/${SOURCE_DIR} - # Print ccache stats on job log - ccache -s - mv ${CCACHE_TMP_DIR} ${CCACHE_WORK_DIR} piuparts: extends: .test-piuparts From 4c3ad24413f234599eda27f4958dd3ff21df3203 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Tue, 4 Jan 2022 07:40:31 +0200 Subject: [PATCH 65/65] MDEV-27416 InnoDB hang in buf_flush_wait_flushed(), on log checkpoint InnoDB could sometimes hang when triggering a log checkpoint. This is due to commit 7b1252c03d7131754d9503560fe507b33ca1f8b4 (MDEV-24278), which introduced an untimed wait to buf_flush_page_cleaner(). The hang was noticed by occasional failures of IMPORT TABLESPACE tests, such as innodb.innodb-wl5522, which would (unnecessarily) invoke log_make_checkpoint() from row_import_cleanup(). The reason of the hang was that buf_flush_page_cleaner() would enter untimed sleep despite buf_flush_sync_lsn being set. The exact failure scenario is unclear, because buf_flush_sync_lsn should actually be protected by buf_pool.flush_list_mutex. We prevent the hang by invoking buf_pool.page_cleaner_set_idle(false) whenever we are setting buf_flush_sync_lsn and signaling buf_pool.do_flush_list. The bulk of these changes was originally developed as a preparation for MDEV-26827, to invoke buf_flush_list() from fewer threads, and tested on 10.6 by Matthias Leich. This fix was tested by running 100 repetitions of 100 concurrent instances of the test innodb.innodb-wl5522 on a RelWithDebInfo build, using ext4fs and innodb_flush_method=O_DIRECT on a SATA SSD with 4096-byte block size. During the test, the call to log_make_checkpoint() in row_import_cleanup() was present. buf_flush_list(): Make static. buf_flush_wait(): Wait for buf_pool.get_oldest_modification() to reach a target, by work done in the buf_flush_page_cleaner. If buf_flush_sync_lsn is going to be set, we will invoke buf_pool.page_cleaner_set_idle(false). buf_flush_ahead(): If buf_flush_sync_lsn or buf_flush_async_lsn is going to be set and the page cleaner woken up, we will invoke buf_pool.page_cleaner_set_idle(false). buf_flush_wait_flushed(): Invoke buf_flush_wait(). buf_flush_sync(): Invoke recv_sys.apply() at the start in case crash recovery is active. Invoke buf_flush_wait(). buf_flush_sync_batch(): A lower-level variant of buf_flush_sync() that is only called by recv_sys_t::apply(). buf_flush_sync_for_checkpoint(): Do not trigger log apply or checkpoint during recovery. buf_dblwr_t::create(): Only initiate a buffer pool flush, not a checkpoint. row_import_cleanup(): Do not unnecessarily invoke log_make_checkpoint(). Invoking buf_flush_list_space() before starting to generate redo log for the imported tablespace should suffice. srv_prepare_to_delete_redo_log_file(): Set recv_sys.recovery_on in order to prevent buf_flush_sync_for_checkpoint() from initiating a checkpoint while the log is inaccessible. Remove a wait loop that is already part of buf_flush_sync(). Do not invoke fil_names_clear() if the log is being upgraded, because the FILE_MODIFY record is specific to the latest format. create_log_file(): Clear recv_sys.recovery_on only after calling log_make_checkpoint(), to prevent buf_flush_page_cleaner from invoking a checkpoint. innodb_shutdown(): Simplify the logic in mariadb-backup --prepare. os_aio_wait_until_no_pending_writes(): Update the function comment. Apart from row_quiesce_table_start() during FLUSH TABLES...FOR EXPORT, this is being called by buf_flush_list_space(), which is invoked by ALTER TABLE...IMPORT TABLESPACE as well as some encryption operations. --- storage/innobase/buf/buf0buf.cc | 5 +- storage/innobase/buf/buf0dblwr.cc | 3 +- storage/innobase/buf/buf0flu.cc | 112 +++++++++++++++------- storage/innobase/include/buf0flu.h | 11 +-- storage/innobase/include/os0file.h | 3 +- storage/innobase/include/srv0srv.h | 2 +- storage/innobase/log/log0recv.cc | 2 +- storage/innobase/os/os0file.cc | 3 +- storage/innobase/row/row0import.cc | 2 - storage/innobase/srv/srv0srv.cc | 2 +- storage/innobase/srv/srv0start.cc | 149 +++++++++++++---------------- 11 files changed, 155 insertions(+), 139 deletions(-) diff --git a/storage/innobase/buf/buf0buf.cc b/storage/innobase/buf/buf0buf.cc index 1c126191df3b2..37f99a94cee89 100644 --- a/storage/innobase/buf/buf0buf.cc +++ b/storage/innobase/buf/buf0buf.cc @@ -3300,10 +3300,7 @@ buf_page_get_low( fix_block->fix(); mysql_mutex_unlock(&buf_pool.mutex); - buf_flush_list(); - buf_flush_wait_batch_end_acquiring_mutex(false); - while (buf_flush_list_space(space)); - os_aio_wait_until_no_pending_writes(); + buf_flush_sync(); if (fix_block->page.buf_fix_count() == 1 && !fix_block->page.oldest_modification()) { diff --git a/storage/innobase/buf/buf0dblwr.cc b/storage/innobase/buf/buf0dblwr.cc index 52e947b7c5edd..1d582b6cfbf81 100644 --- a/storage/innobase/buf/buf0dblwr.cc +++ b/storage/innobase/buf/buf0dblwr.cc @@ -219,8 +219,7 @@ bool buf_dblwr_t::create() trx_sys_block->frame, TRX_SYS_DOUBLEWRITE_SPACE_ID_STORED_N); mtr.commit(); - /* Flush the modified pages to disk and make a checkpoint */ - log_make_checkpoint(); + buf_flush_wait_flushed(mtr.commit_lsn()); /* Remove doublewrite pages from LRU */ buf_pool_invalidate(); diff --git a/storage/innobase/buf/buf0flu.cc b/storage/innobase/buf/buf0flu.cc index 3c2342287712c..4b3e6e6e77e63 100644 --- a/storage/innobase/buf/buf0flu.cc +++ b/storage/innobase/buf/buf0flu.cc @@ -1538,7 +1538,7 @@ void buf_flush_wait_batch_end(bool lru) @param lsn buf_pool.get_oldest_modification(LSN_MAX) target @return the number of processed pages @retval 0 if a buf_pool.flush_list batch is already running */ -ulint buf_flush_list(ulint max_n, lsn_t lsn) +static ulint buf_flush_list(ulint max_n= ULINT_UNDEFINED, lsn_t lsn= LSN_MAX) { ut_ad(lsn); @@ -1833,6 +1833,30 @@ ATTRIBUTE_COLD void log_make_checkpoint() while (!log_checkpoint()); } +/** Wait for all dirty pages up to an LSN to be written out. +NOTE: The calling thread is not allowed to hold any buffer page latches! */ +static void buf_flush_wait(lsn_t lsn) +{ + ut_ad(lsn <= log_sys.get_lsn()); + + while (buf_pool.get_oldest_modification(lsn) < lsn) + { + if (buf_flush_sync_lsn < lsn) + { + buf_flush_sync_lsn= lsn; + buf_pool.page_cleaner_set_idle(false); + pthread_cond_signal(&buf_pool.do_flush_list); + } + my_cond_wait(&buf_pool.done_flush_list, + &buf_pool.flush_list_mutex.m_mutex); + } + + /* Wait for the checkpoint. */ + while (buf_flush_sync_lsn) + my_cond_wait(&buf_pool.done_flush_list, + &buf_pool.flush_list_mutex.m_mutex); +} + /** Wait until all persistent pages are flushed up to a limit. @param sync_lsn buf_pool.get_oldest_modification(LSN_MAX) to wait for */ ATTRIBUTE_COLD void buf_flush_wait_flushed(lsn_t sync_lsn) @@ -1849,9 +1873,9 @@ ATTRIBUTE_COLD void buf_flush_wait_flushed(lsn_t sync_lsn) if (buf_pool.get_oldest_modification(sync_lsn) < sync_lsn) { + MONITOR_INC(MONITOR_FLUSH_SYNC_WAITS); #if 1 /* FIXME: remove this, and guarantee that the page cleaner serves us */ - if (UNIV_UNLIKELY(!buf_page_cleaner_is_active) - ut_d(|| innodb_page_cleaner_disabled_debug)) + if (UNIV_UNLIKELY(!buf_page_cleaner_is_active)) { do { @@ -1864,35 +1888,21 @@ ATTRIBUTE_COLD void buf_flush_wait_flushed(lsn_t sync_lsn) MONITOR_FLUSH_SYNC_COUNT, MONITOR_FLUSH_SYNC_PAGES, n_pages); } - MONITOR_INC(MONITOR_FLUSH_SYNC_WAITS); mysql_mutex_lock(&buf_pool.flush_list_mutex); } while (buf_pool.get_oldest_modification(sync_lsn) < sync_lsn); - - goto try_checkpoint; } + else #endif - if (buf_flush_sync_lsn < sync_lsn) - { - buf_flush_sync_lsn= sync_lsn; - pthread_cond_signal(&buf_pool.do_flush_list); - } - - do { - tpool::tpool_wait_begin(); thd_wait_begin(nullptr, THD_WAIT_DISKIO); - my_cond_wait(&buf_pool.done_flush_list, - &buf_pool.flush_list_mutex.m_mutex); - thd_wait_end(nullptr); + tpool::tpool_wait_begin(); + buf_flush_wait(sync_lsn); tpool::tpool_wait_end(); - - MONITOR_INC(MONITOR_FLUSH_SYNC_WAITS); + thd_wait_end(nullptr); } - while (buf_pool.get_oldest_modification(sync_lsn) < sync_lsn); } -try_checkpoint: mysql_mutex_unlock(&buf_pool.flush_list_mutex); if (UNIV_UNLIKELY(log_sys.last_checkpoint_lsn < sync_lsn)) @@ -1925,8 +1935,11 @@ ATTRIBUTE_COLD void buf_flush_ahead(lsn_t lsn, bool furious) { mysql_mutex_lock(&buf_pool.flush_list_mutex); if (limit < lsn) + { limit= lsn; - pthread_cond_signal(&buf_pool.do_flush_list); + buf_pool.page_cleaner_set_idle(false); + pthread_cond_signal(&buf_pool.do_flush_list); + } mysql_mutex_unlock(&buf_pool.flush_list_mutex); } } @@ -1960,10 +1973,6 @@ ATTRIBUTE_COLD static void buf_flush_sync_for_checkpoint(lsn_t lsn) MONITOR_FLUSH_SYNC_PAGES, n_flushed); } - /* Attempt to perform a log checkpoint upon completing each batch. */ - if (recv_recovery_is_on()) - recv_sys.apply(true); - switch (srv_file_flush_method) { case SRV_NOSYNC: case SRV_O_DIRECT_NO_FSYNC: @@ -1980,7 +1989,8 @@ ATTRIBUTE_COLD static void buf_flush_sync_for_checkpoint(lsn_t lsn) mysql_mutex_unlock(&log_sys.flush_order_mutex); const lsn_t checkpoint_lsn= measure ? measure : newest_lsn; - if (checkpoint_lsn > log_sys.last_checkpoint_lsn + SIZE_OF_FILE_CHECKPOINT) + if (!recv_recovery_is_on() && + checkpoint_lsn > log_sys.last_checkpoint_lsn + SIZE_OF_FILE_CHECKPOINT) { mysql_mutex_unlock(&buf_pool.flush_list_mutex); log_checkpoint_low(checkpoint_lsn, newest_lsn); @@ -2004,7 +2014,7 @@ ATTRIBUTE_COLD static void buf_flush_sync_for_checkpoint(lsn_t lsn) else if (measure >= buf_flush_async_lsn) buf_flush_async_lsn= 0; - /* wake up buf_flush_wait_flushed() */ + /* wake up buf_flush_wait() */ pthread_cond_broadcast(&buf_pool.done_flush_list); lsn= std::max(lsn, target); @@ -2264,7 +2274,7 @@ static os_thread_ret_t DECLARE_THREAD(buf_flush_page_cleaner)(void*) if (UNIV_UNLIKELY(lsn_limit != 0)) { buf_flush_sync_lsn= 0; - /* wake up buf_flush_wait_flushed() */ + /* wake up buf_flush_wait() */ pthread_cond_broadcast(&buf_pool.done_flush_list); } unemployed: @@ -2334,7 +2344,7 @@ static os_thread_ret_t DECLARE_THREAD(buf_flush_page_cleaner)(void*) if (UNIV_UNLIKELY(lsn_limit != 0)) { n_flushed= buf_flush_list(srv_max_io_capacity, lsn_limit); - /* wake up buf_flush_wait_flushed() */ + /* wake up buf_flush_wait() */ pthread_cond_broadcast(&buf_pool.done_flush_list); goto try_checkpoint; } @@ -2440,6 +2450,7 @@ ATTRIBUTE_COLD void buf_flush_page_cleaner_init() os_thread_create(buf_flush_page_cleaner); } +#if defined(HAVE_SYSTEMD) && !defined(EMBEDDED_LIBRARY) /** @return the number of dirty pages in the buffer pool */ static ulint buf_flush_list_length() { @@ -2448,6 +2459,7 @@ static ulint buf_flush_list_length() mysql_mutex_unlock(&buf_pool.flush_list_mutex); return len; } +#endif /** Flush the buffer pool on shutdown. */ ATTRIBUTE_COLD void buf_flush_buffer_pool() @@ -2458,13 +2470,15 @@ ATTRIBUTE_COLD void buf_flush_buffer_pool() service_manager_extend_timeout(INNODB_EXTEND_TIMEOUT_INTERVAL, "Waiting to flush the buffer pool"); - while (buf_pool.n_flush_list() || buf_flush_list_length()) + mysql_mutex_lock(&buf_pool.flush_list_mutex); + + while (buf_pool.get_oldest_modification(0)) { + mysql_mutex_unlock(&buf_pool.flush_list_mutex); buf_flush_list(srv_max_io_capacity); - timespec abstime; - if (buf_pool.n_flush_list()) { + timespec abstime; service_manager_extend_timeout(INNODB_EXTEND_TIMEOUT_INTERVAL, "Waiting to flush " ULINTPF " pages", buf_flush_list_length()); @@ -2475,24 +2489,48 @@ ATTRIBUTE_COLD void buf_flush_buffer_pool() &abstime); mysql_mutex_unlock(&buf_pool.mutex); } + mysql_mutex_lock(&buf_pool.flush_list_mutex); } + mysql_mutex_unlock(&buf_pool.flush_list_mutex); ut_ad(!buf_pool.any_io_pending()); } +/** Synchronously flush dirty blocks during recv_sys_t::apply(). +NOTE: The calling thread is not allowed to hold any buffer page latches! */ +void buf_flush_sync_batch(lsn_t lsn) +{ + thd_wait_begin(nullptr, THD_WAIT_DISKIO); + tpool::tpool_wait_begin(); + mysql_mutex_lock(&buf_pool.flush_list_mutex); + buf_flush_wait(lsn); + mysql_mutex_unlock(&buf_pool.flush_list_mutex); + tpool::tpool_wait_end(); + thd_wait_end(nullptr); +} + /** Synchronously flush dirty blocks. NOTE: The calling thread is not allowed to hold any buffer page latches! */ void buf_flush_sync() { ut_ad(!sync_check_iterate(dict_sync_check())); + if (recv_recovery_is_on()) + recv_sys.apply(true); + + thd_wait_begin(nullptr, THD_WAIT_DISKIO); + tpool::tpool_wait_begin(); + mysql_mutex_lock(&buf_pool.flush_list_mutex); for (;;) { - const ulint n_flushed= buf_flush_list(srv_max_io_capacity); - buf_flush_wait_batch_end_acquiring_mutex(false); - if (!n_flushed && !buf_flush_list_length()) - return; + const lsn_t lsn= log_sys.get_lsn(); + buf_flush_wait(lsn); + if (lsn == log_sys.get_lsn()) + break; } + mysql_mutex_unlock(&buf_pool.flush_list_mutex); + tpool::tpool_wait_end(); + thd_wait_end(nullptr); } #ifdef UNIV_DEBUG diff --git a/storage/innobase/include/buf0flu.h b/storage/innobase/include/buf0flu.h index 8d45cf2be3832..e1be95ebcd035 100644 --- a/storage/innobase/include/buf0flu.h +++ b/storage/innobase/include/buf0flu.h @@ -85,13 +85,6 @@ buf_flush_init_for_writing( void* page_zip_, bool use_full_checksum); -/** Write out dirty blocks from buf_pool.flush_list. -@param max_n wished maximum mumber of blocks flushed -@param lsn buf_pool.get_oldest_modification(LSN_MAX) target -@return the number of processed pages -@retval 0 if a buf_pool.flush_list batch is already running */ -ulint buf_flush_list(ulint max_n= ULINT_UNDEFINED, lsn_t lsn= LSN_MAX); - /** Try to flush dirty pages that belong to a given tablespace. @param space tablespace @param n_flushed number of pages written @@ -144,6 +137,10 @@ ATTRIBUTE_COLD void buf_flush_buffer_pool(); void buf_flush_validate(); #endif /* UNIV_DEBUG */ +/** Synchronously flush dirty blocks during recv_sys_t::apply(). +NOTE: The calling thread is not allowed to hold any buffer page latches! */ +void buf_flush_sync_batch(lsn_t lsn); + /** Synchronously flush dirty blocks. NOTE: The calling thread is not allowed to hold any buffer page latches! */ void buf_flush_sync(); diff --git a/storage/innobase/include/os0file.h b/storage/innobase/include/os0file.h index 8f632305f7e95..ba252433315a8 100644 --- a/storage/innobase/include/os0file.h +++ b/storage/innobase/include/os0file.h @@ -1111,8 +1111,7 @@ void os_aio_free(); @retval DB_IO_ERROR on I/O error */ dberr_t os_aio(const IORequest &type, void *buf, os_offset_t offset, size_t n); -/** Wait until there are no pending asynchronous writes. -Only used on FLUSH TABLES...FOR EXPORT. */ +/** Wait until there are no pending asynchronous writes. */ void os_aio_wait_until_no_pending_writes(); diff --git a/storage/innobase/include/srv0srv.h b/storage/innobase/include/srv0srv.h index a5bebc34c39bb..fe2c33e219f33 100644 --- a/storage/innobase/include/srv0srv.h +++ b/storage/innobase/include/srv0srv.h @@ -511,7 +511,7 @@ do { \ #ifdef HAVE_PSI_STAGE_INTERFACE /** Performance schema stage event for monitoring ALTER TABLE progress -everything after flush log_make_checkpoint(). */ +in ha_innobase::commit_inplace_alter_table(). */ extern PSI_stage_info srv_stage_alter_table_end; /** Performance schema stage event for monitoring ALTER TABLE progress diff --git a/storage/innobase/log/log0recv.cc b/storage/innobase/log/log0recv.cc index 68bbf06ca49f6..9474cd31793e2 100644 --- a/storage/innobase/log/log0recv.cc +++ b/storage/innobase/log/log0recv.cc @@ -2752,7 +2752,7 @@ void recv_sys_t::apply(bool last_batch) /* Instead of flushing, last_batch could sort the buf_pool.flush_list in ascending order of buf_page_t::oldest_modification. */ - buf_flush_sync(); + buf_flush_sync_batch(recovered_lsn); if (!last_batch) { diff --git a/storage/innobase/os/os0file.cc b/storage/innobase/os/os0file.cc index 9e1eeff202d4b..32c31b191ed3b 100644 --- a/storage/innobase/os/os0file.cc +++ b/storage/innobase/os/os0file.cc @@ -3821,8 +3821,7 @@ static void os_aio_wait_until_no_pending_writes_low() tpool::tpool_wait_end(); } -/** Wait until there are no pending asynchronous writes. -Only used on FLUSH TABLES...FOR EXPORT. */ +/** Wait until there are no pending asynchronous writes. */ void os_aio_wait_until_no_pending_writes() { os_aio_wait_until_no_pending_writes_low(); diff --git a/storage/innobase/row/row0import.cc b/storage/innobase/row/row0import.cc index 45cc8c278b53e..3df29ac18303c 100644 --- a/storage/innobase/row/row0import.cc +++ b/storage/innobase/row/row0import.cc @@ -2211,8 +2211,6 @@ row_import_cleanup( DBUG_EXECUTE_IF("ib_import_before_checkpoint_crash", DBUG_SUICIDE();); - log_make_checkpoint(); - return(err); } diff --git a/storage/innobase/srv/srv0srv.cc b/storage/innobase/srv/srv0srv.cc index 73e67c12d5892..c05562daca35b 100644 --- a/storage/innobase/srv/srv0srv.cc +++ b/storage/innobase/srv/srv0srv.cc @@ -557,7 +557,7 @@ char srv_buffer_pool_load_at_startup = TRUE; #ifdef HAVE_PSI_STAGE_INTERFACE /** Performance schema stage event for monitoring ALTER TABLE progress -everything after flush log_make_checkpoint(). */ +in ha_innobase::commit_inplace_alter_table(). */ PSI_stage_info srv_stage_alter_table_end = {0, "alter table (end)", PSI_FLAG_STAGE_PROGRESS}; diff --git a/storage/innobase/srv/srv0start.cc b/storage/innobase/srv/srv0start.cc index cf936893e1b4f..afb7834c9b965 100644 --- a/storage/innobase/srv/srv0start.cc +++ b/storage/innobase/srv/srv0start.cc @@ -329,6 +329,13 @@ static dberr_t create_log_file(bool create_new_db, lsn_t lsn, log_sys.log.write_header_durable(lsn); + ut_ad(srv_startup_is_before_trx_rollback_phase); + if (create_new_db) { + srv_startup_is_before_trx_rollback_phase = false; + } + + /* Enable checkpoints in buf_flush_page_cleaner(). */ + recv_sys.recovery_on = false; mysql_mutex_unlock(&log_sys.mutex); log_make_checkpoint(); @@ -895,91 +902,74 @@ buffer pools. Flush the redo log buffer to the redo log file. @return lsn upto which data pages have been flushed. */ static lsn_t srv_prepare_to_delete_redo_log_file(bool old_exists) { - DBUG_ENTER("srv_prepare_to_delete_redo_log_file"); + DBUG_ENTER("srv_prepare_to_delete_redo_log_file"); - lsn_t flushed_lsn; - ulint count = 0; + /* Disable checkpoints in the page cleaner. */ + ut_ad(!recv_sys.recovery_on); + recv_sys.recovery_on= true; - if (log_sys.log.subformat != 2) { - srv_log_file_size = 0; - } + /* Clean the buffer pool. */ + buf_flush_sync(); - for (;;) { - /* Clean the buffer pool. */ - buf_flush_sync(); + if (log_sys.log.subformat != 2) + srv_log_file_size= 0; - DBUG_EXECUTE_IF("innodb_log_abort_1", DBUG_RETURN(0);); - DBUG_PRINT("ib_log", ("After innodb_log_abort_1")); + DBUG_EXECUTE_IF("innodb_log_abort_1", DBUG_RETURN(0);); + DBUG_PRINT("ib_log", ("After innodb_log_abort_1")); - mysql_mutex_lock(&log_sys.mutex); - - fil_names_clear(log_sys.get_lsn(), false); - - flushed_lsn = log_sys.get_lsn(); - - { - ib::info info; - if (srv_log_file_size == 0 - || (log_sys.log.format & ~log_t::FORMAT_ENCRYPTED) - != log_t::FORMAT_10_5) { - info << "Upgrading redo log: "; - } else if (!old_exists - || srv_log_file_size - != srv_log_file_size_requested) { - if (srv_encrypt_log - == (my_bool)log_sys.is_encrypted()) { - info << (srv_encrypt_log - ? "Resizing encrypted" - : "Resizing"); - } else if (srv_encrypt_log) { - info << "Encrypting and resizing"; - } else { - info << "Removing encryption" - " and resizing"; - } - - info << " redo log from " << srv_log_file_size - << " to "; - } else if (srv_encrypt_log) { - info << "Encrypting redo log: "; - } else { - info << "Removing redo log encryption: "; - } - - info << srv_log_file_size_requested - << " bytes; LSN=" << flushed_lsn; - } + mysql_mutex_lock(&log_sys.mutex); + const bool latest_format= (log_sys.log.format & ~log_t::FORMAT_ENCRYPTED) == + log_t::FORMAT_10_5; + lsn_t flushed_lsn= log_sys.get_lsn(); - mysql_mutex_unlock(&log_sys.mutex); + if (latest_format) + { + fil_names_clear(flushed_lsn, false); + flushed_lsn= log_sys.get_lsn(); + } - if (flushed_lsn != log_sys.get_flushed_lsn()) { - log_write_up_to(flushed_lsn, false); - log_sys.log.flush(); - } + { + const char *msg; + if (!latest_format || srv_log_file_size == 0) + { + msg= "Upgrading redo log: "; +same_size: + ib::info() << msg << srv_log_file_size_requested << " bytes; LSN=" + << flushed_lsn; + } + else if (old_exists && srv_log_file_size == srv_log_file_size_requested) + { + msg= srv_encrypt_log + ? "Encrypting redo log: " : "Removing redo log encryption: "; + goto same_size; + } + else + { + if (srv_encrypt_log == (my_bool)log_sys.is_encrypted()) + msg= srv_encrypt_log ? "Resizing encrypted" : "Resizing"; + else + msg= srv_encrypt_log + ? "Encrypting and resizing" + : "Removing encryption and resizing"; + + ib::info() << msg << " redo log from " << srv_log_file_size << " to " + << srv_log_file_size_requested + << " bytes; LSN=" << flushed_lsn; + } + } - ut_ad(flushed_lsn == log_sys.get_lsn()); - - /* Check if the buffer pools are clean. If not - retry till it is clean. */ - if (ulint pending_io = buf_pool.io_pending()) { - count++; - /* Print a message every 60 seconds if we - are waiting to clean the buffer pools */ - if (srv_print_verbose_log && count > 600) { - ib::info() << "Waiting for " - << pending_io << " buffer " - << "page I/Os to complete"; - count = 0; - } + mysql_mutex_unlock(&log_sys.mutex); - os_thread_sleep(100000); - continue; - } + if (flushed_lsn != log_sys.get_flushed_lsn()) + { + log_write_up_to(flushed_lsn, false); + log_sys.log.flush(); + } - break; - } + ut_ad(flushed_lsn == log_sys.get_lsn()); + ut_ad(!buf_pool.any_io_pending()); - DBUG_RETURN(flushed_lsn); + DBUG_RETURN(flushed_lsn); } /** Tries to locate LOG_FILE_NAME and check it's size, etc @@ -1259,7 +1249,7 @@ dberr_t srv_start(bool create_new_db) ut_ad(buf_page_cleaner_is_active); } - srv_startup_is_before_trx_rollback_phase = !create_new_db; + srv_startup_is_before_trx_rollback_phase = true; /* Check if undo tablespaces and redo log files exist before creating a new system tablespace */ @@ -1308,7 +1298,6 @@ dberr_t srv_start(bool create_new_db) if (create_new_db) { flushed_lsn = log_sys.get_lsn(); log_sys.set_flushed_lsn(flushed_lsn); - buf_flush_sync(); err = create_log_file(true, flushed_lsn, logfile0); @@ -1371,6 +1360,9 @@ dberr_t srv_start(bool create_new_db) if (!log_set_capacity(srv_log_file_size_requested)) { return(srv_init_abort(DB_ERROR)); } + + /* Enable checkpoints in the page cleaner. */ + recv_sys.recovery_on = false; } file_checked: @@ -2024,11 +2016,8 @@ void innodb_shutdown() break; case SRV_OPERATION_RESTORE: case SRV_OPERATION_RESTORE_EXPORT: - srv_shutdown_state = SRV_SHUTDOWN_CLEANUP; - if (!buf_page_cleaner_is_active) { - break; - } mysql_mutex_lock(&buf_pool.flush_list_mutex); + srv_shutdown_state = SRV_SHUTDOWN_CLEANUP; while (buf_page_cleaner_is_active) { pthread_cond_signal(&buf_pool.do_flush_list); my_cond_wait(&buf_pool.done_flush_list,