Skip to content

Commit

Permalink
Fix authentication tests:
Browse files Browse the repository at this point in the history
- specify correct plugin type for checks
- allow access to test schema for ed25519 user
  • Loading branch information
9EOR9 committed Mar 4, 2019
1 parent af47d1b commit 8473246
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
8 changes: 6 additions & 2 deletions unittest/libmariadb/connection.c
Original file line number Diff line number Diff line change
Expand Up @@ -1081,7 +1081,7 @@ static int test_auth256(MYSQL *my)
my_ulonglong num_rows= 0;
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");
mysql_close(mysql);
Expand Down Expand Up @@ -1615,7 +1615,7 @@ static int test_conc366(MYSQL *mysql)
}

/* 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");
return SKIP;
Expand All @@ -1633,6 +1633,10 @@ static int test_conc366(MYSQL *mysql)
rc= mysql_query(mysql, query);
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);
if (plugindir)
mysql_options(my, MYSQL_PLUGIN_DIR, plugindir);
Expand Down
1 change: 1 addition & 0 deletions unittest/libmariadb/my_test.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include <errmsg.h>
#include <stdlib.h>
#include <ma_server_error.h>
#include <mysql/client_plugin.h>

#ifndef WIN32
#include <pthread.h>
Expand Down

0 comments on commit 8473246

Please sign in to comment.