Commit graph

199 commits

Author SHA1 Message Date
Sergei Golubchik
7697bf0bd7 Merge branch 'github/10.0-galera' into 10.1
Note: some tests fail, just as they failed before the merge!
2015-12-22 10:32:33 +01:00
Nirbhay Choubey
8dfd157bb2 Merge branch '5.5-galera' into 10.0-galera 2015-12-19 19:19:32 -05:00
Nirbhay Choubey
58b54b7d1a MDEV-9044 : Binlog corruption in Galera
While refreshing the IO_CACHE, do not update its parameters (read_pos,
read_end & pos_in_file) if there is nothing left to read.
2015-12-18 14:35:56 -05:00
Nirbhay Choubey
3f515a09ff MDEV-9290 : InnoDB: Assertion failure in file trx0sys.cc line 353
As a fix for MDEV-8208, for initial wsrep threads, the
invocation of init_for_queries() was moved after plugins
were initialized. Due to which, OPTION_BEGIN bit of wsrep
applier THD (originally set in wsrep_replication_process)
got reset due to implicit commit within init_for_queries().
As a result, events from a multi-statement transaction from
another node were committed separately by the applier thread,
which leads to an assertion as they all carry same seqno.

Fixed by making sure that variable.option_bits are restored
post init_for_queries(). Also restored server_status.
Added a test case.
2015-12-16 20:07:12 -05:00
Monty
44b107da90 Fixed a bug in galera + some failing galera tests
- Added missning setting of table->rpl_write_set in record_gtid(), required by galera
- Removed output of WSREP_PATCH_VERSION from galera_defaults, as this can change over time
- Limit galera_many_tables_pk and galera_many_tables_nopk to 900, as
  on many systems the default open table limit is 1024
