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,5 +1,6 @@
/**
* @file bug572.cpp regression case for bug 572 ( " If reading a user from users table fails, MaxScale fails" )
* @file bug572.cpp regression case for bug 572 ( " If reading a user from users table fails, MaxScale fails"
*)
*
* - try GRANT with wrong IP using all Maxscale services:
* + GRANT ALL PRIVILEGES ON *.* TO 'foo'@'*.foo.notexists' IDENTIFIED BY 'foo';
@ -16,19 +17,20 @@
using namespace std;
void create_drop_bad_user(MYSQL * conn, TestConnections * Test)
void create_drop_bad_user(MYSQL* conn, TestConnections* Test)
{
Test->try_query(conn, (char *)
Test->try_query(conn,
(char*)
"GRANT ALL PRIVILEGES ON *.* TO 'foo'@'*.foo.notexists' IDENTIFIED BY 'foo';");
Test->try_query(conn, (char *) "GRANT ALL PRIVILEGES ON *.* TO 'bar'@'127.0.0.*' IDENTIFIED BY 'bar'");
Test->try_query(conn, (char *) "DROP USER 'foo'@'*.foo.notexists'");
Test->try_query(conn, (char *) "DROP USER 'bar'@'127.0.0.*'");
Test->try_query(conn, (char*) "GRANT ALL PRIVILEGES ON *.* TO 'bar'@'127.0.0.*' IDENTIFIED BY 'bar'");
Test->try_query(conn, (char*) "DROP USER 'foo'@'*.foo.notexists'");
Test->try_query(conn, (char*) "DROP USER 'bar'@'127.0.0.*'");
}
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->set_timeout(10);
Test->repl->connect();
@ -38,7 +40,7 @@ int main(int argc, char *argv[])
create_drop_bad_user(Test->maxscales->conn_rwsplit[0], Test);
Test->tprintf("Trying SELECT to check if Maxscale hangs\n");
Test->try_query(Test->maxscales->conn_rwsplit[0], (char *) "select * from mysql.user");
Test->try_query(Test->maxscales->conn_rwsplit[0], (char*) "select * from mysql.user");
int rval = Test->global_result;
delete Test;