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
2610303b
Commit
2610303b
authored
Aug 25, 2003
by
guilhem@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge gbichot@bk-internal.mysql.com:/home/bk/mysql-4.0
into mysql.com:/home/mysql_src/mysql-4.0
parents
f5a134ba
cc294580
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
7 deletions
+30
-7
sql/slave.cc
sql/slave.cc
+6
-7
sql/slave.h
sql/slave.h
+24
-0
No files found.
sql/slave.cc
View file @
2610303b
...
...
@@ -1991,13 +1991,12 @@ static int init_slave_thread(THD* thd, SLAVE_THD_TYPE thd_type)
thd
->
priv_user
=
0
;
thd
->
slave_thread
=
1
;
thd
->
options
=
((
opt_log_slave_updates
)
?
OPTION_BIN_LOG
:
0
)
|
OPTION_AUTO_IS_NULL
|
/*
It's nonsense to constraint the slave threads with max_join_size; if a
query succeeded on master, we HAVE to execute it.
*/
OPTION_BIG_SELECTS
;
OPTION_AUTO_IS_NULL
;
/*
It's nonsense to constraint the slave threads with max_join_size; if a
query succeeded on master, we HAVE to execute it.
*/
thd
->
variables
.
max_join_size
=
HA_POS_ERROR
;
thd
->
client_capabilities
=
CLIENT_LOCAL_FILES
;
thd
->
real_id
=
pthread_self
();
pthread_mutex_lock
(
&
LOCK_thread_count
);
...
...
sql/slave.h
View file @
2610303b
...
...
@@ -24,6 +24,30 @@
having to re-read the master updates.
*/
/*
MUTEXES in replication:
LOCK_active_mi: this is meant for multimaster, when we can switch from a
master to another. It protects active_mi. We don't care of it for the moment,
as active_mi never moves (it's created at startup and deleted at shutdown, and
not changed: it always points to the same MASTER_INFO struct), because we
don't have multimaster. So for the moment, mi does not move, and mi->rli does
not either.
In MASTER_INFO: run_lock, data_lock
run_lock protects all information about the run state: slave_running, and the
existence of the I/O thread (to stop/start it, you need this mutex).
data_lock protects some moving members of the struct: counters (log name,
position) and relay log (MYSQL_LOG object).
In RELAY_LOG_INFO: run_lock, data_lock
see MASTER_INFO
In MYSQL_LOG: LOCK_log, LOCK_index of the binlog and the relay log
LOCK_log: when you write to it. LOCK_index: when you create/delete a binlog
(so that you have to update the .index file).
*/
extern
ulong
slave_net_timeout
,
master_retry_count
;
extern
MY_BITMAP
slave_error_mask
;
extern
bool
use_slave_mask
;
...
...
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