2015-12-10 12:39:54 +02:00
Nirbhay Choubey
75afa93eb1 Fix galera.galera_as_slave_nonprim test. 2015-11-20 12:32:31 -05:00
Sergei Golubchik
7f19330c59 Merge branch 'github/10.0-galera' into 10.1 2015-11-19 17:48:36 +01:00
Nirbhay Choubey
dcb7996cb7 Fix/disable failing tests. 2015-11-15 17:24:47 -05:00
Nirbhay Choubey
8d2d947ac1 Fix galera_var_dirty_reads test. 2015-10-13 15:42:53 -04:00
Nirbhay Choubey
38f3b99d46 MDEV-8831 : enforce_storage_engine doesn't block table creation on other nodes
Check if the engine is supported/allowed before replicating the
statement.
2015-10-01 20:36:25 -04:00
Nirbhay Choubey
4d33f9dca0 Merge branch '5.5-galera' into 10.0-galera 2015-09-25 14:57:56 -04:00
Nirbhay Choubey
d54bc3c0d1 Cleanup: remove dead code which could also lead to race. 2015-09-21 20:49:31 -04:00
Nirbhay Choubey
a401c11c4e Fix failing test cases
* Also modified name regex to include '#' as a valid symbol for
tests under disabled.def.
2015-09-14 15:26:50 -04:00
Nirbhay Choubey
ceac34404b lp:1372840 - test case 2015-09-10 09:57:08 -04:00
Philip Stoev
b3ec0a8589 Galera MTR Tests: a test for async slave + non-prim 2015-09-10 00:26:40 -04:00
Philip Stoev
c915d8caa6 Galera MTR Tests: attempt to work around codership/mysql-wsrep#179 2015-09-09 23:08:02 -04:00
Philip Stoev
371dc336ea refs codership/mysql-wsrep#90 MTR test case for mysql-wsrep#90 2015-09-09 23:04:43 -04:00
Philip Stoev
ee22ac3808 Galera MTR Tests: Various test stability fixes (take #5) 2015-09-09 22:53:39 -04:00
Philip Stoev
7d73931cbc Galera MTR Tests: Various test stability fixes (take #4) 2015-09-09 22:53:38 -04:00
Philip Stoev
ff76214a46 Galera MTR Tests: Various test stability fixes (take #3) 2015-09-09 22:53:38 -04:00
Philip Stoev
fd0aaad547 Galera MTR Tests: Various test stability fixes (take #2) 2015-09-09 22:53:32 -04:00
Philip Stoev
997119dafe Galera MTR Tests: Various test stability fixes. 2015-09-09 22:45:58 -04:00
Philip Stoev
182b237d40 Galera MTR Tests: remove variable output from galera_gra_log.test (take #2) 2015-09-09 22:42:43 -04:00
Philip Stoev
c9d4581e8a Galera MTR Tests: remove variable output from galera_gra_log.test 2015-09-09 22:42:43 -04:00
Philip Stoev
2316a4e19f Galera MTR Tests: Tests for GRA*.log files, replication bundle, preordered events, forced binlog format 2015-09-09 22:42:42 -04:00
Philip Stoev
a1a7414b1d Galera MTR Tests: An end-to-end test with restoring a node from xtrabackup; a test for restoring the primary component via pc.bootstrap 2015-09-09 22:42:31 -04:00
Philip Stoev
3893b5c6da Galera MTR Tests: mark all tests operating on large data sets with --source include/big-test.inc to help with Valgrind 2015-09-09 22:41:02 -04:00
Philip Stoev
83579c2ff3 Galera MTR Tests: fixes for mysqldump SST/IST tests 2015-09-09 22:39:28 -04:00
Philip Stoev
10f5c08f4b Refs codership/QA#47. Additional tests for FTWRL. 2015-09-09 22:39:27 -04:00
Philip Stoev
6104a27c98 Galera MTR Tests: increase lock wait timeout in suite/galera/t/galera_many_rows.test 2015-09-09 22:39:26 -04:00
Philip Stoev
4a630ce6ad Galera MTR Tests: A test for xtrabackup with key+cert encryption. 2015-09-09 22:39:26 -04:00
Philip Stoev
edd9bd3ea7 Fixes codership/mysql-wsrep#153 use --defaults-extra-file with mysqldump SST 2015-09-09 22:39:20 -04:00
Philip Stoev
5d531f07bf Galera MTR Tests: Use SET GLOBAL when setting wsrep_replicate_myisam, as it is a GLOBAL variable in MySQL Galera Cluster and SESSION in Percona XTraDB Cluster 2015-09-09 22:35:48 -04:00
Raghavendra D Prabhu
fbe739cbb1 Bug#1421360: Add 'FLUSH TABLES' to Total Order Isolation execution.
Before this, FLUSH TABLES and FLUSH TABLES t1 (REFRESH_TABLES hereafter) were executed locally,
which also had implications for GTID. MySQL async replication does
replicate FLUSH TABLES.

Hence, this commit

a)  Adds REFRESH_TABLES to TOI.

b) Skips LOCK-based REFRESH_TABLES from TOI, ie. FLUSH TABLES WITH READ
LOCK and FLUSH TABLES FOR EXPORT.

c) Executes them after reload_acl_and_cache. This is done since
reload_acl_and_cache checks for thd->locked_tables_mode and does upgrade
of MDL locks accordingly. A failure here means REFRESH_TABLES cannot
run.

    i) This is also important since LOCK TABLES is not replicated in
    galera.

d) Test galera_flush has been modified for

    i) wsrep_replicate_myisam SESSION variable.

    ii) Testing REFRESH_TABLES.

    iii) Testing REFRESH_TABLES + LOCK TABLES.

