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
497809d2
Commit
497809d2
authored
Feb 15, 2022
by
Vlad Lesin
Browse files
Options
Browse Files
Download
Plain Diff
Merge 10.5 into 10.6
parents
f2f22c38
5948d760
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
1 addition
and
71 deletions
+1
-71
mysql-test/suite/innodb/r/cursor-restore-non-locking-read.result
...est/suite/innodb/r/cursor-restore-non-locking-read.result
+0
-26
mysql-test/suite/innodb/t/cursor-restore-non-locking-read.test
...-test/suite/innodb/t/cursor-restore-non-locking-read.test
+0
-44
storage/innobase/row/row0sel.cc
storage/innobase/row/row0sel.cc
+1
-1
No files found.
mysql-test/suite/innodb/r/cursor-restore-non-locking-read.result
deleted
100644 → 0
View file @
f2f22c38
SET @saved_frequency = @@GLOBAL.innodb_purge_rseg_truncate_frequency;
SET GLOBAL innodb_purge_rseg_truncate_frequency=1;
CREATE TABLE t1 (pk int PRIMARY KEY, c int UNIQUE) ENGINE=InnoDB;
INSERT INTO t1 VALUES (10,10),(20,20),(30,30);
connect prevent_purge,localhost,root,,;
start transaction with consistent snapshot;
UPDATE t1 SET c=300 WHERE pk = 30;
connection default;
DELETE FROM t1 WHERE pk = 10;
INSERT INTO t1 VALUES(5,10);
SET DEBUG_SYNC = "row_search_clust_unlatched SIGNAL unlatched WAIT_FOR cont";
SELECT pk FROM t1 FORCE INDEX (c);
connect con1,localhost,root,,;
SET DEBUG_SYNC = "now WAIT_FOR unlatched";
disconnect prevent_purge;
InnoDB 1 transactions not purged
SET DEBUG_SYNC = 'now SIGNAL cont';
disconnect con1;
connection default;
pk
5
20
30
SET DEBUG_SYNC = 'RESET';
DROP TABLE t1;
SET GLOBAL innodb_purge_rseg_truncate_frequency = @saved_frequency;
mysql-test/suite/innodb/t/cursor-restore-non-locking-read.test
deleted
100644 → 0
View file @
f2f22c38
--
source
include
/
have_innodb
.
inc
--
source
include
/
have_debug
.
inc
--
source
include
/
have_debug_sync
.
inc
--
source
include
/
count_sessions
.
inc
SET
@
saved_frequency
=
@@
GLOBAL
.
innodb_purge_rseg_truncate_frequency
;
SET
GLOBAL
innodb_purge_rseg_truncate_frequency
=
1
;
CREATE
TABLE
t1
(
pk
int
PRIMARY
KEY
,
c
int
UNIQUE
)
ENGINE
=
InnoDB
;
INSERT
INTO
t1
VALUES
(
10
,
10
),(
20
,
20
),(
30
,
30
);
--
connect
(
prevent_purge
,
localhost
,
root
,,)
start
transaction
with
consistent
snapshot
;
# We need this to update page's transaction id for secondary index.
UPDATE
t1
SET
c
=
300
WHERE
pk
=
30
;
--
connection
default
DELETE
FROM
t1
WHERE
pk
=
10
;
INSERT
INTO
t1
VALUES
(
5
,
10
);
SET
DEBUG_SYNC
=
"row_search_clust_unlatched SIGNAL unlatched WAIT_FOR cont"
;
# With the above sync point row_search_mvcc() will be blocked on delete-marked
# record (10,10) in secondary index just after all page latches are released.
# After this record is purged, row_searc_mvcc() will be unblocked, and cursor
# will be restored to the secondary index record (10,5). As the unique field is
# the same as in the cursor's stored record, and the bug is not fixed, there
# value 5 will be doubled in the result set.
--
send
SELECT
pk
FROM
t1
FORCE
INDEX
(
c
)
--
connect
(
con1
,
localhost
,
root
,,)
SET
DEBUG_SYNC
=
"now WAIT_FOR unlatched"
;
--
disconnect
prevent_purge
let
$wait_all_purged
=
1
;
--
source
include
/
wait_all_purged
.
inc
SET
DEBUG_SYNC
=
'now SIGNAL cont'
;
--
disconnect
con1
--
connection
default
--
reap
SET
DEBUG_SYNC
=
'RESET'
;
DROP
TABLE
t1
;
SET
GLOBAL
innodb_purge_rseg_truncate_frequency
=
@
saved_frequency
;
--
source
include
/
wait_until_count_sessions
.
inc
storage/innobase/row/row0sel.cc
View file @
497809d2
...
...
@@ -5755,7 +5755,7 @@ row_search_mvcc(
btr_pcur_store_position
(
pcur
,
&
mtr
);
mtr
.
commit
();
mtr_has_extra_clust_latch
=
FALSE
;
DEBUG_SYNC_C
(
"row_search_clust_unlatched"
);
mtr
.
start
();
if
(
sel_restore_position_for_mysql
(
&
same_user_rec
,
...
...
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