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
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")};
...
@@ -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
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
)
if
(
!
cache_name
||
!
cache_name
->
length
)
cache_name
=
&
default_key_cache_base
;
cache_name
=
&
default_key_cache_base
;
...
...
sql/keycaches.h
View file @
d508ef78
...
@@ -40,7 +40,7 @@ extern KEY_CACHE zero_key_cache;
...
@@ -40,7 +40,7 @@ extern KEY_CACHE zero_key_cache;
extern
NAMED_ILIST
key_caches
;
extern
NAMED_ILIST
key_caches
;
KEY_CACHE
*
create_key_cache
(
const
char
*
name
,
uint
length
);
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
);
KEY_CACHE
*
get_or_create_key_cache
(
const
char
*
name
,
uint
length
);
void
free_key_cache
(
const
char
*
name
,
KEY_CACHE
*
key_cache
);
void
free_key_cache
(
const
char
*
name
,
KEY_CACHE
*
key_cache
);
bool
process_key_caches
(
process_key_cache_t
func
,
void
*
param
);
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,
...
@@ -1078,7 +1078,7 @@ bool Master_info_index::write_master_name_to_index_file(LEX_STRING *name,
*/
*/
Master_info
*
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
)
Sql_condition
::
enum_warning_level
warning
)
{
{
Master_info
*
mi
;
Master_info
*
mi
;
...
...
sql/rpl_mi.h
View file @
d508ef78
...
@@ -209,7 +209,7 @@ class Master_info_index
...
@@ -209,7 +209,7 @@ class Master_info_index
const
char
*
host
,
uint
port
);
const
char
*
host
,
uint
port
);
bool
add_master_info
(
Master_info
*
mi
,
bool
write_to_file
);
bool
add_master_info
(
Master_info
*
mi
,
bool
write_to_file
);
bool
remove_master_info
(
LEX_STRING
*
connection_name
);
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
);
Sql_condition
::
enum_warning_level
warning
);
bool
give_error_if_slave_running
();
bool
give_error_if_slave_running
();
bool
start_all_slaves
(
THD
*
thd
);
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)
...
@@ -200,12 +200,12 @@ bool sys_var::update(THD *thd, set_var *var)
(
on_update
&&
on_update
(
this
,
thd
,
OPT_SESSION
));
(
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
);
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
();
return
global_var_ptr
();
}
}
...
@@ -238,7 +238,7 @@ bool sys_var::check(THD *thd, set_var *var)
...
@@ -238,7 +238,7 @@ bool sys_var::check(THD *thd, set_var *var)
return
false
;
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
)
if
(
type
==
OPT_GLOBAL
||
scope
()
==
GLOBAL
)
{
{
...
...
sql/set_var.h
View file @
d508ef78
...
@@ -107,7 +107,7 @@ class sys_var
...
@@ -107,7 +107,7 @@ class sys_var
virtual
sys_var_pluginvar
*
cast_pluginvar
()
{
return
0
;
}
virtual
sys_var_pluginvar
*
cast_pluginvar
()
{
return
0
;
}
bool
check
(
THD
*
thd
,
set_var
*
var
);
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
Update the system variable with the default value from either
...
@@ -208,8 +208,8 @@ class sys_var
...
@@ -208,8 +208,8 @@ class sys_var
It must be of show_val_type type (bool for SHOW_BOOL, int for SHOW_INT,
It must be of show_val_type type (bool for SHOW_BOOL, int for SHOW_INT,
longlong for SHOW_LONGLONG, etc).
longlong for SHOW_LONGLONG, etc).
*/
*/
virtual
uchar
*
session_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
,
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.
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
...
@@ -261,10 +261,10 @@ class sys_var_pluginvar: public sys_var, public Sql_alloc
sys_var_pluginvar
*
cast_pluginvar
()
{
return
this
;
}
sys_var_pluginvar
*
cast_pluginvar
()
{
return
this
;
}
uchar
*
real_value_ptr
(
THD
*
thd
,
enum_var_type
type
);
uchar
*
real_value_ptr
(
THD
*
thd
,
enum_var_type
type
);
TYPELIB
*
plugin_var_typelib
(
void
);
TYPELIB
*
plugin_var_typelib
(
void
);
uchar
*
do_value_ptr
(
THD
*
thd
,
enum_var_type
type
,
LEX_STRING
*
base
);
uchar
*
do_value_ptr
(
THD
*
thd
,
enum_var_type
type
,
const
LEX_STRING
*
base
);
uchar
*
session_value_ptr
(
THD
*
thd
,
LEX_STRING
*
base
)
uchar
*
session_value_ptr
(
THD
*
thd
,
const
LEX_STRING
*
base
)
{
return
do_value_ptr
(
thd
,
OPT_SESSION
,
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
);
}
{
return
do_value_ptr
(
thd
,
OPT_GLOBAL
,
base
);
}
bool
do_check
(
THD
*
thd
,
set_var
*
var
);
bool
do_check
(
THD
*
thd
,
set_var
*
var
);
virtual
void
session_save_default
(
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)
...
@@ -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
,
uchar
*
sys_var_pluginvar
::
do_value_ptr
(
THD
*
thd
,
enum_var_type
type
,
LEX_STRING
*
base
)
const
LEX_STRING
*
base
)
{
{
uchar
*
result
;
uchar
*
result
;
...
...
sql/sys_vars.cc
View file @
d508ef78
...
@@ -1477,7 +1477,7 @@ static Sys_var_gtid_binlog_pos Sys_gtid_binlog_pos(
...
@@ -1477,7 +1477,7 @@ static Sys_var_gtid_binlog_pos Sys_gtid_binlog_pos(
uchar
*
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
];
char
buf
[
128
];
String
str
(
buf
,
sizeof
(
buf
),
system_charset_info
);
String
str
(
buf
,
sizeof
(
buf
),
system_charset_info
);
...
@@ -1505,7 +1505,7 @@ static Sys_var_gtid_current_pos Sys_gtid_current_pos(
...
@@ -1505,7 +1505,7 @@ static Sys_var_gtid_current_pos Sys_gtid_current_pos(
uchar
*
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
;
String
str
;
char
*
p
;
char
*
p
;
...
@@ -1590,7 +1590,7 @@ Sys_var_gtid_slave_pos::global_update(THD *thd, set_var *var)
...
@@ -1590,7 +1590,7 @@ Sys_var_gtid_slave_pos::global_update(THD *thd, set_var *var)
uchar
*
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
;
String
str
;
char
*
p
;
char
*
p
;
...
@@ -1708,7 +1708,7 @@ Sys_var_gtid_binlog_state::global_update(THD *thd, set_var *var)
...
@@ -1708,7 +1708,7 @@ Sys_var_gtid_binlog_state::global_update(THD *thd, set_var *var)
uchar
*
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
];
char
buf
[
512
];
String
str
(
buf
,
sizeof
(
buf
),
system_charset_info
);
String
str
(
buf
,
sizeof
(
buf
),
system_charset_info
);
...
@@ -1741,7 +1741,7 @@ static Sys_var_last_gtid Sys_last_gtid(
...
@@ -1741,7 +1741,7 @@ static Sys_var_last_gtid Sys_last_gtid(
uchar
*
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
];
char
buf
[
10
+
1
+
10
+
1
+
20
+
1
];
String
str
(
buf
,
sizeof
(
buf
),
system_charset_info
);
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)
...
@@ -4123,7 +4123,7 @@ bool Sys_var_rpl_filter::set_filter_value(const char *value, Master_info *mi)
return
status
;
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
];
char
buf
[
256
];
String
tmp
(
buf
,
sizeof
(
buf
),
&
my_charset_bin
);
String
tmp
(
buf
,
sizeof
(
buf
),
&
my_charset_bin
);
...
...
sql/sys_vars.h
View file @
d508ef78
...
@@ -333,9 +333,9 @@ class Sys_var_enum: public Sys_var_typelib
...
@@ -333,9 +333,9 @@ class Sys_var_enum: public Sys_var_typelib
{
var
->
save_result
.
ulonglong_value
=
global_var
(
ulong
);
}
{
var
->
save_result
.
ulonglong_value
=
global_var
(
ulong
);
}
void
global_save_default
(
THD
*
thd
,
set_var
*
var
)
void
global_save_default
(
THD
*
thd
,
set_var
*
var
)
{
var
->
save_result
.
ulonglong_value
=
option
.
def_value
;
}
{
var
->
save_result
.
ulonglong_value
=
option
.
def_value
;
}
uchar
*
session_value_ptr
(
THD
*
thd
,
LEX_STRING
*
base
)
uchar
*
session_value_ptr
(
THD
*
thd
,
const
LEX_STRING
*
base
)
{
return
(
uchar
*
)
typelib
.
type_names
[
session_var
(
thd
,
ulong
)];
}
{
return
(
uchar
*
)
typelib
.
type_names
[
session_var
(
thd
,
ulong
)];
}
uchar
*
global_value_ptr
(
THD
*
thd
,
LEX_STRING
*
base
)
uchar
*
global_value_ptr
(
THD
*
thd
,
const
LEX_STRING
*
base
)
{
return
(
uchar
*
)
typelib
.
type_names
[
global_var
(
ulong
)];
}
{
return
(
uchar
*
)
typelib
.
type_names
[
global_var
(
ulong
)];
}
};
};
...
@@ -531,7 +531,7 @@ class Sys_var_proxy_user: public sys_var
...
@@ -531,7 +531,7 @@ class Sys_var_proxy_user: public sys_var
void
global_save_default
(
THD
*
thd
,
set_var
*
var
)
void
global_save_default
(
THD
*
thd
,
set_var
*
var
)
{
DBUG_ASSERT
(
FALSE
);
}
{
DBUG_ASSERT
(
FALSE
);
}
protected:
protected:
virtual
uchar
*
session_value_ptr
(
THD
*
thd
,
LEX_STRING
*
base
)
uchar
*
session_value_ptr
(
THD
*
thd
,
const
LEX_STRING
*
base
)
{
{
return
thd
->
security_ctx
->
proxy_user
[
0
]
?
return
thd
->
security_ctx
->
proxy_user
[
0
]
?
(
uchar
*
)
&
(
thd
->
security_ctx
->
proxy_user
[
0
])
:
NULL
;
(
uchar
*
)
&
(
thd
->
security_ctx
->
proxy_user
[
0
])
:
NULL
;
...
@@ -547,7 +547,7 @@ class Sys_var_external_user : public Sys_var_proxy_user
...
@@ -547,7 +547,7 @@ class Sys_var_external_user : public Sys_var_proxy_user
{}
{}
protected:
protected:
virtual
uchar
*
session_value_ptr
(
THD
*
thd
,
LEX_STRING
*
base
)
virtual
uchar
*
session_value_ptr
(
THD
*
thd
,
const
LEX_STRING
*
base
)
{
{
return
(
uchar
*
)
thd
->
security_ctx
->
external_user
;
return
(
uchar
*
)
thd
->
security_ctx
->
external_user
;
}
}
...
@@ -587,7 +587,7 @@ class Sys_var_rpl_filter: public sys_var
...
@@ -587,7 +587,7 @@ class Sys_var_rpl_filter: public sys_var
bool
global_update
(
THD
*
thd
,
set_var
*
var
);
bool
global_update
(
THD
*
thd
,
set_var
*
var
);
protected:
protected:
uchar
*
global_value_ptr
(
THD
*
thd
,
LEX_STRING
*
base
);
uchar
*
global_value_ptr
(
THD
*
thd
,
const
LEX_STRING
*
base
);
bool
set_filter_value
(
const
char
*
value
,
Master_info
*
mi
);
bool
set_filter_value
(
const
char
*
value
,
Master_info
*
mi
);
};
};
...
@@ -705,11 +705,11 @@ class Sys_var_session_lexstring: public sys_var
...
@@ -705,11 +705,11 @@ class Sys_var_session_lexstring: public sys_var
{
{
DBUG_ASSERT
(
FALSE
);
DBUG_ASSERT
(
FALSE
);
}
}
uchar
*
session_value_ptr
(
THD
*
thd
,
LEX_STRING
*
base
)
uchar
*
session_value_ptr
(
THD
*
thd
,
const
LEX_STRING
*
base
)
{
{
return
(
uchar
*
)
&
session_var
(
thd
,
LEX_STRING
);
return
(
uchar
*
)
&
session_var
(
thd
,
LEX_STRING
);
}
}
uchar
*
global_value_ptr
(
THD
*
thd
,
LEX_STRING
*
base
)
uchar
*
global_value_ptr
(
THD
*
thd
,
const
LEX_STRING
*
base
)
{
{
DBUG_ASSERT
(
FALSE
);
DBUG_ASSERT
(
FALSE
);
return
NULL
;
return
NULL
;
...
@@ -778,13 +778,13 @@ class Sys_var_dbug: public sys_var
...
@@ -778,13 +778,13 @@ class Sys_var_dbug: public sys_var
char
*
ptr
=
(
char
*
)(
intptr
)
option
.
def_value
;
char
*
ptr
=
(
char
*
)(
intptr
)
option
.
def_value
;
var
->
save_result
.
string_value
.
str
=
ptr
;
var
->
save_result
.
string_value
.
str
=
ptr
;
}
}
uchar
*
session_value_ptr
(
THD
*
thd
,
LEX_STRING
*
base
)
uchar
*
session_value_ptr
(
THD
*
thd
,
const
LEX_STRING
*
base
)
{
{
char
buf
[
256
];
char
buf
[
256
];
DBUG_EXPLAIN
(
buf
,
sizeof
(
buf
));
DBUG_EXPLAIN
(
buf
,
sizeof
(
buf
));
return
(
uchar
*
)
thd
->
strdup
(
buf
);
return
(
uchar
*
)
thd
->
strdup
(
buf
);
}
}
uchar
*
global_value_ptr
(
THD
*
thd
,
LEX_STRING
*
base
)
uchar
*
global_value_ptr
(
THD
*
thd
,
const
LEX_STRING
*
base
)
{
{
char
buf
[
256
];
char
buf
[
256
];
DBUG_EXPLAIN_INITIAL
(
buf
,
sizeof
(
buf
));
DBUG_EXPLAIN_INITIAL
(
buf
,
sizeof
(
buf
));
...
@@ -864,7 +864,7 @@ class Sys_var_keycache: public Sys_var_ulonglong
...
@@ -864,7 +864,7 @@ class Sys_var_keycache: public Sys_var_ulonglong
return
keycache_update
(
thd
,
key_cache
,
offset
,
new_value
);
return
keycache_update
(
thd
,
key_cache
,
offset
,
new_value
);
}
}
uchar
*
global_value_ptr
(
THD
*
thd
,
LEX_STRING
*
base
)
uchar
*
global_value_ptr
(
THD
*
thd
,
const
LEX_STRING
*
base
)
{
{
KEY_CACHE
*
key_cache
=
get_key_cache
(
base
);
KEY_CACHE
*
key_cache
=
get_key_cache
(
base
);
if
(
!
key_cache
)
if
(
!
key_cache
)
...
@@ -1049,7 +1049,7 @@ class Sys_var_max_user_conn: public Sys_var_int
...
@@ -1049,7 +1049,7 @@ class Sys_var_max_user_conn: public Sys_var_int
lock
,
binlog_status_arg
,
on_check_func
,
on_update_func
,
lock
,
binlog_status_arg
,
on_check_func
,
on_update_func
,
substitute
)
substitute
)
{
}
{
}
uchar
*
session_value_ptr
(
THD
*
thd
,
LEX_STRING
*
base
)
uchar
*
session_value_ptr
(
THD
*
thd
,
const
LEX_STRING
*
base
)
{
{
if
(
thd
->
user_connect
&&
thd
->
user_connect
->
user_resources
.
user_conn
)
if
(
thd
->
user_connect
&&
thd
->
user_connect
->
user_resources
.
user_conn
)
return
(
uchar
*
)
&
(
thd
->
user_connect
->
user_resources
.
user_conn
);
return
(
uchar
*
)
&
(
thd
->
user_connect
->
user_resources
.
user_conn
);
...
@@ -1164,12 +1164,12 @@ class Sys_var_flagset: public Sys_var_typelib
...
@@ -1164,12 +1164,12 @@ class Sys_var_flagset: public Sys_var_typelib
{
var
->
save_result
.
ulonglong_value
=
global_var
(
ulonglong
);
}
{
var
->
save_result
.
ulonglong_value
=
global_var
(
ulonglong
);
}
void
global_save_default
(
THD
*
thd
,
set_var
*
var
)
void
global_save_default
(
THD
*
thd
,
set_var
*
var
)
{
var
->
save_result
.
ulonglong_value
=
option
.
def_value
;
}
{
var
->
save_result
.
ulonglong_value
=
option
.
def_value
;
}
uchar
*
session_value_ptr
(
THD
*
thd
,
LEX_STRING
*
base
)
uchar
*
session_value_ptr
(
THD
*
thd
,
const
LEX_STRING
*
base
)
{
{
return
(
uchar
*
)
flagset_to_string
(
thd
,
0
,
session_var
(
thd
,
ulonglong
),
return
(
uchar
*
)
flagset_to_string
(
thd
,
0
,
session_var
(
thd
,
ulonglong
),
typelib
.
type_names
);
typelib
.
type_names
);
}
}
uchar
*
global_value_ptr
(
THD
*
thd
,
LEX_STRING
*
base
)
uchar
*
global_value_ptr
(
THD
*
thd
,
const
LEX_STRING
*
base
)
{
{
return
(
uchar
*
)
flagset_to_string
(
thd
,
0
,
global_var
(
ulonglong
),
return
(
uchar
*
)
flagset_to_string
(
thd
,
0
,
global_var
(
ulonglong
),
typelib
.
type_names
);
typelib
.
type_names
);
...
@@ -1265,12 +1265,12 @@ class Sys_var_set: public Sys_var_typelib
...
@@ -1265,12 +1265,12 @@ class Sys_var_set: public Sys_var_typelib
{
var
->
save_result
.
ulonglong_value
=
global_var
(
ulonglong
);
}
{
var
->
save_result
.
ulonglong_value
=
global_var
(
ulonglong
);
}
void
global_save_default
(
THD
*
thd
,
set_var
*
var
)
void
global_save_default
(
THD
*
thd
,
set_var
*
var
)
{
var
->
save_result
.
ulonglong_value
=
option
.
def_value
;
}
{
var
->
save_result
.
ulonglong_value
=
option
.
def_value
;
}
uchar
*
session_value_ptr
(
THD
*
thd
,
LEX_STRING
*
base
)
uchar
*
session_value_ptr
(
THD
*
thd
,
const
LEX_STRING
*
base
)
{
{
return
(
uchar
*
)
set_to_string
(
thd
,
0
,
session_var
(
thd
,
ulonglong
),
return
(
uchar
*
)
set_to_string
(
thd
,
0
,
session_var
(
thd
,
ulonglong
),
typelib
.
type_names
);
typelib
.
type_names
);
}
}
uchar
*
global_value_ptr
(
THD
*
thd
,
LEX_STRING
*
base
)
uchar
*
global_value_ptr
(
THD
*
thd
,
const
LEX_STRING
*
base
)
{
{
return
(
uchar
*
)
set_to_string
(
thd
,
0
,
global_var
(
ulonglong
),
return
(
uchar
*
)
set_to_string
(
thd
,
0
,
global_var
(
ulonglong
),
typelib
.
type_names
);
typelib
.
type_names
);
...
@@ -1389,13 +1389,13 @@ class Sys_var_plugin: public sys_var
...
@@ -1389,13 +1389,13 @@ class Sys_var_plugin: public sys_var
var
->
save_result
.
plugin
=
my_plugin_lock
(
thd
,
plugin
);
var
->
save_result
.
plugin
=
my_plugin_lock
(
thd
,
plugin
);
}
}
}
}
uchar
*
session_value_ptr
(
THD
*
thd
,
LEX_STRING
*
base
)
uchar
*
session_value_ptr
(
THD
*
thd
,
const
LEX_STRING
*
base
)
{
{
plugin_ref
plugin
=
session_var
(
thd
,
plugin_ref
);
plugin_ref
plugin
=
session_var
(
thd
,
plugin_ref
);
return
(
uchar
*
)(
plugin
?
thd
->
strmake
(
plugin_name
(
plugin
)
->
str
,
return
(
uchar
*
)(
plugin
?
thd
->
strmake
(
plugin_name
(
plugin
)
->
str
,
plugin_name
(
plugin
)
->
length
)
:
0
);
plugin_name
(
plugin
)
->
length
)
:
0
);
}
}
uchar
*
global_value_ptr
(
THD
*
thd
,
LEX_STRING
*
base
)
uchar
*
global_value_ptr
(
THD
*
thd
,
const
LEX_STRING
*
base
)
{
{
plugin_ref
plugin
=
global_var
(
plugin_ref
);
plugin_ref
plugin
=
global_var
(
plugin_ref
);
return
(
uchar
*
)(
plugin
?
thd
->
strmake
(
plugin_name
(
plugin
)
->
str
,
return
(
uchar
*
)(
plugin
?
thd
->
strmake
(
plugin_name
(
plugin
)
->
str
,
...
@@ -1456,12 +1456,12 @@ class Sys_var_debug_sync :public sys_var
...
@@ -1456,12 +1456,12 @@ class Sys_var_debug_sync :public sys_var
{
{
DBUG_ASSERT
(
FALSE
);
DBUG_ASSERT
(
FALSE
);
}
}
uchar
*
session_value_ptr
(
THD
*
thd
,
LEX_STRING
*
base
)
uchar
*
session_value_ptr
(
THD
*
thd
,
const
LEX_STRING
*
base
)
{
{
extern
uchar
*
debug_sync_value_ptr
(
THD
*
thd
);
extern
uchar
*
debug_sync_value_ptr
(
THD
*
thd
);
return
debug_sync_value_ptr
(
thd
);
return
debug_sync_value_ptr
(
thd
);
}
}
uchar
*
global_value_ptr
(
THD
*
thd
,
LEX_STRING
*
base
)
uchar
*
global_value_ptr
(
THD
*
thd
,
const
LEX_STRING
*
base
)
{
{
DBUG_ASSERT
(
FALSE
);
DBUG_ASSERT
(
FALSE
);
return
0
;
return
0
;
...
@@ -1536,13 +1536,13 @@ class Sys_var_bit: public Sys_var_typelib
...
@@ -1536,13 +1536,13 @@ class Sys_var_bit: public Sys_var_typelib
{
var
->
save_result
.
ulonglong_value
=
global_var
(
ulonglong
)
&
bitmask
;
}
{
var
->
save_result
.
ulonglong_value
=
global_var
(
ulonglong
)
&
bitmask
;
}
void
global_save_default
(
THD
*
thd
,
set_var
*
var
)
void
global_save_default
(
THD
*
thd
,
set_var
*
var
)
{
var
->
save_result
.
ulonglong_value
=
option
.
def_value
;
}
{
var
->
save_result
.
ulonglong_value
=
option
.
def_value
;
}
uchar
*
session_value_ptr
(
THD
*
thd
,
LEX_STRING
*
base
)
uchar
*
session_value_ptr
(
THD
*
thd
,
const
LEX_STRING
*
base
)
{
{
thd
->
sys_var_tmp
.
my_bool_value
=
reverse_semantics
^
thd
->
sys_var_tmp
.
my_bool_value
=
reverse_semantics
^
((
session_var
(
thd
,
ulonglong
)
&
bitmask
)
!=
0
);
((
session_var
(
thd
,
ulonglong
)
&
bitmask
)
!=
0
);
return
(
uchar
*
)
&
thd
->
sys_var_tmp
.
my_bool_value
;
return
(
uchar
*
)
&
thd
->
sys_var_tmp
.
my_bool_value
;
}
}
uchar
*
global_value_ptr
(
THD
*
thd
,
LEX_STRING
*
base
)
uchar
*
global_value_ptr
(
THD
*
thd
,
const
LEX_STRING
*
base
)
{
{
thd
->
sys_var_tmp
.
my_bool_value
=
reverse_semantics
^
thd
->
sys_var_tmp
.
my_bool_value
=
reverse_semantics
^
((
global_var
(
ulonglong
)
&
bitmask
)
!=
0
);
((
global_var
(
ulonglong
)
&
bitmask
)
!=
0
);
...
@@ -1602,12 +1602,12 @@ class Sys_var_session_special: public Sys_var_ulonglong
...
@@ -1602,12 +1602,12 @@ class Sys_var_session_special: public Sys_var_ulonglong
{
var
->
value
=
0
;
}
{
var
->
value
=
0
;
}
void
global_save_default
(
THD
*
thd
,
set_var
*
var
)
void
global_save_default
(
THD
*
thd
,
set_var
*
var
)
{
DBUG_ASSERT
(
FALSE
);
}
{
DBUG_ASSERT
(
FALSE
);
}
uchar
*
session_value_ptr
(
THD
*
thd
,
LEX_STRING
*
base
)
uchar
*
session_value_ptr
(
THD
*
thd
,
const
LEX_STRING
*
base
)
{
{
thd
->
sys_var_tmp
.
ulonglong_value
=
read_func
(
thd
);
thd
->
sys_var_tmp
.
ulonglong_value
=
read_func
(
thd
);
return
(
uchar
*
)
&
thd
->
sys_var_tmp
.
ulonglong_value
;
return
(
uchar
*
)
&
thd
->
sys_var_tmp
.
ulonglong_value
;
}
}
uchar
*
global_value_ptr
(
THD
*
thd
,
LEX_STRING
*
base
)
uchar
*
global_value_ptr
(
THD
*
thd
,
const
LEX_STRING
*
base
)
{
{
DBUG_ASSERT
(
FALSE
);
DBUG_ASSERT
(
FALSE
);
return
0
;
return
0
;
...
@@ -1652,12 +1652,12 @@ class Sys_var_session_special_double: public Sys_var_double
...
@@ -1652,12 +1652,12 @@ class Sys_var_session_special_double: public Sys_var_double
{
var
->
value
=
0
;
}
{
var
->
value
=
0
;
}
void
global_save_default
(
THD
*
thd
,
set_var
*
var
)
void
global_save_default
(
THD
*
thd
,
set_var
*
var
)
{
DBUG_ASSERT
(
FALSE
);
}
{
DBUG_ASSERT
(
FALSE
);
}
uchar
*
session_value_ptr
(
THD
*
thd
,
LEX_STRING
*
base
)
uchar
*
session_value_ptr
(
THD
*
thd
,
const
LEX_STRING
*
base
)
{
{
thd
->
sys_var_tmp
.
double_value
=
read_func
(
thd
);
thd
->
sys_var_tmp
.
double_value
=
read_func
(
thd
);
return
(
uchar
*
)
&
thd
->
sys_var_tmp
.
double_value
;
return
(
uchar
*
)
&
thd
->
sys_var_tmp
.
double_value
;
}
}
uchar
*
global_value_ptr
(
THD
*
thd
,
LEX_STRING
*
base
)
uchar
*
global_value_ptr
(
THD
*
thd
,
const
LEX_STRING
*
base
)
{
{
DBUG_ASSERT
(
FALSE
);
DBUG_ASSERT
(
FALSE
);
return
0
;
return
0
;
...
@@ -1715,12 +1715,12 @@ class Sys_var_have: public sys_var
...
@@ -1715,12 +1715,12 @@ class Sys_var_have: public sys_var
}
}
void
session_save_default
(
THD
*
thd
,
set_var
*
var
)
{
}
void
session_save_default
(
THD
*
thd
,
set_var
*
var
)
{
}
void
global_save_default
(
THD
*
thd
,
set_var
*
var
)
{
}
void
global_save_default
(
THD
*
thd
,
set_var
*
var
)
{
}
uchar
*
session_value_ptr
(
THD
*
thd
,
LEX_STRING
*
base
)
uchar
*
session_value_ptr
(
THD
*
thd
,
const
LEX_STRING
*
base
)
{
{
DBUG_ASSERT
(
FALSE
);
DBUG_ASSERT
(
FALSE
);
return
0
;
return
0
;
}
}
uchar
*
global_value_ptr
(
THD
*
thd
,
LEX_STRING
*
base
)
uchar
*
global_value_ptr
(
THD
*
thd
,
const
LEX_STRING
*
base
)
{
{
return
(
uchar
*
)
show_comp_option_name
[
global_var
(
enum
SHOW_COMP_OPTION
)];
return
(
uchar
*
)
show_comp_option_name
[
global_var
(
enum
SHOW_COMP_OPTION
)];
}
}
...
@@ -1790,12 +1790,12 @@ class Sys_var_struct: public sys_var
...
@@ -1790,12 +1790,12 @@ class Sys_var_struct: public sys_var
void
**
default_value
=
reinterpret_cast
<
void
**>
(
option
.
def_value
);
void
**
default_value
=
reinterpret_cast
<
void
**>
(
option
.
def_value
);
var
->
save_result
.
ptr
=
*
default_value
;
var
->
save_result
.
ptr
=
*
default_value
;
}
}
uchar
*
session_value_ptr
(
THD
*
thd
,
LEX_STRING
*
base
)
uchar
*
session_value_ptr
(
THD
*
thd
,
const
LEX_STRING
*
base
)
{
{
uchar
*
ptr
=
session_var
(
thd
,
uchar
*
);
uchar
*
ptr
=
session_var
(
thd
,
uchar
*
);
return
ptr
?
*
(
uchar
**
)(
ptr
+
name_offset
)
:
0
;
return
ptr
?
*
(
uchar
**
)(
ptr
+
name_offset
)
:
0
;
}
}
uchar
*
global_value_ptr
(
THD
*
thd
,
LEX_STRING
*
base
)
uchar
*
global_value_ptr
(
THD
*
thd
,
const
LEX_STRING
*
base
)
{
{
uchar
*
ptr
=
global_var
(
uchar
*
);
uchar
*
ptr
=
global_var
(
uchar
*
);
return
ptr
?
*
(
uchar
**
)(
ptr
+
name_offset
)
:
0
;
return
ptr
?
*
(
uchar
**
)(
ptr
+
name_offset
)
:
0
;
...
@@ -1868,7 +1868,7 @@ class Sys_var_tz: public sys_var
...
@@ -1868,7 +1868,7 @@ class Sys_var_tz: public sys_var
var
->
save_result
.
time_zone
=
var
->
save_result
.
time_zone
=
*
(
Time_zone
**
)(
intptr
)
option
.
def_value
;
*
(
Time_zone
**
)(
intptr
)
option
.
def_value
;
}
}
uchar
*
session_value_ptr
(
THD
*
thd
,
LEX_STRING
*
base
)
uchar
*
session_value_ptr
(
THD
*
thd
,
const
LEX_STRING
*
base
)
{
{
/*
/*
This is an ugly fix for replication: we don't replicate properly queries
This is an ugly fix for replication: we don't replicate properly queries
...
@@ -1881,7 +1881,7 @@ class Sys_var_tz: public sys_var
...
@@ -1881,7 +1881,7 @@ class Sys_var_tz: public sys_var
thd
->
time_zone_used
=
1
;
thd
->
time_zone_used
=
1
;
return
(
uchar
*
)(
session_var
(
thd
,
Time_zone
*
)
->
get_name
()
->
ptr
());
return
(
uchar
*
)(
session_var
(
thd
,
Time_zone
*
)
->
get_name
()
->
ptr
());
}
}
uchar
*
global_value_ptr
(
THD
*
thd
,
LEX_STRING
*
base
)
uchar
*
global_value_ptr
(
THD
*
thd
,
const
LEX_STRING
*
base
)
{
{
return
(
uchar
*
)(
global_var
(
Time_zone
*
)
->
get_name
()
->
ptr
());
return
(
uchar
*
)(
global_var
(
Time_zone
*
)
->
get_name
()
->
ptr
());
}
}
...
@@ -2015,7 +2015,7 @@ class Sys_var_multi_source_ulong :public Sys_var_ulong
...
@@ -2015,7 +2015,7 @@ class Sys_var_multi_source_ulong :public Sys_var_ulong
/* Use value given in variable declaration */
/* Use value given in variable declaration */
global_save_default
(
thd
,
var
);
global_save_default
(
thd
,
var
);
}
}
uchar
*
session_value_ptr
(
THD
*
thd
,
LEX_STRING
*
base
)
uchar
*
session_value_ptr
(
THD
*
thd
,
const
LEX_STRING
*
base
)
{
{
uint
*
tmp
,
res
;
uint
*
tmp
,
res
;
tmp
=
(
uint
*
)
(((
uchar
*
)
&
(
thd
->
variables
))
+
offset
);
tmp
=
(
uint
*
)
(((
uchar
*
)
&
(
thd
->
variables
))
+
offset
);
...
@@ -2023,7 +2023,7 @@ class Sys_var_multi_source_ulong :public Sys_var_ulong
...
@@ -2023,7 +2023,7 @@ class Sys_var_multi_source_ulong :public Sys_var_ulong
*
tmp
=
res
;
*
tmp
=
res
;
return
(
uchar
*
)
tmp
;
return
(
uchar
*
)
tmp
;
}
}
uchar
*
global_value_ptr
(
THD
*
thd
,
LEX_STRING
*
base
)
uchar
*
global_value_ptr
(
THD
*
thd
,
const
LEX_STRING
*
base
)
{
{
return
session_value_ptr
(
thd
,
base
);
return
session_value_ptr
(
thd
,
base
);
}
}
...
@@ -2073,12 +2073,12 @@ class Sys_var_gtid_current_pos: public sys_var
...
@@ -2073,12 +2073,12 @@ class Sys_var_gtid_current_pos: public sys_var
{
{
DBUG_ASSERT
(
false
);
DBUG_ASSERT
(
false
);
}
}
uchar
*
session_value_ptr
(
THD
*
thd
,
LEX_STRING
*
base
)
uchar
*
session_value_ptr
(
THD
*
thd
,
const
LEX_STRING
*
base
)
{
{
DBUG_ASSERT
(
false
);
DBUG_ASSERT
(
false
);
return
NULL
;
return
NULL
;
}
}
uchar
*
global_value_ptr
(
THD
*
thd
,
LEX_STRING
*
base
);
uchar
*
global_value_ptr
(
THD
*
thd
,
const
LEX_STRING
*
base
);
};
};
...
@@ -2120,12 +2120,12 @@ class Sys_var_gtid_binlog_pos: public sys_var
...
@@ -2120,12 +2120,12 @@ class Sys_var_gtid_binlog_pos: public sys_var
{
{
DBUG_ASSERT
(
false
);
DBUG_ASSERT
(
false
);
}
}
uchar
*
session_value_ptr
(
THD
*
thd
,
LEX_STRING
*
base
)
uchar
*
session_value_ptr
(
THD
*
thd
,
const
LEX_STRING
*
base
)
{
{
DBUG_ASSERT
(
false
);
DBUG_ASSERT
(
false
);
return
NULL
;
return
NULL
;
}
}
uchar
*
global_value_ptr
(
THD
*
thd
,
LEX_STRING
*
base
);
uchar
*
global_value_ptr
(
THD
*
thd
,
const
LEX_STRING
*
base
);
};
};
...
@@ -2160,12 +2160,12 @@ class Sys_var_gtid_slave_pos: public sys_var
...
@@ -2160,12 +2160,12 @@ class Sys_var_gtid_slave_pos: public sys_var
/* Record the attempt to use default so we can error. */
/* Record the attempt to use default so we can error. */
var
->
value
=
0
;
var
->
value
=
0
;
}
}
uchar
*
session_value_ptr
(
THD
*
thd
,
LEX_STRING
*
base
)
uchar
*
session_value_ptr
(
THD
*
thd
,
const
LEX_STRING
*
base
)
{
{
DBUG_ASSERT
(
false
);
DBUG_ASSERT
(
false
);
return
NULL
;
return
NULL
;
}
}
uchar
*
global_value_ptr
(
THD
*
thd
,
LEX_STRING
*
base
);
uchar
*
global_value_ptr
(
THD
*
thd
,
const
LEX_STRING
*
base
);
};
};
...
@@ -2200,12 +2200,12 @@ class Sys_var_gtid_binlog_state: public sys_var
...
@@ -2200,12 +2200,12 @@ class Sys_var_gtid_binlog_state: public sys_var
/* Record the attempt to use default so we can error. */
/* Record the attempt to use default so we can error. */
var
->
value
=
0
;
var
->
value
=
0
;
}
}
uchar
*
session_value_ptr
(
THD
*
thd
,
LEX_STRING
*
base
)
uchar
*
session_value_ptr
(
THD
*
thd
,
const
LEX_STRING
*
base
)
{
{
DBUG_ASSERT
(
false
);
DBUG_ASSERT
(
false
);
return
NULL
;
return
NULL
;
}
}
uchar
*
global_value_ptr
(
THD
*
thd
,
LEX_STRING
*
base
);
uchar
*
global_value_ptr
(
THD
*
thd
,
const
LEX_STRING
*
base
);
};
};
...
@@ -2246,8 +2246,8 @@ class Sys_var_last_gtid: public sys_var
...
@@ -2246,8 +2246,8 @@ class Sys_var_last_gtid: public sys_var
{
{
DBUG_ASSERT
(
false
);
DBUG_ASSERT
(
false
);
}
}
uchar
*
session_value_ptr
(
THD
*
thd
,
LEX_STRING
*
base
);
uchar
*
session_value_ptr
(
THD
*
thd
,
const
LEX_STRING
*
base
);
uchar
*
global_value_ptr
(
THD
*
thd
,
LEX_STRING
*
base
)
uchar
*
global_value_ptr
(
THD
*
thd
,
const
LEX_STRING
*
base
)
{
{
DBUG_ASSERT
(
false
);
DBUG_ASSERT
(
false
);
return
NULL
;
return
NULL
;
...
...
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