e) Use different WSREP_TO_ISOLATION_BEGIN for global FLUSH TABLES and FLUSH TABLES <table,>.
2015-09-09 22:33:52 -04:00
Philip Stoev
5a002adb5f Galera MTR Tests: various tests and test fixes 2015-09-09 22:31:06 -04:00
Philip Stoev
f1a00ed514 Galera MTR Tests: Use wsrep_sst_auth for tests that use xtrabackup + IST 2015-09-09 22:31:05 -04:00
Philip Stoev
483078b1b1 Fixes codership/QA#87 . An MTR test for SERIALIZABLE 2015-09-09 21:40:07 -04:00
Philip Stoev
4102d5258d Refs codership/mysql-wsrep#113 - tests around FLUSH TABLE, FLUSH TABLES, LOCK TABLE 2015-09-09 21:38:58 -04:00
Philip Stoev
f9805e4c98 Galera MTR Tests: tests for WAN restart, xtrabackup options and others. 2015-09-09 21:36:03 -04:00
Alexey Yurchenko
ef7b08978b Fixes codership/mysql-wsrep#122 - causal/casual typos fixed in wsrep code 2015-09-09 21:35:58 -04:00
Philip Stoev
bace2a9752 Galera MTR Tests: add a test for socket.ssl_compression 2015-09-09 21:33:23 -04:00
Philip Stoev
045b31c8f4 Test cases for codership/mysql-wsrep/110 2015-09-09 21:04:35 -04:00
Philip Stoev
d0e24c6799 Galera MTR Tests: Attempt to remove rare sporadic failures in galera_transaction_replay.test by waiting for all transactions to get blocked before proceeding. 2015-09-09 20:56:48 -04:00
Philip Stoev
f8b724db28 Galera MTR Tests: Enable the use of --parallel for port-intensive Galera tests by additionally specifying --port-group-size=50 2015-09-09 20:56:41 -04:00
Nirbhay Choubey
4cb6edba78 Update failing galera tests 2015-09-08 17:46:03 -04:00
Nirbhay Choubey
28ad6a7f28 MDEV-8763: Galera tests failures with --ps-protocol
(MDEV-8617: Post-fix for 10.1)
* Reset THD's PS members before returning when node is
not ready
* Add CF_SKIP_WSREP_CHECK flag to COM_STMT_XXX commands
* Skip TO replication of COM_STMT_PREPAREs for MyISAM
* Updated tests
2015-09-08 17:43:48 -04:00
Sergei Golubchik
a5b0a32ac3 Merge branch '10.0-galera' into 10.1 2015-09-03 16:32:00 +02:00
Nirbhay Choubey
f533b2b462 Merge branch '5.5-galera' into 10.0-galera 2015-08-25 11:15:45 -04:00
Nirbhay Choubey
4ee28865f6 MDEV-5146 : Bulk loads into partitioned table not working
When wsrep is enabled, for any update on innodb tables, the
corresponding keys are appended to galera's transaction writeset
(wsrep_append_keys()). However, for LOAD DATA, this got skipped
if binary logging was disabled or it was non-ROW based.
As a result, while the updates from LOAD DATA on non-partitioned
tables replicated fine as wsrep implicitly enables binary logging
(if not enabled, explicitly), the same did not work on partitioned
tables as for partitioned tables the binary logging gets disabled
temporarily (ha_partition::write_row()).

Fixed by removing the unwanted conditions from the check.
Also backported some changes from 10.0-galera to make sure
wsrep_load_data_splitting affects LOAD DATA commands only.
2015-08-20 20:55:52 -04:00
Nirbhay Choubey
ccd39b2dd3 Backport partition tests from 10.0-galera. 2015-08-20 09:55:54 -04:00
Nirbhay Choubey
e996304189 MDEV-8617: Multiple galera tests failures with --ps-protocol
(Additional fixes in 10.0-galera branch)
* Reset THD's PS members before returning when node is
not ready.
* Update galera_suspend_slave.test
2015-08-14 01:31:38 -04:00
Nirbhay Choubey
8a18bb9694 Merge branch '5.5-galera' into 10.0-galera 2015-08-14 01:17:57 -04:00
Nirbhay Choubey
e998dffde7 MDEV-8598 : Failed MySQL DDL commands and Galera replication
RENAME TABLE, unlike other DDLs, was getting replicated before
the access check was performed. As a result, the command could
get get replicated and thus executed on other nodes, even if it
fails on the originating node due to permission issues. Fixed by
moving the logic to check user privileges before replicating the
command.
2015-08-12 17:47:25 -04:00
Nirbhay Choubey
cd1a11ace3 MDEV-7205 : Galera cluster & sql_log_bin = off don't work
While sql_bin_log=1(0) is meant to control binary logging for the
current session so that the updates to do(not) get logged into the
binary log to be replicated to the async MariaDB slave. The same
should not affect galera replication.

