Server IP : 172.67.216.182 / Your IP : 162.158.190.81 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/binlog/t/ |
Upload File : |
# ==== Purpose ==== # # The fix for BUG#24398760 introduced an optimization on the assignment of # automatic GTIDs. The optimization keeps track of the last GNO assigned (let's # call it X) to a transaction and put X + 1 as the new free GNO to be assigned. # # The above mentioned will be true unless a transaction that owns a GTID with a # GNO smaller than the new free GNO to be assigned be rolled back. Then, the new # free GNO to be assigned should be the rolled back one. # # This test case creates a table (UUID:1) in a session, and starts a transaction # in another session specifying UUID:2 as GTID_NEXT. Then, on the first session, # it creates another transaction (UUID:3) and displays GTID_EXECUTED and # GTID_OWNED global variables. # # Finally, the test case rolls back the UUID:2 transaction, and creates a new # transaction with automatic GTID generation. It must be assigned with UUID:2. # # ==== Related Bugs and Worklogs ==== # # BUG#24398760 GTIDS REDUCE PERFORMANCE ON WORKLOADS WITH MANY SMALL # TRANSACTIONS # # This test case is binary log format agnostic --source include/have_binlog_format_row.inc --source include/have_gtid.inc RESET MASTER; --connect (conn1,127.0.0.1,root,,test,$MASTER_MYPORT,) --let $rpl_connection_name= conn1 --source include/rpl_connection.inc --let $uuid= `SELECT @@GLOBAL.SERVER_UUID` --let $session_id= `SELECT CONCAT("#", CONNECTION_ID())` --replace_result $uuid MASTER_UUID eval SET @@SESSION.GTID_NEXT = '$uuid:2'; BEGIN; --let $rpl_connection_name= default --source include/rpl_connection.inc CREATE TABLE t1 (a INT); #uuid:1 INSERT INTO t1 VALUES (1); #uuid:3 --replace_result $uuid MASTER_UUID $session_id \#SESSION_ID SELECT @@GLOBAL.GTID_EXECUTED, @@GLOBAL.GTID_OWNED; --let $rpl_connection_name= conn1 --source include/rpl_connection.inc ROLLBACK; --let $rpl_connection_name= default --source include/rpl_connection.inc INSERT INTO t1 VALUES (1); #uuid:2 --replace_result $uuid MASTER_UUID SELECT @@GLOBAL.GTID_EXECUTED, @@GLOBAL.GTID_OWNED; # Cleanup --disconnect conn1 DROP TABLE t1;