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

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /www/server/mysql/src/mysql-test/suite/innodb/t/file_format_upgrade_16k.test
--source include/have_innodb.inc
# In old versions that wrote garbage into files, the page size was 16k.
--source include/have_innodb_16k.inc
# Embedded server does not support restarting.
--source include/not_embedded.inc

--echo #
--echo # Bug#20691930 5.7.6 CRASH WHEN RUNNING MYSQL_UPGRADE
--echo # AFTER BINARY UPGRADE
--echo #

CREATE TABLE t (a int primary key, b char(255) not null default '', index(b))
ENGINE=InnoDB;

INSERT t(a) VALUES(1),(2),(3),(4),(5),(6),(7),(8);
let $MYSQLD_DATADIR=`select @@datadir`;
let IBD_FILE=$MYSQLD_DATADIR/test/t.ibd;
let IBD_PAGE_SIZE=`select @@innodb_page_size`;

--source include/shutdown_mysqld.inc
perl;
use strict;
use warnings;
use Fcntl qw(:DEFAULT :seek);
my $file = $ENV{IBD_FILE};
my $size = $ENV{IBD_PAGE_SIZE};
sysopen FILE, $file, O_RDWR || die "Unable to open $file: $!";
die "Unable to read $file: $!" unless sysread(FILE, $_, $size*3) == $size*3;
my $ck = pack("H*", "DEADBEEF");
my $type = pack("H*", "45BF"); # FIL_PAGE_INDEX
my $payload = $size-26-8;
# Change each page type to FIL_PAGE_INDEX, and rewrite the checksum.
s/....(.{16})(....)..(.{$payload})......../$ck.$1.$2.$type.$3.$ck.$2/ges;
sysseek(FILE, 0, SEEK_SET) || die "Unable to seek $file: $!";
syswrite(FILE, $_, $size * 3) || warn "Unable to write $file: $!";
close(FILE) || die "Unable to close $file: $!";
EOF

--source include/start_mysqld.inc

INSERT t(a) SELECT a+8 FROM t;
INSERT t(a) SELECT a+16 FROM t;
INSERT t(a) SELECT a+32 FROM t;
INSERT t(a) SELECT a+64 FROM t;
--source include/shutdown_mysqld.inc
perl;
use strict;
use warnings;
my $file = $ENV{IBD_FILE};
my $size = $ENV{IBD_PAGE_SIZE};
open(FILE, "<$file") || die "Unable to open $file: $!";
die "Unable to read $file: $!" unless read(FILE, $_, $size*4) == $size*4;
my $payload = $size-26;
s/.{24}(..).{$payload}/$1/ges;
print "# Page types: ", unpack("H*", substr($_, 0, 8)), "(", length($_), ")\n";
close(FILE);
EOF
--source include/start_mysqld.inc
DROP TABLE t;

Youez - 2016 - github.com/yon3zu
LinuXploit