Commit graph

86 commits

Author SHA1 Message Date
Marko Mäkelä
e3d44f5d62 Merge bb-10.2-ext into 10.3 2017-09-21 08:12:19 +03:00
Vicențiu Ciorbaru
22c322c649 Merge branch '10.1' into 10.2 2017-09-19 12:43:02 +03:00
Vicențiu Ciorbaru
ba0ee91077 Merge branch '10.0-galera' into 10.1 2017-09-19 10:20:01 +03:00
Marko Mäkelä
4e1fa7f63d Merge bb-10.2-ext into 10.3 2017-09-01 11:33:45 +03:00
Jan Lindström
eba0120d8f Fix test failures on embedded server.
Problem was incorrect definition of wsrep_recovery,
trx_sys_update_wsrep_checkpoint and
trx_sys_read_wsrep_checkpoint functions causing
innodb_plugin not to load as there was undefined symbols.
2017-08-31 14:04:02 +03:00
Marko Mäkelä
a36c369bda Merge 10.1 into 10.2
For running the Galera tests, the variable my_disable_leak_check
was set to true in order to avoid assertions due to memory leaks
at shutdown.

Some adjustments due to MDEV-13625 (merge InnoDB tests from MySQL 5.6)
were performed. The most notable behaviour changes from 10.0 and 10.1
are the following:

* innodb.innodb-table-online: adjustments for the DROP COLUMN
behaviour change (MDEV-11114, MDEV-13613)

* innodb.innodb-index-online-fk: the removal of a (1,NULL) record
from the result; originally removed in MySQL 5.7 in the
Oracle Bug #16244691 fix
377774689b

