You've already forked mariadb-connector-c
mirror of
https://github.com/mariadb-corporation/mariadb-connector-c.git
synced 2025-08-08 14:02:17 +03:00
More test fixes:
Always provide a message to the FAIL_ macros
This commit is contained in:
@@ -934,7 +934,7 @@ static int test_sess_track_db(MYSQL *mysql)
|
||||
int rc;
|
||||
const char *data;
|
||||
size_t len;
|
||||
char stmt[512];
|
||||
char tmp_str[512];
|
||||
|
||||
|
||||
if (!(mysql->server_capabilities & CLIENT_SESSION_TRACKING))
|
||||
@@ -951,14 +951,17 @@ static int test_sess_track_db(MYSQL *mysql)
|
||||
"session_track_get_first failed");
|
||||
FAIL_IF(strncmp(data, "mysql", len), "Expected new schema 'mysql'");
|
||||
|
||||
sprintf(stmt, "USE %s", schema);
|
||||
rc= mysql_query(mysql, stmt);
|
||||
sprintf(tmp_str, "USE %s", schema);
|
||||
rc= mysql_query(mysql, tmp_str);
|
||||
check_mysql_rc(rc, mysql);
|
||||
FAIL_IF(strcmp(mysql->db, schema), "Expected new schema 'test'");
|
||||
|
||||
sprintf(tmp_str, "Expected new schema '%s'.", schema);
|
||||
|
||||
FAIL_IF(strcmp(mysql->db, schema), tmp_str);
|
||||
|
||||
FAIL_IF(mysql_session_track_get_first(mysql, SESSION_TRACK_SCHEMA, &data, &len),
|
||||
"session_track_get_first failed");
|
||||
FAIL_IF(strncmp(data, "test", len), "Expected new schema 'test'");
|
||||
FAIL_IF(strncmp(data, schema, len), tmp_str);
|
||||
|
||||
if (mysql_get_server_version(mysql) >= 100300)
|
||||
{
|
||||
|
Reference in New Issue
Block a user