403Webshell
Server IP : 88.99.149.37  /  Your IP : 216.73.216.141
Web Server : nginx/1.31.2
System : Linux server-88-99-149-37 6.12.0-124.56.5.el10_1.x86_64 #1 SMP PREEMPT_DYNAMIC Fri May 15 06:12:08 EDT 2026 x86_64
User : muralimurth ( 1015)
PHP Version : 8.4.23
Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/local/mysql/mysql-test/suite/galera/t/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/local/mysql/mysql-test/suite/galera/t/galera_last_committed_id.test
#
# Tests functions WSREP_LAST_WRITTEN_GTID and WSREP_LAST_SEEN_GTID
#

--source include/galera_cluster.inc

# Returns domain-server-0 if no transactions have been run

SELECT WSREP_LAST_WRITTEN_GTID();

# WSREP_LAST_WRITTEN_GTID() should not be influenced by transactions written
# on other nodes or connections

--connection node_1
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);

--disable_query_log
--let $wsrep_last_written_id_conn_1 = `SELECT WSREP_LAST_WRITTEN_GTID()`
--enable_query_log

--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
--connection node_1a
--eval SELECT WSREP_LAST_WRITTEN_GTID() != '$wsrep_last_written_id_conn_1' AS wsrep_written_does_not_match_different_conn

--connection node_2
--eval SELECT WSREP_LAST_WRITTEN_GTID() != '$wsrep_last_written_id_conn_1' AS wsrep_written_does_not_match_different_nodes

# WSREP_LAST_SEEN_GTID() should be influenced by transactions written
# on other connections

--connection node_1
INSERT INTO t1 VALUES (1);
--disable_query_log
--let $wsrep_last_written_id_conn_1 = `SELECT WSREP_LAST_WRITTEN_GTID()`
--enable_query_log

--connection node_2
--disable_query_log
--eval SELECT WSREP_LAST_SEEN_GTID() = '$wsrep_last_written_id_conn_1' AS wsrep_last_written_seen_id_match
--enable_query_log

# Should not advance while a transaction is in progress

--connection node_1
SET AUTOCOMMIT=OFF;
START TRANSACTION;

--disable_query_log
--let $wsrep_last_written_id_before = `SELECT WSREP_LAST_WRITTEN_GTID()`
--enable_query_log
INSERT INTO t1 VALUES (1);
--disable_query_log
--eval SELECT WSREP_LAST_SEEN_GTID() = '$wsrep_last_written_id_before'
--eval SELECT WSREP_LAST_WRITTEN_GTID() = '$wsrep_last_written_id_before' AS wsrep_last_written_id_match
--enable_query_log

# Should only advance after the transaction has been commited

COMMIT;
--disable_query_log
--eval SELECT WSREP_LAST_WRITTEN_GTID() != 'wsrep_last_written_id_before' AS wsrep_last_written_id_advanced
--enable_query_log
SET AUTOCOMMIT=ON;

DROP TABLE t1;

--connection node_2
CALL mtr.add_suppression("Ignoring server id .* for non bootstrap node");

Youez - 2016 - github.com/yon3zu
LinuXploit