Commit graph

323 commits

Author SHA1 Message Date
Daniele Sciascia
f20b21a29a MW-86 Adjust MTR tests for changes to wsrep_sync_wait 2017-08-14 11:42:13 +03:00
Philip Stoev
5108deded5 Galera MTR Tests: Stability fixes 2017-08-11 14:17:33 +03:00
Philip Stoev
9064263703 Galera MTR Tests: Test for GAL-491: Progress output for IST 2017-08-11 14:15:23 +03:00
Daniele Sciascia
364b15c090 MW-336 Avoid slave threads leaking
This patch fixes two problems that may arise when changing the
value of wsrep_slave_threads:

1) Threads may be leaked if wsrep_slave_threads is changed
   repeatedly. Specifically, when changing the number of slave
   threads, we keep track of wsrep_slave_count_change, the
   number of slaves to start / stop. The problem arises when
   wsrep_slave_count_change is updated before slaves had a
   chance to exit (threads may take some time to exit, as they
   exit only after commiting one more replication event).
   The fix is to update wsrep_slave_count_change such that it
   reflects the number of threads that already exited or are
   scheduled to exit.

2) Attempting to set out of range value for wsrep_slave_threads
   (below 1 / above 512) results in wsrep_slave_count_change to
   be computed based on the out of range value, even though a
   warning is generated and wsrep_slave_threads is set to a
   truncated value. wsrep_slave_count_change is computed in
   wsrep_slave_threads_check(), which is called before mysql
   checks for valid range. Fix is to update wsrep_count_change
   whenever wsrep_slave_threads is updated with a valid value.
2017-08-11 12:31:26 +03:00
Daniele Sciascia
77f5b188d3 MW-357 Reset thd->wsrep_apply_toi regardless of applier exiting
Applier does not reset thd->wsrep_apply_toi if applier thread decides
to exit by setting 'exit= true'. The problem is that galera side may
decide not to kill the applier thread: for instance if we try to
SET wsrep_slave_threads = 0; then galera refuses to kill the last
applier thread. If this happens we are left with a thd which has not
been reset to the initial state.
This patch ensures that the thd is reset regardless of the applier
thread exiting or not.
2017-08-11 12:17:22 +03:00
Sergei Golubchik
f6633bf058 Merge branch '10.1' into 10.2 2017-07-05 19:08:55 +02:00
Sergei Golubchik
d38b15de65 Merge branch '10.0-galera' into 10.1 2017-06-30 16:33:13 +02:00
Sachin Setiya
e333d82964 MDEV-12398 All cluster nodes stop due to a foreign key constraint failure
Comment from Codership:-
To fix the problem, we changed the certification logic in galera to treat insert
on child table row as exclusive to prevent any operation on referenced
parent table row. At the same time, update and delete on
 child table row were demoted to "shared", which makes it possible to
update/delete referenced parent table row, but only in a later transaction.
 This change allows somewhat more concurrency for foreign key constrained
 transactions, but is still safe for correct certification end result.
