You've already forked mariadb-connector-c
mirror of
https://github.com/mariadb-corporation/mariadb-connector-c.git
synced 2025-08-07 02:42:49 +03:00
Merge branch '3.1' into 3.2-diego
# Conflicts: # .travis.yml # unittest/libmariadb/charset.c # unittest/libmariadb/connection.c
This commit is contained in:
@@ -475,6 +475,9 @@ static int test_wl4166_2(MYSQL *mysql)
|
||||
"alter table t1 change column c_int c_int varchar(11)");
|
||||
check_mysql_rc(rc, mysql);
|
||||
|
||||
rc= mysql_query(mysql, "FLUSH TABLES");
|
||||
check_mysql_rc(rc, mysql);
|
||||
|
||||
rc= mysql_stmt_execute(stmt);
|
||||
check_stmt_rc(rc, stmt);
|
||||
|
||||
@@ -509,6 +512,9 @@ static int test_wl4166_2(MYSQL *mysql)
|
||||
rc= mysql_query(mysql, "alter table t1 add column d_int int");
|
||||
check_mysql_rc(rc, mysql);
|
||||
|
||||
rc= mysql_query(mysql, "FLUSH TABLES");
|
||||
check_mysql_rc(rc, mysql);
|
||||
|
||||
rc= mysql_stmt_execute(stmt);
|
||||
FAIL_IF(!rc, "Error expected");
|
||||
|
||||
@@ -769,11 +775,26 @@ static int test_wl4284_1(MYSQL *mysql)
|
||||
static int test_bug49694(MYSQL *mysql)
|
||||
{
|
||||
int rc;
|
||||
MYSQL_RES *res;
|
||||
MYSQL_ROW row;
|
||||
int i;
|
||||
FILE *fp;
|
||||
|
||||
diag("Load local infile server : %ld", (mysql->server_capabilities & CLIENT_LOCAL_FILES));
|
||||
diag("Load local infile client : %ld", (mysql->client_flag & CLIENT_LOCAL_FILES));
|
||||
|
||||
SKIP_LOAD_INFILE_DISABLE;
|
||||
SKIP_SKYSQL;
|
||||
|
||||
rc= mysql_query(mysql, "select @@LOCAL_INFILE");
|
||||
check_mysql_rc(rc, mysql);
|
||||
res= mysql_store_result(mysql);
|
||||
row= mysql_fetch_row(res);
|
||||
if (atol(row[0]) == 0) {
|
||||
diag("Load local infile disable");
|
||||
return SKIP;
|
||||
}
|
||||
|
||||
rc= mysql_query(mysql, "DROP TABLE IF EXISTS enclist");
|
||||
check_mysql_rc(rc, mysql);
|
||||
|
||||
@@ -803,6 +824,7 @@ static int test_bug49694(MYSQL *mysql)
|
||||
|
||||
rc= mysql_query(mysql, "DROP TABLE enclist");
|
||||
check_mysql_rc(rc, mysql);
|
||||
mysql_free_result(res);
|
||||
return OK;
|
||||
}
|
||||
|
||||
@@ -810,12 +832,23 @@ static int test_conc49(MYSQL *mysql)
|
||||
{
|
||||
int rc;
|
||||
MYSQL_RES *res;
|
||||
MYSQL_ROW row;
|
||||
|
||||
int i;
|
||||
FILE *fp;
|
||||
|
||||
SKIP_LOAD_INFILE_DISABLE;
|
||||
SKIP_SKYSQL;
|
||||
|
||||
rc= mysql_query(mysql, "select @@LOCAL_INFILE");
|
||||
check_mysql_rc(rc, mysql);
|
||||
res= mysql_store_result(mysql);
|
||||
row= mysql_fetch_row(res);
|
||||
if (atol(row[0]) == 0) {
|
||||
diag("Load local infile disable");
|
||||
return SKIP;
|
||||
}
|
||||
|
||||
fp= fopen("./sample.csv", "w");
|
||||
for (i=1; i < 4; i++)
|
||||
fprintf(fp, "\"%d\", \"%d\", \"%d\"\r\n", i, i, i);
|
||||
@@ -848,6 +881,9 @@ static int test_ldi_path(MYSQL *mysql)
|
||||
rc= mysql_query(mysql, "CREATE TABLE t1 (a int)");
|
||||
check_mysql_rc(rc, mysql);
|
||||
|
||||
rc= mysql_query(mysql, "FLUSH TABLES");
|
||||
check_mysql_rc(rc, mysql);
|
||||
|
||||
#ifdef _WIN32
|
||||
rc= mysql_query(mysql, "LOAD DATA LOCAL INFILE 'X:/non_existing_path/data.csv' INTO TABLE t1 "
|
||||
"FIELDS TERMINATED BY '.' LINES TERMINATED BY '\r\n'");
|
||||
@@ -1028,6 +1064,8 @@ static int test_remote1(MYSQL *mysql)
|
||||
{
|
||||
int rc;
|
||||
SKIP_SKYSQL;
|
||||
MYSQL_RES *res;
|
||||
MYSQL_ROW row;
|
||||
|
||||
remote_plugin= (void *)mysql_client_find_plugin(mysql, "remote_io", MARIADB_CLIENT_REMOTEIO_PLUGIN);
|
||||
if (!remote_plugin)
|
||||
@@ -1037,6 +1075,18 @@ static int test_remote1(MYSQL *mysql)
|
||||
return SKIP;
|
||||
}
|
||||
|
||||
SKIP_LOAD_INFILE_DISABLE;
|
||||
|
||||
rc= mysql_query(mysql, "select @@LOCAL_INFILE");
|
||||
check_mysql_rc(rc, mysql);
|
||||
res= mysql_store_result(mysql);
|
||||
row= mysql_fetch_row(res);
|
||||
if (atol(row[0]) == 0) {
|
||||
diag("Load local infile disable");
|
||||
return SKIP;
|
||||
}
|
||||
mysql_free_result(res);
|
||||
|
||||
rc= mysql_query(mysql, "DROP TABLE IF EXISTS t1");
|
||||
check_mysql_rc(rc, mysql);
|
||||
|
||||
|
Reference in New Issue
Block a user