That is, the updates should always get replicated to other galera
nodes regardless of sql_bin_log's value.

Fixed by making sure that the updates are written to binlog cache
irrespective of sql_bin_log.

Added test cases.
2015-08-08 15:04:15 -04:00
Nirbhay Choubey
4c69dc8116 MDEV#7501 : alter table exchange partition is not replicated in galera cluster
Added logic to replicate ALTER TABLE EXCHANGE PARTITION to other nodes
in the cluster.
2015-08-06 00:36:40 -04:00
Nirbhay Choubey
af2f7ce3f9 MDEV-8464 : ALTER VIEW not replicated in some cases
In galera, like other DDLs, CREATE/ALTER VIEW commands are recreated
and replicated during parsing. The ALGORITHM clause is internally set
to VIEW_ALGORITHM_INHERIT if its not explicitly specified by the user.
But since its not a valid type to be used in a command, it leads to an
assertion failure. The solution is to not include the ALGORITHM clause
in the command if its not explicitly specified (or INHERIT).
2015-07-19 22:51:19 -04:00
Nirbhay Choubey
dced5146bd Merge branch '10.0-galera' into 10.1 2015-07-14 16:05:29 -04:00
Nirbhay Choubey
6771b818a3 MDEV-8383 : "GRANT role TO user" does not replicate
Enable replication of GRANT/REVOKE ROLE commands across
galera nodes.
2015-07-10 19:06:42 -04:00
Nirbhay Choubey
70714d3597 Merge branch '5.5-galera' into 10.0-galera 2015-06-23 16:46:12 -04:00
Nirbhay Choubey
fc716dc5a5 MDEV-8260 : Issues related to concurrent CTAS
* Wait for aborted thd (victim) to release MDL locks
* Skip aborting an already aborted thd
* Defer setting OK status in case of CTAS
* Minor cosmetic changes
* Added a test case
2015-06-19 19:25:15 -04:00
Nirbhay Choubey
8c44fd63ac MDEV-8239 : Idle threads post-execution end up in closing tables state
Set thd's state to 'committed' only after it has done closing tables
(called indirectly by relay_group_info::cleanup_context()).
2015-06-19 00:17:25 -04:00
Nirbhay Choubey
6d5b723bdc Merge branch '5.5-galera' into 10.0-galera 2015-06-02 13:27:39 -04:00
Nirbhay Choubey
0bfae356d4 MDEV-8166 : Adding index on new table from select crashes Galera cluster
In wsrep, CTAS should be handled like a regular transaction.
Added a test case.
2015-05-16 11:11:26 -04:00
Nirbhay Choubey
c9c8e0554f Update galera/disabled.def & some more test fixes. 2015-05-12 23:43:06 -04:00
Nirbhay Choubey
c6c9a69cce Fix for some more test failures. 2015-05-12 16:56:06 -04:00
Nirbhay Choubey
99f496ae65 Fix for some failing tests 2015-05-08 17:43:58 -04:00
Nirbhay Choubey
3331d4e07e Merge galera tests from github.com/codership/mysql-wsrep 2015-05-08 17:43:57 -04:00
Philip Stoev
58bbe9b004 Fix suite/galera/t/galera_var_OSU_method.test 2015-05-08 17:41:08 -04:00
Philip Stoev
504ff56ece Adjust tests now that wsrep_OSU_method is a session variable. 2015-05-08 17:41:08 -04:00
Philip Stoev
03a8f83e2c Add tests for galera/mysql-wsrep#90 2015-05-08 17:41:07 -04:00
Teemu Ollakka
f5bce5a600 codership/mysql-wsrep#67 - total order isolation for FLUSH
The following FLUSH commands are now executed under total
order isolation:
* FLUSH DES_KEY_FILE
* FLUSH HOSTS
* FLUSH PRIVILEGES
* FLUSH QUERY CACHE
* FLUSH STATUS
* FLUSH USER_RESOURCES
2015-05-08 17:41:06 -04:00
Nirbhay Choubey
581b49dd3d MDEV-7995 : DMLs not getting replicated with log-bin=OFF & binlog-format != ROW
This bug is a side-effect of fix for MDEV-6924, where we completely
stopped a statement-based event from getting into the binlog cache when
binary logging is not enabled (and thus, wsrep_emulate_binlog mode = 1).
As a result, the SBR events were not replicated.

