The MariaDB Connector-C headers that are built by MaxScale must be
included before any system headers.
Fixed code that explicitly included the <mysql.h> header to use the
<maxscale/protocol/mysql.h> wrapper instead.
With the flag --debug=enable-statement-logging it is now possible
to instruct MaxScale to log all SQL statements it sends to the
servers.
The format of the logged string looks like:
notice : SQL(127.0.0.1): 0, "SELECT ..."
First the fixed string "SQL", followed by the server address in
parenthesis followed by the actual return value of mysql_query(),
followed by the statement itself.
The "SQL" string makes the lines easy to grep for and having the
return value before the statement makes it easier to spot since
the length of the return value string does not wary much, but the
length of the statements do wary a lot.
The helper function provides map-like access to row values. This is used
to retrieve the values for all MariaDB 10.0+ versions as there are
differences in the returned results between 10.1 and 10.2.
The new `query_retries` parameter controls how many times an interrupted
query is retried. This retrying of interrupted queries will reduce the
rate of false positives that MaxScale monitors detect.
The function is not capable of doing the right thing for an entire
account string, but only separately for user and host names, so the
function name should reflect that.
Function for removing MySQL quote characters surrounding a
string moved from Cache's rules.cc to common place and renamed.
The function was now moved to mysql_utils.[h|c], which is in
maxscale-common, and not to the perhaps more appropriate place
protocol/mysql.h, as the latter would have implied that MySQLCommon
would have to be linked to, which actually might be the right thing
to do. However, that has to wait until protocol/mysql.h gets an
overhaul.
- All now include maxscale/cdefs.h as the very first file.
- MXS_[BEGIN|END]_DECLS added to all C-headers.
Strictly speaking not necessary for private headers, but
does not hurt either.
- Include guards moved to the very top of the file.
- #pragma once added.
- Headers now to be included as <maxscale/xyz.h>
- First step, no cleanup of headers has been made. Only moving
from one place to another + necessary modifications.