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
Fix authentication tests:
- specify correct plugin type for checks - allow access to test schema for ed25519 user
This commit is contained in:
@@ -1081,7 +1081,7 @@ static int test_auth256(MYSQL *my)
|
|||||||
my_ulonglong num_rows= 0;
|
my_ulonglong num_rows= 0;
|
||||||
char query[1024];
|
char query[1024];
|
||||||
|
|
||||||
if (!mysql_client_find_plugin(mysql, "sha256_password", 3))
|
if (!mysql_client_find_plugin(mysql, "sha256_password", MYSQL_CLIENT_AUTHENTICATION_PLUGIN))
|
||||||
{
|
{
|
||||||
diag("sha256_password plugin not available");
|
diag("sha256_password plugin not available");
|
||||||
mysql_close(mysql);
|
mysql_close(mysql);
|
||||||
@@ -1615,7 +1615,7 @@ static int test_conc366(MYSQL *mysql)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* check if ed25519 plugin is available */
|
/* check if ed25519 plugin is available */
|
||||||
if (!mysql_client_find_plugin(mysql, "client_ed25519", 3))
|
if (!mysql_client_find_plugin(mysql, "client_ed25519", MYSQL_CLIENT_AUTHENTICATION_PLUGIN))
|
||||||
{
|
{
|
||||||
diag("client_ed25519 plugin not available");
|
diag("client_ed25519 plugin not available");
|
||||||
return SKIP;
|
return SKIP;
|
||||||
@@ -1633,6 +1633,10 @@ static int test_conc366(MYSQL *mysql)
|
|||||||
rc= mysql_query(mysql, query);
|
rc= mysql_query(mysql, query);
|
||||||
check_mysql_rc(rc, mysql);
|
check_mysql_rc(rc, mysql);
|
||||||
|
|
||||||
|
sprintf(query, "GRANT ALL ON %s.* TO 'ede'@'%s'", schema, this_host);
|
||||||
|
rc= mysql_query(mysql, query);
|
||||||
|
check_mysql_rc(rc, mysql);
|
||||||
|
|
||||||
my= mysql_init(NULL);
|
my= mysql_init(NULL);
|
||||||
if (plugindir)
|
if (plugindir)
|
||||||
mysql_options(my, MYSQL_PLUGIN_DIR, plugindir);
|
mysql_options(my, MYSQL_PLUGIN_DIR, plugindir);
|
||||||
|
@@ -31,6 +31,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||||||
#include <errmsg.h>
|
#include <errmsg.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <ma_server_error.h>
|
#include <ma_server_error.h>
|
||||||
|
#include <mysql/client_plugin.h>
|
||||||
|
|
||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
|
Reference in New Issue
Block a user