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:
@ -5,69 +5,70 @@
|
||||
*/
|
||||
|
||||
/*
|
||||
Vilho Raatikka 2014-04-15 07:03:03 UTC
|
||||
Read/write split router
|
||||
-------------------------
|
||||
|
||||
Login to MaxScale & read/write split router, for example
|
||||
|
||||
mysql --host=127.0.0.1 -P 4006 -u maxuser -pmaxpwd
|
||||
|
||||
Complete result :
|
||||
|
||||
MySQL [(none)]> \s
|
||||
--------------
|
||||
mysql Ver 15.1 Distrib 5.5.33-MariaDB, for Linux (x86_64) using readline 5.1
|
||||
|
||||
Connection id: 4051
|
||||
Current database:
|
||||
Current user: maxuser@localhost
|
||||
SSL: Not in use
|
||||
Current pager: less
|
||||
Using outfile: ''
|
||||
Using delimiter: ;
|
||||
Server: MySQL
|
||||
Server version: MaxScale 0.5.0 Source distribution
|
||||
Protocol version: 10
|
||||
Connection: 127.0.0.1 via TCP/IP
|
||||
Server characterset: latin1
|
||||
Db characterset: latin1
|
||||
Client characterset: latin1
|
||||
Conn. characterset: latin1
|
||||
TCP port: 4006
|
||||
Uptime: 34 min 23 sec
|
||||
|
||||
Threads: 5 Questions: 206 Slow queries: 0 Opens: 0 Flush tables: 2 Open tables: 26 Queries per second avg: 0.099
|
||||
--------------
|
||||
|
||||
|
||||
By running same a few time in a row, an incomplete result set arrives, like the following:
|
||||
|
||||
MySQL [(none)]> \s
|
||||
--------------
|
||||
mysql Ver 15.1 Distrib 5.5.33-MariaDB, for Linux (x86_64) using readline 5.1
|
||||
|
||||
Connection id: 4051
|
||||
Current database:
|
||||
Current user: maxuser@localhost
|
||||
SSL: Not in use
|
||||
Current pager: less
|
||||
Using outfile: ''
|
||||
Using delimiter: ;
|
||||
Server: MySQL
|
||||
Server version: MaxScale 0.5.0 Source distribution
|
||||
Protocol version: 10
|
||||
Connection: 127.0.0.1 via TCP/IP
|
||||
Server characterset: latin1
|
||||
Db characterset: latin1
|
||||
Client characterset: latin1
|
||||
Conn. characterset: latin1
|
||||
TCP port: 4006
|
||||
--------------
|
||||
|
||||
MySQL [(none)]>
|
||||
|
||||
*/
|
||||
* Vilho Raatikka 2014-04-15 07:03:03 UTC
|
||||
* Read/write split router
|
||||
* -------------------------
|
||||
*
|
||||
* Login to MaxScale & read/write split router, for example
|
||||
*
|
||||
* mysql --host=127.0.0.1 -P 4006 -u maxuser -pmaxpwd
|
||||
*
|
||||
* Complete result :
|
||||
*
|
||||
* MySQL [(none)]> \s
|
||||
* --------------
|
||||
* mysql Ver 15.1 Distrib 5.5.33-MariaDB, for Linux (x86_64) using readline 5.1
|
||||
*
|
||||
* Connection id: 4051
|
||||
* Current database:
|
||||
* Current user: maxuser@localhost
|
||||
* SSL: Not in use
|
||||
* Current pager: less
|
||||
* Using outfile: ''
|
||||
* Using delimiter: ;
|
||||
* Server: MySQL
|
||||
* Server version: MaxScale 0.5.0 Source distribution
|
||||
* Protocol version: 10
|
||||
* Connection: 127.0.0.1 via TCP/IP
|
||||
* Server characterset: latin1
|
||||
* Db characterset: latin1
|
||||
* Client characterset: latin1
|
||||
* Conn. characterset: latin1
|
||||
* TCP port: 4006
|
||||
* Uptime: 34 min 23 sec
|
||||
*
|
||||
* Threads: 5 Questions: 206 Slow queries: 0 Opens: 0 Flush tables: 2 Open tables: 26 Queries per
|
||||
* second avg: 0.099
|
||||
* --------------
|
||||
*
|
||||
*
|
||||
* By running same a few time in a row, an incomplete result set arrives, like the following:
|
||||
*
|
||||
* MySQL [(none)]> \s
|
||||
* --------------
|
||||
* mysql Ver 15.1 Distrib 5.5.33-MariaDB, for Linux (x86_64) using readline 5.1
|
||||
*
|
||||
* Connection id: 4051
|
||||
* Current database:
|
||||
* Current user: maxuser@localhost
|
||||
* SSL: Not in use
|
||||
* Current pager: less
|
||||
* Using outfile: ''
|
||||
* Using delimiter: ;
|
||||
* Server: MySQL
|
||||
* Server version: MaxScale 0.5.0 Source distribution
|
||||
* Protocol version: 10
|
||||
* Connection: 127.0.0.1 via TCP/IP
|
||||
* Server characterset: latin1
|
||||
* Db characterset: latin1
|
||||
* Client characterset: latin1
|
||||
* Conn. characterset: latin1
|
||||
* TCP port: 4006
|
||||
* --------------
|
||||
*
|
||||
* MySQL [(none)]>
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#include <iostream>
|
||||
@ -76,9 +77,9 @@ MySQL [(none)]>
|
||||
|
||||
using namespace std;
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
TestConnections * Test = new TestConnections(argc, argv);
|
||||
TestConnections* Test = new TestConnections(argc, argv);
|
||||
int i;
|
||||
int iterations = 1000;
|
||||
if (Test->smoke)
|
||||
@ -97,20 +98,23 @@ int main(int argc, char *argv[])
|
||||
for (i = 0; i < iterations; i++)
|
||||
{
|
||||
Test->set_timeout(5);
|
||||
Test->add_result(execute_query(Test->maxscales->conn_rwsplit[0], (char *) "show status"),
|
||||
"Query %d agains RWSplit failed\n", i);
|
||||
Test->add_result(execute_query(Test->maxscales->conn_rwsplit[0], (char*) "show status"),
|
||||
"Query %d agains RWSplit failed\n",
|
||||
i);
|
||||
}
|
||||
for (i = 0; i < iterations; i++)
|
||||
{
|
||||
Test->set_timeout(5);
|
||||
Test->add_result(execute_query(Test->maxscales->conn_slave[0], (char *) "show status"),
|
||||
"Query %d agains ReadConn Slave failed\n", i);
|
||||
Test->add_result(execute_query(Test->maxscales->conn_slave[0], (char*) "show status"),
|
||||
"Query %d agains ReadConn Slave failed\n",
|
||||
i);
|
||||
}
|
||||
for (i = 0; i < iterations; i++)
|
||||
{
|
||||
Test->set_timeout(5);
|
||||
Test->add_result(execute_query(Test->maxscales->conn_master[0], (char *) "show status"),
|
||||
"Query %d agains ReadConn Master failed\n", i);
|
||||
Test->add_result(execute_query(Test->maxscales->conn_master[0], (char*) "show status"),
|
||||
"Query %d agains ReadConn Master failed\n",
|
||||
i);
|
||||
}
|
||||
Test->set_timeout(10);
|
||||
|
||||
|
Reference in New Issue
Block a user