Esa Korhonen
aaa8c92886
MXS-1744 Implement a Gtid-class which can store multi-domain gtid:s
...
The operations between Gtid:s are now more complicated so the class implements
them instead of the monitor. The Old Gtid-container has been renamed
GtidTriplet, and only stores the values for one triplet.
2018-04-04 15:53:42 +03:00
Esa Korhonen
923de851f9
MXS-1703 Move more functions to MariaDBServer
...
Also, the QueryResult integer reading method now only reads non-negative integers
since the server rarely returns negative values. This frees negative values for
indicating parsing error(s).
Gtid-class was moved back to utility.hh/.cc because the QueryResult-class requires it.
2018-03-28 13:47:07 +03:00
Esa Korhonen
1d5128fc5b
MXS-1703 Move do_show_slave_status() to MariaDBServer
...
Also took into use the QueryResult helper class.
2018-03-27 12:43:36 +03:00
Esa Korhonen
a350de1275
MXS-1703 Move MariaDBServer to its own file
...
generate_master_gtid_wait_cmd() is now a method of the Gtid-class.
2018-03-23 13:13:01 +02:00
Esa Korhonen
e5dddf5f74
MXS-1703 Clean up monitor main loop function
...
Several blocks have been moved to their own functions to shorten
the main function.
2018-03-22 15:45:25 +02:00
Esa Korhonen
0b5601a6c8
MXS-1703 Rename MySqlServerInfo, prepare to use it as the primary class
...
Renamed to MariaDBServer. The objects have a pointer to the underlying
MXS_MONITORED_SERVER. The purpose is to have the monitor mainly use
MariaDBServer instead of the current mix of MXS_MONITORED_SERVER* and
MySqlServerInfo and to simplify the mapping between the two. Also,
many methods can be moved to the MariaDBServer class later on.
Some functions have been converted from MXS_MONITORED_SERVER* to
MariaDBServer.
2018-03-21 15:35:36 +02:00
Esa Korhonen
09a22b26c8
MXS-1703 Fix uninitialized pointer in manual switchover
...
If the current master was given by user, maxscale would crash.
2018-03-20 14:30:15 +02:00
Esa Korhonen
1bef791572
MXS-1703 Miscellaneous cleanup
...
1. Move some remaining class data private.
2. Linebreak long lines.
3. Move current master autoselection inside class method.
4. Remove single-use constant #defines.
5. Monitor status is only written inside loop.
2018-03-19 16:08:28 +02:00
Esa Korhonen
4a6fc6b1c8
MXS-1703 Rearrange functions and methods
...
Lots of cleanup, but mostly distributing functions/methods to correct files.
2018-03-16 18:35:17 +02:00
Esa Korhonen
d32db326e4
MXS-1703 Manual switchover, failover, rejoin to class methods
...
This allows privatising several public methods. Also, cleaned up
monitor start and stop a bit.
2018-03-15 13:45:14 +02:00
Esa Korhonen
51188123c8
MXS-1703 Move cluster dicovery code to a separate file
...
Attempting to break the large main file to smaller chuncks.
2018-03-14 17:52:15 +02:00
Esa Korhonen
693854bd15
MXS-1703 Move most fields/methods to private
2018-03-14 15:08:53 +02:00
Esa Korhonen
5aeac621f9
MXS-1703 Most functions now moved to class methods
...
Cluster discovery functions still remain.
2018-03-14 15:08:53 +02:00
Esa Korhonen
fb55ea6015
MXS-1703 Move monitor main loop + other entrypoint contents to class methods
2018-03-14 15:08:53 +02:00
Esa Korhonen
ec1a4de480
MXS-1703 Some miscellaneous functions moved to class
2018-03-13 16:09:14 +02:00
Esa Korhonen
dad6a4f9bf
Merge branch '2.2' into develop
2018-03-13 11:26:41 +02:00
Esa Korhonen
6a8effaea1
MXS-1703: Move more functions to class methods
2018-03-12 10:58:11 +02:00
Esa Korhonen
728817b001
MXS-1703: Move fail/switch/rejoin functions to class
...
Most of the related functions are now class methods in a dedicated file.
2018-03-07 13:26:31 +02:00
Esa Korhonen
87911dc6b0
MXS-1703: refactor startup & shutdown
...
Startup now done in a static method. Constructor initializes some values.
Config parameters loaded in a separate method. Some things still need
looking.
2018-03-07 13:26:24 +02:00
Esa Korhonen
7a505d9976
MXS-1703: Move replication manipulation functions to a separate file
...
Refactoring continues. This update moves some of the replication manipulation
functions to a separate file and turns them into class methods.
2018-03-07 13:26:14 +02:00
Esa Korhonen
173f44b351
MXS-1703: Move additional classes to separate file
...
Also use stl containers in monitor definition.
2018-03-07 13:26:02 +02:00
Esa Korhonen
8ef1385d1a
MXS-1703: Turn MariaDB Monitor struct to class with public fields
...
Allows using std::string for strings. Also, cleanup.
2018-03-07 13:25:52 +02:00
Esa Korhonen
1de8f5ffdc
MXS-1703: Compile mariadbmon.h as C++
2018-03-07 13:25:29 +02:00
Johan Wikman
0bbf0246f9
Revert "Compile mariadbmon.h as C++"
...
This reverts commit 60d57aee61d96832aeec1b8a61d36803c38ca77c.
2018-02-24 15:40:21 +02:00
Johan Wikman
236e906d88
Revert "Turn MariaDB Monitor struct to class with public fields"
...
This reverts commit cb6f70119d9857b277306e9af5881fe29c574a32.
2018-02-24 15:37:50 +02:00
Johan Wikman
13661ab4a6
Revert "MariaDB Monitor: Move additional classes to separate file"
...
This reverts commit ff55106610881d55db88eca9e2ef6a056cbc8d51.
2018-02-24 15:35:36 +02:00
Johan Wikman
e721733434
Revert "MariaDBMon: Move replication manipulation functions to a separate file"
...
This reverts commit 8cdd23dda2add6486abb685834def94c72a09b6c.
2018-02-24 15:35:02 +02:00
Esa Korhonen
8cdd23dda2
MariaDBMon: Move replication manipulation functions to a separate file
...
Refactoring continues. This update moves some of the replication manipulation
functions to a separate file and turns them into class methods.
2018-02-22 10:51:52 +02:00
Esa Korhonen
ff55106610
MariaDB Monitor: Move additional classes to separate file
...
Also use stl containers in monitor definition.
2018-02-21 12:24:24 +02:00
Esa Korhonen
cb6f70119d
Turn MariaDB Monitor struct to class with public fields
...
Allows using std::string for strings. Also, cleanup.
2018-02-21 11:00:42 +02:00
Esa Korhonen
60d57aee61
Compile mariadbmon.h as C++
2018-02-20 11:14:21 +02:00