Commit Graph

14103 Commits

Author SHA1 Message Date
e82be12be9 Cache password hash results
Since the user authentication stores a SHA2-512 hash of the password on
disk, caching the hash results in memory speeds up the authentication
process significantly. Storing the password on disk in plain-text form
would also speed it up but this would be quite insecure.
2019-10-29 11:34:09 +02:00
5d96326026 Put back additional use grant
Accidentally removed.
2019-10-29 11:14:44 +02:00
cfd8fda274 Merge branch '2.3' into 2.4 2019-10-29 11:14:03 +02:00
35d3c7084c Put back additional use grant
Accidentally removed.
2019-10-29 11:13:00 +02:00
9b75ea17ac Fix merge bug
Unhandled conflict
2019-10-29 11:08:52 +02:00
722d269123 Merge branch '2.3' into 2.4 2019-10-29 11:02:37 +02:00
ce477491df 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-29 10:48:46 +02:00
fd4a0cfe1f 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-29 10:48:11 +02:00
82826f2de5 MXS-2733 Add fix that fixes the problem
UTC_TIMESTAMP() was missing from the list of builtin functions.
2019-10-29 09:26:41 +02:00
d3407471b3 MXS-2733 Add test that reveals problem 2019-10-29 09:26:41 +02:00
54fc154137 Regenerate MaxCtrl documentation
Generated the new MaxCtrl documentation with the new help output. The help
output now doesn't auto-wrap which causes lines to be longer but it
prevents broken Markdown formatting. It also makes it more readable on
wider terminals.
2019-10-29 09:26:41 +02:00
d0114d9d48 MXS-2712: Fix field description generation
Longer descriptions broke the formatting. The output is now also formatted
as a Markdown table which makes it work in the generated documentation.
2019-10-29 09:26:41 +02:00
446a3fac15 MXS-2720: Fix service session count
The number of sessions wasn't always incremented but it was always
decremented. This happened primarily when authentication failed. By making
the management of the counters a part of the object lifecycle, this
problem goes away.
2019-10-29 09:26:41 +02:00
26a56f48b2 MXS-2720: Assert that client count is non-negative 2019-10-29 09:26:41 +02:00
64cae223f0 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-29 09:26:41 +02:00
cf8ff493bc Add query canonicalization profiling
A small helper program like this helps figure out performance problems
with the function.
2019-10-29 09:26:41 +02:00
8258e14bfe 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-29 09:26:41 +02:00
7f41bfa5f8 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-29 09:26:41 +02:00
c20c6e8406 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-29 09:26:41 +02:00
cc1c1f9c98 MXS-2712: Remove Blocking Polls from show threads
The value was never defined and was always empty.
2019-10-29 09:26:41 +02:00
4393de42f1 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-29 09:26:41 +02:00
9400165376 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-29 09:26:41 +02:00
d6eb73c9ee MXS-2639: Fix maxinfo memory leak
The JSON version didn't call json_decref on the object it created.
2019-10-29 09:26:41 +02:00
c609042874 MXS-2706: Fix maxinfo JSON output
The output now correctly formats integers.
2019-10-29 09:26:41 +02:00
840b771283 Merge branch '2.3' into 2.4 2019-10-28 09:16:53 +02:00
d2996e1ba6 MXS-2733 Add fix that fixes the problem
UTC_TIMESTAMP() was missing from the list of builtin functions.
2019-10-28 08:34:39 +02:00
9210ef5328 MXS-2733 Add test that reveals problem 2019-10-28 08:30:04 +02:00
ff73bc778e MXS-2728: Give maxscale ownership of the .secrets file
Since most of the time users run MaxScale as the maxscale user, we can
change the ownership of the file when it is being created. This prevents
the need to manually set the permissions after the file is created.

If the user creating the file is root, the ownership change will work but
on the other hand if the user simply has write permission into MaxScale's
files, the ownership change will likely cause an error. This will still be
an improvement as the user will know the file ownership needs to be
changed.
2019-10-25 16:22:11 +03:00
47d8ea14df Merge branch '2.3' into 2.4 2019-10-18 10:12:15 +03:00
f723f22c9a Regenerate MaxCtrl documentation
Generated the new MaxCtrl documentation with the new help output. The help
output now doesn't auto-wrap which causes lines to be longer but it
prevents broken Markdown formatting. It also makes it more readable on
wider terminals.
2019-10-18 09:51:09 +03:00
fd7d435f71 MXS-2712: Fix field description generation
Longer descriptions broke the formatting. The output is now also formatted
as a Markdown table which makes it work in the generated documentation.
2019-10-18 09:51:09 +03:00
dc895e41ad Merge branch '2.3' into 2.4 2019-10-11 09:51:48 +03:00
183673b026 MXS-2720: Fix service session count
The number of sessions wasn't always incremented but it was always
decremented. This happened primarily when authentication failed. By making
the management of the counters a part of the object lifecycle, this
problem goes away.
2019-10-10 21:34:03 +03:00
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