403Webshell
Server IP : 172.67.216.182  /  Your IP : 162.158.88.87
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_restore_compat_downward.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

######################################################################
# Test restoring backups of older/packed formats
######################################################################

-- source include/have_ndb.inc
-- source include/have_case_sensitive_file_system.inc

# Directory containing the saved backup files
let $backup_data_dir=$MYSQL_TEST_DIR/suite/ndb/backups;

# This test currently requires case sensitive file system as the tables
# are originally stored with uppercase

#
# Bug #18594 ndb_restore log boken in 5.1
#

--disable_warnings
DROP DATABASE IF EXISTS BANK;
--enable_warnings
CREATE DATABASE BANK default charset=latin1 default collate=latin1_bin;
--exec $NDB_RESTORE --no-defaults -b 1 -n 1 -p 1 -m -r $backup_data_dir/51 >> $NDB_TOOLS_OUTPUT
--exec $NDB_RESTORE --no-defaults -e -b 1 -n 2 -p 1 -r $backup_data_dir/51 >> $NDB_TOOLS_OUTPUT
USE BANK;
--sorted_result
SHOW TABLES;
SELECT * FROM GL            ORDER BY TIME,ACCOUNT_TYPE;
SELECT * FROM ACCOUNT       ORDER BY ACCOUNT_ID;
SELECT COUNT(*) FROM TRANSACTION;
SELECT * FROM SYSTEM_VALUES ORDER BY SYSTEM_VALUES_ID;
SELECT * FROM mysql.ndb_apply_status WHERE server_id=0;

# Check that force varpart is set by ndb_restore
--exec $NDB_DESC --no-defaults -d BANK GL | grep ForceVarPart
--exec $NDB_DESC --no-defaults -d BANK ACCOUNT | grep ForceVarPart
--exec $NDB_DESC --no-defaults -d BANK TRANSACTION | grep ForceVarPart
--exec $NDB_DESC --no-defaults -d BANK SYSTEM_VALUES | grep ForceVarPart
--exec $NDB_DESC --no-defaults -d BANK ACCOUNT_TYPE | grep ForceVarPart

#
# verify restore of 5.0 backup
# here we must use the already created tables as restoring the old
# table definitions will not work
#
TRUNCATE GL;
TRUNCATE ACCOUNT;
TRUNCATE TRANSACTION;
TRUNCATE SYSTEM_VALUES;
TRUNCATE ACCOUNT_TYPE;

# Check that force varpart is not changed by truncate
--exec $NDB_DESC --no-defaults -d BANK GL | grep ForceVarPart
--exec $NDB_DESC --no-defaults -d BANK ACCOUNT | grep ForceVarPart
--exec $NDB_DESC --no-defaults -d BANK TRANSACTION | grep ForceVarPart
--exec $NDB_DESC --no-defaults -d BANK SYSTEM_VALUES | grep ForceVarPart
--exec $NDB_DESC --no-defaults -d BANK ACCOUNT_TYPE | grep ForceVarPart

# Restore data
--exec $NDB_RESTORE --no-defaults -b 1 -n 1 -p 1 -r $backup_data_dir/50 >> $NDB_TOOLS_OUTPUT
--exec $NDB_RESTORE --no-defaults -e -b 1 -n 2 -p 1 -r $backup_data_dir/50 >> $NDB_TOOLS_OUTPUT

# Check data
SELECT * FROM GL            ORDER BY TIME,ACCOUNT_TYPE;
SELECT * FROM ACCOUNT       ORDER BY ACCOUNT_ID;
SELECT COUNT(*) FROM TRANSACTION;
SELECT * FROM SYSTEM_VALUES ORDER BY SYSTEM_VALUES_ID;
SELECT * FROM mysql.ndb_apply_status WHERE server_id=0;
--exec $NDB_RESTORE --no-defaults -b 2 -n 1 -m -p 1 -s -r $backup_data_dir/50 >> $NDB_TOOLS_OUTPUT
--exec $NDB_RESTORE --no-defaults -b 2 -n 2 -p 1 -s -r $backup_data_dir/50 >> $NDB_TOOLS_OUTPUT
SELECT * FROM DESCRIPTION ORDER BY USERNAME;
--exec $NDB_DESC --no-defaults -d BANK DESCRIPTION | grep SHORT_VAR
--exec $NDB_DESC --no-defaults -d BANK DESCRIPTION | grep MEDIUM_VAR

# Check backup in read-packed format
DROP TABLE GL;
DROP TABLE ACCOUNT;
DROP TABLE TRANSACTION;
DROP TABLE SYSTEM_VALUES;
DROP TABLE ACCOUNT_TYPE;

--exec $NDB_RESTORE --no-defaults -b 1 -n 2 -m $backup_data_dir/packed >> $NDB_TOOLS_OUTPUT
--exec $NDB_RESTORE --no-defaults -b 1 -n 2 -p 1 -r $backup_data_dir/packed >> $NDB_TOOLS_OUTPUT

SELECT * FROM GL            ORDER BY TIME,ACCOUNT_TYPE;
SELECT * FROM ACCOUNT       ORDER BY ACCOUNT_ID;
SELECT COUNT(*) FROM TRANSACTION;
SELECT * FROM SYSTEM_VALUES ORDER BY SYSTEM_VALUES_ID;

DROP DATABASE BANK;

USE test;
# hugo generated data...
select a,b,hex(b0),hex(b1),hex(b2),hex(b3),b4,hex(b5),b6,hex(b7) from t1 order by 1,2;
drop table t1;

# bug#54613

--error 1
--exec $NDB_RESTORE --no-defaults -b 2 -n 2 -m --core-file=0 --include-databases=ham --skip-unknown-objects $backup_data_dir/bug54613 >> $NDB_TOOLS_OUTPUT

--error 0
--exec $NDB_RESTORE --no-defaults -b 2 -n 2 -m --core-file=0 --include-databases=ham --skip-unknown-objects --skip-broken-objects $backup_data_dir/bug54613 >> $NDB_TOOLS_OUTPUT

Youez - 2016 - github.com/yon3zu
LinuXploit