2017-06-22 11:38:50 +05:30
Marko Mäkelä
2d8fdfbde5 Merge 10.1 into 10.2
Replace have_innodb_zip.inc with innodb_page_size_small.inc.
2017-06-08 12:45:08 +03:00
Sachin Setiya
3806a323ce Fix galera_var_node_address.test 2017-06-01 16:40:57 +05:30
Sachin Setiya
aa0f7e9bd7 Fix galera_defaults test and check_galera_version.inc script
Signed-off-by: Sachin Setiya <sachin.setiya@mariadb.com>
2017-05-31 17:53:32 +05:30
Sergei Golubchik
f42e08f951 Merge branch '10.0-galera' into 10.1 2017-05-26 19:21:19 +02:00
Sachin Setiya
d049a560bc Mdev-12319 Fix galera test failures 2017-05-08 21:19:26 +05:30
Marko Mäkelä
f740d23ce6 Merge 10.1 into 10.2 2017-04-28 12:22:32 +03:00
Sachin Setiya
ea4146229c Fix test failure , and add galera_restart_on_unknown_option to disabled. 2017-04-06 15:41:54 +05:30
Sachin Setiya
2e889de34a Fix test cases in galera suite
Signed-off-by: Sachin Setiya <sachin.setiya@mariadb.com>
2017-04-06 15:41:54 +05:30
Sachin Setiya
34d11b344b Fix galera_admin test
Patch credit Jan
2017-04-06 15:41:54 +05:30
Jan Lindström
2af4659b05 Fix failure on galera_toi_drop_database test.
It is assumed that both insert..select statements take so
long that drop database from node2 gets to abort them both
but on fast machines it was too small. Increased the size
of insert.
2017-04-06 15:41:54 +05:30
Sachin Setiya
5866c4d084 Fix test cases
Signed-off-by: Sachin Setiya <sachin.setiya@mariadb.com>
2017-04-06 15:41:54 +05:30
Sachin Setiya
633959525c Fix Some failing tests
Signed-off-by: Sachin Setiya <sachinsetia1001@gmail.com>
2017-04-06 15:41:54 +05:30
Philip Stoev
66916bba2a Galera MTR Tests: Tests for MW-328 Fix unnecessary/silent BF aborts 2017-04-06 15:41:54 +05:30
Philip Stoev
97a3a07c35 Galera MTR Tests: Stability fix for MW-329 2017-04-06 15:41:54 +05:30
Philip Stoev
59f3285f35 Galera MTR Tests: Test for MW-329 Fix incorrect affected rows count after replay 2017-04-06 15:41:54 +05:30
Alexey Yurchenko
770553e185 GAL-480 MTR test 2017-04-06 15:41:54 +05:30
Philip Stoev
298daccb10 Galera MTR Test: Test for MW-28 : Assertion with --wsrep-log-conflicts 2017-04-06 15:41:54 +05:30
Philip Stoev
59dcf2a5d5 Galera MTR Tests: stability fix for galera#414.test 2017-04-06 15:41:54 +05:30
Sachin Setiya
f369942d90 Galera MTR Tests: stability fixes
* remove part of galera_var_cluster_address.test that can not be tested reliably
 * reduce running time for galera_gcache_recover_manytrx.test
 * Additional wait_conditions for GAL-401.test

Signed-off-by: Sachin Setiya <sachin.setiya@mariadb.com>
2017-04-06 15:41:54 +05:30
Philip Stoev
c72e1ea940 Galera MTR Tests: Test for MW-313 Enforce wsrep_max_ws_rows also when binlog is enabled 2017-04-06 15:41:54 +05:30
Philip Stoev
f94c9b02cf Galera MTR Tests: MW-305 , re-enable the test for ALTER USER 2017-04-06 15:41:54 +05:30
Sachin Setiya
c3e9110033 Galera MTR Tests: Tests for GAL-419 Respect safe_to_bootstrap flag also with gcomm://
Signed-off-by: Sachin Setiya <sachinsetia1001@gmail.com>
2017-04-06 15:41:54 +05:30
Philip Stoev
07fe265a47 Galera MTR Tests: GAL-405 Initial implementation of GCache recovery on startup. 2017-04-06 15:41:54 +05:30
Sachin Setiya
9b13147d72 Galera MTR Tests: MW-308 , MW-307, GCF-992
* a dedicated test for wsrep_retry_autocommit
* some galera_toi_* tests were only passing because wsrep_retry_autocommit
  was in effect. The tests were changed to do not use autocommit
* higher timeout values in galera_2nodes.cnf , galera_3nodes.cnf

