403Webshell
Server IP : 104.21.38.3  /  Your IP : 108.162.226.233
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_rbwr.inc
#
# Test for read before write removal(rbwr) optimization in MySQL Cluster
#  - Run one testcase using different setttings
#

let $counter = 2;
while($counter)
{

  # Load data into test table
  eval insert into $test_table select * from data_$test_table;

  # Create reference table
  eval create table ref_$test_table engine=innodb select * from $test_table;

  # Run the query against reference table
  let $test_query_ref =
    `SELECT REPLACE('$test_query', '$test_table', 'ref_$test_table')`;
  eval $test_query_ref;

  # Save ndb_execute_count from before query
  let $before = query_get_value(
    select VARIABLE_VALUE from information_schema.session_status
      where variable_name like 'NDB_EXECUTE_COUNT', VARIABLE_VALUE, 1);

  let $transaction = 0;
  if ($counter == 2)
  {
    # Run within transaction, this may cause one more execute
    let $transaction = 1;
    begin;
  }

  # Run the query
  --enable_info
  eval $test_query;
  --disable_info

  if ($counter == 2)
  {
    # Commit the transaction
    commit;
  }

  # Calculate number of ndb_execute_count's generated by query
  let $diff = query_get_value(
    select VARIABLE_VALUE-$before AS diff from information_schema.session_status
      where variable_name like 'NDB_EXECUTE_COUNT', diff, 1);

  if ($transaction)
  {
    # Check if $diff should be decreased to compensate for the
    # execute caused by using transaction
    if ($diff != $test_execute_count)
    {
      dec $diff;
    }
  }

  if ($diff != $test_execute_count)
  {
    --echo !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    --echo Unxpected ndb_execute_count detected
    --echo  - actual ndb_execute_count: $diff
    --echo  - expected ndb_execute_count: $test_execute_count
    --echo  - query: '$test_query'
    --echo  - Within transaction: $transaction
    --echo !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    let $ndb_rbwr_fail = 1;
  }

  # Compare data in test table against reference table
  let $ndb_diff_tables= $test_table, ref_$test_table;
  --source suite/ndb/include/ndb_diff_tables.inc

  # Cleanup
  eval delete from $test_table;
  eval drop table ref_$test_table;

  dec $counter;

}

Youez - 2016 - github.com/yon3zu
LinuXploit