Server IP : 104.21.38.3 / Your IP : 172.71.124.68 Web Server : Apache System : Linux krdc-ubuntu-s-2vcpu-4gb-amd-blr1-01.localdomain 5.15.0-142-generic #152-Ubuntu SMP Mon May 19 10:54:31 UTC 2025 x86_64 User : www ( 1000) PHP Version : 7.4.33 Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /www/server/mysql/src/mysql-test/suite/sys_vars/t/ |
Upload File : |
################# 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 --source include/count_sessions.inc --echo '#--------------------FN_DYNVARS_046_01-------------------------#' #################################################################### # Check if setting innodb_support_xa is changed in new connection # #################################################################### SET @@global.innodb_support_xa = OFF; --echo 'connect (con1,localhost,root,,,,)' connect (con1,localhost,root,,,,); --echo 'connection con1' 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 # ########################################################### --echo 'connection default' 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); --echo 'connect (con1,localhost,root,,,,)' CONNECT (con1,localhost,root,,,,); --echo 'connection con1' 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; --echo 'connection default' CONNECTION default; xa prepare 'testa','testb'; xa recover; --Error ER_XAER_RMFAIL xa commit 'testb',0x2030405060,11; xa commit 'testa','testb'; --echo 'connection con1' CONNECTION con1; xa rollback 'testb',0x2030405060,11; SELECT * from t1; disconnect con1; connection default; DROP table t1; --source include/wait_until_count_sessions.inc ######################################################## # End of functionality Testing for innodb_support_xa # ########################################################