Fix avrorouter type and name handling

The type and name parsing functions could move outside of allocated memory
as they didn't check for the terminating null character. Also fixed the
printf format string used when the list of used tables is being created.

Fixed CDC testing connector to abort on error and added some extra output
to the cdc_datatypes test.
This commit is contained in:
Markus Mäkelä
2017-06-02 10:26:12 +03:00
parent b504587870
commit 919d08af1e
6 changed files with 26 additions and 6 deletions

View File

@ -204,6 +204,14 @@ bool Connection::readRow(std::string& dest)
else
{
dest += buf;
if (dest[0] == 'E' && dest[1] == 'R' & dest[2] == 'R')
{
m_error = "Server responded with an error: ";
m_error += dest;
rval = false;
break;
}
}
}

View File

@ -143,6 +143,7 @@ bool run_test(TestConnections& test)
{
bool rval = true;
test.tprintf("Inserting data");
for (int x = 0; test_set[x].types; x++)
{
for (int i = 0; test_set[x].types[i]; i++)
@ -152,6 +153,7 @@ bool run_test(TestConnections& test)
}
}
test.tprintf("Waiting for avrorouter to process data");
test.repl->connect();
execute_query(test.repl->nodes[0], "FLUSH LOGS");
test.repl->close_connections();
@ -196,6 +198,7 @@ bool run_test(TestConnections& test)
std::string err = conn.getError();
test.tprintf("Failed to request data: %s", err.c_str());
rval = false;
break;
}
test.stop_timeout();
}
@ -209,8 +212,7 @@ int main(int argc, char *argv[])
TestConnections::check_nodes(false);
TestConnections test(argc, argv);
test.start_binlog();
test.restart_maxscale();
test.replicate_from_master();
if (!run_test(test))
{