Commit Graph

14220 Commits

Author SHA1 Message Date
c9da7c2727 MXS-2720: Assert that client count is non-negative 2019-10-10 21:24:36 +03:00
1202c00fc7 MXS-2721: Check that LocalClient creation succeeds
The creation can fail if a network socket cannot be opened and connected
to the host in question.
2019-10-10 21:24:35 +03:00
067b1cfbc1 Add query canonicalization profiling
A small helper program like this helps figure out performance problems
with the function.
2019-10-10 21:24:35 +03:00
dc4e35e60d Add minor optimizations to get_canonical
Requiring contiguous buffers removes the need to use mxs::Buffer which
also removes the need to check for buffer boundaries.

Converted all the functions used by get_canonical into `static inline` so
that the compiler knows it can inline them. A few of them weren't `static`
which made the calls to the functions unnecessarily expensive.
2019-10-10 21:24:35 +03:00
6ea2adef12 Fix minor defect in get_canonical
The backslash was added instead of assigned. Since the value stored at
that position is always a null byte, assignment and addition would result
in the same outcome.
2019-10-10 21:24:35 +03:00
121eb93d79 MXS-2712: Add descriptions to list and show commands
The help output of all the list and show commands now explains what each
field in the output table means. The generated table will be added at the
end of the help output.

The descriptions table looks like this:

  Field         Description
  -----         -----------
  Version       MaxScale version
  Commit        MaxScale commit ID
  Started At    Time when MaxScale was started
  Activated At  Time when MaxScale left passive mode
  Uptime        Time MaxScale has been running
  Parameters    Global MaxScale parameters
2019-10-10 10:05:30 +03:00
e6b2fd690e MXS-2712: Remove Blocking Polls from show threads
The value was never defined and was always empty.
2019-10-10 10:05:30 +03:00
088bae5a47 MXS-2712: Move field definitions out of functions
The fields are now defined separately and no longer use the object keys as
the names of the values. This makes it clearer as to what the field
definition actually is. Following commits will add a description key into
each object that makes it possible to easily build help output.
2019-10-10 10:05:29 +03:00
abe73c7b31 Cherry-pick: Make maxctrl rebuild when sources change
Cherry-picked 12e6ada259c38d535003c068a49bc525c33830d8 into 2.3.

Since the maxctrl build process uses add_custom_command, we must
explicitly list the sources that it depends on. With this change, maxctrl
is rebuild whenever the sources change.
2019-10-09 08:41:52 +03:00
56defbfdec MXS-2639: Fix maxinfo memory leak
The JSON version didn't call json_decref on the object it created.
2019-10-09 08:41:51 +03:00
026109f9bc MXS-2706: Fix maxinfo JSON output
The output now correctly formats integers.
2019-10-09 08:41:51 +03:00
c2fc541ea4 Merge branch '2.3' into 2.4 2019-10-08 15:39:12 +03:00
65e18b0c91 Change LICENSE.TXT into a symbolic link
In 2.3 LICENSE.TXT points to LICENSE23.TXT,
in 2.4 it will point to LICENSE24.TXT, and
in 2.5, aka develep, it will point to LICENSE25.TXT.
2019-10-08 15:33:24 +03:00
79fdb19d28 Merge branch '2.3' into 2.4 2019-10-08 15:30:42 +03:00
8afb7f865b Add LICENSE24.TXT 2019-10-08 14:33:51 +03:00
ced318387c Add LICENSE23.TXT
So as to allow the change date to be update at each maintenance
release, we need to have a separate license for each minor release.
In each minor branch there will then be a LICENCE.TXT symbolic link
that points to the actual file.
2019-10-08 14:32:34 +03:00
312469dca2 Merge branch '2.3' into 2.4 2019-10-07 16:17:53 +03:00
e7e40b0179 MXS-2713 Classify SET PASSWORD as QUERY_TYPE_WRITE
A change of the password is replicated to the slaves, so it
must only be sent to the master.
2019-10-07 14:33:53 +03:00
2a7f320cf4 MXS-2713 Add test that reveals problem 2019-10-07 14:24:06 +03:00
4791e043f1 Merge branch '2.3' into 2.4
MXS-2645 was already fixed in 2.4.
2019-10-04 15:54:45 +03:00
c54e254ea0 MXS-2645 Add test case to connection_limit test
Tests max_connections with repeated failed logins.
2019-10-04 15:11:09 +03:00
428bc5740b MXS-2645 Decrement service client count also when authentication fails
The client count was incremented before authentication was complete, and
should be decremented if it fails. Otherwise service connection limit can
be easily reached.
2019-10-04 15:11:09 +03:00
2d9d9356c9 Merge branch '2.3' into 2.4 2019-10-04 12:56:52 +03:00
5a6d6733ae Fix qlafilter example config
`filebase` is a mandatory parameter.
2019-10-04 09:42:04 +03:00
64d19cf018 MXS-2711: Fix updating of retain_last_statements
The value is now correctly expected to be a non-negative integer.
2019-10-04 09:42:03 +03:00
869effc352 MXS-2707: Retain commands that respond
Only commands that return a response should to be retained. Otherwise the
bookkeeping of m_current_query will be wrong.
2019-10-03 22:17:44 +03:00
237cdd798b MXS-2687: Detect invalid socket arguments
Cherry-pick of 5a94f09cb97d7da5ca4a71b398f14ec32e6c90e7.
2019-10-03 09:29:52 +03:00
7f7b052f0e Print stacktrace in one message
By printing the stacktrace in one log message, it prevents it from
interleaving with other messages. This happens on busy systems and makes
crash analysis harder.
2019-10-02 10:44:57 +03:00
9c62aafa93 Merge branch '2.3' into 2.4 2019-10-01 15:25:41 +03:00
fffbb9f791 MXS-2600 Update MariaDB-Monitor documentation
Clarified info on privileges.
2019-10-01 15:14:43 +03:00
b223e6eed3 MXS-2264: Add support for RENAME TABLE
RENAME TABLE is now fully supported and works as expected. With the fix to
table versioning, the new table name will receive the latest version
number.
2019-09-30 16:09:04 +03:00
e3b7804462 Fix URL to Avro package download page 2019-09-30 14:29:00 +03:00
7767231c8f MXS-2264: Fix table versioning
The table versions are now stored in memory and are only resolved on
startup. This simplifies things and removes the need to know where the
data is stored as that information is not available to the Rpl class.
2019-09-30 11:47:30 +03:00
2eb6a25534 MXS-2264: Add support for ALTER TABLE RENAME
This adds preliminary support for renaming tables. There is still a
problem where the table version will always be set to 1 on a rename. This
should not be done and the version should be set to the largest value that
ever was for that table.
2019-09-30 11:47:30 +03:00
a444484310 MXS-2702: Update m_current_master on session command
When lazy_connect is enabled and the first query is `SET autocommit=0`, a
master connection can be created. If it is, then the m_current_master
pointer must also be updated.

