1
0
mirror of https://github.com/mariadb-corporation/mariadb-connector-c.git synced 2025-08-08 14:02:17 +03:00

More test fixes

This commit is contained in:
Georg Richter
2021-06-24 12:48:16 +02:00
parent 47df15edb6
commit 353e99fba1
3 changed files with 10 additions and 7 deletions

View File

@@ -1486,7 +1486,7 @@ static int test_conc317(MYSQL *unused __attribute__((unused)))
mysql_options(mysql, MYSQL_READ_DEFAULT_GROUP, ""); mysql_options(mysql, MYSQL_READ_DEFAULT_GROUP, "");
my_test_connect(mysql, hostname, username, password, my_test_connect(mysql, hostname, username, password,
schema, 0, socketname, 0); schema, port, socketname, 0);
remove(cnf_file1); remove(cnf_file1);
@@ -1534,11 +1534,12 @@ static int test_conc327(MYSQL *unused __attribute__((unused)))
mysql= mysql_init(NULL); mysql= mysql_init(NULL);
mysql_options(mysql, MYSQL_READ_DEFAULT_GROUP, ""); mysql_options(mysql, MYSQL_READ_DEFAULT_GROUP, "");
my_test_connect(mysql, hostname, username, password, my_test_connect(mysql, hostname, username, password,
schema, 0, socketname, 0); schema, port, socketname, 0);
remove(cnf_file1); remove(cnf_file1);
remove(cnf_file2); remove(cnf_file2);
diag("new charset: %s", mysql->options.charset_name);
FAIL_IF(strcmp(mysql_character_set_name(mysql), "latin2"), "expected charset latin2"); FAIL_IF(strcmp(mysql_character_set_name(mysql), "latin2"), "expected charset latin2");
mysql_get_optionv(mysql, MYSQL_OPT_RECONNECT, &reconnect); mysql_get_optionv(mysql, MYSQL_OPT_RECONNECT, &reconnect);
FAIL_IF(reconnect != 1, "expected reconnect=1"); FAIL_IF(reconnect != 1, "expected reconnect=1");
@@ -1557,7 +1558,7 @@ static int test_conc327(MYSQL *unused __attribute__((unused)))
mysql= mysql_init(NULL); mysql= mysql_init(NULL);
mysql_options(mysql, MYSQL_READ_DEFAULT_FILE, cnf_file2); mysql_options(mysql, MYSQL_READ_DEFAULT_FILE, cnf_file2);
my_test_connect(mysql, hostname, username, password, my_test_connect(mysql, hostname, username, password,
schema, 0, socketname, 0); schema, port, socketname, 0);
remove(cnf_file1); remove(cnf_file1);
remove(cnf_file2); remove(cnf_file2);

View File

@@ -242,6 +242,8 @@ static int test_frm_bug(MYSQL *mysql)
char test_frm[1024]; char test_frm[1024];
int rc; int rc;
SKIP_MYSQL(mysql);
mysql_autocommit(mysql, TRUE); mysql_autocommit(mysql, TRUE);
rc= mysql_query(mysql, "drop table if exists test_frm_bug"); rc= mysql_query(mysql, "drop table if exists test_frm_bug");
@@ -1157,7 +1159,7 @@ static int test_mdev12965(MYSQL *unused __attribute__((unused)))
mysql_options(mysql, MYSQL_READ_DEFAULT_GROUP, ""); mysql_options(mysql, MYSQL_READ_DEFAULT_GROUP, "");
my_test_connect(mysql, hostname, username, password, my_test_connect(mysql, hostname, username, password,
schema, 0, socketname, 0); schema, port, socketname, 0);
remove(cnf_file1); remove(cnf_file1);
@@ -1441,7 +1443,7 @@ static int test_conc395(MYSQL *unused __attribute__((unused)))
mysql_options(mysql, MYSQL_READ_DEFAULT_GROUP, ""); mysql_options(mysql, MYSQL_READ_DEFAULT_GROUP, "");
my_test_connect(mysql, hostname, username, password, my_test_connect(mysql, hostname, username, password,
schema, 0, socketname, 0); schema, port, socketname, 0);
remove(cnf_file1); remove(cnf_file1);
@@ -1481,7 +1483,7 @@ static int test_sslenforce(MYSQL *unused __attribute__((unused)))
mysql_options(mysql, MYSQL_READ_DEFAULT_GROUP, ""); mysql_options(mysql, MYSQL_READ_DEFAULT_GROUP, "");
my_test_connect(mysql, hostname, username, password, my_test_connect(mysql, hostname, username, password,
schema, 0, socketname, 0); schema, port, socketname, 0);
remove(cnf_file1); remove(cnf_file1);

View File

@@ -45,7 +45,7 @@ static int test_conc_173(MYSQL *unused __attribute__((unused)))
mysql_options(&mysql, MYSQL_OPT_PROTOCOL, &arg); mysql_options(&mysql, MYSQL_OPT_PROTOCOL, &arg);
if(!mysql_real_connect(&mysql, hostname, username, password, schema, 0, 0, 0)) { if(!mysql_real_connect(&mysql, hostname, username, password, schema, port, 0, 0)) {
fprintf(stderr, "Failed to connect to database after %d iterations: Error: %s\n", i, mysql_error(&mysql)); fprintf(stderr, "Failed to connect to database after %d iterations: Error: %s\n", i, mysql_error(&mysql));
return 1; return 1;
} }