8256 Commits

Author SHA1 Message Date
MassimilianoPinto
5933062666 Binlog router documentation update.
Removed SHOW FULL BINARY LOGS and added details about SHOW BINARY LOGS
output when option binlog_structure=tree
2017-08-04 11:20:07 +02:00
Esa Korhonen
8e9c943d48 Proxy protocol setting error detection + documentation
The setting parsing is now similar to the other server settings.
The header is printed if log_info is on.
Changed the setting name to simply "proxy_protocol".
Updated documentation.
2017-08-04 11:43:29 +03:00
MassimilianoPinto
75b17151f3 Removed FULL option from SHOW BINARY LOGS
If option ‘binlog_structure’ is set to ‘tree’ then SHOW BINARY LOGS
displays the tree details of the binlog files.

MySQL [(none)]> SHOW BINARY LOGS;
+--------------------------+-----------+
| Log_name                 | File_size |
+--------------------------+-----------+
| 0/10122/mysql-bin.000117 |      1167 |
| 0/10122/mysql-bin.000118 |       652 |
| 0/10124/foo-bin.000016   |      5082 |
| 0/10124/foo-bin.000017   |       491 |
+--------------------------+-----------+

With option set to ‘flat’ (which is the default) the output contains
only
names:

MySQL [(none)]> SHOW BINARY LOGS;
+------------------+-----------+
| Log_name         | File_size |
+------------------+-----------+
| mysql-bin.000110 |       425 |
| mysql-bin.000111 |     10409 |
| mysql-bin.000112 |      9659 |
+------------------+-----------+
2017-08-04 10:08:11 +02:00
Markus Mäkelä
1f4856cdc5 Merge branch '2.1' into develop 2017-08-03 19:01:32 +03:00
Markus Mäkelä
f7b8744460 Add more error messages to monitors
When the execution of a query fails, the error reported by the Connector-C
and the server where the query was executed is logged.
2017-08-03 15:42:40 +03:00
Timofey Turenko
ab82c7455c remove manual flex installation 2017-08-03 15:38:19 +03:00
MassimilianoPinto
ae5eb004fe SHOW [FULL] BINARY LOGS is now able to report the same log file in use with different server_ids
SHOW [FULL] BINARY LOGS is now able to report the same filename in use
with different server_ids: this can happen with binlog_structure=tree

example from SHOW FULL BINARY LOGS

0/10122/mysql-bin.000113
…
0/10122/mysql-bin.000116
…
0/5306/mysql-bin.000113

SHOW BINARY LOGS shows the same file twice:

mysql-bin.000113
…
mysql-bin.000116
…
mysql-bin.000113
2017-08-03 11:11:37 +02:00
Johan Wikman
72c5d1844a MXS-1337 Add variable prefixes
Member variables of QcSqliteInfo now have m_, p, z and n prefixes
as appropriate.
2017-08-03 08:36:25 +03:00
Johan Wikman
7a5e3ede21 MXS-1339 QC: Report each table just once
If a particular table appears in a statement multiple times,
qc_get_table_names will report it as many times as it appears.
Each name should be reported just once. Same applies for
database names.
2017-08-03 08:34:22 +03:00
MassimilianoPinto
d5de149e32 Update GTID repository while receiving ROTATE events and check the current file exists.
Update GTID repository while receiving ROTATE events and check the
current file exists.
2017-08-02 17:32:07 +02:00
Markus Mäkelä
bda1c5d55d Fix use-after-free in buffer.c
The fix to MXS-1338 added a bug where the buffer objects were freed after
the shared buffer was freed.
2017-08-02 17:55:35 +03:00
Markus Mäkelä
1ec7d9a712 Fix FindNodeJS.cmake
Only `node` executable was searched.
2017-08-02 16:04:29 +03:00
Markus Mäkelä
92bc3f046e Fix build failures on CentOS 6
Removed superfluous thread_local storage specifier from adminusers.cc and
fixed signed to unsigned integer comparisons in qc_sqlite.cc.
2017-08-02 15:44:45 +03:00
MassimilianoPinto
7d8407ff22 Binlog Server doesn't start without last found GTID in the repo only if “mariadb10_master_gtid” option is On
Binlog Server doesn't start without last found GTID in the repo only if
“mariadb10_master_gtid” option is On
2017-08-02 11:56:32 +02:00
Markus Mäkelä
854c4a1ed3 Add support for non-glibc systems
MaxScale can now be built on systems that use an alternative libc
implementation e.g. musl.
2017-08-02 11:51:55 +03:00
Markus Mäkelä
782b8db2aa Fix readwritesplit handling of unexpected responses
The backend server can send a response even if the client hasn't sent a
request. One case where this occurs is when the server is shutting
down. The internal logic of readwritesplit can't handle unexpected states
gracefully so the safest thing to do is to just ignore them and send the
responses to the client.
2017-08-02 11:51:26 +03:00
Markus Mäkelä
63b16243e7 MXS-1338: Fix memory leak of after buffer cloning
When a buffer is cloned and then the original buffer parsed and freed, the
freeing of the cloned buffer will not release the memory that was
allocated when the original buffer is parsed.

