Commit 858d8f0c authored by Marko Mäkelä's avatar Marko Mäkelä

Remove innodb_support_xa (deprecated in 5.7.10 and 10.2.)

parent dedb0220
SET @session_start_value = @@session.innodb_support_xa;
SELECT @session_start_value;
@session_start_value
1
SET @global_start_value = @@global.innodb_support_xa;
SELECT @global_start_value;
@global_start_value
1
'#--------------------FN_DYNVARS_046_01------------------------#'
SET @@session.innodb_support_xa = 0;
Warnings:
Warning 131 Using innodb_support_xa is deprecated and the parameter may be removed in future releases. Only innodb_support_xa=ON is allowed.
SET @@session.innodb_support_xa = DEFAULT;
Warnings:
Warning 131 Using innodb_support_xa is deprecated and the parameter may be removed in future releases.
SELECT @@session.innodb_support_xa;
@@session.innodb_support_xa
1
SET @@global.innodb_support_xa = 0;
Warnings:
Warning 131 Using innodb_support_xa is deprecated and the parameter may be removed in future releases. Only innodb_support_xa=ON is allowed.
SET @@global.innodb_support_xa = DEFAULT;
Warnings:
Warning 131 Using innodb_support_xa is deprecated and the parameter may be removed in future releases.
SELECT @@global.innodb_support_xa;
@@global.innodb_support_xa
1
'#---------------------FN_DYNVARS_046_02-------------------------#'
SET innodb_support_xa = 1;
Warnings:
Warning 131 Using innodb_support_xa is deprecated and the parameter may be removed in future releases.
SELECT @@innodb_support_xa;
@@innodb_support_xa
1
SELECT session.innodb_support_xa;
ERROR 42S02: Unknown table 'session' in field list
SELECT local.innodb_support_xa;
ERROR 42S02: Unknown table 'local' in field list
SELECT global.innodb_support_xa;
ERROR 42S02: Unknown table 'global' in field list
SET session innodb_support_xa = 0;
Warnings:
Warning 131 Using innodb_support_xa is deprecated and the parameter may be removed in future releases. Only innodb_support_xa=ON is allowed.
SELECT @@session.innodb_support_xa;
@@session.innodb_support_xa
1
SET global innodb_support_xa = 0;
Warnings:
Warning 131 Using innodb_support_xa is deprecated and the parameter may be removed in future releases. Only innodb_support_xa=ON is allowed.
SELECT @@global.innodb_support_xa;
@@global.innodb_support_xa
1
'#--------------------FN_DYNVARS_046_03------------------------#'
SET @@session.innodb_support_xa = 0;
Warnings:
Warning 131 Using innodb_support_xa is deprecated and the parameter may be removed in future releases. Only innodb_support_xa=ON is allowed.
SELECT @@session.innodb_support_xa;
@@session.innodb_support_xa
1
SET @@session.innodb_support_xa = 1;
Warnings:
Warning 131 Using innodb_support_xa is deprecated and the parameter may be removed in future releases.
SELECT @@session.innodb_support_xa;
@@session.innodb_support_xa
1
SET @@global.innodb_support_xa = 0;
Warnings:
Warning 131 Using innodb_support_xa is deprecated and the parameter may be removed in future releases. Only innodb_support_xa=ON is allowed.
SELECT @@global.innodb_support_xa;
@@global.innodb_support_xa
1
SET @@global.innodb_support_xa = 1;
Warnings:
Warning 131 Using innodb_support_xa is deprecated and the parameter may be removed in future releases.
SELECT @@global.innodb_support_xa;
@@global.innodb_support_xa
1
'#--------------------FN_DYNVARS_046_04-------------------------#'
SET @@session.innodb_support_xa = -0.6;
ERROR 42000: Incorrect argument type to variable 'innodb_support_xa'
SET @@session.innodb_support_xa = 1.6;
ERROR 42000: Incorrect argument type to variable 'innodb_support_xa'
SET @@session.innodb_support_xa = "T";
ERROR 42000: Variable 'innodb_support_xa' can't be set to the value of 'T'
SET @@session.innodb_support_xa = "Y";
ERROR 42000: Variable 'innodb_support_xa' can't be set to the value of 'Y'
SET @@session.innodb_support_xa = TRE;
ERROR 42000: Variable 'innodb_support_xa' can't be set to the value of 'TRE'
SET @@session.innodb_support_xa = N;
ERROR 42000: Variable 'innodb_support_xa' can't be set to the value of 'N'
SET @@session.innodb_support_xa = OF;
Warnings:
Warning 131 Using innodb_support_xa is deprecated and the parameter may be removed in future releases. Only innodb_support_xa=ON is allowed.
SELECT @@session.innodb_support_xa;
@@session.innodb_support_xa
1
SET @@session.innodb_support_xa = FF;
ERROR 42000: Variable 'innodb_support_xa' can't be set to the value of 'FF'
SET @@global.innodb_support_xa = -1;
ERROR 42000: Variable 'innodb_support_xa' can't be set to the value of '-1'
SELECT @@global.innodb_support_xa;
@@global.innodb_support_xa
1
SET @@global.innodb_support_xa = 2;
ERROR 42000: Variable 'innodb_support_xa' can't be set to the value of '2'
SET @@global.innodb_support_xa = "T";
ERROR 42000: Variable 'innodb_support_xa' can't be set to the value of 'T'
SET @@global.innodb_support_xa = "Y";
ERROR 42000: Variable 'innodb_support_xa' can't be set to the value of 'Y'
SET @@global.innodb_support_xa = TRE;
ERROR 42000: Variable 'innodb_support_xa' can't be set to the value of 'TRE'
SET @@global.innodb_support_xa = N;
ERROR 42000: Variable 'innodb_support_xa' can't be set to the value of 'N'
SET @@global.innodb_support_xa = OF;
Warnings:
Warning 131 Using innodb_support_xa is deprecated and the parameter may be removed in future releases. Only innodb_support_xa=ON is allowed.
SELECT @@global.innodb_support_xa;
@@global.innodb_support_xa
1
SET @@global.innodb_support_xa = FF;
ERROR 42000: Variable 'innodb_support_xa' can't be set to the value of 'FF'
'#-------------------FN_DYNVARS_046_05----------------------------#'
SET @@global.innodb_support_xa = 0;
Warnings:
Warning 131 Using innodb_support_xa is deprecated and the parameter may be removed in future releases. Only innodb_support_xa=ON is allowed.
SET @@session.innodb_support_xa = 1;
Warnings:
Warning 131 Using innodb_support_xa is deprecated and the parameter may be removed in future releases.
SELECT @@global.innodb_support_xa AS res_is_0;
res_is_0
1
SET @@global.innodb_support_xa = 0;
Warnings:
Warning 131 Using innodb_support_xa is deprecated and the parameter may be removed in future releases. Only innodb_support_xa=ON is allowed.
SELECT @@session.innodb_support_xa AS res_is_1;
res_is_1
1
'#----------------------FN_DYNVARS_046_06------------------------#'
SELECT IF(@@global.innodb_support_xa, "ON", "OFF") =
VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_support_xa';
IF(@@global.innodb_support_xa, "ON", "OFF") =
VARIABLE_VALUE
1
SELECT @@global.innodb_support_xa;
@@global.innodb_support_xa
1
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_support_xa';
VARIABLE_VALUE
ON
'#----------------------FN_DYNVARS_046_07------------------------#'
SELECT IF(@@session.innodb_support_xa, "ON", "OFF") =
VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_VARIABLES
WHERE VARIABLE_NAME='innodb_support_xa';
IF(@@session.innodb_support_xa, "ON", "OFF") =
VARIABLE_VALUE
1
SELECT @@session.innodb_support_xa;
@@session.innodb_support_xa
1
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_VARIABLES
WHERE VARIABLE_NAME='innodb_support_xa';
VARIABLE_VALUE
ON
'#---------------------FN_DYNVARS_046_08-------------------------#'
SET @@session.innodb_support_xa = OFF;
Warnings:
Warning 131 Using innodb_support_xa is deprecated and the parameter may be removed in future releases. Only innodb_support_xa=ON is allowed.
SELECT @@session.innodb_support_xa;
@@session.innodb_support_xa
1
SET @@session.innodb_support_xa = ON;
Warnings:
Warning 131 Using innodb_support_xa is deprecated and the parameter may be removed in future releases.
SELECT @@session.innodb_support_xa;
@@session.innodb_support_xa
1
SET @@global.innodb_support_xa = OFF;
Warnings:
Warning 131 Using innodb_support_xa is deprecated and the parameter may be removed in future releases. Only innodb_support_xa=ON is allowed.
SELECT @@global.innodb_support_xa;
@@global.innodb_support_xa
1
SET @@global.innodb_support_xa = ON;
Warnings:
Warning 131 Using innodb_support_xa is deprecated and the parameter may be removed in future releases.
SELECT @@global.innodb_support_xa;
@@global.innodb_support_xa
1
'#---------------------FN_DYNVARS_046_09----------------------#'
SET @@session.innodb_support_xa = TRUE;
Warnings:
Warning 131 Using innodb_support_xa is deprecated and the parameter may be removed in future releases.
SELECT @@session.innodb_support_xa;
@@session.innodb_support_xa
1
SET @@session.innodb_support_xa = FALSE;
Warnings:
Warning 131 Using innodb_support_xa is deprecated and the parameter may be removed in future releases. Only innodb_support_xa=ON is allowed.
SELECT @@session.innodb_support_xa;
@@session.innodb_support_xa
1
SET @@global.innodb_support_xa = TRUE;
Warnings:
Warning 131 Using innodb_support_xa is deprecated and the parameter may be removed in future releases.
SELECT @@global.innodb_support_xa;
@@global.innodb_support_xa
1
SET @@global.innodb_support_xa = FALSE;
Warnings:
Warning 131 Using innodb_support_xa is deprecated and the parameter may be removed in future releases. Only innodb_support_xa=ON is allowed.
SELECT @@global.innodb_support_xa;
@@global.innodb_support_xa
1
SET @@session.innodb_support_xa = @session_start_value;
Warnings:
Warning 131 Using innodb_support_xa is deprecated and the parameter may be removed in future releases.
SELECT @@session.innodb_support_xa;
@@session.innodb_support_xa
1
SET @@global.innodb_support_xa = @global_start_value;
Warnings:
Warning 131 Using innodb_support_xa is deprecated and the parameter may be removed in future releases.
SELECT @@global.innodb_support_xa;
@@global.innodb_support_xa
1
'#--------------------FN_DYNVARS_046_01-------------------------#'
SET @@global.innodb_support_xa = OFF;
Warnings:
Warning 131 Using innodb_support_xa is deprecated and the parameter may be removed in future releases. Only innodb_support_xa=ON is allowed.
connect con1,localhost,root,,,,;
connection con1;
SELECT @@global.innodb_support_xa;
@@global.innodb_support_xa
1
SELECT @@session.innodb_support_xa;
@@session.innodb_support_xa
1
disconnect con1;
'#--------------------FN_DYNVARS_046_01-------------------------#'
connection default;
SET @@global.innodb_support_xa = 1;
Warnings:
Warning 131 Using innodb_support_xa is deprecated and the parameter may be removed in future releases.
drop table if exists t1, t2;
create table t1 (a int) engine=innodb;
'---check when innodb_support_xa is 1---'
SET @@innodb_support_xa = 1;
Warnings:
Warning 131 Using innodb_support_xa is deprecated and the parameter may be removed in future releases.
xa start 'test1';
INSERT t1 values (10);
xa end 'test1';
xa prepare 'test1';
xa rollback 'test1';
SELECT * from t1;
a
'---check when innodb_support_xa is 0---'
SET @@innodb_support_xa = 0;
Warnings:
Warning 131 Using innodb_support_xa is deprecated and the parameter may be removed in future releases. Only innodb_support_xa=ON is allowed.
xa start 'test1';
INSERT t1 values (10);
xa end 'test1';
xa prepare 'test1';
xa rollback 'test1';
SELECT * from t1;
a
'------general xa testing--------'
SET @@global.innodb_support_xa = 1;
Warnings:
Warning 131 Using innodb_support_xa is deprecated and the parameter may be removed in future releases.
SET @@innodb_support_xa = 1;
Warnings:
Warning 131 Using innodb_support_xa is deprecated and the parameter may be removed in future releases.
xa start 'testa','testb';
INSERT t1 values (30);
COMMIT;
ERROR XAE07: XAER_RMFAIL: The command cannot be executed when global transaction is in the ACTIVE state
xa end 'testa','testb';
BEGIN;
ERROR XAE07: XAER_RMFAIL: The command cannot be executed when global transaction is in the IDLE state
CREATE table t2 (a int);
ERROR XAE07: XAER_RMFAIL: The command cannot be executed when global transaction is in the IDLE state
CONNECT con1,localhost,root,,,,;
connection con1;
xa start 'testa','testb';
ERROR XAE08: XAER_DUPID: The XID already exists
xa start 'testa','testb', 123;
ERROR XAE08: XAER_DUPID: The XID already exists
xa start 0x7465737462, 0x2030405060, 0xb;
INSERT t1 values (40);
xa end 'testb',' 0@P`',11;
xa prepare 'testb',0x2030405060,11;
START TRANSACTION;
ERROR XAE07: XAER_RMFAIL: The command cannot be executed when global transaction is in the PREPARED state
xa recover;
formatID gtrid_length bqual_length data
11 5 5 testb 0@P`
connection default;
xa prepare 'testa','testb';
xa recover;
formatID gtrid_length bqual_length data
11 5 5 testb 0@P`
1 5 5 testatestb
xa commit 'testb',0x2030405060,11;
ERROR XAE04: XAER_NOTA: Unknown XID
xa commit 'testa','testb';
connection con1;
xa rollback 'testb',0x2030405060,11;
SELECT * from t1;
a
30
DROP table t1;
...@@ -2260,20 +2260,6 @@ NUMERIC_BLOCK_SIZE NULL ...@@ -2260,20 +2260,6 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST OFF,ON ENUM_VALUE_LIST OFF,ON
READ_ONLY NO READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_SUPPORT_XA
SESSION_VALUE ON
GLOBAL_VALUE ON
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE ON
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Enable InnoDB support for the XA two-phase commit
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 INNODB_SYNC_ARRAY_SIZE VARIABLE_NAME INNODB_SYNC_ARRAY_SIZE
SESSION_VALUE NULL SESSION_VALUE NULL
GLOBAL_VALUE 1 GLOBAL_VALUE 1
......
################# mysql-test\t\innodb_support_xa_basic.test ###################
# #
# Variable Name: innodb_support_xa #
# Scope: GLOBAL | SESSION #
# Access Type: Dynamic #
# Data Type: boolean #
# Default Value: 1 #
# Range: 0,1 #
# #
# #
# Creation Date: 2008-02-20 #
# Author: Rizwan #
# #
# Description: Test Cases of Dynamic System Variable innodb_support_xa #
# that checks the behavior of this variable in the following ways#
# * Default Value #
# * Valid & Invalid values #
# * Scope & Access method #
# * Data Integrity #
# #
# Reference: http://dev.mysql.com/doc/refman/5.1/en/ #
# server-system-variables.html #
# #
###############################################################################
--source include/have_innodb.inc
--source include/load_sysvars.inc
########################################################################
# START OF innodb_support_xa TESTS #
########################################################################
################################################################################
# Saving initial value of innodb_support_xa in a temporary variable #
################################################################################
SET @session_start_value = @@session.innodb_support_xa;
SELECT @session_start_value;
SET @global_start_value = @@global.innodb_support_xa;
SELECT @global_start_value;
--echo '#--------------------FN_DYNVARS_046_01------------------------#'
########################################################################
# Display the DEFAULT value of innodb_support_xa #
########################################################################
SET @@session.innodb_support_xa = 0;
SET @@session.innodb_support_xa = DEFAULT;
SELECT @@session.innodb_support_xa;
SET @@global.innodb_support_xa = 0;
SET @@global.innodb_support_xa = DEFAULT;
SELECT @@global.innodb_support_xa;
--echo '#---------------------FN_DYNVARS_046_02-------------------------#'
##########################################################################
# Check if innodb_support_xa can be accessed with and without @@ sign #
##########################################################################
SET innodb_support_xa = 1;
SELECT @@innodb_support_xa;
--Error ER_UNKNOWN_TABLE
SELECT session.innodb_support_xa;
--Error ER_UNKNOWN_TABLE
SELECT local.innodb_support_xa;
--Error ER_UNKNOWN_TABLE
SELECT global.innodb_support_xa;
#using another syntax for accessing system variables
SET session innodb_support_xa = 0;
SELECT @@session.innodb_support_xa;
SET global innodb_support_xa = 0;
SELECT @@global.innodb_support_xa;
--echo '#--------------------FN_DYNVARS_046_03------------------------#'
##########################################################################
# change the value of innodb_support_xa to a valid value #
##########################################################################
# for session
SET @@session.innodb_support_xa = 0;
SELECT @@session.innodb_support_xa;
SET @@session.innodb_support_xa = 1;
SELECT @@session.innodb_support_xa;
# for global
SET @@global.innodb_support_xa = 0;
SELECT @@global.innodb_support_xa;
SET @@global.innodb_support_xa = 1;
SELECT @@global.innodb_support_xa;
--echo '#--------------------FN_DYNVARS_046_04-------------------------#'
###########################################################################
# Change the value of innodb_support_xa to invalid value #
###########################################################################
# for session
--Error ER_WRONG_TYPE_FOR_VAR
SET @@session.innodb_support_xa = -0.6;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@session.innodb_support_xa = 1.6;
--Error ER_WRONG_VALUE_FOR_VAR
SET @@session.innodb_support_xa = "T";
--Error ER_WRONG_VALUE_FOR_VAR
SET @@session.innodb_support_xa = "Y";
--Error ER_WRONG_VALUE_FOR_VAR
SET @@session.innodb_support_xa = TRE;
--Error ER_WRONG_VALUE_FOR_VAR
SET @@session.innodb_support_xa = N;
SET @@session.innodb_support_xa = OF;
SELECT @@session.innodb_support_xa;
--Error ER_WRONG_VALUE_FOR_VAR
SET @@session.innodb_support_xa = FF;
# for global
--Error ER_WRONG_VALUE_FOR_VAR
SET @@global.innodb_support_xa = -1;
SELECT @@global.innodb_support_xa;
--Error ER_WRONG_VALUE_FOR_VAR
SET @@global.innodb_support_xa = 2;
--Error ER_WRONG_VALUE_FOR_VAR
SET @@global.innodb_support_xa = "T";
--Error ER_WRONG_VALUE_FOR_VAR
SET @@global.innodb_support_xa = "Y";
--Error ER_WRONG_VALUE_FOR_VAR
SET @@global.innodb_support_xa = TRE;
--Error ER_WRONG_VALUE_FOR_VAR
SET @@global.innodb_support_xa = N;
SET @@global.innodb_support_xa = OF;
SELECT @@global.innodb_support_xa;
--Error ER_WRONG_VALUE_FOR_VAR
SET @@global.innodb_support_xa = FF;
--echo '#-------------------FN_DYNVARS_046_05----------------------------#'
###########################################################################
# Test if changing global variable effects session and vice versa #
###########################################################################
SET @@global.innodb_support_xa = 0;
SET @@session.innodb_support_xa = 1;
SELECT @@global.innodb_support_xa AS res_is_0;
SET @@global.innodb_support_xa = 0;
SELECT @@session.innodb_support_xa AS res_is_1;
--echo '#----------------------FN_DYNVARS_046_06------------------------#'
#########################################################################
# Check if the value in GLOBAL Table matches value in variable #
#########################################################################
--disable_warnings
SELECT IF(@@global.innodb_support_xa, "ON", "OFF") =
VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_support_xa';
--enable_warnings
SELECT @@global.innodb_support_xa;
--disable_warnings
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_support_xa';
--enable_warnings
--echo '#----------------------FN_DYNVARS_046_07------------------------#'
#########################################################################
# Check if the value in SESSION Table matches value in variable #
#########################################################################
--disable_warnings
SELECT IF(@@session.innodb_support_xa, "ON", "OFF") =
VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_VARIABLES
WHERE VARIABLE_NAME='innodb_support_xa';
--enable_warnings
SELECT @@session.innodb_support_xa;
--disable_warnings
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_VARIABLES
WHERE VARIABLE_NAME='innodb_support_xa';
--enable_warnings
--echo '#---------------------FN_DYNVARS_046_08-------------------------#'
###################################################################
# Check if ON and OFF values can be used on variable #
###################################################################
SET @@session.innodb_support_xa = OFF;
SELECT @@session.innodb_support_xa;
SET @@session.innodb_support_xa = ON;
SELECT @@session.innodb_support_xa;
SET @@global.innodb_support_xa = OFF;
SELECT @@global.innodb_support_xa;
SET @@global.innodb_support_xa = ON;
SELECT @@global.innodb_support_xa;
--echo '#---------------------FN_DYNVARS_046_09----------------------#'
###################################################################
# Check if TRUE and FALSE values can be used on variable #
###################################################################
SET @@session.innodb_support_xa = TRUE;
SELECT @@session.innodb_support_xa;
SET @@session.innodb_support_xa = FALSE;
SELECT @@session.innodb_support_xa;
SET @@global.innodb_support_xa = TRUE;
SELECT @@global.innodb_support_xa;
SET @@global.innodb_support_xa = FALSE;
SELECT @@global.innodb_support_xa;
##############################
# Restore initial value #
##############################
SET @@session.innodb_support_xa = @session_start_value;
SELECT @@session.innodb_support_xa;
SET @@global.innodb_support_xa = @global_start_value;
SELECT @@global.innodb_support_xa;
###############################################################
# END OF innodb_support_xa TESTS #
###############################################################
################# mysql-test\t\innodb_support_xa_func.test ###################
# #
# Variable Name: innodb_support_xa #
# Scope: GLOBAL | SESSION #
# Access Type: Dynamic #
# Data Type: boolean #
# Default Value: 1 #
# Range: 0,1 #
# #
# #
# Creation Date: 2008-03-08 #
# Author: Rizwan #
# #
# Description: Test Cases of Dynamic System Variable innodb_support_xa #
# that checks the behavior of this variable in the following ways#
# #
# Reference: http://dev.mysql.com/doc/refman/5.1/en/ #
# server-system-variables.html #
# #
###############################################################################
--source include/have_innodb.inc
--echo '#--------------------FN_DYNVARS_046_01-------------------------#'
####################################################################
# Check if setting innodb_support_xa is changed in new connection #
####################################################################
SET @@global.innodb_support_xa = OFF;
connect (con1,localhost,root,,,,);
connection con1;
SELECT @@global.innodb_support_xa;
SELECT @@session.innodb_support_xa;
disconnect con1;
--echo '#--------------------FN_DYNVARS_046_01-------------------------#'
###########################################################
# Begin the functionality Testing of innodb_support_xa #
###########################################################
connection default;
SET @@global.innodb_support_xa = 1;
--disable_warnings
drop table if exists t1, t2;
--enable_warnings
create table t1 (a int) engine=innodb;
#====================================================
--echo '---check when innodb_support_xa is 1---'
#====================================================
SET @@innodb_support_xa = 1;
xa start 'test1';
INSERT t1 values (10);
xa end 'test1';
xa prepare 'test1';
xa rollback 'test1';
SELECT * from t1;
#====================================================
--echo '---check when innodb_support_xa is 0---'
#====================================================
SET @@innodb_support_xa = 0;
#
xa start 'test1';
INSERT t1 values (10);
xa end 'test1';
xa prepare 'test1';
xa rollback 'test1';
SELECT * from t1;
#====================================================
--echo '------general xa testing--------'
#====================================================
SET @@global.innodb_support_xa = 1;
SET @@innodb_support_xa = 1;
xa start 'testa','testb';
INSERT t1 values (30);
--Error ER_XAER_RMFAIL
COMMIT;
xa end 'testa','testb';
--Error ER_XAER_RMFAIL
BEGIN;
--Error ER_XAER_RMFAIL
CREATE table t2 (a int);
CONNECT (con1,localhost,root,,,,);
connection con1;
--Error ER_XAER_DUPID
xa start 'testa','testb';
--Error ER_XAER_DUPID
xa start 'testa','testb', 123;
# gtrid [ , bqual [ , formatID ] ]
xa start 0x7465737462, 0x2030405060, 0xb;
INSERT t1 values (40);
xa end 'testb',' 0@P`',11;
xa prepare 'testb',0x2030405060,11;
--Error ER_XAER_RMFAIL
START TRANSACTION;
xa recover;
# uncomment the line below when binlog will be able to prepare
#disconnect con1;
CONNECTION default;
xa prepare 'testa','testb';
xa recover;
--Error ER_XAER_NOTA
xa commit 'testb',0x2030405060,11;
xa commit 'testa','testb';
CONNECTION con1;
xa rollback 'testb',0x2030405060,11;
SELECT * from t1;
DROP table t1;
########################################################
# End of functionality Testing for innodb_support_xa #
########################################################
...@@ -922,42 +922,6 @@ innodb_encrypt_tables_validate( ...@@ -922,42 +922,6 @@ innodb_encrypt_tables_validate(
static const char innobase_hton_name[]= "InnoDB"; static const char innobase_hton_name[]= "InnoDB";
static const char* deprecated_innodb_support_xa
= "Using innodb_support_xa is deprecated and the"
" parameter may be removed in future releases.";
static const char* deprecated_innodb_support_xa_off
= "Using innodb_support_xa is deprecated and the"
" parameter may be removed in future releases."
" Only innodb_support_xa=ON is allowed.";
/** Update the session variable innodb_support_xa.
@param[in] thd current session
@param[in] var the system variable innodb_support_xa
@param[in,out] var_ptr the contents of the variable
@param[in] save the to-be-updated value */
static
void
innodb_support_xa_update(
THD* thd,
struct st_mysql_sys_var* var,
void* var_ptr,
const void* save)
{
my_bool innodb_support_xa = *static_cast<const my_bool*>(save);
push_warning(thd, Sql_condition::WARN_LEVEL_WARN,
HA_ERR_WRONG_COMMAND,
innodb_support_xa
? deprecated_innodb_support_xa
: deprecated_innodb_support_xa_off);
}
static MYSQL_THDVAR_BOOL(support_xa, PLUGIN_VAR_OPCMDARG,
"Enable InnoDB support for the XA two-phase commit",
/* check_func */ NULL, innodb_support_xa_update,
/* default */ TRUE);
static MYSQL_THDVAR_BOOL(table_locks, PLUGIN_VAR_OPCMDARG, static MYSQL_THDVAR_BOOL(table_locks, PLUGIN_VAR_OPCMDARG,
"Enable InnoDB locking in LOCK TABLES", "Enable InnoDB locking in LOCK TABLES",
/* check_func */ NULL, /* update_func */ NULL, /* check_func */ NULL, /* update_func */ NULL,
...@@ -4129,11 +4093,6 @@ innobase_init( ...@@ -4129,11 +4093,6 @@ innobase_init(
ib::warn() << deprecated_large_prefix; ib::warn() << deprecated_large_prefix;
} }
if (!THDVAR(NULL, support_xa)) {
ib::warn() << deprecated_innodb_support_xa_off;
THDVAR(NULL, support_xa) = TRUE;
}
if (innobase_file_format_name != innodb_file_format_default) { if (innobase_file_format_name != innodb_file_format_default) {
ib::warn() << deprecated_file_format; ib::warn() << deprecated_file_format;
} }
...@@ -21870,7 +21829,6 @@ static struct st_mysql_sys_var* innobase_system_variables[]= { ...@@ -21870,7 +21829,6 @@ static struct st_mysql_sys_var* innobase_system_variables[]= {
MYSQL_SYSVAR(replication_delay), MYSQL_SYSVAR(replication_delay),
MYSQL_SYSVAR(status_file), MYSQL_SYSVAR(status_file),
MYSQL_SYSVAR(strict_mode), MYSQL_SYSVAR(strict_mode),
MYSQL_SYSVAR(support_xa),
MYSQL_SYSVAR(sort_buffer_size), MYSQL_SYSVAR(sort_buffer_size),
MYSQL_SYSVAR(online_alter_log_max_size), MYSQL_SYSVAR(online_alter_log_max_size),
MYSQL_SYSVAR(sync_spin_loops), MYSQL_SYSVAR(sync_spin_loops),
......
...@@ -1043,7 +1043,6 @@ struct trx_t { ...@@ -1043,7 +1043,6 @@ struct trx_t {
for secondary indexes when we decide for secondary indexes when we decide
if we can use the insert buffer for if we can use the insert buffer for
them, we set this FALSE */ them, we set this FALSE */
bool support_xa; /*!< normally we do the XA two-phase */
bool flush_log_later;/* In 2PC, we hold the bool flush_log_later;/* In 2PC, we hold the
prepare_commit mutex across prepare_commit mutex across
both phases. In that case, we both phases. In that case, we
......
...@@ -145,8 +145,6 @@ trx_init( ...@@ -145,8 +145,6 @@ trx_init(
trx->check_unique_secondary = true; trx->check_unique_secondary = true;
trx->support_xa = true;
trx->lock.n_rec_locks = 0; trx->lock.n_rec_locks = 0;
trx->dict_operation = TRX_DICT_OP_NONE; trx->dict_operation = TRX_DICT_OP_NONE;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment