Server IP : 104.21.38.3 / Your IP : 162.158.88.15 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 : |
-- source include/have_ndb.inc -- source include/have_binlog_format_mixed_or_row.inc # # Test whether FLUSH LOGS flushes upto # session_last_committed_epoch to Binlog. # # Set Binlog size large enough to avoid size-based rotate SET @default_max_binlog_size = @@global.max_binlog_size; set global max_binlog_size=1048576; #1MB create table test.tn (b varchar(1000)) engine=ndb; # Method to generate load on NDB delimiter %; create procedure create_load(loops int) begin set @x = 0; repeat insert into tn values (repeat('C', 100)); insert into tn values (repeat('C', 100)); insert into tn values (repeat('C', 100)); insert into tn values (repeat('C', 100)); insert into tn values (repeat('C', 100)); insert into tn values (repeat('C', 100)); insert into tn values (repeat('C', 100)); insert into tn values (repeat('C', 100)); insert into tn values (repeat('C', 100)); insert into tn values (repeat('C', 100)); delete from tn; set @x = @x + 1; until @x = loops end repeat; end% delimiter ;% # Generate much load on NDB in order to make Binlog to lag behind --disable_result_log call create_load(20); --enable_result_log # Get the last committed epoch of the session --source ndb_binlog_init_epoch_vals.inc let $session_epoch= query_get_value(select @init_session_epoch as e, e, 1); # Flush Binlog FLUSH LOGS; # Get the maximum epoch written to Binlog let $max_epoch_after_flush = `select max(epoch) as epoch from mysql.ndb_binlog_index`; if ($max_epoch_after_flush < $session_epoch) { --echo --echo Max epoch found in Binlog after FLUSH LOGS ($max_epoch_after_flush) --echo is less than the last committed epoch of the session ($session_epoch) --echo die "FLUSH LOGS failed to flush upto the last committed epoch of the session"; } drop procedure create_load; drop table tn; set global max_binlog_size= @default_max_binlog_size;