Commit graph

172832 commits

Author SHA1 Message Date
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
0759c9baf5 Fix mysqlhotcopy test failures
Signed-off-by: Sachin Setiya <sachin.setiya@mariadb.com>
2017-03-21 12:14:19 +05:30
Sachin Setiya
0b51dee0e3 Change VERSION no to 30 2017-03-20 18:52:18 +05:30
Sachin Setiya
9cf499724f Merge branch '10.0' into bb-10.0-galera 2017-03-20 18:11:56 +05:30
Jan Lindström
53c6195eed Fixed test failure on galere_wsrep_log_conflicts on XtraDB.
Problem was that trx_sys->mutex was acquired to print trx info
even when we already hold trx_sys->mutex. Fixed similarly as
in InnoDB, i.e. with wsrep_trx_print_locking() function that
does not acquire trx_sys->mutex.
2017-03-20 10:17:13 +02:00
Marko Mäkelä
4c35dce296 Clean up the test mentioned in MDEV-12052.
The test is not expected to crash. With a non-debug server,
Valgrind completes in reasonable time without any failure.

Also, it does not make sense to store and restore parameters
when the parameters are already being restored by a server restart.
2017-03-18 22:50:14 +02:00
Sachin Setiya
f66395f7c0 Merge tag 'mariadb-10.0.30' into bb-sachin-10.0-galera-merge
Signed-off-by: Sachin Setiya <sachin.setiya@mariadb.com>
2017-03-17 02:05:20 +05:30
Sergei Golubchik
8971286a3c compiler warning 2017-03-16 14:03:17 +01:00
Monty
2d0c579a86 Wait for slave threads to start during startup
- Before this patch during startup all slave threads was started without
  any check that they had started properly.
- If one did a START SLAVE, STOP SLAVE or CHANGE MASTER as first command to the server
  there was a chance that server could access structures that where not
  properly  initialized which could lead to crashes in
  Log_event::read_log_event
- Fixed by waiting for slave threads to start up properly also during
  server startup, like we do with START SLAVE.
2017-03-16 14:21:33 +02:00
Monty
e7f55fde88 Removed wrong assert
The following is an updated commit message for the following commit
that was pushed before I had a chance to update the commit message:
c5e25c8b40

Fixed dead locks when doing stop slave while slave was starting.

- Added a separate lock for protecting start/stop/reset of a specific slave.
  This solves some possible dead locks when one calls stop slave while
  the slave is starting as the old run_locks was over used for other things.
- Set hash->records to 0 before calling free of all hash elements.
  This was set to stop concurrent threads to loop over hash elements and
  access members that was already freed.
  This was a problem especially in start_all_slaves/stop_all_slaves
  as the mutex protecting the hash was temporarily released while a slave
  was started/stopped.
- Because of change to hash->records during hash_reset(),
  any_slave_sql_running() will return 1 during shutdown as one can't
  loop over master_info_index->master_info_hash while hash_reset() of it
  is in progress.
  This also fixes a potential old bug in any_slave_sql_running() where
  during shutdown and ~Master_info_index(), my_hash_free() we could
  potentially try to access elements that was already freed.
2017-03-16 14:21:32 +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
5bb7653667 Fix wsrep_affected_rows.
The value of wsrep_affected_rows were not reseted properly for
slave. Now we also wsrep_affected_rows in Xid_log_event::do_apply_event
also , apart from THD::cleanup_after_query().

Signed-off-by: Sachin Setiya <sachin.setiya@mariadb.com>
2017-03-16 02:13:31 +05:30
Sergei Golubchik
2c2bd8c155 MDEV-12261 build failure without P_S
restore mysql_file_delete_with_symlink() but let it use
new my_handler_delete_with_symlink() mysys helper.
2017-03-15 17:48:30 +01:00
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
25070d2a2c Bump WSREP_PATCH_VERSION to 19 2017-03-15 00:07:37 +05:30
Sachin Setiya
ad7b00fb90 Galera MTR Tests: do not run innodb.innodb_stats_del_mark and some other tests with Galera, as it produces warnings
Signed-off-by: Sachin Setiya <sachinsetia1001@gmail.com>
2017-03-15 00:07:16 +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
00f1ed6655 Galera MTR Tests: fix variable output in galera_as_slave_gtid_replicate_do_db.result
Signed-off-by: Sachin Setiya <sachinsetia1001@gmail.com>
2017-03-14 14:44:53 +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
Sachin Setiya
0e0ae0bb06 MW-28, codership/mysql-wsrep#28 Fix sync_thread_levels debug assert
Introduced a new wsrep_trx_print_locking() which may be called
under lock_sys->mutex if the trx has locks.

