Commit Graph

4024 Commits

Author SHA1 Message Date
dfbecc41e2 Format protocol modules
Formatted the MariaDB protocol modules with Astyle.
2018-01-24 11:20:11 +02:00
fe73458d65 Merge remote-tracking branch 'ybbct/MXS-1603' into develop 2018-01-24 11:15:14 +02:00
af70b00197 Merge branch '2.2' into develop 2018-01-24 10:23:51 +02:00
257034bf3e Clarify master failure verification
The two previous functions were somewhat overlapping.
2018-01-23 16:14:50 +02:00
1222d2a400 Use C-string as parameter to fix compile error 2018-01-23 12:28:15 +02:00
0bcae6117d Fix compilation errors by using defines in mysql.h 2018-01-23 12:18:52 +02:00
73e5fd52fa misc fix and remove all tail spaces 2018-01-22 22:02:22 +08:00
1729d73b19 revert deprecate eof 2018-01-22 20:28:50 +08:00
f41f3a1544 support deprecated eof and fix eof count 2018-01-22 20:20:52 +08:00
81f303512e check protocol state to determine real ok packet 2018-01-22 14:52:12 +08:00
8ce7683a0a fix parse session track info out of packet boundary 2018-01-21 18:27:00 +08:00
459d4bb002 Turn QLA filter to C++, part1 2018-01-19 16:58:06 +02:00
768296741a Merge branch 'develop' into MXS-1603 2018-01-19 20:59:49 +08:00
998652bf24 Merge branch '2.2' into develop 2018-01-19 11:47:45 +02:00
05402208a5 Merge branch '2.1' into 2.2 2018-01-19 11:47:13 +02:00
753b97303a MXS-1606: Create maxscale_schema database if missing
The monitor will now also create the database if it is missing. Since it
already creates the table, also creating the database is not a large
addition.

Cleaned up some of the related checking code and combined them into a
simple utility function.
2018-01-19 11:34:25 +02:00
7c7190e0c4 Fix index overflow in masking filter 2018-01-19 09:55:20 +02:00
beac04b8e7 MXS-1616 Also use 'value' in partial matching
As you can create regular expressions that have a fixed length,
e.g. "....$", it makes perfect sense to replace using 'value' if
the length of the string matches exactly.
2018-01-18 09:48:38 +02:00
47184ea46d Fix build failure on Ubuntu 17.10
The sprintf calls failed due to a warning about possible buffer
overflow. Curiously enough, the same warnings do appear on Fedora 26 but
only when the calls are changed to snprintf.
2018-01-17 14:06:19 +02:00
c02da103d7 MXS-1615 Fix access of wrong argument
- Wrong argument accessed at command invocation. In debug mode
  leads to crash, in release mode probably leads to crash.
- Log result of reload.
2018-01-17 13:59:00 +02:00
a4f6176ced Fix bug in printing switchover/failover module command info
The string constant passed to the register-function went invalid
once CREATE_MODULE() completed, causing random characters to be
printed.
2018-01-17 12:01:00 +02:00
23f2c3b980 Better failover timing and redirection success is tested
Works similar to switchover.
2018-01-16 18:05:12 +02:00
1d211ecee2 MXS-1511: QLA-Filter replace newlines in SQL-queries with custom strings
The config parameter 'newline_replacement' (defaults to 1 space " ") now defines
what to write to the log file when the sql-query has a newline sequence (\n, \r or
\r\n). If 'newline_replacement' is the empty string "", no replacing is done and
newlines are printed to file.

Also, adds the config parameter 'separator', which defines the string
printed between elements. Default value is ",".
2018-01-16 14:25:19 +02:00
5273cbada6 MXS-1600: Add case-insensitive matching to MySQLAuth
The authenticator now supports similar identifier matching as the MariaDB
server. The lower_case_table_names parameter explains its intended use
(case-insensitive identifier matching):
https://mariadb.com/kb/en/library/server-system-variables/#lower_case_table_names
2018-01-16 13:51:22 +02:00
c2c898ee93 Fix formatting in MariaDB Monitor 2018-01-16 13:27:20 +02:00
ff2ad05d0a Add manual rejoin command to MariaDB Monitor
The rejoin command takes as parameters the monitor name and
name of server to rejoin.

