Commit Graph

8848 Commits

Author SHA1 Message Date
e9b2a560b8 MXS-1360 Make it possible to specify thread stack size
It is now possible to specify the thread stack size to be used,
when a new thread is created. This will subsequently be used
for allowing the stack size to be specified for worker threads.
2017-08-14 15:24:16 +03:00
bdb0f7d8d7 Binlog server: error message was truncated due to error size computation.
Binlog server: error message was truncated due to error size
computation.
2017-08-14 13:41:04 +02:00
c662bea983 MXS-1359 Turn recursion into iteration
In case of very large compound selects or an INSERT with many
values, qc_sqlite could run out of stack space. To deal with
that, the critical recursion is turned into an iteration.
2017-08-14 13:29:19 +03:00
4798810f76 Merge branch '2.1' into develop 2017-08-14 10:36:34 +03:00
7021041804 Update 2.1.6 release date 2017-08-14 10:06:27 +03:00
9d3772a67e MXS-1262: Minor improvements to monitor journals
Moved 4 byte get/set into utils header. The byte packing functions in
maxscale/protocol/mysql.h should be migrated to the utils directory where
they can also be used by non-mysql code.

The temporary files are now generated with mkstemp. This will prevent
conflicts with multiple monitors operating on the same temporary journal
even though it is impossible in practice.

Added missing error messages to a couple of the functions.
2017-08-11 11:35:13 +03:00
b768d3ca76 MXS-1356: Allow tee filter to be disabled at runtime
Disabling the tee filter at runtime is desirable for cases where the
branched service is not always needed. Migrations and pre-production
setups are one where changes to the branched service are expected and
splitting the queries would result in an error.
2017-08-11 04:09:08 +03:00
53bf21f785 MXS-1262: Use monitor journals in all monitors
All monitors now persist the state of the server in a monitor journal
file.

Moved the removal of stale journals into the core and removed them from
the monitor journal interface.
2017-08-11 04:09:08 +03:00
b448b129d0 MXS-1262: Move journal_max_age to MaxScale core
The parameter is now defined in the monitor. Further refactoring is needed
to make the interface of the journal system simpler.
2017-08-11 04:09:08 +03:00
837d57f4f4 MXS-1262: Move monitor journals into the core
The journaling functionality is now in the core. Only the MySQL Monitor is
using it.
2017-08-11 04:09:07 +03:00
4dc41509af MXS-1337 Move more functions to QcSqliteInfo 2017-08-10 16:09:58 +03:00
8ce5147d39 MXS-1337 Moved functions to QcSqliteInfo 2017-08-10 15:57:48 +03:00
54a75a1752 MXS-1337 Move update_field_infos_from[sub]select to QcSqliteInfo 2017-08-10 15:45:25 +03:00
9d97902899 MXS-1307 CTE tests pass
There are some issues still
- With recursive CTEs qc_mysqlembedded and qc_sqlite agree upon
  the real columns, but disagree on the CTE related "virtual"
  columns. That's largely irrelevant though.
- qc_sqlite cannot parse "SET STATEMENT var=... FOR stmt",
  but it will be classified as QUERY_TYPE_GSYSVAR_WRITE.
  This is not directly CTE related.
