Merge branch '2.3' into 2.4

This commit is contained in:
Markus Mäkelä 2020-06-03 10:40:24 +03:00
commit ac1e2d4202
No known key found for this signature in database
GPG Key ID: 5CE746D557ACC499
2 changed files with 13 additions and 3 deletions

View File

@ -5,7 +5,7 @@
set(MAXSCALE_VERSION_MAJOR "2" CACHE STRING "Major version")
set(MAXSCALE_VERSION_MINOR "3" CACHE STRING "Minor version")
set(MAXSCALE_VERSION_PATCH "20" CACHE STRING "Patch version")
set(MAXSCALE_VERSION_PATCH "21" CACHE STRING "Patch version")
# This should only be incremented if a package is rebuilt
set(MAXSCALE_BUILD_NUMBER 1 CACHE STRING "Release number")

View File

@ -781,10 +781,21 @@ int Mariadb_nodes::check_replication()
if ((res = get_versions()) != 0)
{
cout << "Failed to get versions" << endl;
return 1;
}
for (int i = 0; i < N && res == 0; i++)
{
if (mysql_query(nodes[i], "SELECT COUNT(*) FROM mysql.user") == 0)
{
mysql_free_result(mysql_store_result(nodes[i]));
}
else
{
cout << mysql_error(nodes[i]) << endl;
res = 1;
}
if (i == master)
{
if (!check_master_node(nodes[i]))
@ -844,8 +855,7 @@ bool Mariadb_nodes::fix_replication()
if (check_replication() == 0)
{
cout << "Replication is fixed" << endl;
flush_hosts();
rval = true;
rval = flush_hosts();
}
else
{