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
2a4a5d89
Commit
2a4a5d89
authored
Jan 12, 2015
by
Sergey Vojtovich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-7426 - federated.federated_server fails
Fixed error path of close_cached_connection_tables() to unlock mutex.
parent
517c5c9e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
7 deletions
+6
-7
mysql-test/t/AAA.test
mysql-test/t/AAA.test
+0
-1
sql/sql_base.cc
sql/sql_base.cc
+6
-6
No files found.
mysql-test/t/AAA.test
deleted
100644 → 0
View file @
517c5c9e
SELECT
1
;
sql/sql_base.cc
View file @
2a4a5d89
...
@@ -633,10 +633,7 @@ static my_bool close_cached_connection_tables_callback(
...
@@ -633,10 +633,7 @@ static my_bool close_cached_connection_tables_callback(
/* Ignore if table is not open or does not have a connect_string */
/* Ignore if table is not open or does not have a connect_string */
if
(
!
element
->
share
||
!
element
->
share
->
connect_string
.
length
||
if
(
!
element
->
share
||
!
element
->
share
->
connect_string
.
length
||
!
element
->
ref_count
)
!
element
->
ref_count
)
{
goto
end
;
mysql_mutex_unlock
(
&
element
->
LOCK_table_share
);
return
FALSE
;
}
/* Compare the connection string */
/* Compare the connection string */
if
(
arg
->
connection
&&
if
(
arg
->
connection
&&
...
@@ -646,20 +643,23 @@ static my_bool close_cached_connection_tables_callback(
...
@@ -646,20 +643,23 @@ static my_bool close_cached_connection_tables_callback(
element
->
share
->
connect_string
.
str
[
arg
->
connection
->
length
]
!=
'\\'
))
||
element
->
share
->
connect_string
.
str
[
arg
->
connection
->
length
]
!=
'\\'
))
||
strncasecmp
(
arg
->
connection
->
str
,
element
->
share
->
connect_string
.
str
,
strncasecmp
(
arg
->
connection
->
str
,
element
->
share
->
connect_string
.
str
,
arg
->
connection
->
length
)))
arg
->
connection
->
length
)))
return
FALSE
;
goto
end
;
/* close_cached_tables() only uses these elements */
/* close_cached_tables() only uses these elements */
if
(
!
(
tmp
=
(
TABLE_LIST
*
)
alloc_root
(
arg
->
thd
->
mem_root
,
sizeof
(
TABLE_LIST
)))
||
if
(
!
(
tmp
=
(
TABLE_LIST
*
)
alloc_root
(
arg
->
thd
->
mem_root
,
sizeof
(
TABLE_LIST
)))
||
!
(
tmp
->
db
=
strdup_root
(
arg
->
thd
->
mem_root
,
element
->
share
->
db
.
str
))
||
!
(
tmp
->
db
=
strdup_root
(
arg
->
thd
->
mem_root
,
element
->
share
->
db
.
str
))
||
!
(
tmp
->
table_name
=
strdup_root
(
arg
->
thd
->
mem_root
,
!
(
tmp
->
table_name
=
strdup_root
(
arg
->
thd
->
mem_root
,
element
->
share
->
table_name
.
str
)))
element
->
share
->
table_name
.
str
)))
{
mysql_mutex_unlock
(
&
element
->
LOCK_table_share
);
return
TRUE
;
return
TRUE
;
}
tmp
->
next_local
=
arg
->
tables
;
tmp
->
next_local
=
arg
->
tables
;
arg
->
tables
=
tmp
;
arg
->
tables
=
tmp
;
end:
mysql_mutex_unlock
(
&
element
->
LOCK_table_share
);
mysql_mutex_unlock
(
&
element
->
LOCK_table_share
);
return
FALSE
;
return
FALSE
;
}
}
...
...
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