This is a side-effect of how the buffer objects are stored in the buffer
and not in the shared memory buffer. The creation of a buffer object after
cloning will cause the buffer object to be lost as the cloned buffer
didn't have a pointer to the buffer object that was created later.

By moving the buffer objects into the shared memory buffer, the memory
leak is fixed.
2017-08-02 11:09:49 +03:00
Johan Wikman
542f3b69db MXS-1337 update_names(...) moved to QcSqliteInfo
The update_names() will have to be updated to take a possible alias
name as well. That needs to be tracked inside QcSqliteInfo, so that
when there is a statement like "select t2.a from t1 t2" we report
the field as t1.a and not as t2.a.
2017-08-02 09:11:35 +03:00
Johan Wikman
cfb5a315cf MXS-1337 Some variables renamed 2017-08-02 09:11:35 +03:00
Johan Wikman
19d36d425d MXS-1337 More functionality moved into QcSqliteInfo 2017-08-02 09:11:35 +03:00
Johan Wikman
cb15d90da9 MXS-1337 qc_sqlite info structure now a C++ class
The structure for storing statement information is now a C++ class.
At least initially it will not be turned into a full-fledged class
that would contain all functionality, but the code will be a mishmash
of C and C++.
2017-08-02 09:11:35 +03:00
MassimilianoPinto
0597b625d3 SHOW FULL BINARY LOGS reports domain_id/server_id prefix only if binlog_structure is TREE
SHOW FULL BINARY LOGS reports domain_id/server_id prefix only if
binlog_structure is TREE
2017-08-01 15:49:16 +02:00
Markus Mäkelä
0dbf64b1ab Fix broken link in 2.1.5 release notes
The link to the list of issues was broken.
2017-08-01 10:50:11 +03:00
MassimilianoPinto
f301c2ade1 The binary_logs_select_cb() returns now 0 after sending data to client
The binary_logs_select_cb() returns now 0 after sending data to client
2017-08-01 09:13:52 +02:00
Johan Wikman
e4f0598743 Convert qc_sqlite.c to C++
MXS-1307 requries some modifications in the query classifier and
making those changes is easier if STL collections are available.
2017-08-01 08:45:03 +03:00
Markus Mäkelä
3eb99139f5 Merge branch '2.1' into develop 2017-07-31 15:57:05 +03:00
Markus Mäkelä
95c254a8b0 Update release date 2017-07-31 15:45:59 +03:00
MassimilianoPinto
39629c412d Binlog server: added prefix to last file in SHOW FULL BINARY LOGS
Binlog server: added prefix to last file in SHOW FULL BINARY LOGS
2017-07-31 10:27:18 +02:00
Markus Mäkelä
931ca0f497 Stop timeout in avro_alter before fixing replication
The resetting of the replication can take some time. By disabling the
timeout during the reset, false positives are less likely.
2017-07-31 09:42:03 +03:00
Markus Mäkelä
f95fff6632 Stop replication before configuring binlogrouter
The replication needs to be stopped before the binlogrouter is started. If
the replication is stopped after this, it is possible that two servers
with the same value of server_id attempt to register as slaves which
causes the later of them to fail.
2017-07-31 09:42:03 +03:00
Markus Mäkelä
174dad4b5b Fix master server version checks in tests
The master server version was not processed adequately and false positives
of old master versions were possible.
2017-07-31 09:42:03 +03:00
Markus Mäkelä
af99ab3b72 Print the JSON in avro_alter
The test now prints the output in avro_alter. The replicate_from_master
function also stops maxscale before removing the files.
2017-07-31 09:42:03 +03:00
Markus Mäkelä
d0d19f3ded Tune timeouts for bug662
The timeouts were a bit too demanding and increasing them should lower the
rate of false positives.
2017-07-31 09:42:01 +03:00
Markus Mäkelä
1034641fa5 MXS-1317: Change default for monitor_interval to 2000
The default value for monitor_interval is now 2000 milliseconds.
2017-07-31 06:06:39 +03:00
MassimilianoPinto
788386cfee Master GTID registration in Binlog Server: documentation update PART 2_1
Master GTID registration in Binlog Server: documentation update PART 2_1
2017-07-28 11:09:55 +02:00
Markus Mäkelä
fcabda15a8 MXS-1335: Disable root_node_as_master by default
Enabling the option hinders the use of maintenance mode with the root
master node in most use-cases.

