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:
Esa Korhonen
2019-11-22 14:58:09 +02:00
parent e180c20055
commit 96ba2da40c
58 changed files with 43 additions and 19 deletions

View 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;
}