This change required refactoring the rejoin code.
2018-01-16 13:20:35 +02:00
df70f23635 Merge branch '2.2' into develop 2018-01-16 09:51:13 +02:00
0afe10ffb9 Merge branch '2.1' into 2.2 2018-01-16 09:47:49 +02:00
f7e08fdb47 add doc, more detail about trx state 2018-01-16 15:14:29 +08:00
454f195cb0 fix:cannot connect to maxinfo with python client 2018-01-16 09:02:03 +02:00
f1aa1d7d9f fix code style 2018-01-16 14:56:51 +08:00
2b653887a3 fix crash at execute empty flush command 2018-01-16 08:40:22 +02:00
a52e1ac8d7 add session tracker:SESSION_TRACK_TRANSACTION_CHARACTERISTICS and fix wrong state mapping 2018-01-16 13:56:00 +08:00
9ca6d586d1 MXS-1575: Fix Avro schema versioning
The versions were not updated if the table was dropped and created again.
2018-01-15 16:15:20 +02:00
dbad6b737d Detect redundant table map events
When two identical tables are mapped into the same slot, the newer one is
ignored.
2018-01-15 16:15:20 +02:00
5e4b7ae7c7 Fix memory leak in avrorouter
The TABLE_MAP freeing function leaked memory.
2018-01-15 16:15:20 +02:00
f2771d5ad8 Remove obsolete message
The warning that a schema already exists is obsolete as mapped tables are
now always opened instead of being reused. This causes the schema checks
to be done for each mapped table.
2018-01-15 16:15:19 +02:00
f6f34ad7e5 Fix debug build failure on CentOS 6
The build failed due to a comparison between signed and unsigned integers.
2018-01-15 16:14:50 +02:00
6d3c60eb28 remove noneed protocol and the comparison corrent 2018-01-15 22:07:23 +08:00
14f1bbed51 NamedServerFilter: Deprecate message for legacy parameter use 2018-01-15 15:30:38 +02:00
d234b13027 refactor, check every packet before parser ok packet, move config to service, fix code style, ... 2018-01-15 20:25:44 +08:00
e1aeac8b07 get session transation state from backend via session track mechanism 2018-01-14 12:23:38 +08:00
ba195bbc7e Merge branch '2.2' into develop 2018-01-10 15:34:28 +02:00
e36e506f32 MXS-1418: Fix regression
Removing a server from readconnroute caused the connection to be closed if
it was a master server.
2018-01-08 21:49:19 +02:00
5f4db64ac7 Better timing for switchover, check slaves for IO/SQL errors
Time elapsed is now properly tracked during a switchover. After slave
redirection, an event is added to the master. Then, the slaves are queried
repeatedly until they advance to the newest event. I/O and SQL errors are
also detected.
2018-01-08 15:23:25 +02:00
e5d9ca4af8 Check if master reference is disabled
If a Backend is closed, the associated DCB is no longer valid. This needs
to be taken into account when the stored master reference is used.
2018-01-08 12:14:30 +02:00
3f78dbc923 Improve avrorouter assertion output
When an assertion fails due to an overflow of the event buffer, all
processed values for that event are dumped.

This commit also enables the assertions even for non-debug builds which
should speed up the elimination process for bugs in the avrorouter. The
overhead of doing this is minimal as the output is already gathered for
the INFO level logging.
2018-01-05 13:39:57 +02:00
ce1c45828a MXS-1575: Fix CREATE TABLE processing
The CREATE TABLE processing failed to identify the explicit database names
that were generated by mysqldump.
2018-01-05 12:50:39 +02:00
95ad3aa7df MXS-1543: Log a warning if STATEMENT or MIXED is used
If avrorouter suspects that statement based or mixed replication formats
are being used, it logs a warning.
2018-01-05 12:50:39 +02:00
afaf890840 MXS-1596 Rename mysqlbackend to mariadbbackend 2018-01-05 10:01:50 +02:00