2017-08-10 15:23:42 +03:00
4eeff705ee MXS-1307 Catch "union all" selects 2017-08-10 14:45:27 +03:00
05bbd9676b MXS-1307 Ignore usage differences for functions
Also in the case of functions, we ignore differences in reported
usage context between qc_mysqlembedded and qc_sqlite.
2017-08-10 12:54:47 +03:00
878bbe4a98 MXS-1307 Aliases must be stored hierarchically
Alias handling must be made so that in a subselect, aliases created
in an outer select are available, but aliases created in another
subselect are not.
2017-08-10 11:43:09 +03:00
ca7aadeb24 Bingo Tutorial shows complete configuration example.
Bingo Tutorial shows complete configuration example.
2017-08-10 10:18:50 +02:00
87a48919e8 Release Notes 2.1.6 update
Release Notes 2.1.6 update
2017-08-10 10:10:56 +02:00
424c7b7ad3 MXS-1343: documentation update.
MXS-1343: documentation update for new option ‘slave_hostname’
2017-08-10 09:49:01 +02:00
9b9d7e4c4d Generate a list of all fixed issues
The list_fixed_bugs.sh script now also shows issues that aren't bugs.
2017-08-10 10:37:13 +03:00
d60df103bf Add avrorouter binlog checksum to limitations
Added a note about the avrorouter binlog checksums to the limitations
document.
2017-08-10 10:33:09 +03:00
ebe9596966 MXS-1345: Allow an empty list of functions
The function type rule now accepts an empty list of functions, allowing
all functions to be blocked by defining an empty function type rule and
setting action=allow.
2017-08-10 09:51:31 +03:00
0d2514b9ce fix kerberos setup files copying 2017-08-10 08:42:26 +03:00
7da092843f MXS-1343: send hostname to master with COM_REGISTER_SLAVE
A new option ‘slave_hostname’ allows the setting of hostname in
COM_REGISTER_SLAVE.

SHOW SLAVES HOSTS; in master server can show the hostname set in binlog
router:

MariaDB [(none)]> SHOW SLAVE HOSTS;
+-----------+-----------------------------+------+-----------+
| Server_id | Host                        | Port | Master_id |
+-----------+-----------------------------+------+-----------+
|        93 | maxscale-blr-1.mydomain.net | 8808 |     10124 |
+-----------+-----------------------------+------+-----------+
2017-08-09 17:09:50 +02:00
7ba0533cc8 Authenticator API extract-entrypoint returns bool
Extraction either succeeds or fails, it does not need to return
defined integer values.
2017-08-09 17:28:58 +03:00
f336cb63cf Fix FindPam.cmake
The variables weren't set the into the variable cache for some reason.
2017-08-09 16:18:12 +03:00
6bdc2de6fe MXS-1307 Detect field usage from all selects
In the presence of CTEs, in order to catch all field usage, we need
to iterate over all selects.
2017-08-09 13:21:24 +03:00
aeb881afea MXS-1337 Better sqlite3 initialization
The sqlite3 initialization is done a bit more properly now.
It is also ensured that issues are logged at most once, even
if a statement is parsed twice.
2017-08-09 13:21:24 +03:00
05ac06c901 Use same object files for all packages
There's no need to rebuild the object files for each component. Reusing
them should allow for a faster build.
2017-08-09 11:39:25 +03:00
80569dd5a9 MXS-1300: Correct test case descriptions
The test descriptions now describe the expected logical outcome of the
test, not the operation being done.
2017-08-09 11:39:25 +03:00
d64cb9fa80 MXS-1300: Test calling of module commands via MaxCtrl
The calling of module commands is tested by using the qlafilter log
command.
2017-08-09 11:39:25 +03:00
9847b36a12 Fix invalid module command argument count
The module commands were always given the maximum argument count even if
less arguments were given.
2017-08-09 11:39:25 +03:00
d09e0d03bc MXS-1347: Expose unified log file as a module command
The qlafilter exposes the unified log file as a module command that
outputs an array of JSON strings, one for each line in the file. The
command takes two optional parameters, the start and end lines for the log
file.

Further improvements could be done to allow reading of session specific
log files.

Some sort of an authorization scheme for the REST API should be
implemented to limit the possibility of exposing unwanted parts of the
REST API.
2017-08-09 11:39:25 +03:00
826654b9de MXS-1300: Build MaxCtrl with experimental packages
The build scripts now download Node.js 6.11.2 for building and packaging
MaxCtrl. The client package is also created when the extra packages are
built.
2017-08-09 11:39:25 +03:00
7c38a56ea2 MXS-1300: Add client as a valid package name
The MaxCtrl component, `client`, needs to be in the list of valid
component names.
2017-08-09 11:39:25 +03:00
c2a2688b93 Fix duplicate listener checks
Only the protocol, port and address of the listener were used to check if
a listener exists. The check should also use the name of the listener to
be sure that each name is unique.

