9904 Commits

Author SHA1 Message Date
Johan Wikman
08230ef24c MXS-1830 Remove erroneous free
The libdir is set elsewhere as well, which causes the set
buffer to be freed. Consequently it cannot be freed.
2018-04-26 15:21:16 +03:00
Johan Wikman
9cf44b3092 MXS-1829 Recognise PREVIOUS in addition to NEXT
Earlier only "SELECT NEXT VALUE FOR SEQ" was parsed
properly, while "SELECT PREVIOUS VALUE FOR SEQ" was not.
Now the latter statement is also parsed properly.
2018-04-26 13:14:23 +03:00
Johan Wikman
b2cc9e5107 MXS-1829 Add test that reveals problem 2018-04-26 12:44:30 +03:00
Johan Wikman
510ce38680 Update 2.2 version number in minor branch 2018-04-25 11:07:55 +03:00
Johan Wikman
dee40a58f4 Update release date 2018-04-25 10:57:49 +03:00
Markus Mäkelä
d9e69413b4
Update MaxScale version
Updated version to 2.2.5.
2018-04-24 23:18:19 +03:00
Esa Korhonen
084c963081 MXS-1639 Update 2.2.5 release notes 2018-04-24 14:36:54 +03:00
Johan Wikman
c221e71582 Merge branch '2.1' into 2.2 2018-04-24 14:31:22 +03:00
Johan Wikman
b401f83e10 Update 2.2.5 release notes 2018-04-24 13:52:26 +03:00
Esa Korhonen
2a38902aa6 MXS-1639 Discard results when executing sql text files
This removes the limitation of not returning resultsets.
2018-04-24 13:21:44 +03:00
Esa Korhonen
fa7cd9450a MXS-1639 Do not run demote_sql_file if the server already has a slave connection
In this case, the server was already a slave and is not being demoted. Also, the file may
contain queries which cannot be ran while a slave connection is running.
2018-04-24 13:21:44 +03:00
Esa Korhonen
2aeed3ffab MXS-1639 Add documentation on promotion/demotion sql files 2018-04-24 13:21:44 +03:00
Johan Wikman
5dbdb8af8a Update 2.1.17 release notes. 2018-04-24 13:05:20 +03:00
Johan Wikman
5cf56c7c0f Merge branch '2.1' into 2.2 2018-04-24 12:39:22 +03:00
Johan Wikman
bafe8f5eeb MXS-1618 Use right type for the return value of getopt_long
getopt_long returns an 'int'. If 'char' is used on a big-endian
platform you'll end up with an infinite loop.
2018-04-24 12:31:08 +03:00
Johan Wikman
e81dd4ab24 Update 2.2.5 release notes 2018-04-24 10:33:19 +03:00
Johan Wikman
e0544c5d9c Update 2.2.5 release notes and change log 2018-04-24 10:18:19 +03:00
Johan Wikman
54b7dee0b0 Add release notes for 2.1.17
Update Changelog as well.
2018-04-24 10:18:19 +03:00
Johan Wikman
57cfb709b8 MXS-1819 Also log info messages to syslog
If info messages are enabled, they will be logged to syslog
just like any other messages.
2018-04-24 10:18:19 +03:00
Johan Wikman
70f3f61ac4 Update version number in 2.1 2018-04-24 10:18:19 +03:00
Johan Wikman
7a81f77649 Add release notes for 2.1.17
Update Changelog as well.
2018-04-24 10:12:29 +03:00
Johan Wikman
65260c365d MXS-1819 Also log info messages to syslog
If info messages are enabled, they will be logged to syslog
just like any other messages.
2018-04-24 10:02:47 +03:00
Johan Wikman
627c1945bc Update version number in 2.1 2018-04-24 09:33:37 +03:00
Markus Mäkelä
7820158f93
Properly fix string truncation in snprint_timestamp
The length of the timestamp string had a practical meaning. The correct
fix was to always use the length passed as the parameter.
2018-04-23 18:21:58 +03:00
Markus Mäkelä
d67320e06a
Fix more GCC 8 build failures
Fixed string truncation warnings by reducing max parameter lengths by one
where applicable. The binlogrouter filename lengths are slightly different
so using memcpy to work around the warnings is an adequate "solution"
until the root of the problem is solved.

Removed unnecessary CMake policy settings from qc_sqlite. Adding a
self-dependency on the source file of an external project has no effect
and only caused warnings to be logged.
2018-04-23 14:02:54 +03:00
Markus Mäkelä
8829e6d0c5
Reorder REST API configuration documentation
The REST API configuration documentation is now located after all other
global parameters in its own section. Added it to the ToC and put a link
to it into the REST API overview document.
2018-04-23 14:02:54 +03:00
Markus Mäkelä
421e64ceeb
Take -Wall into use for tests
Take almost all warnings into use except `format-overflow` and
`unused-function`. format-overflow needs to be handled in a separate
commit.
2018-04-23 14:02:54 +03:00
Markus Mäkelä
0f0913fc99
Fix test build failures with GCC 8
GCC 8 enables -Werror=return-type by default which combined with -Werror
causes the build to fail.
2018-04-23 14:02:53 +03:00
Markus Mäkelä
2c6d27d600
MXS-1815: Use all available CPUs with threads=auto
The documentation stated that all CPUs would be used when threads=auto was
used. In reality the behavior was the same as was with 2.0 (number of CPUs
minus one).
2018-04-20 22:26:32 +03:00
Markus Mäkelä
3d325e29c4
MXS-1814: Log warning with log_debug in release mode
With release mode binaries, the log_debug option has no effect. Now a
warning is logged if the option is used.
2018-04-20 22:26:32 +03:00
Esa Korhonen
739edcbe22 MXS-1639 Run user-given sql commands during promotion, demotion and rejoin
The sql queries are given in two text files, defined by options promotion_sql_file
and demotion_sql_file. The files must exist when monitor starts. The files are read
line by line, ignoring empty lines and lines starting with '#'. All other lines
are sent to the server being promoted, demoted or rejoined. Any error in opening
a file, reading it or executing the contents will cause the entire operation to
fail.

