summaryrefslogtreecommitdiff
path: root/mysql-test/suite/galera/r
Commit message (Collapse)AuthorAgeFilesLines
* MDEV-24978 crash with transaction on table with no PK and long fulltext columnbb-10.2-MDEV-24978-galerasjaakola2021-09-301-0/+56
| | | | | | | | | | If a table has no unique indexes, write set key information will be collected on all columns in the table. The write set key information has space only for max 3500 bytes for individual column, and if a varchar colummn of such non-primary key table is longer than this limit, currently a crash follows. The fix in this commit, is to truncate key values extracted from such long varhar columns to max 3500 bytes. This may potentially lead to false positive certification failures for transactions, which operate on separate cluster nodes, and update/insert/delete table rows, which differ only in the part of such long columns after 3500 bytes border. Reviewed-by: Jan Lindström <jan.lindstrom@mariadb.com>
* Remove test from galera_fulltext until MDEV-24978 is fixed.bb-10.2-jan-galeraJan Lindström2021-09-271-28/+0
|
* Revert MDEV-25114Marko Mäkelä2021-09-243-170/+16
| | | | | | Revert 88a4be75a5f3b8d59ac8f6347ff2c197813c05dc and 9d97f92febc89941784d17d59c60275e21140ce0, which had been prematurely pushed by accident.
* Revert "MDEV-24978 : SIGABRT in __libc_message"bb-10.2-MDEV-24978-fJan Lindström2021-09-241-28/+0
| | | | This reverts commit 30dea4599e44e3008fb9bc5fe79ab5747841f21f.
* MDEV-25114 Crash: WSREP: invalid state ROLLED_BACK (FATAL)sjaakola2021-09-243-16/+170
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch is the plan D variant for fixing potetial mutex locking order exercised by BF aborting and KILL command execution. In this approach, KILL command is replicated as TOI operation. This guarantees total isolation for the KILL command execution in the first node: there is no concurrent replication applying and no concurrent DDL executing. Therefore there is no risk of BF aborting to happen in parallel with KILL command execution either. Potential mutex deadlocks between the different mutex access paths with KILL command execution and BF aborting cannot therefore happen. TOI replication is used, in this approach, purely as means to provide isolated KILL command execution in the first node. KILL command should not (and must not) be applied in secondary nodes. In this patch, we make this sure by skipping KILL execution in secondary nodes, in applying phase, where we bail out if applier thread is trying to execute KILL command. This is effective, but skipping the applying of KILL command could happen much earlier as well. This patch also fixes mutex locking order and unprotected THD member accesses on bf aborting case. We try to hold THD::LOCK_thd_data during bf aborting. Only case where it is not possible is at wsrep_abort_transaction before call wsrep_innobase_kill_one_trx where we take InnoDB mutexes first and then THD::LOCK_thd_data. This will also fix possible race condition during close_connection and while wsrep is disconnecting connections. Added wsrep_bf_kill_debug test case Reviewed-by: Jan Lindström <jan.lindstrom@mariadb.com>
* MDEV-26518 ; Galera incorrectly handles primary or unique keys with any ↵bb-10.2-MDEV-26517Jan Lindström2021-09-022-0/+61
| | | | | | | multi-byte character set We need to set temporary buffer large enough to fit also multi-byte characters.
* MDEV-26062 : InnoDB: WSREP: referenced FK check fail: Lock wait index ↵Jan Lindström2021-07-261-0/+52
| | | | | | | | | `PRIMARY` table `schema`.`child_table` Problem was that not all normal error codes where not handled after wsrep_row_upd_check_foreign_constraints() call. Furhermore, debug assertion did not contain all normal error cases. Changed ib:: calls to WSREP_ calls to use wsrep instrumentation.
* MDEV-26080 fixup: fixed .result file for galera_roles test (one word must be ↵Julius Goryavsky2021-07-231-2/+2
| | | | enclosed in single quotes).
* MDEV-25978 : rsync SST does not work with custom binlog nameJan Lindström2021-06-232-0/+192
| | | | | | | | wsrep_sst_common did not correctly set name for binlog index file if custom binlog name was used and this name was not added to script command line. Added test case for both log_basename and log_binlog.
* Fix try for Galera test lp1376747-4Jan Lindström2021-06-231-1/+1
|
* MDEV-25719: stunnel uses "verifyChain" without subject checksJulius Goryavsky2021-05-211-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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).
* MDEV-23580: WSREP_SST: [ERROR] rsync daemon port has been takenJulius Goryavsky2021-05-101-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-25418: Improve mariabackup SST script compliance with native MariaDB ↵Alexey Yurchenko2021-05-062-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SSL practices and configuration. 1. Pass joiner's authentication information to donor together with address in State Transfer Request. This allows joiner to authenticate donor on connection. Previously joiner would accept data from anywhere. 2. Deprecate custom SSL configuration variables tca, tcert and tkey in favor of more familiar ssl-ca, ssl-cert and ssl-key. For backward compatibility tca, tcert and tkey are still supported. 3. Allow falling back to server-wide SSL configuration in [mysqld] if no SSL configuration is found in [sst] section of the config file. 4. Introduce ssl-mode variable in [sst] section that takes standard values and has following effects: - old-style SSL configuration present in [sst]: no effect otherwise: - ssl-mode=DISABLED or absent: retains old, backward compatible behavior and ignores any other SSL configuration - ssl-mode=VERIFY*: verify joiner's certificate and CN on donor, verify donor's secret on joiner (passed to donor via State Transfer Request) BACKWARD INCOMPATIBLE BEHAVIOR - anything else enables new SSL configuration convetions but does not require verification ssl-mode should be set to VERIFY only in a fully upgraded cluster. Examples: [mysqld] ssl-cert=/path/to/cert ssl-key=/path/to/key ssl-ca=/path/to/ca [sst] -- server-wide SSL configuration is ignored, SST does not use SSL [mysqld] ssl-cert=/path/to/cert ssl-key=/path/to/key ssl-ca=/path/to/ca [sst] ssl-mode=REQUIRED -- use server-wide SSL configuration for SST but don't attempt to verify the peer identity [sst] ssl-cert=/path/to/cert ssl-key=/path/to/key ssl-ca=/path/to/ca ssl-mode=VERIFY_CA -- use SST-specific SSL configuration for SST and require verification on both sides Signed-off-by: Julius Goryavsky <julius.goryavsky@mariadb.com>
* MDEV-25418 rsync SST does not work with stunnel encryptionAlexey Yurchenko2021-05-062-0/+800
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Fix eval command line to correctly pass stunnel option to rsync on donor. 2. Deprecate `tkey`, `tcert` and `tca` options in [sst] section in favor of conventional `ssl-key`, `ssl-cert` and `ssl-ca`, but keep their precedence for backward compatibility. 3. Default to require SSL encryption if at least SSL key and cert files are specified in configuration, either in [sst] or [mysqld] sections. 4. Enable `verify*` option for stunnel on donor only if a. CA file is specified somewhere in the configuration b. it is explicitly requested in [sst] section by either specifying ssl-mode or CA file there. In this case if ssl-mode is not explicitly given, it defaults to VERIFY_CA. ssl-mode maps to stunnel options as follows: VERIFY_CA -> verifyChain = yes VERIFY_IDENTITY -> verifyPeer = yes Example to require donor to verify joiner identity: ``` [mysqld] ssl-cert=/path/to/cert ssl-key=/path/to/key ssl-ca=/path/to/ca [sst] ssl-mode=VERIFY_IDENTITY ``` 5. If SSL verification is requested, joiner verifies donor by checking the secret passed to donor via SST request. Signed-off-by: Julius Goryavsky <julius.goryavsky@mariadb.com>
* MDEV-24962: Galera SST innobackupex-move ignores Environment settingsJulius Goryavsky2021-05-043-9/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* MDEV-25319 : Long BF log wait turns on InnoDB Monitor output without ↵bb-10.2-MDEV-21514Jan Lindström2021-04-281-0/+22
| | | | | | | telling, never turns it off Removed explicit InnoDB monitor startup and used just functions to print current lock information.
* MDEV-25258 : SET PASSWORD command fail with wsrep apiJan Lindström2021-04-281-0/+19
| | | | | Problem was that we should skip strict password validation on applier nodes similarly as is done for slave nodes.
* MDEV-21514 : Galera test failure on galera.galera_wan_restart_sstJan Lindström2021-04-281-24/+24
| | | | | Replace unnecessary sleeps with real wait_conditions to make sure correct cluster sizes.
* MDEV-25307: The value of the auto-increment variables changes during the testbb-10.2-MDEV-25307Julius Goryavsky2021-04-111-0/+2
| | | | | | | | | | The auto-increment variables may change intermittently during the execution of some tests from the Galera mtr suite, causing these tests to fail. This patch creates conditions in which unpredictable changes to these variables are not possible during the execution of those tests in which this problem is noticed or their values are restored before the end of testing.
* MDEV-25047: SIGSEGV in mach_read_from_n_little_endianbb-10.2-MDEV-25047mkaruza2021-04-011-0/+19
| | | | | | | Virtual column fields are not found in prebuilt data type, so we should match InnoDB fields with `get_innobase_type_from_mysql_type` method. Reviewed-by: Jan Lindström <jan.lindstrom@mariadb.com>
* Add supression for warning.Jan Lindström2021-03-301-0/+1
|
* Follow up fixes for making @@wsrep_provider read-onlyDaniele Sciascia2021-03-231-1/+2
| | | | | | | | | | | * Remove usage of wsrep_provider variable in galera_ist_restart_joiner * Rename galera_load_provider.inc and galera_unload_provider.inc to galera_stop_replication.inc and galera_start_replication.inc. Their original names were no longer reflecting what these include files do. followup for ce3a2a688db Reviewed-by: Jan Lindström <jan.lindstrom@mariadb.com>
* MDEV-24903: mariabackup SST fails while adding --log-bin in startup commandJulius Goryavsky2021-03-191-0/+73
| | | | | | | | | | 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-18874 : Galera test MW-286 causes Mutex = ↵Jan Lindström2021-03-181-0/+50
| | | | | | | | | | TTASEventMutex<GenericPolicy>]: Assertion `!is_owned()' failed. assertion MDEV-24649 galera.galera_bf_lock_wait MTR failed with sigabrt: Assertion `!is_ow ned()' failed in sync0policy.ic on MutexDebug with Mutex = TTASEventMutex<GenericPolicy> Bug was fixed as part of MDEV-23328, this just adds test cases to regression set.
* MDEV-24978 : SIGABRT in __libc_messageJan Lindström2021-03-151-0/+28
| | | | | | Keyvalue can be longer than REC_VERSION_56_MAX_INDEX_COL_LEN and this leads out-of-array reference. Use dynamic memory allocation using actual max length of key value.
* Merge branch 'bb-10.2-release' into 10.2Sergei Golubchik2021-02-224-4/+4
|\
| * make @@wsrep_provider and @@wsrep_notify_cmd read-onlymariadb-10.2.37Sergei Golubchik2021-02-183-3/+3
| | | | | | | | this should simplify run-time cluster management
* | Suppress warning on galera_ssl_upgrade test.Jan Lindström2021-02-221-0/+4
| |
* | MDEV-19950: Galera test failure on galera_ssl_upgradeJulius Goryavsky2021-02-111-0/+5
|/ | | | | | | | | | The test requires adaptation for MariaDB, which is done in this patch. In addition, this patch includes a fix for the SST script startup code that adds escaping for special characters on the command line (in case they are contained in the arguments to mysqld). The fix does not require separate tests, as the required tests are already part of the mtr suite for Galera.
* MDEV-24509 : Warning: Memory not freed: 56 on SET @@global.wsrep_sst_authJan Lindström2021-01-261-5/+11
| | | | | It seems that memory is not freed when updated value is NULL or when wsrep is not initialized before shutdown.
* MDEV-23851 BF-BF Conflict issue because of UK GAP lockssjaakola2021-01-181-0/+89
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some DML operations on tables having unique secondary keys cause scanning in the secondary index, for instance to find potential unique key violations in the seconday index. This scanning may involve GAP locking in the index. As this locking happens also when applying replication events in high priority applier threads, there is a probabality for lock conflicts between two wsrep high priority threads. This PR avoids lock conflicts of high priority wsrep threads, which do secondary index scanning e.g. for duplicate key detection. The actual fix is the patch in sql_class.cc:thd_need_ordering_with(), where we allow relaxed GAP locking protocol between wsrep high priority threads. wsrep high priority threads (replication appliers, replayers and TOI processors) are ordered by the replication provider, and they will not need serializability support gained by secondary index GAP locks. PR contains also a mtr test, which exercises a scenario where two replication applier threads have a false positive conflict in GAP of unique secondary index. The conflicting local committing transaction has to replay, and the test verifies also that the replaying phase will not conflict with the latter repllication applier. Commit also contains new test scenario for galera.galera_UK_conflict.test, where replayer starts applying after a slave applier thread, with later seqno, has advanced to commit phase. The applier and replayer have false positive GAP lock conflict on secondary unique index, and replayer should ignore this. This test scenario caused crash with earlier version in this PR, and to fix this, the secondary index uniquenes checking has been relaxed even further. Now innodb trx_t structure has new member: bool wsrep_UK_scan, which is set to true, when high priority thread is performing unique secondary index scanning. The member trx_t::wsrep_UK_scan is defined inside WITH_WSREP directive, to make it possible to prepare a MariaDB build where this additional trx_t member is not present and is not used in the code base. trx->wsrep_UK_scan is set to true only for the duration of function call for: lock_rec_lock() trx->wsrep_UK_scan is used only in lock_rec_has_to_wait() function to relax the need to wait if wsrep_UK_scan is set and conflicting transaction is also high priority. Reviewed-by: Jan Lindström <jan.lindstrom@mariadb.com>
* MDEV-24432 : galera.galera_fk_cascade_delete_debug MTR failed: query 'reap' ↵Jan Lindström2021-01-152-20/+27
| | | | | | | failed: 1205: Lock wait timeout exceeded Add wait_conditions to verify correct database state before next operation.
* MDEV-24443 : galera.lp1376747-4 MTR fails: Result length mismatchJan Lindström2021-01-151-7/+6
| | | | Use debug_sync to force FTWRL to pause in correct state.
* MDEV-23065 : Crash after setting wsrep_on to ON dynamically and reconnectJan Lindström2020-12-191-0/+2
| | | | | At end_connection make sure we have wsrep before trying to free connection assigned to it.
* MDEV-24327 wsrep XID checkpointing order with log_slave_updates=OFFbb-10.2-MDEV-24327sjaakola2020-12-171-0/+33
| | | | | | | | | | | | | | | | | | | | | | | | If log_slave_updates==OFF, wsrep applier threads used to be configured with option: thd->variables.option_bits&= ~(OPTION_BIN_LOG); (i.e. like sql_log_bin=ON). And this was regardless of log-bin configuration. With this, having configuration of: --log-bin && --log-slave-updates=OFF, local threads used binlogging, but applier threads did not. And further: local threads went through binlog group commit, while applier threads did direct commits. This resulted in situation, where applier threads entered earlier in wsrep XID checkpointing, and could sync their wsrep XID out of order. Later local thread commit would see that higher seqno was already checkpointed, and fire an assert because of this. As a fix, applier threads are now forced to enable binlogging regardless of log-slave-updates configuration. This PR comes with new mtr test: galera.MDEV-24327, which causes a scenario where applier transaction is applied and committed while earlier local transaction is parked before commit order monitor enter. A buggy mariadb versoin would fail for assertion because of wsrep XID checkpoint order violation. Reviewed-by: Jan Lindström <jan.lindstrom@mariadb.com>
* MDEV-22136 : wsrep_restart_slave = 1 does not always workJan Lindström2020-11-231-0/+95
| | | | Add test case
* MDEV-24166 : Galera test failure on galera_toi_alter_auto_incrementJan Lindström2020-11-171-1/+1
| | | | Add primary key and wait condition.
* Fix MTR test galera.galera_triggerDaniele Sciascia2020-11-031-0/+44
| | | | | | | | | Changed the test so that it does not rely on specific auto increment ids. With Galera's default wsrep_auto_increment_control setting it is not guaranteed that auto increments always start from 1. The test was occasionally failing due to result content mismatch. Reviewed-by: Jan Lindström <jan.lindstrom@mariadb.com>
* MDEV-22707: galera got stuck after flush tablesmkaruza2020-10-271-0/+26
| | | | | | | Deadlock is possible between applier thread and local committing thread with active FLUSH TABLE. Applier thread should skip table share checks and locks when opening table. Reviewed-by: Jan Lindström <jan.lindstrom@mariadb.com>
* MDEV-21951: mariabackup SST fail if data-directory have lost+found directoryJulius Goryavsky2020-10-201-0/+37
| | | | | | | | | | | | | 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-19968 : Galera test failure on galera_load_dataJan Lindström2020-10-101-10/+15
| | | | Add necessary wait_conditions to stabilize test.
* MDEV-18593 : galera.galera_gcache_recover_full_gcache: Test failure: ↵Jan Lindström2020-10-061-1/+9
| | | | | | galera_gcache_recover_full_gcache.test: assert_grep.inc failed Grep only the fact that we need to fall back to SST.
* MDEV-21655 : galera.galera_wan_restart_ist MTR fails sporadically: WSREP did ↵Jan Lindström2020-09-161-18/+37
| | | | | | | not transition to state READY Replace sleeps with proper wait_conditions to wait correct cluster configuration.
* MDEV-23706 : Galera test failure on galera_autoinc_sst_mariabackupJan Lindström2020-09-091-36/+33
| | | | Remove infinite procedure and use direct INSERTs.
* MDEV-21578 : CREATE OR REPLACE TRIGGER in Galera cluster not replicatingJan Lindström2020-08-281-0/+32
| | | | | While doing TOI buffer OR REPLACE option was not added to replicated string.
* MDEV-23557 Galera heap-buffer-overflow in wsrep_rec_get_foreign_keybb-10.2-MDEV-23557sjaakola2020-08-282-6/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit contains a fix and extended test case for a ASAN failure reported during galera.fk mtr testing. The reported heap buffer overflow happens in test case where a cascading foreign key constraint is defined for a column of varchar type, and galera.fk.test has such vulnerable test scenario. Troubleshoting revealed that erlier fix for MDEV-19660 has made a fix for cascading delete handling to append wsrep keys from pcur->old_rec, in row_ins_foreign_check_on_constraint(). And, the ASAN failuer comes from later scanning of this old_rec reference. The fix in this commit, moves the call for wsrep_append_foreign_key() to happen somewhat earlier, and inside ongoing mtr, and using clust_rec which is set earlier in the same mtr for both update and delete cascade operations. for wsrep key populating, it does not matter when the keys are populated, all keys just have to be appended before wsrep transaction replicates. Note that I also tried similar fix for earlier wsrep key append, but using the old implementation with pcur->old_rec (instead of clust_rec), and same ASAN failure was reported. So it appears that pcur->old_rec is not properly set, to be used for wsrep key appending. galera.galera_fk_cascade_delete test has been extended by two new test scenarios: * FK cascade on varchar column. This test case reproduces same scenario as galera.fk, and this test scenario will also trigger ASAN failure with non fixed MariaDB versions. * multi-master conflict with FK cascading. this scenario causes a conflict between a replicated FK cascading transaction and local transaction trying to modify the cascaded child table row. Local transaction should be aborted and get deadlock error. This test scenario is passing both with old MariaDB version and with this commit as well.
* MDEV-22543 : Galera SST donation fails, FLUSH TABLES WITH READ LOCK times outJan Lindström2020-08-111-0/+17
| | | | | During SST we need to let FTWRL to use normal timeout method even when client is disconnected.
* Replaced infinite loop in procedure with limited loop to avoidbb-10.2-MDEV-22626Jan Lindström2020-08-071-7/+25
| | | | hang.
* MDEV-15236: galera_ist_progress fails when trying to read transfer statusmkaruza2020-07-241-0/+9
| | | Fixed by new recording test recording
* MDEV-20928 mtr test galera.galera_var_innodb_disallow_writes test failuresjaakola2020-07-241-15/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The sporadic test hangs happen because of mutex dealock between innodb background threads and two test connection executions. The test sets variable innodb_disallow_writes, which blocks all writes to filesyste. The test logic is to execute an INSERT, which should hang because of filesytstem writes are blocked, and through another session verify by SELECT that this hanging happens. The SELECT session will then release innodb_disallow_writes blocking. However, filesystem write blocking affects also innodb background threads and they may hang while keeping some other resources locked. As an example, in one test hang situation, buffer pool access was blocked. And, if buffer pool is blocked, the test connections will be blocked as well, and the SELECT session will not be able to continue to release the innodb_disallow_writes. The fix in this commit is refactoring of the test logic. The test will now set first innodb_disallow_writes blocking, and then record a hash of data directory's filesystem contents. This works as checksum of the state of data on the datadirectory. Then some SQL load is tried on both nodes, these sessions will be blocking due to frozen file system state. The test will have a short sleep to allow innodb background threads to loop and possibly encounter innodb_disallow_writes blocking as well. After the sleep, the test will record file system checksun for the second time, and then release the innodb_disallow-writes blocking. Finally, the two checksums are compared, they should be identical to verify that nothing was written on datadirectory during the test execution. The checksum is implemented by md5sum hash over all files found in datadirectory by find command. all these file hashes are hashed together by one more md5sum. The test therefore depends on md5sum and find. find may work differently with some OS distributions, e.g. freebsd may be problematic.