6662 Commits

Author SHA1 Message Date
Johan Wikman
ded9f668f1 QC: Parse statements in COM_STMT_PREPARE packets 2017-01-18 08:34:53 +02:00
Johan Wikman
f7892843b5 Handle prepared named statements in firewall filter
Binary prepared statements need to be addressed separately.
2017-01-18 08:34:53 +02:00
Markus Mäkelä
338c625b9a MXS-951: Update connector version
The 2.3.2 version of the Connector/C has the fix for the missing character
sets and collations.
2017-01-18 08:31:47 +02:00
Markus Mäkelä
5fc7b277da Change SESSION to MXS_SESSION
Some modules didn't use the new MXS_SESSION structure.
2017-01-18 08:31:47 +02:00
MassimilianoPinto
19b678abfe MXS-406: check for log message is now fixed
Log message now appears with the right variables check
2017-01-17 16:06:11 +01:00
Markus Mäkelä
c62be62618 Add missing galeramon modifications
The changes for MXS-406 were lost when the file was formatted and the
changes were rebased.
2017-01-17 16:57:21 +02:00
Esa Korhonen
fb771c8a2e Rename public types and constants in session.h
Preparing to split session.h into module and core sections.
2017-01-17 16:30:14 +02:00
Esa Korhonen
680401cf8e Rename public types and constants in monitor.h
Preparing to split monitor.h into module and core sections. Also
changed a few comments in monitor.h.
2017-01-17 15:47:13 +02:00
Johan Wikman
20034b6fd6 QC: Exclude statement that qc_sqlite does not parse 2017-01-17 14:51:19 +02:00
Markus Mäkelä
f9440a6b35 Parse only valid packets in dbfwfilter
The filter attempted to parse all packets that were routed through the
filter.
2017-01-17 14:48:43 +02:00
Markus Mäkelä
3205092540 Format miscellaneous files
Formatted client, avro and rabbitmq consumer files with Astyle.
2017-01-17 14:48:43 +02:00
Markus Mäkelä
3d92263cb3 Format query classifier modules
Formatted query classifier modules with Astyle.
2017-01-17 14:48:43 +02:00
Markus Mäkelä
a48be9badf Format router modules
Formatted router modules with Astyle.
2017-01-17 14:48:43 +02:00
Markus Mäkelä
735674bb1b Format monitor modules
Formatted monitor modules with Astyle.
2017-01-17 14:48:41 +02:00
Markus Mäkelä
c25b7629f4 Format filter modules
Formatted filter modules with Astyle.
2017-01-17 14:47:50 +02:00
Markus Mäkelä
4869fd98eb Format authenticator modules
Formatted authenticator modules with Astyle.
2017-01-17 14:47:50 +02:00
Markus Mäkelä
1766e3a06b Format protocol modules
Formatted protocol modules with Astyle.
2017-01-17 14:47:50 +02:00
Markus Mäkelä
0b6b9c3d81 Format core source code and headers
Formatted core source code and headers with Astyle.
2017-01-17 14:47:50 +02:00
Markus Mäkelä
f109144841 Remove indentation of switch statement labels
Switch statement labels are no longer indented. Parts of the code did
indent them and parts didn't.
2017-01-17 14:47:50 +02:00
MassimilianoPinto
f45ac341d8 MXS-406: node comparison function is now split in two different ones
Two new routines, compare_node_index and compare_node_priority
routines, can be used by qsort depending on sort_order var
2017-01-17 13:18:02 +01:00
MassimilianoPinto
23e40dc0f8 MXS-406: slave nodes are sorted before setting 'wsrep_sst_donor'
The slave nodes par od the cluster are sorted by wsrep_local_index or
server priority.

The sorted list od nodes is then used in ‘wsrep_sst_donor’ variable.

Note: candidate master servers are always at the end of the list
2017-01-17 13:18:01 +01:00
Markus Mäkelä
5b92a1f467 Remove explicit module name from log messages
The module name doesn't need to be logged as MXS_MODULE_NAME will be
automatically added as a prefix to all messages logged by the module.
2017-01-17 12:51:08 +02:00
Johan Wikman
842e8440d4 qc_mysqlembedded: Replace '?':s with '0':s
The embedded parser is not capable of parsing preparable statements
containing ?:s as ordinary statements, so they have to be replaced
with something else. Replacing them with a dummy variable cannot be
done as that will affect the type of the statement. Replacing with
0 seems to be a good compromise.
2017-01-17 12:41:54 +02:00
Johan Wikman
a40692d81d qc_mysqlelmbedded: Handle SQLCOM_REPLACE_SELECT 2017-01-17 12:41:54 +02:00
Markus Mäkelä
c59711d04c Add test for new module command options
The tests test the matching of domain names to module names.
2017-01-17 10:47:44 +02:00
Markus Mäkelä
1f07adaf0f Log commit ID for debug builds
Logging the commit ID should help identify which commit was used for which
log file when tests are run.
2017-01-17 10:47:43 +02:00
Markus Mäkelä
7e65e1ae27 Fix internal test suite
The tests were broken by changes to the core.
2017-01-17 10:47:43 +02:00
Markus Mäkelä
272666f3b5 Only add unknown parameters as custom server parameters
The `authenticator_options` was added as a custom server parameter which
caused it to be duplicated for serialized servers.
2017-01-17 10:47:43 +02:00
Johan Wikman
cc6a3e629e Implement qc_get_preparable_stmt
Now returns the preparable statement as a GWBUF on which the
other qc-functions can be used.
2017-01-17 10:10:38 +02:00
Johan Wikman
8a95a0f045 Remove qc_get_prepare_operation
Since the whole preparable statement will be available, it is
superfluous to provide a function using which the operation of
the preparable statement can be obtained.
2017-01-17 10:10:38 +02:00
Johan Wikman
e349319400 Add qc_get_preparable_stmt
This function will return the preparable statement of a PREPARE
statement as a COM_QUERY GWBUF. That is, once obtained, the normal
query classifier functions can be used for obtaining information
about the preparable statement itself.
2017-01-17 10:10:38 +02:00
Johan Wikman
7fee90a399 Streamline query classifier API interface
- Only types of fixed size used in API interface
- The actual function return value specifies whether the parsing
  process succeeded, while "logical" return values are returned
  as out arguments.

