When the authentication string was decoded from hexadecimal to binary, it
was possible that an out of bounds read was done if the length of the data
was not an even number.
The upgrade process removed the /var/lib/maxscale directory as the newer
version didn't use it. This can be fixed by installing an empty directory
into /var/lib/maxscale.
The return values of pcre2_match are now properly handled. A positive
match is a return value which is greater than or equal to zero. This fix
should give a small performance boost to as memory is no longer needlessly
allocated.
Previously a query like e.g.
delete t11.*, t12.* from t11,t12 where t11.a = t12.a;
would cause a leak. The code for freeing that memory was present
but commented out because it used to cause a crash.
Now no crash appears, so it would seem that the crash was caused
by something else that no longer is present.
The backend reference states should be cleared when a reconnection attempt
is made. Should the creation of a new DCB succeed, the backend should no
longer be closed.
The TARBALL variable controls if a special tar.gz package is built when
packages are generated. This package has a different directory structure
compared to the RPM/DEB packages.
If RPM/DEB packages are built, tar.gz packages are not built. This makes
RPM/DEB generation faster and allows tarballs to be built separately with
a proper directory structures.
Session command responses with multiple packets could be spread across
multiple, non-contiguous buffers. If a buffer contained a complete packet
and some extra data but it wasn't contiguous, the debug assertion in
gwbuf_clone_portion would fail. With release builds, it would cause
eventual out-of-bounds memory access when the response would be sent to
the client.
When a backend causes an error and it should be sent to the client, the
backend reference was closed but the waiting results state was not
cleared. This caused a debug assertion to be hit.
The active operation counters are now closed every time a backend referece
is taken out of use. This should fix a few debug assertions that were hit
in tests.
The `detect_stale_slave` functionality used to only work when MaxScale had
the knowledge that a master server has existed and that replication was
working at some point in time. This might be a "safe" way to do it in
regards to staleness of the data but in practice it is preferrable to
always allow slave to be used for reads.
This change adds the missing functionality to the monitor by assigning
slave status to all servers which are configured as replication slaves
when no master can be found.
The new member variable that was added to the SERVER should be removed in
2.1 where the server_info offers the same functionalty without "polluting"
the SERVER type.
The CHK_LOGFILE macro first asserts that the values being checked are
valid and then proceeds to evaluate it again. The result of this
evaluation was not assigned to anything and it caused GCC 6.1.1 to produce
a warning.
When a client executes commands which do not return results (for example
inserting BLOB data via the C API), readwritesplit expects a result for
each sent packet. This is a somewhat of a false assumption but it clears
itself out when the session is closed normally. If the session is closed
due to an error, the counter is not decremented.
Each sesssion should only increase the number of active operation on a
server by one operation. By checking that the session is not already
executing an operation before incrementing the active operation count the
runtime operation count will be correct.
If systemd restarts MaxScale when an abnormal exit is detected, it is
likely to happen again. This leads into a loop which causes multiple
maxscale processes on the same machine. One example of this behavior is
when systemd times MaxScale out when it is starting.
If the installation directory is something else than /usr,
then the directories
<install-dir>/var/cache/maxscale
<install-dir>/var/log/maxscale
<install-dir>/var/run/maxscale
will be created at installation time.
The document is now split into module type sections. Added documentation on the
limitations on multiple monitors monitoring the same servers and filters not
receiving complete packets when used with readconnroute.