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
4ed09d54
Commit
4ed09d54
authored
Feb 23, 2016
by
Arun Kuruvila
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
No commit message
No commit message
parent
447eaa5b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
3 deletions
+11
-3
storage/federated/ha_federated.cc
storage/federated/ha_federated.cc
+11
-3
No files found.
storage/federated/ha_federated.cc
View file @
4ed09d54
/* Copyright (c) 2004, 201
5
, Oracle and/or its affiliates. All rights reserved.
/* Copyright (c) 2004, 201
6
, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
...
...
@@ -1675,6 +1675,7 @@ int ha_federated::open(const char *name, int mode, uint test_if_locked)
int
ha_federated
::
close
(
void
)
{
THD
*
thd
=
current_thd
;
DBUG_ENTER
(
"ha_federated::close"
);
free_result
();
...
...
@@ -1686,7 +1687,7 @@ int ha_federated::close(void)
FLUSH TABLES will quit the connection and if connection is broken,
it will reconnect again and quit silently.
*/
if
(
mysql
&&
!
vio_is_connected
(
mysql
->
net
.
vio
))
if
(
mysql
&&
(
!
mysql
->
net
.
vio
||
!
vio_is_connected
(
mysql
->
net
.
vio
)
))
mysql
->
net
.
error
=
2
;
/* Disconnect from mysql */
...
...
@@ -1700,9 +1701,16 @@ int ha_federated::close(void)
if the original query was not issued against the FEDERATED table.
So, don't propagate errors from mysql_close().
*/
if
(
table
->
in_use
)
if
(
table
->
in_use
&&
thd
!=
table
->
in_use
)
table
->
in_use
->
clear_error
();
/*
Errors from mysql_close() are silently ignored for flush tables.
Close the connection silently.
*/
if
(
thd
&&
thd
->
lex
->
sql_command
==
SQLCOM_FLUSH
)
thd
->
clear_error
();
DBUG_RETURN
(
free_share
(
share
));
}
...
...
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