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
58f43459
Commit
58f43459
authored
Nov 18, 2009
by
Magne Mahre
Browse files
Options
Browse Files
Download
Plain Diff
merge
parents
3987c7ac
41ba4292
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
50 additions
and
0 deletions
+50
-0
mysql-test/r/delayed.result
mysql-test/r/delayed.result
+12
-0
mysql-test/t/delayed.test
mysql-test/t/delayed.test
+22
-0
sql/sql_insert.cc
sql/sql_insert.cc
+16
-0
No files found.
mysql-test/r/delayed.result
View file @
58f43459
...
...
@@ -310,4 +310,16 @@ a b
2 2
drop table t1;
set global low_priority_updates = @old_delayed_updates;
#
# Bug #47682 strange behaviour of INSERT DELAYED
#
DROP TABLE IF EXISTS t1, t2;
CREATE TABLE t1 (f1 integer);
CREATE TABLE t2 (f1 integer);
FLUSH TABLES WITH READ LOCK;
LOCK TABLES t1 READ;
INSERT DELAYED INTO t2 VALUES (1);
ERROR HY000: Can't execute the query because you have a conflicting read lock
UNLOCK TABLES;
DROP TABLE t1, t2;
End of 5.1 tests
mysql-test/t/delayed.test
View file @
58f43459
...
...
@@ -328,4 +328,26 @@ drop table t1;
set
global
low_priority_updates
=
@
old_delayed_updates
;
--
echo
#
--
echo
# Bug #47682 strange behaviour of INSERT DELAYED
--
echo
#
--
disable_warnings
DROP
TABLE
IF
EXISTS
t1
,
t2
;
--
enable_warnings
CREATE
TABLE
t1
(
f1
integer
);
CREATE
TABLE
t2
(
f1
integer
);
FLUSH
TABLES
WITH
READ
LOCK
;
LOCK
TABLES
t1
READ
;
--
error
ER_CANT_UPDATE_WITH_READLOCK
INSERT
DELAYED
INTO
t2
VALUES
(
1
);
UNLOCK
TABLES
;
DROP
TABLE
t1
,
t2
;
--
echo
End
of
5.1
tests
sql/sql_insert.cc
View file @
58f43459
...
...
@@ -500,6 +500,22 @@ bool open_and_lock_for_insert_delayed(THD *thd, TABLE_LIST *table_list)
DBUG_ENTER
(
"open_and_lock_for_insert_delayed"
);
#ifndef EMBEDDED_LIBRARY
if
(
thd
->
locked_tables
&&
thd
->
global_read_lock
)
{
/*
If this connection has the global read lock, the handler thread
will not be able to lock the table. It will wait for the global
read lock to go away, but this will never happen since the
connection thread will be stuck waiting for the handler thread
to open and lock the table.
If we are not in locked tables mode, INSERT will seek protection
against the global read lock (and fail), thus we will only get
to this point in locked tables mode.
*/
my_error
(
ER_CANT_UPDATE_WITH_READLOCK
,
MYF
(
0
));
DBUG_RETURN
(
TRUE
);
}
if
(
delayed_get_table
(
thd
,
table_list
))
DBUG_RETURN
(
TRUE
);
...
...
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