Expanded tests to check that the creation of duplicate listeners is
detected. Did minor improvements to related test code.
2017-08-09 11:39:25 +03:00
c593a1bf32 MXS-1300: Test cluster diff functionality
The `cluster diff` command is now tested by doing add/alter/remove
operations on servers. As the same methods are used for all objects, they
should detect all sorts of modifications between two Maxscales.
2017-08-09 11:39:25 +03:00
70ae93a9ab MXS-1300: Move service checks in cluster to a function
The check that the two MaxScales have the same services is now in a common
function. Added more details into the error message as to why the command
failed. The hosts and their extra services are logged for both the source
and target of the command.

The `cluster diff` command could display the extra services in the diff
but this could be interpreted as a sign that MaxScale could act on that
part of the diff. Returning an error instead of silently ignoring the
extra services should allow for a more consistent user experience.
2017-08-09 11:39:25 +03:00
f422e92496 MXS-1300: Return output instead of printing it
The `execute` command now returns the output of the command instead of
printint it. This allows the tests to actually test the output of the
commands instead manually verifying that it is correct. It also allows the
library part to be used as an actual library that only returns data.
2017-08-09 11:39:25 +03:00
9a04dd0311 MXS-1300: Resolved the promise for help commands
The promise returned by the `execute` MaxCtrl library function is now
properly resolved also for `help` type commands.
2017-08-09 11:39:24 +03:00
527ada770c MXS-1300: Fix double maxscale startup script and configuration
The configuration wrongly spelled `secondary` as `secodary` causing a
failure to start the secondary MaxScale. The startup script didn't create
the log directory and removed the wrong maxadmin socket file.
2017-08-09 11:39:24 +03:00
1308e7a304 Fix resource collection modification times
The resource collection modification times weren't updated when an
individual resource was updated. By tracking back the path of a resource
and updating the modification times, all nodes in the path will get the
correct modification time.
2017-08-09 11:39:24 +03:00
7e18e49eec MXS-1220: Move request body checks to a higher level
The checks whether a request body is present are now done at a higher
level. This removes the need to do the checks at the resource handler
callback, removing duplicated code.

The checks are done by adding constraints to resources that must be
fulfilled by each request.

Added debug assertions to make sure that the core logic of the REST API
resource system works.
2017-08-09 11:39:24 +03:00
1b65bd2a9d Improve runtime listener creation error messages
The error messages for listener creation are now more detailed. In
addition to this, they are also conveyed to the runtime error system.
2017-08-09 11:39:24 +03:00
0ab7df88dc MXS-1300: Fix MaxCtrl cluster sync test for listeners
The test is not very useful for a locally hosted setup as both MaxScales
can't bind to the same port.
2017-08-09 11:39:24 +03:00
2f7251a769 Reuse same MariaDB cluster for testing
The test created a cluster for each test. Reusing the same servers allows
faster testing by reusing the already running servers.
2017-08-09 11:39:24 +03:00
cb066fd09a Fix memory leaks in REST API
The call to MHD_basic_auth_get_username_password allocates memory for both
the password and the username.

mxs_json_add_relation leaked a reference to a JSON object by using
json_array_append instead of json_array_append_new.
2017-08-09 11:39:24 +03:00
db531fb2e2 MXS-1300: Improve MaxCtrl HTTP error messages
The messages now show where the request failed and what was
requested. This should help resolve both develper and end-user problems.

Also fixed the missing logging of the output string in the `parse`
callback of the main function and cleaned up the POSTed server body.
2017-08-09 11:39:24 +03:00
8f7be8a4f3 MXS-1300: Fix MaxCtrl cluster tests
Fixed tests to use correct functions, extended tests of problematic
cases. Added a secondary directory for the second MaxScale instance.
2017-08-09 11:39:24 +03:00