Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
9EOR9 committed Dec 22, 2017
2 parents 2314598 + 3e164b5 commit b00cdcd
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
8 changes: 8 additions & 0 deletions unittest/libmariadb/bulk1.c
Original file line number Diff line number Diff line change
Expand Up @@ -539,6 +539,8 @@ static int test_conc243(MYSQL *mysql)
size_t row_size= sizeof(struct st_data);
int rc;

if (!bulk_enabled)
return SKIP;
rc= mysql_query(mysql, "DROP TABLE IF EXISTS bulk_example2");
check_mysql_rc(rc, mysql);

Expand Down Expand Up @@ -703,6 +705,9 @@ static int test_char_conv2(MYSQL *mysql)
char *buffer[1];
char outbuffer[100];

if (!bulk_enabled)
return SKIP;

buffer[0]= calloc(1, 7);
strcpy (buffer[0], "\xC3\x82\xC3\x83\xC3\x84\x00");

Expand Down Expand Up @@ -794,6 +799,9 @@ static int bulk_skip_row(MYSQL *mysql)
size_t row_size= sizeof(struct st_data);
int rc;

if (!bulk_enabled)
return SKIP;

rc= mysql_query(mysql, "DROP TABLE IF EXISTS bulk_example2");
check_mysql_rc(rc, mysql);

Expand Down
10 changes: 9 additions & 1 deletion unittest/libmariadb/connection.c
Original file line number Diff line number Diff line change
Expand Up @@ -1014,6 +1014,9 @@ static int test_reset(MYSQL *mysql)
int rc;
MYSQL_RES *res;

rc= mysql_query(mysql, "DROP TABLE IF exists t1");
check_mysql_rc(rc, mysql);

rc= mysql_query(mysql, "CREATE TABLE t1 (a int)");
check_mysql_rc(rc, mysql);

Expand All @@ -1023,6 +1026,11 @@ static int test_reset(MYSQL *mysql)
FAIL_IF(mysql_affected_rows(mysql) != 3, "Expected 3 rows");

rc= mysql_reset_connection(mysql);
if (rc && mysql_errno(mysql) == 1047)
{
diag("server doesn't support RESET_CONNECTION");
return SKIP;
}
check_mysql_rc(rc, mysql);

FAIL_IF(mysql_affected_rows(mysql) != ~(unsigned long)0, "Expected 0 rows");
Expand Down Expand Up @@ -1402,7 +1410,7 @@ static int test_mdev14647(MYSQL *my __attribute__((unused)))
{
MYSQL *mysql;
int rc;
char *data= "0";
const char *data= "0";
size_t length= 0;
long server_capabilities;

Expand Down

0 comments on commit b00cdcd

Please sign in to comment.