7126 Commits

Author SHA1 Message Date
Johan Wikman
ebf22eee8f Compile hint.c as C++ 2017-03-24 09:21:20 +02:00
Johan Wikman
d257a8a905 Compile hashtable.c as C++ 2017-03-24 09:21:20 +02:00
Johan Wikman
90f56e9dde Compile path.c as C++ 2017-03-24 09:21:20 +02:00
Johan Wikman
77bc2dd7bb Compile externcmd.c as C++ 2017-03-24 09:21:20 +02:00
Johan Wikman
9a22d1cb92 Compile filter.c as C++
The contents of the existing filter.cc was copied into filter.c that
subsequently was renamed to filter.cc.

The way the session is called as the last filter in the filter chain
is really dubious and ought to be rearranged so that the blind casting
of a session to a filter and back is not needed.
2017-03-24 09:21:20 +02:00
Johan Wikman
db18e19d3c Compile dcb.c as C++ 2017-03-24 09:21:20 +02:00
Johan Wikman
71ae3cf524 Compile config_runtime.c as C++ 2017-03-24 09:21:20 +02:00
Johan Wikman
74085978b4 Compile config.c as C++ 2017-03-24 09:21:20 +02:00
Johan Wikman
c84c2dcfbd Compile authenticator.c and buffer.c as C++ 2017-03-24 09:21:20 +02:00
Johan Wikman
462b572600 Compile atomic.c as C++ 2017-03-24 09:21:20 +02:00
Johan Wikman
acc61ed13d Compile alloc.c as C++ 2017-03-24 09:21:20 +02:00
Johan Wikman
f82232eac6 Compile adminusers.c as C++ 2017-03-24 09:21:20 +02:00
Markus Mäkelä
1a8ff4b813 MXS-1198: Add configurable listener retry interval
The maximum listener retry interval is now configurable.
2017-03-22 15:52:59 +02:00
Markus Mäkelä
dd94374057 Make the getCapabitilies entry point optional
The getCapabilities entry point is no longer required as long as all the
relevant capabilities are added to the static module parameters.
2017-03-22 15:47:37 +02:00
Markus Mäkelä
7bd05d4581 Merge branch '2.1' into develop 2017-03-22 15:20:21 +02:00
Johan Wikman
27d81cda6a Merge branch '2.1.1' into 2.1 2017-03-22 13:06:41 +02:00
Johan Wikman
2d00fe1019 Remove references to old release notes 2017-03-22 13:02:18 +02:00
Johan Wikman
d70dad260a Implement collecting behaviour in qc_sqlite
By default, only the essentials - the type and the operation - of
a statement will be collected and only if fields, tables, functions
and databases are explicitly asked for, will they be collected.
However, a statement will be parsed at most twice; if parsing is
needed a second time then all information will be collected.

If it is known that some particular information is needed, then
qc_parse() can be called explicitly to ensure it is collected
at first parsing.
2017-03-22 11:09:36 +02:00
Johan Wikman
d0a9571da0 Introduce new qc_parse() prototype
It is now possible to specify what information the caller is interested
in. With this the cost for collecting information during the query parsing
that nobody is interested in can be avoided.
2017-03-22 11:09:36 +02:00
Johan Wikman
441b0204bf Update cache documentation 2017-03-22 11:04:48 +02:00
Johan Wikman
15a22ec295 Do not use shared PCRE2 match data
The match data needs to be unique for each thread, so for the time
being it is created whenever it is needed. A more performant (although
possibly to a negigible amount) solution would be to have a separate
match data for each thread, but that will have to wait for 2.2.
2017-03-21 15:21:13 +02:00
Johan Wikman
117534d288 Use JIT in regex matching if available 2017-03-21 15:21:13 +02:00
Johan Wikman
17057ef340 Use thread specific pcre2 match data
For 2.2 a worker/thread object need to be passed around so that
not everyone need to create their own thread id mechanism.
2017-03-21 15:21:13 +02:00
Johan Wikman
3670edbc78 Spinlock cleanup
- Non-GCC intrinsics alternative implementation removed. Let's worry
  about the absence of the intrinsics once/if that becomes relevant.
- Spinlock release now performed using __sync_lock_release, as per
  svoj's advice.
- while-looping on the variable used as lock removed, so it no longer
  need to be volatile.
- Boolean function returns bool.
- Size of profiling counters increased.
- Risk for division-by-zero removed.
- Documentation moved from implementation to header.
2017-03-21 15:19:10 +02:00
Johan Wikman
4ca3c19ee3 Use [true|false] instead of [TRUE|FALSE] 2017-03-21 15:17:44 +02:00
Markus Mäkelä
83d696cdde Enable JIT support for PCRE2
The bundled PCRE2 library was built without JIT support.
2017-03-21 13:12:54 +02:00
Johan Wikman
b81c86f228 A rules object may be empty 2017-03-21 10:35:30 +02:00
Johan Wikman
df09dd2043 Update Cache documentation 2017-03-21 10:35:30 +02:00
Markus Mäkelä
ff60500d06 Document router module object
The router module object is now documented with similar documentation to
that of the filter module object.
2017-03-20 12:22:57 +02:00
Markus Mäkelä
ab4c738c3c MXS-1167: Skip loading of users for internal services at startup
When MaxScale is being started and the users are loaded, the MySQL
authenticator should not load the database users for internal services
abstracted as servers.

