403Webshell
Server IP : 104.21.38.3  /  Your IP : 104.23.175.224
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/t/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /www/server/mysql/src/mysql-test/suite/ndb/t/ndb_backup_rate.test
# The include statement below is a temp one for tests that are yet to
#be ported to run with InnoDB,
#but needs to be kept for tests that would need MyISAM in future.
--source include/force_myisam_default.inc

-- source include/have_ndb.inc

# Valgrinding and debugging slows the mysqld down and thus making it
# impossible to fill the redo log of ndbd(s) -> skip test
--source include/not_valgrind.inc
--source include/have_nodebug.inc

use test;
create table t1 (a varchar(1024)) engine=ndb max_rows=100000000;
insert into t1 values (repeat('I', 1024));

# ~2kB : 1 row
insert into t1 select * from t1;

# ~64kB : 64 rows
insert into t1 select * from t1;
insert into t1 select * from t1;
insert into t1 select * from t1;
insert into t1 select * from t1;
insert into t1 select * from t1;

# ~1M : 1024 rows
insert into t1 select * from t1;
insert into t1 select * from t1;
insert into t1 select * from t1;
insert into t1 select * from t1;

#~8M : 8192 rows
insert into t1 select * from t1;
insert into t1 select * from t1;
insert into t1 select * from t1;

# Cache 8192 rows in temporary table in order
# to avoid scan during insert
create temporary table t1_8192(a varchar(1024));
insert into t1_8192 select * from t1 limit 8192;

# ~32M 
--error 0,1297
insert into t1 select * from t1_8192;
--error 0,1297
insert into t1 select * from t1_8192;
--error 0,1297
insert into t1 select * from t1_8192;

--echo Continuing insert/delete until redo is full

--disable_query_log
--disable_result_log
let $mysql_errno= 0;
let $counter= 100;
while (!$mysql_errno)
{
  --error 0,1297
  insert into t1 select * from t1_8192;

  if (!$mysql_errno)
  {
    if (!$counter)
    {
      die Failed waiting for redo log full;
    }
    dec $counter;

    # Delete the inserted rows to avoid table full
    # and of course creating even more REDO log
    --error 0,1297
    delete from t1 limit 8192;
  }
}
--enable_query_log
--enable_result_log

--echo Redo log full, waiting for redo log having space...

--disable_query_log
--disable_result_log

let $mysql_errno= 1;
let $counter= 600;
while ($mysql_errno)
{
  --error 0,1297
  insert into t1 select * from t1_8192;

  if ($mysql_errno)
  {
    if (!$counter)
    {
      die Failed waiting for redo log having space;
    }
    dec $counter;
    --sleep 0.1
  }
}
--enable_query_log
--enable_result_log

--echo Redo had space again.
  
drop table t1;
drop table t1_8192;

Youez - 2016 - github.com/yon3zu
LinuXploit