* innodb.create-index-debug: disabled due to MDEV-13680
(the MySQL Bug #77497 fix was not merged from 5.6 to 5.7.10)

* innodb.innodb-alter-autoinc: MariaDB 10.2 behaves like MySQL 5.6/5.7,
while MariaDB 10.0 and 10.1 assign different values when
auto_increment_increment or auto_increment_offset are used.
Also MySQL 5.6/5.7 exhibit different behaviour between
LGORITHM=INPLACE and ALGORITHM=COPY, so something needs to be tested
and fixed in both MariaDB 10.0 and 10.2.

* innodb.innodb-wl5980-alter: disabled because it would trigger an
InnoDB assertion failure (MDEV-13668 may need additional effort in 10.2)
2017-08-31 09:30:40 +03:00
Michael Widenius
4aaa38d26e Enusure that my_global.h is included first
- Added sql/mariadb.h file that should be included first by files in sql
  directory, if sql_plugin.h is not used (sql_plugin.h adds SHOW variables
  that must be done before my_global.h is included)
- Removed a lot of include my_global.h from include files
- Removed include's of some files that my_global.h automatically includes
- Removed duplicated include's of my_sys.h
- Replaced include my_config.h with my_global.h
2017-08-24 01:05:44 +02:00
Jan Lindström
c23efc7d50 Merge remote-tracking branch 'origin/10.0-galera' into 10.1 2017-08-21 13:35:00 +03:00
sjaakola
224ae5770f Refs: MW-363 * enabling binlog file copying even for binlog files with basename "0" * mtr suite uses binlog files with names: 0.000001, 0.000002.. and so on 2017-08-14 14:41:05 +03:00
Alexey Yurchenko
83664e21e4 MW-366 Improved support for IPv6 networks - made mysqld and SST scripts to recognize []-escaped IPv6 addresses - pulled in latest Percona and MariaDB updates to SST scripts - instruct netcat and socat in wsrep_sst_xtrabackup-v2 to listen on IPv6 socket via sockopt parameter in the [sst] section of my.cnf
In summary, wsrep_node_address and wsrep_sst_receive_address can now
be set to IPv6 addresses escaped by []. Rsync SST works out ouf the
box thanks to rsync daemon listening on both IPv4 and IPv6 sockets by
default. For xtrabackup SST onver IPv6 one needs to set sockopt in
the [sst] section of joiner's configuration file to ",pf=ip6" if
using socat as a streamer or to "-6" if using netcat.
2017-08-11 15:00:18 +03:00
Jan Lindström
09b28b3d10 Fix compiler warnings on gcc 6.x. 2017-04-05 14:35:41 +03:00
Sergei Golubchik
da4d71d10d Merge branch '10.1' into 10.2 2017-03-30 12:48:42 +02:00
iangilfillan
f0ec34002a Correct FSF address 2017-03-10 18:21:29 +01:00
Sergei Golubchik
4a5d25c338 Merge branch '10.1' into 10.2 2016-12-29 13:23:18 +01:00
kevg
780db8e252 fix build and some warnings 2016-11-24 17:36:02 +03:00
Nirbhay Choubey
8b51bacfd6 MDEV-10735: Valgrind warnings around Galera SST
While copying the received state Id (uuid:seqno) to an uninitialized
buffer, it was not properly null-terminated.
2016-09-20 21:32:53 -04:00
Sergei Golubchik
06b7fce9f2 Merge branch '10.1' into 10.2 2016-09-09 08:33:08 +02: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
cced23cf23 MDEV-9423: cannot add new node to the cluser: Binlog..
.. file '/var/log/mysql/mariadb-bin.000001' not found in binlog
index, needed for recovery. Aborting.

In Galera cluster, while preparing for rsync/xtrabackup based
SST, the donor node takes an FTWRL followed by (REFRESH_ENGINE_LOG
in rsync based state transfer and) REFRESH_BINARY_LOG. The latter
rotates the binary log and logs Binlog_checkpoint_log_event
corresponding to the penultimate binary log file into the new file.
The checkpoint event for the current file is later logged
synchronously by binlog_background_thread.

Now, since in rsync/xtrabackup based snapshot state transfer methods,
only the last binary log file is transferred to the joiner node; the
file could get transferred even before the checkpoint event for the
same file gets written to it. As a result, the joiner node would fail
to start complaining about the missing binlog file needed for recovery.

In order to fix this, a mechanism has been put in place to make
REFRESH_BINARY_LOG operation wait for Binlog_checkpoint_log_event
to be logged for the current binary log file if the node is part of
a Galera cluster. As further safety, during rsync based state transfer
the donor node now acquires and owns LOCK_log for the duration of file
transfer during SST.
2016-08-21 16:20:09 -04:00
sjaakola
8ec50ebda3 Refs MW-252
- reverted from tracking donor servicing thread. With xtrabackup SST,
  xtrabackup thread will call FTWRL and node is desynced upfront
- Skipping desync in FTWRL if node is operating as donor
2016-08-21 16:17:02 -04:00
sjaakola
4290117b79 Refs MW-252
- enveloped FTWRL processing with wsrep desync/resync calls. This way FTWRL processing node
  will not cause flow control to kick in
- donor servicing thread is unfortunate exception, we must let him to pause provider as part
  of FTWRL phase, but not desync/resync as this is done as part of donor control on higher
  level
2016-08-21 16:17:01 -04:00
Nirbhay Choubey
ba4ed3ee84 MDEV-10492: Assertion failure on shutdown when wsrep_sst_auth set in config
The memory alloc-ed initially for wsrep_sst_auth to store the
value specified in config was lost as the global variable was
reset while in process of masking it and thus, could never be
reclaimed on shutdown.
2016-08-03 13:36:12 -04:00
Nirbhay Choubey
77a8ae07a9 Cleanup around wsrep system variables. 2016-07-30 14:40:47 -04:00
Sergei Golubchik
932646b1ff Merge branch '10.1' into 10.2 2016-06-30 16:38:05 +02:00
Nirbhay Choubey
3fd214c8be MDEV-9423: cannot add new node to the cluser: Binlog..
.. file '/var/log/mysql/mariadb-bin.000001' not found in binlog
index, needed for recovery. Aborting.

In Galera cluster, while preparing for rsync/xtrabackup based
SST, the donor node takes an FTWRL followed by (REFRESH_ENGINE_LOG
in rsync based state transfer and) REFRESH_BINARY_LOG. The latter
rotates the binary log and logs Binlog_checkpoint_log_event
corresponding to the penultimate binary log file into the new file.
The checkpoint event for the current file is later logged
synchronously by binlog_background_thread.

Now, since in rsync/xtrabackup based snapshot state transfer methods,
only the last binary log file is transferred to the joiner node; the
file could get transferred even before the checkpoint event for the
same file gets written to it. As a result, the joiner node would fail
to start complaining about the missing binlog file needed for recovery.

In order to fix this, a mechanism has been put in place to make
REFRESH_BINARY_LOG operation wait for Binlog_checkpoint_log_event
to be logged for the current binary log file if the node is part of
a Galera cluster. As further safety, during rsync based state transfer
the donor node now acquires and owns LOCK_log for the duration of file
transfer during SST.
2016-06-29 16:50:53 -04:00
Nirbhay Choubey
2768829e53 MDEV-10056: SST method mysqldump is broken
errno must be reset before strtol()/strtoll() functions
are invoked.
2016-06-27 17:59:12 -04:00
Nirbhay Choubey
de7eafc7ce MDEV-6368: assertion xid_seqno > trx_sys_cur_xid_seqno
- Validate the specified wsrep_start_position value by also
checking the return status of wsrep->sst_received. This also
ensures that changes in wsrep_start_position is not allowed
when the node is not in JOINING state.
- Do not allow decrease in seqno within same UUID.
- The initial checkpoint in SEs should be [0...:-1].
2016-05-31 20:37:00 -04:00
Oleksandr Byelkin
50a17de1ce MDEV-9947: COM_MULTI united response 2016-05-17 13:31:33 +02:00
Monty
636bb59034 Final fixes for Memory_used
- Change some static variables to dynamic to ensure that we don't do any memory
  allocations before server starts or stops
- Print more memory information on SIGHUP. Fixed output.
- Write out if memory was lost if run with --debug-at-exit
- Fixed wrong #ifdef in sql_cache.cc
2016-04-28 17:15:38 +03:00
Sergei Golubchik
f67a2211ec Merge branch '10.1' into 10.2 2016-03-23 22:36:46 +01:00
Sergei Golubchik
fd6c588659 Merge branch 'bb-10.1-serg' into 10.1 2016-03-22 19:18:48 +01:00
Nirbhay Choubey
df3ad11097 MDEV-9598: Donor's rsync SST script hangs if FTWRL fails
Post-fix: initialize err
2016-03-22 00:38:21 -04:00
Sergei Golubchik
e984159e39 MDEV-9527 build FAILs with GCC 5.1 with release supported "-std=c+11"
10.1 part of the fix
2016-03-21 13:02:59 +01:00
Oleksandr Byelkin
fd1b7d0f59 MDEV-9058: protocol: COM_MULTI command (part 2)
simple COM_MULTI support (no prepared statements chain yet).
2016-03-18 17:25:29 +01:00
Nirbhay Choubey
66832b6195 MDEV-9598: Donor's rsync SST script hangs if FTWRL fails
During SST, since wsrep_sst_rsync waits for mysqld to create
"tables_flushed" file after it has successfully executed FTWRL,
it would wait forever if FTWRL fails.
Fixed by introducing a mechanism to report failure to the script.
2016-02-26 10:49:19 -05:00
Sergei Golubchik
7f19330c59 Merge branch 'github/10.0-galera' into 10.1 2015-11-19 17:48:36 +01:00
Nirbhay Choubey
bb52905432 MDEV-8034 : wsrep_node_address can't be IPV6
Updated address parsing logic to include IPv6 format.
2015-09-15 18:58:08 -04:00
Nirbhay Choubey
fa5f18d673 Merge branch '5.5-galera' into 10.0-galera 2015-09-09 20:51:39 -04:00
Alexey Yurchenko
55dfddff1d Fixing donate callback return code 2015-09-09 17:03:32 -04:00
Alexey Yurchenko
0465e3a117 Logging message cleanup 2015-09-09 17:03:32 -04:00
Alexey Yurchenko
d809fcc301 This commit fixes
- errno handling in wsp::env::append() method, where error could be returned by mistake
  - return code of sst_prepare_other() when pthread_create() fails - it was returning positive error code which by convention is treated as success.
2015-09-09 17:03:31 -04:00
Alexey Yurchenko
d78110e7fa Refs codership/mysql-wsrep#141: this commit
1. Passes wsrep_sst_auth_value to SST scripts via WSREP_SST_OPT_AUTH envronmental variable, so it never appears on the command line
  2. In mysqldump and xtrabackup* SST scripts which rely on MySQL authentication, instead of passing password on the command line, SST script sets MYSQL_PWD environment variable, so that password also never appears on the mysqldump/innobackupex command line.
2015-09-09 17:02:26 -04:00
Nirbhay Choubey
dced5146bd Merge branch '10.0-galera' into 10.1 2015-07-14 16:05:29 -04:00
Alexey Yurchenko
4ed9ddd30e Refs codership/mysql-wsrep#33
1. factored XID-related functions to a separate wsrep_xid.cc unit.
  2. refactored them to take refrences instead of pointers where appropriate
  3. implemented wsrep_get/set_SE_position to take wsrep_uuid_t and wsrep_seqno_t instead of XID
  4. call wsrep_set_SE_position() in wsrep_sst_received() to reinitialize SE checkpoint after SST was received, avoid assert() in setting code by first checking current position.
2015-05-08 17:41:06 -04:00
Philip Stoev
da29834840 LP1378355 - Address review feedback, do not pass --defaults-group-suffix for mysqldump SST 2015-05-08 17:41:05 -04:00
Philip Stoev
7d550c76be LP1378355 - Pass the value of --defaults-group-suffix to xtrabackup during SST 2015-05-08 17:41:05 -04:00
Nirbhay Choubey
d051f6c36b MDEV-6594: Use separate domain_id for Galera transactions
Post-fix : A typo and better error handling.
2015-04-15 11:12:12 -04:00
Nirbhay Choubey
34d86ac9ff MDEV-6594: Use separate domain_id for Galera transactions 2015-02-27 22:33:41 -05:00
Nirbhay Choubey
360ff3b0da Fix for build failures on Power8 2015-02-20 17:29:03 -05:00
Nirbhay Choubey
c6e62acb9e Fix for build failures on Power8 2015-02-20 17:21:15 -05:00