Commit Graph

12169 Commits

Author SHA1 Message Date
a349f0ad0d MXS-1779 Implement the classify REST-API 2018-10-31 10:19:40 +02:00
3631388f75 MXS-1779 Add initial support for classification URL
This commit introduces the plumbing support for obtaining
classification information of a statement using the REST-API.
It introduces a URL like

    /v1/maxscale/query_classifier/classify?sql=SELECT+1

that in the response will return a JSON object with the
information. Subsequent commits will provide the actual
information.
2018-10-31 10:19:40 +02:00
460d134e73 Add maxctrl internal function documentation
Some of the functions weren't documented and did not explain what they
should be used for.
2018-10-31 09:53:50 +02:00
cd92b6d4d7 MXS-2122: Close listener socket on destruction
Even though directly closing the socket is not very neat in the
architectural sense of things, it allows the best of both worlds: the
socket is instantly closed and is open for reuse while the listener struct
is still available as a reference.

This change needs to be revised when the listeners are refactored into
separate objects.

Updated documentation to reflect the change in behavior.
2018-10-31 09:53:50 +02:00
47d2898818 MXS-2121: Allow destruction of static listeners
If a listener is defined in a static configuration file, it can now be
destroyed at runtime. If MaxScale is restarted, the listener will be
created again unless the configuration file is modified.
2018-10-31 09:53:49 +02:00
906d8cee5b Format all files
Formatted all files with uncrustify.
2018-10-31 09:46:02 +02:00
8d1b26060a MXS-2109: Change semantics of query_classifier_cache_size
The cache size now refers to the total memory used by the cache instead of
the per thread limit. This makes it easier to use as well as more
predictable by removing the dependency on the number of worker threads.
2018-10-31 09:46:02 +02:00
06d1189e94 Remove unused and confusing variable
The global version_string variable was never set.
2018-10-31 09:13:07 +02:00
7deed35587 Merge branch '2.2' into 2.3 2018-10-31 09:03:09 +02:00
47e7595a08 MXS-2115: Fix regression
The 5.5.5 prefix in the version strings was not added.
2018-10-30 18:43:37 +02:00
ceb4a18f59 Enable query_retries for mxs1961_standalone_rejoin
This should help prevent network disconnections and make the test more
stable. If the connection is lost, the automatic failover is disabled and
the test will fail.
2018-10-30 18:43:37 +02:00
d972c1cd37 Fix replication before syncing slaves in mxs1743_rconn_bitmask
This might help solve the problem where the test hangs when the slaves are
synced.
2018-10-30 18:43:37 +02:00
471cd8f0ef Increase timeouts for mxs431
The test appears to have timed out a few times when creating the
databases.
2018-10-30 18:43:37 +02:00
31859ee486 Remove ses_bigmem test
The test doesn't work when ASAN is used as it increases the memory use of
the process. With the addition of more caches in 2.3, the test is also
more likely to fail. Due to the test being quite useless with ASAN, it is
better to remove it.
2018-10-30 18:43:37 +02:00
ec69a52c1e Update 2.2 release notes and change log 2018-10-30 14:22:20 +02:00
ce35b0d541 Merge branch '2.2' into 2.3 2018-10-30 14:16:33 +02:00
91c5f8580c MXS-2119: Fix file permissions
The admin files are now created with 640 permissions and automatically
created directories now properly set the permissions for the group as
well. All files and directories created by avrorouter and binlogrouter
also now correctly limit the read and write permissions only to the owner
and the group.
2018-10-30 12:45:36 +02:00
eb10b723dd MXS-2117: Fall back to old style query with 10.2.11
If a 10.2.11 or older server without a grant on all mysql tables is found,
the authenticator now falls back to the 10.1 behavior that uses subqueries
instead of CTEs. This is a more user friendly way of working around
MDEV-13453 that causes the problem as all functionality except the support
for composite roles is retained.
2018-10-30 12:45:36 +02:00
93b9ed744f MXS-2111: Use authentication_string when password is empty
If the password field in mysql.user is empty, it is possible that the
actual password is stored in the authentication_string field. Most of the
time this happens due to MDEV-16774 which causes the password to be stored
in the authentication_string field.

