Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
-
10.6
-
None
Description
Currently execution of
commit in one phase proceeds to commit by engines when binlog_commit() does not succeed.
There are two issues with that:
1. absence of binlog_rollback() or lower-level `binlog_cache_data::reset()` along the following execution of the failing statement eventually will raise an assert on non-empty binlog cache;
2. engines, including ones that are rollback capable, commit in this particular error situation.
P.1,2 can be verified with the following mtr script
source include/have_innodb.inc;
|
source include/have_log_bin.inc;
|
|
create table ta (a int) engine=aria; |
create table ti (a int) engine=innodb; |
delimiter |;
|
|
create function f_ia()
|
returns integer
|
begin
|
insert into ti set a=1; |
insert into ta set a=1; |
return 1; |
end |
|
delimiter ;|
|
|
set @@global.gtid_strict_mode=0; set @@session.gtid_seq_no=1; |
set @@global.gtid_strict_mode=1; |
--replace_regex /GTID 1-1-[0-9]+/GTID VALUE/ |
--error ER_GTID_STRICT_OUT_OF_ORDER
|
set statement binlog_format=row FOR create table f_x (a int) select f_ia() as a; |
|
# --error assert(sql/log.cc:1712(binlog_close_connection)) |
# --disconnect default |
|
Attachments
Issue Links
- relates to
-
MDEV-35207 ignored error at binlogging by CREATE-TABLE-SELECT leads to assert
-
- Closed
-
Activity
Field | Original Value | New Value |
---|---|---|
Link |
This issue relates to |
Affects Version/s | 10.6 [ 24028 ] |
Fix Version/s | 10.6 [ 24028 ] |
Status | Open [ 1 ] | In Progress [ 3 ] |
Assignee | Andrei Elkin [ elkin ] | Sergei Golubchik [ serg ] |
Status | In Progress [ 3 ] | In Review [ 10002 ] |
Priority | Major [ 3 ] | Critical [ 2 ] |
Assignee | Sergei Golubchik [ serg ] | Andrei Elkin [ elkin ] |
Status | In Review [ 10002 ] | Stalled [ 10000 ] |
Status | Stalled [ 10000 ] | In Progress [ 3 ] |
Assignee | Andrei Elkin [ elkin ] | Sergei Golubchik [ serg ] |
Status | In Progress [ 3 ] | In Review [ 10002 ] |
Assignee | Sergei Golubchik [ serg ] | Andrei Elkin [ elkin ] |
Assignee | Andrei Elkin [ elkin ] | Sergei Golubchik [ serg ] |
Assignee | Sergei Golubchik [ serg ] | Andrei Elkin [ elkin ] |
Status | In Review [ 10002 ] | Stalled [ 10000 ] |
Status | Stalled [ 10000 ] | In Progress [ 3 ] |
Component/s | Replication [ 10100 ] | |
Component/s | Server [ 13907 ] | |
Fix Version/s | 10.11.12 [ 29998 ] | |
Fix Version/s | 11.4.6 [ 29999 ] | |
Fix Version/s | 11.8.2 [ 30001 ] | |
Fix Version/s | 10.6 [ 24028 ] | |
Resolution | Fixed [ 1 ] | |
Status | In Progress [ 3 ] | Closed [ 6 ] |
Howdy Sergei.
While I offer a patch that tries to undo as much as it's possible I am not really sure that's the way to go. My doubt remains as it's one-phase commit, we may stick to any resolution
.
that satisfy the assert of p.1 description - so a binlog_cache_data::reset() could be done instead.
Anyway my sympathy lies with the patch