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
d8eba59d
Commit
d8eba59d
authored
Feb 03, 2015
by
Monty
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit one file that I forgot in last commit
parent
80ce0c1c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
43 deletions
+33
-43
.gitignore
.gitignore
+2
-1
sql/sys_vars.cc
sql/sys_vars.cc
+31
-42
No files found.
.gitignore
View file @
d8eba59d
*-t
*.a
*.ctest
*.o
*.reject
*.so
*.so.*
...
...
@@ -74,7 +75,7 @@ mariadb-*.*.*/
mysql-test/lib/My/SafeProcess/my_safe_process
mysql-test/mtr
mysql-test/mysql-test-run
mysql-test/var
/
mysql-test/var
mysys/thr_lock
mysys/thr_timer
packaging/rpm-oel/mysql.spec
...
...
sql/sys_vars.cc
View file @
d8eba59d
...
...
@@ -1877,7 +1877,6 @@ Sys_var_slave_parallel_mode::global_update(THD *thd, set_var *var)
ulonglong
new_value
=
var
->
save_result
.
ulonglong_value
;
LEX_STRING
*
base_name
=
&
var
->
base
;
Master_info
*
mi
;
ulonglong
*
value_ptr
;
bool
res
=
false
;
if
((
new_value
&
(
SLAVE_PARALLEL_FOLLOW_MASTER_COMMIT
|
SLAVE_PARALLEL_TRX
))
==
...
...
@@ -1894,7 +1893,9 @@ Sys_var_slave_parallel_mode::global_update(THD *thd, set_var *var)
mysql_mutex_lock
(
&
LOCK_active_mi
);
mi
=
master_info_index
->
get_master_info
(
base_name
,
Sql_condition
::
WARN_LEVEL_WARN
);
get_master_info
(
base_name
,
!
base_name
->
length
?
Sql_condition
::
WARN_LEVEL_ERROR
:
Sql_condition
::
WARN_LEVEL_WARN
);
if
(
mi
)
{
...
...
@@ -1908,24 +1909,23 @@ Sys_var_slave_parallel_mode::global_update(THD *thd, set_var *var)
{
mi
->
parallel_mode
=
new_value
;
if
(
!
base_name
->
length
)
{
/* Use as default value for new connections */
opt_slave_parallel_mode
=
new_value
;
}
}
}
mysql_mutex_unlock
(
&
LOCK_active_mi
);
mysql_mutex_lock
(
&
LOCK_global_system_variables
);
if
(
!
mi
)
{
my_error
(
WARN_NO_MASTER_INFO
,
MYF
(
0
),
base_name
->
length
,
base_name
->
str
);
return
true
;
}
return
res
;
}
uchar
*
Sys_var_slave_parallel_mode
::
global_value_ptr
(
THD
*
thd
,
const
LEX_STRING
*
base_name
)
Sys_var_slave_parallel_mode
::
global_value_ptr
(
THD
*
thd
,
const
LEX_STRING
*
base_name
)
{
Master_info
*
mi
;
ulonglong
val
=
opt_slave_parallel_mode
;
...
...
@@ -1937,18 +1937,17 @@ Sys_var_slave_parallel_mode::global_value_ptr(THD *thd, const LEX_STRING *base_n
mysql_mutex_lock
(
&
LOCK_active_mi
);
mi
=
master_info_index
->
get_master_info
(
base_name
,
Sql_condition
::
WARN_LEVEL_WARN
);
get_master_info
(
base_name
,
!
base_name
->
length
?
Sql_condition
::
WARN_LEVEL_ERROR
:
Sql_condition
::
WARN_LEVEL_WARN
);
if
(
mi
)
val
=
mi
->
parallel_mode
;
mysql_mutex_unlock
(
&
LOCK_active_mi
);
mysql_mutex_lock
(
&
LOCK_global_system_variables
);
if
(
!
mi
&&
base_name
->
length
)
{
my_error
(
WARN_NO_MASTER_INFO
,
MYF
(
0
),
base_name
->
length
,
base_name
->
str
);
return
NULL
;
}
if
(
!
mi
)
return
0
;
return
(
uchar
*
)
set_to_string
(
thd
,
0
,
val
,
typelib
.
type_names
);
}
...
...
@@ -4189,23 +4188,18 @@ bool Sys_var_rpl_filter::global_update(THD *thd, set_var *var)
{
bool
result
=
true
;
// Assume error
Master_info
*
mi
;
LEX_STRING
*
base_name
=
&
var
->
base
;
if
(
!
base_name
->
length
)
base_name
=
&
thd
->
variables
.
default_master_connection
;
mysql_mutex_unlock
(
&
LOCK_global_system_variables
);
mysql_mutex_lock
(
&
LOCK_active_mi
);
if
(
!
var
->
base
.
length
)
// no base name
{
mi
=
master_info_index
->
get_master_info
(
&
thd
->
variables
.
default_master_connection
,
Sql_condition
::
WARN_LEVEL_ERROR
);
}
else
// has base name
{
mi
=
master_info_index
->
get_master_info
(
&
var
->
base
,
Sql_condition
::
WARN_LEVEL_WARN
);
}
mi
=
master_info_index
->
get_master_info
(
base_name
,
!
base_name
->
length
?
Sql_condition
::
WARN_LEVEL_ERROR
:
Sql_condition
::
WARN_LEVEL_WARN
);
if
(
mi
)
{
if
(
mi
->
rli
.
slave_running
)
...
...
@@ -4229,7 +4223,7 @@ bool Sys_var_rpl_filter::global_update(THD *thd, set_var *var)
bool
Sys_var_rpl_filter
::
set_filter_value
(
const
char
*
value
,
Master_info
*
mi
)
{
bool
status
=
true
;
Rpl_filter
*
rpl_filter
=
mi
?
mi
->
rpl_filter
:
global_
rpl_filter
;
Rpl_filter
*
rpl_filter
=
mi
->
rpl_filter
;
switch
(
opt_id
)
{
case
OPT_REPLICATE_DO_DB
:
...
...
@@ -4255,7 +4249,8 @@ 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
,
const
LEX_STRING
*
base
)
uchar
*
Sys_var_rpl_filter
::
global_value_ptr
(
THD
*
thd
,
const
LEX_STRING
*
base_name
)
{
char
buf
[
256
];
String
tmp
(
buf
,
sizeof
(
buf
),
&
my_charset_bin
);
...
...
@@ -4265,18 +4260,12 @@ uchar *Sys_var_rpl_filter::global_value_ptr(THD *thd, const LEX_STRING *base)
mysql_mutex_unlock
(
&
LOCK_global_system_variables
);
mysql_mutex_lock
(
&
LOCK_active_mi
);
if
(
!
base
->
length
)
// no base name
{
mi
=
master_info_index
->
get_master_info
(
&
thd
->
variables
.
default_master_connection
,
Sql_condition
::
WARN_LEVEL_ERROR
);
}
else
// has base name
{
mi
=
master_info_index
->
get_master_info
(
base
,
Sql_condition
::
WARN_LEVEL_WARN
);
}
mi
=
master_info_index
->
get_master_info
(
base_name
,
!
base_name
->
length
?
Sql_condition
::
WARN_LEVEL_ERROR
:
Sql_condition
::
WARN_LEVEL_WARN
);
mysql_mutex_lock
(
&
LOCK_global_system_variables
);
if
(
!
mi
)
...
...
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