Signed-off-by: Sachin Setiya <sachinsetia1001@gmail.com>
2017-03-14 13:13:22 +05:30
sjaakola
471dd11381 refs: MW-319
* silenced the WSREP_ERROR, this fires for all replication filtered DDL,
  and is false positive
2017-03-14 11:49:45 +05:30
Sachin Setiya
c49bfff992 Galera MTR tests: Make the mysqlhotcopy tests pass on Ubuntu 16.04
Signed-off-by: Sachin Setiya <sachinsetia1001@gmail.com>
2017-03-14 11:21:16 +05:30
Philip Stoev
e29d7b1d0b Bump WSREP_PATCH_VERSION to 18 2017-03-14 11:19:48 +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
Daniele Sciascia
9dda6cb08d MW-313 Enforce wsrep_max_ws_rows also when binlog is enabled 2017-03-14 11:11:18 +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
Philip Stoev
5d9c747193 Galera MTR tests: Update galera_defaults.result for GAL-360 2017-03-14 07:12:16 +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
Vicențiu Ciorbaru
06f1f1aa6e Make ELOOP be considered a File Not Found error when it comes from handlerton
Fix symlink-aria && symlink-myisam to account for this possibility.
2017-03-14 00:25:26 +02:00
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
9be994ba69 MW-309 Fix wsrep_max_ws_rows so that it does not affect queries
Option wsrep_max_ws_rows is intended to limit the maximum number of rows
in a writeset. To enforce this limit, we increment THD::wsrep_affected_rows
on every INSERT, UPDATE or DELETE. The problem is that we do so even on
insertion to internal temporary tables used for SELECTs and such.
THD::wsrep_affected_rows is now incremented only for rows that are actually
replicated.

Signed-off-by: Sachin Setiya <sachinsetia1001@gmail.com>
2017-03-13 05:30:02 +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
Philip Stoev
0e105bc1f2 Galera MTR Tests: Test for GCF-942 - safe_to_bootstrap flag in grastate.dat 2017-03-12 15:08:08 +05:30
Philip Stoev
15298689cb Bump WSREP_PATCH_VERSION to 17 2017-03-12 14:24:57 +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
Marko Mäkelä
032678ad18 MDEV-12091 Shutdown fails to wait for rollback of recovered transactions to finish
In the 10.1 InnoDB Plugin, a call os_event_free(buf_flush_event) was
misplaced. The event could be signalled by rollback of resurrected
transactions while shutdown was in progress. This bug was caught
by cmake -DWITH_ASAN testing. This call was only present in the
10.1 InnoDB Plugin, not in other versions, or in XtraDB.

That said, the bug affects all InnoDB versions. Shutdown assumes the
cessation of any page-dirtying activity, including the activity of
the background rollback thread. InnoDB only waited for the background
rollback to finish as part of a slow shutdown (innodb_fast_shutdown=0).
The default is a clean shutdown (innodb_fast_shutdown=1). In a scenario
where InnoDB is killed, restarted, and shut down soon enough, the data
files could become corrupted.

logs_empty_and_mark_files_at_shutdown(): Wait for the
rollback to finish, except if innodb_fast_shutdown=2
(crash-like shutdown) was requested.

trx_rollback_or_clean_recovered(): Before choosing the next
recovered transaction to roll back, terminate early if non-slow
shutdown was initiated. Roll back everything on slow shutdown
(innodb_fast_shutdown=0).

srv_innodb_monitor_mutex: Declare as static, because the mutex
is only used within one module.

After each call to os_event_free(), ensure that the freed event
is not reachable via global variables, by setting the relevant
variables to NULL.
2017-03-10 18:54:29 +02:00
Vicențiu Ciorbaru
1d47bd61d5 Remove leftover merge conflict marker 2017-03-09 16:52:57 +02:00
Marko Mäkelä
1b2b209519 Use correct integer format with printf-like functions. 2017-03-09 11:28:07 +02:00
Marko Mäkelä
8805fe0d5c Use %pure-parser instead of the deprecated %pure_parser. 2017-03-09 11:27:24 +02:00
Marko Mäkelä
2158de8865 Remove unused variables. 2017-03-09 11:26:36 +02:00