Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
c879ed2e
Commit
c879ed2e
authored
Feb 04, 2010
by
He Zhenxing
Browse files
Options
Browse Files
Download
Plain Diff
Auto merge from 5.1-rep-semisync
parents
54fc7997
6ad93ebb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
2 deletions
+14
-2
include/mysql/plugin.h
include/mysql/plugin.h
+3
-2
sql/sql_plugin.cc
sql/sql_plugin.cc
+11
-0
No files found.
include/mysql/plugin.h
View file @
c879ed2e
...
@@ -66,8 +66,9 @@ typedef struct st_mysql_xid MYSQL_XID;
...
@@ -66,8 +66,9 @@ typedef struct st_mysql_xid MYSQL_XID;
#define MYSQL_FTPARSER_PLUGIN 2
/* Full-text parser plugin */
#define MYSQL_FTPARSER_PLUGIN 2
/* Full-text parser plugin */
#define MYSQL_DAEMON_PLUGIN 3
/* The daemon/raw plugin type */
#define MYSQL_DAEMON_PLUGIN 3
/* The daemon/raw plugin type */
#define MYSQL_INFORMATION_SCHEMA_PLUGIN 4
/* The I_S plugin type */
#define MYSQL_INFORMATION_SCHEMA_PLUGIN 4
/* The I_S plugin type */
#define MYSQL_REPLICATION_PLUGIN 5
/* The replication plugin type */
#define MYSQL_AUDIT_PLUGIN 5
/* The Audit plugin type */
#define MYSQL_MAX_PLUGIN_TYPE_NUM 6
/* The number of plugin types */
#define MYSQL_REPLICATION_PLUGIN 6
/* The replication plugin type */
#define MYSQL_MAX_PLUGIN_TYPE_NUM 7
/* The number of plugin types */
/* We use the following strings to define licenses for plugins */
/* We use the following strings to define licenses for plugins */
#define PLUGIN_LICENSE_PROPRIETARY 0
#define PLUGIN_LICENSE_PROPRIETARY 0
...
...
sql/sql_plugin.cc
View file @
c879ed2e
...
@@ -47,6 +47,7 @@ const LEX_STRING plugin_type_names[MYSQL_MAX_PLUGIN_TYPE_NUM]=
...
@@ -47,6 +47,7 @@ const LEX_STRING plugin_type_names[MYSQL_MAX_PLUGIN_TYPE_NUM]=
{
C_STRING_WITH_LEN
(
"FTPARSER"
)
},
{
C_STRING_WITH_LEN
(
"FTPARSER"
)
},
{
C_STRING_WITH_LEN
(
"DAEMON"
)
},
{
C_STRING_WITH_LEN
(
"DAEMON"
)
},
{
C_STRING_WITH_LEN
(
"INFORMATION SCHEMA"
)
},
{
C_STRING_WITH_LEN
(
"INFORMATION SCHEMA"
)
},
{
C_STRING_WITH_LEN
(
"AUDIT"
)
},
{
C_STRING_WITH_LEN
(
"REPLICATION"
)
},
{
C_STRING_WITH_LEN
(
"REPLICATION"
)
},
};
};
...
@@ -87,6 +88,7 @@ static int min_plugin_info_interface_version[MYSQL_MAX_PLUGIN_TYPE_NUM]=
...
@@ -87,6 +88,7 @@ static int min_plugin_info_interface_version[MYSQL_MAX_PLUGIN_TYPE_NUM]=
MYSQL_FTPARSER_INTERFACE_VERSION
,
MYSQL_FTPARSER_INTERFACE_VERSION
,
MYSQL_DAEMON_INTERFACE_VERSION
,
MYSQL_DAEMON_INTERFACE_VERSION
,
MYSQL_INFORMATION_SCHEMA_INTERFACE_VERSION
,
MYSQL_INFORMATION_SCHEMA_INTERFACE_VERSION
,
0x0000
,
/* place holder for audit plugin */
MYSQL_REPLICATION_INTERFACE_VERSION
,
MYSQL_REPLICATION_INTERFACE_VERSION
,
};
};
static
int
cur_plugin_info_interface_version
[
MYSQL_MAX_PLUGIN_TYPE_NUM
]
=
static
int
cur_plugin_info_interface_version
[
MYSQL_MAX_PLUGIN_TYPE_NUM
]
=
...
@@ -96,6 +98,7 @@ static int cur_plugin_info_interface_version[MYSQL_MAX_PLUGIN_TYPE_NUM]=
...
@@ -96,6 +98,7 @@ static int cur_plugin_info_interface_version[MYSQL_MAX_PLUGIN_TYPE_NUM]=
MYSQL_FTPARSER_INTERFACE_VERSION
,
MYSQL_FTPARSER_INTERFACE_VERSION
,
MYSQL_DAEMON_INTERFACE_VERSION
,
MYSQL_DAEMON_INTERFACE_VERSION
,
MYSQL_INFORMATION_SCHEMA_INTERFACE_VERSION
,
MYSQL_INFORMATION_SCHEMA_INTERFACE_VERSION
,
0x0000
,
/* place holder for audit plugin */
MYSQL_REPLICATION_INTERFACE_VERSION
,
MYSQL_REPLICATION_INTERFACE_VERSION
,
};
};
...
@@ -745,6 +748,14 @@ static bool plugin_add(MEM_ROOT *tmp_root,
...
@@ -745,6 +748,14 @@ static bool plugin_add(MEM_ROOT *tmp_root,
name_len
))
name_len
))
{
{
struct
st_plugin_int
*
tmp_plugin_ptr
;
struct
st_plugin_int
*
tmp_plugin_ptr
;
if
(
plugin
->
type
==
MYSQL_AUDIT_PLUGIN
)
{
/* Bug#49894 */
sql_print_error
(
"Plugin type 'AUDIT' not supported by this server."
);
goto
err
;
}
if
(
*
(
int
*
)
plugin
->
info
<
if
(
*
(
int
*
)
plugin
->
info
<
min_plugin_info_interface_version
[
plugin
->
type
]
||
min_plugin_info_interface_version
[
plugin
->
type
]
||
((
*
(
int
*
)
plugin
->
info
)
>>
8
)
>
((
*
(
int
*
)
plugin
->
info
)
>>
8
)
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment