Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
e9e47889
Commit
e9e47889
authored
Feb 16, 2019
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Plain Diff
Merge 10.3 into 10.4
parents
28f18aa7
df51dc28
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
118 additions
and
54 deletions
+118
-54
mysql-test/suite/innodb/include/ibd_convert.pl
mysql-test/suite/innodb/include/ibd_convert.pl
+20
-3
mysql-test/suite/innodb/r/alter_kill.result
mysql-test/suite/innodb/r/alter_kill.result
+1
-1
mysql-test/suite/innodb/t/101_compatibility.test
mysql-test/suite/innodb/t/101_compatibility.test
+3
-0
mysql-test/suite/innodb/t/alter_kill.test
mysql-test/suite/innodb/t/alter_kill.test
+27
-6
mysql-test/suite/innodb/t/doublewrite.test
mysql-test/suite/innodb/t/doublewrite.test
+9
-3
mysql-test/suite/innodb/t/log_corruption.test
mysql-test/suite/innodb/t/log_corruption.test
+40
-35
mysql-test/suite/innodb/t/row_format_redundant.test
mysql-test/suite/innodb/t/row_format_redundant.test
+6
-2
mysql-test/suite/innodb/t/table_flags.test
mysql-test/suite/innodb/t/table_flags.test
+6
-2
mysql-test/suite/mariabackup/huge_lsn.test
mysql-test/suite/mariabackup/huge_lsn.test
+6
-2
No files found.
mysql-test/suite/innodb/include/ibd_convert.pl
View file @
e9e47889
...
@@ -19,9 +19,26 @@ sub convert_to_mariadb_101
...
@@ -19,9 +19,26 @@ sub convert_to_mariadb_101
{
{
warn
"
$file
: changing
$flags
to
$badflags
\n
";
warn
"
$file
: changing
$flags
to
$badflags
\n
";
substr
(
$_
,
54
,
4
)
=
pack
("
N
",
$badflags
);
substr
(
$_
,
54
,
4
)
=
pack
("
N
",
$badflags
);
# Replace the innodb_checksum_algorithm=none checksum
# Compute and replace the innodb_checksum_algorithm=crc32 checksum
substr
(
$_
,
0
,
4
)
=
pack
("
N
",
0xdeadbeef
);
my
$polynomial
=
0x82f63b78
;
# CRC-32C
substr
(
$_
,
$page_size
-
8
,
4
)
=
pack
("
N
",
0xdeadbeef
);
if
(
$page_size
==
1024
)
{
# ROW_FORMAT=COMPRESSED
substr
(
$_
,
0
,
4
)
=
pack
("
N
",
mycrc32
(
substr
(
$_
,
4
,
12
),
0
,
$polynomial
)
^
mycrc32
(
substr
(
$_
,
24
,
2
),
0
,
$polynomial
)
^
mycrc32
(
substr
(
$_
,
34
,
$page_size
-
34
),
0
,
$polynomial
));
}
else
{
my
$ck
=
pack
("
N
",
mycrc32
(
substr
(
$_
,
4
,
22
),
0
,
$polynomial
)
^
mycrc32
(
substr
(
$_
,
38
,
$page_size
-
38
-
8
),
0
,
$polynomial
));
substr
(
$_
,
0
,
4
)
=
$ck
;
substr
(
$_
,
$page_size
-
8
,
4
)
=
$ck
;
}
syswrite
(
FILE
,
$_
,
$page_size
)
==
$page_size
||
die
"
Unable to write
$file
\n
";
syswrite
(
FILE
,
$_
,
$page_size
)
==
$page_size
||
die
"
Unable to write
$file
\n
";
}
}
close
(
FILE
);
close
(
FILE
);
...
...
mysql-test/suite/innodb/r/alter_kill.result
View file @
e9e47889
...
@@ -12,7 +12,7 @@ connection default;
...
@@ -12,7 +12,7 @@ connection default;
# Cleanly shutdown mysqld
# Cleanly shutdown mysqld
disconnect con1;
disconnect con1;
# Corrupt FIL_PAGE_OFFSET in bug16720368.ibd,
# Corrupt FIL_PAGE_OFFSET in bug16720368.ibd,
# and
update the checksum to the "don't care" value.
# and
recompute innodb_checksum_algorithm=crc32
# Restart mysqld
# Restart mysqld
# This will succeed after a clean shutdown, due to
# This will succeed after a clean shutdown, due to
# fil_open_single_table_tablespace(check_space_id=FALSE).
# fil_open_single_table_tablespace(check_space_id=FALSE).
...
...
mysql-test/suite/innodb/t/101_compatibility.test
View file @
e9e47889
...
@@ -42,6 +42,7 @@ perl;
...
@@ -42,6 +42,7 @@ perl;
do
"
$ENV
{
MTR_SUITE_DIR
}
/include/innodb-util.pl"
;
do
"
$ENV
{
MTR_SUITE_DIR
}
/include/innodb-util.pl"
;
ib_discard_tablespaces
(
"test"
,
"ti"
);
ib_discard_tablespaces
(
"test"
,
"ti"
);
ib_restore_tablespaces
(
"test"
,
"ti"
);
ib_restore_tablespaces
(
"test"
,
"ti"
);
do
"
$ENV
{
MTR_SUITE_DIR
}
/include/crc32.pl"
;
do
"
$ENV
{
MTR_SUITE_DIR
}
/include/ibd_convert.pl"
;
do
"
$ENV
{
MTR_SUITE_DIR
}
/include/ibd_convert.pl"
;
my
$ps
=
$ENV
{
INNODB_PAGE_SIZE
};
my
$ps
=
$ENV
{
INNODB_PAGE_SIZE
};
my
$dd
=
$ENV
{
MYSQLD_DATADIR
};
my
$dd
=
$ENV
{
MYSQLD_DATADIR
};
...
@@ -62,6 +63,7 @@ INSERT INTO ti VALUES(1);
...
@@ -62,6 +63,7 @@ INSERT INTO ti VALUES(1);
--
source
include
/
kill_mysqld
.
inc
--
source
include
/
kill_mysqld
.
inc
perl
;
perl
;
do
"
$ENV
{
MTR_SUITE_DIR
}
/include/crc32.pl"
;
do
"
$ENV
{
MTR_SUITE_DIR
}
/include/ibd_convert.pl"
;
do
"
$ENV
{
MTR_SUITE_DIR
}
/include/ibd_convert.pl"
;
my
$ps
=
$ENV
{
INNODB_PAGE_SIZE
};
my
$ps
=
$ENV
{
INNODB_PAGE_SIZE
};
my
$dd
=
$ENV
{
MYSQLD_DATADIR
};
my
$dd
=
$ENV
{
MYSQLD_DATADIR
};
...
@@ -81,6 +83,7 @@ CHECK TABLE tr,tc,td,tz,tdd,tp,ti;
...
@@ -81,6 +83,7 @@ CHECK TABLE tr,tc,td,tz,tdd,tp,ti;
--
source
include
/
shutdown_mysqld
.
inc
--
source
include
/
shutdown_mysqld
.
inc
perl
;
perl
;
do
"
$ENV
{
MTR_SUITE_DIR
}
/include/crc32.pl"
;
do
"
$ENV
{
MTR_SUITE_DIR
}
/include/ibd_convert.pl"
;
do
"
$ENV
{
MTR_SUITE_DIR
}
/include/ibd_convert.pl"
;
my
$ps
=
$ENV
{
INNODB_PAGE_SIZE
};
my
$ps
=
$ENV
{
INNODB_PAGE_SIZE
};
my
$dd
=
$ENV
{
MYSQLD_DATADIR
};
my
$dd
=
$ENV
{
MYSQLD_DATADIR
};
...
...
mysql-test/suite/innodb/t/alter_kill.test
View file @
e9e47889
...
@@ -44,13 +44,23 @@ connection default;
...
@@ -44,13 +44,23 @@ connection default;
disconnect
con1
;
disconnect
con1
;
--
echo
# Corrupt FIL_PAGE_OFFSET in bug16720368.ibd,
--
echo
# Corrupt FIL_PAGE_OFFSET in bug16720368.ibd,
--
echo
# and
update the checksum to the "don't care" value.
--
echo
# and
recompute innodb_checksum_algorithm=crc32
perl
;
perl
;
do
"
$ENV
{
MTR_SUITE_DIR
}
/include/crc32.pl"
;
my
$file
=
"
$ENV
{
MYSQLD_DATADIR
}
/test/bug16720368.ibd"
;
my
$file
=
"
$ENV
{
MYSQLD_DATADIR
}
/test/bug16720368.ibd"
;
open
(
FILE
,
"+<
$file
"
)
||
die
"Unable to open
$file
"
;
open
(
FILE
,
"+<
$file
"
)
||
die
"Unable to open
$file
"
;
print
FILE
pack
(
"H*"
,
"deadbeefc001cafe"
)
||
die
"Unable to write
$file
"
;
binmode
FILE
;
seek
(
FILE
,
$ENV
{
PAGE_SIZE
}
-
8
,
0
)
||
die
"Unable to seek
$file
"
;
my
$ps
=
$ENV
{
PAGE_SIZE
};
print
FILE
pack
(
"H*"
,
"deadbeef"
)
||
die
"Unable to write
$file
"
;
my
$page
;
die
"Unable to read
$file
"
unless
sysread
(
FILE
,
$page
,
$ps
)
==
$ps
;
substr
(
$page
,
4
,
4
)
=
pack
(
"N"
,
0xc001cafe
);
my
$polynomial
=
0x82f63b78
;
# CRC-32C
my
$ck
=
pack
(
"N"
,
mycrc32
(
substr
(
$page
,
4
,
22
),
0
,
$polynomial
)
^
mycrc32
(
substr
(
$page
,
38
,
$ps
-
38
-
8
),
0
,
$polynomial
));
substr
(
$page
,
0
,
4
)
=
$ck
;
substr
(
$page
,
$ps
-
8
,
4
)
=
$ck
;
sysseek
(
FILE
,
0
,
0
)
||
die
"Unable to rewind
$file
\n
"
;
syswrite
(
FILE
,
$page
,
$ps
)
==
$ps
||
die
"Unable to write
$file
\n
"
;
close
(
FILE
)
||
die
"Unable to close
$file
"
;
close
(
FILE
)
||
die
"Unable to close
$file
"
;
EOF
EOF
...
@@ -97,10 +107,21 @@ SELECT COUNT(*) FROM bug16720368;
...
@@ -97,10 +107,21 @@ SELECT COUNT(*) FROM bug16720368;
# Uncorrupt the FIL_PAGE_OFFSET.
# Uncorrupt the FIL_PAGE_OFFSET.
perl
;
perl
;
do
"
$ENV
{
MTR_SUITE_DIR
}
/include/crc32.pl"
;
my
$file
=
"
$ENV
{
MYSQLD_DATADIR
}
/test/bug16720368.ibd"
;
my
$file
=
"
$ENV
{
MYSQLD_DATADIR
}
/test/bug16720368.ibd"
;
open
(
FILE
,
"+<
$file
"
)
||
die
"Unable to open
$file
"
;
open
(
FILE
,
"+<
$file
"
)
||
die
"Unable to open
$file
"
;
# Uncorrupt FIL_PAGE_OFFSET.
binmode
FILE
;
print
FILE
pack
(
"H*"
,
"deadbeef00000000"
)
||
die
"Unable to write
$file
"
;
my
$ps
=
$ENV
{
PAGE_SIZE
};
my
$page
;
die
"Unable to read
$file
"
unless
sysread
(
FILE
,
$page
,
$ps
)
==
$ps
;
substr
(
$page
,
4
,
4
)
=
pack
(
"N"
,
0
);
my
$polynomial
=
0x82f63b78
;
# CRC-32C
my
$ck
=
pack
(
"N"
,
mycrc32
(
substr
(
$page
,
4
,
22
),
0
,
$polynomial
)
^
mycrc32
(
substr
(
$page
,
38
,
$ps
-
38
-
8
),
0
,
$polynomial
));
substr
(
$page
,
0
,
4
)
=
$ck
;
substr
(
$page
,
$ps
-
8
,
4
)
=
$ck
;
sysseek
(
FILE
,
0
,
0
)
||
die
"Unable to rewind
$file
\n
"
;
syswrite
(
FILE
,
$page
,
$ps
)
==
$ps
||
die
"Unable to write
$file
\n
"
;
close
(
FILE
)
||
die
"Unable to close
$file
"
;
close
(
FILE
)
||
die
"Unable to close
$file
"
;
EOF
EOF
...
...
mysql-test/suite/innodb/t/doublewrite.test
View file @
e9e47889
...
@@ -73,6 +73,9 @@ set global innodb_buf_flush_list_now = 1;
...
@@ -73,6 +73,9 @@ set global innodb_buf_flush_list_now = 1;
perl
;
perl
;
use
IO
::Handle
;
use
IO
::Handle
;
do
"
$ENV
{
MTR_SUITE_DIR
}
/include/crc32.pl"
;
my
$polynomial
=
0x82f63b78
;
# CRC-32C
my
$fname
=
"
$ENV
{
'MYSQLD_DATADIR'
}
test/t1.ibd"
;
my
$fname
=
"
$ENV
{
'MYSQLD_DATADIR'
}
test/t1.ibd"
;
my
$page_size
=
$ENV
{
INNODB_PAGE_SIZE
};
my
$page_size
=
$ENV
{
INNODB_PAGE_SIZE
};
my
$page
;
my
$page
;
...
@@ -102,9 +105,12 @@ for (my $d = $d1; $d < $d2 + 64; $d++)
...
@@ -102,9 +105,12 @@ for (my $d = $d1; $d < $d2 + 64; $d++)
$badflags
|=
(
$flags
&
15
<<
6
)
<<
7
;
# PAGE_SSIZE
$badflags
|=
(
$flags
&
15
<<
6
)
<<
7
;
# PAGE_SSIZE
substr
(
$_
,
54
,
4
)
=
pack
(
"N"
,
$badflags
);
substr
(
$_
,
54
,
4
)
=
pack
(
"N"
,
$badflags
);
# Replace the innodb_checksum_algorithm=none checksum
# Replace the innodb_checksum_algorithm=crc32 checksum
substr
(
$_
,
0
,
4
)
=
pack
(
"N"
,
0xdeadbeef
);
my
$ck
=
pack
(
"N"
,
substr
(
$_
,
$page_size
-
8
,
4
)
=
pack
(
"N"
,
0xdeadbeef
);
mycrc32
(
substr
(
$_
,
4
,
22
),
0
,
$polynomial
)
^
mycrc32
(
substr
(
$_
,
38
,
$page_size
-
38
-
8
),
0
,
$polynomial
));
substr
(
$_
,
0
,
4
)
=
$ck
;
substr
(
$_
,
$page_size
-
8
,
4
)
=
$ck
;
syswrite
(
FILE
,
$_
,
$page_size
)
==
$page_size
||
die
;
syswrite
(
FILE
,
$_
,
$page_size
)
==
$page_size
||
die
;
close
(
FILE
);
close
(
FILE
);
exit
0
;
exit
0
;
...
...
mysql-test/suite/innodb/t/log_corruption.test
View file @
e9e47889
...
@@ -33,55 +33,60 @@ EOF
...
@@ -33,55 +33,60 @@ EOF
--
let
$dirs
=
--
innodb
-
data
-
home
-
dir
=
$bugdir
--
innodb
-
log
-
group
-
home
-
dir
=
$bugdir
--
let
$dirs
=
--
innodb
-
data
-
home
-
dir
=
$bugdir
--
innodb
-
log
-
group
-
home
-
dir
=
$bugdir
perl
;
perl
;
do
"
$ENV
{
MTR_SUITE_DIR
}
/../innodb/include/crc32.pl"
;
# Create a dummy system tablespace file using the default innodb_page_size=16k
# Create a dummy system tablespace file using the default innodb_page_size=16k
die
unless
open
OUT
,
">"
,
"
$ENV
{
bugdir
}
/ibdata1"
;
die
unless
open
OUT
,
">"
,
"
$ENV
{
bugdir
}
/ibdata1"
;
binmode
OUT
;
binmode
OUT
;
# We calculate innodb_checksum_algorithm=crc32 for the pages.
# The following bytes are excluded:
# bytes 0..3 (the checksum is stored there)
# bytes 26..37 (encryption key version, post-encryption checksum, tablespace id)
# bytes $page_size-8..$page_size-1 (checksum, LSB of FIL_PAGE_LSN)
my
$polynomial
=
0x82f63b78
;
# CRC-32C
# Tablespace header page with valid FSP_SIZE=768 pages.
# Tablespace header page with valid FSP_SIZE=768 pages.
# Also, write a dummy FSEG_MAGIC_N at offset 60 to keep fseg_inode_try_get()
# Also, write a dummy FSEG_MAGIC_N at offset 60 to keep fseg_inode_try_get()
# happy when fseg_n_reserved_pages() is following an invalid pointer
# happy when fseg_n_reserved_pages() is following an invalid pointer
# from the all-zero change buffer header page (page 3).
# from the all-zero change buffer header page (page 3).
print
OUT
pack
(
"Nx[42]Nx[10]Nx[16312]Nx[4]"
,
## FIL_PAGE_OFFSET
0xdeadbeef
,
# checksum
my
$head
=
pack
(
"Nx[18]"
,
0
);
768
,
# FSP_PAGE_SIZE
## FSP_PAGE_SIZE, # FSEG_MAGIC_N
97937874
,
# FSEG_MAGIC_N
my
$body
=
pack
(
"x[8]Nx[10]Nx[16312]"
,
768
,
97937874
);
0xdeadbeef
);
# checksum
my
$ck
=
mycrc32
(
$head
,
0
,
$polynomial
)
^
mycrc32
(
$body
,
0
,
$polynomial
);
print
OUT
pack
(
"N"
,
$ck
)
.
$head
.
pack
(
"x[12]"
)
.
$body
.
pack
(
"Nx[4]"
,
$ck
);
# Dummy pages 1..6.
# Dummy pages 1..6.
print
OUT
chr
(
0
)
x
(
6
*
16384
);
print
OUT
chr
(
0
)
x
(
6
*
16384
);
# Dictionary header page.
# Dictionary header page
(page 7)
.
print
OUT
pack
(
"NNx[62]Nx[8]Nx[16290]Nx[4]"
,
## FIL_PAGE_OFFSET
0xdeadbeef
,
# checksum
$head
=
pack
(
"Nx[18]"
,
7
);
7
,
# FIL_PAGE_OFFSET
## DICT_HDR_TABLES,DICT_HDR_INDEXES
8
,
# DICT_HDR_TABLES
$body
=
pack
(
"x[32]Nx[8]Nx[16290]"
,
8
,
9
);
9
,
# DICT_HDR_INDEXES
$ck
=
mycrc32
(
$head
,
0
,
$polynomial
)
^
mycrc32
(
$body
,
0
,
$polynomial
);
0xdeadbeef
);
# checksum
print
OUT
pack
(
"N"
,
$ck
)
.
$head
.
pack
(
"x[12]"
)
.
$body
.
pack
(
"Nx[4]"
,
$ck
);
# Empty SYS_TABLES page (page 8).
# Empty SYS_TABLES page (page 8).
print
OUT
pack
(
"NNNNx[8]nx[12]nnx[31]Cx[20]"
,
## FIL_PAGE_OFFSET, FIL_PAGE_PREV, FIL_PAGE_NEXT, FIL_PAGE_TYPE
0xdeadbeef
,
# checksum
$head
=
pack
(
"NNNx[8]n"
,
8
,
~
0
,
~
0
,
17855
);
8
,
# FIL_PAGE_OFFSET
## PAGE_N_DIR_SLOTS, PAGE_HEAP_TOP, PAGE_INDEX_ID == DICT_TABLES_ID
~
0
,
~
0
,
# FIL_PAGE_PREV, FIL_PAGE_NEXT
$body
=
pack
(
"nnx[31]Cx[20]"
,
2
,
124
,
1
);
17855
,
# FIL_PAGE_TYPE == FIL_PAGE_INDEX
$body
.=
pack
(
"nxnn"
,
0x801
,
3
,
116
)
.
"infimum"
;
2
,
# PAGE_N_DIR_SLOTS
$body
.=
pack
(
"xnxnxx"
,
0x901
,
0x803
)
.
"supremum"
;
124
,
# PAGE_HEAP_TOP
$body
.=
pack
(
"x[16248]nn"
,
116
,
101
);
1
);
# PAGE_INDEX_ID == DICT_TABLES_ID
$ck
=
mycrc32
(
$head
,
0
,
$polynomial
)
^
mycrc32
(
$body
,
0
,
$polynomial
);
print
OUT
pack
(
"nxnn"
,
0x801
,
3
,
116
),
"infimum"
;
print
OUT
pack
(
"N"
,
$ck
)
.
$head
.
pack
(
"x[12]"
)
.
$body
.
pack
(
"Nx[4]"
,
$ck
);
print
OUT
pack
(
"xnxnxx"
,
0x901
,
0x803
),
"supremum"
;
print
OUT
pack
(
"x[16248]nnNx[4]"
,
116
,
101
,
0xdeadbeef
);
# Empty SYS_INDEXES page (page 9).
# Empty SYS_INDEXES page (page 9).
print
OUT
pack
(
"NNNNx[8]nx[12]nnx[31]Cx[20]"
,
## FIL_PAGE_OFFSET, FIL_PAGE_PREV, FIL_PAGE_NEXT, FIL_PAGE_TYPE
0xdeadbeef
,
# checksum
$head
=
pack
(
"NNNx[8]n"
,
9
,
~
0
,
~
0
,
17855
);
9
,
# FIL_PAGE_OFFSET
## PAGE_N_DIR_SLOTS, PAGE_HEAP_TOP, PAGE_INDEX_ID == DICT_INDEXES_ID
~
0
,
~
0
,
# FIL_PAGE_PREV, FIL_PAGE_NEXT
$body
=
pack
(
"nnx[31]Cx[20]"
,
2
,
124
,
3
);
17855
,
# FIL_PAGE_TYPE == FIL_PAGE_INDEX
$body
.=
pack
(
"nxnn"
,
0x801
,
3
,
116
)
.
"infimum"
;
2
,
# PAGE_N_DIR_SLOTS
$body
.=
pack
(
"xnxnxx"
,
0x901
,
0x803
)
.
"supremum"
;
124
,
# PAGE_HEAP_TOP
$body
.=
pack
(
"x[16248]nn"
,
116
,
101
);
3
);
# PAGE_INDEX_ID == DICT_INDEXES_ID
$ck
=
mycrc32
(
$head
,
0
,
$polynomial
)
^
mycrc32
(
$body
,
0
,
$polynomial
);
print
OUT
pack
(
"N"
,
$ck
)
.
$head
.
pack
(
"x[12]"
)
.
$body
.
pack
(
"Nx[4]"
,
$ck
);
print
OUT
pack
(
"nxnn"
,
0x801
,
3
,
116
),
"infimum"
;
print
OUT
pack
(
"xnxnxx"
,
0x901
,
0x803
),
"supremum"
;
print
OUT
pack
(
"x[16248]nnNx[4]"
,
116
,
101
,
0xdeadbeef
);
print
OUT
chr
(
0
)
x
(
759
*
16384
);
print
OUT
chr
(
0
)
x
(
759
*
16384
);
close
OUT
or
die
;
close
OUT
or
die
;
...
...
mysql-test/suite/innodb/t/row_format_redundant.test
View file @
e9e47889
...
@@ -92,6 +92,7 @@ TRUNCATE TABLE t3;
...
@@ -92,6 +92,7 @@ TRUNCATE TABLE t3;
--
source
include
/
shutdown_mysqld
.
inc
--
source
include
/
shutdown_mysqld
.
inc
--
perl
--
perl
use
strict
;
use
strict
;
do
"
$ENV
{
MTR_SUITE_DIR
}
/include/crc32.pl"
;
my
$ps
=
$ENV
{
INNODB_PAGE_SIZE
};
my
$ps
=
$ENV
{
INNODB_PAGE_SIZE
};
my
$file
=
"
$ENV
{
bugdir
}
/ibdata1"
;
my
$file
=
"
$ENV
{
bugdir
}
/ibdata1"
;
open
(
FILE
,
"+<"
,
$file
)
||
die
"Unable to open
$file
\n
"
;
open
(
FILE
,
"+<"
,
$file
)
||
die
"Unable to open
$file
\n
"
;
...
@@ -120,8 +121,11 @@ for (my $offset= 0x65; $offset;
...
@@ -120,8 +121,11 @@ for (my $offset= 0x65; $offset;
$start
=
$end
&
0x7f
;
$start
=
$end
&
0x7f
;
}
}
}
}
substr
(
$page
,
0
,
4
)
=
pack
(
"N"
,
0xdeadbeef
);
my
$polynomial
=
0x82f63b78
;
# CRC-32C
substr
(
$page
,
$ps
-
8
,
4
)
=
pack
(
"N"
,
0xdeadbeef
);
my
$ck
=
pack
(
"N"
,
mycrc32
(
substr
(
$page
,
4
,
22
),
0
,
$polynomial
)
^
mycrc32
(
substr
(
$page
,
38
,
$ps
-
38
-
8
),
0
,
$polynomial
));
substr
(
$page
,
0
,
4
)
=
$ck
;
substr
(
$page
,
$ps
-
8
,
4
)
=
$ck
;
sysseek
(
FILE
,
$sys_tables_root
*
$ps
,
0
)
||
die
"Unable to seek
$file
"
;
sysseek
(
FILE
,
$sys_tables_root
*
$ps
,
0
)
||
die
"Unable to seek
$file
"
;
syswrite
(
FILE
,
$page
,
$ps
)
==
$ps
||
die
"Unable to write
$file
\n
"
;
syswrite
(
FILE
,
$page
,
$ps
)
==
$ps
||
die
"Unable to write
$file
\n
"
;
close
(
FILE
)
||
die
"Unable to close
$file
\n
"
;
close
(
FILE
)
||
die
"Unable to close
$file
\n
"
;
...
...
mysql-test/suite/innodb/t/table_flags.test
View file @
e9e47889
...
@@ -52,6 +52,7 @@ PAGE_COMPRESSED=1 PAGE_COMPRESSION_LEVEL=9;
...
@@ -52,6 +52,7 @@ PAGE_COMPRESSED=1 PAGE_COMPRESSION_LEVEL=9;
--
source
include
/
shutdown_mysqld
.
inc
--
source
include
/
shutdown_mysqld
.
inc
--
perl
--
perl
use
strict
;
use
strict
;
do
"
$ENV
{
MTR_SUITE_DIR
}
/include/crc32.pl"
;
my
$ps
=
$ENV
{
INNODB_PAGE_SIZE
};
my
$ps
=
$ENV
{
INNODB_PAGE_SIZE
};
my
$file
=
"
$ENV
{
bugdir
}
/ibdata1"
;
my
$file
=
"
$ENV
{
bugdir
}
/ibdata1"
;
open
(
FILE
,
"+<"
,
$file
)
||
die
"Unable to open
$file
\n
"
;
open
(
FILE
,
"+<"
,
$file
)
||
die
"Unable to open
$file
\n
"
;
...
@@ -127,8 +128,11 @@ for (my $offset= 0x65; $offset;
...
@@ -127,8 +128,11 @@ for (my $offset= 0x65; $offset;
}
}
print
")
\n
"
;
print
")
\n
"
;
}
}
substr
(
$page
,
0
,
4
)
=
pack
(
"N"
,
0xdeadbeef
);
my
$polynomial
=
0x82f63b78
;
# CRC-32C
substr
(
$page
,
$ps
-
8
,
4
)
=
pack
(
"N"
,
0xdeadbeef
);
my
$ck
=
pack
(
"N"
,
mycrc32
(
substr
(
$page
,
4
,
22
),
0
,
$polynomial
)
^
mycrc32
(
substr
(
$page
,
38
,
$ps
-
38
-
8
),
0
,
$polynomial
));
substr
(
$page
,
0
,
4
)
=
$ck
;
substr
(
$page
,
$ps
-
8
,
4
)
=
$ck
;
sysseek
(
FILE
,
$sys_tables_root
*
$ps
,
0
)
||
die
"Unable to seek
$file
"
;
sysseek
(
FILE
,
$sys_tables_root
*
$ps
,
0
)
||
die
"Unable to seek
$file
"
;
syswrite
(
FILE
,
$page
,
$ps
)
==
$ps
||
die
"Unable to write
$file
\n
"
;
syswrite
(
FILE
,
$page
,
$ps
)
==
$ps
||
die
"Unable to write
$file
\n
"
;
close
(
FILE
)
||
die
"Unable to close
$file
\n
"
;
close
(
FILE
)
||
die
"Unable to close
$file
\n
"
;
...
...
mysql-test/suite/mariabackup/huge_lsn.test
View file @
e9e47889
...
@@ -11,6 +11,7 @@ let MYSQLD_DATADIR=`select @@datadir`;
...
@@ -11,6 +11,7 @@ let MYSQLD_DATADIR=`select @@datadir`;
--
source
include
/
shutdown_mysqld
.
inc
--
source
include
/
shutdown_mysqld
.
inc
perl
;
perl
;
do
"
$ENV
{
MTR_SUITE_DIR
}
/../innodb/include/crc32.pl"
;
my
$file
=
"
$ENV
{
MYSQLD_DATADIR
}
/ibdata1"
;
my
$file
=
"
$ENV
{
MYSQLD_DATADIR
}
/ibdata1"
;
open
(
FILE
,
"+<"
,
$file
)
or
die
"Unable to open
$file
\n
"
;
open
(
FILE
,
"+<"
,
$file
)
or
die
"Unable to open
$file
\n
"
;
binmode
FILE
;
binmode
FILE
;
...
@@ -18,8 +19,11 @@ my $ps= $ENV{INNODB_PAGE_SIZE};
...
@@ -18,8 +19,11 @@ my $ps= $ENV{INNODB_PAGE_SIZE};
my
$page
;
my
$page
;
die
"Unable to read
$file
"
unless
sysread
(
FILE
,
$page
,
$ps
)
==
$ps
;
die
"Unable to read
$file
"
unless
sysread
(
FILE
,
$page
,
$ps
)
==
$ps
;
substr
(
$page
,
26
,
8
)
=
pack
(
"NN"
,
4096
,
~
1024
);
substr
(
$page
,
26
,
8
)
=
pack
(
"NN"
,
4096
,
~
1024
);
substr
(
$page
,
0
,
4
)
=
pack
(
"N"
,
0xdeadbeef
);
my
$polynomial
=
0x82f63b78
;
# CRC-32C
substr
(
$page
,
$ps
-
8
,
4
)
=
pack
(
"N"
,
0xdeadbeef
);
my
$ck
=
pack
(
"N"
,
mycrc32
(
substr
(
$page
,
4
,
22
),
0
,
$polynomial
)
^
mycrc32
(
substr
(
$page
,
38
,
$ps
-
38
-
8
),
0
,
$polynomial
));
substr
(
$page
,
0
,
4
)
=
$ck
;
substr
(
$page
,
$ps
-
8
,
4
)
=
$ck
;
sysseek
(
FILE
,
0
,
0
)
||
die
"Unable to rewind
$file
\n
"
;
sysseek
(
FILE
,
0
,
0
)
||
die
"Unable to rewind
$file
\n
"
;
syswrite
(
FILE
,
$page
,
$ps
)
==
$ps
||
die
"Unable to write
$file
\n
"
;
syswrite
(
FILE
,
$page
,
$ps
)
==
$ps
||
die
"Unable to write
$file
\n
"
;
close
(
FILE
)
||
die
"Unable to close
$file
\n
"
;
close
(
FILE
)
||
die
"Unable to close
$file
\n
"
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment