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
ae293f9a
Commit
ae293f9a
authored
Oct 08, 2005
by
serg@serg.mylan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug #10942 "deadlock with FLUSH TABLES WITH READ LOCK + STOP SLAVE"
don't allow STOP SLAVE if global read lock is in taken
parent
aa74affb
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
1 deletion
+17
-1
mysql-test/r/rpl_flush_tables.result
mysql-test/r/rpl_flush_tables.result
+6
-0
mysql-test/t/rpl_flush_tables.test
mysql-test/t/rpl_flush_tables.test
+10
-0
sql/sql_parse.cc
sql/sql_parse.cc
+1
-1
No files found.
mysql-test/r/rpl_flush_tables.result
View file @
ae293f9a
...
@@ -38,3 +38,9 @@ master-bin.000001 461 Query 1 461 use `test`; rename table t1 to t5, t2 to t1
...
@@ -38,3 +38,9 @@ master-bin.000001 461 Query 1 461 use `test`; rename table t1 to t5, t2 to t1
master-bin.000001 527 Query 1 527 use `test`; flush tables
master-bin.000001 527 Query 1 527 use `test`; flush tables
select * from t3;
select * from t3;
a
a
stop slave;
drop table t1;
flush tables with read lock;
start slave;
stop slave;
ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
mysql-test/t/rpl_flush_tables.test
View file @
ae293f9a
...
@@ -37,4 +37,14 @@ select * from t3;
...
@@ -37,4 +37,14 @@ select * from t3;
# Note that all this confusion may cause warnings 'table xx is open on rename'
# Note that all this confusion may cause warnings 'table xx is open on rename'
# in the .err files; these are not fatal and are not reported by mysql-test-run.
# in the .err files; these are not fatal and are not reported by mysql-test-run.
stop
slave
;
connection
master
;
drop
table
t1
;
connection
slave
;
flush
tables
with
read
lock
;
start
slave
;
sleep
1
;
--
error
1192
stop
slave
;
# End of 4.1 tests
# End of 4.1 tests
sql/sql_parse.cc
View file @
ae293f9a
...
@@ -2601,7 +2601,7 @@ unsent_create_error:
...
@@ -2601,7 +2601,7 @@ unsent_create_error:
To prevent that, refuse SLAVE STOP if the
To prevent that, refuse SLAVE STOP if the
client thread has locked tables
client thread has locked tables
*/
*/
if
(
thd
->
locked_tables
||
thd
->
active_transaction
())
if
(
thd
->
locked_tables
||
thd
->
active_transaction
()
||
thd
->
global_read_lock
)
{
{
send_error
(
thd
,
ER_LOCK_OR_ACTIVE_TRANSACTION
);
send_error
(
thd
,
ER_LOCK_OR_ACTIVE_TRANSACTION
);
break
;
break
;
...
...
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