The wrapper function currently ignores the function return value.
2017-01-17 10:10:38 +02:00
Johan Wikman
8d2f4707a4 Remove superfluous typedef 2017-01-17 09:31:53 +02:00
MassimilianoPinto
af045f182b MXS-406: added set_donor_nodes in GALERA_MONITOR struct
Missing set_donor_nodes field added to GALERA_MONITOR struct
2017-01-16 22:41:49 +01:00
MassimilianoPinto
3c532430f9 MXS-406: Galeramon to set the preferred donor nodes
Galeramon queries all slave nodes for SHOW VARIABLES LIKE
'wsrep_node_name'

The server list, currently not sorted, is used in SET GLOBAL
wsrep_sst_donor = “list”. The statement is sent to all slave nodes
2017-01-16 16:23:09 +01:00
Esa Korhonen
c2e14161bd Documentation update regarding support for wildcard hostnames
Added short descriptions and some warnings to Release-Notes and
Limitations.
2017-01-16 16:28:04 +02:00
Esa Korhonen
936f8c438f Add support for wildcards in hostnames
MXS-391. The user hosts in the SQL backends can now contain wildcard
addresses (e.g.basicuser@%.com or someuser@myhost_.org). Authenticating
these types of users is rather heavy since it requires looking
up the client host name.
2017-01-16 16:10:44 +02:00
Johan Wikman
0ce7632f57 QC: Remove qc_is_real_query
Not used.
2017-01-16 14:17:56 +02:00
Esa Korhonen
cd147add5f Move note about MaxAdmin from Changelog to Release notes. 2017-01-16 13:48:27 +02:00
Markus Mäkelä
2cabcea211 Add definitions of MXS_MODULE_NAME to all modules
All modules now declare a name for the module. This is name is added as a
prefix to all messages logged by a module. The prefix should help
determine which part of the system logs a message.
2017-01-16 11:28:34 +02:00
Markus Mäkelä
d054bc9b04 Split config.h into external and internal parts
The external config.h header defined functions and structures that are
intended to be used by modules. The internal header contains functions
that are used only by the MaxScale core.
2017-01-16 11:02:34 +02:00
Markus Mäkelä
74c55e5c82 Remove qc_is_real_query use from mqfilter
The use of this function is not necessary as it is only done as an
optimization.
2017-01-16 10:56:33 +02:00
Markus Mäkelä
666d12f5fb Fix devel package
The moving of the header files to include/maxscale/ broke the devel
package.
2017-01-16 10:56:33 +02:00
Markus Mäkelä
cbdab48237 Remove unused functions from config.h
The header is divided into two parts, an external and an internal one. The
actual splitting is done in a later commit and this commit only prepares
the header for the split.
2017-01-16 10:56:33 +02:00
Markus Mäkelä
08b5d5c957 Detect redefined rules
If a rule is defined more than once, an error is logged and the parsing
fails.
2017-01-16 10:56:33 +02:00
Johan Wikman
c13a2eeb33 Hide definition of MXS_FILTER_DEF
MXS_FILTER_DEF is now private the MaxScale core.
2017-01-16 10:47:00 +02:00
Markus Mäkelä
41d2d65e71 Use new type names in insertstream
Use the renamed types and change numeric constants to defines.
2017-01-13 18:28:37 +02:00
Markus Mäkelä
a3a9edd3b6 Add insertstream documentation
The documentation explains how the filter works.
2017-01-13 17:39:27 +02:00
Markus Mäkelä
1911430e96 Clean up insertstream source documentation
Cleaned up code and source documentation.
2017-01-13 17:39:27 +02:00
Markus Mäkelä
4869eccdc4 Improve insert value checks in insertstream
The filter now checks that the fields are implicitly listed instead of
explicitly defined.
2017-01-13 17:39:27 +02:00