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
cea187e3
Commit
cea187e3
authored
Feb 14, 2020
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
perfschema sysvar instrumentation related changes
incomplete. locking issues
parent
7ce517c9
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
0 deletions
+31
-0
sql/set_var.cc
sql/set_var.cc
+25
-0
sql/set_var.h
sql/set_var.h
+2
-0
sql/sql_class.h
sql/sql_class.h
+4
-0
No files found.
sql/set_var.cc
View file @
cea187e3
...
...
@@ -43,6 +43,7 @@
static
HASH
system_variable_hash
;
static
PolyLock_mutex
PLock_global_system_variables
(
&
LOCK_global_system_variables
);
static
ulonglong
system_variable_hash_version
=
0
;
/**
Return variable name and length for hashing of variables.
...
...
@@ -584,6 +585,8 @@ int mysql_add_sys_var_chain(sys_var *first)
goto
error
;
}
}
/* Update system_variable_hash version. */
system_variable_hash_version
++
;
return
0
;
error:
...
...
@@ -614,6 +617,8 @@ int mysql_del_sys_var_chain(sys_var *first)
result
|=
my_hash_delete
(
&
system_variable_hash
,
(
uchar
*
)
var
);
mysql_prlock_unlock
(
&
LOCK_system_variables_hash
);
/* Update system_variable_hash version. */
system_variable_hash_version
++
;
return
result
;
}
...
...
@@ -624,6 +629,16 @@ static int show_cmp(SHOW_VAR *a, SHOW_VAR *b)
}
/*
Number of records in the system_variable_hash.
Requires lock on LOCK_system_variables_hash.
*/
ulong
get_system_variable_hash_records
(
void
)
{
return
system_variable_hash
.
records
;
}
/**
Constructs an array of system variables for display to the user.
...
...
@@ -1504,3 +1519,13 @@ pretty_print_engine_list(THD *thd, plugin_ref *list)
*
pos
=
'\0'
;
return
buf
;
}
/*
Current version of the system_variable_hash.
Requires lock on LOCK_system_variables_hash.
*/
ulonglong
get_system_variable_hash_version
(
void
)
{
return
system_variable_hash_version
;
}
sql/set_var.h
View file @
cea187e3
...
...
@@ -404,6 +404,8 @@ extern SHOW_COMP_OPTION have_openssl;
/*
Prototypes for helper functions
*/
ulong
get_system_variable_hash_records
(
void
);
ulonglong
get_system_variable_hash_version
(
void
);
SHOW_VAR
*
enumerate_sys_vars
(
THD
*
thd
,
bool
sorted
,
enum
enum_var_type
type
);
int
fill_sysvars
(
THD
*
thd
,
TABLE_LIST
*
tables
,
COND
*
cond
);
...
...
sql/sql_class.h
View file @
cea187e3
...
...
@@ -960,6 +960,10 @@ typedef struct system_status_var
#define last_system_status_var questions
#define last_cleared_system_status_var local_memory_used
/* Number of contiguous global status variables. */
const
int
COUNT_GLOBAL_STATUS_VARS
=
(
offsetof
(
STATUS_VAR
,
last_system_status_var
)
/
sizeof
(
ulong
))
+
1
;
/*
Global status variables
*/
...
...
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