mirror of
https://github.com/MariaDB/server.git
synced 2025-04-18 21:44:20 +03:00
Revert "MDEV-35019 Provide a way to enable "rollback XA on disconnect" behavior we had before 10.5.2"
This reverts commit 8ae462a220b6dee3f493de3cb2fecacfc6ae610c.
This commit is contained in:
parent
8ae462a220
commit
5ebda30ccc
@ -433,13 +433,6 @@ The following specify which files/extra groups are read (specified before remain
|
||||
--lc-time-names=name
|
||||
Set the language used for the month names and the days of
|
||||
the week.
|
||||
--legacy-xa-rollback-at-disconnect
|
||||
If a user session disconnects after putting a transaction
|
||||
into the XA PREPAREd state, roll back the transaction.
|
||||
Can be used for backwards compatibility to enable this
|
||||
pre-10.5 behavior for applications that expect it. Note
|
||||
that this violates the XA specification and should not be
|
||||
used for new code
|
||||
--local-infile Enable LOAD DATA LOCAL INFILE
|
||||
(Defaults to on; use --skip-local-infile to disable.)
|
||||
--lock-wait-timeout=#
|
||||
@ -1579,7 +1572,6 @@ large-pages FALSE
|
||||
lc-messages en_US
|
||||
lc-messages-dir MYSQL_SHAREDIR/
|
||||
lc-time-names en_US
|
||||
legacy-xa-rollback-at-disconnect FALSE
|
||||
local-infile TRUE
|
||||
lock-wait-timeout 86400
|
||||
log-bin foo
|
||||
|
@ -592,22 +592,6 @@ formatID gtrid_length bqual_length data
|
||||
xa rollback '4';
|
||||
ERROR XA100: XA_RBROLLBACK: Transaction branch was rolled back
|
||||
set @@global.read_only=@sav_read_only;
|
||||
# MDEV-35019: Provide a way to enable "rollback XA on disconnect" behavior we had before 10.5.2
|
||||
# Test legacy_xa_rollback_at_disconnect option.
|
||||
CREATE TABLE t1 (a INT PRIMARY KEY, b INT) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (1, 0);
|
||||
connect con1,localhost,root,,;
|
||||
SET SESSION legacy_xa_rollback_at_disconnect= 1;
|
||||
XA START '5';
|
||||
INSERT INTO t1 VALUES (2, 0);
|
||||
XA END '5';
|
||||
XA PREPARE '5';
|
||||
disconnect con1;
|
||||
connection default;
|
||||
INSERT INTO t1 VALUES (3, 0);
|
||||
XA ROLLBACK '5';
|
||||
ERROR XAE04: XAER_NOTA: Unknown XID
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# End of 10.5 tests
|
||||
#
|
||||
|
@ -747,25 +747,6 @@ xa rollback '4';
|
||||
set @@global.read_only=@sav_read_only;
|
||||
|
||||
|
||||
--echo # MDEV-35019: Provide a way to enable "rollback XA on disconnect" behavior we had before 10.5.2
|
||||
--echo # Test legacy_xa_rollback_at_disconnect option.
|
||||
CREATE TABLE t1 (a INT PRIMARY KEY, b INT) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (1, 0);
|
||||
connect (con1,localhost,root,,);
|
||||
SET SESSION legacy_xa_rollback_at_disconnect= 1;
|
||||
XA START '5';
|
||||
INSERT INTO t1 VALUES (2, 0);
|
||||
XA END '5';
|
||||
XA PREPARE '5';
|
||||
disconnect con1;
|
||||
|
||||
connection default;
|
||||
--source include/wait_until_count_sessions.inc
|
||||
INSERT INTO t1 VALUES (3, 0);
|
||||
--error ER_XAER_NOTA
|
||||
XA ROLLBACK '5';
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo #
|
||||
--echo # End of 10.5 tests
|
||||
--echo #
|
||||
|
@ -280,28 +280,4 @@ disconnect con1;
|
||||
connection master;
|
||||
xa commit '1';
|
||||
drop table t2, t1;
|
||||
# MDEV-35019 Provide a way to enable "rollback XA on disconnect" behavior we had before 10.5.2
|
||||
CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (1), (3);
|
||||
connect con1, localhost,root;
|
||||
SET SESSION legacy_xa_rollback_at_disconnect= 1;
|
||||
XA START '3';
|
||||
INSERT INTO t1 VALUES (2);
|
||||
XA END '3';
|
||||
XA PREPARE '3';
|
||||
disconnect con1;
|
||||
connection master;
|
||||
include/save_master_gtid.inc
|
||||
SELECT * FROM t1 ORDER BY a;
|
||||
a
|
||||
1
|
||||
3
|
||||
connection slave;
|
||||
include/sync_with_master_gtid.inc
|
||||
SELECT * FROM t1 ORDER BY a;
|
||||
a
|
||||
1
|
||||
3
|
||||
connection master;
|
||||
DROP TABLE t1;
|
||||
include/rpl_end.inc
|
||||
|
@ -289,30 +289,6 @@ disconnect con1;
|
||||
connection master;
|
||||
xa commit '1';
|
||||
drop table t2, t1;
|
||||
# MDEV-35019 Provide a way to enable "rollback XA on disconnect" behavior we had before 10.5.2
|
||||
CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (1), (3);
|
||||
connect con1, localhost,root;
|
||||
SET SESSION legacy_xa_rollback_at_disconnect= 1;
|
||||
XA START '3';
|
||||
INSERT INTO t1 VALUES (2);
|
||||
XA END '3';
|
||||
XA PREPARE '3';
|
||||
disconnect con1;
|
||||
connection master;
|
||||
include/save_master_gtid.inc
|
||||
SELECT * FROM t1 ORDER BY a;
|
||||
a
|
||||
1
|
||||
3
|
||||
connection slave;
|
||||
include/sync_with_master_gtid.inc
|
||||
SELECT * FROM t1 ORDER BY a;
|
||||
a
|
||||
1
|
||||
3
|
||||
connection master;
|
||||
DROP TABLE t1;
|
||||
connection slave;
|
||||
include/stop_slave.inc
|
||||
SET @@global.gtid_pos_auto_engines="";
|
||||
|
@ -434,26 +434,3 @@ disconnect con1;
|
||||
connection master;
|
||||
xa commit '1';
|
||||
drop table t2, t1;
|
||||
|
||||
--echo # MDEV-35019 Provide a way to enable "rollback XA on disconnect" behavior we had before 10.5.2
|
||||
CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (1), (3);
|
||||
|
||||
connect con1, localhost,root;
|
||||
SET SESSION legacy_xa_rollback_at_disconnect= 1;
|
||||
XA START '3';
|
||||
INSERT INTO t1 VALUES (2);
|
||||
XA END '3';
|
||||
XA PREPARE '3';
|
||||
--disconnect con1
|
||||
|
||||
--connection master
|
||||
--source include/save_master_gtid.inc
|
||||
SELECT * FROM t1 ORDER BY a;
|
||||
|
||||
--connection slave
|
||||
--source include/sync_with_master_gtid.inc
|
||||
SELECT * FROM t1 ORDER BY a;
|
||||
|
||||
--connection master
|
||||
DROP TABLE t1;
|
||||
|
@ -1532,16 +1532,6 @@ NUMERIC_BLOCK_SIZE NULL
|
||||
ENUM_VALUE_LIST NULL
|
||||
READ_ONLY NO
|
||||
COMMAND_LINE_ARGUMENT NULL
|
||||
VARIABLE_NAME LEGACY_XA_ROLLBACK_AT_DISCONNECT
|
||||
VARIABLE_SCOPE SESSION
|
||||
VARIABLE_TYPE BOOLEAN
|
||||
VARIABLE_COMMENT If a user session disconnects after putting a transaction into the XA PREPAREd state, roll back the transaction. Can be used for backwards compatibility to enable this pre-10.5 behavior for applications that expect it. Note that this violates the XA specification and should not be used for new code
|
||||
NUMERIC_MIN_VALUE NULL
|
||||
NUMERIC_MAX_VALUE NULL
|
||||
NUMERIC_BLOCK_SIZE NULL
|
||||
ENUM_VALUE_LIST OFF,ON
|
||||
READ_ONLY NO
|
||||
COMMAND_LINE_ARGUMENT OPTIONAL
|
||||
VARIABLE_NAME LICENSE
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
VARIABLE_TYPE VARCHAR
|
||||
|
@ -1642,16 +1642,6 @@ NUMERIC_BLOCK_SIZE NULL
|
||||
ENUM_VALUE_LIST NULL
|
||||
READ_ONLY NO
|
||||
COMMAND_LINE_ARGUMENT NULL
|
||||
VARIABLE_NAME LEGACY_XA_ROLLBACK_AT_DISCONNECT
|
||||
VARIABLE_SCOPE SESSION
|
||||
VARIABLE_TYPE BOOLEAN
|
||||
VARIABLE_COMMENT If a user session disconnects after putting a transaction into the XA PREPAREd state, roll back the transaction. Can be used for backwards compatibility to enable this pre-10.5 behavior for applications that expect it. Note that this violates the XA specification and should not be used for new code
|
||||
NUMERIC_MIN_VALUE NULL
|
||||
NUMERIC_MAX_VALUE NULL
|
||||
NUMERIC_BLOCK_SIZE NULL
|
||||
ENUM_VALUE_LIST OFF,ON
|
||||
READ_ONLY NO
|
||||
COMMAND_LINE_ARGUMENT OPTIONAL
|
||||
VARIABLE_NAME LICENSE
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
VARIABLE_TYPE VARCHAR
|
||||
|
@ -1553,12 +1553,7 @@ void THD::cleanup(void)
|
||||
close_temporary_tables();
|
||||
|
||||
if (transaction->xid_state.is_explicit_XA())
|
||||
{
|
||||
if (unlikely(variables.legacy_xa_rollback_at_disconnect))
|
||||
xa_trans_force_rollback(this);
|
||||
else
|
||||
trans_xa_detach(this);
|
||||
}
|
||||
trans_xa_detach(this);
|
||||
else
|
||||
trans_rollback(this);
|
||||
|
||||
|
@ -788,7 +788,6 @@ typedef struct system_variables
|
||||
my_bool binlog_annotate_row_events;
|
||||
my_bool binlog_direct_non_trans_update;
|
||||
my_bool column_compression_zlib_wrap;
|
||||
my_bool legacy_xa_rollback_at_disconnect;
|
||||
|
||||
plugin_ref table_plugin;
|
||||
plugin_ref tmp_table_plugin;
|
||||
|
@ -6788,13 +6788,3 @@ static Sys_var_ulonglong Sys_max_rowid_filter_size(
|
||||
SESSION_VAR(max_rowid_filter_size), CMD_LINE(REQUIRED_ARG),
|
||||
VALID_RANGE(1024, (ulonglong)~(intptr)0), DEFAULT(128*1024),
|
||||
BLOCK_SIZE(1));
|
||||
|
||||
static Sys_var_mybool Sys_legacy_xa_rollback_at_disconnect(
|
||||
"legacy_xa_rollback_at_disconnect",
|
||||
"If a user session disconnects after putting a transaction into the XA "
|
||||
"PREPAREd state, roll back the transaction. Can be used for backwards "
|
||||
"compatibility to enable this pre-10.5 behavior for applications that "
|
||||
"expect it. Note that this violates the XA specification and should not "
|
||||
"be used for new code",
|
||||
SESSION_VAR(legacy_xa_rollback_at_disconnect), CMD_LINE(OPT_ARG),
|
||||
DEFAULT(FALSE), NO_MUTEX_GUARD, NOT_IN_BINLOG);
|
||||
|
1
sql/xa.h
1
sql/xa.h
@ -46,7 +46,6 @@ bool xid_cache_insert(XID *xid);
|
||||
bool xid_cache_insert(THD *thd, XID_STATE *xid_state, XID *xid);
|
||||
void xid_cache_delete(THD *thd, XID_STATE *xid_state);
|
||||
|
||||
bool xa_trans_force_rollback(THD *thd);
|
||||
bool trans_xa_start(THD *thd);
|
||||
bool trans_xa_end(THD *thd);
|
||||
bool trans_xa_prepare(THD *thd);
|
||||
|
Loading…
x
Reference in New Issue
Block a user