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
d508ef78
Commit
d508ef78
authored
Aug 28, 2014
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleanup: more 'const' qualifiers
parent
9ccaa62d
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
63 additions
and
63 deletions
+63
-63
sql/keycaches.cc
sql/keycaches.cc
+1
-1
sql/keycaches.h
sql/keycaches.h
+1
-1
sql/rpl_mi.cc
sql/rpl_mi.cc
+1
-1
sql/rpl_mi.h
sql/rpl_mi.h
+1
-1
sql/set_var.cc
sql/set_var.cc
+3
-3
sql/set_var.h
sql/set_var.h
+3
-3
sql/sql_plugin.cc
sql/sql_plugin.cc
+4
-4
sql/sys_vars.cc
sql/sys_vars.cc
+6
-6
sql/sys_vars.h
sql/sys_vars.h
+43
-43
No files found.
sql/keycaches.cc
View file @
d508ef78
...
...
@@ -103,7 +103,7 @@ LEX_STRING default_key_cache_base= {C_STRING_WITH_LEN("default")};
KEY_CACHE
zero_key_cache
;
///< @@nonexistent_cache.param->value_ptr() points here
KEY_CACHE
*
get_key_cache
(
LEX_STRING
*
cache_name
)
KEY_CACHE
*
get_key_cache
(
const
LEX_STRING
*
cache_name
)
{
if
(
!
cache_name
||
!
cache_name
->
length
)
cache_name
=
&
default_key_cache_base
;
...
...
sql/keycaches.h
View file @
d508ef78
...
...
@@ -40,7 +40,7 @@ extern KEY_CACHE zero_key_cache;
extern
NAMED_ILIST
key_caches
;
KEY_CACHE
*
create_key_cache
(
const
char
*
name
,
uint
length
);
KEY_CACHE
*
get_key_cache
(
LEX_STRING
*
cache_name
);
KEY_CACHE
*
get_key_cache
(
const
LEX_STRING
*
cache_name
);
KEY_CACHE
*
get_or_create_key_cache
(
const
char
*
name
,
uint
length
);
void
free_key_cache
(
const
char
*
name
,
KEY_CACHE
*
key_cache
);
bool
process_key_caches
(
process_key_cache_t
func
,
void
*
param
);
...
...
sql/rpl_mi.cc
View file @
d508ef78
...
...
@@ -1078,7 +1078,7 @@ bool Master_info_index::write_master_name_to_index_file(LEX_STRING *name,
*/
Master_info
*
Master_info_index
::
get_master_info
(
LEX_STRING
*
connection_name
,
Master_info_index
::
get_master_info
(
const
LEX_STRING
*
connection_name
,
Sql_condition
::
enum_warning_level
warning
)
{
Master_info
*
mi
;
...
...
sql/rpl_mi.h
View file @
d508ef78
...
...
@@ -209,7 +209,7 @@ class Master_info_index
const
char
*
host
,
uint
port
);
bool
add_master_info
(
Master_info
*
mi
,
bool
write_to_file
);
bool
remove_master_info
(
LEX_STRING
*
connection_name
);
Master_info
*
get_master_info
(
LEX_STRING
*
connection_name
,
Master_info
*
get_master_info
(
const
LEX_STRING
*
connection_name
,
Sql_condition
::
enum_warning_level
warning
);
bool
give_error_if_slave_running
();
bool
start_all_slaves
(
THD
*
thd
);
...
...
sql/set_var.cc
View file @
d508ef78
...
...
@@ -200,12 +200,12 @@ bool sys_var::update(THD *thd, set_var *var)
(
on_update
&&
on_update
(
this
,
thd
,
OPT_SESSION
));
}
uchar
*
sys_var
::
session_value_ptr
(
THD
*
thd
,
LEX_STRING
*
base
)
uchar
*
sys_var
::
session_value_ptr
(
THD
*
thd
,
const
LEX_STRING
*
base
)
{
return
session_var_ptr
(
thd
);
}
uchar
*
sys_var
::
global_value_ptr
(
THD
*
thd
,
LEX_STRING
*
base
)
uchar
*
sys_var
::
global_value_ptr
(
THD
*
thd
,
const
LEX_STRING
*
base
)
{
return
global_var_ptr
();
}
...
...
@@ -238,7 +238,7 @@ bool sys_var::check(THD *thd, set_var *var)
return
false
;
}
uchar
*
sys_var
::
value_ptr
(
THD
*
thd
,
enum_var_type
type
,
LEX_STRING
*
base
)
uchar
*
sys_var
::
value_ptr
(
THD
*
thd
,
enum_var_type
type
,
const
LEX_STRING
*
base
)
{
if
(
type
==
OPT_GLOBAL
||
scope
()
==
GLOBAL
)
{
...
...
sql/set_var.h
View file @
d508ef78
...
...
@@ -107,7 +107,7 @@ class sys_var
virtual
sys_var_pluginvar
*
cast_pluginvar
()
{
return
0
;
}
bool
check
(
THD
*
thd
,
set_var
*
var
);
uchar
*
value_ptr
(
THD
*
thd
,
enum_var_type
type
,
LEX_STRING
*
base
);
uchar
*
value_ptr
(
THD
*
thd
,
enum_var_type
type
,
const
LEX_STRING
*
base
);
/**
Update the system variable with the default value from either
...
...
@@ -208,8 +208,8 @@ class sys_var
It must be of show_val_type type (bool for SHOW_BOOL, int for SHOW_INT,
longlong for SHOW_LONGLONG, etc).
*/
virtual
uchar
*
session_value_ptr
(
THD
*
thd
,
LEX_STRING
*
base
);
virtual
uchar
*
global_value_ptr
(
THD
*
thd
,
LEX_STRING
*
base
);
virtual
uchar
*
session_value_ptr
(
THD
*
thd
,
const
LEX_STRING
*
base
);
virtual
uchar
*
global_value_ptr
(
THD
*
thd
,
const
LEX_STRING
*
base
);
/**
A pointer to a storage area of the variable, to the raw data.
...
...
sql/sql_plugin.cc
View file @
d508ef78
...
...
@@ -261,10 +261,10 @@ class sys_var_pluginvar: public sys_var, public Sql_alloc
sys_var_pluginvar
*
cast_pluginvar
()
{
return
this
;
}
uchar
*
real_value_ptr
(
THD
*
thd
,
enum_var_type
type
);
TYPELIB
*
plugin_var_typelib
(
void
);
uchar
*
do_value_ptr
(
THD
*
thd
,
enum_var_type
type
,
LEX_STRING
*
base
);
uchar
*
session_value_ptr
(
THD
*
thd
,
LEX_STRING
*
base
)
uchar
*
do_value_ptr
(
THD
*
thd
,
enum_var_type
type
,
const
LEX_STRING
*
base
);
uchar
*
session_value_ptr
(
THD
*
thd
,
const
LEX_STRING
*
base
)
{
return
do_value_ptr
(
thd
,
OPT_SESSION
,
base
);
}
uchar
*
global_value_ptr
(
THD
*
thd
,
LEX_STRING
*
base
)
uchar
*
global_value_ptr
(
THD
*
thd
,
const
LEX_STRING
*
base
)
{
return
do_value_ptr
(
thd
,
OPT_GLOBAL
,
base
);
}
bool
do_check
(
THD
*
thd
,
set_var
*
var
);
virtual
void
session_save_default
(
THD
*
thd
,
set_var
*
var
)
{}
...
...
@@ -3270,7 +3270,7 @@ TYPELIB* sys_var_pluginvar::plugin_var_typelib(void)
uchar
*
sys_var_pluginvar
::
do_value_ptr
(
THD
*
thd
,
enum_var_type
type
,
LEX_STRING
*
base
)
const
LEX_STRING
*
base
)
{
uchar
*
result
;
...
...
sql/sys_vars.cc
View file @
d508ef78
...
...
@@ -1477,7 +1477,7 @@ static Sys_var_gtid_binlog_pos Sys_gtid_binlog_pos(
uchar
*
Sys_var_gtid_binlog_pos
::
global_value_ptr
(
THD
*
thd
,
LEX_STRING
*
base
)
Sys_var_gtid_binlog_pos
::
global_value_ptr
(
THD
*
thd
,
const
LEX_STRING
*
base
)
{
char
buf
[
128
];
String
str
(
buf
,
sizeof
(
buf
),
system_charset_info
);
...
...
@@ -1505,7 +1505,7 @@ static Sys_var_gtid_current_pos Sys_gtid_current_pos(
uchar
*
Sys_var_gtid_current_pos
::
global_value_ptr
(
THD
*
thd
,
LEX_STRING
*
base
)
Sys_var_gtid_current_pos
::
global_value_ptr
(
THD
*
thd
,
const
LEX_STRING
*
base
)
{
String
str
;
char
*
p
;
...
...
@@ -1590,7 +1590,7 @@ Sys_var_gtid_slave_pos::global_update(THD *thd, set_var *var)
uchar
*
Sys_var_gtid_slave_pos
::
global_value_ptr
(
THD
*
thd
,
LEX_STRING
*
base
)
Sys_var_gtid_slave_pos
::
global_value_ptr
(
THD
*
thd
,
const
LEX_STRING
*
base
)
{
String
str
;
char
*
p
;
...
...
@@ -1708,7 +1708,7 @@ Sys_var_gtid_binlog_state::global_update(THD *thd, set_var *var)
uchar
*
Sys_var_gtid_binlog_state
::
global_value_ptr
(
THD
*
thd
,
LEX_STRING
*
base
)
Sys_var_gtid_binlog_state
::
global_value_ptr
(
THD
*
thd
,
const
LEX_STRING
*
base
)
{
char
buf
[
512
];
String
str
(
buf
,
sizeof
(
buf
),
system_charset_info
);
...
...
@@ -1741,7 +1741,7 @@ static Sys_var_last_gtid Sys_last_gtid(
uchar
*
Sys_var_last_gtid
::
session_value_ptr
(
THD
*
thd
,
LEX_STRING
*
base
)
Sys_var_last_gtid
::
session_value_ptr
(
THD
*
thd
,
const
LEX_STRING
*
base
)
{
char
buf
[
10
+
1
+
10
+
1
+
20
+
1
];
String
str
(
buf
,
sizeof
(
buf
),
system_charset_info
);
...
...
@@ -4123,7 +4123,7 @@ bool Sys_var_rpl_filter::set_filter_value(const char *value, Master_info *mi)
return
status
;
}
uchar
*
Sys_var_rpl_filter
::
global_value_ptr
(
THD
*
thd
,
LEX_STRING
*
base
)
uchar
*
Sys_var_rpl_filter
::
global_value_ptr
(
THD
*
thd
,
const
LEX_STRING
*
base
)
{
char
buf
[
256
];
String
tmp
(
buf
,
sizeof
(
buf
),
&
my_charset_bin
);
...
...
sql/sys_vars.h
View file @
d508ef78
This diff is collapsed.
Click to expand it.
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