Commit graph

100 commits

Author SHA1 Message Date
sjaakola
ed9f68f6ad MW-394
* changed thd_binlog_format to return configured binlog format in wsrep execution,
  regardless of binlogging setting (i.e. with or without binlogging)
* thd_binlog_format is used in innobase::write_row(), and would return confusing
  result there when log_bin==OFF
2017-09-15 09:22:54 +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
Jan Lindström
c23efc7d50 Merge remote-tracking branch 'origin/10.0-galera' into 10.1 2017-08-21 13:35:00 +03:00
Daniele Sciascia
7a219b6f23 MW-86 Add separate wsrep_sync_wait bitmask value for SHOW commands
Previously, setting `wsrep_sync_wait = 1` would have an effect on
both SELECT and SHOW statements.
This patch changes wsrep_sync_wait so that bitmask value 1 is used
for SELECT statements, while bitmask value 8 is reserved for SHOW
statements.
It is still possible to achieve sync wait on both SELECT and SHOW
statements by setting `wsrep_sync_wait = 9`.
2017-08-14 08:50:02 +03:00
sjaakola
790a8274cd Refs: MW-360 * reverted WSREP_TO_ISOLATION macros back to original form 2017-08-11 14:06:16 +03:00
sjaakola
04c6b03c9b Refs: MW-360 * merged relevant parts of DROP TABLE query splitting from mysql-wsrep-features 2017-08-11 13:49:01 +03:00
sjaakola
7ef2d5aa5b Refs: MW-360 * splitting DROP TABLE query in separate DROP commands for temporary and real tables * not replicating temporary table DROP command * using wsrep_sidno GTID group only for innodb table drop command part all this follows more or less the logic of how mysql wants to split drop table list 2017-08-11 13:23:51 +03:00
Sachin Setiya
0e3170e30d Fix galera tests part II(Fix previous commit) 2017-05-08 16:29:41 +05:30
Marko Mäkelä
f740d23ce6 Merge 10.1 into 10.2 2017-04-28 12:22:32 +03:00
Sachin Setiya
ff7426290c MW-329 Fix incorrect affected rows count after replay
Fixes wsrep_replay_transaction so that it preserves affected rows,
last insert id, and message from diagnostics area.
2017-04-06 15:41:54 +05:30
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
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
b4616c40be MDEV-7955 WSREP() appears on radar in OLTP RO
This commit is for optimizing WSREP(thd) macro.

#define WSREP(thd) \
  (WSREP_ON && wsrep && (thd && thd->variables.wsrep_on))

In this we can safely remove wsrep and thd. We are not removing WSREP_ON
because this will change WSREP(thd) behaviour.

Patch Credit:- Nirbhay Choubay, Sergey Vojtovich
2017-01-03 10:45:55 +05:30
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
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
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
sjaakola
5996c7baad refs: MW-279
- At startup time global wsrep_on is set too late and some wsrep paths may be executed
  because of this. e.g. replication slave restart could happen before wsrep_on state is defined.
- This fix checks both global wsrep_on and wsrep_provider values to determine if wsrep
  processing should happen
- Fix affects all instances where WSREP_ON macro is used
2016-08-21 16:17:14 -04:00
sjaakola
d246630d73 Refs MW-252
- changed the condition when to do implicit desync as part of FTWRL to
  cover only case when node is PC and synced. Donor node has alreaydy desycned
  and other states mean that node is not in cluster, so desync is not even possible.
2016-08-21 16:17:05 -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
Nirbhay Choubey
7f9fcfe00e Code cleanup (wsrep patch). 2016-06-27 18:07:43 -04:00
Nirbhay Choubey
cceec7858f Merge branch '10.0-galera' into bb-10.1-serg 2016-02-24 01:21:40 -05:00
Daniele Sciascia
ace86a2375 refs codership/mysql-wsrep#201
- Fixes query cache so that it is aware of wsrep_sync_wait.
  Query cache would return (possibly stale) results to the
  client, regardless of the value of wsrep_sync_wait.
- Includes the test case that reproduced the issue.
2016-02-22 17:46:22 -05:00
Sergei Golubchik
a2330c820a MDEV-8208 Sporadic SEGFAULT on startup
different fix. remove old ones, wait for THD to be fully
initialized before continuing with the server startup process.

This reverts commits db2e21b, 13615c5, 3f515a0, 70113ee.
2016-01-25 17:04:09 +01:00
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
18173ddfc4 MDEV-9162 : MariaDB Galera Cluster memory leak on async slave node
As galera node (slave) received query log events from an async
replication master, it partially wrote the updates made to replication
state table (mysql.gtid_slave_pos) to galera transaction writeset post
TOI. As a result, the transaction handle, thus created within galera,
was never freed/purged as the corresponding trx did not commit.
Thus, it kept piling up for every query log event and was only reclaimed
upon server shutdown when the transaction map object got destructed.
Fixed by making sure that updates in replication slave state table
are not written to galera transaction writeset and thus, not replicated
to other nodes.
2015-12-14 11:33:52 -05:00
Sergei Golubchik
7f19330c59 Merge branch 'github/10.0-galera' into 10.1 2015-11-19 17:48:36 +01:00
Nirbhay Choubey
59037d9629 MDEV-8208: Sporadic SEGFAULT on startup
Problem:
When mysqld starts as a galera node, it creates 2 system threads
(applier & rollbacker) using start_wsrep_THD(). These threads are
created before plugin initialization (plugin_init()) for SST methods
like rsync and xtrabackup.

