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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
6e827f34
Commit
6e827f34
authored
Apr 18, 2012
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mdev-224 plugin usage statistics in the feedback reports
parent
415507d3
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
24 additions
and
6 deletions
+24
-6
mysql-test/suite/plugins/r/feedback_plugin_install.result
mysql-test/suite/plugins/r/feedback_plugin_install.result
+2
-1
mysql-test/suite/plugins/r/feedback_plugin_load.result
mysql-test/suite/plugins/r/feedback_plugin_load.result
+2
-1
mysql-test/suite/plugins/r/feedback_plugin_send.result
mysql-test/suite/plugins/r/feedback_plugin_send.result
+2
-1
plugin/feedback/utils.cc
plugin/feedback/utils.cc
+13
-3
sql/sql_plugin.cc
sql/sql_plugin.cc
+4
-0
sql/sql_plugin.h
sql/sql_plugin.h
+1
-0
No files found.
mysql-test/suite/plugins/r/feedback_plugin_install.result
View file @
6e827f34
...
...
@@ -5,7 +5,8 @@ ACTIVE
select * from information_schema.feedback where variable_name like 'feed%'
and variable_name not like '%_uid';
VARIABLE_NAME VARIABLE_VALUE
FEEDBACK 1.1
FEEDBACK used 1
FEEDBACK version 1.1
FEEDBACK_SEND_RETRY_WAIT 60
FEEDBACK_SEND_TIMEOUT 60
FEEDBACK_URL http://mariadb.org/feedback_plugin/post
...
...
mysql-test/suite/plugins/r/feedback_plugin_load.result
View file @
6e827f34
...
...
@@ -4,7 +4,8 @@ ACTIVE
select * from information_schema.feedback where variable_name like 'feed%'
and variable_name not like '%_uid';
VARIABLE_NAME VARIABLE_VALUE
FEEDBACK 1.1
FEEDBACK used 1
FEEDBACK version 1.1
FEEDBACK_SEND_RETRY_WAIT 60
FEEDBACK_SEND_TIMEOUT 60
FEEDBACK_URL http://mariadb.org/feedback_plugin/post
...
...
mysql-test/suite/plugins/r/feedback_plugin_send.result
View file @
6e827f34
...
...
@@ -4,7 +4,8 @@ ACTIVE
select * from information_schema.feedback where variable_name like 'feed%'
and variable_name not like '%_uid';
VARIABLE_NAME VARIABLE_VALUE
FEEDBACK 1.1
FEEDBACK used 2
FEEDBACK version 1.1
FEEDBACK_SEND_RETRY_WAIT 60
FEEDBACK_SEND_TIMEOUT 60
FEEDBACK_URL http://mariadb.org/feedback_plugin/post
...
...
plugin/feedback/utils.cc
View file @
6e827f34
...
...
@@ -152,26 +152,36 @@ namespace feedback {
static
const
bool
UNSIGNED
=
true
;
///< used below when inserting integers
/**
callback for fill_plugin
_version() - insert a plugin name and its version
callback for fill_plugin
s()
*/
static
my_bool
show_plugins
(
THD
*
thd
,
plugin_ref
plugin
,
void
*
arg
)
{
TABLE
*
table
=
(
TABLE
*
)
arg
;
char
name
[
NAME_LEN
*
2
];
size_t
name_len
;
char
version
[
20
];
size_t
version_len
;
name_len
=
my_snprintf
(
name
,
sizeof
(
name
),
"%s version"
,
plugin_name
(
plugin
)
->
str
);
version_len
=
my_snprintf
(
version
,
sizeof
(
version
),
"%d.%d"
,
(
plugin_decl
(
plugin
)
->
version
)
>>
8
,
(
plugin_decl
(
plugin
)
->
version
)
&
0xff
);
INSERT2
(
plugin_name
(
plugin
)
->
str
,
plugin_name
(
plugin
)
->
length
,
INSERT2
(
name
,
name_len
,
(
version
,
version_len
,
system_charset_info
));
name_len
=
my_snprintf
(
name
,
sizeof
(
name
),
"%s used"
,
plugin_name
(
plugin
)
->
str
);
INSERT2
(
name
,
name_len
,
(
plugin_ref_to_int
(
plugin
)
->
locks_total
,
UNSIGNED
));
return
0
;
}
/**
inserts all plugins
and their versions into I_S.FEEDBACK
inserts all plugins
, their versions, and usage counters
*/
int
fill_plugin_version
(
THD
*
thd
,
TABLE_LIST
*
tables
)
{
...
...
sql/sql_plugin.cc
View file @
6e827f34
...
...
@@ -980,9 +980,13 @@ plugin_ref plugin_lock(THD *thd, plugin_ref ptr)
without a mutex.
*/
if
(
!
plugin_dlib
(
ptr
))
{
plugin_ref_to_int
(
ptr
)
->
locks_total
++
;
DBUG_RETURN
(
ptr
);
}
#endif
mysql_mutex_lock
(
&
LOCK_plugin
);
plugin_ref_to_int
(
ptr
)
->
locks_total
++
;
rc
=
my_intern_plugin_lock_ci
(
lex
,
ptr
);
mysql_mutex_unlock
(
&
LOCK_plugin
);
DBUG_RETURN
(
rc
);
...
...
sql/sql_plugin.h
View file @
6e827f34
...
...
@@ -99,6 +99,7 @@ struct st_plugin_int
struct
st_plugin_dl
*
plugin_dl
;
uint
state
;
uint
ref_count
;
/* number of threads using the plugin */
uint
locks_total
;
/* how many times the plugin was locked */
void
*
data
;
/* plugin type specific, e.g. handlerton */
MEM_ROOT
mem_root
;
/* memory for dynamic plugin structures */
sys_var
*
system_vars
;
/* server variables for this plugin */
...
...
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