Signed-off-by: Sachin Setiya <sachin.setiya@mariadb.com>
2017-04-06 15:41:54 +05:30
Philip Stoev
09d8fbc0cf Galera MTR Tests: GCF-981 - galera_bf_abort is non deterministic 2017-04-06 15:41:54 +05:30
Sachin Setiya
e757e02417 Galera MTR Tests: Copy over some MTR tests from PXC
Signed-off-by: Sachin Setiya <sachin.setiya@mariadb.com>
2017-04-06 15:41:54 +05:30
Alexey Yurchenko
912ca4c153 GAL-401: MTR test for the fix. 2017-04-06 15:41:54 +05:30
Sergei Golubchik
1216244eb9 MDEV-11703 InnoDB background threads show up in the processlist
give threads more descriptive names
2017-03-29 00:40:21 +02:00
Sachin Setiya
d95dc57e75 Fix galera.galera_gcs_fc_limit 2017-03-23 13:24:18 +05:30
Sachin Setiya
656d0f10e5 Fix galera_admin test
Patch credit Jan
2017-03-21 14:26:19 +05:30
Jan Lindström
b22026ddfd Fix failure on galera_toi_drop_database test.
It is assumed that both insert..select statements take so
long that drop database from node2 gets to abort them both
but on fast machines it was too small. Increased the size
of insert.
2017-03-21 10:00:02 +02:00
Sachin Setiya
c401773c8d Fix test cases
Signed-off-by: Sachin Setiya <sachin.setiya@mariadb.com>
2017-03-16 08:07:58 +05:30
Sachin Setiya
1743d68868 Fix Some failing tests
Signed-off-by: Sachin Setiya <sachinsetia1001@gmail.com>
2017-03-15 00:07:37 +05:30
Philip Stoev
69b5bd7ae3 Galera MTR Tests: Tests for MW-328 Fix unnecessary/silent BF aborts 2017-03-14 15:53:46 +05:30
Philip Stoev
dd2f023427 Galera MTR Tests: restore galera_autoinc_sst_xtrabackup.test to use xtrabackup SST 2017-03-14 15:39:12 +05:30
Philip Stoev
5ac0d5fc24 Galera MTR Tests: Stability fix for MW-329 2017-03-14 15:38:39 +05:30
Philip Stoev
17f716062d Galera MTR Tests: Test for MW-329 Fix incorrect affected rows count after replay 2017-03-14 14:54:50 +05:30
Sachin Setiya
f29c40d0a5 GAL-480 MTR test 2017-03-14 14:31:13 +05:30
Philip Stoev
6fabf12ba0 Galera MTR Test: Test for MW-28 : Assertion with --wsrep-log-conflicts 2017-03-14 13:15:38 +05:30
Philip Stoev
f78332c581 Galera MTR Tests: stability fix for galera#414.test 2017-03-14 11:19:31 +05:30
Sachin Setiya
64bb59fce9 Galera MTR Tests: stability fixes
* remove part of galera_var_cluster_address.test that can not be tested reliably
 * reduce running time for galera_gcache_recover_manytrx.test
 * Additional wait_conditions for GAL-401.test

Signed-off-by: Sachin Setiya <sachinsetia1001@gmail.com>
2017-03-14 11:19:03 +05:30
Philip Stoev
451bf7243a Galera MTR Tests: Test for MW-313 Enforce wsrep_max_ws_rows also when binlog is enabled 2017-03-14 11:11:39 +05:30
Philip Stoev
395c420f0f Galera MTR Tests: MW-305 , re-enable the test for ALTER USER 2017-03-14 07:13:22 +05:30
Philip Stoev
0a06347333 Galera MTR Tests: Test for MW-309 - Fix wsrep_max_ws_rows so that it does not affect SELECT queries 2017-03-14 07:12:50 +05:30
Sachin Setiya
16e683fdad Galera MTR Tests: Tests for GAL-419 Respect safe_to_bootstrap flag also with
gcomm://

Signed-off-by: Sachin Setiya <sachinsetia1001@gmail.com>
2017-03-14 07:11:17 +05:30
Philip Stoev
108fd77486 Galera MTR Tests: GAL-405 Initial implementation of GCache recovery on startup. 2017-03-13 15:45:49 +05:30
Sachin Setiya
4573924f7d Galera MTR Tests: MW-308 , MW-307, GCF-992
* a dedicated test for wsrep_retry_autocommit
* some galera_toi_* tests were only passing because wsrep_retry_autocommit
  was in effect. The tests were changed to do not use autocommit
* higher timeout values in galera_2nodes.cnf , galera_3nodes.cnf

# Conflicts:
#	mysql-test/suite/galera/galera_2nodes.cnf
#	mysql-test/suite/galera/r/galera_defaults.result
#	mysql-test/suite/galera_3nodes/galera_3nodes.cnf
2017-03-12 23:00:20 +05:30
Philip Stoev
c2eaae268d Galera MTR Tests: GCF-981 - galera_bf_abort is non deterministic 2017-03-12 17:26:42 +05:30
Sachin Setiya
86ec6c221a MW-267: followup to the original pull request, removed unnecessary cast.
Signed-off-by: Sachin Setiya <sachinsetia1001@gmail.com>
2017-03-12 14:24:42 +05:30
Alexey Yurchenko
3045b60f0f GAL-401: MTR test for the fix. 2017-03-12 13:45:40 +05:30
Sachin Setiya
e4a2e80a57 MDEV-11229: galera.MW-258 galera.galera_as_master fail in buildbot. 2017-03-03 12:18:14 +05:30
Marko Mäkelä
b513e37117 Clean up some Galera tests.
Note: At least one test is unstable, failing with the following:
./mtr --mysqld=--innodb-purge-threads=9 --big-test --no-reorder \
galera.galera_parallel_autoinc_largetrx galera.galera_var_slave_threads

The result difference is dependent on innodb_purge_threads.
2017-02-24 22:13:42 +02:00
Sergei Golubchik
f3914d10b6 Merge branch 'bb-10.2-serg-merge' into 10.2 2017-02-11 09:45:34 +01:00
Sergei Golubchik
2195bb4e41 Merge branch '10.1' into 10.2 2017-02-10 17:01:45 +01:00
Nirbhay Choubey
8b2e642aa2 MDEV-7635: Update tests to adapt to the new default sql_mode 2017-02-10 06:30:42 -05:00
Nirbhay Choubey
3435e8a515 MDEV-7635: Part 1
innodb_autoinc_lock_mode            = 2
innodb_buffer_pool_dump_at_shutdown = ON
innodb_buffer_pool_dump_pct         = 25
innodb_buffer_pool_load_at_startup  = ON
innodb_checksum_algorithm           = CRC32
innodb_file_format                  = Barracuda
innodb_large_prefix                 = ON
innodb_log_compressed_pages         = ON
innodb_purge_threads                = 4
innodb_strict_mode                  = ON
binlog_annotate_row_events          = ON
binlog_format                       = MIXED
binlog-row-event-max-size           = 8192
group_concat_max_len                = 1M
lock_wait_timeout                   = 86400
log_slow_admin_statements           = ON
log_slow_slave_statements           = ON
log_warnings                        = 2
max_allowed_packet                  = 16M
replicate_annotate_row_events       = ON
slave_net_timeout                   = 60
sync_binlog                         = 1
aria_recover                        = BACKUP,QUICK
myisam_recover_options              = BACKUP,QUICK
2017-02-10 06:30:42 -05:00
Nirbhay Choubey
b0ea044d12 Update galera tests to adapt to recent changes in 10.2. 2017-02-01 15:43:40 -05:00
Nirbhay Choubey
bc4686f0f4 Minor test improvement 2017-01-31 12:28:09 -05:00
Nirbhay Choubey
aa9db4c162 MDEV-11817: Altering a table with more rows than ..
.. wsrep_max_ws_rows causes cluster to break when running
Galera cluster in TOI mode

Problem:
While copying records to temporary table during ALTER TABLE,
if there are more than wsrep_max_wsrep_rows records, the
command fails.

Fix:
Since, the temporary table records are not placed into the
binary log, wsrep_affected_rows must not be incremented.
Added a test.
2017-01-31 12:28:09 -05:00
Sachin Setiya
41997d148d MDEV-10812 WSREP causes responses being sent to protocol commands
that must not send a response

