The test tests the internals of the cluster diff generation
algorithms. This should guarantee that the diff calculation and the
resulting synchronization will work as expected without having to test it
on a live cluster.
The `cluster sync` command synchronizes a MaxScale cluster with one
server. This allows new MaxScale instances to be synchronized with an old
instance by using the same configuration file and performing a cluster
sync.
The `cluster diff` command prints out the difference between the source
and target MaxScale. This allows users to detect changes that have
happened on one MaxScale but not on the other.
Moved MaxCtrl into a separate package to simplify packaging and
distribution process. Having the client as a separate component allows one
set of packages to be used on multiple platforms.
The "parser" of compare cannot handle the following:
prepare stmt1 from "
with t as (select a from t1 where b >= 'c')
select * from t2,t where t2.c=t.a;
";
That is, that a line *not* terminating the full statement (the
line 'select * from t2,t where t2.c=t.a;' above) ends with a ';'.
Thus, it needs to be changed into e.g.
prepare stmt1 from "
with t as (select a from t1 where b >= 'c')
select * from t2,t where t2.c=t.a;";
In the context of subselects and CTEs it is somewhat difficult to
make qc_sqlite and qc_mysqlembedded to agree upon in what context
a particular field is used. As that information is not used anywhere,
a usage discrepancy is for now treated as a warning.
All callbacks called by sqlite now only access the thread specific
QcSqliteInfo and call the corresponding function on that instance.
This is the first step in making qc_sqlite exception safe from the
point of view of sqlite3.
As the diff is confusing, basically the ONLY thing that has been
done is:
BEFORE:
-------
class QcSqliteInfo
{
...
};
static void some_helper(...) { ... }
void mxs_someCallback(...)
{
QC_TRACE();
QcSqliteInfo* info = this_thread.pInfo;
ss_dassert(info);
info->m_status = ...;
some_helper(info, ...);
}
AFTER:
------
class QcSqliteInfo
{
...
void some_helper(...) { ... }
void mxs_someCallback(...)
{
m_status = ...;
some_helper(this, ...);
}
};
void mxs_someCallback(...)
{
QC_TRACE();
QcSqliteInfo* pInfo = this_thread.pInfo;
ss_dassert(pInfo);
pInfo->mxs_someCallback(...);
}
With this change, for a statement like
SELECT t2.a FROM t1 t2;
the affected field is reported as t1.a and not as t2.a, as it
was before.
For a statement like
SELECT t.f FROM d.t;
qc_mysqlembedded will now return "d.t.f" as the affected field,
while qc_sqlite will still return "t.f" as both implementations did
before. In qc_mysqlembedded's case that is a side-effect of the
alias handling. To get qc_sqlite to return the same (which would
be good), the table names would have to be collected in a smarter
way than they are now.
Divided functionality into classes, fixed comments +
various other cleanup. BackenAuth no longer increments
sequence on sending password. SQLite busy timeout shortened
to 1 second.
This includes the client and backend authenticators. Currently,
only a simple password-based scheme with the SQL-client "dialog" plugin
is supported. In this mode, the server sends the first PAM message
with the AuthSwitchRequest packet and the client responds with the
password. No further authentication messages are supported. If the
connection is not encrypted, the password is sent in plaintext. The
client password is used as is for logging in to backends.
PURGE BINARY LOGS; deletes all files in binlogdir and GTID maps repo
but keeps current binlog file.
PURGE BINARY LOGS TO ‘file’; deletes all files in binlogdir and GTID
maps repo up to specified file.
mariadb10_slave_gtid=On option is needed in order to keep the list of
binlog files.
Alias names for tables are now collected, so that the true
table name of a referred to field can be reported. That modification
will be made in a subsequent commit.
The setting parsing is now similar to the other server settings.
The header is printed if log_info is on.
Changed the setting name to simply "proxy_protocol".
Updated documentation.
If option ‘binlog_structure’ is set to ‘tree’ then SHOW BINARY LOGS
displays the tree details of the binlog files.
MySQL [(none)]> SHOW BINARY LOGS;
+--------------------------+-----------+
| Log_name | File_size |
+--------------------------+-----------+
| 0/10122/mysql-bin.000117 | 1167 |
| 0/10122/mysql-bin.000118 | 652 |
| 0/10124/foo-bin.000016 | 5082 |
| 0/10124/foo-bin.000017 | 491 |
+--------------------------+-----------+
With option set to ‘flat’ (which is the default) the output contains
only
names:
MySQL [(none)]> SHOW BINARY LOGS;
+------------------+-----------+
| Log_name | File_size |
+------------------+-----------+
| mysql-bin.000110 | 425 |
| mysql-bin.000111 | 10409 |
| mysql-bin.000112 | 9659 |
+------------------+-----------+
SHOW [FULL] BINARY LOGS is now able to report the same filename in use
with different server_ids: this can happen with binlog_structure=tree
example from SHOW FULL BINARY LOGS
0/10122/mysql-bin.000113
…
0/10122/mysql-bin.000116
…
0/5306/mysql-bin.000113
SHOW BINARY LOGS shows the same file twice:
mysql-bin.000113
…
mysql-bin.000116
…
mysql-bin.000113
If a particular table appears in a statement multiple times,
qc_get_table_names will report it as many times as it appears.
Each name should be reported just once. Same applies for
database names.
The backend server can send a response even if the client hasn't sent a
request. One case where this occurs is when the server is shutting
down. The internal logic of readwritesplit can't handle unexpected states
gracefully so the safest thing to do is to just ignore them and send the
responses to the client.
When a buffer is cloned and then the original buffer parsed and freed, the
freeing of the cloned buffer will not release the memory that was
allocated when the original buffer is parsed.
This is a side-effect of how the buffer objects are stored in the buffer
and not in the shared memory buffer. The creation of a buffer object after
cloning will cause the buffer object to be lost as the cloned buffer
didn't have a pointer to the buffer object that was created later.
By moving the buffer objects into the shared memory buffer, the memory
leak is fixed.
The update_names() will have to be updated to take a possible alias
name as well. That needs to be tracked inside QcSqliteInfo, so that
when there is a statement like "select t2.a from t1 t2" we report
the field as t1.a and not as t2.a.
The structure for storing statement information is now a C++ class.
At least initially it will not be turned into a full-fledged class
that would contain all functionality, but the code will be a mishmash
of C and C++.