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
37f87d73
Commit
37f87d73
authored
Nov 26, 2010
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updated sys_vars.cc (converting 5.3 mysqld.cc and set_var.cc
changes appropriately)
parent
65ca700d
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
160 additions
and
204 deletions
+160
-204
sql/keycaches.cc
sql/keycaches.cc
+1
-0
sql/log_slow.h
sql/log_slow.h
+1
-66
sql/mysqld.cc
sql/mysqld.cc
+0
-2
sql/sys_vars.cc
sql/sys_vars.cc
+132
-132
sql/sys_vars.h
sql/sys_vars.h
+26
-4
No files found.
sql/keycaches.cc
View file @
37f87d73
...
...
@@ -118,6 +118,7 @@ KEY_CACHE *create_key_cache(const char *name, uint length)
key_cache
->
param_block_size
=
dflt_key_cache_var
.
param_block_size
;
key_cache
->
param_division_limit
=
dflt_key_cache_var
.
param_division_limit
;
key_cache
->
param_age_threshold
=
dflt_key_cache_var
.
param_age_threshold
;
key_cache
->
param_partitions
=
dflt_key_cache_var
.
param_partitions
;
}
}
DBUG_RETURN
(
key_cache
);
...
...
sql/log_slow.h
View file @
37f87d73
...
...
@@ -19,31 +19,6 @@
#define LOG_SLOW_VERBOSITY_INNODB 1 << 0
#define LOG_SLOW_VERBOSITY_QUERY_PLAN 1 << 1
#ifdef DEFINE_VARIABLES_LOG_SLOW
/* Names here must be in same order as the bit's above */
static
const
char
*
log_slow_verbosity_names
[]
=
{
"innodb"
,
"query_plan"
,
NullS
};
static
const
unsigned
int
log_slow_verbosity_names_len
[]
=
{
sizeof
(
"innodb"
)
-
1
,
sizeof
(
"query_plan"
)
-
1
};
TYPELIB
log_slow_verbosity_typelib
=
{
array_elements
(
log_slow_verbosity_names
)
-
1
,
""
,
log_slow_verbosity_names
,
(
unsigned
int
*
)
log_slow_verbosity_names_len
};
#else
extern
TYPELIB
log_slow_verbosity_typelib
;
#endif
/* DEFINE_VARIABLES_LOG_SLOW */
/* Defines for what kind of query plan was used and what to log */
/*
We init the used query plan with a bit that is alwyas set and all 'no' bits
to enable easy testing of what to log in sql_log.cc
...
...
@@ -63,45 +38,5 @@ extern TYPELIB log_slow_verbosity_typelib;
#define QPLAN_MAX ((ulong) 1) << 31
/* reserved as placeholder */
#define QPLAN_ALWAYS_SET QPLAN_MAX
#define QPLAN_VISIBLE_MASK (~(QPLAN_ALWAYS_SET))
#warning simplify
#ifdef DEFINE_VARIABLES_LOG_SLOW
/* Names here must be in same order as the bit's above */
static
const
char
*
log_slow_filter_names
[]
=
{
"admin"
,
"filesort"
,
"filesort_on_disk"
,
"full_join"
,
"full_scan"
,
"query_cache"
,
"query_cache_miss"
,
"tmp_table"
,
"tmp_table_on_disk"
,
NullS
};
static
const
unsigned
int
log_slow_filter_names_len
[]
=
{
sizeof
(
"admin"
)
-
1
,
sizeof
(
"filesort"
)
-
1
,
sizeof
(
"filesort_on_disk"
)
-
1
,
sizeof
(
"full_join"
)
-
1
,
sizeof
(
"full_scan"
)
-
1
,
sizeof
(
"query_cache"
)
-
1
,
sizeof
(
"query_cache_miss"
)
-
1
,
sizeof
(
"tmp_table"
)
-
1
,
sizeof
(
"tmp_table_on_disk"
)
-
1
};
TYPELIB
log_slow_filter_typelib
=
{
array_elements
(
log_slow_filter_names
)
-
1
,
""
,
log_slow_filter_names
,
(
unsigned
int
*
)
log_slow_filter_names_len
};
#else
extern
TYPELIB
log_slow_filter_typelib
;
#endif
/* DEFINE_VARIABLES_LOG_SLOW */
static
inline
ulong
fix_log_slow_filter
(
ulong
org_filter
)
{
return
org_filter
?
org_filter
:
QPLAN_ALWAYS_SET
;
}
sql/mysqld.cc
View file @
37f87d73
...
...
@@ -52,8 +52,6 @@
#include "des_key_file.h" // load_des_key_file
#include "sql_manager.h" // stop_handle_manager, start_handle_manager
#define DEFINE_VARIABLES_LOG_SLOW // Declare variables in log_slow.h
#include <m_ctype.h>
#include <my_dir.h>
#include <my_bit.h>
...
...
sql/sys_vars.cc
View file @
37f87d73
This diff is collapsed.
Click to expand it.
sql/sys_vars.h
View file @
37f87d73
...
...
@@ -703,8 +703,9 @@ static bool update_buffer_size(THD *thd, KEY_CACHE *key_cache,
return
error
;
}
static
bool
update_keycache_param
(
THD
*
thd
,
KEY_CACHE
*
key_cache
,
ptrdiff_t
offset
,
ulonglong
new_value
)
static
bool
update_keycache
(
THD
*
thd
,
KEY_CACHE
*
key_cache
,
ptrdiff_t
offset
,
ulonglong
new_value
,
(
int
)(
*
)(
KEY_CACHE
*
)
func
)
{
bool
error
=
false
;
DBUG_ASSERT
(
offset
!=
offsetof
(
KEY_CACHE
,
param_buff_size
));
...
...
@@ -713,14 +714,35 @@ static bool update_keycache_param(THD *thd, KEY_CACHE *key_cache,
key_cache
->
in_init
=
1
;
mysql_mutex_unlock
(
&
LOCK_global_system_variables
);
error
=
ha_resize_key_cache
(
key_cache
);
error
=
func
(
key_cache
);
mysql_mutex_lock
(
&
LOCK_global_system_variables
);
key_cache
->
in_init
=
0
;
return
error
;
}
static
bool
resize_keycache
(
THD
*
thd
,
KEY_CACHE
*
key_cache
,
ptrdiff_t
offset
,
ulonglong
new_value
)
{
return
update_keycache
(
thd
,
key_cache
,
offset
,
new_value
,
ha_resize_key_cache
);
}
static
bool
change_keycache_param
(
THD
*
thd
,
KEY_CACHE
*
key_cache
,
ptrdiff_t
offset
,
ulonglong
new_value
)
{
return
update_keycache
(
thd
,
key_cache
,
offset
,
new_value
,
ha_change_key_cache_param
);
}
static
bool
repartition_keycache
(
THD
*
thd
,
KEY_CACHE
*
key_cache
,
ptrdiff_t
offset
,
ulonglong
new_value
)
{
return
update_keycache
(
thd
,
key_cache
,
offset
,
new_value
,
ha_repartition_key_cache
);
}
/**
The class for floating point 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