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
9025bcfb
Commit
9025bcfb
authored
18 years ago
by
mats@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge mkindahl@bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/bk/fix-mysql-5.0
parents
ffd8ea24
e57e8798
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
0 deletions
+20
-0
sql/slave.cc
sql/slave.cc
+20
-0
No files found.
sql/slave.cc
View file @
9025bcfb
...
...
@@ -1653,6 +1653,15 @@ int fetch_master_table(THD *thd, const char *db_name, const char *table_name,
if
(
connect_to_master
(
thd
,
mysql
,
mi
))
{
my_error
(
ER_CONNECT_TO_MASTER
,
MYF
(
0
),
mysql_error
(
mysql
));
/*
We need to clear the active VIO since, theoretically, somebody
might issue an awake() on this thread. If we are then in the
middle of closing and destroying the VIO inside the
mysql_close(), we will have a problem.
*/
#ifdef SIGNAL_WITH_VIO_CLOSE
thd
->
clear_active_vio
();
#endif
mysql_close
(
mysql
);
DBUG_RETURN
(
1
);
}
...
...
@@ -3709,6 +3718,17 @@ err:
VOID
(
pthread_mutex_unlock
(
&
LOCK_thread_count
));
if
(
mysql
)
{
/*
Here we need to clear the active VIO before closing the
connection with the master. The reason is that THD::awake()
might be called from terminate_slave_thread() because somebody
issued a STOP SLAVE. If that happends, the close_active_vio()
can be called in the middle of closing the VIO associated with
the 'mysql' object, causing a crash.
*/
#ifdef SIGNAL_WITH_VIO_CLOSE
thd
->
clear_active_vio
();
#endif
mysql_close
(
mysql
);
mi
->
mysql
=
0
;
}
...
...
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