Problem:- When using wsrep (w/ galera) and issuing commands that can
cause deadlocks, deadlock exception errors are sent in responses to
commands such as close prepared statement and close connection which,
by spec, must not send a response.

Solution:- In dispatch_command, we will handle COM_QUIT and COM_STMT_CLOSE
commands even in case of error.

Patch Credit:- Jaka Močnik
2017-01-31 13:34:49 +05:30
Vicențiu Ciorbaru
5ac71d4464 Merge remote-tracking branch '10.0-galera' into 10.1 2017-01-16 04:53:57 +02:00
Marko Mäkelä
4e7b382d31 Merge 10.1 to 10.2
Most conflicts are related to the MDEV-11638 InnoDB shutdown refactoring.
2017-01-05 10:48:03 +02:00
Sachin Setiya
d9a1a201aa MDEV-11016 wsrep_node_is_ready() check is too strict
Problem:-
  The condition that checks for node readiness is too strict as it does
  not allow SELECTs even if these selects do not access any tables.
    For example,if we run
       SELECT 1;
    OR
       SELECT @@max_allowed_packet;
Solution:-
  We need not to report this error when all_tables(lex->query_tables)
  is NULL:
2017-01-03 10:10:58 +05:30
Sergei Golubchik
4a5d25c338 Merge branch '10.1' into 10.2 2016-12-29 13:23:18 +01:00
Nirbhay Choubey
75ab65aece Fix failing galera tests. 2016-12-20 15:31:18 -05:00
Nirbhay Choubey
b800264e49 MDEV-11152: wsrep_replicate_myisam: SELECT gets replicated
... using TO

Fixed the 'wsrep_replicate_myisam' check to allow only limited
set of commands. Added a debug assert to discover such cases.
2016-12-19 16:11:27 -05:00
Nirbhay Choubey
da4babb86c Fix failing galera tests. 2016-12-19 15:47:01 -05:00
Sachin Setiya
4c1e181ac5 MDEV-11479 Improved wsrep_dirty_reads
Tasks:-
         Changes in wsrep_dirty_reads variable
         1.) Global + Session scope (Current: session-only)
         2.) Can be set using command line.
         3.) Allow all commands that do not change data (besides SELECT)
         4.) Allow prepared Statements that do not change data
         5.) Works with wsrep_sync_wait enabled
2016-12-14 15:32:40 +05:30
Sachin Setiya
ffdd1e9d88 Revert "MDEV-11016 wsrep_node_is_ready() check is too strict"
This reverts commit 52ea5ad865.

# Conflicts:
#	mysql-test/suite/galera/r/galera_var_dirty_reads.result
#	mysql-test/suite/galera/t/galera_var_dirty_reads.test
#	sql/sql_parse.cc
2016-12-14 13:57:05 +05:30
Sachin Setiya
0c79de2419 MDEV-11479 Improved wsrep_dirty_reads
Tasks:-
         Changes in wsrep_dirty_reads variable
         1.) Global + Session scope (Current: session-only)
         2.) Can be set using command line.
         3.) Allow all commands that do not change data (besides SELECT)
         4.) Allow prepared Statements that do not change data
         5.) Works with wsrep_sync_wait enabled
2016-12-14 09:30:43 +05:30
Sachin Setiya
25a9a3da34 Revert "MDEV-11016 wsrep_node_is_ready() check is too strict"
This reverts commit 7ed5563bbe.
2016-12-14 08:39:36 +05:30
Nirbhay Choubey
e156ea1b95 Fix failing tests. 2016-12-09 12:15:41 -05:00
SachinSetiya
52ea5ad865 MDEV-11016 wsrep_node_is_ready() check is too strict
Problem:-
      The condition that checks for node readiness is too strict as it does
      not allow SELECTs even if these selects do not access any tables.
      For example,if we run
           SELECT 1;
      OR
           SELECT @@max_allowed_packet;
      Solution:-
      We need not to report this error when all_tables(lex->query_tables)
      is NULL:
2016-12-01 11:27:31 +05:30
SachinSetiya
ee3c99dfc7 Merge branch 'bb-mdev-11016' into 10.1 2016-11-22 16:17:05 +05:30
Nirbhay Choubey
491f42d50d Fix/disable some failing galera tests. 2016-11-07 11:53:59 -05:00
Nirbhay Choubey
9b6bd3f179 MDEV-11149: wsrep_replicate_mysaim: DML fails when binlog checksum enabled
During total-order replication, Query_log_event's checksum_alg
should be explicitly set to the current binlog_checksum as it
is not set for DML queries.
Note: wsrep_replicate_myisam enables replication of DMLs on
MyISAM tables using TOI.
2016-11-07 11:53:59 -05:00
Nirbhay Choubey
6bb6f30ff9 MDEV-9312: storage engine not enforced during galera cluster replication
Perform a post initialization of plugin-related variables
of wsrep threads after their global counterparts have been
initialized.
2016-11-07 11:53:56 -05:00
Nirbhay Choubey
7a170205e0 MDEV-11152: wsrep_replicate_myisam: SELECT gets replicated using TO
Fixed the 'wsrep_replicate_myisam' check to allow only limited
set of commands. Added a debug assert to discover such cases.
2016-11-02 09:45:43 -04:00
Sergei Golubchik
a98c85bb50 Merge branch '10.0-galera' into 10.1 2016-11-02 13:44:07 +01:00
Nirbhay Choubey
7196691b44 Fix/disable some failing galera tests. 2016-11-01 17:20:12 -04:00
SachinSetiya
7ed5563bbe MDEV-11016 wsrep_node_is_ready() check is too strict
Problem:-
  The condition that checks for node readiness is too strict as it does
  not allow SELECTs even if these selects do not access any tables.
  For example,if we run
       SELECT 1;
  OR
       SELECT @@max_allowed_packet;
  Solution:-
  We need not to report this error when all_tables(lex->query_tables)
  is NULL:
2016-10-28 23:15:48 +05:30
Nirbhay Choubey
7c525ce36b MDEV-9312: storage engine not enforced during galera cluster replication
Perform a post initialization of plugin-related variables
of wsrep threads after their global counterparts have been
initialized.
2016-09-28 13:26:13 -04:00
Sergei Golubchik
06b7fce9f2 Merge branch '10.1' into 10.2 2016-09-09 08:33:08 +02:00
Sergei Golubchik
a66092f2eb Merge branch 'bb-10.1-serg' into 10.1 2016-08-26 10:12:47 +02:00
Nirbhay Choubey
3575618237 Post merge fixes. 2016-08-25 21:28:26 -04:00
Nirbhay Choubey
90266e8a0e Merge branch '10.0-galera' into bb-10.1-serg 2016-08-25 15:39:39 -04:00
Nirbhay Choubey
8b09db8bfb Fixes/improvements in galera test suite 2016-08-24 17:13:20 -04:00
Nirbhay Choubey
1b7c5dedf7 MDEV-10566: Create role statement replicated inconsistently in Galera Cluster
In galera cluster, the definer (and thus binlog invoker) must be set
for CREATE ROLE before Query_log_event is created during TOI on the
originating node.
2016-08-24 15:32:48 -04:00
Nirbhay Choubey
2024cddaa4 MDEV-10518: Large wsrep_gtid_domain_id may break IST
wsrep_gtid_domain_id was incorrectly being parsed and stored
as a signed long number on the joiner node.
2016-08-22 21:27:20 -04:00
Nirbhay Choubey
3f481e52e4 Fixes for failing tests (post-merge). 2016-08-21 20:09:05 -04:00
Philip Stoev
f01a16b541 Galera MTR Tests: fortify galera_bf_abort_flush_for_export against sporadic failures. 2016-08-21 16:20:07 -04:00
Philip Stoev
30c6ac3cd1 Galera MTR Tests: Attempt to fortify galera_kill_ddl.test against sporadic failures 2016-08-21 16:20:07 -04:00