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
5a22c456
Commit
5a22c456
authored
Jul 18, 2019
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-13626: Add the test innodb.trx_id_future
parent
adbab0d4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
69 additions
and
0 deletions
+69
-0
mysql-test/suite/innodb/r/trx_id_future.result
mysql-test/suite/innodb/r/trx_id_future.result
+11
-0
mysql-test/suite/innodb/t/trx_id_future.test
mysql-test/suite/innodb/t/trx_id_future.test
+58
-0
No files found.
mysql-test/suite/innodb/r/trx_id_future.result
0 → 100644
View file @
5a22c456
#
# Bug #20445525 ADD A CONSISTENCY CHECK AGAINST DB_TRX_ID BEING
# IN THE FUTURE
#
CREATE TABLE t1(a INT) row_format=redundant engine=innoDB;
INSERT INTO t1 VALUES(1);
NOT FOUND /\[Warning\] InnoDB: A transaction id in a record of table `test`\.`t1` is newer than the system-wide maximum/ in mysqld.1.err
call mtr.add_suppression("\\[Warning\\] InnoDB: A transaction id in a record of table `test`\\.`t1` is newer than the system-wide maximum");
SELECT * FROM t1;
a
DROP TABLE t1;
mysql-test/suite/innodb/t/trx_id_future.test
0 → 100644
View file @
5a22c456
--
echo
#
--
echo
# Bug #20445525 ADD A CONSISTENCY CHECK AGAINST DB_TRX_ID BEING
--
echo
# IN THE FUTURE
--
echo
#
--
source
include
/
not_debug
.
inc
--
source
include
/
have_innodb
.
inc
--
source
include
/
not_embedded
.
inc
let
PAGE_SIZE
=
`select @@innodb_page_size`
;
CREATE
TABLE
t1
(
a
INT
)
row_format
=
redundant
engine
=
innoDB
;
INSERT
INTO
t1
VALUES
(
1
);
let
MYSQLD_DATADIR
=
`select @@datadir`
;
--
source
include
/
shutdown_mysqld
.
inc
perl
;
do
"
$ENV
{
MTR_SUITE_DIR
}
/include/crc32.pl"
;
my
$file
=
"
$ENV
{
MYSQLD_DATADIR
}
/test/t1.ibd"
;
open
(
FILE
,
"+<"
,
$file
)
||
die
"Unable to open
$file
"
;
binmode
FILE
;
#Seek the the infimum record and get the offset to next record
#Infimum record exist at offset 101 for redundant format
#And offset to the next record is present 2 bytes prior to
#infimum record
my
$ps
=
$ENV
{
PAGE_SIZE
};
my
$page
;
sysseek
(
FILE
,
3
*
$ps
,
0
)
||
die
"Unable to seek
$file
\n
"
;
die
"Unable to read
$file
"
unless
sysread
(
FILE
,
$page
,
$ps
)
==
$ps
;
#In this case the first record should be at offset 135
die
unless
unpack
(
"n"
,
substr
(
$page
,
99
,
2
))
==
135
;
substr
(
$page
,
135
+
6
,
6
)
=
"
\xff
"
x
6
;
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
,
3
*
$ps
,
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
"
;
EOF
--
source
include
/
start_mysqld
.
inc
let
SEARCH_FILE
=
$MYSQLTEST_VARDIR
/
log
/
mysqld
.
1.
err
;
let
SEARCH_PATTERN
=
\
[
Warning
\
]
InnoDB
:
A
transaction
id
in
a
record
of
table
`test`
\
.
`t1`
is
newer
than
the
system
-
wide
maximum
;
--
source
include
/
search_pattern_in_file
.
inc
call
mtr
.
add_suppression
(
"
\\
[Warning
\\
] InnoDB: A transaction id in a record of table `test`
\\
.`t1` is newer than the system-wide maximum"
);
SELECT
*
FROM
t1
;
DROP
TABLE
t1
;
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