Also fixed the case where a failure to connect to one slave would cause
the connection attempts to stop too early.
2019-09-30 11:47:29 +03:00
f6b2a7f3d5 MXS-2354: Extend datatype test case
Added proper test cases for fractional temporal types.
2019-09-30 11:47:29 +03:00
27675ed41d MXS-2354: Fix subsecond part of temporal values
TIMESTAMP2, DATETIME2 and TIME2 values with decimal parts are now
correctly converted into their string forms. Previously the decimal part
was ignored but most of the code required to extract it was in place.
2019-09-30 11:47:29 +03:00
72d9e41ccb MXS-2263: Process unsigned integer columns correctly
The unsigned integers that would previously be interpreted as negative
values are now correctly converted into their corresponding avro
values. Due to a limitation in the Avro file format, 64-bit unsigned
integers cannot be represented in their unsigned form.

Since both the signed and unsigned versions of a 32-bit integer cannot fit
into a single Avro int, the type for these was changed to long. This is a
backwards incompatible change which means files generated with older
versions will not convert unsigned values correctly.
2019-09-30 11:47:27 +03:00
e1ff978b80 MXS-2263: Retain integer sign information
The unsignedness of a column is now retained in the Column type as well as
the JSON schema. This allows correct conversion of unsigned integer types
which will be done in a later commit.
2019-09-30 11:45:01 +03:00
117e2e7e88 Deliver notifications to registered clients
The notifications were delivered to all clients regardless of the
registration state.
2019-09-30 11:45:01 +03:00
bcf26fba3e Add missing COMMIT detection for non-transactional engines
Non-transactional engines will use a query event with a COMMIT in it to
signal that the transaction is over.
2019-09-30 11:45:01 +03:00
51d2d6c1f2 Fix GTID file path generation
The path would be invalid if there was no trailing slash.
2019-09-30 11:45:01 +03:00
0dce20e5e7 Merge branch '2.3' into 2.4 2019-09-27 12:30:58 +03:00
a9f07844b3 MXS-2699 Accept '_[character_set] hex' as string
The purpose is to recognize e.g. /_utf8mb4 0xD091D092D093/ as
a valid string. The rule actually accepts /id integer/, but in
case the statement is something else but an '_' immediately
followed by a character set, followed by a hex number, it will
be rejected by the server so no harm done.
2019-09-27 12:23:04 +03:00
c01ecfed05 MXS-2699 Add test that reveals other bug 2019-09-27 12:23:04 +03:00
5bbb2e239d MXS-2699 Add rule for (expr [, expr]*)
Sofar at most (expr, expr) was accepted.
2019-09-27 12:23:04 +03:00
0c2a84c3a5 MXS-2699 Add test that reveals problem 2019-09-27 12:23:04 +03:00
5b4af80b15 Clean up temparary directories after creation of binary repo
During the build first binary packages are generated and copied into
'pre-repo' direcotory. Then binary repository is created and next
step is to copy repository into final directory according agreed
binary repo sirectories structure. After it temparal direcotries
are not needed.
2019-09-26 11:08:23 +03:00
661c104d39 Merge branch '2.3' into 2.4 2019-09-26 09:31:21 +03:00
54ec30cc8e MXS-2654 Document QC cache statistics 2019-09-26 09:30:52 +03:00