Uncrustify maxscale

See script directory for method. The script to run in the top level
MaxScale directory is called maxscale-uncrustify.sh, which uses
another script, list-src, from the same directory (so you need to set
your PATH). The uncrustify version was 0.66.
This commit is contained in:
Niclas Antti
2018-09-09 22:26:19 +03:00
parent fa7ec95069
commit c447e5cf15
849 changed files with 35002 additions and 27238 deletions

View File

@ -1,7 +1,8 @@
/**
* @file connection_limit.cpp connection_limit check if max_connections parameter works
*
* - Maxscale.cnf contains max_connections=10 for RWSplit, max_connections=20 for ReadConn master and max_connections=25 for ReadConn slave
* - Maxscale.cnf contains max_connections=10 for RWSplit, max_connections=20 for ReadConn master and
*max_connections=25 for ReadConn slave
* - create max num of connections and check tha N+1 connection fails
*/
@ -12,14 +13,16 @@
using namespace std;
void check_max_conn(int router, int max_conn, TestConnections * Test)
void check_max_conn(int router, int max_conn, TestConnections* Test)
{
MYSQL * conn[max_conn + 1];
MYSQL* conn[max_conn + 1];
int i;
for (i = 0; i < max_conn; i++)
{
conn[i] = open_conn(Test->maxscales->ports[0][router], Test->maxscales->IP[0], Test->maxscales->user_name,
conn[i] = open_conn(Test->maxscales->ports[0][router],
Test->maxscales->IP[0],
Test->maxscales->user_name,
Test->maxscales->password,
Test->ssl);
if (mysql_errno(conn[i]) != 0)
@ -27,12 +30,16 @@ void check_max_conn(int router, int max_conn, TestConnections * Test)
Test->add_result(1, "Connection %d failed, error is %s\n", i, mysql_error(conn[i]));
}
}
conn[max_conn] = open_conn(Test->maxscales->ports[0][router], Test->maxscales->IP[0],
conn[max_conn] = open_conn(Test->maxscales->ports[0][router],
Test->maxscales->IP[0],
Test->maxscales->user_name,
Test->maxscales->password, Test->ssl);
Test->maxscales->password,
Test->ssl);
if (mysql_errno(conn[i]) != 1040)
{
Test->add_result(1, "Max_xonnections reached, but error is not 1040, it is %d %s\n", mysql_errno(conn[i]),
Test->add_result(1,
"Max_xonnections reached, but error is not 1040, it is %d %s\n",
mysql_errno(conn[i]),
mysql_error(conn[i]));
}
for (i = 0; i < max_conn; i++)
@ -41,9 +48,9 @@ void check_max_conn(int router, int max_conn, TestConnections * Test)
}
}
int main(int argc, char *argv[])
int main(int argc, char* argv[])
{
TestConnections * Test = new TestConnections(argc, argv);
TestConnections* Test = new TestConnections(argc, argv);
Test->tprintf("Trying 11 connections with RWSplit\n");
check_max_conn(0, 10, Test);