The loading of users at startup for internal services is avoided because
the startup is done in a single thread context and the internal services
have not yet been started.

The delayed loading of users will cause the authentication to fail when
the first client connect. This triggers the reloading of the users and the
second attempt at authentication will succeed. All of this is hidden from
the end user.
2017-03-20 12:16:29 +02:00
Markus Mäkelä
0b5d164855 MXS-1167: Skip permission checks for internal services
If a server points to a local MaxScale listener, the permission checks for
that server are skipped. This allows permission checks to be used with a
mix of external servers and internal services.
2017-03-20 11:10:55 +02:00
Markus Mäkelä
2e6e8574a4 MXS-864: Document build problems with PCRE2
Added a note about PCRE2 and possible problems that occur when CMake is
configured multiple times.
2017-03-20 11:10:55 +02:00
Markus Mäkelä
a19c0ed1f3 Log executed maxadmin commands on info log level
When maxadmin commands are executed, they are logged at the info
level. This should help when the admin interface is being debugged.
2017-03-20 11:10:55 +02:00
Markus Mäkelä
039f6e3487 Take static module capabilities into use
The static module capabilities are now used to query the capabilities of
filters and routers. The new RCAP_TYPE_NOAUTH capability is also taken
into use. These changes removes the need for the `is_internal_service`
function.
2017-03-20 11:10:08 +02:00
Markus Mäkelä
1736aca7f7 Add module level static capabilities
The static capabilities declared in getCapabilities allows certain
capabilities to be queried before instances are created. The intended use
of this capability is to remove the need for the `is_internal_service`
function.
2017-03-20 11:10:08 +02:00
Markus Mäkelä
06c40eebd7 Remove session locks from schemarouter
The session level locks are no longer needed in the schemarouter. Also
cleaned up some parts of the code.
2017-03-20 11:10:08 +02:00
Markus Mäkelä
58130b5773 Rename schemarouter structures
Renamed structures to remove confusion with readwritesplit structures.
2017-03-20 11:10:08 +02:00
Esa Korhonen
0e9abda06f NamedServerFilter allow ->master and ->slave, check parameter types
The filter now checks what types of parameters it has been given and
only accepts the old style (match, server) XOR new style (match01,
target01 etc).

Adds support for special targets ->master and ->slave.
Code cleanup.
2017-03-20 09:51:01 +02:00
Johan Wikman
a500bd4d79 Merge branch '2.1.1' into 2.1 2017-03-20 09:47:40 +02:00
Johan Wikman
6868c87598 Remove all but 2.1 release notes from 2.1 branch 2017-03-20 09:45:13 +02:00
Esa Korhonen
558a264e6d Server list handling functions consistency
The functions handling servers lists now act with a bit more
consistency, always returning the array size instead of NULL-
terminating arrays.
2017-03-20 09:44:14 +02:00
Johan Wikman
f350b58509 Remove all but 2.0 release notes from 2.0 branch 2017-03-20 09:44:08 +02:00
Johan Wikman
0393943b0e Update Cache documentation 2017-03-17 14:12:51 +02:00
Johan Wikman
ed06b6a331 The cache storage storage_inmemory is now the default 2017-03-17 13:45:55 +02:00
Markus Mäkelä
bbcfe98651 Add stale journal file detection
Added a configurable maximum age for the mysqlmon journal files. If the
file is older than the configured value, it will be ignored and removed.
2017-03-17 13:37:37 +02:00
Markus Mäkelä
40b5e627a2 Improve journal file error logging
When the monitor loads the server state journal, it now correctly logs all
OS errors.
2017-03-17 12:31:19 +02:00
Johan Wikman
1b418b517c Custom parsing for trx state is now the default
The possibility for turning on query_classifier parsing using
an environment variable is retained as a backdoor for sorting
out potential issues.
2017-03-17 12:30:20 +02:00
Johan Wikman
9c3aaddda1 Improve cache performance
- Selects are picked out using custom parsing, so if a statement is
  anything else but a SELECT, the cache will never cause the statement
  to be parsed.
- The setting of of the cache parameter `selects` is taken into account.
  If it is `assume_cacheable` then the statement will also not be parsed
  even if it is a SELECT.
2017-03-17 12:22:00 +02:00
Johan Wikman
b52cc4e56b Take modutil_MySQL_bypass_whitespace into use 2017-03-17 11:54:00 +02:00
Markus Mäkelä
85b8a963bd Document mysqlmon server state backup
The functionality is now documented in the MySQL Monitor documentation.
2017-03-17 11:29:05 +02:00