The threads' initialization itself can proceed in parallel to mysqld's
main thread of execution. As a result, the thread initialization code
(start_wsrep_THD()) can end up accessing some un/partially initialized
structures (like maria_hton, in this particular case) resulting in
segfault.

Solution:
Fixed by calling THD::init_for_queries() (which accesses maria_hton)
only after the plugins have been initialized.
2015-09-25 18:24:39 -04:00
Nirbhay Choubey
4d33f9dca0 Merge branch '5.5-galera' into 10.0-galera 2015-09-25 14:57:56 -04:00
Nirbhay Choubey
db2e21bf3e MDEV-8208: Sporadic SEGFAULT on startup
Problem:
When mysqld starts as a galera node, it creates 2 system threads
(applier & rollbacker) using start_wsrep_THD(). These threads are
created before plugin initialization (plugin_init()) for SST methods
like rsync and xtrabackup.

The threads' initialization itself can proceed in parallel to mysqld's
main thread of execution. As a result, the thread initialization code
(start_wsrep_THD()) can end up accessing some un/partially initialized
structures (like maria_hton, in this particular case) resulting in
segfault.

Solution:
Fixed by calling THD::init_for_queries() (which accesses maria_hton)
only after the plugins have been initialized.
2015-09-16 23:20:57 -04:00
sjaakola
63c5bee535 Refs codership/mysql-wsrep#113 - Extended the protection of local FLUSH
sessions to cover all exclusive MDL locks
2015-09-09 21:31:16 -04:00
sjaakola
c66609017b Refs codership/mysql-wsrep#113
Protecting non replicated FLUSH session from brute force aborts
2015-09-09 21:20:34 -04:00
Nirbhay Choubey
6d3bd6588e MDEV-8492: Windows builds fail on current 10.1
In non-wsrep builds, wsrep_running_threads should be defined to (0).
2015-07-19 21:33:12 -04:00
Nirbhay Choubey
dced5146bd Merge branch '10.0-galera' into 10.1 2015-07-14 16:05:29 -04:00
Nirbhay Choubey
903cfde149 MDEV-7067: Server outputs Galera (WSREP) information, even if Galera is disabled
* mysqld_safe: Since wsrep_on variable is mandatory in 10.1, skip wsrep
position recovery if its OFF.
* mysqld: Remove "-wsrep" from server version
* mysqld: Remove wsrep patch version from @@version_comment
* mysqld: Introduce @@wsrep_patch_version
2015-05-29 11:26:46 -04:00
Teemu Ollakka
00afd63984 refs codership/mysql-wsrep#90 made wsrep_OSU_method session variable 2015-05-08 17:41:07 -04:00
Teemu Ollakka
2df5ff2691 refs codership/mysql-wsrep#90 - fixed race in OSU
Make sure that thd uses the same method to begin and end
OSU operation.
2015-05-08 17:41:07 -04:00
Teemu Ollakka
0115ca2ae1 refs codership/mysql-wsrep#98 fixed sidno initialization
Sidno initialization was skipped in wsrep_sst_received() if the
received position matched to current position. However, sidno
initialization must be done every time server is started to
add inverted group uuid into sidno map.
2015-05-08 17:41:07 -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
Nirbhay Choubey
44b44dd1d7 Comments for wsrep_exec_mode's. 2015-04-22 18:30:27 -04:00
Nirbhay Choubey
575dd77504 MDEV-7867: Add binlog header to GRA_.log file 2015-04-01 18:25:40 -04: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
Monty
0ee879ff8a Improve performance for calculating memory allocation
Extend interface for 'show variables' with current scope
2015-02-01 15:24:22 +02:00
Nirbhay Choubey
369c02674c MDEV-7053: WSREP_STATUS & WSREP_MEMBERSHIP I_S tables
wsrep_info INFORMATION_SCHEMA plugin to provide WSREP_STATUS
and WSREP_MEMBERSHIP tables.
2014-11-22 14:33:51 -05:00
Sergei Golubchik
03ec3511a8 cleanup: galera misc cleanups
also disable galera-specific output in mysql_tzinfo_to_sql,
it'll be enabled later.
2014-10-10 22:27:36 +02:00
Sergei Golubchik
8596b70f96 cleanup: simplify the usage of WSREP_FORMAT macro 2014-10-10 22:27:36 +02:00
Nirbhay Choubey
542968cf0a bzr merge -r4015..4026 codership/5.5 2014-10-09 18:28:14 -04:00