Also added a test case that verifies the problem and that it is fixed by
this commit.
2018-10-30 12:45:36 +02:00
2594a0d913 Improve detection of problems caused by MDEV-13453
Instead of looking at the server version, the actual error message should
be inspected. This guarantees that the correct error message is logged
even with custom builds.
2018-10-30 12:45:36 +02:00
7e21e3aedd MXS-2115: Fix handshake version string
The intention was to send the lowest backend version string automatically
to the client instead of the default handshake version. This did not work
as the service version string was used instead of the server version.
2018-10-30 12:45:23 +02:00
b06d9830ae Extend ADAPTIVE_ROUTING in release notes
Added a link and made the description more uniform with the rest of the
document. Also made the description slightly simpler so that it's easier
to understand.
2018-10-29 12:06:12 +02:00
4d8a95d041 Merge commit '262f1d7e471bacca6b985ec3f2cd5cb76d6e2584' into 2.3 2018-10-26 12:44:57 +03:00
c45059f83d Fix size formatting
The sizes were rounded up instead of down. This caused gigabyte sizes to
be shown in the terabyte range.
2018-10-20 14:33:42 +03:00
aa8546ca80 MXS-2107: Prevent moving of client DCBs with poll_add_dcb
When a DCB is removed and added more than once with poll_add_dcb and
poll_remove_dcb, the code previously chose a different thread each time
the DCB was added. This violated the assumption is that all DCBs are local
to a single worker.
2018-10-20 11:53:57 +03:00
a8eda7342f Make writeqlen and others uint64_t
This prevents them from overflowing with buffered results larger than can
be expressed with 32 bits.
2018-10-20 11:53:57 +03:00
f461ab428e Fix backend DCB writeq throttling
The callbacks iterated over all threads when only the local ones must be
iterated. This prevents a deadlock from occurring when multiple threads
start throttling at the same time.

Also fixed the gwbuf_append debug assertion.
2018-10-20 11:53:57 +03:00
4be5d9267d Fix writeq_high_water and writeq_low_water
The parameters were never read at startup and could not be modified at
runtime. Also the values were only read once at startup.
2018-10-20 11:53:57 +03:00
d89cfc1810 Fix crash on KILL
Only backend DCBs should get processed by the callback.
2018-10-20 11:53:57 +03:00
0862c724d8 Fix writeq_low_water
The value was never updated. Also amended the documentation to point out
that the parameter accepts size type values.
2018-10-20 11:53:57 +03:00
262f1d7e47 Fix build failures
The freopen return value caused warnings.
2018-10-19 15:20:34 +03:00
192563a947 MXS-2108: Fix open connection calculation
When a connection to a server is lost and the session command history is
disabled, the session will continue as long as at least one connection is
open. Previously the open connection calculation used the same code that
was used when a new session was created which only inspected the
configured server count instead of the actual open connection count.
2018-10-19 15:20:34 +03:00
6d00dbfc92 Fix mxs2043_select_for_update
Explicitly define the host of the user being created and sync
replication after it.
2018-10-19 15:18:16 +03:00
7d03bee648 Add type formatting helpers
Created the <maxbase/format.hh> header that contains various helper
functions for formatting values into human readable forms. Currently only
binary to human readable size conversion is implemented.
2018-10-19 11:20:29 +03:00
6045c90bf0 Log query classifier cache size on startup 2018-10-19 11:20:29 +03:00
5a87748153 MXS-2090 Update 2.3.1 release notes 2018-10-19 08:03:11 +03:00
8d60bd04d2 MXS-2090 Update documentation 2018-10-19 08:03:11 +03:00
0e2e74d1e1 MXS-2090 Extend test program
Now the same tests are run, first using GTID replication, then
file + position replication.
2018-10-19 08:03:11 +03:00
8a0805d264 MXS-2090 Drop requirement that GTID based replication is used
Drop the requirement that GTID based replication is used for
the BinLog Galera "failover" mechanism. There is no reason for
that restriction; it works just as well with file+position based
replication.
2018-10-19 08:03:11 +03:00
f8cf5053bd MXS-2103: Fix CREATE TEMPORARY TABLE detection
The table creation was not detected as the function used to extract the
table name did not return the fully qualified names. Even if it did return
a fully qualified name, it wouldn't have been correctly processed.
2018-10-18 20:26:58 +03:00
457d0c21dd Document error code and SQL state for blocked queries
If the dbfwfilter blocks a query a specific error is returned. This was
not documented and is needed to detect errors sent by the filter.
2018-10-18 02:02:14 +03:00
230345c98c Fix on_queries documentation
The combination of values was not documented.
2018-10-18 02:02:14 +03:00
9e942f1a48 Add warning for deprecation of server weights 2018-10-17 14:10:57 +03:00
6e43a900c6 Fix keepalived_masterdown
Backends use gtid-replication and the test is faster.
2018-10-16 16:09:38 +03:00
36b666898c Fix connection merging
The conditional was inverted.
2018-10-16 16:09:38 +03:00
e0c46a9c9a Initialize server version string
Could read uninitialized data.
2018-10-16 16:09:38 +03:00
f518b38364 Initialize disk_space_checked
Was reading an uninitialized value.
2018-10-16 16:09:38 +03:00
2d61b78439 Fix low disk space maintenance
The setting didn't work because the code updated a status flag which
would be overwritten before being read. Also, promotion code now checks
that the server is not in maintenance.
2018-10-16 16:09:38 +03:00
0c203fa02d Don't redirect duplicate connections
The redirection method checks if a slave connection to the redirection
target already exists. If so, the connection is not modified. Also, failover
better detects duplicate connections during promotion.
2018-10-16 16:09:38 +03:00
e930270b9c Use copy when checking removed connections
The function modifies the reference parameter contents indirectly.
2018-10-16 16:09:38 +03:00