Fixed by allowing the SBR events to be written into the binlog cache.

Note: Only DMLs were affected as DDLs are replicated via TOI.

Merged galera_create_trigger.test from github.com/codership/mysql-wsrep.
2015-04-22 18:13:30 -04:00
Nirbhay Choubey
0095697784 MDEV-7996 : CURRENT_USER definer does not replicate for triggers
THD's lex->definer initially holds "*current_user" for CURRENT_USER().
As a result when wsrep tries to create the trigger query, it incorrectly
uses "*current_user". Fixed by calling get_current_user() to get the
real current user.

Merged galera_create_trigger.test from github.com/codership/mysql-wsrep.
2015-04-16 16:29:02 -04:00
Nirbhay Choubey
84a4db263a Merge branch '5.5-galera' into 10.0-galera 2015-03-28 17:29:10 -04:00
Nirbhay Choubey
d7445ea6df MDEV-7194: galera fails to replicate DDL queries when using binlog_checksum
Restore fix for MDEV-4328 (revno: 3391) that got accidentally
overwritten while merging :
http://bazaar.launchpad.net/~codership/codership-mysql/5.5-23/revision/3900

Added a test case.
2015-03-27 20:35:37 -04:00
Nirbhay Choubey
7a6cad5221 Backport fix for MDEV-7673, MDEV-7203 and MDEV-7192 from 10.0-galera 2015-03-11 12:36:00 -04:00
Nirbhay Choubey
d146605124 MDEV-7673: CREATE TABLE SELECT fails on Galera cluster
Enable execution of CREATE TABLE SELECT in total order isolation. Added
a test case.

Contributed by : Andrew W Elble
2015-03-06 13:22:15 -05:00
Nirbhay Choubey
9af42db613 MDEV-7192: binlog_annotate_row_events not completely compatible with galera
Annotate_rows event needs to be preserved until the last Rows event has
been applied because after it has been applied thd->query points to the
query stored inside this event.
2015-03-05 14:14:00 -05:00
Nirbhay Choubey
34d86ac9ff MDEV-6594: Use separate domain_id for Galera transactions 2015-02-27 22:33:41 -05:00
Sergei Golubchik
8e7649867f Merge 10.0-galera into 10.1 2015-02-06 16:14:23 +01:00
Nirbhay Choubey
47d8001c67 MDEV-7476: Allow SELECT to succeed even when node is not ready
Added a SESSION-only system variable "wsrep_dirty_reads" to allow SELECT
queries to pass even when the node is not prepared to accept queries
(wsrep_ready=OFF). Added a test case.
2015-01-27 16:54:24 -05:00
Nirbhay Choubey
9b7e3801f4 MDEV-7476: Allow SELECT to succeed even when node is not ready
Added a SESSION-only system variable "wsrep_dirty_reads" to allow SELECT
queries to pass even when the node is not prepared to accept queries
(wsrep_ready=OFF). Added a test case.
2015-01-27 16:22:29 -05:00
Nirbhay Choubey
455f77bdbb MDEV-7222: Cluster Node Crash at CREATE DEFINER statement
Check whether the definer host string is not null before
appending it to the specified buffer.
2015-01-02 10:01:09 -05:00
Nirbhay Choubey
6f65d2d114 MDEV-6924 : Server crashed on CREATE TABLE ... SELECT
Do not allow server to start if binlog_format is set
to a format other than ROW. Also restrict the change
of GLOBAL/SESSION binlog_format value at runtime.
2014-11-17 11:56:03 -05:00
Nirbhay Choubey
c68e73b53f MDEV-6924 : Server crashed on CREATE TABLE ... SELECT
Do not allow server to start if binlog_format is set
to a format other than ROW. Also restrict the change
of GLOBAL/SESSION binlog_format value at runtime.
2014-11-17 09:55:53 -05:00
Sergei Golubchik
93b50e64a0 cleanup: remove galera/wsrep magic from mtr 2014-10-01 23:38:27 +02:00
Nirbhay Choubey
9a57de86be bzr merge -r4123..4144 codership/5.6 2014-09-30 18:06:15 -04:00
Nirbhay Choubey
c4356bfccb MDEV-6447: Galera: Enable QC
* Added galera/query_cache test
* Merged patch for lp:1296403
2014-09-17 14:59:39 -04:00
Nirbhay Choubey
9a0566b09b MDEV-6447: Galera: Enable QC
* Added galera/query_cache test
* Merged patch for lp:1296403
2014-09-17 14:12:00 -04:00
Jan Lindström
9e63cc0780 MDEV-6651: MariaDB galera cluster crashes in file row0mysql.cc line 684
DELETE FROM ports WHERE ports.id = 'f37aa3fe-ab99-4d0f-a566-6cd3169d7516'
where table ports have foreign keys.