The filed defined in demotion_sql_file is also ran when rejoining a server. This
is to ensure a previously failed master is "demoted" properly when it joins the
cluster.
2018-04-19 17:01:36 +03:00
Markus Mäkelä
474736584b
Fix test_poll failure
With the changes to the DCB handling, the service pointer of a client DCB
must always be assigned.

Also removed the unnecessary parentheses around the comparison.
2018-04-18 08:10:42 +03:00
Markus Mäkelä
ad15f4d4be
Fix binlogrouter build failures with GCC 8
GCC 8 appears to have improved the snprintf truncation detection which
revealed problems in the binlogrouter.
2018-04-17 21:55:47 +03:00
Markus Mäkelä
3a1c2119fb
MXS-1804: Fix hanging of large session commands
Large session commands weren't properly handled which caused the router to
think that the trailing end of a multi-packet query was actually a new
query.

This cannot be confidently solved in 2.2 which is why the router session
is now closed the moment a large session command is noticed.
2018-04-17 15:04:12 +03:00
Markus Mäkelä
232f807ef3
MXS-1808: Only store SQL statements for retrying
Only commands that can contain an SQL statements should be stored for
retrying (COM_QUERY and COM_EXECUTE). Other commands are either session
commands or do not work with query retrying.
2018-04-17 11:25:56 +03:00
Markus Mäkelä
dac1b252ff
MXS-1807: Make module command domains case-insensitive
As the module names are case-insensitive in 2.2, so should be the domain
names of module commands.
2018-04-17 09:34:12 +03:00
Markus Mäkelä
0adb4b6ffa
Add basic docker-compose setup
The setup contains a three node master-slave cluster with both
readwritesplit and readconnroute.

Removed the duplication of the configuration files in the README and
provided links instead.
2018-04-17 09:34:12 +03:00
Markus Mäkelä
ff7f06cd66
Add 2.2.5 release notes
Added the release notes for MaxScale 2.2.5.
2018-04-17 09:34:12 +03:00
Markus Mäkelä
957f9865d6
Update MaxCtrl documentation
Updated MaxCtrl documentation.
2018-04-17 09:34:12 +03:00
Markus Mäkelä
5855b307bd
Add raw REST API calls to MaxCtrl
Being able to perform raw REST API calls that leverage the value
extraction capabilities of Node.js gives more control to the end user. It
also doubles as a handy tool for creating scripts that only require one
particular value from the REST API.
2018-04-17 09:34:11 +03:00
Markus Mäkelä
41626202ed
MXS-1803: Simplify docker image
The docker image now simply installs the latest MaxScale version instead
of building it. This significantly reduces the amount of maintenance that
the image requires.

Updated the configurations to allow runtime definition of servers and
updated README.md to reflect the changes in the files. Pointed links to
2.2 instead of develop. Removed text from the readme that was not strictly
related to running the MaxScale image.
2018-04-17 09:34:11 +03:00
Markus Mäkelä
890902e338
Add maxinfo SQL interface test
Added a test for the maxinfo SQL interface.
2018-04-17 09:34:11 +03:00
Johan Wikman
7e29725050 MXS-1805 Force all maxadmin connections to main thread
If maxadmin connections are handled by different workers, then
there may be a deadlock if some maxadmin command requires
communication with all workers.

Namely, in that case a message will be sent to all other workers
but the current one, but that message will not be handled if that
other worker at that point sits in the debugcmd_lock spinlock
in debugcmd.c:execute_cmd().

We can prevent that deadlock from happening simply by ensuring
that all maxadmin connections are handled by one thread.
2018-04-16 13:25:33 +03:00
Johan Wikman
3d8d2beaaa MXS-1787 Provide alias map when parsing an expression list
A statement like "CALL p1((SELECT f1()), ?);" needs an collection
for storing aliases when being parsed.
2018-04-13 13:50:28 +03:00
Johan Wikman
94af85b948 MXS-1787 Add test that exposes problem 2018-04-13 13:50:28 +03:00
dapeng huang
3d09c836c5 init inst->sessions for maxinfo (#173)
* init inst->sessions for maxinfo

* misc fix
2018-04-13 12:58:02 +03:00
Markus Mäkelä
b060e3a289
MXS-1787: Add test case
Added a test case that reproduces the problem.
2018-04-12 20:36:46 +03:00
Markus Mäkelä
802b16f709
MXS-1786: Fix hang on COM_STATISTICS
The commands needs to be handled separately from the rest of the result
types.

Added a test case that reproduces the problem and verifies that the change
in code fixes it.
2018-04-12 20:00:00 +03:00
Markus Mäkelä
1a293c0093
MXS-1785: Don't assume empty packet is for LDLI
When a LOAD DATA LOCAL INFILE finishes, the client sends an empty
packet. The second case when the client sends an empty packet when the
previous packet was exactly 0xffffff bytes long. These two packets were
confused which caused the internal state to temporarily flip from inactive
to ending and back to inactive.

The aforementioned flip-flopping didn't have any practical differences but
it was caught by a debug assertion.
2018-04-12 19:36:34 +03:00
Markus Mäkelä
a663ea2e80
Sync slaves in mxs1071_maxrows
The first test could fail due to replication lag.
2018-04-12 10:29:26 +03:00