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:
@ -22,7 +22,8 @@ void double_cursor(TestConnections& test, MYSQL* conn)
|
||||
unsigned long type = CURSOR_TYPE_READ_ONLY;
|
||||
test.assert(mysql_stmt_attr_set(stmt1, STMT_ATTR_CURSOR_TYPE, &type) == 0,
|
||||
"Set of first attribute should work: %s %s",
|
||||
mysql_stmt_error(stmt1), mysql_error(conn));
|
||||
mysql_stmt_error(stmt1),
|
||||
mysql_error(conn));
|
||||
|
||||
MYSQL_BIND bind[1] {};
|
||||
uint32_t id;
|
||||
@ -30,26 +31,37 @@ void double_cursor(TestConnections& test, MYSQL* conn)
|
||||
bind[0].buffer = &id;
|
||||
mysql_stmt_bind_result(stmt1, bind);
|
||||
|
||||
test.assert(mysql_stmt_execute(stmt1) == 0, "Execute of first statement should work: %s %s",
|
||||
mysql_stmt_error(stmt1), mysql_error(conn));
|
||||
test.assert(mysql_stmt_fetch(stmt1) == 0, "First fetch should work: %s %s",
|
||||
mysql_stmt_error(stmt1), mysql_error(conn));
|
||||
test.assert(mysql_stmt_execute(stmt1) == 0,
|
||||
"Execute of first statement should work: %s %s",
|
||||
mysql_stmt_error(stmt1),
|
||||
mysql_error(conn));
|
||||
test.assert(mysql_stmt_fetch(stmt1) == 0,
|
||||
"First fetch should work: %s %s",
|
||||
mysql_stmt_error(stmt1),
|
||||
mysql_error(conn));
|
||||
|
||||
MYSQL_STMT* stmt2 = mysql_stmt_init(conn);
|
||||
rc = mysql_stmt_prepare(stmt2, query, strlen(query));
|
||||
test.assert(rc == 0, "Second prepare should work: %s %s", mysql_stmt_error(stmt2), mysql_error(conn));
|
||||
test.assert(mysql_stmt_attr_set(stmt2, STMT_ATTR_CURSOR_TYPE, &type) == 0,
|
||||
"Set of second attribute should work: %s %s",
|
||||
mysql_stmt_error(stmt2), mysql_error(conn));
|
||||
mysql_stmt_error(stmt2),
|
||||
mysql_error(conn));
|
||||
mysql_stmt_bind_result(stmt2, bind);
|
||||
|
||||
test.assert(mysql_stmt_execute(stmt2) == 0, "Execute of second statement should work: %s %s",
|
||||
mysql_stmt_error(stmt2), mysql_error(conn));
|
||||
test.assert(mysql_stmt_fetch(stmt2) == 0, "Second fetch should work: %s %s", mysql_stmt_error(stmt2),
|
||||
test.assert(mysql_stmt_execute(stmt2) == 0,
|
||||
"Execute of second statement should work: %s %s",
|
||||
mysql_stmt_error(stmt2),
|
||||
mysql_error(conn));
|
||||
test.assert(mysql_stmt_fetch(stmt2) == 0,
|
||||
"Second fetch should work: %s %s",
|
||||
mysql_stmt_error(stmt2),
|
||||
mysql_error(conn));
|
||||
mysql_stmt_reset(stmt2);
|
||||
|
||||
test.assert(mysql_stmt_fetch(stmt1) == 0, "Third fetch should work: %s %s", mysql_stmt_error(stmt1),
|
||||
test.assert(mysql_stmt_fetch(stmt1) == 0,
|
||||
"Third fetch should work: %s %s",
|
||||
mysql_stmt_error(stmt1),
|
||||
mysql_error(conn));
|
||||
|
||||
mysql_stmt_close(stmt1);
|
||||
|
||||
Reference in New Issue
Block a user