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
063928ba
Commit
063928ba
authored
Apr 26, 2010
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
row_search_for_mysql(): Never try semi-consistent read in unique searches.
They are only useful in table scans. (Bug #52663)
parent
410afeaa
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
129 additions
and
0 deletions
+129
-0
mysql-test/suite/innodb/r/innodb_bug52663.result
mysql-test/suite/innodb/r/innodb_bug52663.result
+26
-0
mysql-test/suite/innodb/t/innodb_bug52663-master.opt
mysql-test/suite/innodb/t/innodb_bug52663-master.opt
+1
-0
mysql-test/suite/innodb/t/innodb_bug52663.test
mysql-test/suite/innodb/t/innodb_bug52663.test
+34
-0
mysql-test/suite/innodb_plugin/r/innodb_bug52663.result
mysql-test/suite/innodb_plugin/r/innodb_bug52663.result
+26
-0
mysql-test/suite/innodb_plugin/t/innodb_bug52663.test
mysql-test/suite/innodb_plugin/t/innodb_bug52663.test
+34
-0
storage/innobase/row/row0sel.c
storage/innobase/row/row0sel.c
+1
-0
storage/innodb_plugin/ChangeLog
storage/innodb_plugin/ChangeLog
+6
-0
storage/innodb_plugin/row/row0sel.c
storage/innodb_plugin/row/row0sel.c
+1
-0
No files found.
mysql-test/suite/innodb/r/innodb_bug52663.result
0 → 100644
View file @
063928ba
set session transaction isolation level read committed;
create table innodb_bug52663 (what varchar(5), id integer, count integer, primary key
(what, id)) engine=innodb;
insert into innodb_bug52663 values ('total', 0, 0);
begin;
set session transaction isolation level read committed;
begin;
update innodb_bug52663 set count = count + 1 where what = 'total' and id = 0;
select * from innodb_bug52663;
what id count
total 0 1
update innodb_bug52663 set count = count + 1 where what = 'total' and id = 0;
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
select * from innodb_bug52663;
what id count
total 0 0
commit;
update innodb_bug52663 set count = count + 1 where what = 'total' and id = 0;
commit;
select * from innodb_bug52663;
what id count
total 0 2
select * from innodb_bug52663;
what id count
total 0 2
drop table innodb_bug52663;
mysql-test/suite/innodb/t/innodb_bug52663-master.opt
0 → 100644
View file @
063928ba
--innodb_lock_wait_timeout=1
mysql-test/suite/innodb/t/innodb_bug52663.test
0 → 100644
View file @
063928ba
--
source
include
/
have_innodb
.
inc
set
session
transaction
isolation
level
read
committed
;
create
table
innodb_bug52663
(
what
varchar
(
5
),
id
integer
,
count
integer
,
primary
key
(
what
,
id
))
engine
=
innodb
;
insert
into
innodb_bug52663
values
(
'total'
,
0
,
0
);
begin
;
connect
(
addconroot
,
localhost
,
root
,,);
connection
addconroot
;
set
session
transaction
isolation
level
read
committed
;
begin
;
connection
default
;
update
innodb_bug52663
set
count
=
count
+
1
where
what
=
'total'
and
id
=
0
;
select
*
from
innodb_bug52663
;
connection
addconroot
;
--
error
ER_LOCK_WAIT_TIMEOUT
update
innodb_bug52663
set
count
=
count
+
1
where
what
=
'total'
and
id
=
0
;
select
*
from
innodb_bug52663
;
connection
default
;
commit
;
connection
addconroot
;
update
innodb_bug52663
set
count
=
count
+
1
where
what
=
'total'
and
id
=
0
;
commit
;
select
*
from
innodb_bug52663
;
connection
default
;
select
*
from
innodb_bug52663
;
drop
table
innodb_bug52663
;
mysql-test/suite/innodb_plugin/r/innodb_bug52663.result
0 → 100644
View file @
063928ba
set session transaction isolation level read committed;
create table innodb_bug52663 (what varchar(5), id integer, count integer, primary key
(what, id)) engine=innodb;
insert into innodb_bug52663 values ('total', 0, 0);
begin;
set session transaction isolation level read committed;
begin;
update innodb_bug52663 set count = count + 1 where what = 'total' and id = 0;
select * from innodb_bug52663;
what id count
total 0 1
update innodb_bug52663 set count = count + 1 where what = 'total' and id = 0;
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
select * from innodb_bug52663;
what id count
total 0 0
commit;
update innodb_bug52663 set count = count + 1 where what = 'total' and id = 0;
commit;
select * from innodb_bug52663;
what id count
total 0 2
select * from innodb_bug52663;
what id count
total 0 2
drop table innodb_bug52663;
mysql-test/suite/innodb_plugin/t/innodb_bug52663.test
0 → 100644
View file @
063928ba
--
source
include
/
have_innodb_plugin
.
inc
set
session
transaction
isolation
level
read
committed
;
create
table
innodb_bug52663
(
what
varchar
(
5
),
id
integer
,
count
integer
,
primary
key
(
what
,
id
))
engine
=
innodb
;
insert
into
innodb_bug52663
values
(
'total'
,
0
,
0
);
begin
;
connect
(
addconroot
,
localhost
,
root
,,);
connection
addconroot
;
set
session
transaction
isolation
level
read
committed
;
begin
;
connection
default
;
update
innodb_bug52663
set
count
=
count
+
1
where
what
=
'total'
and
id
=
0
;
select
*
from
innodb_bug52663
;
connection
addconroot
;
--
error
ER_LOCK_WAIT_TIMEOUT
update
innodb_bug52663
set
count
=
count
+
1
where
what
=
'total'
and
id
=
0
;
select
*
from
innodb_bug52663
;
connection
default
;
commit
;
connection
addconroot
;
update
innodb_bug52663
set
count
=
count
+
1
where
what
=
'total'
and
id
=
0
;
commit
;
select
*
from
innodb_bug52663
;
connection
default
;
select
*
from
innodb_bug52663
;
drop
table
innodb_bug52663
;
storage/innobase/row/row0sel.c
View file @
063928ba
...
...
@@ -3956,6 +3956,7 @@ row_search_for_mysql(
case
DB_LOCK_WAIT
:
if
(
UNIV_LIKELY
(
prebuilt
->
row_read_type
!=
ROW_READ_TRY_SEMI_CONSISTENT
)
||
unique_search
||
index
!=
clust_index
)
{
goto
lock_wait_or_error
;
...
...
storage/innodb_plugin/ChangeLog
View file @
063928ba
2010-04-26 The InnoDB Team
* row/row0sel.c:
Fix Bug#52663 Lost update incrementing column value under
READ COMMITTED isolation level
2010-04-22 The InnoDB Team
* include/dict0boot.h, dict/dict0boot.c:
...
...
storage/innodb_plugin/row/row0sel.c
View file @
063928ba
...
...
@@ -4027,6 +4027,7 @@ row_search_for_mysql(
case
DB_LOCK_WAIT
:
if
(
UNIV_LIKELY
(
prebuilt
->
row_read_type
!=
ROW_READ_TRY_SEMI_CONSISTENT
)
||
unique_search
||
index
!=
clust_index
)
{
goto
lock_wait_or_error
;
...
...
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