Skip to content

Commit

Permalink
Fixed plugin interface - it's now compatible with MariaDB server and …
Browse files Browse the repository at this point in the history
…Connector/C. The interface version number was bumped to 0x101 - which means older plugins cannot be used anymore with Connector/C 2.3.1
  • Loading branch information
9EOR9 committed Jan 16, 2017
1 parent 9958387 commit 93bb6bf
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 3 deletions.
9 changes: 6 additions & 3 deletions include/mysql/client_plugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@
#define MYSQL_CLIENT_reserved 1
#define MYSQL_CLIENT_AUTHENTICATION_PLUGIN 2

#define MYSQL_CLIENT_AUTHENTICATION_PLUGIN_INTERFACE_VERSION 0x0100
#define MYSQL_CLIENT_DB_PLUGIN_INTERFACE_VERSION 0x0100
#define MYSQL_CLIENT_AUTHENTICATION_PLUGIN_INTERFACE_VERSION 0x0101
#define MYSQL_CLIENT_DB_PLUGIN_INTERFACE_VERSION 0x0101

#define MYSQL_CLIENT_MAX_PLUGINS 3

Expand All @@ -60,8 +60,11 @@
const char *author; \
const char *desc; \
unsigned int version[3]; \
const char *license; \
void *mysql_api; \
int (*init)(char *, size_t, int, va_list); \
int (*deinit)(void);
int (*deinit)(); \
int (*options)(const char *option, const void *);

struct st_mysql_client_plugin
{
Expand Down
6 changes: 6 additions & 0 deletions libmariadb/my_auth.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ static auth_plugin_t native_password_client_plugin=
"R.J.Silk, Sergei Golubchik",
"Native MySQL authentication",
{1, 0, 0},
"LGPL",
NULL,
NULL,
NULL,
NULL,
native_password_auth_client
Expand All @@ -60,6 +63,9 @@ static auth_plugin_t old_password_client_plugin=
"R.J.Silk, Sergei Golubchik",
"Old MySQL-3.23 authentication",
{1, 0, 0},
"LGPL",
NULL,
NULL,
NULL,
NULL,
old_password_auth_client
Expand Down
3 changes: 3 additions & 0 deletions plugins/auth/dialog.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,11 @@ mysql_declare_client_plugin(AUTHENTICATION)
"Sergei Golubchik, Georg Richter",
"Dialog Client Authentication Plugin",
{0,1,0},
"LGPL",
NULL,
auth_dialog_init,
NULL,
NULL,
auth_dialog_open
mysql_end_client_plugin;

Expand Down
3 changes: 3 additions & 0 deletions plugins/auth/mariadb_cleartext.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ mysql_declare_client_plugin(AUTHENTICATION)
"Georg Richter",
"MariaDB clear password authentication plugin",
{0,1,0},
"LGPL",
NULL,
NULL,
NULL,
NULL,
clear_password_auth_client
Expand Down

0 comments on commit 93bb6bf

Please sign in to comment.