This behavior occurs due to the fact that the maintenance mode causes a
server to be treted as if it was down. The Galera monitor waits for the
cluster to reorganize before assigning a new master node. This is correct
(but very unexpected) behavior for single instance use-cases.
2017-07-28 11:52:49 +03:00
MassimilianoPinto
5ceb2673a3 Master GTID registration in Binlog Server: documentation update PART 1
Master GTID registration in Binlog Server: documentation update PART 1
2017-07-28 09:13:46 +02:00
Markus Mäkelä
6d9500d898 Add links to release notes in Changelog.md
The Markdown links do not work as the release note files do not exist but
the resulting KB links do work.
2017-07-28 09:47:24 +03:00
Markus Mäkelä
0256be660f Fix missing zlib in build scripts
The zlib library wasn't explicitly installed which caused it to fail on
Debian 9.
2017-07-27 16:49:45 +03:00
Markus Mäkelä
08c51aa598 Remove broken links
The links in old upgrading guides and the changelog pointed to documents
that do not exist.
2017-07-27 16:19:50 +03:00
Markus Mäkelä
86994457e1 Update 2.1.5 release notes
Added all fixed bugs and short descriptions of the major changes.
2017-07-27 16:19:50 +03:00
MassimilianoPinto
9be449edf8 Binlogrouter: documentation update for last seen GTID in SHOW SLAVE STATUS
Binlogrouter: documentation update for last seen GTID in SHOW SLAVE
STATUS
2017-07-27 10:13:25 +02:00
MassimilianoPinto
380fa35b4f Add Slave_pos for Using_Gtid in SHOW SLAVE STATUS only if Master GTID mode is set
Add Slave_pos for Using_Gtid in SHOW SLAVE STATUS only if Master GTID
mode is set
Possible output values are:

Default
   Using_gtid: No
or
   Using_gtid: Slave_pos
2017-07-27 10:13:25 +02:00
Johan Wikman
4985bf9b6e MXS-1328 Mark regexp functions as builtin functions
Regexp functions were not listed among the builtin read-only
functions and consequently any SELECT using one of those was
routed to master.
2017-07-27 09:58:32 +03:00
Johan Wikman
d54616f075 Update 2.1.5 release notes 2017-07-27 09:58:32 +03:00
Markus Mäkelä
448d56a273 Disable replication_manager and fix mxs1323_stress false positive
The replication_manager is only designed for systems that have yum
installed which means it will always fail on non-RHEL/CentOS systems.

The query threads in mxs1323_stress were not checking whether the test had
ended while they were executing the queries. This caused test timeouts as
the queries can take a relatively long time.
2017-07-27 09:26:27 +03:00
Markus Mäkelä
e48fb6a071 Assume that the test database exists
The tests should not drop the test database and then recreate it. This
adds an unnecessary burden on replication which will cause false positives
when replication is not fast enough.

This is commit `2410c23e6664bef7e449dfd5a767121f309559fe` from develop
cherry-picked to 2.1.
2017-07-27 09:26:27 +03:00
Markus Mäkelä
563fdb4db5 Backport testing fixes to 2.1
Some of the testing fixes weren't included into 2.1 and due to that, a few
of the tests appear to fail.
2017-07-27 09:26:27 +03:00
Markus Mäkelä
e26ec4f8b9 MXS-1329: Only parse text protocol statements
The query classifier should only be used to parse text protocol
statements. The insertstream filter exploited the fact that any statements
that the filter did not expect would be classified as an unknown
commands. This led to repetitive error messages with binary protocol
statements.
2017-07-27 09:26:27 +03:00
Johan Wikman
2d59148a9f MXS-1307 Grant statements excluded
MaxScale does not need to fully parse grant statements. Hence
they are commented out from cte_grant.test.
2017-07-27 09:22:19 +03:00