summaryrefslogtreecommitdiff
path: root/scripts
Commit message (Collapse)AuthorAgeFilesLines
* MDEV-25719: stunnel uses "verifyChain" without subject checksJulius Goryavsky2021-05-216-221/+303
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Another batch of changes that should make the SST process more reliable in all scenarios: 1) Added hostname or CN verification when stunnel is used with certificate chain verification (verifyChain = yes); 2) Added check for the absence of the stunnel utility for mtr tests; 3) Deletion of working files before and after SST is done more accurately; 4) rsync on joiner can be run even if the path to its configuration file contains spaces; 5) More accurate directory creation (for data files and for logs); 6) IST with mysqldump no longer turns off statement logging; 7) Reset password for mysqldump when password is empty but username is specified; 8) More reliable quoting when generating statements in wsrep_sst_mysqldump; 9) Added explicit generation of 2048-bit Diffie-Hellman parameters for sockat < 1.7.3, by analogy with xtrabackup; 10) Compression parameters for qpress are read from all suitable server groups in configuration file, as well as from the [sst] and [xtrabackup] groups; 11) Added a test that checks compression using qpress; 12) Checking for optional utilities is modified to work even if they implemented as built-in shell commands (unlikely on real systems, but more reliable).
* wsrep_sst_common.sh: file mode changed back to 664Julius Goryavsky2021-05-171-0/+0
|
* MDEV-25669: SST scripts should check all server groups in config filesJulius Goryavsky2021-05-155-85/+135
| | | | | | | | | | | | | | | | | | | | | | | 1) This commit implements reading all sections from configuration files while looking for the current value of any server variable, which were previously only read from the [mysqld.suffix] group and from [mysqld], but not from other groups such as [mariadb.suffix], [mariadb] or, for example, [server]. 2) This commit also fixes misrecognition of some parameters when parsing a command line containing a special marker for the end of the list of options ("--") or when short option names (such as "-s", "-a" and "-h arg") chained together (like a "-sah arg"). Such parameters can be passed to the SST script in the list of arguments after "--mysqld-args" if the server is started with a complex set of options - this was revealed during manual testing of changes to read configuration files. 3) The server-side preparation code for the "--mysqld-args" option list has also been simplified to make it easier to change in the future (if needed), and has been improved to properly handle the special backquote ("`") character in the argument values.
* MDEV-23580 addendum: normal operation in configurations where stunnel is not ↵Julius Goryavsky2021-05-112-1/+1
| | | | available
* MDEV-23580: WSREP_SST: [ERROR] rsync daemon port has been takenJulius Goryavsky2021-05-106-464/+610
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit contains a large set of further bug fixes and improvements to SST scripts for Galera, continuing the work that was started in MDEV-24962 to make SST scripts work smoothly in different network configurations (especially using ipv6) and with different environment settings: 1) The ipv6 addresses were incorrectly handled in the SST script for rsync (incorrect address substitution for establishing a connection, incorrect address substitution for bind, and so on); 2) Checking the locality of the ip-address in SST scripts did not support ipv6 addresses (such as "[::1]"), which were falsely identified as non-local ip, which further did not allow running two SSTs on different local addresses on the same machine. On the other hand, this bug masked some other errors (related to handling ipv6 addresses); 3) The code for checking the locality of the ip address was different in the SST scripts for rsync and for mysqldump, with individual flaws. This code is now made common and moved to wsrep_sst_common; 4) Waiting for the start of the transport channel (socat, nc, rsync, stunnel) in the wait_for_listen() and check_pid_and_port() functions did not process ipv6 addresses correctly in all cases (not for all branches); 5) Waiting for the start of the transport channel (socat, nc, rsync, stunnel) in the wait_for_listen() and check_pid_and_port() functions for some code branches could give a false positive result due to the textual match of prefixes in the port number and/or PID of the process; 6) Waiting for the start of the transport channel (socat, nc, rsync, stunnel) was supported through different utilities in SST scripts for mariabackup and for rsync, and with various minor flaws in the code. Now the code is still different in these scripts, but it supports a common set of utilities (lsof, ss, sockstat) and is synchronized across patterns that used to check the output of these utilities; 7) In SST via mariabackup, the signal about readiness to receive data is sometimes sent too early - immediately after listen(), and not after accept() (which are called by socat or netcat utility). 8) Checking availability of the some options of some utilities was done using the grep pattern, which easily gives false positives; 9) Common name (CN) for local addresses, if not explicitly specified, is now always replaced to "localhost" to avoid the need to generate many separate certificates for local addresses of one machine and not to depend on which the local address is currently used in test (ipv4 or ipv6, etc.); 10) In tests galera_sst_mariabackup_encrypt_with_key_server and galera_sst_rsync_encrypt_with_key_server the correct certificate is selected to avoid commonname (CN) mismatch problems; 11) Further refactoring to protect against spaces in file names. 12) Further general refactoring to eliminate bash-specific constructs or to improve code readability; 13) The code for setting options for the nc (netcat) utility was different in different scripts for SST - now it is made identical. 14) Fixed long-time broken encryption via xbcrypt in combination with mariabackup and added support for key-based encryption via openssl utility, which is now enabled by default for encrypt=1 mode (this default mode can be changed using a new configuration file option "encypt-format=openssl|xbcrypt", which can be placed in the [mysqld], [sst] or in the [xtrabackup] section) - this change will allow us to use and to test the encypt=1 encryption without installing non-standard third-party utilities.
* MDEV-24962 addendum: improved handling of paths with spacesJulius Goryavsky2021-05-062-14/+16
|
* MDEV-24962 addendum: mariabackup does not understand --log-bin-index and ↵Julius Goryavsky2021-05-061-3/+13
| | | | --log-basename options
* MDEV-24962: Galera SST innobackupex-move ignores Environment settingsJulius Goryavsky2021-05-046-819/+1328
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After switching to the new mariabackup interface (instead of the outdated innobackupex interface, which is supported for compatibility), we need to explicitly pass a path to the datadir directory as a parameter, since in the new interface the value of this option is not automatically set in such a way that it always matches the SST/IST logic. This commit adds passing this option as an explicit parameter to mariabackup. This commit also removed unnecessary options that are not used and not supported by mariabackup. Also, numerous flaws in the common wsrep_sst_common script have been fixed: 1) There are many bash-specific constructs in the script that may not be supported by other interpreters, which can lead to the most unexpected errors during SST, because failures in the interpretation of bash-specific constructs lead to incorrect parsing of arguments; 2) There is parse_cnf() function which is often called by other scripts for the "mysqld" or "--mysqld" group, but it does not take into account the default group suffix, which leads to reading values only from the default group, which then leads to errors due to reading the default values instead of the values for a specific group; 3) Some options such as --user, --innodb-data-home-dir or --datadir are not removed from the --mysqld-args list, although they are processed inside scripts (and passing of these options funther may cause problems for mariabackup); 4) If an argument that the script understands is present in the --mysqld-args list twice, then this causes SST to fail, instead of reading the most recent value; 5) The "--host" parameter is technically still supported among the arguments of the SST scripts, but in reality scripts do not work with it as expected, especially if it has an IPv6 address; 6) If the port number is absent in the --address parameter value, but the port number is explicitly passed through the --port argument, then the scripts for mariabackup and xtrabackup-v2 fail; 7) If a new address interface is used (with the --address parameter), then automatic default port substitution is not performed, although it is supported for the legacy --host/--port interface. 8) If there are spaces in the parameter values after --mysqld_args, then their further transfer does not occur correctly, which causes mariabackup to fail during SST - the space splits the argument in such a way that it breaks the parsing of the following parameters; 9) If most of the parameters that are names or paths to the files or directories contain spaces, then SST scripts fail in an unpredictable way due to incorrect variable substitutions; 10) If the --log-bin option is passed among the arguments of myqlds (--mysqld-args) without a parameter, and the --binlog option is not specified, then the script cannot substitute the default name for binlog and cannot construct binlog name using the --log-basename argument (which is against server specifications); 11) Tail slashes are not removed from the directory names, which, upon further substitution, leads to the appearance of a double slash in the file paths; 12) The explicit --binlog parameter (which is now always transmitted from the server side) and the "hidden" --log-bin parameter in the list of arguments after --mysqld-args are perceived as two different parameters in different parts of the scripts, and if they are do not match for some reason, this will lead to failures during SST; Also, all new changes from the 10.6 branch have been migrated here, including the latest pull requests for authentication (only the part that concerns SST scripts). It also fixes dozens of other bugs in all SST scripts.
* wsrep sst scripts: removing extra blank lines and spacesJulius Goryavsky2021-05-036-377/+329
| | | | | | | | | Removed numerous extra blank lines and spaces that interfere with reading and understanding program code, making it more difficult to find errors in scripts. I also removed all extra trailing spaces at the ends of lines, which lead to marking extra lines as changes (in subsequent changes). The amount of indentation in some parts of the code has also been normalized.
* MDEV-25326 mysql_install_db help text incompleteSergei Golubchik2021-04-271-5/+1
| | | | | | encourage the use of mysql_secure_installation, that can always set the root password correctly for all root accounts, no matter how many are there and what the structure of privilege tables is
* MDEV-25356: SST scripts should use the new mariabackup interfacebb-10.2-MDEV-25356Julius Goryavsky2021-04-111-7/+7
| | | | | | | | | | | SST scripts for Galera should use the new mariabackup interface instead of the innobackupex interface, which is currently only supported for compatibility reasons. This commit converts the SST script for mariabackup to use the new interface. It does not need separate tests, as any problems will be seen as failures when running multiple tests for the mariabackup-based SST.
* MDEV-24586: remove mysql_to_mariadb.sqlbb-10.2-MDEV-24586-danielblack-remove-mysql_to_mariadb.sqlDaniel Black2021-03-302-23/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | This script is unused and unmaintained. The logic is implemented in scripts/mysql_system_tables_fix.sql that forms part of mysql_upgrade Its components: alter table mysql.user drop column `password_last_changed`, drop column `password_lifetime`, drop column `account_locked`; has a friendlier migration path coming MDEV-24122 alter table mysql.user change column `authentication_string` `auth_string` text COLLATE utf8_bin NOT NULL; Already part of scripts/mysql_system_tables_fix.sql alter table mysql.user add column `Password` char(41) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL DEFAULT '' after `user`, add column `is_role` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N' after `auth_string`; alter table mysql.user add column `default_role` char(80) COLLATE utf8_bin NOT NULL DEFAULT '', add column `max_statement_time` decimal(12,6) NOT NULL DEFAULT '0.000000'; corrected in MDEV-23201 to be in the right order. update mysql.user set `password`=`auth_string`, plugin='' where plugin="mysql_native_password"; Is handled in server in the function acl_load.
* Don't pass password to innobackup via command line, use environment insteadbb-10.2-codership-cmd-line-pswdAlexey Yurchenko2021-03-292-6/+6
| | | | Signed-off-by: Julius Goryavsky <julius.goryavsky@mariadb.com>
* MDEV-24903: mariabackup SST fails while adding --log-bin in startup commandJulius Goryavsky2021-03-191-0/+3
| | | | | | | | | | Mariabackup SST fails if "--log-bin" option is added with no value to command line parameters at server startup. This is because the SST scripts do not correctly interpret the "--- log-bin" option without a value. This patch adds correct handling of the "--log-bin" parameter without value to the general part of the parameter parsing (for SST scripts) and fixes the problem. Also added a test that checks the correct operation of the server after the fix.
* MDEV-21039: Server fails to start with unknown mysqld_safe optionsJulius Goryavsky2021-03-161-1/+14
| | | | | | | | | | | | Adding any unknown option to the "[mysqld_safe]" section makes mysqld impossible to start with mysqld_multi. For example, after adding the unknown option "numa_interleave" to the "[mysqld_safe]" section, mysqld_multi exits with the following diagnostics: [ERROR] /usr/local/mysql/bin/mysqld: unknown option '--numa_interleave' To get rid of this behavior, this patch adds the passing of the default group suffix from mysqld_multi to the mysqld_safe side.
* MDEV-24122: on previously MySQL-5.7 datadirs, adjust mysql.user column orderDaniel Black2021-01-231-5/+19
| | | | | | | | MDEV-23201 correctly reordered columns in mysql.user table when upgrading from MySQL-5.7 Here we also correctly reorder columns in mysql.user table from an invalid order caused by an upgrade from MySQL-5.7 to MariaDB-before-MDEV-23201.
* MDEV-22630 mysql_upgrade (MariaDB 5.2.X --> MariaDB 10.3.X) does not fix ↵Sergei Golubchik2020-12-191-0/+1
| | | | | | | | | | | | | | auth_string to change it to authentication_string cherry-pick from 10.4: commit b976b9bfc3e Author: Sergei Golubchik <serg@mariadb.com> Date: Tue Apr 21 18:40:15 2020 +0200 MDEV-21244 mysql_upgrade creating empty global_priv table support upgrades from 5.2 privilege tables
* MDEV-21367: mysqld_safe log don't log to err.logAnel Husakovic2020-12-071-6/+4
| | | | | | | Introduced with 6b7918d524d5 in `10.2` just check for helper and handle it if exist. Reviewed by: cvicentiu@mariadb.org
* MDEV-24097 node restart overlaps with earlier still ongoing SST processsjaakola2020-11-231-0/+8
| | | | | | | | | | | | In galera_3nodes.galera_safe_to_bootstrap node restart can happen too soon, when earlier SST joiner process is still active in the node. Similar issue may hurt other mtr tests as well. This is second variant of fix for this issue. Here we only change rsync SST script to wait a little bit if lingering SST rsync is observed to be in execution. We assume that the previous mysqld and SST processes have been already signaled to abort during earlier stataup attempt. If other SST methods (than rsync) suffer from similar overlapping SST execution, they should be sorted out separately within each SST method handler scripts. Reviewed-by: Jan Lindström <jan.lindstrom@mariadb.com>
* Merge 10.1 into 10.2Marko Mäkelä2020-10-211-1/+1
|\
| * MDEV-23697: bin/env perl -i -> bin/perl -iAnel Husakovic2020-10-021-1/+1
| | | | | | | | | | - reverting 37c88445e30d doesn't mean adding space where shouldn't been - /bin/perl instead of /bin perl
| * MDEV-23697: bin/env perl -i -> bin perl -iAnel Husakovic2020-09-301-1/+1
| |
* | MDEV-21951: mariabackup SST fail if data-directory have lost+found directoryJulius Goryavsky2020-10-201-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | To fix this, it is necessary to add an option to exclude the database with the name "lost+found" from processing (the database name will be checked by the check_if_skip_database_by_path() or by the check_if_skip_database() function, and as a result "lost+found" will be skipped). In addition, it is necessary to slightly modify the verification logic in the check_if_skip_database() function. Also added a new test galera_sst_mariabackup_lost_found.test
* | MDEV-16676 Using malloc-lib=jemalloc in MariaDB 10.2 causes non-critical ↵Anel Husakovic2020-10-171-35/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | error about missing mysql_config on startup - This commit is based on patch 84fe9720a4d2483ff67b6a and suggestion of Jean Weisbuch to use `ldconfig -p` - Format of ldconfig output: "libjemalloc.so.1 (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libjemalloc.so.1" ``` $ ./scripts/mysqld_safe 201013 13:36:50 mysqld_safe Adding '/usr/lib/x86_64-linux-gnu/libjemalloc.so.1' to LD_PRELOAD for mysqld 201013 13:36:50 mysqld_safe Logging to '/home/anel/builds/data-10.5/mysqld_safe_anel.err'. 201013 13:36:50 mysqld_safe Starting mysqld daemon with databases from /home/anel/builds/data-10.5 ``` Reviewed by: Daniel Black, Faustin Lammler
* | MDEV-21770: `galera_3nodes.galera_ipv6_mariabackup` failsJulius Goryavsky2020-10-152-31/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes several flaws in the SST scripts that cause failures while running tests that use version 6 IP addresses for cluster nodes. First, if the netcat utility is used for streaming (but not socat), then in accordance with its command line syntax, we need to remove the square brackets around the IPv6 address. However, for socat, the address must contain square brackets, as before. Secondly, if an IPv6 address is used, then from the joiner side for a number of systems (such as Debian) we need to explicitly specify the "-6" option, otherwise a listening socket with an IPv6 address may not be created. This patch also contains code improvements in the wsrep_sst_common. Changed the code that pars the connection address - fixed the shortcomings that sometimes led to incorrect parsing of parameters when using shells other than the latest versions of bash. Also, this patch removes the duplicate code that is intended for parsing the connection address and which was located in the wsrep_sst_mariabackup file, since all the necessary actions have already been done in wsrep_sst_common and there they are done in such a way that any shell is supported, not just bash. The fix does not require separate tests, since all the necessary tests are already present in the galera_3nodes suite. On the contrary, after this fix, tests using IPv6 addresses can be removed from the disabled list (this will be done in a separate commit related to MDEV-23659).
* | MDEV-23201: mysql_upgrade order mysql.user for 5.7 cross-upgradeDaniel Black2020-10-151-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As MariaDB tables are expected in a fixed order, the cross upgrade previously placed roles, default_role and max_statement_time after now unused mysql-5.7 columns. Test: $ cp -a /usr/local/mysql-5.7.31/data/ /tmp/m57data $ sql/mysqld --no-defaults --skip-networking --datadir=/tmp/m57data --socket=/tmp/${PWD##*/}.sock --verbose --lc-messages-dir=$PWD/sql/share 2020-10-02 11:02:05 140135193212864 [Note] sql/mysqld (mysqld 10.2.34-MariaDB) starting as process 1457667 ... 2020-10-02 11:02:05 140135193212864 [Note] InnoDB: Mutexes and rw_locks use GCC atomic built $ client/mysql_upgrade --no-defaults -u root -pbob -S /tmp/build-mariadb-server-10.2.sock MySQL upgrade detected Phase 1/7: Checking and upgrading mysql database Processing databases mysql mysql.columns_priv OK mysql.db OK mysql.engine_cost OK mysql.event OK mysql.func OK mysql.gtid_executed OK mysql.help_category OK mysql.help_keyword OK mysql.help_relation OK mysql.help_topic OK mysql.innodb_index_stats OK mysql.innodb_table_stats OK mysql.ndb_binlog_index OK mysql.plugin OK mysql.proc OK mysql.procs_priv OK mysql.proxies_priv OK mysql.server_cost OK mysql.servers OK mysql.slave_master_info OK mysql.slave_relay_log_info OK mysql.slave_worker_info OK mysql.tables_priv OK mysql.time_zone OK mysql.time_zone_leap_second OK mysql.time_zone_name OK mysql.time_zone_transition OK mysql.time_zone_transition_type OK mysql.user OK Upgrading from a version before MariaDB-10.1 Phase 2/7: Installing used storage engines Result: | user | CREATE TABLE `user` ( `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', `User` char(80) COLLATE utf8_bin NOT NULL DEFAULT '', `Password` char(41) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL DEFAULT '', `Select_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Insert_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Update_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Delete_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Create_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Drop_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Reload_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Shutdown_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Process_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `File_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Grant_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `References_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Index_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Alter_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Show_db_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Super_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Create_tmp_table_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Lock_tables_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Execute_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Repl_slave_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Repl_client_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Create_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Show_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Create_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Alter_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Create_user_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Event_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Trigger_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Create_tablespace_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `ssl_type` enum('','ANY','X509','SPECIFIED') CHARACTER SET utf8 NOT NULL DEFAULT '', `ssl_cipher` blob NOT NULL, `x509_issuer` blob NOT NULL, `x509_subject` blob NOT NULL, `max_questions` int(11) unsigned NOT NULL DEFAULT 0, `max_updates` int(11) unsigned NOT NULL DEFAULT 0, `max_connections` int(11) unsigned NOT NULL DEFAULT 0, `max_user_connections` int(11) NOT NULL DEFAULT 0, `plugin` char(64) CHARACTER SET latin1 NOT NULL DEFAULT '', `authentication_string` text COLLATE utf8_bin NOT NULL, `password_expired` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `is_role` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `default_role` char(80) COLLATE utf8_bin NOT NULL DEFAULT '', `max_statement_time` decimal(12,6) NOT NULL DEFAULT 0.000000, `password_last_changed` timestamp NULL DEFAULT NULL, `password_lifetime` smallint(5) unsigned DEFAULT NULL, `account_locked` enum('N','Y') COLLATE utf8_bin NOT NULL DEFAULT 'N', PRIMARY KEY (`Host`,`User`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Users and global privileges' | MariaDB [(none)]> CREATE ROLE `aRole`; Query OK, 0 rows affected (0.00 sec) MariaDB [(none)]> SET ROLE `aRole`; Query OK, 0 rows affected (0.00 sec) MariaDB [(none)]> FLUSH PRIVILEGES; Query OK, 0 rows affected (0.00 sec) MariaDB [(none)]> SET ROLE `aRole`; Query OK, 0 rows affected (0.00 sec) MariaDB [(none)]> SELECT `User`, `is_role` FROM `mysql`.`user`; +---------------+---------+ | User | is_role | +---------------+---------+ | root | N | | mysql.session | N | | mysql.sys | N | | dan | N | | aRole | Y | +---------------+---------+ 5 rows in set (0.00 sec) Reviewer: Anel Husakovic
* | Merge branch '10.1' into 10.2Sujatha2020-09-281-1/+1
|\ \ | |/
| * MDEV-23697: perl -w -> perlDaniel Black2020-09-241-1/+1
| | | | | | | | | | | | | | | | | | | | Leave debian/additions/mysqlreport as #!/usr/bin/perl Acknowledge that `env perl` is a hack, a complete fix needs to consider which path perl is at and insert into these scripts. The usefulness of these scripts is questionable.
* | Increase mariabackup SST initial timeout to avoid timeouts.Jan Lindström2020-09-021-3/+4
| |
* | Merge 10.1 into 10.2Marko Mäkelä2020-08-211-16/+4
|\ \ | |/
| * Revert "MDEV-21039: Server fails to start with unknown mysqld_safe options"Jan Lindström2020-08-211-16/+4
| | | | | | | | This reverts commit 5796021174fd7096267003b999e02d6cf98f555b.
* | Merge 10.1 into 10.2Marko Mäkelä2020-08-201-4/+16
|\ \ | |/
| * MDEV-21039: Server fails to start with unknown mysqld_safe optionsJulius Goryavsky2020-08-181-4/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Adding any unknown option to the "[mysqld_safe]" section makes mysqld impossible to start with mysqld_multi. For example, after adding the unknown option "numa_interleave" to the "[mysqld_safe]" section, mysqld_multi exits with the following diagnostics: [ERROR] /usr/local/mysql/bin/mysqld: unknown option '--numa_interleave' To get rid of this behavior, this patch by default adds the "--loose-" prefix to all unknown (for mysqld_safe) options. This behavior can be enabled explicitly with the --ignore-unknown option and disabled with the --no-ignore-unknown option.
* | Merge 10.1 into 10.2Marko Mäkelä2020-08-134-25/+25
|\ \ | |/
| * MDEV-21526: mysqld_multi no longer works with different server binariesJulius Goryavsky2020-08-114-25/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem is caused by the fact that adding the --defaults-group-suffix option to fix MDEV-18863 causes mysqld to read all options from the appropriate sections of the config file, including options specific to mysqld_multi. Reading unknown options (which are not supported by mysqld) causes mysqld to terminate with an error. However, the MDEV-18863 problem has been completely fixed by passing options on the command line, and now there is no need to specify the --defaults-group-suffix option (we just need to give priority to options passed through the command line, so as not to break MDEV-18863).
* | Merge branch '10.1' into 10.2Oleksandr Byelkin2020-08-021-2/+1
|\ \ | |/
| * mysql_install_db: help lists --defaults-file twiceDaniel Black2020-07-241-2/+1
| | | | | | | | | | | | | | Removed duplicate. Also move the --no-defaults option close to the other "default*" options.
* | Merge 10.1 into 10.2Marko Mäkelä2020-07-141-29/+30
|\ \ | |/
| * MDEV-23027 symlink_wsrep_sst_rsync target built when WITH_WSREP is offVicențiu Ciorbaru2020-07-131-29/+30
| | | | | | | | Only install wsrep scripts and links if WSREP_ON is actually set
* | Merge 10.1 into 10.2bb-10.2-mergeMarko Mäkelä2020-07-012-2/+2
|\ \ | |/
| * mtr: use env for perlDaniel Black2020-06-232-2/+2
| | | | | | | | | | | | | | | | On FreeBSD, perl isn't in /usr/bin, its in /usr/local/bin or elsewhere in the path. Like storage/{maria/unittest/,}ma_test_* , we use /usr/bin/env to find perl and run it.
* | MDEV-21709 ZFS snapdir=visible breaks Galera rsync SST replcationVincent Milum Jr2020-06-241-1/+3
| | | | | | | | | | Fix for Galera rsync SST with the specific conditions listed in MDEV-21709 Exclude needs to be on receiving side too
* | MDEV-22554: galera_sst_mariabackup fails with "Failed to start mysqld.2"Julius Goryavsky2020-05-181-1/+5
| | | | | | | | | | | | | | The problem is caused by the operation of netcat streamer and does not appear on systems where socat is installed. We need to add the "-N" option for netcat to call shutdown() on the socket when receiving EOF from STDIN.
* | MDEV-22159: Don't redirect as root to a tmp file not owned by rootOtto Kekäläinen2020-04-221-1/+8
| | | | | | | | | | | | Also add a check for tmp file being empty and bail out with a clear error message in such a case, as mysqld_safe prevents normal stderr from being displayed anywhere and would fail silently on this.
* | Merge 10.1 into 10.2Marko Mäkelä2020-04-141-2/+1
|\ \ | |/
| * MDEV-21140 Make galera_recovery.sh work with fs.protected_regular = 1 (#1417)Alexander E. Patrakov2020-04-051-2/+1
| | | | | | | | | | The log file is opened as root since commit bb7a70c, so there is no need to chown it.
* | Merge branch '10.1' into 10.2Oleksandr Byelkin2020-01-241-2/+2
|\ \ | |/
| * MDEV-17601: MariaDB Galera does not expect 'mbstream' as streamfmtJulius Goryavsky2020-01-211-2/+2
| | | | | | | | | | | | | | | | | | | | | | Setting "streamfmt=mbstream" in the "[sst]" section causes SST to fail because the format automatically switches to 'tar' by default (insead of mbstream). To fix this, we need to add mbstream to the list of valid values for the format, making it synonymous with xbstream. This must be done both in the SST script and when parsing the options of the corresponding utilities.
* | Merge branch '10.1' into 10.2Oleksandr Byelkin2019-12-031-1/+1
|\ \ | |/
| * Merge branch '5.5' into 10.1Oleksandr Byelkin2019-12-031-1/+1
| |\