Verified that current 5.5-galera is not affected and added test case
to regression set.
2014-09-03 18:51:02 +03:00
Jan Lindström
d7f377538f MDEV-6651: MariaDB galera cluster crashes in file row0mysql.cc line 684
DELETE FROM ports WHERE ports.id = 'f37aa3fe-ab99-4d0f-a566-6cd3169d7516'
 where table ports have foreign keys. 

 Problem is repeatable with 10.0.12-galera but not with 10.0-13-galera.

 Added test case to regression set.
2014-09-03 18:25:49 +03:00
Jan Lindström
8cd08717f6 Move galera_sst_mode test to correct location. This test tests mysqldump
option.
2014-08-27 19:53:19 +03:00
Jan Lindström
df4dd593f2 MDEV-6247: Merge 10.0-galera to 10.1.
Merged lp:maria/maria-10.0-galera up to revision 3879.

Added a new functions to handler API to forcefully abort_transaction,
producing fake_trx_id, get_checkpoint and set_checkpoint for XA. These
were added for future possiblity to add more storage engines that
could use galera replication.
2014-08-26 15:43:46 +03:00
Nirbhay Choubey
7e85cfb50f MDEV#6266: Changing password fails on galera cluster
Added a check to skip ER_PASSWORD_ANONYMOUS_USER in
case the SET PASSWORD was executed by wsrep applier
thread.
2014-05-28 00:46:21 -04:00
Nirbhay Choubey
8597170772 Added test for MDEV#4953. 2014-05-21 11:59:33 -04:00
Nirbhay Choubey
a500865c13 Merged revision 3471, 3472 & 3473 from maria-5.5-galera. 2014-03-27 16:22:57 -04:00
Nirbhay Choubey
43c6c2ac77 Merged r3468 from maria-5.5-galera. 2014-03-27 08:22:29 -04:00
Nirbhay Choubey
689aaab0f8 MDEV#5552 Deadlock when inserting NULL column value
in column with UNIQUE index

References: lp:1276424
2014-02-28 23:15:35 -05:00
Nirbhay Choubey
e36fe045c0 Added MTR support for galera.
* include/galera_cluster.inc : Configures galera cluster with 2 nodes.
* include/galera_init.inc : Opens named connection with all the nodes.
* include/galera_end.inc : Closes all the connections.
* include/galera_connect.inc : Opens a named connection with a single
  node.
* include/galera_diff.inc : Runs a specified SQL query on all the nodes
  and diffs the output.
2014-02-25 13:13:39 -05:00