MXS-2900 Move testcore library files to a dedicated directory
The library is now named "maxtest". The related include-files are, for now, usable without designating the full include path. This may be changed later, but would require modifying every test.
This commit is contained in:
23
maxscale-system-test/maxtest/src/big_transaction.cpp
Normal file
23
maxscale-system-test/maxtest/src/big_transaction.cpp
Normal file
@ -0,0 +1,23 @@
|
||||
#include "big_transaction.h"
|
||||
|
||||
int big_transaction(MYSQL* conn, int N)
|
||||
{
|
||||
int local_result = 0;
|
||||
char sql[1000000];
|
||||
local_result += create_t1(conn);
|
||||
local_result += execute_query(conn, (char*) "START TRANSACTION");
|
||||
local_result += execute_query(conn, (char*) "SET autocommit = 0");
|
||||
|
||||
for (int i = 0; i < N; i++)
|
||||
{
|
||||
create_insert_string(sql, 10000, i);
|
||||
local_result += execute_query(conn, "%s", sql);
|
||||
local_result += execute_query(conn, "CREATE TABLE t2(id int);");
|
||||
local_result += execute_query(conn, "%s", sql);
|
||||
local_result += execute_query(conn, "DROP TABLE t2;");
|
||||
local_result += execute_query(conn, "%s", sql);
|
||||
}
|
||||
|
||||
local_result += execute_query(conn, (char*) "COMMIT");
|
||||
return local_result;
|
||||
}
|
||||
Reference in New Issue
Block a user