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
Test fix for character test conc223:
Show the missing collation IDs instead of the total number of missing collations. Patch submitted by Michael "Monty" Widenius.
This commit is contained in:
@@ -794,10 +794,13 @@ static int test_conc223(MYSQL *mysql)
|
||||
MYSQL_ROW row;
|
||||
int found= 0;
|
||||
int mdev27266= 0;
|
||||
int unsupported[]= {
|
||||
579, /* utf8mb3_general1400_as_ci added in 11.5 */
|
||||
611, /* utf8mb4_general1400_as_ci added in 11.5 */
|
||||
0};
|
||||
int unsupported[]=
|
||||
{
|
||||
309, /* utf8mb4_0900_bin added in 11.4. Is an alias for utf8mb4_bin */
|
||||
579, /* utf8mb3_general1400_as_ci added in 11.5 */
|
||||
611, /* utf8mb4_general1400_as_ci added in 11.5 */
|
||||
0
|
||||
};
|
||||
|
||||
SKIP_MYSQL(mysql);
|
||||
|
||||
@@ -843,20 +846,26 @@ static int test_conc223(MYSQL *mysql)
|
||||
id= atoi(row[0]);
|
||||
if (!mariadb_get_charset_by_nr(id))
|
||||
{
|
||||
int j=0;
|
||||
found++;
|
||||
for (j=0; unsupported[j]; j++)
|
||||
int ok= 0;
|
||||
for (int j=0; unsupported[j]; j++)
|
||||
{
|
||||
if (unsupported[j] == id)
|
||||
found--;
|
||||
{
|
||||
ok= 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!ok)
|
||||
{
|
||||
found++;
|
||||
diag("character set %d not found", id);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
mysql_free_result(res);
|
||||
if (found)
|
||||
{
|
||||
diag("%d character sets/collations not found", found);
|
||||
return FAIL;
|
||||
}
|
||||
return OK;
|
||||
}
|
||||
|
||||
|
@@ -586,7 +586,7 @@ void get_envvars() {
|
||||
if (!getenv("MYSQLTEST_VARDIR") &&
|
||||
!getenv("MARIADB_CC_TEST"))
|
||||
{
|
||||
skip_all("Tests skipped.\nFor running unittest suite outside of MariaDB server tests,\nplease specify MARIADB_CC_TEST environment variable.");
|
||||
skip_all("Tests skipped.\nFor running unittest suite outside of MariaDB server tests,\nplease specify MARIADB_CC_TEST environment variable.\n");
|
||||
exit(0);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user